aclocal.m4 revision dd0822ca
1dc407927Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 23eed67faSmbalmer 33eed67faSmbalmer# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4dc407927Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 53eed67faSmbalmer# This file is free software; the Free Software Foundation 63eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 73eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 83eed67faSmbalmer 93eed67faSmbalmer# This program is distributed in the hope that it will be useful, 103eed67faSmbalmer# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 113eed67faSmbalmer# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 123eed67faSmbalmer# PARTICULAR PURPOSE. 133eed67faSmbalmer 14dc407927Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15dc407927Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16dd0822caSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17dd0822caSmrg[m4_warning([this file was generated for autoconf 2.68. 18dc407927SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19dc407927SmrgIf you have problems, you may need to regenerate the build system entirely. 20dc407927SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21dc407927Smrg 223eed67faSmbalmer# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23dc407927Smrg# 24dc407927Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25dd0822caSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 26dd0822caSmrg# Inc. 27dc407927Smrg# Written by Gordon Matzigkeit, 1996 28dc407927Smrg# 29dc407927Smrg# This file is free software; the Free Software Foundation gives 30dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 31dc407927Smrg# modifications, as long as this notice is preserved. 32dc407927Smrg 33dc407927Smrgm4_define([_LT_COPYING], [dnl 34dc407927Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 35dd0822caSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 36dd0822caSmrg# Inc. 37dc407927Smrg# Written by Gordon Matzigkeit, 1996 38dc407927Smrg# 39dc407927Smrg# This file is part of GNU Libtool. 40dc407927Smrg# 41dc407927Smrg# GNU Libtool is free software; you can redistribute it and/or 42dc407927Smrg# modify it under the terms of the GNU General Public License as 43dc407927Smrg# published by the Free Software Foundation; either version 2 of 44dc407927Smrg# the License, or (at your option) any later version. 45dc407927Smrg# 46dc407927Smrg# As a special exception to the GNU General Public License, 47dc407927Smrg# if you distribute this file as part of a program or library that 48dc407927Smrg# is built using GNU Libtool, you may include this file under the 49dc407927Smrg# same distribution terms that you use for the rest of that program. 50dc407927Smrg# 51dc407927Smrg# GNU Libtool is distributed in the hope that it will be useful, 52dc407927Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 53dc407927Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54dc407927Smrg# GNU General Public License for more details. 55dc407927Smrg# 56dc407927Smrg# You should have received a copy of the GNU General Public License 57dc407927Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 58dc407927Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 59dc407927Smrg# obtained by writing to the Free Software Foundation, Inc., 60dc407927Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61dc407927Smrg]) 623eed67faSmbalmer 63dd0822caSmrg# serial 57 LT_INIT 643eed67faSmbalmer 653eed67faSmbalmer 66dc407927Smrg# LT_PREREQ(VERSION) 67dc407927Smrg# ------------------ 68dc407927Smrg# Complain and exit if this libtool version is less that VERSION. 69dc407927Smrgm4_defun([LT_PREREQ], 70dc407927Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 71dc407927Smrg [m4_default([$3], 72dc407927Smrg [m4_fatal([Libtool version $1 or higher is required], 73dc407927Smrg 63)])], 74dc407927Smrg [$2])]) 753eed67faSmbalmer 763eed67faSmbalmer 77dc407927Smrg# _LT_CHECK_BUILDDIR 78dc407927Smrg# ------------------ 79dc407927Smrg# Complain if the absolute build directory name contains unusual characters 80dc407927Smrgm4_defun([_LT_CHECK_BUILDDIR], 81dc407927Smrg[case `pwd` in 82dc407927Smrg *\ * | *\ *) 83dc407927Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 84dc407927Smrgesac 85dc407927Smrg]) 86dc407927Smrg 87dc407927Smrg 88dc407927Smrg# LT_INIT([OPTIONS]) 89dc407927Smrg# ------------------ 90dc407927SmrgAC_DEFUN([LT_INIT], 91dc407927Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 92dd0822caSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 93dc407927SmrgAC_BEFORE([$0], [LT_LANG])dnl 94dc407927SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 95dc407927SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 96dc407927Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 97dc407927Smrg 98dc407927Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 99dc407927Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 100dc407927Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 101dc407927Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 102dc407927Smrgdnl unless we require an AC_DEFUNed macro: 103dc407927SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 104dc407927SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 105dc407927SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 106dc407927SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 107dc407927Smrgm4_require([_LT_PROG_LTMAIN])dnl 108dc407927Smrg 109dd0822caSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 110dd0822caSmrg 111dc407927Smrgdnl Parse OPTIONS 112dc407927Smrg_LT_SET_OPTIONS([$0], [$1]) 1133eed67faSmbalmer 1143eed67faSmbalmer# This can be used to rebuild libtool when needed 115dc407927SmrgLIBTOOL_DEPS="$ltmain" 1163eed67faSmbalmer 1173eed67faSmbalmer# Always use our own libtool. 1183eed67faSmbalmerLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1193eed67faSmbalmerAC_SUBST(LIBTOOL)dnl 1203eed67faSmbalmer 121dc407927Smrg_LT_SETUP 1223eed67faSmbalmer 123dc407927Smrg# Only expand once: 124dc407927Smrgm4_define([LT_INIT]) 125dc407927Smrg])# LT_INIT 1263eed67faSmbalmer 127dc407927Smrg# Old names: 128dc407927SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129dc407927SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 130dc407927Smrgdnl aclocal-1.4 backwards compatibility: 131dc407927Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 132dc407927Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 133dc407927Smrg 134dc407927Smrg 135dc407927Smrg# _LT_CC_BASENAME(CC) 136dc407927Smrg# ------------------- 137dc407927Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 138dc407927Smrgm4_defun([_LT_CC_BASENAME], 139dc407927Smrg[for cc_temp in $1""; do 140dc407927Smrg case $cc_temp in 141dc407927Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 142dc407927Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 143dc407927Smrg \-*) ;; 144dc407927Smrg *) break;; 145dc407927Smrg esac 146dc407927Smrgdone 147dd0822caSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 148dc407927Smrg]) 149dc407927Smrg 150dc407927Smrg 151dc407927Smrg# _LT_FILEUTILS_DEFAULTS 152dc407927Smrg# ---------------------- 153dc407927Smrg# It is okay to use these file commands and assume they have been set 154dc407927Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 155dc407927Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 156dc407927Smrg[: ${CP="cp -f"} 157dc407927Smrg: ${MV="mv -f"} 158dc407927Smrg: ${RM="rm -f"} 159dc407927Smrg])# _LT_FILEUTILS_DEFAULTS 160dc407927Smrg 161dc407927Smrg 162dc407927Smrg# _LT_SETUP 163dc407927Smrg# --------- 164dc407927Smrgm4_defun([_LT_SETUP], 165dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1663eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 167dd0822caSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 168dd0822caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 169dd0822caSmrg 170dc407927Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 171dc407927Smrg_LT_DECL([], [host], [0])dnl 172dc407927Smrg_LT_DECL([], [host_os], [0])dnl 173dc407927Smrgdnl 174dc407927Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 175dc407927Smrg_LT_DECL([], [build], [0])dnl 176dc407927Smrg_LT_DECL([], [build_os], [0])dnl 177dc407927Smrgdnl 1783eed67faSmbalmerAC_REQUIRE([AC_PROG_CC])dnl 179dc407927SmrgAC_REQUIRE([LT_PATH_LD])dnl 180dc407927SmrgAC_REQUIRE([LT_PATH_NM])dnl 181dc407927Smrgdnl 1823eed67faSmbalmerAC_REQUIRE([AC_PROG_LN_S])dnl 183dc407927Smrgtest -z "$LN_S" && LN_S="ln -s" 184dc407927Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1853eed67faSmbalmerdnl 186dc407927SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 187dc407927Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 188dc407927Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 189dc407927Smrgdnl 190dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 191dc407927Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 192dd0822caSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 193dc407927Smrgm4_require([_LT_CMD_RELOAD])dnl 194dc407927Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 195dd0822caSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 196dc407927Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 197dc407927Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 198dd0822caSmrgm4_require([_LT_WITH_SYSROOT])dnl 199dc407927Smrg 200dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([ 201dc407927Smrg# See if we are running on zsh, and set the options which allow our 202dc407927Smrg# commands through without removal of \ escapes INIT. 203dc407927Smrgif test -n "\${ZSH_VERSION+set}" ; then 204dc407927Smrg setopt NO_GLOB_SUBST 205dc407927Smrgfi 206dc407927Smrg]) 207dc407927Smrgif test -n "${ZSH_VERSION+set}" ; then 208dc407927Smrg setopt NO_GLOB_SUBST 209dc407927Smrgfi 2103eed67faSmbalmer 211dc407927Smrg_LT_CHECK_OBJDIR 212dc407927Smrg 213dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 2143eed67faSmbalmer 2153eed67faSmbalmercase $host_os in 2163eed67faSmbalmeraix3*) 2173eed67faSmbalmer # AIX sometimes has problems with the GCC collect2 program. For some 2183eed67faSmbalmer # reason, if we set the COLLECT_NAMES environment variable, the problems 2193eed67faSmbalmer # vanish in a puff of smoke. 2203eed67faSmbalmer if test "X${COLLECT_NAMES+set}" != Xset; then 2213eed67faSmbalmer COLLECT_NAMES= 2223eed67faSmbalmer export COLLECT_NAMES 2233eed67faSmbalmer fi 2243eed67faSmbalmer ;; 2253eed67faSmbalmeresac 2263eed67faSmbalmer 2273eed67faSmbalmer# Global variables: 228dc407927Smrgofile=libtool 2293eed67faSmbalmercan_build_shared=yes 2303eed67faSmbalmer 2313eed67faSmbalmer# All known linkers require a `.a' archive for static linking (except MSVC, 2323eed67faSmbalmer# which needs '.lib'). 2333eed67faSmbalmerlibext=a 2343eed67faSmbalmer 235dc407927Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2363eed67faSmbalmer 2373eed67faSmbalmerold_CC="$CC" 2383eed67faSmbalmerold_CFLAGS="$CFLAGS" 2393eed67faSmbalmer 2403eed67faSmbalmer# Set sane defaults for various variables 2413eed67faSmbalmertest -z "$CC" && CC=cc 2423eed67faSmbalmertest -z "$LTCC" && LTCC=$CC 2433eed67faSmbalmertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2443eed67faSmbalmertest -z "$LD" && LD=ld 2453eed67faSmbalmertest -z "$ac_objext" && ac_objext=o 2463eed67faSmbalmer 2473eed67faSmbalmer_LT_CC_BASENAME([$compiler]) 2483eed67faSmbalmer 2493eed67faSmbalmer# Only perform the check for file, if the check method requires it 250dc407927Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2513eed67faSmbalmercase $deplibs_check_method in 2523eed67faSmbalmerfile_magic*) 2533eed67faSmbalmer if test "$file_magic_cmd" = '$MAGIC_CMD'; then 254dc407927Smrg _LT_PATH_MAGIC 2553eed67faSmbalmer fi 2563eed67faSmbalmer ;; 2573eed67faSmbalmeresac 2583eed67faSmbalmer 259dc407927Smrg# Use C for the default configuration in the libtool script 260dc407927SmrgLT_SUPPORTED_TAG([CC]) 261dc407927Smrg_LT_LANG_C_CONFIG 262dc407927Smrg_LT_LANG_DEFAULT_CONFIG 263dc407927Smrg_LT_CONFIG_COMMANDS 264dc407927Smrg])# _LT_SETUP 2653eed67faSmbalmer 2663eed67faSmbalmer 267dd0822caSmrg# _LT_PREPARE_SED_QUOTE_VARS 268dd0822caSmrg# -------------------------- 269dd0822caSmrg# Define a few sed substitution that help us do robust quoting. 270dd0822caSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 271dd0822caSmrg[# Backslashify metacharacters that are still active within 272dd0822caSmrg# double-quoted strings. 273dd0822caSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 274dd0822caSmrg 275dd0822caSmrg# Same as above, but do not quote variable references. 276dd0822caSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 277dd0822caSmrg 278dd0822caSmrg# Sed substitution to delay expansion of an escaped shell variable in a 279dd0822caSmrg# double_quote_subst'ed string. 280dd0822caSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 281dd0822caSmrg 282dd0822caSmrg# Sed substitution to delay expansion of an escaped single quote. 283dd0822caSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 284dd0822caSmrg 285dd0822caSmrg# Sed substitution to avoid accidental globbing in evaled expressions 286dd0822caSmrgno_glob_subst='s/\*/\\\*/g' 287dd0822caSmrg]) 288dd0822caSmrg 289dc407927Smrg# _LT_PROG_LTMAIN 290dc407927Smrg# --------------- 291dc407927Smrg# Note that this code is called both from `configure', and `config.status' 292dc407927Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 293dc407927Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 294dc407927Smrg# so we pass a copy along to make sure it has a sensible value anyway. 295dc407927Smrgm4_defun([_LT_PROG_LTMAIN], 296dc407927Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 297dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 298dc407927Smrgltmain="$ac_aux_dir/ltmain.sh" 299dc407927Smrg])# _LT_PROG_LTMAIN 3003eed67faSmbalmer 3013eed67faSmbalmer 302dc407927Smrg 303dc407927Smrg# So that we can recreate a full libtool script including additional 304dc407927Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 305dc407927Smrg# in macros and then make a single call at the end using the `libtool' 306dc407927Smrg# label. 307dc407927Smrg 308dc407927Smrg 309dc407927Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 310dc407927Smrg# ---------------------------------------- 311dc407927Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 312dc407927Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 313dc407927Smrg[m4_ifval([$1], 314dc407927Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 315dc407927Smrg [$1 316dc407927Smrg])])]) 317dc407927Smrg 318dc407927Smrg# Initialize. 319dc407927Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 320dc407927Smrg 321dc407927Smrg 322dc407927Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 323dc407927Smrg# ------------------------------ 324dc407927Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325dc407927Smrgm4_define([_LT_CONFIG_LIBTOOL], 326dc407927Smrg[m4_ifval([$1], 327dc407927Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 328dc407927Smrg [$1 329dc407927Smrg])])]) 330dc407927Smrg 331dc407927Smrg# Initialize. 332dc407927Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 333dc407927Smrg 334dc407927Smrg 335dc407927Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 336dc407927Smrg# ----------------------------------------------------- 337dc407927Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 338dc407927Smrg[_LT_CONFIG_LIBTOOL([$1]) 339dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 340dc407927Smrg]) 341dc407927Smrg 342dc407927Smrg 343dc407927Smrg# _LT_FORMAT_COMMENT([COMMENT]) 344dc407927Smrg# ----------------------------- 345dc407927Smrg# Add leading comment marks to the start of each line, and a trailing 346dc407927Smrg# full-stop to the whole comment if one is not present already. 347dc407927Smrgm4_define([_LT_FORMAT_COMMENT], 348dc407927Smrg[m4_ifval([$1], [ 349dc407927Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 350dc407927Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 351dc407927Smrg)]) 352dc407927Smrg 353dc407927Smrg 354dc407927Smrg 355dc407927Smrg 356dc407927Smrg 357dc407927Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 358dc407927Smrg# ------------------------------------------------------------------- 359dc407927Smrg# CONFIGNAME is the name given to the value in the libtool script. 360dc407927Smrg# VARNAME is the (base) name used in the configure script. 361dc407927Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 362dc407927Smrg# VARNAME. Any other value will be used directly. 363dc407927Smrgm4_define([_LT_DECL], 364dc407927Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 365dc407927Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 366dc407927Smrg [m4_ifval([$1], [$1], [$2])]) 367dc407927Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 368dc407927Smrg m4_ifval([$4], 369dc407927Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 370dc407927Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 371dc407927Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 372dc407927Smrg]) 373dc407927Smrg 374dc407927Smrg 375dc407927Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 376dc407927Smrg# -------------------------------------------------------- 377dc407927Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 378dc407927Smrg 379dc407927Smrg 380dc407927Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 381dc407927Smrg# ------------------------------------------------ 382dc407927Smrgm4_define([lt_decl_tag_varnames], 383dc407927Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 384dc407927Smrg 385dc407927Smrg 386dc407927Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 387dc407927Smrg# --------------------------------------------------------- 388dc407927Smrgm4_define([_lt_decl_filter], 389dc407927Smrg[m4_case([$#], 390dc407927Smrg [0], [m4_fatal([$0: too few arguments: $#])], 391dc407927Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 392dc407927Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 393dc407927Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 394dc407927Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 395dc407927Smrg]) 396dc407927Smrg 397dc407927Smrg 398dc407927Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 399dc407927Smrg# -------------------------------------------------- 400dc407927Smrgm4_define([lt_decl_quote_varnames], 401dc407927Smrg[_lt_decl_filter([value], [1], $@)]) 402dc407927Smrg 403dc407927Smrg 404dc407927Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 405dc407927Smrg# --------------------------------------------------- 406dc407927Smrgm4_define([lt_decl_dquote_varnames], 407dc407927Smrg[_lt_decl_filter([value], [2], $@)]) 408dc407927Smrg 409dc407927Smrg 410dc407927Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 411dc407927Smrg# --------------------------------------------------- 412dc407927Smrgm4_define([lt_decl_varnames_tagged], 413dc407927Smrg[m4_assert([$# <= 2])dnl 414dc407927Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 415dc407927Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 416dc407927Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 417dc407927Smrgm4_define([_lt_decl_varnames_tagged], 418dc407927Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 419dc407927Smrg 420dc407927Smrg 421dc407927Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 422dc407927Smrg# ------------------------------------------------ 423dc407927Smrgm4_define([lt_decl_all_varnames], 424dc407927Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 425dc407927Smrg m4_if([$2], [], 426dc407927Smrg m4_quote(lt_decl_varnames), 427dc407927Smrg m4_quote(m4_shift($@))))[]dnl 428dc407927Smrg]) 429dc407927Smrgm4_define([_lt_decl_all_varnames], 430dc407927Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 431dc407927Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 432dc407927Smrg]) 433dc407927Smrg 434dc407927Smrg 435dc407927Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 436dc407927Smrg# ------------------------------------ 437dc407927Smrg# Quote a variable value, and forward it to `config.status' so that its 438dc407927Smrg# declaration there will have the same value as in `configure'. VARNAME 439dc407927Smrg# must have a single quote delimited value for this to work. 440dc407927Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 441dd0822caSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 442dc407927Smrg 443dc407927Smrg 444dc407927Smrg# _LT_CONFIG_STATUS_DECLARATIONS 445dc407927Smrg# ------------------------------ 446dc407927Smrg# We delimit libtool config variables with single quotes, so when 447dc407927Smrg# we write them to config.status, we have to be sure to quote all 448dc407927Smrg# embedded single quotes properly. In configure, this macro expands 449dc407927Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 450dc407927Smrg# 451dd0822caSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 452dc407927Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 453dc407927Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 454dc407927Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 455dc407927Smrg 456dc407927Smrg 457dc407927Smrg# _LT_LIBTOOL_TAGS 458dc407927Smrg# ---------------- 459dc407927Smrg# Output comment and list of tags supported by the script 460dc407927Smrgm4_defun([_LT_LIBTOOL_TAGS], 461dc407927Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 462dc407927Smrgavailable_tags="_LT_TAGS"dnl 463dc407927Smrg]) 464dc407927Smrg 465dc407927Smrg 466dc407927Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 467dc407927Smrg# ----------------------------------- 468dc407927Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 469dc407927Smrg# expand to a commented shell variable setting: 470dc407927Smrg# 471dc407927Smrg# # Some comment about what VAR is for. 472dc407927Smrg# visible_name=$lt_internal_name 473dc407927Smrgm4_define([_LT_LIBTOOL_DECLARE], 474dc407927Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 475dc407927Smrg [description])))[]dnl 476dc407927Smrgm4_pushdef([_libtool_name], 477dc407927Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 478dc407927Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 479dc407927Smrg [0], [_libtool_name=[$]$1], 480dc407927Smrg [1], [_libtool_name=$lt_[]$1], 481dc407927Smrg [2], [_libtool_name=$lt_[]$1], 482dc407927Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 483dc407927Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 484dc407927Smrg]) 485dc407927Smrg 486dc407927Smrg 487dc407927Smrg# _LT_LIBTOOL_CONFIG_VARS 488dc407927Smrg# ----------------------- 489dc407927Smrg# Produce commented declarations of non-tagged libtool config variables 490dc407927Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 491dc407927Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 492dc407927Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 493dc407927Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 494dc407927Smrg[m4_foreach([_lt_var], 495dc407927Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 496dc407927Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 497dc407927Smrg 498dc407927Smrg 499dc407927Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 500dc407927Smrg# ------------------------- 501dc407927Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 502dc407927Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 503dc407927Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5043eed67faSmbalmer 5053eed67faSmbalmer 506dc407927Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 507dc407927Smrg# ------------------------------ 508dc407927Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 509dc407927Smrg 510dc407927Smrg 511dc407927Smrg# _LT_CONFIG_COMMANDS 5123eed67faSmbalmer# ------------------- 513dc407927Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 514dc407927Smrg# variables for single and double quote escaping we saved from calls 515dc407927Smrg# to _LT_DECL, we can put quote escaped variables declarations 516dc407927Smrg# into `config.status', and then the shell code to quote escape them in 517dc407927Smrg# for loops in `config.status'. Finally, any additional code accumulated 518dc407927Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 519dc407927Smrgm4_defun([_LT_CONFIG_COMMANDS], 520dc407927Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 521dc407927Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 522dc407927Smrg dnl instead of duplicating it all over again into config.status, 523dc407927Smrg dnl then we will have config.status run $CONFIG_LT later, so it 524dc407927Smrg dnl needs to know what name is stored there: 525dc407927Smrg [AC_CONFIG_COMMANDS([libtool], 526dc407927Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 527dc407927Smrg dnl If the libtool generation code is destined for config.status, 528dc407927Smrg dnl expand the accumulated commands and init code now: 529dc407927Smrg [AC_CONFIG_COMMANDS([libtool], 530dc407927Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 531dc407927Smrg])#_LT_CONFIG_COMMANDS 532dc407927Smrg 533dc407927Smrg 534dc407927Smrg# Initialize. 535dc407927Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 536dc407927Smrg[ 537dc407927Smrg 538dc407927Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 539dc407927Smrg# if CDPATH is set. 540dc407927Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 541dc407927Smrg 542dc407927Smrgsed_quote_subst='$sed_quote_subst' 543dc407927Smrgdouble_quote_subst='$double_quote_subst' 544dc407927Smrgdelay_variable_subst='$delay_variable_subst' 545dc407927Smrg_LT_CONFIG_STATUS_DECLARATIONS 546dc407927SmrgLTCC='$LTCC' 547dc407927SmrgLTCFLAGS='$LTCFLAGS' 548dc407927Smrgcompiler='$compiler_DEFAULT' 549dc407927Smrg 550dd0822caSmrg# A function that is used when there is no print builtin or printf. 551dd0822caSmrgfunc_fallback_echo () 552dd0822caSmrg{ 553dd0822caSmrg eval 'cat <<_LTECHO_EOF 554dd0822caSmrg\$[]1 555dd0822caSmrg_LTECHO_EOF' 556dd0822caSmrg} 557dd0822caSmrg 558dc407927Smrg# Quote evaled strings. 559dc407927Smrgfor var in lt_decl_all_varnames([[ \ 560dc407927Smrg]], lt_decl_quote_varnames); do 561dd0822caSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 562dc407927Smrg *[[\\\\\\\`\\"\\\$]]*) 563dd0822caSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 564dc407927Smrg ;; 565dc407927Smrg *) 566dc407927Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 567dc407927Smrg ;; 568dc407927Smrg esac 569dc407927Smrgdone 570dc407927Smrg 571dc407927Smrg# Double-quote double-evaled strings. 572dc407927Smrgfor var in lt_decl_all_varnames([[ \ 573dc407927Smrg]], lt_decl_dquote_varnames); do 574dd0822caSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575dc407927Smrg *[[\\\\\\\`\\"\\\$]]*) 576dd0822caSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 577dc407927Smrg ;; 578dc407927Smrg *) 579dc407927Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580dc407927Smrg ;; 581dc407927Smrg esac 582dc407927Smrgdone 583dc407927Smrg 584dc407927Smrg_LT_OUTPUT_LIBTOOL_INIT 585dc407927Smrg]) 586dc407927Smrg 587dd0822caSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 588dd0822caSmrg# ------------------------------------ 589dd0822caSmrg# Generate a child script FILE with all initialization necessary to 590dd0822caSmrg# reuse the environment learned by the parent script, and make the 591dd0822caSmrg# file executable. If COMMENT is supplied, it is inserted after the 592dd0822caSmrg# `#!' sequence but before initialization text begins. After this 593dd0822caSmrg# macro, additional text can be appended to FILE to form the body of 594dd0822caSmrg# the child script. The macro ends with non-zero status if the 595dd0822caSmrg# file could not be fully written (such as if the disk is full). 596dd0822caSmrgm4_ifdef([AS_INIT_GENERATED], 597dd0822caSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 598dd0822caSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 599dd0822caSmrg[m4_require([AS_PREPARE])]dnl 600dd0822caSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 601dd0822caSmrg[lt_write_fail=0 602dd0822caSmrgcat >$1 <<_ASEOF || lt_write_fail=1 603dd0822caSmrg#! $SHELL 604dd0822caSmrg# Generated by $as_me. 605dd0822caSmrg$2 606dd0822caSmrgSHELL=\${CONFIG_SHELL-$SHELL} 607dd0822caSmrgexport SHELL 608dd0822caSmrg_ASEOF 609dd0822caSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 610dd0822caSmrgAS_SHELL_SANITIZE 611dd0822caSmrg_AS_PREPARE 612dd0822caSmrgexec AS_MESSAGE_FD>&1 613dd0822caSmrg_ASEOF 614dd0822caSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 615dd0822caSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 616dc407927Smrg 617dc407927Smrg# LT_OUTPUT 618dc407927Smrg# --------- 619dc407927Smrg# This macro allows early generation of the libtool script (before 620dc407927Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 621dc407927Smrg# tests. 622dc407927SmrgAC_DEFUN([LT_OUTPUT], 623dc407927Smrg[: ${CONFIG_LT=./config.lt} 624dc407927SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 625dd0822caSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 626dd0822caSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 627dc407927Smrg 628dc407927Smrgcat >>"$CONFIG_LT" <<\_LTEOF 629dd0822caSmrglt_cl_silent=false 630dc407927Smrgexec AS_MESSAGE_LOG_FD>>config.log 631dc407927Smrg{ 632dc407927Smrg echo 633dc407927Smrg AS_BOX([Running $as_me.]) 634dc407927Smrg} >&AS_MESSAGE_LOG_FD 635dc407927Smrg 636dc407927Smrglt_cl_help="\ 637dc407927Smrg\`$as_me' creates a local libtool stub from the current configuration, 638dc407927Smrgfor use in further configure time tests before the real libtool is 639dc407927Smrggenerated. 640dc407927Smrg 641dc407927SmrgUsage: $[0] [[OPTIONS]] 642dc407927Smrg 643dc407927Smrg -h, --help print this help, then exit 644dc407927Smrg -V, --version print version number, then exit 645dc407927Smrg -q, --quiet do not print progress messages 646dc407927Smrg -d, --debug don't remove temporary files 647dc407927Smrg 648dc407927SmrgReport bugs to <bug-libtool@gnu.org>." 649dc407927Smrg 650dc407927Smrglt_cl_version="\ 651dc407927Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 652dc407927Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 653dc407927Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 654dc407927Smrg 655dd0822caSmrgCopyright (C) 2010 Free Software Foundation, Inc. 656dc407927SmrgThis config.lt script is free software; the Free Software Foundation 657dc407927Smrggives unlimited permision to copy, distribute and modify it." 658dc407927Smrg 659dc407927Smrgwhile test $[#] != 0 660dc407927Smrgdo 661dc407927Smrg case $[1] in 662dc407927Smrg --version | --v* | -V ) 663dc407927Smrg echo "$lt_cl_version"; exit 0 ;; 664dc407927Smrg --help | --h* | -h ) 665dc407927Smrg echo "$lt_cl_help"; exit 0 ;; 666dc407927Smrg --debug | --d* | -d ) 667dc407927Smrg debug=: ;; 668dc407927Smrg --quiet | --q* | --silent | --s* | -q ) 669dc407927Smrg lt_cl_silent=: ;; 670dc407927Smrg 671dc407927Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 672dc407927SmrgTry \`$[0] --help' for more information.]) ;; 673dc407927Smrg 674dc407927Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 675dc407927SmrgTry \`$[0] --help' for more information.]) ;; 676dc407927Smrg esac 677dc407927Smrg shift 678dc407927Smrgdone 679dc407927Smrg 680dc407927Smrgif $lt_cl_silent; then 681dc407927Smrg exec AS_MESSAGE_FD>/dev/null 682dc407927Smrgfi 683dc407927Smrg_LTEOF 684dc407927Smrg 685dc407927Smrgcat >>"$CONFIG_LT" <<_LTEOF 686dc407927Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 687dc407927Smrg_LTEOF 688dc407927Smrg 689dc407927Smrgcat >>"$CONFIG_LT" <<\_LTEOF 690dc407927SmrgAC_MSG_NOTICE([creating $ofile]) 691dc407927Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 692dc407927SmrgAS_EXIT(0) 693dc407927Smrg_LTEOF 694dc407927Smrgchmod +x "$CONFIG_LT" 695dc407927Smrg 696dc407927Smrg# configure is writing to config.log, but config.lt does its own redirection, 697dc407927Smrg# appending to config.log, which fails on DOS, as config.log is still kept 698dc407927Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 699dc407927Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 700dd0822caSmrglt_cl_success=: 701dd0822caSmrgtest "$silent" = yes && 702dd0822caSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 703dd0822caSmrgexec AS_MESSAGE_LOG_FD>/dev/null 704dd0822caSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 705dd0822caSmrgexec AS_MESSAGE_LOG_FD>>config.log 706dd0822caSmrg$lt_cl_success || AS_EXIT(1) 707dc407927Smrg])# LT_OUTPUT 708dc407927Smrg 709dc407927Smrg 710dc407927Smrg# _LT_CONFIG(TAG) 711dc407927Smrg# --------------- 712dc407927Smrg# If TAG is the built-in tag, create an initial libtool script with a 713dc407927Smrg# default configuration from the untagged config vars. Otherwise add code 714dc407927Smrg# to config.status for appending the configuration named by TAG from the 715dc407927Smrg# matching tagged config vars. 716dc407927Smrgm4_defun([_LT_CONFIG], 717dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 718dc407927Smrg_LT_CONFIG_SAVE_COMMANDS([ 719dc407927Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 720dc407927Smrg m4_if(_LT_TAG, [C], [ 721dc407927Smrg # See if we are running on zsh, and set the options which allow our 722dc407927Smrg # commands through without removal of \ escapes. 723dc407927Smrg if test -n "${ZSH_VERSION+set}" ; then 724dc407927Smrg setopt NO_GLOB_SUBST 725dc407927Smrg fi 726dc407927Smrg 727dc407927Smrg cfgfile="${ofile}T" 728dc407927Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 729dc407927Smrg $RM "$cfgfile" 730dc407927Smrg 731dc407927Smrg cat <<_LT_EOF >> "$cfgfile" 732dc407927Smrg#! $SHELL 733dc407927Smrg 734dc407927Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 735dc407927Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 736dc407927Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 737dc407927Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 738dc407927Smrg# 739dc407927Smrg_LT_COPYING 740dc407927Smrg_LT_LIBTOOL_TAGS 741dc407927Smrg 742dc407927Smrg# ### BEGIN LIBTOOL CONFIG 743dc407927Smrg_LT_LIBTOOL_CONFIG_VARS 744dc407927Smrg_LT_LIBTOOL_TAG_VARS 745dc407927Smrg# ### END LIBTOOL CONFIG 746dc407927Smrg 747dc407927Smrg_LT_EOF 748dc407927Smrg 749dc407927Smrg case $host_os in 750dc407927Smrg aix3*) 751dc407927Smrg cat <<\_LT_EOF >> "$cfgfile" 752dc407927Smrg# AIX sometimes has problems with the GCC collect2 program. For some 753dc407927Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 754dc407927Smrg# vanish in a puff of smoke. 755dc407927Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 756dc407927Smrg COLLECT_NAMES= 757dc407927Smrg export COLLECT_NAMES 758dc407927Smrgfi 759dc407927Smrg_LT_EOF 760dc407927Smrg ;; 761dc407927Smrg esac 762dc407927Smrg 763dc407927Smrg _LT_PROG_LTMAIN 764dc407927Smrg 765dc407927Smrg # We use sed instead of cat because bash on DJGPP gets confused if 766dc407927Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 767dc407927Smrg # text mode, it properly converts lines to CR/LF. This bash problem 768dc407927Smrg # is reportedly fixed, but why not run on old versions too? 769dd0822caSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 770dd0822caSmrg || (rm -f "$cfgfile"; exit 1) 771dc407927Smrg 772dd0822caSmrg _LT_PROG_REPLACE_SHELLFNS 773dc407927Smrg 774dd0822caSmrg mv -f "$cfgfile" "$ofile" || 775dc407927Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 776dc407927Smrg chmod +x "$ofile" 777dc407927Smrg], 778dc407927Smrg[cat <<_LT_EOF >> "$ofile" 779dc407927Smrg 780dc407927Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 781dc407927Smrgdnl in a comment (ie after a #). 782dc407927Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 783dc407927Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 784dc407927Smrg# ### END LIBTOOL TAG CONFIG: $1 785dc407927Smrg_LT_EOF 786dc407927Smrg])dnl /m4_if 787dc407927Smrg], 788dc407927Smrg[m4_if([$1], [], [ 789dc407927Smrg PACKAGE='$PACKAGE' 790dc407927Smrg VERSION='$VERSION' 791dc407927Smrg TIMESTAMP='$TIMESTAMP' 792dc407927Smrg RM='$RM' 793dc407927Smrg ofile='$ofile'], []) 794dc407927Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 795dc407927Smrg])# _LT_CONFIG 796dc407927Smrg 797dc407927Smrg 798dc407927Smrg# LT_SUPPORTED_TAG(TAG) 799dc407927Smrg# --------------------- 800dc407927Smrg# Trace this macro to discover what tags are supported by the libtool 801dc407927Smrg# --tag option, using: 802dc407927Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 803dc407927SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 804dc407927Smrg 805dc407927Smrg 806dc407927Smrg# C support is built-in for now 807dc407927Smrgm4_define([_LT_LANG_C_enabled], []) 808dc407927Smrgm4_define([_LT_TAGS], []) 809dc407927Smrg 810dc407927Smrg 811dc407927Smrg# LT_LANG(LANG) 812dc407927Smrg# ------------- 813dc407927Smrg# Enable libtool support for the given language if not already enabled. 814dc407927SmrgAC_DEFUN([LT_LANG], 815dc407927Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 816dc407927Smrgm4_case([$1], 817dc407927Smrg [C], [_LT_LANG(C)], 818dc407927Smrg [C++], [_LT_LANG(CXX)], 819dc407927Smrg [Java], [_LT_LANG(GCJ)], 820dc407927Smrg [Fortran 77], [_LT_LANG(F77)], 821dc407927Smrg [Fortran], [_LT_LANG(FC)], 822dc407927Smrg [Windows Resource], [_LT_LANG(RC)], 823dc407927Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 824dc407927Smrg [_LT_LANG($1)], 825dc407927Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 826dc407927Smrg])# LT_LANG 827dc407927Smrg 828dc407927Smrg 829dc407927Smrg# _LT_LANG(LANGNAME) 830dc407927Smrg# ------------------ 831dc407927Smrgm4_defun([_LT_LANG], 832dc407927Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 833dc407927Smrg [LT_SUPPORTED_TAG([$1])dnl 834dc407927Smrg m4_append([_LT_TAGS], [$1 ])dnl 835dc407927Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 836dc407927Smrg _LT_LANG_$1_CONFIG($1)])dnl 837dc407927Smrg])# _LT_LANG 838dc407927Smrg 839dc407927Smrg 840dc407927Smrg# _LT_LANG_DEFAULT_CONFIG 841dc407927Smrg# ----------------------- 842dc407927Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 843dc407927Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 844dc407927Smrg [LT_LANG(CXX)], 845dc407927Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 846dc407927Smrg 847dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 848dc407927Smrg [LT_LANG(F77)], 849dc407927Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 850dc407927Smrg 851dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 852dc407927Smrg [LT_LANG(FC)], 853dc407927Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 854dc407927Smrg 855dc407927Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 856dc407927Smrgdnl pulling things in needlessly. 857dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 858dc407927Smrg [LT_LANG(GCJ)], 859dc407927Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 860dc407927Smrg [LT_LANG(GCJ)], 861dc407927Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 862dc407927Smrg [LT_LANG(GCJ)], 863dc407927Smrg [m4_ifdef([AC_PROG_GCJ], 864dc407927Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 865dc407927Smrg m4_ifdef([A][M_PROG_GCJ], 866dc407927Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 867dc407927Smrg m4_ifdef([LT_PROG_GCJ], 868dc407927Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 869dc407927Smrg 870dc407927SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 871dc407927Smrg [LT_LANG(RC)], 872dc407927Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 873dc407927Smrg])# _LT_LANG_DEFAULT_CONFIG 874dc407927Smrg 875dc407927Smrg# Obsolete macros: 876dc407927SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 877dc407927SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 878dc407927SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 879dc407927SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 880dd0822caSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 881dc407927Smrgdnl aclocal-1.4 backwards compatibility: 882dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 883dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 884dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 885dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 886dd0822caSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 887dc407927Smrg 888dc407927Smrg 889dc407927Smrg# _LT_TAG_COMPILER 890dc407927Smrg# ---------------- 891dc407927Smrgm4_defun([_LT_TAG_COMPILER], 8923eed67faSmbalmer[AC_REQUIRE([AC_PROG_CC])dnl 8933eed67faSmbalmer 894dc407927Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 895dc407927Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 896dc407927Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 897dc407927Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 898dc407927Smrg 8993eed67faSmbalmer# If no C compiler was specified, use CC. 9003eed67faSmbalmerLTCC=${LTCC-"$CC"} 9013eed67faSmbalmer 9023eed67faSmbalmer# If no C compiler flags were specified, use CFLAGS. 9033eed67faSmbalmerLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9043eed67faSmbalmer 9053eed67faSmbalmer# Allow CC to be a program name with arguments. 9063eed67faSmbalmercompiler=$CC 907dc407927Smrg])# _LT_TAG_COMPILER 9083eed67faSmbalmer 9093eed67faSmbalmer 9103eed67faSmbalmer# _LT_COMPILER_BOILERPLATE 9113eed67faSmbalmer# ------------------------ 9123eed67faSmbalmer# Check for compiler boilerplate output or warnings with 9133eed67faSmbalmer# the simple compiler test code. 914dc407927Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 915dc407927Smrg[m4_require([_LT_DECL_SED])dnl 9163eed67faSmbalmerac_outfile=conftest.$ac_objext 9173eed67faSmbalmerecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9183eed67faSmbalmereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9193eed67faSmbalmer_lt_compiler_boilerplate=`cat conftest.err` 920dc407927Smrg$RM conftest* 9213eed67faSmbalmer])# _LT_COMPILER_BOILERPLATE 9223eed67faSmbalmer 9233eed67faSmbalmer 9243eed67faSmbalmer# _LT_LINKER_BOILERPLATE 9253eed67faSmbalmer# ---------------------- 9263eed67faSmbalmer# Check for linker boilerplate output or warnings with 9273eed67faSmbalmer# the simple link test code. 928dc407927Smrgm4_defun([_LT_LINKER_BOILERPLATE], 929dc407927Smrg[m4_require([_LT_DECL_SED])dnl 9303eed67faSmbalmerac_outfile=conftest.$ac_objext 9313eed67faSmbalmerecho "$lt_simple_link_test_code" >conftest.$ac_ext 9323eed67faSmbalmereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9333eed67faSmbalmer_lt_linker_boilerplate=`cat conftest.err` 934dc407927Smrg$RM -r conftest* 9353eed67faSmbalmer])# _LT_LINKER_BOILERPLATE 9363eed67faSmbalmer 9373eed67faSmbalmer# _LT_REQUIRED_DARWIN_CHECKS 938dc407927Smrg# ------------------------- 939dc407927Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9403eed67faSmbalmer case $host_os in 9413eed67faSmbalmer rhapsody* | darwin*) 9423eed67faSmbalmer AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9433eed67faSmbalmer AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 944dc407927Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 945dc407927Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 946dc407927Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 947dc407927Smrg _LT_DECL([], [DSYMUTIL], [1], 948dc407927Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 949dc407927Smrg _LT_DECL([], [NMEDIT], [1], 950dc407927Smrg [Tool to change global to local symbols on Mac OS X]) 951dc407927Smrg _LT_DECL([], [LIPO], [1], 952dc407927Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 953dc407927Smrg _LT_DECL([], [OTOOL], [1], 954dc407927Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 955dc407927Smrg _LT_DECL([], [OTOOL64], [1], 956dc407927Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9573eed67faSmbalmer 9583eed67faSmbalmer AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9593eed67faSmbalmer [lt_cv_apple_cc_single_mod=no 9603eed67faSmbalmer if test -z "${LT_MULTI_MODULE}"; then 961dc407927Smrg # By default we will add the -single_module flag. You can override 962dc407927Smrg # by either setting the environment variable LT_MULTI_MODULE 963dc407927Smrg # non-empty at configure time, or by adding -multi_module to the 964dc407927Smrg # link flags. 965dc407927Smrg rm -rf libconftest.dylib* 966dc407927Smrg echo "int foo(void){return 1;}" > conftest.c 967dc407927Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 968dc407927Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 969dc407927Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 970dc407927Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 971dc407927Smrg _lt_result=$? 972dc407927Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 973dc407927Smrg lt_cv_apple_cc_single_mod=yes 974dc407927Smrg else 975dc407927Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 976dc407927Smrg fi 977dc407927Smrg rm -rf libconftest.dylib* 978dc407927Smrg rm -f conftest.* 9793eed67faSmbalmer fi]) 9803eed67faSmbalmer AC_CACHE_CHECK([for -exported_symbols_list linker flag], 9813eed67faSmbalmer [lt_cv_ld_exported_symbols_list], 9823eed67faSmbalmer [lt_cv_ld_exported_symbols_list=no 9833eed67faSmbalmer save_LDFLAGS=$LDFLAGS 9843eed67faSmbalmer echo "_main" > conftest.sym 9853eed67faSmbalmer LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 9863eed67faSmbalmer AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 987dc407927Smrg [lt_cv_ld_exported_symbols_list=yes], 988dc407927Smrg [lt_cv_ld_exported_symbols_list=no]) 989dc407927Smrg LDFLAGS="$save_LDFLAGS" 9903eed67faSmbalmer ]) 991dd0822caSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 992dd0822caSmrg [lt_cv_ld_force_load=no 993dd0822caSmrg cat > conftest.c << _LT_EOF 994dd0822caSmrgint forced_loaded() { return 2;} 995dd0822caSmrg_LT_EOF 996dd0822caSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 997dd0822caSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 998dd0822caSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 999dd0822caSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1000dd0822caSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1001dd0822caSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1002dd0822caSmrg cat > conftest.c << _LT_EOF 1003dd0822caSmrgint main() { return 0;} 1004dd0822caSmrg_LT_EOF 1005dd0822caSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1006dd0822caSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1007dd0822caSmrg _lt_result=$? 1008dd0822caSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 1009dd0822caSmrg lt_cv_ld_force_load=yes 1010dd0822caSmrg else 1011dd0822caSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1012dd0822caSmrg fi 1013dd0822caSmrg rm -f conftest.err libconftest.a conftest conftest.c 1014dd0822caSmrg rm -rf conftest.dSYM 1015dd0822caSmrg ]) 10163eed67faSmbalmer case $host_os in 1017dc407927Smrg rhapsody* | darwin1.[[012]]) 10183eed67faSmbalmer _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10193eed67faSmbalmer darwin1.*) 1020dc407927Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1021dc407927Smrg darwin*) # darwin 5.x on 10223eed67faSmbalmer # if running on 10.5 or later, the deployment target defaults 10233eed67faSmbalmer # to the OS version, if on x86, and 10.4, the deployment 10243eed67faSmbalmer # target defaults to 10.4. Don't you love it? 10253eed67faSmbalmer case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1026dc407927Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1027dc407927Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1028dc407927Smrg 10.[[012]]*) 1029dc407927Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1030dc407927Smrg 10.*) 1031dc407927Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10323eed67faSmbalmer esac 10333eed67faSmbalmer ;; 10343eed67faSmbalmer esac 10353eed67faSmbalmer if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10363eed67faSmbalmer _lt_dar_single_mod='$single_module' 10373eed67faSmbalmer fi 10383eed67faSmbalmer if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10393eed67faSmbalmer _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10403eed67faSmbalmer else 1041dc407927Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10423eed67faSmbalmer fi 1043dd0822caSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1044dc407927Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10453eed67faSmbalmer else 10463eed67faSmbalmer _lt_dsymutil= 10473eed67faSmbalmer fi 10483eed67faSmbalmer ;; 10493eed67faSmbalmer esac 10503eed67faSmbalmer]) 10513eed67faSmbalmer 1052dc407927Smrg 1053dc407927Smrg# _LT_DARWIN_LINKER_FEATURES 1054dc407927Smrg# -------------------------- 1055dc407927Smrg# Checks for linker and compiler features on darwin 1056dc407927Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1057dc407927Smrg[ 1058dc407927Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1059dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1060dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1061dc407927Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1062dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1063dd0822caSmrg if test "$lt_cv_ld_force_load" = "yes"; then 1064dd0822caSmrg _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\"`' 1065dd0822caSmrg else 1066dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1067dd0822caSmrg fi 1068dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1069dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1070dc407927Smrg case $cc_basename in 1071dc407927Smrg ifort*) _lt_dar_can_shared=yes ;; 1072dc407927Smrg *) _lt_dar_can_shared=$GCC ;; 1073dc407927Smrg esac 1074dc407927Smrg if test "$_lt_dar_can_shared" = "yes"; then 1075dd0822caSmrg output_verbose_link_cmd=func_echo_all 1076dc407927Smrg _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}" 1077dc407927Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1078dc407927Smrg _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}" 1079dc407927Smrg _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}" 1080dc407927Smrg m4_if([$1], [CXX], 1081dc407927Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1082dc407927Smrg _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}" 1083dc407927Smrg _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}" 1084dc407927Smrg fi 1085dc407927Smrg],[]) 1086dc407927Smrg else 1087dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1088dc407927Smrg fi 1089dc407927Smrg]) 1090dc407927Smrg 1091dd0822caSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1092dd0822caSmrg# ---------------------------------- 10933eed67faSmbalmer# Links a minimal program and checks the executable 10943eed67faSmbalmer# for the system default hardcoded library path. In most cases, 10953eed67faSmbalmer# this is /usr/lib:/lib, but when the MPI compilers are used 10963eed67faSmbalmer# the location of the communication and MPI libs are included too. 10973eed67faSmbalmer# If we don't find anything, use the default library path according 10983eed67faSmbalmer# to the aix ld manual. 1099dd0822caSmrg# Store the results from the different compilers for each TAGNAME. 1100dd0822caSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1101dc407927Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1102dc407927Smrg[m4_require([_LT_DECL_SED])dnl 1103dd0822caSmrgif test "${lt_cv_aix_libpath+set}" = set; then 1104dd0822caSmrg aix_libpath=$lt_cv_aix_libpath 1105dd0822caSmrgelse 1106dd0822caSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1107dd0822caSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1108dd0822caSmrg lt_aix_libpath_sed='[ 1109dd0822caSmrg /Import File Strings/,/^$/ { 1110dd0822caSmrg /^0/ { 1111dd0822caSmrg s/^0 *\([^ ]*\) *$/\1/ 1112dd0822caSmrg p 1113dd0822caSmrg } 1114dd0822caSmrg }]' 1115dd0822caSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1116dd0822caSmrg # Check for a 64-bit object if we didn't find anything. 1117dd0822caSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1118dd0822caSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1119dd0822caSmrg fi],[]) 1120dd0822caSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1121dd0822caSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1122dd0822caSmrg fi 1123dd0822caSmrg ]) 1124dd0822caSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1125dd0822caSmrgfi 1126dc407927Smrg])# _LT_SYS_MODULE_PATH_AIX 11273eed67faSmbalmer 11283eed67faSmbalmer 1129dc407927Smrg# _LT_SHELL_INIT(ARG) 1130dc407927Smrg# ------------------- 1131dc407927Smrgm4_define([_LT_SHELL_INIT], 1132dd0822caSmrg[m4_divert_text([M4SH-INIT], [$1 1133dd0822caSmrg])])# _LT_SHELL_INIT 1134dd0822caSmrg 11353eed67faSmbalmer 11363eed67faSmbalmer 1137dc407927Smrg# _LT_PROG_ECHO_BACKSLASH 1138dc407927Smrg# ----------------------- 1139dd0822caSmrg# Find how we can fake an echo command that does not interpret backslash. 1140dd0822caSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1141dd0822caSmrg# of the generated configure script which will find a shell with a builtin 1142dd0822caSmrg# printf (which we can use as an echo command). 1143dc407927Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1144dd0822caSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1145dd0822caSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1146dd0822caSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1147dd0822caSmrg 1148dd0822caSmrgAC_MSG_CHECKING([how to print strings]) 1149dd0822caSmrg# Test print first, because it will be a builtin if present. 1150dd0822caSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1151dd0822caSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1152dd0822caSmrg ECHO='print -r --' 1153dd0822caSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1154dd0822caSmrg ECHO='printf %s\n' 11553eed67faSmbalmerelse 1156dd0822caSmrg # Use this function as a fallback that always works. 1157dd0822caSmrg func_fallback_echo () 1158dd0822caSmrg { 1159dd0822caSmrg eval 'cat <<_LTECHO_EOF 1160dd0822caSmrg$[]1 1161dd0822caSmrg_LTECHO_EOF' 1162dd0822caSmrg } 1163dd0822caSmrg ECHO='func_fallback_echo' 11643eed67faSmbalmerfi 11653eed67faSmbalmer 1166dd0822caSmrg# func_echo_all arg... 1167dd0822caSmrg# Invoke $ECHO with all args, space-separated. 1168dd0822caSmrgfunc_echo_all () 1169dd0822caSmrg{ 1170dd0822caSmrg $ECHO "$*" 1171dd0822caSmrg} 11723eed67faSmbalmer 1173dd0822caSmrgcase "$ECHO" in 1174dd0822caSmrg printf*) AC_MSG_RESULT([printf]) ;; 1175dd0822caSmrg print*) AC_MSG_RESULT([print -r]) ;; 1176dd0822caSmrg *) AC_MSG_RESULT([cat]) ;; 1177dd0822caSmrgesac 11783eed67faSmbalmer 1179dd0822caSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1180dd0822caSmrg[_AS_DETECT_SUGGESTED([ 1181dd0822caSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1182dd0822caSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1183dd0822caSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1184dd0822caSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1185dd0822caSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1186dd0822caSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1187dd0822caSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 11883eed67faSmbalmer 1189dc407927Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1190dd0822caSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1191dc407927Smrg])# _LT_PROG_ECHO_BACKSLASH 11923eed67faSmbalmer 11933eed67faSmbalmer 1194dd0822caSmrg# _LT_WITH_SYSROOT 1195dd0822caSmrg# ---------------- 1196dd0822caSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1197dd0822caSmrg[AC_MSG_CHECKING([for sysroot]) 1198dd0822caSmrgAC_ARG_WITH([sysroot], 1199dd0822caSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1200dd0822caSmrg (or the compiler's sysroot if not specified).], 1201dd0822caSmrg[], [with_sysroot=no]) 1202dd0822caSmrg 1203dd0822caSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1204dd0822caSmrgdnl in case the user passed a directory name. 1205dd0822caSmrglt_sysroot= 1206dd0822caSmrgcase ${with_sysroot} in #( 1207dd0822caSmrg yes) 1208dd0822caSmrg if test "$GCC" = yes; then 1209dd0822caSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1210dd0822caSmrg fi 1211dd0822caSmrg ;; #( 1212dd0822caSmrg /*) 1213dd0822caSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1214dd0822caSmrg ;; #( 1215dd0822caSmrg no|'') 1216dd0822caSmrg ;; #( 1217dd0822caSmrg *) 1218dd0822caSmrg AC_MSG_RESULT([${with_sysroot}]) 1219dd0822caSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1220dd0822caSmrg ;; 1221dd0822caSmrgesac 1222dd0822caSmrg 1223dd0822caSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1224dd0822caSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1225dd0822caSmrg[dependent libraries, and in which our libraries should be installed.])]) 1226dd0822caSmrg 1227dc407927Smrg# _LT_ENABLE_LOCK 1228dc407927Smrg# --------------- 1229dc407927Smrgm4_defun([_LT_ENABLE_LOCK], 12303eed67faSmbalmer[AC_ARG_ENABLE([libtool-lock], 1231dc407927Smrg [AS_HELP_STRING([--disable-libtool-lock], 1232dc407927Smrg [avoid locking (might break parallel builds)])]) 12333eed67faSmbalmertest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12343eed67faSmbalmer 12353eed67faSmbalmer# Some flags need to be propagated to the compiler or linker for good 12363eed67faSmbalmer# libtool support. 12373eed67faSmbalmercase $host in 12383eed67faSmbalmeria64-*-hpux*) 12393eed67faSmbalmer # Find out which ABI we are using. 12403eed67faSmbalmer echo 'int i;' > conftest.$ac_ext 12413eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 12423eed67faSmbalmer case `/usr/bin/file conftest.$ac_objext` in 1243dc407927Smrg *ELF-32*) 1244dc407927Smrg HPUX_IA64_MODE="32" 1245dc407927Smrg ;; 1246dc407927Smrg *ELF-64*) 1247dc407927Smrg HPUX_IA64_MODE="64" 1248dc407927Smrg ;; 12493eed67faSmbalmer esac 12503eed67faSmbalmer fi 12513eed67faSmbalmer rm -rf conftest* 12523eed67faSmbalmer ;; 12533eed67faSmbalmer*-*-irix6*) 12543eed67faSmbalmer # Find out which ABI we are using. 1255dd0822caSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12563eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 1257dc407927Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1258dc407927Smrg case `/usr/bin/file conftest.$ac_objext` in 1259dc407927Smrg *32-bit*) 1260dc407927Smrg LD="${LD-ld} -melf32bsmip" 1261dc407927Smrg ;; 1262dc407927Smrg *N32*) 1263dc407927Smrg LD="${LD-ld} -melf32bmipn32" 1264dc407927Smrg ;; 1265dc407927Smrg *64-bit*) 1266dc407927Smrg LD="${LD-ld} -melf64bmip" 1267dc407927Smrg ;; 1268dc407927Smrg esac 1269dc407927Smrg else 1270dc407927Smrg case `/usr/bin/file conftest.$ac_objext` in 1271dc407927Smrg *32-bit*) 1272dc407927Smrg LD="${LD-ld} -32" 1273dc407927Smrg ;; 1274dc407927Smrg *N32*) 1275dc407927Smrg LD="${LD-ld} -n32" 1276dc407927Smrg ;; 1277dc407927Smrg *64-bit*) 1278dc407927Smrg LD="${LD-ld} -64" 1279dc407927Smrg ;; 1280dc407927Smrg esac 1281dc407927Smrg fi 12823eed67faSmbalmer fi 12833eed67faSmbalmer rm -rf conftest* 12843eed67faSmbalmer ;; 12853eed67faSmbalmer 12863eed67faSmbalmerx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1287dc407927Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 12883eed67faSmbalmer # Find out which ABI we are using. 12893eed67faSmbalmer echo 'int i;' > conftest.$ac_ext 12903eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 12913eed67faSmbalmer case `/usr/bin/file conftest.o` in 1292dc407927Smrg *32-bit*) 1293dc407927Smrg case $host in 1294dc407927Smrg x86_64-*kfreebsd*-gnu) 1295dc407927Smrg LD="${LD-ld} -m elf_i386_fbsd" 1296dc407927Smrg ;; 1297dc407927Smrg x86_64-*linux*) 1298dc407927Smrg LD="${LD-ld} -m elf_i386" 1299dc407927Smrg ;; 1300dc407927Smrg ppc64-*linux*|powerpc64-*linux*) 1301dc407927Smrg LD="${LD-ld} -m elf32ppclinux" 1302dc407927Smrg ;; 1303dc407927Smrg s390x-*linux*) 1304dc407927Smrg LD="${LD-ld} -m elf_s390" 1305dc407927Smrg ;; 1306dc407927Smrg sparc64-*linux*) 1307dc407927Smrg LD="${LD-ld} -m elf32_sparc" 1308dc407927Smrg ;; 1309dc407927Smrg esac 1310dc407927Smrg ;; 1311dc407927Smrg *64-bit*) 1312dc407927Smrg case $host in 1313dc407927Smrg x86_64-*kfreebsd*-gnu) 1314dc407927Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1315dc407927Smrg ;; 1316dc407927Smrg x86_64-*linux*) 1317dc407927Smrg LD="${LD-ld} -m elf_x86_64" 1318dc407927Smrg ;; 1319dc407927Smrg ppc*-*linux*|powerpc*-*linux*) 1320dc407927Smrg LD="${LD-ld} -m elf64ppc" 1321dc407927Smrg ;; 1322dc407927Smrg s390*-*linux*|s390*-*tpf*) 1323dc407927Smrg LD="${LD-ld} -m elf64_s390" 1324dc407927Smrg ;; 1325dc407927Smrg sparc*-*linux*) 1326dc407927Smrg LD="${LD-ld} -m elf64_sparc" 1327dc407927Smrg ;; 1328dc407927Smrg esac 1329dc407927Smrg ;; 13303eed67faSmbalmer esac 13313eed67faSmbalmer fi 13323eed67faSmbalmer rm -rf conftest* 13333eed67faSmbalmer ;; 13343eed67faSmbalmer 13353eed67faSmbalmer*-*-sco3.2v5*) 13363eed67faSmbalmer # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13373eed67faSmbalmer SAVE_CFLAGS="$CFLAGS" 13383eed67faSmbalmer CFLAGS="$CFLAGS -belf" 13393eed67faSmbalmer AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13403eed67faSmbalmer [AC_LANG_PUSH(C) 1341dc407927Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13423eed67faSmbalmer AC_LANG_POP]) 13433eed67faSmbalmer if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13443eed67faSmbalmer # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13453eed67faSmbalmer CFLAGS="$SAVE_CFLAGS" 13463eed67faSmbalmer fi 13473eed67faSmbalmer ;; 13483eed67faSmbalmersparc*-*solaris*) 13493eed67faSmbalmer # Find out which ABI we are using. 13503eed67faSmbalmer echo 'int i;' > conftest.$ac_ext 13513eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 13523eed67faSmbalmer case `/usr/bin/file conftest.o` in 13533eed67faSmbalmer *64-bit*) 13543eed67faSmbalmer case $lt_cv_prog_gnu_ld in 13553eed67faSmbalmer yes*) LD="${LD-ld} -m elf64_sparc" ;; 13563eed67faSmbalmer *) 1357dc407927Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 13583eed67faSmbalmer LD="${LD-ld} -64" 13593eed67faSmbalmer fi 13603eed67faSmbalmer ;; 13613eed67faSmbalmer esac 13623eed67faSmbalmer ;; 13633eed67faSmbalmer esac 13643eed67faSmbalmer fi 13653eed67faSmbalmer rm -rf conftest* 13663eed67faSmbalmer ;; 13673eed67faSmbalmeresac 13683eed67faSmbalmer 13693eed67faSmbalmerneed_locks="$enable_libtool_lock" 1370dc407927Smrg])# _LT_ENABLE_LOCK 1371dc407927Smrg 1372dc407927Smrg 1373dd0822caSmrg# _LT_PROG_AR 1374dd0822caSmrg# ----------- 1375dd0822caSmrgm4_defun([_LT_PROG_AR], 1376dd0822caSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1377dd0822caSmrg: ${AR=ar} 1378dd0822caSmrg: ${AR_FLAGS=cru} 1379dd0822caSmrg_LT_DECL([], [AR], [1], [The archiver]) 1380dd0822caSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1381dd0822caSmrg 1382dd0822caSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1383dd0822caSmrg [lt_cv_ar_at_file=no 1384dd0822caSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1385dd0822caSmrg [echo conftest.$ac_objext > conftest.lst 1386dd0822caSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1387dd0822caSmrg AC_TRY_EVAL([lt_ar_try]) 1388dd0822caSmrg if test "$ac_status" -eq 0; then 1389dd0822caSmrg # Ensure the archiver fails upon bogus file names. 1390dd0822caSmrg rm -f conftest.$ac_objext libconftest.a 1391dd0822caSmrg AC_TRY_EVAL([lt_ar_try]) 1392dd0822caSmrg if test "$ac_status" -ne 0; then 1393dd0822caSmrg lt_cv_ar_at_file=@ 1394dd0822caSmrg fi 1395dd0822caSmrg fi 1396dd0822caSmrg rm -f conftest.* libconftest.a 1397dd0822caSmrg ]) 1398dd0822caSmrg ]) 1399dd0822caSmrg 1400dd0822caSmrgif test "x$lt_cv_ar_at_file" = xno; then 1401dd0822caSmrg archiver_list_spec= 1402dd0822caSmrgelse 1403dd0822caSmrg archiver_list_spec=$lt_cv_ar_at_file 1404dd0822caSmrgfi 1405dd0822caSmrg_LT_DECL([], [archiver_list_spec], [1], 1406dd0822caSmrg [How to feed a file listing to the archiver]) 1407dd0822caSmrg])# _LT_PROG_AR 1408dd0822caSmrg 1409dd0822caSmrg 1410dc407927Smrg# _LT_CMD_OLD_ARCHIVE 1411dc407927Smrg# ------------------- 1412dc407927Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1413dd0822caSmrg[_LT_PROG_AR 1414dc407927Smrg 1415dc407927SmrgAC_CHECK_TOOL(STRIP, strip, :) 1416dc407927Smrgtest -z "$STRIP" && STRIP=: 1417dc407927Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1418dc407927Smrg 1419dc407927SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1420dc407927Smrgtest -z "$RANLIB" && RANLIB=: 1421dc407927Smrg_LT_DECL([], [RANLIB], [1], 1422dc407927Smrg [Commands used to install an old-style archive]) 1423dc407927Smrg 1424dc407927Smrg# Determine commands to create old-style static archives. 1425dc407927Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1426dc407927Smrgold_postinstall_cmds='chmod 644 $oldlib' 1427dc407927Smrgold_postuninstall_cmds= 14283eed67faSmbalmer 1429dc407927Smrgif test -n "$RANLIB"; then 1430dc407927Smrg case $host_os in 1431dc407927Smrg openbsd*) 1432dc407927Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1433dc407927Smrg ;; 1434dc407927Smrg *) 1435dc407927Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1436dc407927Smrg ;; 1437dc407927Smrg esac 1438dc407927Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1439dc407927Smrgfi 1440dd0822caSmrg 1441dd0822caSmrgcase $host_os in 1442dd0822caSmrg darwin*) 1443dd0822caSmrg lock_old_archive_extraction=yes ;; 1444dd0822caSmrg *) 1445dd0822caSmrg lock_old_archive_extraction=no ;; 1446dd0822caSmrgesac 1447dc407927Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1448dc407927Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1449dc407927Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1450dc407927Smrg [Commands used to build an old-style archive]) 1451dd0822caSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1452dd0822caSmrg [Whether to use a lock for old archive extraction]) 1453dc407927Smrg])# _LT_CMD_OLD_ARCHIVE 14543eed67faSmbalmer 14553eed67faSmbalmer 1456dc407927Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14573eed67faSmbalmer# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 14583eed67faSmbalmer# ---------------------------------------------------------------- 14593eed67faSmbalmer# Check whether the given compiler option works 1460dc407927SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1461dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1462dc407927Smrgm4_require([_LT_DECL_SED])dnl 14633eed67faSmbalmerAC_CACHE_CHECK([$1], [$2], 14643eed67faSmbalmer [$2=no 1465dc407927Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 14663eed67faSmbalmer echo "$lt_simple_compile_test_code" > conftest.$ac_ext 14673eed67faSmbalmer lt_compiler_flag="$3" 14683eed67faSmbalmer # Insert the option either (1) after the last *FLAGS variable, or 14693eed67faSmbalmer # (2) before a word containing "conftest.", or (3) at the end. 14703eed67faSmbalmer # Note that $ac_compile itself does not contain backslashes and begins 14713eed67faSmbalmer # with a dollar sign (not a hyphen), so the echo should work correctly. 14723eed67faSmbalmer # The option is referenced via a variable to avoid confusing sed. 14733eed67faSmbalmer lt_compile=`echo "$ac_compile" | $SED \ 14743eed67faSmbalmer -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 14753eed67faSmbalmer -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 14763eed67faSmbalmer -e 's:$: $lt_compiler_flag:'` 1477dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 14783eed67faSmbalmer (eval "$lt_compile" 2>conftest.err) 14793eed67faSmbalmer ac_status=$? 14803eed67faSmbalmer cat conftest.err >&AS_MESSAGE_LOG_FD 1481dd0822caSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 14823eed67faSmbalmer if (exit $ac_status) && test -s "$ac_outfile"; then 14833eed67faSmbalmer # The compiler can only warn and ignore the option if not recognized 14843eed67faSmbalmer # So say no if there are warnings other than the usual output. 1485dd0822caSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 14863eed67faSmbalmer $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 14873eed67faSmbalmer if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 14883eed67faSmbalmer $2=yes 14893eed67faSmbalmer fi 14903eed67faSmbalmer fi 1491dc407927Smrg $RM conftest* 14923eed67faSmbalmer]) 14933eed67faSmbalmer 14943eed67faSmbalmerif test x"[$]$2" = xyes; then 1495dc407927Smrg m4_if([$5], , :, [$5]) 14963eed67faSmbalmerelse 1497dc407927Smrg m4_if([$6], , :, [$6]) 14983eed67faSmbalmerfi 1499dc407927Smrg])# _LT_COMPILER_OPTION 15003eed67faSmbalmer 1501dc407927Smrg# Old name: 1502dc407927SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1503dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1504dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 15053eed67faSmbalmer 1506dc407927Smrg 1507dc407927Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1508dc407927Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1509dc407927Smrg# ---------------------------------------------------- 1510dc407927Smrg# Check whether the given linker option works 1511dc407927SmrgAC_DEFUN([_LT_LINKER_OPTION], 1512dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1513dc407927Smrgm4_require([_LT_DECL_SED])dnl 15143eed67faSmbalmerAC_CACHE_CHECK([$1], [$2], 15153eed67faSmbalmer [$2=no 15163eed67faSmbalmer save_LDFLAGS="$LDFLAGS" 15173eed67faSmbalmer LDFLAGS="$LDFLAGS $3" 15183eed67faSmbalmer echo "$lt_simple_link_test_code" > conftest.$ac_ext 15193eed67faSmbalmer if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15203eed67faSmbalmer # The linker can only warn and ignore the option if not recognized 15213eed67faSmbalmer # So say no if there are warnings 15223eed67faSmbalmer if test -s conftest.err; then 15233eed67faSmbalmer # Append any errors to the config.log. 15243eed67faSmbalmer cat conftest.err 1>&AS_MESSAGE_LOG_FD 1525dd0822caSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15263eed67faSmbalmer $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15273eed67faSmbalmer if diff conftest.exp conftest.er2 >/dev/null; then 15283eed67faSmbalmer $2=yes 15293eed67faSmbalmer fi 15303eed67faSmbalmer else 15313eed67faSmbalmer $2=yes 15323eed67faSmbalmer fi 15333eed67faSmbalmer fi 1534dc407927Smrg $RM -r conftest* 15353eed67faSmbalmer LDFLAGS="$save_LDFLAGS" 15363eed67faSmbalmer]) 15373eed67faSmbalmer 15383eed67faSmbalmerif test x"[$]$2" = xyes; then 1539dc407927Smrg m4_if([$4], , :, [$4]) 15403eed67faSmbalmerelse 1541dc407927Smrg m4_if([$5], , :, [$5]) 15423eed67faSmbalmerfi 1543dc407927Smrg])# _LT_LINKER_OPTION 15443eed67faSmbalmer 1545dc407927Smrg# Old name: 1546dc407927SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1547dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1548dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 15493eed67faSmbalmer 1550dc407927Smrg 1551dc407927Smrg# LT_CMD_MAX_LEN 1552dc407927Smrg#--------------- 1553dc407927SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1554dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1555dc407927Smrg# find the maximum length of command line arguments 15563eed67faSmbalmerAC_MSG_CHECKING([the maximum length of command line arguments]) 15573eed67faSmbalmerAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 15583eed67faSmbalmer i=0 15593eed67faSmbalmer teststring="ABCD" 15603eed67faSmbalmer 15613eed67faSmbalmer case $build_os in 15623eed67faSmbalmer msdosdjgpp*) 15633eed67faSmbalmer # On DJGPP, this test can blow up pretty badly due to problems in libc 15643eed67faSmbalmer # (any single argument exceeding 2000 bytes causes a buffer overrun 15653eed67faSmbalmer # during glob expansion). Even if it were fixed, the result of this 15663eed67faSmbalmer # check would be larger than it should be. 15673eed67faSmbalmer lt_cv_sys_max_cmd_len=12288; # 12K is about right 15683eed67faSmbalmer ;; 15693eed67faSmbalmer 15703eed67faSmbalmer gnu*) 15713eed67faSmbalmer # Under GNU Hurd, this test is not required because there is 15723eed67faSmbalmer # no limit to the length of command line arguments. 15733eed67faSmbalmer # Libtool will interpret -1 as no limit whatsoever 15743eed67faSmbalmer lt_cv_sys_max_cmd_len=-1; 15753eed67faSmbalmer ;; 15763eed67faSmbalmer 1577dc407927Smrg cygwin* | mingw* | cegcc*) 15783eed67faSmbalmer # On Win9x/ME, this test blows up -- it succeeds, but takes 15793eed67faSmbalmer # about 5 minutes as the teststring grows exponentially. 15803eed67faSmbalmer # Worse, since 9x/ME are not pre-emptively multitasking, 15813eed67faSmbalmer # you end up with a "frozen" computer, even though with patience 15823eed67faSmbalmer # the test eventually succeeds (with a max line length of 256k). 15833eed67faSmbalmer # Instead, let's just punt: use the minimum linelength reported by 15843eed67faSmbalmer # all of the supported platforms: 8192 (on NT/2K/XP). 15853eed67faSmbalmer lt_cv_sys_max_cmd_len=8192; 15863eed67faSmbalmer ;; 15873eed67faSmbalmer 1588dd0822caSmrg mint*) 1589dd0822caSmrg # On MiNT this can take a long time and run out of memory. 1590dd0822caSmrg lt_cv_sys_max_cmd_len=8192; 1591dd0822caSmrg ;; 1592dd0822caSmrg 15933eed67faSmbalmer amigaos*) 15943eed67faSmbalmer # On AmigaOS with pdksh, this test takes hours, literally. 15953eed67faSmbalmer # So we just punt and use a minimum line length of 8192. 15963eed67faSmbalmer lt_cv_sys_max_cmd_len=8192; 15973eed67faSmbalmer ;; 15983eed67faSmbalmer 15993eed67faSmbalmer netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16003eed67faSmbalmer # This has been around since 386BSD, at least. Likely further. 16013eed67faSmbalmer if test -x /sbin/sysctl; then 16023eed67faSmbalmer lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16033eed67faSmbalmer elif test -x /usr/sbin/sysctl; then 16043eed67faSmbalmer lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16053eed67faSmbalmer else 16063eed67faSmbalmer lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16073eed67faSmbalmer fi 16083eed67faSmbalmer # And add a safety zone 16093eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16103eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16113eed67faSmbalmer ;; 16123eed67faSmbalmer 16133eed67faSmbalmer interix*) 16143eed67faSmbalmer # We know the value 262144 and hardcode it with a safety zone (like BSD) 16153eed67faSmbalmer lt_cv_sys_max_cmd_len=196608 16163eed67faSmbalmer ;; 16173eed67faSmbalmer 16183eed67faSmbalmer osf*) 16193eed67faSmbalmer # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16203eed67faSmbalmer # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16213eed67faSmbalmer # nice to cause kernel panics so lets avoid the loop below. 16223eed67faSmbalmer # First set a reasonable default. 16233eed67faSmbalmer lt_cv_sys_max_cmd_len=16384 16243eed67faSmbalmer # 16253eed67faSmbalmer if test -x /sbin/sysconfig; then 16263eed67faSmbalmer case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 16273eed67faSmbalmer *1*) lt_cv_sys_max_cmd_len=-1 ;; 16283eed67faSmbalmer esac 16293eed67faSmbalmer fi 16303eed67faSmbalmer ;; 16313eed67faSmbalmer sco3.2v5*) 16323eed67faSmbalmer lt_cv_sys_max_cmd_len=102400 16333eed67faSmbalmer ;; 16343eed67faSmbalmer sysv5* | sco5v6* | sysv4.2uw2*) 16353eed67faSmbalmer kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 16363eed67faSmbalmer if test -n "$kargmax"; then 1637dc407927Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 16383eed67faSmbalmer else 16393eed67faSmbalmer lt_cv_sys_max_cmd_len=32768 16403eed67faSmbalmer fi 16413eed67faSmbalmer ;; 16423eed67faSmbalmer *) 16433eed67faSmbalmer lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 16443eed67faSmbalmer if test -n "$lt_cv_sys_max_cmd_len"; then 16453eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16463eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16473eed67faSmbalmer else 1648dc407927Smrg # Make teststring a little bigger before we do anything with it. 1649dc407927Smrg # a 1K string should be a reasonable start. 1650dc407927Smrg for i in 1 2 3 4 5 6 7 8 ; do 1651dc407927Smrg teststring=$teststring$teststring 1652dc407927Smrg done 16533eed67faSmbalmer SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1654dc407927Smrg # If test is not a shell built-in, we'll probably end up computing a 1655dc407927Smrg # maximum length that is only half of the actual maximum length, but 1656dc407927Smrg # we can't tell. 1657dd0822caSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1658dd0822caSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 16593eed67faSmbalmer test $i != 17 # 1/2 MB should be enough 16603eed67faSmbalmer do 16613eed67faSmbalmer i=`expr $i + 1` 16623eed67faSmbalmer teststring=$teststring$teststring 16633eed67faSmbalmer done 1664dc407927Smrg # Only check the string length outside the loop. 1665dc407927Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 16663eed67faSmbalmer teststring= 1667dc407927Smrg # Add a significant safety factor because C++ compilers can tack on 1668dc407927Smrg # massive amounts of additional arguments before passing them to the 1669dc407927Smrg # linker. It appears as though 1/2 is a usable value. 16703eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 16713eed67faSmbalmer fi 16723eed67faSmbalmer ;; 16733eed67faSmbalmer esac 16743eed67faSmbalmer]) 16753eed67faSmbalmerif test -n $lt_cv_sys_max_cmd_len ; then 16763eed67faSmbalmer AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 16773eed67faSmbalmerelse 16783eed67faSmbalmer AC_MSG_RESULT(none) 16793eed67faSmbalmerfi 1680dc407927Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1681dc407927Smrg_LT_DECL([], [max_cmd_len], [0], 1682dc407927Smrg [What is the maximum length of a command?]) 1683dc407927Smrg])# LT_CMD_MAX_LEN 16843eed67faSmbalmer 1685dc407927Smrg# Old name: 1686dc407927SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1687dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1688dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 16893eed67faSmbalmer 1690dc407927Smrg 1691dc407927Smrg# _LT_HEADER_DLFCN 1692dc407927Smrg# ---------------- 1693dc407927Smrgm4_defun([_LT_HEADER_DLFCN], 1694dc407927Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1695dc407927Smrg])# _LT_HEADER_DLFCN 16963eed67faSmbalmer 16973eed67faSmbalmer 1698dc407927Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1699dc407927Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1700dc407927Smrg# ---------------------------------------------------------------- 1701dc407927Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1702dc407927Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17033eed67faSmbalmerif test "$cross_compiling" = yes; then : 17043eed67faSmbalmer [$4] 17053eed67faSmbalmerelse 17063eed67faSmbalmer lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17073eed67faSmbalmer lt_status=$lt_dlunknown 1708dc407927Smrg cat > conftest.$ac_ext <<_LT_EOF 1709dd0822caSmrg[#line $LINENO "configure" 17103eed67faSmbalmer#include "confdefs.h" 17113eed67faSmbalmer 17123eed67faSmbalmer#if HAVE_DLFCN_H 17133eed67faSmbalmer#include <dlfcn.h> 17143eed67faSmbalmer#endif 17153eed67faSmbalmer 17163eed67faSmbalmer#include <stdio.h> 17173eed67faSmbalmer 17183eed67faSmbalmer#ifdef RTLD_GLOBAL 17193eed67faSmbalmer# define LT_DLGLOBAL RTLD_GLOBAL 17203eed67faSmbalmer#else 17213eed67faSmbalmer# ifdef DL_GLOBAL 17223eed67faSmbalmer# define LT_DLGLOBAL DL_GLOBAL 17233eed67faSmbalmer# else 17243eed67faSmbalmer# define LT_DLGLOBAL 0 17253eed67faSmbalmer# endif 17263eed67faSmbalmer#endif 17273eed67faSmbalmer 17283eed67faSmbalmer/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 17293eed67faSmbalmer find out it does not work in some platform. */ 17303eed67faSmbalmer#ifndef LT_DLLAZY_OR_NOW 17313eed67faSmbalmer# ifdef RTLD_LAZY 17323eed67faSmbalmer# define LT_DLLAZY_OR_NOW RTLD_LAZY 17333eed67faSmbalmer# else 17343eed67faSmbalmer# ifdef DL_LAZY 17353eed67faSmbalmer# define LT_DLLAZY_OR_NOW DL_LAZY 17363eed67faSmbalmer# else 17373eed67faSmbalmer# ifdef RTLD_NOW 17383eed67faSmbalmer# define LT_DLLAZY_OR_NOW RTLD_NOW 17393eed67faSmbalmer# else 17403eed67faSmbalmer# ifdef DL_NOW 17413eed67faSmbalmer# define LT_DLLAZY_OR_NOW DL_NOW 17423eed67faSmbalmer# else 17433eed67faSmbalmer# define LT_DLLAZY_OR_NOW 0 17443eed67faSmbalmer# endif 17453eed67faSmbalmer# endif 17463eed67faSmbalmer# endif 17473eed67faSmbalmer# endif 17483eed67faSmbalmer#endif 17493eed67faSmbalmer 1750dd0822caSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1751dd0822caSmrg correspondingly for the symbols needed. */ 1752dd0822caSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1753dd0822caSmrgint fnord () __attribute__((visibility("default"))); 1754dd0822caSmrg#endif 1755dd0822caSmrg 1756dd0822caSmrgint fnord () { return 42; } 17573eed67faSmbalmerint main () 17583eed67faSmbalmer{ 17593eed67faSmbalmer void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 17603eed67faSmbalmer int status = $lt_dlunknown; 17613eed67faSmbalmer 17623eed67faSmbalmer if (self) 17633eed67faSmbalmer { 17643eed67faSmbalmer if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1765dd0822caSmrg else 1766dd0822caSmrg { 1767dd0822caSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1768dd0822caSmrg else puts (dlerror ()); 1769dd0822caSmrg } 17703eed67faSmbalmer /* dlclose (self); */ 17713eed67faSmbalmer } 17723eed67faSmbalmer else 17733eed67faSmbalmer puts (dlerror ()); 17743eed67faSmbalmer 1775dc407927Smrg return status; 17763eed67faSmbalmer}] 1777dc407927Smrg_LT_EOF 17783eed67faSmbalmer if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 17793eed67faSmbalmer (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 17803eed67faSmbalmer lt_status=$? 17813eed67faSmbalmer case x$lt_status in 17823eed67faSmbalmer x$lt_dlno_uscore) $1 ;; 17833eed67faSmbalmer x$lt_dlneed_uscore) $2 ;; 17843eed67faSmbalmer x$lt_dlunknown|x*) $3 ;; 17853eed67faSmbalmer esac 17863eed67faSmbalmer else : 17873eed67faSmbalmer # compilation failed 17883eed67faSmbalmer $3 17893eed67faSmbalmer fi 17903eed67faSmbalmerfi 17913eed67faSmbalmerrm -fr conftest* 1792dc407927Smrg])# _LT_TRY_DLOPEN_SELF 17933eed67faSmbalmer 17943eed67faSmbalmer 1795dc407927Smrg# LT_SYS_DLOPEN_SELF 1796dc407927Smrg# ------------------ 1797dc407927SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1798dc407927Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17993eed67faSmbalmerif test "x$enable_dlopen" != xyes; then 18003eed67faSmbalmer enable_dlopen=unknown 18013eed67faSmbalmer enable_dlopen_self=unknown 18023eed67faSmbalmer enable_dlopen_self_static=unknown 18033eed67faSmbalmerelse 18043eed67faSmbalmer lt_cv_dlopen=no 18053eed67faSmbalmer lt_cv_dlopen_libs= 18063eed67faSmbalmer 18073eed67faSmbalmer case $host_os in 18083eed67faSmbalmer beos*) 18093eed67faSmbalmer lt_cv_dlopen="load_add_on" 18103eed67faSmbalmer lt_cv_dlopen_libs= 18113eed67faSmbalmer lt_cv_dlopen_self=yes 18123eed67faSmbalmer ;; 18133eed67faSmbalmer 1814dc407927Smrg mingw* | pw32* | cegcc*) 18153eed67faSmbalmer lt_cv_dlopen="LoadLibrary" 18163eed67faSmbalmer lt_cv_dlopen_libs= 1817dc407927Smrg ;; 18183eed67faSmbalmer 18193eed67faSmbalmer cygwin*) 18203eed67faSmbalmer lt_cv_dlopen="dlopen" 18213eed67faSmbalmer lt_cv_dlopen_libs= 1822dc407927Smrg ;; 18233eed67faSmbalmer 18243eed67faSmbalmer darwin*) 18253eed67faSmbalmer # if libdl is installed we need to link against it 18263eed67faSmbalmer AC_CHECK_LIB([dl], [dlopen], 18273eed67faSmbalmer [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 18283eed67faSmbalmer lt_cv_dlopen="dyld" 18293eed67faSmbalmer lt_cv_dlopen_libs= 18303eed67faSmbalmer lt_cv_dlopen_self=yes 18313eed67faSmbalmer ]) 1832dc407927Smrg ;; 18333eed67faSmbalmer 18343eed67faSmbalmer *) 18353eed67faSmbalmer AC_CHECK_FUNC([shl_load], 18363eed67faSmbalmer [lt_cv_dlopen="shl_load"], 18373eed67faSmbalmer [AC_CHECK_LIB([dld], [shl_load], 18383eed67faSmbalmer [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 18393eed67faSmbalmer [AC_CHECK_FUNC([dlopen], 18403eed67faSmbalmer [lt_cv_dlopen="dlopen"], 18413eed67faSmbalmer [AC_CHECK_LIB([dl], [dlopen], 18423eed67faSmbalmer [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 18433eed67faSmbalmer [AC_CHECK_LIB([svld], [dlopen], 18443eed67faSmbalmer [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 18453eed67faSmbalmer [AC_CHECK_LIB([dld], [dld_link], 18463eed67faSmbalmer [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 18473eed67faSmbalmer ]) 18483eed67faSmbalmer ]) 18493eed67faSmbalmer ]) 18503eed67faSmbalmer ]) 18513eed67faSmbalmer ]) 18523eed67faSmbalmer ;; 18533eed67faSmbalmer esac 18543eed67faSmbalmer 18553eed67faSmbalmer if test "x$lt_cv_dlopen" != xno; then 18563eed67faSmbalmer enable_dlopen=yes 18573eed67faSmbalmer else 18583eed67faSmbalmer enable_dlopen=no 18593eed67faSmbalmer fi 18603eed67faSmbalmer 18613eed67faSmbalmer case $lt_cv_dlopen in 18623eed67faSmbalmer dlopen) 18633eed67faSmbalmer save_CPPFLAGS="$CPPFLAGS" 18643eed67faSmbalmer test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 18653eed67faSmbalmer 18663eed67faSmbalmer save_LDFLAGS="$LDFLAGS" 18673eed67faSmbalmer wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 18683eed67faSmbalmer 18693eed67faSmbalmer save_LIBS="$LIBS" 18703eed67faSmbalmer LIBS="$lt_cv_dlopen_libs $LIBS" 18713eed67faSmbalmer 18723eed67faSmbalmer AC_CACHE_CHECK([whether a program can dlopen itself], 18733eed67faSmbalmer lt_cv_dlopen_self, [dnl 1874dc407927Smrg _LT_TRY_DLOPEN_SELF( 18753eed67faSmbalmer lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 18763eed67faSmbalmer lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 18773eed67faSmbalmer ]) 18783eed67faSmbalmer 18793eed67faSmbalmer if test "x$lt_cv_dlopen_self" = xyes; then 18803eed67faSmbalmer wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 18813eed67faSmbalmer AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1882dc407927Smrg lt_cv_dlopen_self_static, [dnl 1883dc407927Smrg _LT_TRY_DLOPEN_SELF( 18843eed67faSmbalmer lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 18853eed67faSmbalmer lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 18863eed67faSmbalmer ]) 18873eed67faSmbalmer fi 18883eed67faSmbalmer 18893eed67faSmbalmer CPPFLAGS="$save_CPPFLAGS" 18903eed67faSmbalmer LDFLAGS="$save_LDFLAGS" 18913eed67faSmbalmer LIBS="$save_LIBS" 18923eed67faSmbalmer ;; 18933eed67faSmbalmer esac 18943eed67faSmbalmer 18953eed67faSmbalmer case $lt_cv_dlopen_self in 18963eed67faSmbalmer yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 18973eed67faSmbalmer *) enable_dlopen_self=unknown ;; 18983eed67faSmbalmer esac 18993eed67faSmbalmer 19003eed67faSmbalmer case $lt_cv_dlopen_self_static in 19013eed67faSmbalmer yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19023eed67faSmbalmer *) enable_dlopen_self_static=unknown ;; 19033eed67faSmbalmer esac 19043eed67faSmbalmerfi 1905dc407927Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1906dc407927Smrg [Whether dlopen is supported]) 1907dc407927Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1908dc407927Smrg [Whether dlopen of programs is supported]) 1909dc407927Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1910dc407927Smrg [Whether dlopen of statically linked programs is supported]) 1911dc407927Smrg])# LT_SYS_DLOPEN_SELF 19123eed67faSmbalmer 1913dc407927Smrg# Old name: 1914dc407927SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1915dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1916dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 19173eed67faSmbalmer 1918dc407927Smrg 1919dc407927Smrg# _LT_COMPILER_C_O([TAGNAME]) 1920dc407927Smrg# --------------------------- 1921dc407927Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1922dc407927Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1923dc407927Smrgm4_defun([_LT_COMPILER_C_O], 1924dc407927Smrg[m4_require([_LT_DECL_SED])dnl 1925dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1926dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 19273eed67faSmbalmerAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1928dc407927Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1929dc407927Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1930dc407927Smrg $RM -r conftest 2>/dev/null 19313eed67faSmbalmer mkdir conftest 19323eed67faSmbalmer cd conftest 19333eed67faSmbalmer mkdir out 19343eed67faSmbalmer echo "$lt_simple_compile_test_code" > conftest.$ac_ext 19353eed67faSmbalmer 19363eed67faSmbalmer lt_compiler_flag="-o out/conftest2.$ac_objext" 19373eed67faSmbalmer # Insert the option either (1) after the last *FLAGS variable, or 19383eed67faSmbalmer # (2) before a word containing "conftest.", or (3) at the end. 19393eed67faSmbalmer # Note that $ac_compile itself does not contain backslashes and begins 19403eed67faSmbalmer # with a dollar sign (not a hyphen), so the echo should work correctly. 19413eed67faSmbalmer lt_compile=`echo "$ac_compile" | $SED \ 19423eed67faSmbalmer -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 19433eed67faSmbalmer -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 19443eed67faSmbalmer -e 's:$: $lt_compiler_flag:'` 1945dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 19463eed67faSmbalmer (eval "$lt_compile" 2>out/conftest.err) 19473eed67faSmbalmer ac_status=$? 19483eed67faSmbalmer cat out/conftest.err >&AS_MESSAGE_LOG_FD 1949dd0822caSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 19503eed67faSmbalmer if (exit $ac_status) && test -s out/conftest2.$ac_objext 19513eed67faSmbalmer then 19523eed67faSmbalmer # The compiler can only warn and ignore the option if not recognized 19533eed67faSmbalmer # So say no if there are warnings 1954dd0822caSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 19553eed67faSmbalmer $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 19563eed67faSmbalmer if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1957dc407927Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 19583eed67faSmbalmer fi 19593eed67faSmbalmer fi 19603eed67faSmbalmer chmod u+w . 2>&AS_MESSAGE_LOG_FD 1961dc407927Smrg $RM conftest* 19623eed67faSmbalmer # SGI C++ compiler will create directory out/ii_files/ for 19633eed67faSmbalmer # template instantiation 1964dc407927Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1965dc407927Smrg $RM out/* && rmdir out 19663eed67faSmbalmer cd .. 1967dc407927Smrg $RM -r conftest 1968dc407927Smrg $RM conftest* 19693eed67faSmbalmer]) 1970dc407927Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1971dc407927Smrg [Does compiler simultaneously support -c and -o options?]) 1972dc407927Smrg])# _LT_COMPILER_C_O 19733eed67faSmbalmer 19743eed67faSmbalmer 1975dc407927Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1976dc407927Smrg# ---------------------------------- 19773eed67faSmbalmer# Check to see if we can do hard links to lock some files if needed 1978dc407927Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1979dc407927Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1980dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1981dc407927Smrg_LT_COMPILER_C_O([$1]) 19823eed67faSmbalmer 19833eed67faSmbalmerhard_links="nottested" 1984dc407927Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 19853eed67faSmbalmer # do not overwrite the value of need_locks provided by the user 19863eed67faSmbalmer AC_MSG_CHECKING([if we can lock with hard links]) 19873eed67faSmbalmer hard_links=yes 1988dc407927Smrg $RM conftest* 19893eed67faSmbalmer ln conftest.a conftest.b 2>/dev/null && hard_links=no 19903eed67faSmbalmer touch conftest.a 19913eed67faSmbalmer ln conftest.a conftest.b 2>&5 || hard_links=no 19923eed67faSmbalmer ln conftest.a conftest.b 2>/dev/null && hard_links=no 19933eed67faSmbalmer AC_MSG_RESULT([$hard_links]) 19943eed67faSmbalmer if test "$hard_links" = no; then 19953eed67faSmbalmer AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 19963eed67faSmbalmer need_locks=warn 19973eed67faSmbalmer fi 19983eed67faSmbalmerelse 19993eed67faSmbalmer need_locks=no 20003eed67faSmbalmerfi 2001dc407927Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2002dc407927Smrg])# _LT_COMPILER_FILE_LOCKS 20033eed67faSmbalmer 20043eed67faSmbalmer 2005dc407927Smrg# _LT_CHECK_OBJDIR 2006dc407927Smrg# ---------------- 2007dc407927Smrgm4_defun([_LT_CHECK_OBJDIR], 20083eed67faSmbalmer[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20093eed67faSmbalmer[rm -f .libs 2>/dev/null 20103eed67faSmbalmermkdir .libs 2>/dev/null 20113eed67faSmbalmerif test -d .libs; then 20123eed67faSmbalmer lt_cv_objdir=.libs 20133eed67faSmbalmerelse 20143eed67faSmbalmer # MS-DOS does not allow filenames that begin with a dot. 20153eed67faSmbalmer lt_cv_objdir=_libs 20163eed67faSmbalmerfi 20173eed67faSmbalmerrmdir .libs 2>/dev/null]) 20183eed67faSmbalmerobjdir=$lt_cv_objdir 2019dc407927Smrg_LT_DECL([], [objdir], [0], 2020dc407927Smrg [The name of the directory that contains temporary libtool files])dnl 2021dc407927Smrgm4_pattern_allow([LT_OBJDIR])dnl 2022dc407927SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2023dc407927Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2024dc407927Smrg])# _LT_CHECK_OBJDIR 20253eed67faSmbalmer 20263eed67faSmbalmer 2027dc407927Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2028dc407927Smrg# -------------------------------------- 20293eed67faSmbalmer# Check hardcoding attributes. 2030dc407927Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 20313eed67faSmbalmer[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2032dc407927Smrg_LT_TAGVAR(hardcode_action, $1)= 2033dc407927Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2034dc407927Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2035dc407927Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 20363eed67faSmbalmer 2037dc407927Smrg # We can hardcode non-existent directories. 2038dc407927Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 20393eed67faSmbalmer # If the only mechanism to avoid hardcoding is shlibpath_var, we 20403eed67faSmbalmer # have to relink, otherwise we might link with an installed library 20413eed67faSmbalmer # when we should be linking with a yet-to-be-installed one 2042dc407927Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2043dc407927Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 20443eed67faSmbalmer # Linking always hardcodes the temporary library directory. 2045dc407927Smrg _LT_TAGVAR(hardcode_action, $1)=relink 20463eed67faSmbalmer else 20473eed67faSmbalmer # We can link without hardcoding, and we can hardcode nonexisting dirs. 2048dc407927Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 20493eed67faSmbalmer fi 20503eed67faSmbalmerelse 20513eed67faSmbalmer # We cannot hardcode anything, or else we can only hardcode existing 20523eed67faSmbalmer # directories. 2053dc407927Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 20543eed67faSmbalmerfi 2055dc407927SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 20563eed67faSmbalmer 2057dc407927Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2058dc407927Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 20593eed67faSmbalmer # Fast installation is not supported 20603eed67faSmbalmer enable_fast_install=no 20613eed67faSmbalmerelif test "$shlibpath_overrides_runpath" = yes || 20623eed67faSmbalmer test "$enable_shared" = no; then 20633eed67faSmbalmer # Fast installation is not necessary 20643eed67faSmbalmer enable_fast_install=needless 20653eed67faSmbalmerfi 2066dc407927Smrg_LT_TAGDECL([], [hardcode_action], [0], 2067dc407927Smrg [How to hardcode a shared library path into an executable]) 2068dc407927Smrg])# _LT_LINKER_HARDCODE_LIBPATH 20693eed67faSmbalmer 20703eed67faSmbalmer 2071dc407927Smrg# _LT_CMD_STRIPLIB 2072dc407927Smrg# ---------------- 2073dc407927Smrgm4_defun([_LT_CMD_STRIPLIB], 2074dc407927Smrg[m4_require([_LT_DECL_EGREP]) 2075dc407927Smrgstriplib= 20763eed67faSmbalmerold_striplib= 20773eed67faSmbalmerAC_MSG_CHECKING([whether stripping libraries is possible]) 2078dc407927Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 20793eed67faSmbalmer test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 20803eed67faSmbalmer test -z "$striplib" && striplib="$STRIP --strip-unneeded" 20813eed67faSmbalmer AC_MSG_RESULT([yes]) 20823eed67faSmbalmerelse 20833eed67faSmbalmer# FIXME - insert some real tests, host_os isn't really good enough 20843eed67faSmbalmer case $host_os in 2085dc407927Smrg darwin*) 2086dc407927Smrg if test -n "$STRIP" ; then 2087dc407927Smrg striplib="$STRIP -x" 2088dc407927Smrg old_striplib="$STRIP -S" 2089dc407927Smrg AC_MSG_RESULT([yes]) 2090dc407927Smrg else 2091dc407927Smrg AC_MSG_RESULT([no]) 2092dc407927Smrg fi 2093dc407927Smrg ;; 2094dc407927Smrg *) 2095dc407927Smrg AC_MSG_RESULT([no]) 20963eed67faSmbalmer ;; 20973eed67faSmbalmer esac 20983eed67faSmbalmerfi 2099dc407927Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2100dc407927Smrg_LT_DECL([], [striplib], [1]) 2101dc407927Smrg])# _LT_CMD_STRIPLIB 21023eed67faSmbalmer 21033eed67faSmbalmer 2104dc407927Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21053eed67faSmbalmer# ----------------------------- 21063eed67faSmbalmer# PORTME Fill in your ld.so characteristics 2107dc407927Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2108dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2109dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 2110dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2111dc407927Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2112dc407927Smrgm4_require([_LT_DECL_SED])dnl 2113dd0822caSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21143eed67faSmbalmerAC_MSG_CHECKING([dynamic linker characteristics]) 2115dc407927Smrgm4_if([$1], 2116dc407927Smrg [], [ 21173eed67faSmbalmerif test "$GCC" = yes; then 21183eed67faSmbalmer case $host_os in 21193eed67faSmbalmer darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21203eed67faSmbalmer *) lt_awk_arg="/^libraries:/" ;; 21213eed67faSmbalmer esac 2122dd0822caSmrg case $host_os in 2123dd0822caSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2124dd0822caSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2125dd0822caSmrg esac 2126dd0822caSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2127dd0822caSmrg case $lt_search_path_spec in 2128dd0822caSmrg *\;*) 21293eed67faSmbalmer # if the path contains ";" then we assume it to be the separator 21303eed67faSmbalmer # otherwise default to the standard path separator (i.e. ":") - it is 21313eed67faSmbalmer # assumed that no part of a normal pathname contains ";" but that should 21323eed67faSmbalmer # okay in the real world where ";" in dirpaths is itself problematic. 2133dd0822caSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2134dd0822caSmrg ;; 2135dd0822caSmrg *) 2136dd0822caSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2137dd0822caSmrg ;; 2138dd0822caSmrg esac 21393eed67faSmbalmer # Ok, now we have the path, separated by spaces, we can step through it 21403eed67faSmbalmer # and add multilib dir if necessary. 21413eed67faSmbalmer lt_tmp_lt_search_path_spec= 21423eed67faSmbalmer lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 21433eed67faSmbalmer for lt_sys_path in $lt_search_path_spec; do 21443eed67faSmbalmer if test -d "$lt_sys_path/$lt_multi_os_dir"; then 21453eed67faSmbalmer lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 21463eed67faSmbalmer else 21473eed67faSmbalmer test -d "$lt_sys_path" && \ 21483eed67faSmbalmer lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 21493eed67faSmbalmer fi 21503eed67faSmbalmer done 2151dd0822caSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 21523eed67faSmbalmerBEGIN {RS=" "; FS="/|\n";} { 21533eed67faSmbalmer lt_foo=""; 21543eed67faSmbalmer lt_count=0; 21553eed67faSmbalmer for (lt_i = NF; lt_i > 0; lt_i--) { 21563eed67faSmbalmer if ($lt_i != "" && $lt_i != ".") { 21573eed67faSmbalmer if ($lt_i == "..") { 21583eed67faSmbalmer lt_count++; 21593eed67faSmbalmer } else { 21603eed67faSmbalmer if (lt_count == 0) { 21613eed67faSmbalmer lt_foo="/" $lt_i lt_foo; 21623eed67faSmbalmer } else { 21633eed67faSmbalmer lt_count--; 21643eed67faSmbalmer } 21653eed67faSmbalmer } 21663eed67faSmbalmer } 21673eed67faSmbalmer } 21683eed67faSmbalmer if (lt_foo != "") { lt_freq[[lt_foo]]++; } 21693eed67faSmbalmer if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 21703eed67faSmbalmer}'` 2171dd0822caSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2172dd0822caSmrg # for these hosts. 2173dd0822caSmrg case $host_os in 2174dd0822caSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2175dd0822caSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2176dd0822caSmrg esac 2177dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 21783eed67faSmbalmerelse 21793eed67faSmbalmer sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 21803eed67faSmbalmerfi]) 2181dc407927Smrglibrary_names_spec= 2182dc407927Smrglibname_spec='lib$name' 2183dc407927Smrgsoname_spec= 2184dc407927Smrgshrext_cmds=".so" 2185dc407927Smrgpostinstall_cmds= 2186dc407927Smrgpostuninstall_cmds= 2187dc407927Smrgfinish_cmds= 2188dc407927Smrgfinish_eval= 2189dc407927Smrgshlibpath_var= 2190dc407927Smrgshlibpath_overrides_runpath=unknown 2191dc407927Smrgversion_type=none 2192dc407927Smrgdynamic_linker="$host_os ld.so" 2193dc407927Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 21943eed67faSmbalmerneed_lib_prefix=unknown 21953eed67faSmbalmerhardcode_into_libs=no 21963eed67faSmbalmer 21973eed67faSmbalmer# when you set need_version to no, make sure it does not cause -set_version 21983eed67faSmbalmer# flags to be left without arguments 21993eed67faSmbalmerneed_version=unknown 22003eed67faSmbalmer 22013eed67faSmbalmercase $host_os in 22023eed67faSmbalmeraix3*) 22033eed67faSmbalmer version_type=linux 22043eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22053eed67faSmbalmer shlibpath_var=LIBPATH 22063eed67faSmbalmer 22073eed67faSmbalmer # AIX 3 has no versioning support, so we append a major version to the name. 22083eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 22093eed67faSmbalmer ;; 22103eed67faSmbalmer 22113eed67faSmbalmeraix[[4-9]]*) 22123eed67faSmbalmer version_type=linux 22133eed67faSmbalmer need_lib_prefix=no 22143eed67faSmbalmer need_version=no 22153eed67faSmbalmer hardcode_into_libs=yes 22163eed67faSmbalmer if test "$host_cpu" = ia64; then 22173eed67faSmbalmer # AIX 5 supports IA64 22183eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22193eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 22203eed67faSmbalmer else 22213eed67faSmbalmer # With GCC up to 2.95.x, collect2 would create an import file 22223eed67faSmbalmer # for dependence libraries. The import file would start with 22233eed67faSmbalmer # the line `#! .'. This would cause the generated library to 22243eed67faSmbalmer # depend on `.', always an invalid library. This was fixed in 22253eed67faSmbalmer # development snapshots of GCC prior to 3.0. 22263eed67faSmbalmer case $host_os in 22273eed67faSmbalmer aix4 | aix4.[[01]] | aix4.[[01]].*) 22283eed67faSmbalmer if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 22293eed67faSmbalmer echo ' yes ' 2230dc407927Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 22313eed67faSmbalmer : 22323eed67faSmbalmer else 22333eed67faSmbalmer can_build_shared=no 22343eed67faSmbalmer fi 22353eed67faSmbalmer ;; 22363eed67faSmbalmer esac 22373eed67faSmbalmer # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 22383eed67faSmbalmer # soname into executable. Probably we can add versioning support to 22393eed67faSmbalmer # collect2, so additional links can be useful in future. 22403eed67faSmbalmer if test "$aix_use_runtimelinking" = yes; then 22413eed67faSmbalmer # If using run time linking (on AIX 4.2 or later) use lib<name>.so 22423eed67faSmbalmer # instead of lib<name>.a to let people know that these are not 22433eed67faSmbalmer # typical AIX shared libraries. 22443eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 22453eed67faSmbalmer else 22463eed67faSmbalmer # We preserve .a as extension for shared libraries through AIX4.2 22473eed67faSmbalmer # and later when we are not doing run time linking. 22483eed67faSmbalmer library_names_spec='${libname}${release}.a $libname.a' 22493eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 22503eed67faSmbalmer fi 22513eed67faSmbalmer shlibpath_var=LIBPATH 22523eed67faSmbalmer fi 22533eed67faSmbalmer ;; 22543eed67faSmbalmer 22553eed67faSmbalmeramigaos*) 2256dc407927Smrg case $host_cpu in 2257dc407927Smrg powerpc) 2258dc407927Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2259dc407927Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2260dc407927Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2261dc407927Smrg ;; 2262dc407927Smrg m68k) 2263dc407927Smrg library_names_spec='$libname.ixlibrary $libname.a' 2264dc407927Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2265dd0822caSmrg 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' 2266dc407927Smrg ;; 2267dc407927Smrg esac 22683eed67faSmbalmer ;; 22693eed67faSmbalmer 22703eed67faSmbalmerbeos*) 22713eed67faSmbalmer library_names_spec='${libname}${shared_ext}' 22723eed67faSmbalmer dynamic_linker="$host_os ld.so" 22733eed67faSmbalmer shlibpath_var=LIBRARY_PATH 22743eed67faSmbalmer ;; 22753eed67faSmbalmer 22763eed67faSmbalmerbsdi[[45]]*) 22773eed67faSmbalmer version_type=linux 22783eed67faSmbalmer need_version=no 22793eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 22803eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 22813eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 22823eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 22833eed67faSmbalmer sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 22843eed67faSmbalmer sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 22853eed67faSmbalmer # the default ld.so.conf also contains /usr/contrib/lib and 22863eed67faSmbalmer # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 22873eed67faSmbalmer # libtool to hard-code these into programs 22883eed67faSmbalmer ;; 22893eed67faSmbalmer 2290dc407927Smrgcygwin* | mingw* | pw32* | cegcc*) 22913eed67faSmbalmer version_type=windows 22923eed67faSmbalmer shrext_cmds=".dll" 22933eed67faSmbalmer need_version=no 22943eed67faSmbalmer need_lib_prefix=no 22953eed67faSmbalmer 2296dd0822caSmrg case $GCC,$cc_basename in 2297dd0822caSmrg yes,*) 2298dd0822caSmrg # gcc 22993eed67faSmbalmer library_names_spec='$libname.dll.a' 23003eed67faSmbalmer # DLL is installed to $(libdir)/../bin by postinstall_cmds 23013eed67faSmbalmer postinstall_cmds='base_file=`basename \${file}`~ 2302dc407927Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23033eed67faSmbalmer dldir=$destdir/`dirname \$dlpath`~ 23043eed67faSmbalmer test -d \$dldir || mkdir -p \$dldir~ 23053eed67faSmbalmer $install_prog $dir/$dlname \$dldir/$dlname~ 2306dc407927Smrg chmod a+x \$dldir/$dlname~ 2307dc407927Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2308dc407927Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2309dc407927Smrg fi' 23103eed67faSmbalmer postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23113eed67faSmbalmer dlpath=$dir/\$dldll~ 2312dc407927Smrg $RM \$dlpath' 23133eed67faSmbalmer shlibpath_overrides_runpath=yes 23143eed67faSmbalmer 23153eed67faSmbalmer case $host_os in 23163eed67faSmbalmer cygwin*) 23173eed67faSmbalmer # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23183eed67faSmbalmer soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2319dd0822caSmrgm4_if([$1], [],[ 2320dd0822caSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23213eed67faSmbalmer ;; 2322dc407927Smrg mingw* | cegcc*) 23233eed67faSmbalmer # MinGW DLLs use traditional 'lib' prefix 23243eed67faSmbalmer soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23253eed67faSmbalmer ;; 23263eed67faSmbalmer pw32*) 23273eed67faSmbalmer # pw32 DLLs use 'pw' prefix rather than 'lib' 23283eed67faSmbalmer library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23293eed67faSmbalmer ;; 23303eed67faSmbalmer esac 2331dd0822caSmrg dynamic_linker='Win32 ld.exe' 2332dd0822caSmrg ;; 2333dd0822caSmrg 2334dd0822caSmrg *,cl*) 2335dd0822caSmrg # Native MSVC 2336dd0822caSmrg libname_spec='$name' 2337dd0822caSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2338dd0822caSmrg library_names_spec='${libname}.dll.lib' 2339dd0822caSmrg 2340dd0822caSmrg case $build_os in 2341dd0822caSmrg mingw*) 2342dd0822caSmrg sys_lib_search_path_spec= 2343dd0822caSmrg lt_save_ifs=$IFS 2344dd0822caSmrg IFS=';' 2345dd0822caSmrg for lt_path in $LIB 2346dd0822caSmrg do 2347dd0822caSmrg IFS=$lt_save_ifs 2348dd0822caSmrg # Let DOS variable expansion print the short 8.3 style file name. 2349dd0822caSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2350dd0822caSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2351dd0822caSmrg done 2352dd0822caSmrg IFS=$lt_save_ifs 2353dd0822caSmrg # Convert to MSYS style. 2354dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2355dd0822caSmrg ;; 2356dd0822caSmrg cygwin*) 2357dd0822caSmrg # Convert to unix form, then to dos form, then back to unix form 2358dd0822caSmrg # but this time dos style (no spaces!) so that the unix form looks 2359dd0822caSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2360dd0822caSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2361dd0822caSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2362dd0822caSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2363dd0822caSmrg ;; 2364dd0822caSmrg *) 2365dd0822caSmrg sys_lib_search_path_spec="$LIB" 2366dd0822caSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2367dd0822caSmrg # It is most probably a Windows format PATH. 2368dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2369dd0822caSmrg else 2370dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2371dd0822caSmrg fi 2372dd0822caSmrg # FIXME: find the short name or the path components, as spaces are 2373dd0822caSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2374dd0822caSmrg ;; 2375dd0822caSmrg esac 2376dd0822caSmrg 2377dd0822caSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2378dd0822caSmrg postinstall_cmds='base_file=`basename \${file}`~ 2379dd0822caSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2380dd0822caSmrg dldir=$destdir/`dirname \$dlpath`~ 2381dd0822caSmrg test -d \$dldir || mkdir -p \$dldir~ 2382dd0822caSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2383dd0822caSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2384dd0822caSmrg dlpath=$dir/\$dldll~ 2385dd0822caSmrg $RM \$dlpath' 2386dd0822caSmrg shlibpath_overrides_runpath=yes 2387dd0822caSmrg dynamic_linker='Win32 link.exe' 23883eed67faSmbalmer ;; 23893eed67faSmbalmer 23903eed67faSmbalmer *) 2391dd0822caSmrg # Assume MSVC wrapper 23923eed67faSmbalmer library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2393dd0822caSmrg dynamic_linker='Win32 ld.exe' 23943eed67faSmbalmer ;; 23953eed67faSmbalmer esac 23963eed67faSmbalmer # FIXME: first we should search . and the directory the executable is in 23973eed67faSmbalmer shlibpath_var=PATH 23983eed67faSmbalmer ;; 23993eed67faSmbalmer 24003eed67faSmbalmerdarwin* | rhapsody*) 24013eed67faSmbalmer dynamic_linker="$host_os dyld" 24023eed67faSmbalmer version_type=darwin 24033eed67faSmbalmer need_lib_prefix=no 24043eed67faSmbalmer need_version=no 2405dc407927Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24063eed67faSmbalmer soname_spec='${libname}${release}${major}$shared_ext' 24073eed67faSmbalmer shlibpath_overrides_runpath=yes 24083eed67faSmbalmer shlibpath_var=DYLD_LIBRARY_PATH 24093eed67faSmbalmer shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2410dc407927Smrgm4_if([$1], [],[ 2411dc407927Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24123eed67faSmbalmer sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24133eed67faSmbalmer ;; 24143eed67faSmbalmer 24153eed67faSmbalmerdgux*) 24163eed67faSmbalmer version_type=linux 24173eed67faSmbalmer need_lib_prefix=no 24183eed67faSmbalmer need_version=no 24193eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24203eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 24213eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 24223eed67faSmbalmer ;; 24233eed67faSmbalmer 24243eed67faSmbalmerfreebsd1*) 24253eed67faSmbalmer dynamic_linker=no 24263eed67faSmbalmer ;; 24273eed67faSmbalmer 24283eed67faSmbalmerfreebsd* | dragonfly*) 24293eed67faSmbalmer # DragonFly does not have aout. When/if they implement a new 24303eed67faSmbalmer # versioning mechanism, adjust this. 24313eed67faSmbalmer if test -x /usr/bin/objformat; then 24323eed67faSmbalmer objformat=`/usr/bin/objformat` 24333eed67faSmbalmer else 24343eed67faSmbalmer case $host_os in 24353eed67faSmbalmer freebsd[[123]]*) objformat=aout ;; 24363eed67faSmbalmer *) objformat=elf ;; 24373eed67faSmbalmer esac 24383eed67faSmbalmer fi 24393eed67faSmbalmer version_type=freebsd-$objformat 24403eed67faSmbalmer case $version_type in 24413eed67faSmbalmer freebsd-elf*) 24423eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 24433eed67faSmbalmer need_version=no 24443eed67faSmbalmer need_lib_prefix=no 24453eed67faSmbalmer ;; 24463eed67faSmbalmer freebsd-*) 24473eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 24483eed67faSmbalmer need_version=yes 24493eed67faSmbalmer ;; 24503eed67faSmbalmer esac 24513eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 24523eed67faSmbalmer case $host_os in 24533eed67faSmbalmer freebsd2*) 24543eed67faSmbalmer shlibpath_overrides_runpath=yes 24553eed67faSmbalmer ;; 24563eed67faSmbalmer freebsd3.[[01]]* | freebsdelf3.[[01]]*) 24573eed67faSmbalmer shlibpath_overrides_runpath=yes 24583eed67faSmbalmer hardcode_into_libs=yes 24593eed67faSmbalmer ;; 24603eed67faSmbalmer freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 24613eed67faSmbalmer freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 24623eed67faSmbalmer shlibpath_overrides_runpath=no 24633eed67faSmbalmer hardcode_into_libs=yes 24643eed67faSmbalmer ;; 24653eed67faSmbalmer *) # from 4.6 on, and DragonFly 24663eed67faSmbalmer shlibpath_overrides_runpath=yes 24673eed67faSmbalmer hardcode_into_libs=yes 24683eed67faSmbalmer ;; 24693eed67faSmbalmer esac 24703eed67faSmbalmer ;; 24713eed67faSmbalmer 24723eed67faSmbalmergnu*) 24733eed67faSmbalmer version_type=linux 24743eed67faSmbalmer need_lib_prefix=no 24753eed67faSmbalmer need_version=no 24763eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 24773eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 24783eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 24793eed67faSmbalmer hardcode_into_libs=yes 24803eed67faSmbalmer ;; 24813eed67faSmbalmer 2482dd0822caSmrghaiku*) 2483dd0822caSmrg version_type=linux 2484dd0822caSmrg need_lib_prefix=no 2485dd0822caSmrg need_version=no 2486dd0822caSmrg dynamic_linker="$host_os runtime_loader" 2487dd0822caSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2488dd0822caSmrg soname_spec='${libname}${release}${shared_ext}$major' 2489dd0822caSmrg shlibpath_var=LIBRARY_PATH 2490dd0822caSmrg shlibpath_overrides_runpath=yes 2491dd0822caSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2492dd0822caSmrg hardcode_into_libs=yes 2493dd0822caSmrg ;; 2494dd0822caSmrg 24953eed67faSmbalmerhpux9* | hpux10* | hpux11*) 24963eed67faSmbalmer # Give a soname corresponding to the major version so that dld.sl refuses to 24973eed67faSmbalmer # link against other versions. 24983eed67faSmbalmer version_type=sunos 24993eed67faSmbalmer need_lib_prefix=no 25003eed67faSmbalmer need_version=no 25013eed67faSmbalmer case $host_cpu in 25023eed67faSmbalmer ia64*) 25033eed67faSmbalmer shrext_cmds='.so' 25043eed67faSmbalmer hardcode_into_libs=yes 25053eed67faSmbalmer dynamic_linker="$host_os dld.so" 25063eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 25073eed67faSmbalmer shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25083eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25093eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25103eed67faSmbalmer if test "X$HPUX_IA64_MODE" = X32; then 25113eed67faSmbalmer sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25123eed67faSmbalmer else 25133eed67faSmbalmer sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25143eed67faSmbalmer fi 25153eed67faSmbalmer sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25163eed67faSmbalmer ;; 2517dc407927Smrg hppa*64*) 2518dc407927Smrg shrext_cmds='.sl' 2519dc407927Smrg hardcode_into_libs=yes 2520dc407927Smrg dynamic_linker="$host_os dld.sl" 2521dc407927Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2522dc407927Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2523dc407927Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2524dc407927Smrg soname_spec='${libname}${release}${shared_ext}$major' 2525dc407927Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2526dc407927Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2527dc407927Smrg ;; 2528dc407927Smrg *) 25293eed67faSmbalmer shrext_cmds='.sl' 25303eed67faSmbalmer dynamic_linker="$host_os dld.sl" 25313eed67faSmbalmer shlibpath_var=SHLIB_PATH 25323eed67faSmbalmer shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25333eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25343eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25353eed67faSmbalmer ;; 25363eed67faSmbalmer esac 2537dd0822caSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25383eed67faSmbalmer postinstall_cmds='chmod 555 $lib' 2539dd0822caSmrg # or fails outright, so override atomically: 2540dd0822caSmrg install_override_mode=555 25413eed67faSmbalmer ;; 25423eed67faSmbalmer 25433eed67faSmbalmerinterix[[3-9]]*) 25443eed67faSmbalmer version_type=linux 25453eed67faSmbalmer need_lib_prefix=no 25463eed67faSmbalmer need_version=no 25473eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 25483eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25493eed67faSmbalmer dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 25503eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 25513eed67faSmbalmer shlibpath_overrides_runpath=no 25523eed67faSmbalmer hardcode_into_libs=yes 25533eed67faSmbalmer ;; 25543eed67faSmbalmer 25553eed67faSmbalmeririx5* | irix6* | nonstopux*) 25563eed67faSmbalmer case $host_os in 25573eed67faSmbalmer nonstopux*) version_type=nonstopux ;; 25583eed67faSmbalmer *) 25593eed67faSmbalmer if test "$lt_cv_prog_gnu_ld" = yes; then 25603eed67faSmbalmer version_type=linux 25613eed67faSmbalmer else 25623eed67faSmbalmer version_type=irix 25633eed67faSmbalmer fi ;; 25643eed67faSmbalmer esac 25653eed67faSmbalmer need_lib_prefix=no 25663eed67faSmbalmer need_version=no 25673eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25683eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 25693eed67faSmbalmer case $host_os in 25703eed67faSmbalmer irix5* | nonstopux*) 25713eed67faSmbalmer libsuff= shlibsuff= 25723eed67faSmbalmer ;; 25733eed67faSmbalmer *) 25743eed67faSmbalmer case $LD in # libtool.m4 will add one of these switches to LD 25753eed67faSmbalmer *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 25763eed67faSmbalmer libsuff= shlibsuff= libmagic=32-bit;; 25773eed67faSmbalmer *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 25783eed67faSmbalmer libsuff=32 shlibsuff=N32 libmagic=N32;; 25793eed67faSmbalmer *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 25803eed67faSmbalmer libsuff=64 shlibsuff=64 libmagic=64-bit;; 25813eed67faSmbalmer *) libsuff= shlibsuff= libmagic=never-match;; 25823eed67faSmbalmer esac 25833eed67faSmbalmer ;; 25843eed67faSmbalmer esac 25853eed67faSmbalmer shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 25863eed67faSmbalmer shlibpath_overrides_runpath=no 25873eed67faSmbalmer sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 25883eed67faSmbalmer sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 25893eed67faSmbalmer hardcode_into_libs=yes 25903eed67faSmbalmer ;; 25913eed67faSmbalmer 25923eed67faSmbalmer# No shared lib support for Linux oldld, aout, or coff. 25933eed67faSmbalmerlinux*oldld* | linux*aout* | linux*coff*) 25943eed67faSmbalmer dynamic_linker=no 25953eed67faSmbalmer ;; 25963eed67faSmbalmer 25973eed67faSmbalmer# This must be Linux ELF. 2598dd0822caSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 25993eed67faSmbalmer version_type=linux 26003eed67faSmbalmer need_lib_prefix=no 26013eed67faSmbalmer need_version=no 26023eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26033eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 26043eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26053eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 26063eed67faSmbalmer shlibpath_overrides_runpath=no 2607dd0822caSmrg 2608dc407927Smrg # Some binutils ld are patched to set DT_RUNPATH 2609dd0822caSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2610dd0822caSmrg [lt_cv_shlibpath_overrides_runpath=no 2611dd0822caSmrg save_LDFLAGS=$LDFLAGS 2612dd0822caSmrg save_libdir=$libdir 2613dd0822caSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2614dd0822caSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2615dd0822caSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2616dd0822caSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2617dd0822caSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2618dd0822caSmrg LDFLAGS=$save_LDFLAGS 2619dd0822caSmrg libdir=$save_libdir 2620dd0822caSmrg ]) 2621dd0822caSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2622dc407927Smrg 26233eed67faSmbalmer # This implies no fast_install, which is unacceptable. 26243eed67faSmbalmer # Some rework will be needed to allow for fast_install 26253eed67faSmbalmer # before this can be enabled. 26263eed67faSmbalmer hardcode_into_libs=yes 26273eed67faSmbalmer 2628dc407927Smrg # Add ABI-specific directories to the system library path. 2629dc407927Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2630dc407927Smrg 26313eed67faSmbalmer # Append ld.so.conf contents to the search path 26323eed67faSmbalmer if test -f /etc/ld.so.conf; then 2633dd0822caSmrg 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' ' '` 2634dc407927Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2635dd0822caSmrg 26363eed67faSmbalmer fi 26373eed67faSmbalmer 26383eed67faSmbalmer # We used to test for /lib/ld.so.1 and disable shared libraries on 26393eed67faSmbalmer # powerpc, because MkLinux only supported shared libraries with the 26403eed67faSmbalmer # GNU dynamic linker. Since this was broken with cross compilers, 26413eed67faSmbalmer # most powerpc-linux boxes support dynamic linking these days and 26423eed67faSmbalmer # people can always --disable-shared, the test was removed, and we 26433eed67faSmbalmer # assume the GNU/Linux dynamic linker is in use. 26443eed67faSmbalmer dynamic_linker='GNU/Linux ld.so' 26453eed67faSmbalmer ;; 26463eed67faSmbalmer 26473eed67faSmbalmernetbsd*) 26483eed67faSmbalmer version_type=sunos 26493eed67faSmbalmer need_lib_prefix=no 26503eed67faSmbalmer need_version=no 2651dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 26523eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 26533eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 26543eed67faSmbalmer dynamic_linker='NetBSD (a.out) ld.so' 26553eed67faSmbalmer else 26563eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26573eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 26583eed67faSmbalmer dynamic_linker='NetBSD ld.elf_so' 26593eed67faSmbalmer fi 26603eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 26613eed67faSmbalmer shlibpath_overrides_runpath=yes 26623eed67faSmbalmer hardcode_into_libs=yes 26633eed67faSmbalmer ;; 26643eed67faSmbalmer 26653eed67faSmbalmernewsos6) 26663eed67faSmbalmer version_type=linux 26673eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26683eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 26693eed67faSmbalmer shlibpath_overrides_runpath=yes 26703eed67faSmbalmer ;; 26713eed67faSmbalmer 2672dc407927Smrg*nto* | *qnx*) 2673dc407927Smrg version_type=qnx 26743eed67faSmbalmer need_lib_prefix=no 26753eed67faSmbalmer need_version=no 26763eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26773eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 26783eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 2679dc407927Smrg shlibpath_overrides_runpath=no 2680dc407927Smrg hardcode_into_libs=yes 2681dc407927Smrg dynamic_linker='ldqnx.so' 26823eed67faSmbalmer ;; 26833eed67faSmbalmer 26843eed67faSmbalmeropenbsd*) 26853eed67faSmbalmer version_type=sunos 26863eed67faSmbalmer sys_lib_dlsearch_path_spec="/usr/lib" 26873eed67faSmbalmer need_lib_prefix=no 26883eed67faSmbalmer # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 26893eed67faSmbalmer case $host_os in 2690dc407927Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2691dc407927Smrg *) need_version=no ;; 26923eed67faSmbalmer esac 26933eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 26943eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 26953eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 2696dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 26973eed67faSmbalmer case $host_os in 26983eed67faSmbalmer openbsd2.[[89]] | openbsd2.[[89]].*) 26993eed67faSmbalmer shlibpath_overrides_runpath=no 27003eed67faSmbalmer ;; 27013eed67faSmbalmer *) 27023eed67faSmbalmer shlibpath_overrides_runpath=yes 27033eed67faSmbalmer ;; 27043eed67faSmbalmer esac 27053eed67faSmbalmer else 27063eed67faSmbalmer shlibpath_overrides_runpath=yes 27073eed67faSmbalmer fi 27083eed67faSmbalmer ;; 27093eed67faSmbalmer 27103eed67faSmbalmeros2*) 27113eed67faSmbalmer libname_spec='$name' 27123eed67faSmbalmer shrext_cmds=".dll" 27133eed67faSmbalmer need_lib_prefix=no 27143eed67faSmbalmer library_names_spec='$libname${shared_ext} $libname.a' 27153eed67faSmbalmer dynamic_linker='OS/2 ld.exe' 27163eed67faSmbalmer shlibpath_var=LIBPATH 27173eed67faSmbalmer ;; 27183eed67faSmbalmer 27193eed67faSmbalmerosf3* | osf4* | osf5*) 27203eed67faSmbalmer version_type=osf 27213eed67faSmbalmer need_lib_prefix=no 27223eed67faSmbalmer need_version=no 27233eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27243eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27253eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27263eed67faSmbalmer sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27273eed67faSmbalmer sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27283eed67faSmbalmer ;; 27293eed67faSmbalmer 27303eed67faSmbalmerrdos*) 27313eed67faSmbalmer dynamic_linker=no 27323eed67faSmbalmer ;; 27333eed67faSmbalmer 27343eed67faSmbalmersolaris*) 27353eed67faSmbalmer version_type=linux 27363eed67faSmbalmer need_lib_prefix=no 27373eed67faSmbalmer need_version=no 27383eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27393eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27403eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27413eed67faSmbalmer shlibpath_overrides_runpath=yes 27423eed67faSmbalmer hardcode_into_libs=yes 27433eed67faSmbalmer # ldd complains unless libraries are executable 27443eed67faSmbalmer postinstall_cmds='chmod +x $lib' 27453eed67faSmbalmer ;; 27463eed67faSmbalmer 27473eed67faSmbalmersunos4*) 27483eed67faSmbalmer version_type=sunos 27493eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27503eed67faSmbalmer finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 27513eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27523eed67faSmbalmer shlibpath_overrides_runpath=yes 27533eed67faSmbalmer if test "$with_gnu_ld" = yes; then 27543eed67faSmbalmer need_lib_prefix=no 27553eed67faSmbalmer fi 27563eed67faSmbalmer need_version=yes 27573eed67faSmbalmer ;; 27583eed67faSmbalmer 27593eed67faSmbalmersysv4 | sysv4.3*) 27603eed67faSmbalmer version_type=linux 27613eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27623eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27633eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27643eed67faSmbalmer case $host_vendor in 27653eed67faSmbalmer sni) 27663eed67faSmbalmer shlibpath_overrides_runpath=no 27673eed67faSmbalmer need_lib_prefix=no 27683eed67faSmbalmer runpath_var=LD_RUN_PATH 27693eed67faSmbalmer ;; 27703eed67faSmbalmer siemens) 27713eed67faSmbalmer need_lib_prefix=no 27723eed67faSmbalmer ;; 27733eed67faSmbalmer motorola) 27743eed67faSmbalmer need_lib_prefix=no 27753eed67faSmbalmer need_version=no 27763eed67faSmbalmer shlibpath_overrides_runpath=no 27773eed67faSmbalmer sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 27783eed67faSmbalmer ;; 27793eed67faSmbalmer esac 27803eed67faSmbalmer ;; 27813eed67faSmbalmer 27823eed67faSmbalmersysv4*MP*) 27833eed67faSmbalmer if test -d /usr/nec ;then 27843eed67faSmbalmer version_type=linux 27853eed67faSmbalmer library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 27863eed67faSmbalmer soname_spec='$libname${shared_ext}.$major' 27873eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27883eed67faSmbalmer fi 27893eed67faSmbalmer ;; 27903eed67faSmbalmer 27913eed67faSmbalmersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 27923eed67faSmbalmer version_type=freebsd-elf 27933eed67faSmbalmer need_lib_prefix=no 27943eed67faSmbalmer need_version=no 27953eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 27963eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27973eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 2798dc407927Smrg shlibpath_overrides_runpath=yes 27993eed67faSmbalmer hardcode_into_libs=yes 28003eed67faSmbalmer if test "$with_gnu_ld" = yes; then 28013eed67faSmbalmer sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28023eed67faSmbalmer else 28033eed67faSmbalmer sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28043eed67faSmbalmer case $host_os in 28053eed67faSmbalmer sco3.2v5*) 28063eed67faSmbalmer sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28073eed67faSmbalmer ;; 28083eed67faSmbalmer esac 28093eed67faSmbalmer fi 28103eed67faSmbalmer sys_lib_dlsearch_path_spec='/usr/lib' 28113eed67faSmbalmer ;; 28123eed67faSmbalmer 2813dc407927Smrgtpf*) 2814dc407927Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2815dc407927Smrg version_type=linux 2816dc407927Smrg need_lib_prefix=no 2817dc407927Smrg need_version=no 2818dc407927Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2819dc407927Smrg shlibpath_var=LD_LIBRARY_PATH 2820dc407927Smrg shlibpath_overrides_runpath=no 2821dc407927Smrg hardcode_into_libs=yes 2822dc407927Smrg ;; 2823dc407927Smrg 28243eed67faSmbalmeruts4*) 28253eed67faSmbalmer version_type=linux 28263eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28273eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 28283eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 28293eed67faSmbalmer ;; 28303eed67faSmbalmer 28313eed67faSmbalmer*) 28323eed67faSmbalmer dynamic_linker=no 28333eed67faSmbalmer ;; 28343eed67faSmbalmeresac 28353eed67faSmbalmerAC_MSG_RESULT([$dynamic_linker]) 28363eed67faSmbalmertest "$dynamic_linker" = no && can_build_shared=no 28373eed67faSmbalmer 28383eed67faSmbalmervariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 28393eed67faSmbalmerif test "$GCC" = yes; then 28403eed67faSmbalmer variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 28413eed67faSmbalmerfi 28423eed67faSmbalmer 2843dc407927Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2844dc407927Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2845dc407927Smrgfi 2846dc407927Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2847dc407927Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2848dc407927Smrgfi 28493eed67faSmbalmer 2850dc407927Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2851dc407927Smrg [Variables whose values should be saved in libtool wrapper scripts and 2852dc407927Smrg restored at link time]) 2853dc407927Smrg_LT_DECL([], [need_lib_prefix], [0], 2854dc407927Smrg [Do we need the "lib" prefix for modules?]) 2855dc407927Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2856dc407927Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2857dc407927Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2858dc407927Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2859dc407927Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2860dc407927Smrg [Is shlibpath searched before the hard-coded library search path?]) 2861dc407927Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2862dc407927Smrg_LT_DECL([], [library_names_spec], [1], 2863dc407927Smrg [[List of archive names. First name is the real one, the rest are links. 2864dc407927Smrg The last name is the one that the linker finds with -lNAME]]) 2865dc407927Smrg_LT_DECL([], [soname_spec], [1], 2866dc407927Smrg [[The coded name of the library, if different from the real name]]) 2867dd0822caSmrg_LT_DECL([], [install_override_mode], [1], 2868dd0822caSmrg [Permission mode override for installation of shared libraries]) 2869dc407927Smrg_LT_DECL([], [postinstall_cmds], [2], 2870dc407927Smrg [Command to use after installation of a shared archive]) 2871dc407927Smrg_LT_DECL([], [postuninstall_cmds], [2], 2872dc407927Smrg [Command to use after uninstallation of a shared archive]) 2873dc407927Smrg_LT_DECL([], [finish_cmds], [2], 2874dc407927Smrg [Commands used to finish a libtool library installation in a directory]) 2875dc407927Smrg_LT_DECL([], [finish_eval], [1], 2876dc407927Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2877dc407927Smrg not shown]]) 2878dc407927Smrg_LT_DECL([], [hardcode_into_libs], [0], 2879dc407927Smrg [Whether we should hardcode library paths into libraries]) 2880dc407927Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2881dc407927Smrg [Compile-time system search path for libraries]) 2882dc407927Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2883dc407927Smrg [Run-time system search path for libraries]) 2884dc407927Smrg])# _LT_SYS_DYNAMIC_LINKER 2885dc407927Smrg 2886dc407927Smrg 2887dc407927Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 28883eed67faSmbalmer# -------------------------- 28893eed67faSmbalmer# find a file program which can recognize shared library 2890dc407927SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2891dc407927Smrg[m4_require([_LT_DECL_EGREP])dnl 28923eed67faSmbalmerAC_MSG_CHECKING([for $1]) 28933eed67faSmbalmerAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 28943eed67faSmbalmer[case $MAGIC_CMD in 28953eed67faSmbalmer[[\\/*] | ?:[\\/]*]) 28963eed67faSmbalmer lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 28973eed67faSmbalmer ;; 28983eed67faSmbalmer*) 28993eed67faSmbalmer lt_save_MAGIC_CMD="$MAGIC_CMD" 29003eed67faSmbalmer lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29013eed67faSmbalmerdnl $ac_dummy forces splitting on constant user-supplied paths. 29023eed67faSmbalmerdnl POSIX.2 word splitting is done only on the output of word expansions, 29033eed67faSmbalmerdnl not every word. This closes a longstanding sh security hole. 2904dc407927Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29053eed67faSmbalmer for ac_dir in $ac_dummy; do 29063eed67faSmbalmer IFS="$lt_save_ifs" 29073eed67faSmbalmer test -z "$ac_dir" && ac_dir=. 29083eed67faSmbalmer if test -f $ac_dir/$1; then 29093eed67faSmbalmer lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29103eed67faSmbalmer if test -n "$file_magic_test_file"; then 29113eed67faSmbalmer case $deplibs_check_method in 29123eed67faSmbalmer "file_magic "*) 29133eed67faSmbalmer file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29143eed67faSmbalmer MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29153eed67faSmbalmer if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29163eed67faSmbalmer $EGREP "$file_magic_regex" > /dev/null; then 29173eed67faSmbalmer : 29183eed67faSmbalmer else 2919dc407927Smrg cat <<_LT_EOF 1>&2 29203eed67faSmbalmer 29213eed67faSmbalmer*** Warning: the command libtool uses to detect shared libraries, 29223eed67faSmbalmer*** $file_magic_cmd, produces output that libtool cannot recognize. 29233eed67faSmbalmer*** The result is that libtool may fail to recognize shared libraries 29243eed67faSmbalmer*** as such. This will affect the creation of libtool libraries that 29253eed67faSmbalmer*** depend on shared libraries, but programs linked with such libtool 29263eed67faSmbalmer*** libraries will work regardless of this problem. Nevertheless, you 29273eed67faSmbalmer*** may want to report the problem to your system manager and/or to 29283eed67faSmbalmer*** bug-libtool@gnu.org 29293eed67faSmbalmer 2930dc407927Smrg_LT_EOF 29313eed67faSmbalmer fi ;; 29323eed67faSmbalmer esac 29333eed67faSmbalmer fi 29343eed67faSmbalmer break 29353eed67faSmbalmer fi 29363eed67faSmbalmer done 29373eed67faSmbalmer IFS="$lt_save_ifs" 29383eed67faSmbalmer MAGIC_CMD="$lt_save_MAGIC_CMD" 29393eed67faSmbalmer ;; 29403eed67faSmbalmeresac]) 29413eed67faSmbalmerMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29423eed67faSmbalmerif test -n "$MAGIC_CMD"; then 29433eed67faSmbalmer AC_MSG_RESULT($MAGIC_CMD) 29443eed67faSmbalmerelse 29453eed67faSmbalmer AC_MSG_RESULT(no) 29463eed67faSmbalmerfi 2947dc407927Smrg_LT_DECL([], [MAGIC_CMD], [0], 2948dc407927Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2949dc407927Smrg])# _LT_PATH_TOOL_PREFIX 29503eed67faSmbalmer 2951dc407927Smrg# Old name: 2952dc407927SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2953dc407927Smrgdnl aclocal-1.4 backwards compatibility: 2954dc407927Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 29553eed67faSmbalmer 2956dc407927Smrg 2957dc407927Smrg# _LT_PATH_MAGIC 2958dc407927Smrg# -------------- 29593eed67faSmbalmer# find a file program which can recognize a shared library 2960dc407927Smrgm4_defun([_LT_PATH_MAGIC], 2961dc407927Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 29623eed67faSmbalmerif test -z "$lt_cv_path_MAGIC_CMD"; then 29633eed67faSmbalmer if test -n "$ac_tool_prefix"; then 2964dc407927Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 29653eed67faSmbalmer else 29663eed67faSmbalmer MAGIC_CMD=: 29673eed67faSmbalmer fi 29683eed67faSmbalmerfi 2969dc407927Smrg])# _LT_PATH_MAGIC 29703eed67faSmbalmer 29713eed67faSmbalmer 2972dc407927Smrg# LT_PATH_LD 29733eed67faSmbalmer# ---------- 29743eed67faSmbalmer# find the pathname to the GNU or non-GNU linker 2975dc407927SmrgAC_DEFUN([LT_PATH_LD], 2976dc407927Smrg[AC_REQUIRE([AC_PROG_CC])dnl 29773eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_HOST])dnl 29783eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2979dc407927Smrgm4_require([_LT_DECL_SED])dnl 2980dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 2981dd0822caSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2982dc407927Smrg 2983dc407927SmrgAC_ARG_WITH([gnu-ld], 2984dc407927Smrg [AS_HELP_STRING([--with-gnu-ld], 2985dc407927Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2986dc407927Smrg [test "$withval" = no || with_gnu_ld=yes], 2987dc407927Smrg [with_gnu_ld=no])dnl 2988dc407927Smrg 29893eed67faSmbalmerac_prog=ld 29903eed67faSmbalmerif test "$GCC" = yes; then 29913eed67faSmbalmer # Check if gcc -print-prog-name=ld gives a path. 29923eed67faSmbalmer AC_MSG_CHECKING([for ld used by $CC]) 29933eed67faSmbalmer case $host in 29943eed67faSmbalmer *-*-mingw*) 29953eed67faSmbalmer # gcc leaves a trailing carriage return which upsets mingw 29963eed67faSmbalmer ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 29973eed67faSmbalmer *) 29983eed67faSmbalmer ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 29993eed67faSmbalmer esac 30003eed67faSmbalmer case $ac_prog in 30013eed67faSmbalmer # Accept absolute paths. 30023eed67faSmbalmer [[\\/]]* | ?:[[\\/]]*) 30033eed67faSmbalmer re_direlt='/[[^/]][[^/]]*/\.\./' 30043eed67faSmbalmer # Canonicalize the pathname of ld 3005dc407927Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3006dc407927Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3007dc407927Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30083eed67faSmbalmer done 30093eed67faSmbalmer test -z "$LD" && LD="$ac_prog" 30103eed67faSmbalmer ;; 30113eed67faSmbalmer "") 30123eed67faSmbalmer # If it fails, then pretend we aren't using GCC. 30133eed67faSmbalmer ac_prog=ld 30143eed67faSmbalmer ;; 30153eed67faSmbalmer *) 30163eed67faSmbalmer # If it is relative, then search for the first ld in PATH. 30173eed67faSmbalmer with_gnu_ld=unknown 30183eed67faSmbalmer ;; 30193eed67faSmbalmer esac 30203eed67faSmbalmerelif test "$with_gnu_ld" = yes; then 30213eed67faSmbalmer AC_MSG_CHECKING([for GNU ld]) 30223eed67faSmbalmerelse 30233eed67faSmbalmer AC_MSG_CHECKING([for non-GNU ld]) 30243eed67faSmbalmerfi 30253eed67faSmbalmerAC_CACHE_VAL(lt_cv_path_LD, 30263eed67faSmbalmer[if test -z "$LD"; then 30273eed67faSmbalmer lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30283eed67faSmbalmer for ac_dir in $PATH; do 30293eed67faSmbalmer IFS="$lt_save_ifs" 30303eed67faSmbalmer test -z "$ac_dir" && ac_dir=. 30313eed67faSmbalmer if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 30323eed67faSmbalmer lt_cv_path_LD="$ac_dir/$ac_prog" 30333eed67faSmbalmer # Check to see if the program is GNU ld. I'd rather use --version, 30343eed67faSmbalmer # but apparently some variants of GNU ld only accept -v. 30353eed67faSmbalmer # Break only if it was the GNU/non-GNU ld that we prefer. 30363eed67faSmbalmer case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 30373eed67faSmbalmer *GNU* | *'with BFD'*) 30383eed67faSmbalmer test "$with_gnu_ld" != no && break 30393eed67faSmbalmer ;; 30403eed67faSmbalmer *) 30413eed67faSmbalmer test "$with_gnu_ld" != yes && break 30423eed67faSmbalmer ;; 30433eed67faSmbalmer esac 30443eed67faSmbalmer fi 30453eed67faSmbalmer done 30463eed67faSmbalmer IFS="$lt_save_ifs" 30473eed67faSmbalmerelse 30483eed67faSmbalmer lt_cv_path_LD="$LD" # Let the user override the test with a path. 30493eed67faSmbalmerfi]) 30503eed67faSmbalmerLD="$lt_cv_path_LD" 30513eed67faSmbalmerif test -n "$LD"; then 30523eed67faSmbalmer AC_MSG_RESULT($LD) 30533eed67faSmbalmerelse 30543eed67faSmbalmer AC_MSG_RESULT(no) 30553eed67faSmbalmerfi 30563eed67faSmbalmertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3057dc407927Smrg_LT_PATH_LD_GNU 3058dc407927SmrgAC_SUBST([LD]) 30593eed67faSmbalmer 3060dc407927Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3061dc407927Smrg])# LT_PATH_LD 30623eed67faSmbalmer 3063dc407927Smrg# Old names: 3064dc407927SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3065dc407927SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3066dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3067dc407927Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3068dc407927Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3069dc407927Smrg 3070dc407927Smrg 3071dc407927Smrg# _LT_PATH_LD_GNU 3072dc407927Smrg#- -------------- 3073dc407927Smrgm4_defun([_LT_PATH_LD_GNU], 3074dc407927Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 30753eed67faSmbalmer[# I'd rather use --version here, but apparently some GNU lds only accept -v. 30763eed67faSmbalmercase `$LD -v 2>&1 </dev/null` in 30773eed67faSmbalmer*GNU* | *'with BFD'*) 30783eed67faSmbalmer lt_cv_prog_gnu_ld=yes 30793eed67faSmbalmer ;; 30803eed67faSmbalmer*) 30813eed67faSmbalmer lt_cv_prog_gnu_ld=no 30823eed67faSmbalmer ;; 30833eed67faSmbalmeresac]) 30843eed67faSmbalmerwith_gnu_ld=$lt_cv_prog_gnu_ld 3085dc407927Smrg])# _LT_PATH_LD_GNU 30863eed67faSmbalmer 30873eed67faSmbalmer 3088dc407927Smrg# _LT_CMD_RELOAD 3089dc407927Smrg# -------------- 30903eed67faSmbalmer# find reload flag for linker 30913eed67faSmbalmer# -- PORTME Some linkers may need a different reload flag. 3092dc407927Smrgm4_defun([_LT_CMD_RELOAD], 30933eed67faSmbalmer[AC_CACHE_CHECK([for $LD option to reload object files], 30943eed67faSmbalmer lt_cv_ld_reload_flag, 30953eed67faSmbalmer [lt_cv_ld_reload_flag='-r']) 30963eed67faSmbalmerreload_flag=$lt_cv_ld_reload_flag 30973eed67faSmbalmercase $reload_flag in 30983eed67faSmbalmer"" | " "*) ;; 30993eed67faSmbalmer*) reload_flag=" $reload_flag" ;; 31003eed67faSmbalmeresac 31013eed67faSmbalmerreload_cmds='$LD$reload_flag -o $output$reload_objs' 31023eed67faSmbalmercase $host_os in 3103dd0822caSmrg cygwin* | mingw* | pw32* | cegcc*) 3104dd0822caSmrg if test "$GCC" != yes; then 3105dd0822caSmrg reload_cmds=false 3106dd0822caSmrg fi 3107dd0822caSmrg ;; 31083eed67faSmbalmer darwin*) 31093eed67faSmbalmer if test "$GCC" = yes; then 31103eed67faSmbalmer reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31113eed67faSmbalmer else 31123eed67faSmbalmer reload_cmds='$LD$reload_flag -o $output$reload_objs' 31133eed67faSmbalmer fi 31143eed67faSmbalmer ;; 31153eed67faSmbalmeresac 3116dd0822caSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3117dd0822caSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3118dc407927Smrg])# _LT_CMD_RELOAD 31193eed67faSmbalmer 31203eed67faSmbalmer 3121dc407927Smrg# _LT_CHECK_MAGIC_METHOD 3122dc407927Smrg# ---------------------- 31233eed67faSmbalmer# how to check for library dependencies 31243eed67faSmbalmer# -- PORTME fill in with the dynamic library characteristics 3125dc407927Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3126dc407927Smrg[m4_require([_LT_DECL_EGREP]) 3127dc407927Smrgm4_require([_LT_DECL_OBJDUMP]) 3128dc407927SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31293eed67faSmbalmerlt_cv_deplibs_check_method, 31303eed67faSmbalmer[lt_cv_file_magic_cmd='$MAGIC_CMD' 31313eed67faSmbalmerlt_cv_file_magic_test_file= 31323eed67faSmbalmerlt_cv_deplibs_check_method='unknown' 31333eed67faSmbalmer# Need to set the preceding variable on all platforms that support 31343eed67faSmbalmer# interlibrary dependencies. 31353eed67faSmbalmer# 'none' -- dependencies not supported. 31363eed67faSmbalmer# `unknown' -- same as none, but documents that we really don't know. 31373eed67faSmbalmer# 'pass_all' -- all dependencies passed with no checks. 31383eed67faSmbalmer# 'test_compile' -- check by making test program. 31393eed67faSmbalmer# 'file_magic [[regex]]' -- check by looking for files in library path 31403eed67faSmbalmer# which responds to the $file_magic_cmd with a given extended regex. 31413eed67faSmbalmer# If you have `file' or equivalent on your system and you're not sure 31423eed67faSmbalmer# whether `pass_all' will *always* work, you probably want this one. 31433eed67faSmbalmer 31443eed67faSmbalmercase $host_os in 31453eed67faSmbalmeraix[[4-9]]*) 31463eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 31473eed67faSmbalmer ;; 31483eed67faSmbalmer 31493eed67faSmbalmerbeos*) 31503eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 31513eed67faSmbalmer ;; 31523eed67faSmbalmer 31533eed67faSmbalmerbsdi[[45]]*) 31543eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 31553eed67faSmbalmer lt_cv_file_magic_cmd='/usr/bin/file -L' 31563eed67faSmbalmer lt_cv_file_magic_test_file=/shlib/libc.so 31573eed67faSmbalmer ;; 31583eed67faSmbalmer 31593eed67faSmbalmercygwin*) 31603eed67faSmbalmer # func_win32_libid is a shell function defined in ltmain.sh 31613eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 31623eed67faSmbalmer lt_cv_file_magic_cmd='func_win32_libid' 31633eed67faSmbalmer ;; 31643eed67faSmbalmer 31653eed67faSmbalmermingw* | pw32*) 31663eed67faSmbalmer # Base MSYS/MinGW do not provide the 'file' command needed by 31673eed67faSmbalmer # func_win32_libid shell function, so use a weaker test based on 'objdump', 31683eed67faSmbalmer # unless we find 'file', for example because we are cross-compiling. 3169dd0822caSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3170dd0822caSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 31713eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 31723eed67faSmbalmer lt_cv_file_magic_cmd='func_win32_libid' 31733eed67faSmbalmer else 3174dd0822caSmrg # Keep this pattern in sync with the one in func_win32_libid. 3175dd0822caSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 31763eed67faSmbalmer lt_cv_file_magic_cmd='$OBJDUMP -f' 31773eed67faSmbalmer fi 31783eed67faSmbalmer ;; 31793eed67faSmbalmer 3180dd0822caSmrgcegcc*) 3181dc407927Smrg # use the weaker test based on 'objdump'. See mingw*. 3182dc407927Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3183dc407927Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3184dc407927Smrg ;; 3185dc407927Smrg 31863eed67faSmbalmerdarwin* | rhapsody*) 31873eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 31883eed67faSmbalmer ;; 31893eed67faSmbalmer 31903eed67faSmbalmerfreebsd* | dragonfly*) 3191dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 31923eed67faSmbalmer case $host_cpu in 31933eed67faSmbalmer i*86 ) 31943eed67faSmbalmer # Not sure whether the presence of OpenBSD here was a mistake. 31953eed67faSmbalmer # Let's accept both of them until this is cleared up. 31963eed67faSmbalmer lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 31973eed67faSmbalmer lt_cv_file_magic_cmd=/usr/bin/file 31983eed67faSmbalmer lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 31993eed67faSmbalmer ;; 32003eed67faSmbalmer esac 32013eed67faSmbalmer else 32023eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32033eed67faSmbalmer fi 32043eed67faSmbalmer ;; 32053eed67faSmbalmer 32063eed67faSmbalmergnu*) 32073eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32083eed67faSmbalmer ;; 32093eed67faSmbalmer 3210dd0822caSmrghaiku*) 3211dd0822caSmrg lt_cv_deplibs_check_method=pass_all 3212dd0822caSmrg ;; 3213dd0822caSmrg 32143eed67faSmbalmerhpux10.20* | hpux11*) 32153eed67faSmbalmer lt_cv_file_magic_cmd=/usr/bin/file 32163eed67faSmbalmer case $host_cpu in 32173eed67faSmbalmer ia64*) 32183eed67faSmbalmer lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32193eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32203eed67faSmbalmer ;; 32213eed67faSmbalmer hppa*64*) 3222dd0822caSmrg [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]'] 32233eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32243eed67faSmbalmer ;; 32253eed67faSmbalmer *) 3226dd0822caSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32273eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/libc.sl 32283eed67faSmbalmer ;; 32293eed67faSmbalmer esac 32303eed67faSmbalmer ;; 32313eed67faSmbalmer 32323eed67faSmbalmerinterix[[3-9]]*) 32333eed67faSmbalmer # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32343eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 32353eed67faSmbalmer ;; 32363eed67faSmbalmer 32373eed67faSmbalmeririx5* | irix6* | nonstopux*) 32383eed67faSmbalmer case $LD in 32393eed67faSmbalmer *-32|*"-32 ") libmagic=32-bit;; 32403eed67faSmbalmer *-n32|*"-n32 ") libmagic=N32;; 32413eed67faSmbalmer *-64|*"-64 ") libmagic=64-bit;; 32423eed67faSmbalmer *) libmagic=never-match;; 32433eed67faSmbalmer esac 32443eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32453eed67faSmbalmer ;; 32463eed67faSmbalmer 32473eed67faSmbalmer# This must be Linux ELF. 3248dd0822caSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 32493eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32503eed67faSmbalmer ;; 32513eed67faSmbalmer 32523eed67faSmbalmernetbsd*) 3253dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32543eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 32553eed67faSmbalmer else 32563eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 32573eed67faSmbalmer fi 32583eed67faSmbalmer ;; 32593eed67faSmbalmer 32603eed67faSmbalmernewos6*) 32613eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 32623eed67faSmbalmer lt_cv_file_magic_cmd=/usr/bin/file 32633eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/libnls.so 32643eed67faSmbalmer ;; 32653eed67faSmbalmer 3266dc407927Smrg*nto* | *qnx*) 3267dc407927Smrg lt_cv_deplibs_check_method=pass_all 32683eed67faSmbalmer ;; 32693eed67faSmbalmer 32703eed67faSmbalmeropenbsd*) 3271dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 32723eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 32733eed67faSmbalmer else 32743eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 32753eed67faSmbalmer fi 32763eed67faSmbalmer ;; 32773eed67faSmbalmer 32783eed67faSmbalmerosf3* | osf4* | osf5*) 32793eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32803eed67faSmbalmer ;; 32813eed67faSmbalmer 32823eed67faSmbalmerrdos*) 32833eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32843eed67faSmbalmer ;; 32853eed67faSmbalmer 32863eed67faSmbalmersolaris*) 32873eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32883eed67faSmbalmer ;; 32893eed67faSmbalmer 3290dc407927Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3291dc407927Smrg lt_cv_deplibs_check_method=pass_all 3292dc407927Smrg ;; 3293dc407927Smrg 32943eed67faSmbalmersysv4 | sysv4.3*) 32953eed67faSmbalmer case $host_vendor in 32963eed67faSmbalmer motorola) 32973eed67faSmbalmer 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]]' 32983eed67faSmbalmer lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 32993eed67faSmbalmer ;; 33003eed67faSmbalmer ncr) 33013eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33023eed67faSmbalmer ;; 33033eed67faSmbalmer sequent) 33043eed67faSmbalmer lt_cv_file_magic_cmd='/bin/file' 33053eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33063eed67faSmbalmer ;; 33073eed67faSmbalmer sni) 33083eed67faSmbalmer lt_cv_file_magic_cmd='/bin/file' 33093eed67faSmbalmer lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33103eed67faSmbalmer lt_cv_file_magic_test_file=/lib/libc.so 33113eed67faSmbalmer ;; 33123eed67faSmbalmer siemens) 33133eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33143eed67faSmbalmer ;; 33153eed67faSmbalmer pc) 33163eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33173eed67faSmbalmer ;; 33183eed67faSmbalmer esac 33193eed67faSmbalmer ;; 33203eed67faSmbalmer 3321dc407927Smrgtpf*) 33223eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33233eed67faSmbalmer ;; 33243eed67faSmbalmeresac 33253eed67faSmbalmer]) 3326dd0822caSmrg 3327dd0822caSmrgfile_magic_glob= 3328dd0822caSmrgwant_nocaseglob=no 3329dd0822caSmrgif test "$build" = "$host"; then 3330dd0822caSmrg case $host_os in 3331dd0822caSmrg mingw* | pw32*) 3332dd0822caSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3333dd0822caSmrg want_nocaseglob=yes 3334dd0822caSmrg else 3335dd0822caSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3336dd0822caSmrg fi 3337dd0822caSmrg ;; 3338dd0822caSmrg esac 3339dd0822caSmrgfi 3340dd0822caSmrg 33413eed67faSmbalmerfile_magic_cmd=$lt_cv_file_magic_cmd 33423eed67faSmbalmerdeplibs_check_method=$lt_cv_deplibs_check_method 33433eed67faSmbalmertest -z "$deplibs_check_method" && deplibs_check_method=unknown 33443eed67faSmbalmer 3345dc407927Smrg_LT_DECL([], [deplibs_check_method], [1], 3346dc407927Smrg [Method to check whether dependent libraries are shared objects]) 3347dc407927Smrg_LT_DECL([], [file_magic_cmd], [1], 3348dd0822caSmrg [Command to use when deplibs_check_method = "file_magic"]) 3349dd0822caSmrg_LT_DECL([], [file_magic_glob], [1], 3350dd0822caSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3351dd0822caSmrg_LT_DECL([], [want_nocaseglob], [1], 3352dd0822caSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3353dc407927Smrg])# _LT_CHECK_MAGIC_METHOD 33543eed67faSmbalmer 3355dc407927Smrg 3356dc407927Smrg# LT_PATH_NM 33573eed67faSmbalmer# ---------- 3358dc407927Smrg# find the pathname to a BSD- or MS-compatible name lister 3359dc407927SmrgAC_DEFUN([LT_PATH_NM], 3360dc407927Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3361dc407927SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 33623eed67faSmbalmer[if test -n "$NM"; then 33633eed67faSmbalmer # Let the user override the test. 33643eed67faSmbalmer lt_cv_path_NM="$NM" 33653eed67faSmbalmerelse 33663eed67faSmbalmer lt_nm_to_check="${ac_tool_prefix}nm" 33673eed67faSmbalmer if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 33683eed67faSmbalmer lt_nm_to_check="$lt_nm_to_check nm" 33693eed67faSmbalmer fi 33703eed67faSmbalmer for lt_tmp_nm in $lt_nm_to_check; do 33713eed67faSmbalmer lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 33723eed67faSmbalmer for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 33733eed67faSmbalmer IFS="$lt_save_ifs" 33743eed67faSmbalmer test -z "$ac_dir" && ac_dir=. 33753eed67faSmbalmer tmp_nm="$ac_dir/$lt_tmp_nm" 33763eed67faSmbalmer if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 33773eed67faSmbalmer # Check to see if the nm accepts a BSD-compat flag. 33783eed67faSmbalmer # Adding the `sed 1q' prevents false positives on HP-UX, which says: 33793eed67faSmbalmer # nm: unknown option "B" ignored 33803eed67faSmbalmer # Tru64's nm complains that /dev/null is an invalid object file 33813eed67faSmbalmer case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 33823eed67faSmbalmer */dev/null* | *'Invalid file or object type'*) 33833eed67faSmbalmer lt_cv_path_NM="$tmp_nm -B" 33843eed67faSmbalmer break 33853eed67faSmbalmer ;; 33863eed67faSmbalmer *) 33873eed67faSmbalmer case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 33883eed67faSmbalmer */dev/null*) 33893eed67faSmbalmer lt_cv_path_NM="$tmp_nm -p" 33903eed67faSmbalmer break 33913eed67faSmbalmer ;; 33923eed67faSmbalmer *) 33933eed67faSmbalmer lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 33943eed67faSmbalmer continue # so that we can try to find one that supports BSD flags 33953eed67faSmbalmer ;; 33963eed67faSmbalmer esac 33973eed67faSmbalmer ;; 33983eed67faSmbalmer esac 33993eed67faSmbalmer fi 34003eed67faSmbalmer done 34013eed67faSmbalmer IFS="$lt_save_ifs" 34023eed67faSmbalmer done 3403dc407927Smrg : ${lt_cv_path_NM=no} 34043eed67faSmbalmerfi]) 3405dc407927Smrgif test "$lt_cv_path_NM" != "no"; then 3406dc407927Smrg NM="$lt_cv_path_NM" 3407dc407927Smrgelse 3408dc407927Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3409dd0822caSmrg if test -n "$DUMPBIN"; then : 3410dd0822caSmrg # Let the user override the test. 3411dd0822caSmrg else 3412dd0822caSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3413dd0822caSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3414dd0822caSmrg *COFF*) 3415dd0822caSmrg DUMPBIN="$DUMPBIN -symbols" 3416dd0822caSmrg ;; 3417dd0822caSmrg *) 3418dd0822caSmrg DUMPBIN=: 3419dd0822caSmrg ;; 3420dd0822caSmrg esac 3421dd0822caSmrg fi 3422dc407927Smrg AC_SUBST([DUMPBIN]) 3423dc407927Smrg if test "$DUMPBIN" != ":"; then 3424dc407927Smrg NM="$DUMPBIN" 3425dc407927Smrg fi 3426dc407927Smrgfi 3427dc407927Smrgtest -z "$NM" && NM=nm 3428dc407927SmrgAC_SUBST([NM]) 3429dc407927Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3430dc407927Smrg 3431dc407927SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3432dc407927Smrg [lt_cv_nm_interface="BSD nm" 3433dc407927Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3434dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3435dc407927Smrg (eval "$ac_compile" 2>conftest.err) 3436dc407927Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3437dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3438dc407927Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3439dc407927Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3440dd0822caSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3441dc407927Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3442dc407927Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3443dc407927Smrg lt_cv_nm_interface="MS dumpbin" 3444dc407927Smrg fi 3445dc407927Smrg rm -f conftest*]) 3446dc407927Smrg])# LT_PATH_NM 34473eed67faSmbalmer 3448dc407927Smrg# Old names: 3449dc407927SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3450dc407927SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3451dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3452dc407927Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3453dc407927Smrgdnl AC_DEFUN([AC_PROG_NM], []) 34543eed67faSmbalmer 3455dd0822caSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3456dd0822caSmrg# -------------------------------- 3457dd0822caSmrg# how to determine the name of the shared library 3458dd0822caSmrg# associated with a specific link library. 3459dd0822caSmrg# -- PORTME fill in with the dynamic library characteristics 3460dd0822caSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3461dd0822caSmrg[m4_require([_LT_DECL_EGREP]) 3462dd0822caSmrgm4_require([_LT_DECL_OBJDUMP]) 3463dd0822caSmrgm4_require([_LT_DECL_DLLTOOL]) 3464dd0822caSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3465dd0822caSmrglt_cv_sharedlib_from_linklib_cmd, 3466dd0822caSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3467dd0822caSmrg 3468dd0822caSmrgcase $host_os in 3469dd0822caSmrgcygwin* | mingw* | pw32* | cegcc*) 3470dd0822caSmrg # two different shell functions defined in ltmain.sh 3471dd0822caSmrg # decide which to use based on capabilities of $DLLTOOL 3472dd0822caSmrg case `$DLLTOOL --help 2>&1` in 3473dd0822caSmrg *--identify-strict*) 3474dd0822caSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3475dd0822caSmrg ;; 3476dd0822caSmrg *) 3477dd0822caSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3478dd0822caSmrg ;; 3479dd0822caSmrg esac 3480dd0822caSmrg ;; 3481dd0822caSmrg*) 3482dd0822caSmrg # fallback: assume linklib IS sharedlib 3483dd0822caSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3484dd0822caSmrg ;; 3485dd0822caSmrgesac 3486dd0822caSmrg]) 3487dd0822caSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3488dd0822caSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3489dd0822caSmrg 3490dd0822caSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3491dd0822caSmrg [Command to associate shared and link libraries]) 3492dd0822caSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3493dd0822caSmrg 3494dd0822caSmrg 3495dd0822caSmrg# _LT_PATH_MANIFEST_TOOL 3496dd0822caSmrg# ---------------------- 3497dd0822caSmrg# locate the manifest tool 3498dd0822caSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3499dd0822caSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3500dd0822caSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3501dd0822caSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3502dd0822caSmrg [lt_cv_path_mainfest_tool=no 3503dd0822caSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3504dd0822caSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3505dd0822caSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3506dd0822caSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3507dd0822caSmrg lt_cv_path_mainfest_tool=yes 3508dd0822caSmrg fi 3509dd0822caSmrg rm -f conftest*]) 3510dd0822caSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3511dd0822caSmrg MANIFEST_TOOL=: 3512dd0822caSmrgfi 3513dd0822caSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3514dd0822caSmrg])# _LT_PATH_MANIFEST_TOOL 3515dd0822caSmrg 3516dc407927Smrg 3517dc407927Smrg# LT_LIB_M 3518dc407927Smrg# -------- 35193eed67faSmbalmer# check for math library 3520dc407927SmrgAC_DEFUN([LT_LIB_M], 35213eed67faSmbalmer[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35223eed67faSmbalmerLIBM= 35233eed67faSmbalmercase $host in 3524dd0822caSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35253eed67faSmbalmer # These system don't have libm, or don't need it 35263eed67faSmbalmer ;; 35273eed67faSmbalmer*-ncr-sysv4.3*) 35283eed67faSmbalmer AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35293eed67faSmbalmer AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35303eed67faSmbalmer ;; 35313eed67faSmbalmer*) 35323eed67faSmbalmer AC_CHECK_LIB(m, cos, LIBM="-lm") 35333eed67faSmbalmer ;; 35343eed67faSmbalmeresac 3535dc407927SmrgAC_SUBST([LIBM]) 3536dc407927Smrg])# LT_LIB_M 35373eed67faSmbalmer 3538dc407927Smrg# Old name: 3539dc407927SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3540dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3541dc407927Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 35423eed67faSmbalmer 35433eed67faSmbalmer 3544dc407927Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3545dc407927Smrg# ------------------------------- 3546dc407927Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3547dc407927Smrg[m4_require([_LT_TAG_COMPILER])dnl 35483eed67faSmbalmer 3549dc407927Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 35503eed67faSmbalmer 3551dc407927Smrgif test "$GCC" = yes; then 3552dd0822caSmrg case $cc_basename in 3553dd0822caSmrg nvcc*) 3554dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3555dd0822caSmrg *) 3556dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3557dd0822caSmrg esac 35583eed67faSmbalmer 3559dc407927Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3560dc407927Smrg lt_cv_prog_compiler_rtti_exceptions, 3561dc407927Smrg [-fno-rtti -fno-exceptions], [], 3562dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3563dc407927Smrgfi 3564dc407927Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3565dc407927Smrg [Compiler flag to turn off builtin functions]) 3566dc407927Smrg])# _LT_COMPILER_NO_RTTI 35673eed67faSmbalmer 35683eed67faSmbalmer 3569dc407927Smrg# _LT_CMD_GLOBAL_SYMBOLS 3570dc407927Smrg# ---------------------- 3571dc407927Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3572dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3573dc407927SmrgAC_REQUIRE([AC_PROG_CC])dnl 3574dd0822caSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3575dc407927SmrgAC_REQUIRE([LT_PATH_NM])dnl 3576dc407927SmrgAC_REQUIRE([LT_PATH_LD])dnl 3577dc407927Smrgm4_require([_LT_DECL_SED])dnl 3578dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 3579dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 35803eed67faSmbalmer 3581dc407927Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3582dc407927SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3583dc407927SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 35843eed67faSmbalmer[ 3585dc407927Smrg# These are sane defaults that work on at least a few old systems. 3586dc407927Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 35873eed67faSmbalmer 3588dc407927Smrg# Character class describing NM global symbol codes. 3589dc407927Smrgsymcode='[[BCDEGRST]]' 35903eed67faSmbalmer 3591dc407927Smrg# Regexp to match symbols that can be accessed directly from C. 3592dc407927Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 35933eed67faSmbalmer 3594dc407927Smrg# Define system-specific variables. 3595dc407927Smrgcase $host_os in 3596dc407927Smrgaix*) 3597dc407927Smrg symcode='[[BCDT]]' 3598dc407927Smrg ;; 3599dc407927Smrgcygwin* | mingw* | pw32* | cegcc*) 3600dc407927Smrg symcode='[[ABCDGISTW]]' 3601dc407927Smrg ;; 3602dc407927Smrghpux*) 3603dc407927Smrg if test "$host_cpu" = ia64; then 3604dc407927Smrg symcode='[[ABCDEGRST]]' 3605dc407927Smrg fi 3606dc407927Smrg ;; 3607dc407927Smrgirix* | nonstopux*) 3608dc407927Smrg symcode='[[BCDEGRST]]' 3609dc407927Smrg ;; 3610dc407927Smrgosf*) 3611dc407927Smrg symcode='[[BCDEGQRST]]' 3612dc407927Smrg ;; 3613dc407927Smrgsolaris*) 3614dc407927Smrg symcode='[[BDRT]]' 3615dc407927Smrg ;; 3616dc407927Smrgsco3.2v5*) 3617dc407927Smrg symcode='[[DT]]' 3618dc407927Smrg ;; 3619dc407927Smrgsysv4.2uw2*) 3620dc407927Smrg symcode='[[DT]]' 3621dc407927Smrg ;; 3622dc407927Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3623dc407927Smrg symcode='[[ABDT]]' 3624dc407927Smrg ;; 3625dc407927Smrgsysv4) 3626dc407927Smrg symcode='[[DFNSTU]]' 3627dc407927Smrg ;; 3628dc407927Smrgesac 36293eed67faSmbalmer 3630dc407927Smrg# If we're using GNU nm, then use its standard symbol codes. 3631dc407927Smrgcase `$NM -V 2>&1` in 3632dc407927Smrg*GNU* | *'with BFD'*) 3633dc407927Smrg symcode='[[ABCDGIRSTW]]' ;; 3634dc407927Smrgesac 36353eed67faSmbalmer 3636dc407927Smrg# Transform an extracted symbol line into a proper C declaration. 3637dc407927Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3638dc407927Smrg# so use this general approach. 3639dc407927Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 36403eed67faSmbalmer 3641dc407927Smrg# Transform an extracted symbol line into symbol name and symbol address 3642dd0822caSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3643dd0822caSmrglt_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'" 36443eed67faSmbalmer 3645dc407927Smrg# Handle CRLF in mingw tool chain 3646dc407927Smrgopt_cr= 3647dc407927Smrgcase $build_os in 3648dc407927Smrgmingw*) 3649dc407927Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3650dc407927Smrg ;; 3651dc407927Smrgesac 36523eed67faSmbalmer 3653dc407927Smrg# Try without a prefix underscore, then with it. 3654dc407927Smrgfor ac_symprfx in "" "_"; do 36553eed67faSmbalmer 3656dc407927Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3657dc407927Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 36583eed67faSmbalmer 3659dc407927Smrg # Write the raw and C identifiers. 3660dc407927Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3661dc407927Smrg # Fake it for dumpbin and say T for any non-static function 3662dc407927Smrg # and D for any global variable. 3663dc407927Smrg # Also find C++ and __fastcall symbols from MSVC++, 3664dc407927Smrg # which start with @ or ?. 3665dc407927Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3666dc407927Smrg" {last_section=section; section=\$ 3};"\ 3667dc407927Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3668dc407927Smrg" \$ 0!~/External *\|/{next};"\ 3669dc407927Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3670dc407927Smrg" {if(hide[section]) next};"\ 3671dc407927Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3672dc407927Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3673dc407927Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3674dc407927Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3675dc407927Smrg" ' prfx=^$ac_symprfx]" 3676dc407927Smrg else 3677dc407927Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 36783eed67faSmbalmer fi 3679dd0822caSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 36803eed67faSmbalmer 3681dc407927Smrg # Check to see that the pipe works correctly. 3682dc407927Smrg pipe_works=no 36833eed67faSmbalmer 3684dc407927Smrg rm -f conftest* 3685dc407927Smrg cat > conftest.$ac_ext <<_LT_EOF 3686dc407927Smrg#ifdef __cplusplus 3687dc407927Smrgextern "C" { 3688dc407927Smrg#endif 3689dc407927Smrgchar nm_test_var; 3690dc407927Smrgvoid nm_test_func(void); 3691dc407927Smrgvoid nm_test_func(void){} 3692dc407927Smrg#ifdef __cplusplus 3693dc407927Smrg} 3694dc407927Smrg#endif 3695dc407927Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3696dc407927Smrg_LT_EOF 36973eed67faSmbalmer 3698dc407927Smrg if AC_TRY_EVAL(ac_compile); then 3699dc407927Smrg # Now try to grab the symbols. 3700dc407927Smrg nlist=conftest.nm 3701dd0822caSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3702dc407927Smrg # Try sorting and uniquifying the output. 3703dc407927Smrg if sort "$nlist" | uniq > "$nlist"T; then 3704dc407927Smrg mv -f "$nlist"T "$nlist" 3705dc407927Smrg else 3706dc407927Smrg rm -f "$nlist"T 3707dc407927Smrg fi 37083eed67faSmbalmer 3709dc407927Smrg # Make sure that we snagged all the symbols we need. 3710dc407927Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3711dc407927Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3712dc407927Smrg cat <<_LT_EOF > conftest.$ac_ext 3713dd0822caSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3714dd0822caSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3715dd0822caSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3716dd0822caSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3717dd0822caSmrg# define LT@&t@_DLSYM_CONST 3718dd0822caSmrg#elif defined(__osf__) 3719dd0822caSmrg/* This system does not cope well with relocations in const data. */ 3720dd0822caSmrg# define LT@&t@_DLSYM_CONST 3721dd0822caSmrg#else 3722dd0822caSmrg# define LT@&t@_DLSYM_CONST const 3723dd0822caSmrg#endif 3724dd0822caSmrg 3725dc407927Smrg#ifdef __cplusplus 3726dc407927Smrgextern "C" { 3727dc407927Smrg#endif 37283eed67faSmbalmer 3729dc407927Smrg_LT_EOF 3730dc407927Smrg # Now generate the symbol file. 3731dc407927Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37323eed67faSmbalmer 3733dc407927Smrg cat <<_LT_EOF >> conftest.$ac_ext 37343eed67faSmbalmer 3735dc407927Smrg/* The mapping between symbol names and symbols. */ 3736dd0822caSmrgLT@&t@_DLSYM_CONST struct { 3737dc407927Smrg const char *name; 3738dc407927Smrg void *address; 3739dc407927Smrg} 3740dc407927Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3741dc407927Smrg{ 3742dc407927Smrg { "@PROGRAM@", (void *) 0 }, 3743dc407927Smrg_LT_EOF 3744dc407927Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3745dc407927Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3746dc407927Smrg {0, (void *) 0} 3747dc407927Smrg}; 37483eed67faSmbalmer 3749dc407927Smrg/* This works around a problem in FreeBSD linker */ 3750dc407927Smrg#ifdef FREEBSD_WORKAROUND 3751dc407927Smrgstatic const void *lt_preloaded_setup() { 3752dc407927Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3753dc407927Smrg} 3754dc407927Smrg#endif 37553eed67faSmbalmer 3756dc407927Smrg#ifdef __cplusplus 3757dc407927Smrg} 3758dc407927Smrg#endif 3759dc407927Smrg_LT_EOF 3760dc407927Smrg # Now try linking the two files. 3761dc407927Smrg mv conftest.$ac_objext conftstm.$ac_objext 3762dd0822caSmrg lt_globsym_save_LIBS=$LIBS 3763dd0822caSmrg lt_globsym_save_CFLAGS=$CFLAGS 3764dc407927Smrg LIBS="conftstm.$ac_objext" 3765dc407927Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3766dc407927Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3767dc407927Smrg pipe_works=yes 3768dc407927Smrg fi 3769dd0822caSmrg LIBS=$lt_globsym_save_LIBS 3770dd0822caSmrg CFLAGS=$lt_globsym_save_CFLAGS 3771dc407927Smrg else 3772dc407927Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3773dc407927Smrg fi 3774dc407927Smrg else 3775dc407927Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3776dc407927Smrg fi 37773eed67faSmbalmer else 3778dc407927Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 37793eed67faSmbalmer fi 37803eed67faSmbalmer else 3781dc407927Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3782dc407927Smrg cat conftest.$ac_ext >&5 37833eed67faSmbalmer fi 3784dc407927Smrg rm -rf conftest* conftst* 37853eed67faSmbalmer 3786dc407927Smrg # Do not use the global_symbol_pipe unless it works. 3787dc407927Smrg if test "$pipe_works" = yes; then 3788dc407927Smrg break 3789dc407927Smrg else 3790dc407927Smrg lt_cv_sys_global_symbol_pipe= 3791dc407927Smrg fi 3792dc407927Smrgdone 3793dc407927Smrg]) 3794dc407927Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3795dc407927Smrg lt_cv_sys_global_symbol_to_cdecl= 3796dc407927Smrgfi 3797dc407927Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3798dc407927Smrg AC_MSG_RESULT(failed) 37993eed67faSmbalmerelse 3800dc407927Smrg AC_MSG_RESULT(ok) 38013eed67faSmbalmerfi 38023eed67faSmbalmer 3803dd0822caSmrg# Response file support. 3804dd0822caSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3805dd0822caSmrg nm_file_list_spec='@' 3806dd0822caSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3807dd0822caSmrg nm_file_list_spec='@' 3808dd0822caSmrgfi 3809dd0822caSmrg 3810dc407927Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3811dc407927Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3812dc407927Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3813dc407927Smrg [Transform the output of nm in a proper C declaration]) 3814dc407927Smrg_LT_DECL([global_symbol_to_c_name_address], 3815dc407927Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3816dc407927Smrg [Transform the output of nm in a C name address pair]) 3817dc407927Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3818dc407927Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3819dc407927Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3820dd0822caSmrg_LT_DECL([], [nm_file_list_spec], [1], 3821dd0822caSmrg [Specify filename containing input files for $NM]) 3822dc407927Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 38233eed67faSmbalmer 38243eed67faSmbalmer 3825dc407927Smrg# _LT_COMPILER_PIC([TAGNAME]) 3826dc407927Smrg# --------------------------- 3827dc407927Smrgm4_defun([_LT_COMPILER_PIC], 3828dc407927Smrg[m4_require([_LT_TAG_COMPILER])dnl 3829dc407927Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3830dc407927Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3831dc407927Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 38323eed67faSmbalmer 3833dc407927Smrgm4_if([$1], [CXX], [ 3834dc407927Smrg # C++ specific cases for pic, static, wl, etc. 3835dc407927Smrg if test "$GXX" = yes; then 3836dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3837dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38383eed67faSmbalmer 3839dc407927Smrg case $host_os in 3840dc407927Smrg aix*) 3841dc407927Smrg # All AIX code is PIC. 38423eed67faSmbalmer if test "$host_cpu" = ia64; then 3843dc407927Smrg # AIX 5 now supports IA64 processor 3844dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38453eed67faSmbalmer fi 38463eed67faSmbalmer ;; 38473eed67faSmbalmer 3848dc407927Smrg amigaos*) 38493eed67faSmbalmer case $host_cpu in 3850dc407927Smrg powerpc) 3851dc407927Smrg # see comment about AmigaOS4 .so support 3852dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3853dc407927Smrg ;; 3854dc407927Smrg m68k) 3855dc407927Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3856dc407927Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3857dc407927Smrg # like `-m68040'. 3858dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 38593eed67faSmbalmer ;; 38603eed67faSmbalmer esac 38613eed67faSmbalmer ;; 38623eed67faSmbalmer 3863dc407927Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3864dc407927Smrg # PIC is the default for these OSes. 3865dc407927Smrg ;; 3866dc407927Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3867dc407927Smrg # This hack is so that the source file can tell whether it is being 3868dc407927Smrg # built for inclusion in a dll (and should export symbols for example). 3869dc407927Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3870dc407927Smrg # (--disable-auto-import) libraries 3871dc407927Smrg m4_if([$1], [GCJ], [], 3872dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3873dc407927Smrg ;; 3874dc407927Smrg darwin* | rhapsody*) 3875dc407927Smrg # PIC is the default on this platform 3876dc407927Smrg # Common symbols not allowed in MH_DYLIB files 3877dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3878dc407927Smrg ;; 3879dc407927Smrg *djgpp*) 3880dc407927Smrg # DJGPP does not support shared libraries at all 3881dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3882dc407927Smrg ;; 3883dd0822caSmrg haiku*) 3884dd0822caSmrg # PIC is the default for Haiku. 3885dd0822caSmrg # The "-static" flag exists, but is broken. 3886dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3887dd0822caSmrg ;; 3888dc407927Smrg interix[[3-9]]*) 3889dc407927Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3890dc407927Smrg # Instead, we relocate shared libraries at runtime. 3891dc407927Smrg ;; 3892dc407927Smrg sysv4*MP*) 3893dc407927Smrg if test -d /usr/nec; then 3894dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3895dc407927Smrg fi 3896dc407927Smrg ;; 3897dc407927Smrg hpux*) 3898dc407927Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3899dc407927Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3900dc407927Smrg # sets the default TLS model and affects inlining. 3901dc407927Smrg case $host_cpu in 3902dc407927Smrg hppa*64*) 39033eed67faSmbalmer ;; 39043eed67faSmbalmer *) 3905dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39063eed67faSmbalmer ;; 3907dc407927Smrg esac 3908dc407927Smrg ;; 3909dc407927Smrg *qnx* | *nto*) 3910dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3911dc407927Smrg # it will coredump. 3912dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3913dc407927Smrg ;; 3914dc407927Smrg *) 3915dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3916dc407927Smrg ;; 39173eed67faSmbalmer esac 3918dc407927Smrg else 3919dc407927Smrg case $host_os in 3920dc407927Smrg aix[[4-9]]*) 3921dc407927Smrg # All AIX code is PIC. 3922dc407927Smrg if test "$host_cpu" = ia64; then 3923dc407927Smrg # AIX 5 now supports IA64 processor 3924dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3925dc407927Smrg else 3926dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39273eed67faSmbalmer fi 39283eed67faSmbalmer ;; 3929dc407927Smrg chorus*) 3930dc407927Smrg case $cc_basename in 3931dc407927Smrg cxch68*) 3932dc407927Smrg # Green Hills C++ Compiler 3933dc407927Smrg # _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" 39343eed67faSmbalmer ;; 39353eed67faSmbalmer esac 39363eed67faSmbalmer ;; 3937dd0822caSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3938dd0822caSmrg # This hack is so that the source file can tell whether it is being 3939dd0822caSmrg # built for inclusion in a dll (and should export symbols for example). 3940dd0822caSmrg m4_if([$1], [GCJ], [], 3941dd0822caSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3942dd0822caSmrg ;; 3943dc407927Smrg dgux*) 3944dc407927Smrg case $cc_basename in 3945dc407927Smrg ec++*) 3946dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3947dc407927Smrg ;; 3948dc407927Smrg ghcx*) 3949dc407927Smrg # Green Hills C++ Compiler 3950dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3951dc407927Smrg ;; 3952dc407927Smrg *) 3953dc407927Smrg ;; 39543eed67faSmbalmer esac 39553eed67faSmbalmer ;; 3956dc407927Smrg freebsd* | dragonfly*) 3957dc407927Smrg # FreeBSD uses GNU C++ 39583eed67faSmbalmer ;; 3959dc407927Smrg hpux9* | hpux10* | hpux11*) 3960dc407927Smrg case $cc_basename in 3961dc407927Smrg CC*) 3962dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3963dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3964dc407927Smrg if test "$host_cpu" != ia64; then 3965dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3966dc407927Smrg fi 3967dc407927Smrg ;; 3968dc407927Smrg aCC*) 3969dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3970dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3971dc407927Smrg case $host_cpu in 3972dc407927Smrg hppa*64*|ia64*) 3973dc407927Smrg # +Z the default 3974dc407927Smrg ;; 3975dc407927Smrg *) 3976dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3977dc407927Smrg ;; 3978dc407927Smrg esac 3979dc407927Smrg ;; 3980dc407927Smrg *) 3981dc407927Smrg ;; 3982dc407927Smrg esac 39833eed67faSmbalmer ;; 3984dc407927Smrg interix*) 3985dc407927Smrg # This is c89, which is MS Visual C++ (no shared libs) 3986dc407927Smrg # Anyone wants to do a port? 39873eed67faSmbalmer ;; 3988dc407927Smrg irix5* | irix6* | nonstopux*) 3989dc407927Smrg case $cc_basename in 3990dc407927Smrg CC*) 3991dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3992dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3993dc407927Smrg # CC pic flag -KPIC is the default. 3994dc407927Smrg ;; 3995dc407927Smrg *) 3996dc407927Smrg ;; 3997dc407927Smrg esac 39983eed67faSmbalmer ;; 3999dd0822caSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4000dc407927Smrg case $cc_basename in 4001dc407927Smrg KCC*) 4002dc407927Smrg # KAI C++ Compiler 4003dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4004dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4005dc407927Smrg ;; 4006dc407927Smrg ecpc* ) 4007dc407927Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4008dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4009dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4010dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4011dc407927Smrg ;; 4012dc407927Smrg icpc* ) 4013dc407927Smrg # Intel C++, used to be incompatible with GCC. 4014dc407927Smrg # ICC 10 doesn't accept -KPIC any more. 4015dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4017dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4018dc407927Smrg ;; 4019dc407927Smrg pgCC* | pgcpp*) 4020dc407927Smrg # Portland Group C++ compiler 4021dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4023dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4024dc407927Smrg ;; 4025dc407927Smrg cxx*) 4026dc407927Smrg # Compaq C++ 4027dc407927Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4028dc407927Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4029dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4030dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4031dc407927Smrg ;; 4032dd0822caSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4033dd0822caSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4034dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4035dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4036dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4037dc407927Smrg ;; 4038dc407927Smrg *) 4039dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 4040dc407927Smrg *Sun\ C*) 4041dc407927Smrg # Sun C++ 5.9 4042dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4043dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4044dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4045dc407927Smrg ;; 4046dc407927Smrg esac 4047dc407927Smrg ;; 4048dc407927Smrg esac 40493eed67faSmbalmer ;; 4050dc407927Smrg lynxos*) 40513eed67faSmbalmer ;; 4052dc407927Smrg m88k*) 40533eed67faSmbalmer ;; 4054dc407927Smrg mvs*) 4055dc407927Smrg case $cc_basename in 4056dc407927Smrg cxx*) 4057dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4058dc407927Smrg ;; 4059dc407927Smrg *) 4060dc407927Smrg ;; 4061dc407927Smrg esac 40623eed67faSmbalmer ;; 4063dc407927Smrg netbsd*) 40643eed67faSmbalmer ;; 4065dc407927Smrg *qnx* | *nto*) 4066dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4067dc407927Smrg # it will coredump. 4068dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4069dc407927Smrg ;; 4070dc407927Smrg osf3* | osf4* | osf5*) 4071dc407927Smrg case $cc_basename in 4072dc407927Smrg KCC*) 4073dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4074dc407927Smrg ;; 4075dc407927Smrg RCC*) 4076dc407927Smrg # Rational C++ 2.4.1 4077dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4078dc407927Smrg ;; 4079dc407927Smrg cxx*) 4080dc407927Smrg # Digital/Compaq C++ 4081dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4082dc407927Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4083dc407927Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4084dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4085dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4086dc407927Smrg ;; 4087dc407927Smrg *) 4088dc407927Smrg ;; 4089dc407927Smrg esac 40903eed67faSmbalmer ;; 4091dc407927Smrg psos*) 40923eed67faSmbalmer ;; 4093dc407927Smrg solaris*) 4094dc407927Smrg case $cc_basename in 4095dd0822caSmrg CC* | sunCC*) 4096dc407927Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4097dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4098dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4099dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4100dc407927Smrg ;; 4101dc407927Smrg gcx*) 4102dc407927Smrg # Green Hills C++ Compiler 4103dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4104dc407927Smrg ;; 4105dc407927Smrg *) 4106dc407927Smrg ;; 4107dc407927Smrg esac 41083eed67faSmbalmer ;; 4109dc407927Smrg sunos4*) 4110dc407927Smrg case $cc_basename in 4111dc407927Smrg CC*) 4112dc407927Smrg # Sun C++ 4.x 4113dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4114dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4115dc407927Smrg ;; 4116dc407927Smrg lcc*) 4117dc407927Smrg # Lucid 4118dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4119dc407927Smrg ;; 41203eed67faSmbalmer *) 41213eed67faSmbalmer ;; 41223eed67faSmbalmer esac 41233eed67faSmbalmer ;; 4124dc407927Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4125dc407927Smrg case $cc_basename in 4126dc407927Smrg CC*) 4127dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4128dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4129dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4130dc407927Smrg ;; 4131dc407927Smrg esac 41323eed67faSmbalmer ;; 4133dc407927Smrg tandem*) 4134dc407927Smrg case $cc_basename in 4135dc407927Smrg NCC*) 4136dc407927Smrg # NonStop-UX NCC 3.20 4137dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4138dc407927Smrg ;; 41393eed67faSmbalmer *) 41403eed67faSmbalmer ;; 4141dc407927Smrg esac 41423eed67faSmbalmer ;; 4143dc407927Smrg vxworks*) 41443eed67faSmbalmer ;; 41453eed67faSmbalmer *) 4146dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41473eed67faSmbalmer ;; 41483eed67faSmbalmer esac 4149dc407927Smrg fi 4150dc407927Smrg], 4151dc407927Smrg[ 4152dc407927Smrg if test "$GCC" = yes; then 4153dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4154dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4155dc407927Smrg 4156dc407927Smrg case $host_os in 4157dc407927Smrg aix*) 4158dc407927Smrg # All AIX code is PIC. 4159dc407927Smrg if test "$host_cpu" = ia64; then 4160dc407927Smrg # AIX 5 now supports IA64 processor 4161dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4162dc407927Smrg fi 4163dc407927Smrg ;; 4164dc407927Smrg 4165dc407927Smrg amigaos*) 4166dc407927Smrg case $host_cpu in 4167dc407927Smrg powerpc) 4168dc407927Smrg # see comment about AmigaOS4 .so support 4169dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4170dc407927Smrg ;; 4171dc407927Smrg m68k) 4172dc407927Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4173dc407927Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4174dc407927Smrg # like `-m68040'. 4175dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4176dc407927Smrg ;; 4177dc407927Smrg esac 4178dc407927Smrg ;; 4179dc407927Smrg 4180dc407927Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4181dc407927Smrg # PIC is the default for these OSes. 4182dc407927Smrg ;; 4183dc407927Smrg 4184dc407927Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4185dc407927Smrg # This hack is so that the source file can tell whether it is being 4186dc407927Smrg # built for inclusion in a dll (and should export symbols for example). 4187dc407927Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4188dc407927Smrg # (--disable-auto-import) libraries 4189dc407927Smrg m4_if([$1], [GCJ], [], 4190dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4191dc407927Smrg ;; 4192dc407927Smrg 4193dc407927Smrg darwin* | rhapsody*) 4194dc407927Smrg # PIC is the default on this platform 4195dc407927Smrg # Common symbols not allowed in MH_DYLIB files 4196dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4197dc407927Smrg ;; 4198dc407927Smrg 4199dd0822caSmrg haiku*) 4200dd0822caSmrg # PIC is the default for Haiku. 4201dd0822caSmrg # The "-static" flag exists, but is broken. 4202dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4203dd0822caSmrg ;; 4204dd0822caSmrg 4205dc407927Smrg hpux*) 4206dc407927Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4207dc407927Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4208dc407927Smrg # sets the default TLS model and affects inlining. 4209dc407927Smrg case $host_cpu in 4210dc407927Smrg hppa*64*) 4211dc407927Smrg # +Z the default 42123eed67faSmbalmer ;; 42133eed67faSmbalmer *) 4214dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42153eed67faSmbalmer ;; 4216dc407927Smrg esac 4217dc407927Smrg ;; 4218dc407927Smrg 4219dc407927Smrg interix[[3-9]]*) 4220dc407927Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4221dc407927Smrg # Instead, we relocate shared libraries at runtime. 4222dc407927Smrg ;; 4223dc407927Smrg 4224dc407927Smrg msdosdjgpp*) 4225dc407927Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4226dc407927Smrg # on systems that don't support them. 4227dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4228dc407927Smrg enable_shared=no 4229dc407927Smrg ;; 4230dc407927Smrg 4231dc407927Smrg *nto* | *qnx*) 4232dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4233dc407927Smrg # it will coredump. 4234dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4235dc407927Smrg ;; 4236dc407927Smrg 4237dc407927Smrg sysv4*MP*) 4238dc407927Smrg if test -d /usr/nec; then 4239dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4240dc407927Smrg fi 4241dc407927Smrg ;; 4242dc407927Smrg 4243dc407927Smrg *) 4244dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4245dc407927Smrg ;; 42463eed67faSmbalmer esac 4247dd0822caSmrg 4248dd0822caSmrg case $cc_basename in 4249dd0822caSmrg nvcc*) # Cuda Compiler Driver 2.2 4250dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4251dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4252dd0822caSmrg ;; 4253dd0822caSmrg esac 4254dc407927Smrg else 4255dc407927Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4256dc407927Smrg case $host_os in 4257dc407927Smrg aix*) 4258dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4259dc407927Smrg if test "$host_cpu" = ia64; then 4260dc407927Smrg # AIX 5 now supports IA64 processor 4261dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4262dc407927Smrg else 4263dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4264dc407927Smrg fi 4265dc407927Smrg ;; 4266dc407927Smrg 4267dc407927Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4268dc407927Smrg # This hack is so that the source file can tell whether it is being 4269dc407927Smrg # built for inclusion in a dll (and should export symbols for example). 4270dc407927Smrg m4_if([$1], [GCJ], [], 4271dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4272dc407927Smrg ;; 4273dc407927Smrg 4274dc407927Smrg hpux9* | hpux10* | hpux11*) 4275dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4276dc407927Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4277dc407927Smrg # not for PA HP-UX. 4278dc407927Smrg case $host_cpu in 4279dc407927Smrg hppa*64*|ia64*) 4280dc407927Smrg # +Z the default 42813eed67faSmbalmer ;; 42823eed67faSmbalmer *) 4283dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 42843eed67faSmbalmer ;; 4285dc407927Smrg esac 4286dc407927Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4287dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4288dc407927Smrg ;; 42893eed67faSmbalmer 4290dc407927Smrg irix5* | irix6* | nonstopux*) 4291dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4292dc407927Smrg # PIC (with -KPIC) is the default. 4293dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4294dc407927Smrg ;; 42953eed67faSmbalmer 4296dd0822caSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4297dc407927Smrg case $cc_basename in 4298dc407927Smrg # old Intel for x86_64 which still supported -KPIC. 4299dc407927Smrg ecc*) 4300dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4301dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4302dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4303dc407927Smrg ;; 4304dc407927Smrg # icc used to be incompatible with GCC. 4305dc407927Smrg # ICC 10 doesn't accept -KPIC any more. 4306dc407927Smrg icc* | ifort*) 4307dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4308dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4309dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4310dc407927Smrg ;; 4311dc407927Smrg # Lahey Fortran 8.1. 4312dc407927Smrg lf95*) 4313dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4314dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4315dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4316dc407927Smrg ;; 4317dd0822caSmrg nagfor*) 4318dd0822caSmrg # NAG Fortran compiler 4319dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4320dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4321dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4322dd0822caSmrg ;; 4323dd0822caSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4324dc407927Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4325dc407927Smrg # which looks to be a dead project) 4326dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4328dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4329dc407927Smrg ;; 4330dc407927Smrg ccc*) 4331dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332dc407927Smrg # All Alpha code is PIC. 4333dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4334dc407927Smrg ;; 4335dd0822caSmrg xl* | bgxl* | bgf* | mpixl*) 4336dd0822caSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4337dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4338dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4339dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4340dc407927Smrg ;; 4341dc407927Smrg *) 4342dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 4343dd0822caSmrg *Sun\ F* | *Sun*Fortran*) 4344dd0822caSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4345dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4346dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4347dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4348dc407927Smrg ;; 4349dd0822caSmrg *Sun\ C*) 4350dd0822caSmrg # Sun C 5.9 4351dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4352dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4353dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354dc407927Smrg ;; 4355dc407927Smrg esac 4356dc407927Smrg ;; 4357dc407927Smrg esac 4358dc407927Smrg ;; 43593eed67faSmbalmer 4360dc407927Smrg newsos6) 4361dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4362dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4363dc407927Smrg ;; 43643eed67faSmbalmer 4365dc407927Smrg *nto* | *qnx*) 4366dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4367dc407927Smrg # it will coredump. 4368dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4369dc407927Smrg ;; 43703eed67faSmbalmer 4371dc407927Smrg osf3* | osf4* | osf5*) 4372dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4373dc407927Smrg # All OSF/1 code is PIC. 4374dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4375dc407927Smrg ;; 43763eed67faSmbalmer 4377dc407927Smrg rdos*) 4378dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4379dc407927Smrg ;; 43803eed67faSmbalmer 4381dc407927Smrg solaris*) 4382dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4383dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4384dc407927Smrg case $cc_basename in 4385dd0822caSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4386dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4387dc407927Smrg *) 4388dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4389dc407927Smrg esac 4390dc407927Smrg ;; 43913eed67faSmbalmer 4392dc407927Smrg sunos4*) 4393dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4394dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4395dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4396dc407927Smrg ;; 43973eed67faSmbalmer 4398dc407927Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4399dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4402dc407927Smrg ;; 44033eed67faSmbalmer 4404dc407927Smrg sysv4*MP*) 4405dc407927Smrg if test -d /usr/nec ;then 4406dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4407dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408dc407927Smrg fi 4409dc407927Smrg ;; 44103eed67faSmbalmer 4411dc407927Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4412dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4414dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415dc407927Smrg ;; 44163eed67faSmbalmer 4417dc407927Smrg unicos*) 4418dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4420dc407927Smrg ;; 44213eed67faSmbalmer 4422dc407927Smrg uts4*) 4423dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4424dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4425dc407927Smrg ;; 4426dc407927Smrg 4427dc407927Smrg *) 4428dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4429dc407927Smrg ;; 44303eed67faSmbalmer esac 4431dc407927Smrg fi 4432dc407927Smrg]) 4433dc407927Smrgcase $host_os in 4434dc407927Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4435dc407927Smrg *djgpp*) 4436dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4437dc407927Smrg ;; 4438dc407927Smrg *) 4439dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4440dc407927Smrg ;; 4441dc407927Smrgesac 4442dd0822caSmrg 4443dd0822caSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4444dd0822caSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4445dd0822caSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4446dd0822caSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 44473eed67faSmbalmer 4448dc407927Smrg# 4449dc407927Smrg# Check to make sure the PIC flag actually works. 4450dc407927Smrg# 4451dc407927Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4452dc407927Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4453dc407927Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4454dc407927Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4455dc407927Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4456dc407927Smrg "" | " "*) ;; 4457dc407927Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4458dc407927Smrg esac], 4459dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4460dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 44613eed67faSmbalmerfi 4462dc407927Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4463dc407927Smrg [Additional compiler flags for building library objects]) 44643eed67faSmbalmer 4465dd0822caSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4466dd0822caSmrg [How to pass a linker flag through the compiler]) 4467dc407927Smrg# 4468dc407927Smrg# Check to make sure the static flag actually works. 4469dc407927Smrg# 4470dc407927Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4471dc407927Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4472dc407927Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4473dc407927Smrg $lt_tmp_static_flag, 4474dc407927Smrg [], 4475dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4476dc407927Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4477dc407927Smrg [Compiler flag to prevent dynamic linking]) 4478dc407927Smrg])# _LT_COMPILER_PIC 44793eed67faSmbalmer 44803eed67faSmbalmer 4481dc407927Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4482dc407927Smrg# ---------------------------- 4483dc407927Smrg# See if the linker supports building shared libraries. 4484dc407927Smrgm4_defun([_LT_LINKER_SHLIBS], 4485dc407927Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4486dc407927SmrgAC_REQUIRE([LT_PATH_NM])dnl 4487dd0822caSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4488dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4489dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 4490dc407927Smrgm4_require([_LT_DECL_SED])dnl 4491dc407927Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4492dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 4493dc407927SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4494dc407927Smrgm4_if([$1], [CXX], [ 4495dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4496dd0822caSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4497dc407927Smrg case $host_os in 4498dc407927Smrg aix[[4-9]]*) 4499dc407927Smrg # If we're using GNU nm, then we don't want the "-C" option. 4500dc407927Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4501dd0822caSmrg # Also, AIX nm treats weak defined symbols like other global defined 4502dd0822caSmrg # symbols, whereas GNU nm marks them as "W". 4503dc407927Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4504dd0822caSmrg _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' 4505dc407927Smrg else 4506dc407927Smrg _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' 45073eed67faSmbalmer fi 45083eed67faSmbalmer ;; 4509dc407927Smrg pw32*) 4510dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4511dd0822caSmrg ;; 4512dc407927Smrg cygwin* | mingw* | cegcc*) 4513dd0822caSmrg case $cc_basename in 4514dd0822caSmrg cl*) ;; 4515dd0822caSmrg *) 4516dd0822caSmrg _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' 4517dd0822caSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4518dd0822caSmrg ;; 4519dd0822caSmrg esac 4520dd0822caSmrg ;; 4521dc407927Smrg *) 4522dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4523dd0822caSmrg ;; 4524dc407927Smrg esac 4525dc407927Smrg], [ 4526dc407927Smrg runpath_var= 4527dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4528dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4529dc407927Smrg _LT_TAGVAR(archive_cmds, $1)= 4530dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4531dc407927Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4532dc407927Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4533dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4534dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4535dc407927Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4536dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4537dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4538dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4539dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4540dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4541dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4542dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4543dc407927Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4544dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4545dc407927Smrg _LT_TAGVAR(module_cmds, $1)= 4546dc407927Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4547dc407927Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4548dc407927Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4549dc407927Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4550dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4551dc407927Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4552dc407927Smrg # included in the symbol list 4553dc407927Smrg _LT_TAGVAR(include_expsyms, $1)= 4554dc407927Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4555dc407927Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4556dc407927Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4557dc407927Smrg # as well as any symbol that contains `d'. 4558dc407927Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4559dc407927Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4560dc407927Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4561dc407927Smrg # the symbol is explicitly referenced. Since portable code cannot 4562dc407927Smrg # rely on this symbol name, it's probably fine to never include it in 4563dc407927Smrg # preloaded symbol tables. 4564dc407927Smrg # Exclude shared library initialization/finalization symbols. 4565dc407927Smrgdnl Note also adjust exclude_expsyms for C++ above. 4566dc407927Smrg extract_expsyms_cmds= 45673eed67faSmbalmer 4568dc407927Smrg case $host_os in 4569dc407927Smrg cygwin* | mingw* | pw32* | cegcc*) 4570dc407927Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4571dc407927Smrg # When not using gcc, we currently assume that we are using 4572dc407927Smrg # Microsoft Visual C++. 4573dc407927Smrg if test "$GCC" != yes; then 4574dc407927Smrg with_gnu_ld=no 45753eed67faSmbalmer fi 45763eed67faSmbalmer ;; 4577dc407927Smrg interix*) 4578dc407927Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4579dc407927Smrg with_gnu_ld=yes 4580dc407927Smrg ;; 4581dc407927Smrg openbsd*) 4582dc407927Smrg with_gnu_ld=no 4583dc407927Smrg ;; 45843eed67faSmbalmer esac 45853eed67faSmbalmer 4586dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4587dd0822caSmrg 4588dd0822caSmrg # On some targets, GNU ld is compatible enough with the native linker 4589dd0822caSmrg # that we're better off using the native interface for both. 4590dd0822caSmrg lt_use_gnu_ld_interface=no 4591dc407927Smrg if test "$with_gnu_ld" = yes; then 4592dd0822caSmrg case $host_os in 4593dd0822caSmrg aix*) 4594dd0822caSmrg # The AIX port of GNU ld has always aspired to compatibility 4595dd0822caSmrg # with the native linker. However, as the warning in the GNU ld 4596dd0822caSmrg # block says, versions before 2.19.5* couldn't really create working 4597dd0822caSmrg # shared libraries, regardless of the interface used. 4598dd0822caSmrg case `$LD -v 2>&1` in 4599dd0822caSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4600dd0822caSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4601dd0822caSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4602dd0822caSmrg *) 4603dd0822caSmrg lt_use_gnu_ld_interface=yes 4604dd0822caSmrg ;; 4605dd0822caSmrg esac 4606dd0822caSmrg ;; 4607dd0822caSmrg *) 4608dd0822caSmrg lt_use_gnu_ld_interface=yes 4609dd0822caSmrg ;; 4610dd0822caSmrg esac 4611dd0822caSmrg fi 4612dd0822caSmrg 4613dd0822caSmrg if test "$lt_use_gnu_ld_interface" = yes; then 4614dc407927Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4615dc407927Smrg wlarc='${wl}' 46163eed67faSmbalmer 4617dc407927Smrg # Set some defaults for GNU ld with shared library support. These 4618dc407927Smrg # are reset later if shared libraries are not supported. Putting them 4619dc407927Smrg # here allows them to be overridden if necessary. 4620dc407927Smrg runpath_var=LD_RUN_PATH 4621dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4622dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4623dc407927Smrg # ancient GNU ld didn't support --whole-archive et. al. 4624dc407927Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4625dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4626dc407927Smrg else 4627dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628dc407927Smrg fi 4629dc407927Smrg supports_anon_versioning=no 4630dc407927Smrg case `$LD -v 2>&1` in 4631dd0822caSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 4632dc407927Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4633dc407927Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4634dc407927Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4635dc407927Smrg *\ 2.11.*) ;; # other 2.11 versions 4636dc407927Smrg *) supports_anon_versioning=yes ;; 4637dc407927Smrg esac 46383eed67faSmbalmer 4639dc407927Smrg # See if GNU ld supports shared libraries. 4640dc407927Smrg case $host_os in 4641dc407927Smrg aix[[3-9]]*) 4642dc407927Smrg # On AIX/PPC, the GNU linker is very broken 4643dc407927Smrg if test "$host_cpu" != ia64; then 4644dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4645dc407927Smrg cat <<_LT_EOF 1>&2 46463eed67faSmbalmer 4647dd0822caSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4648dc407927Smrg*** to be unable to reliably create shared libraries on AIX. 4649dc407927Smrg*** Therefore, libtool is disabling shared libraries support. If you 4650dd0822caSmrg*** really care for shared libraries, you may want to install binutils 4651dd0822caSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4652dd0822caSmrg*** You will then need to restart the configuration process. 46533eed67faSmbalmer 4654dc407927Smrg_LT_EOF 4655dc407927Smrg fi 4656dc407927Smrg ;; 46573eed67faSmbalmer 4658dc407927Smrg amigaos*) 4659dc407927Smrg case $host_cpu in 4660dc407927Smrg powerpc) 4661dc407927Smrg # see comment about AmigaOS4 .so support 4662dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4663dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4664dc407927Smrg ;; 4665dc407927Smrg m68k) 4666dc407927Smrg _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)' 4667dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4668dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4669dc407927Smrg ;; 4670dc407927Smrg esac 4671dc407927Smrg ;; 46723eed67faSmbalmer 4673dc407927Smrg beos*) 4674dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4675dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4676dc407927Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4677dc407927Smrg # support --undefined. This deserves some investigation. FIXME 4678dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4679dc407927Smrg else 4680dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4681dc407927Smrg fi 4682dc407927Smrg ;; 46833eed67faSmbalmer 4684dc407927Smrg cygwin* | mingw* | pw32* | cegcc*) 4685dc407927Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4686dc407927Smrg # as there is no search path for DLLs. 4687dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4688dd0822caSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4689dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4690dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4691dc407927Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4692dd0822caSmrg _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' 4693dd0822caSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4694dc407927Smrg 4695dc407927Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4696dc407927Smrg _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' 4697dc407927Smrg # If the export-symbols file already is a .def file (1st line 4698dc407927Smrg # is EXPORTS), use it as is; otherwise, prepend... 4699dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4700dc407927Smrg cp $export_symbols $output_objdir/$soname.def; 4701dc407927Smrg else 4702dc407927Smrg echo EXPORTS > $output_objdir/$soname.def; 4703dc407927Smrg cat $export_symbols >> $output_objdir/$soname.def; 4704dc407927Smrg fi~ 4705dc407927Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4706dc407927Smrg else 4707dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4708dc407927Smrg fi 4709dc407927Smrg ;; 47103eed67faSmbalmer 4711dd0822caSmrg haiku*) 4712dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4713dd0822caSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4714dd0822caSmrg ;; 4715dd0822caSmrg 4716dc407927Smrg interix[[3-9]]*) 4717dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4718dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4719dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4720dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4721dc407927Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4722dc407927Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4723dc407927Smrg # default) and relocated if they conflict, which is a slow very memory 4724dc407927Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4725dc407927Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4726dc407927Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4727dc407927Smrg _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' 4728dc407927Smrg _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' 4729dc407927Smrg ;; 47303eed67faSmbalmer 4731dd0822caSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4732dc407927Smrg tmp_diet=no 4733dc407927Smrg if test "$host_os" = linux-dietlibc; then 4734dc407927Smrg case $cc_basename in 4735dc407927Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4736dc407927Smrg esac 4737dc407927Smrg fi 4738dc407927Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4739dc407927Smrg && test "$tmp_diet" = no 4740dc407927Smrg then 4741dd0822caSmrg tmp_addflag=' $pic_flag' 4742dc407927Smrg tmp_sharedflag='-shared' 4743dc407927Smrg case $cc_basename,$host_cpu in 4744dc407927Smrg pgcc*) # Portland Group C compiler 4745dd0822caSmrg _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' 4746dc407927Smrg tmp_addflag=' $pic_flag' 4747dc407927Smrg ;; 4748dd0822caSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 4749dd0822caSmrg # Portland Group f77 and f90 compilers 4750dd0822caSmrg _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' 4751dc407927Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4752dc407927Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4753dc407927Smrg tmp_addflag=' -i_dynamic' ;; 4754dc407927Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4755dc407927Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4756dc407927Smrg ifc* | ifort*) # Intel Fortran compiler 4757dc407927Smrg tmp_addflag=' -nofor_main' ;; 4758dc407927Smrg lf95*) # Lahey Fortran 8.1 4759dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4760dc407927Smrg tmp_sharedflag='--shared' ;; 4761dd0822caSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4762dc407927Smrg tmp_sharedflag='-qmkshrobj' 4763dc407927Smrg tmp_addflag= ;; 4764dd0822caSmrg nvcc*) # Cuda Compiler Driver 2.2 4765dd0822caSmrg _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' 4766dd0822caSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4767dd0822caSmrg ;; 4768dc407927Smrg esac 4769dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 4770dc407927Smrg *Sun\ C*) # Sun C 5.9 4771dd0822caSmrg _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' 4772dc407927Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4773dc407927Smrg tmp_sharedflag='-G' ;; 4774dc407927Smrg *Sun\ F*) # Sun Fortran 8.3 4775dc407927Smrg tmp_sharedflag='-G' ;; 4776dc407927Smrg esac 4777dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47783eed67faSmbalmer 4779dc407927Smrg if test "x$supports_anon_versioning" = xyes; then 4780dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4781dc407927Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4782dc407927Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4783dc407927Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4784dc407927Smrg fi 47853eed67faSmbalmer 4786dc407927Smrg case $cc_basename in 4787dd0822caSmrg xlf* | bgf* | bgxlf* | mpixlf*) 4788dc407927Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4789dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4790dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4791dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4792dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4793dc407927Smrg if test "x$supports_anon_versioning" = xyes; then 4794dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4795dc407927Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4796dc407927Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4797dd0822caSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4798dc407927Smrg fi 4799dc407927Smrg ;; 4800dc407927Smrg esac 4801dc407927Smrg else 4802dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4803dc407927Smrg fi 4804dc407927Smrg ;; 48053eed67faSmbalmer 4806dc407927Smrg netbsd*) 4807dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4808dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4809dc407927Smrg wlarc= 4810dc407927Smrg else 4811dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4812dd0822caSmrg _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' 4813dc407927Smrg fi 4814dc407927Smrg ;; 48153eed67faSmbalmer 4816dc407927Smrg solaris*) 4817dc407927Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4818dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4819dc407927Smrg cat <<_LT_EOF 1>&2 48203eed67faSmbalmer 4821dc407927Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4822dc407927Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4823dc407927Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4824dc407927Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4825dc407927Smrg*** your PATH or compiler configuration so that the native linker is 4826dc407927Smrg*** used, and then restart. 48273eed67faSmbalmer 4828dc407927Smrg_LT_EOF 4829dc407927Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4830dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4831dd0822caSmrg _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' 4832dc407927Smrg else 4833dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4834dc407927Smrg fi 4835dc407927Smrg ;; 48363eed67faSmbalmer 4837dc407927Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4838dc407927Smrg case `$LD -v 2>&1` in 4839dc407927Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4840dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4841dc407927Smrg cat <<_LT_EOF 1>&2 48423eed67faSmbalmer 4843dc407927Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4844dc407927Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4845dc407927Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4846dc407927Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4847dc407927Smrg*** your PATH or compiler configuration so that the native linker is 4848dc407927Smrg*** used, and then restart. 48493eed67faSmbalmer 4850dc407927Smrg_LT_EOF 4851dc407927Smrg ;; 4852dc407927Smrg *) 4853dc407927Smrg # For security reasons, it is highly recommended that you always 4854dc407927Smrg # use absolute paths for naming shared libraries, and exclude the 4855dc407927Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4856dc407927Smrg # requires that you compile everything twice, which is a pain. 4857dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4858dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4859dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4860dc407927Smrg _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' 4861dc407927Smrg else 4862dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4863dc407927Smrg fi 4864dc407927Smrg ;; 4865dc407927Smrg esac 4866dc407927Smrg ;; 48673eed67faSmbalmer 4868dc407927Smrg sunos4*) 4869dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4870dc407927Smrg wlarc= 4871dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4872dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4873dc407927Smrg ;; 48743eed67faSmbalmer 4875dc407927Smrg *) 4876dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4877dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4878dd0822caSmrg _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' 4879dc407927Smrg else 4880dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4881dc407927Smrg fi 4882dc407927Smrg ;; 4883dc407927Smrg esac 48843eed67faSmbalmer 4885dc407927Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4886dc407927Smrg runpath_var= 4887dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4888dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4889dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4890dc407927Smrg fi 4891dc407927Smrg else 4892dc407927Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4893dc407927Smrg case $host_os in 4894dc407927Smrg aix3*) 4895dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4896dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4897dc407927Smrg _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' 4898dc407927Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4899dc407927Smrg # are no directories specified by -L. 4900dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4901dc407927Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4902dc407927Smrg # Neither direct hardcoding nor static linking is supported with a 4903dc407927Smrg # broken collect2. 4904dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4905dc407927Smrg fi 4906dc407927Smrg ;; 49073eed67faSmbalmer 4908dc407927Smrg aix[[4-9]]*) 4909dc407927Smrg if test "$host_cpu" = ia64; then 4910dc407927Smrg # On IA64, the linker does run time linking by default, so we don't 4911dc407927Smrg # have to do anything special. 4912dc407927Smrg aix_use_runtimelinking=no 4913dc407927Smrg exp_sym_flag='-Bexport' 4914dc407927Smrg no_entry_flag="" 4915dc407927Smrg else 4916dc407927Smrg # If we're using GNU nm, then we don't want the "-C" option. 4917dc407927Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4918dd0822caSmrg # Also, AIX nm treats weak defined symbols like other global 4919dd0822caSmrg # defined symbols, whereas GNU nm marks them as "W". 4920dc407927Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4921dd0822caSmrg _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' 4922dc407927Smrg else 4923dc407927Smrg _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' 4924dc407927Smrg fi 4925dc407927Smrg aix_use_runtimelinking=no 49263eed67faSmbalmer 4927dc407927Smrg # Test if we are trying to use run time linking or normal 4928dc407927Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4929dc407927Smrg # need to do runtime linking. 4930dc407927Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4931dc407927Smrg for ld_flag in $LDFLAGS; do 4932dc407927Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4933dc407927Smrg aix_use_runtimelinking=yes 4934dc407927Smrg break 4935dc407927Smrg fi 4936dc407927Smrg done 4937dc407927Smrg ;; 4938dc407927Smrg esac 49393eed67faSmbalmer 4940dc407927Smrg exp_sym_flag='-bexport' 4941dc407927Smrg no_entry_flag='-bnoentry' 4942dc407927Smrg fi 49433eed67faSmbalmer 4944dc407927Smrg # When large executables or shared objects are built, AIX ld can 4945dc407927Smrg # have problems creating the table of contents. If linking a library 4946dc407927Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4947dc407927Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4948dc407927Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4949dc407927Smrg 4950dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='' 4951dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4952dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4953dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4954dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4955dc407927Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 49563eed67faSmbalmer 4957dc407927Smrg if test "$GCC" = yes; then 4958dc407927Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4959dc407927Smrg # We only want to do this on AIX 4.2 and lower, the check 4960dc407927Smrg # below for broken collect2 doesn't work under 4.3+ 4961dc407927Smrg collect2name=`${CC} -print-prog-name=collect2` 4962dc407927Smrg if test -f "$collect2name" && 4963dc407927Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4964dc407927Smrg then 4965dc407927Smrg # We have reworked collect2 4966dc407927Smrg : 4967dc407927Smrg else 4968dc407927Smrg # We have old collect2 4969dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4970dc407927Smrg # It fails to find uninstalled libraries when the uninstalled 4971dc407927Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4972dc407927Smrg # to unsupported forces relinking 4973dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4974dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4975dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4976dc407927Smrg fi 4977dc407927Smrg ;; 4978dc407927Smrg esac 4979dc407927Smrg shared_flag='-shared' 4980dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 4981dc407927Smrg shared_flag="$shared_flag "'${wl}-G' 4982dc407927Smrg fi 4983dc407927Smrg else 4984dc407927Smrg # not using gcc 4985dc407927Smrg if test "$host_cpu" = ia64; then 4986dc407927Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4987dc407927Smrg # chokes on -Wl,-G. The following line is correct: 4988dc407927Smrg shared_flag='-G' 4989dc407927Smrg else 4990dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 4991dc407927Smrg shared_flag='${wl}-G' 4992dc407927Smrg else 4993dc407927Smrg shared_flag='${wl}-bM:SRE' 4994dc407927Smrg fi 4995dc407927Smrg fi 4996dc407927Smrg fi 49973eed67faSmbalmer 4998dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4999dc407927Smrg # It seems that -bexpall does not export symbols beginning with 5000dc407927Smrg # underscore (_), so it is better to generate a list of symbols to export. 5001dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5002dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 5003dc407927Smrg # Warning - without using the other runtime loading flags (-brtl), 5004dc407927Smrg # -berok will link without error, but may produce a broken library. 5005dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5006dc407927Smrg # Determine the default libpath from the value encoded in an 5007dc407927Smrg # empty executable. 5008dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5009dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5010dd0822caSmrg _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" 5011dc407927Smrg else 5012dc407927Smrg if test "$host_cpu" = ia64; then 5013dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5014dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5015dc407927Smrg _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" 5016dc407927Smrg else 5017dc407927Smrg # Determine the default libpath from the value encoded in an 5018dc407927Smrg # empty executable. 5019dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5020dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5021dc407927Smrg # Warning - without using the other run time loading flags, 5022dc407927Smrg # -berok will link without error, but may produce a broken library. 5023dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5024dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5025dd0822caSmrg if test "$with_gnu_ld" = yes; then 5026dd0822caSmrg # We only use this code for GNU lds that support --whole-archive. 5027dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5028dd0822caSmrg else 5029dd0822caSmrg # Exported symbols can be pulled into shared objects from archives 5030dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5031dd0822caSmrg fi 5032dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5033dc407927Smrg # This is similar to how AIX traditionally builds its shared libraries. 5034dc407927Smrg _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' 5035dc407927Smrg fi 5036dc407927Smrg fi 5037dc407927Smrg ;; 50383eed67faSmbalmer 5039dc407927Smrg amigaos*) 5040dc407927Smrg case $host_cpu in 5041dc407927Smrg powerpc) 5042dc407927Smrg # see comment about AmigaOS4 .so support 5043dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5044dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5045dc407927Smrg ;; 5046dc407927Smrg m68k) 5047dc407927Smrg _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)' 5048dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5049dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050dc407927Smrg ;; 5051dc407927Smrg esac 5052dc407927Smrg ;; 50533eed67faSmbalmer 5054dc407927Smrg bsdi[[45]]*) 5055dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5056dc407927Smrg ;; 50573eed67faSmbalmer 5058dc407927Smrg cygwin* | mingw* | pw32* | cegcc*) 5059dc407927Smrg # When not using gcc, we currently assume that we are using 5060dc407927Smrg # Microsoft Visual C++. 5061dc407927Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5062dc407927Smrg # no search path for DLLs. 5063dd0822caSmrg case $cc_basename in 5064dd0822caSmrg cl*) 5065dd0822caSmrg # Native MSVC 5066dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5067dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5068dd0822caSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5069dd0822caSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5070dd0822caSmrg # Tell ltmain to make .lib files, not .a files. 5071dd0822caSmrg libext=lib 5072dd0822caSmrg # Tell ltmain to make .dll files, not .so files. 5073dd0822caSmrg shrext_cmds=".dll" 5074dd0822caSmrg # FIXME: Setting linknames here is a bad hack. 5075dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5076dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5077dd0822caSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5078dd0822caSmrg else 5079dd0822caSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5080dd0822caSmrg fi~ 5081dd0822caSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5082dd0822caSmrg linknames=' 5083dd0822caSmrg # The linker will not automatically build a static lib if we build a DLL. 5084dd0822caSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5085dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5086dd0822caSmrg _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' 5087dd0822caSmrg # Don't use ranlib 5088dd0822caSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5089dd0822caSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5090dd0822caSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5091dd0822caSmrg case $lt_outputfile in 5092dd0822caSmrg *.exe|*.EXE) ;; 5093dd0822caSmrg *) 5094dd0822caSmrg lt_outputfile="$lt_outputfile.exe" 5095dd0822caSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5096dd0822caSmrg ;; 5097dd0822caSmrg esac~ 5098dd0822caSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5099dd0822caSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5100dd0822caSmrg $RM "$lt_outputfile.manifest"; 5101dd0822caSmrg fi' 5102dd0822caSmrg ;; 5103dd0822caSmrg *) 5104dd0822caSmrg # Assume MSVC wrapper 5105dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5106dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5107dd0822caSmrg # Tell ltmain to make .lib files, not .a files. 5108dd0822caSmrg libext=lib 5109dd0822caSmrg # Tell ltmain to make .dll files, not .so files. 5110dd0822caSmrg shrext_cmds=".dll" 5111dd0822caSmrg # FIXME: Setting linknames here is a bad hack. 5112dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5113dd0822caSmrg # The linker will automatically build a .lib file if we build a DLL. 5114dd0822caSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5115dd0822caSmrg # FIXME: Should let the user specify the lib program. 5116dd0822caSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5117dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5118dd0822caSmrg ;; 5119dd0822caSmrg esac 5120dc407927Smrg ;; 51213eed67faSmbalmer 5122dc407927Smrg darwin* | rhapsody*) 5123dc407927Smrg _LT_DARWIN_LINKER_FEATURES($1) 5124dc407927Smrg ;; 51253eed67faSmbalmer 5126dc407927Smrg dgux*) 5127dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5128dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5129dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5130dc407927Smrg ;; 51313eed67faSmbalmer 5132dc407927Smrg freebsd1*) 5133dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5134dc407927Smrg ;; 51353eed67faSmbalmer 5136dc407927Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5137dc407927Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5138dc407927Smrg # does not break anything, and helps significantly (at the cost of a little 5139dc407927Smrg # extra space). 5140dc407927Smrg freebsd2.2*) 5141dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5142dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5143dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5144dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5145dc407927Smrg ;; 51463eed67faSmbalmer 5147dc407927Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5148dc407927Smrg freebsd2*) 5149dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5150dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5151dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5152dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5153dc407927Smrg ;; 51543eed67faSmbalmer 5155dc407927Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5156dc407927Smrg freebsd* | dragonfly*) 5157dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5158dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5159dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5160dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5161dc407927Smrg ;; 51623eed67faSmbalmer 5163dc407927Smrg hpux9*) 5164dc407927Smrg if test "$GCC" = yes; then 5165dd0822caSmrg _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' 5166dc407927Smrg else 5167dc407927Smrg _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' 5168dc407927Smrg fi 5169dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5170dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5171dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 51723eed67faSmbalmer 5173dc407927Smrg # hardcode_minus_L: Not really in the search PATH, 5174dc407927Smrg # but as the default location of the library. 5175dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5176dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5177dc407927Smrg ;; 51783eed67faSmbalmer 5179dc407927Smrg hpux10*) 5180dd0822caSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5181dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5182dc407927Smrg else 5183dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5184dc407927Smrg fi 5185dc407927Smrg if test "$with_gnu_ld" = no; then 5186dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5187dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5188dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5189dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5190dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5191dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5192dc407927Smrg # hardcode_minus_L: Not really in the search PATH, 5193dc407927Smrg # but as the default location of the library. 5194dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5195dc407927Smrg fi 5196dc407927Smrg ;; 51973eed67faSmbalmer 5198dc407927Smrg hpux11*) 5199dd0822caSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5200dc407927Smrg case $host_cpu in 5201dc407927Smrg hppa*64*) 5202dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5203dc407927Smrg ;; 5204dc407927Smrg ia64*) 5205dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5206dc407927Smrg ;; 5207dc407927Smrg *) 5208dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5209dc407927Smrg ;; 5210dc407927Smrg esac 5211dc407927Smrg else 5212dc407927Smrg case $host_cpu in 5213dc407927Smrg hppa*64*) 5214dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5215dc407927Smrg ;; 5216dc407927Smrg ia64*) 5217dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5218dc407927Smrg ;; 5219dc407927Smrg *) 5220dd0822caSmrg m4_if($1, [], [ 5221dd0822caSmrg # Older versions of the 11.00 compiler do not understand -b yet 5222dd0822caSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5223dd0822caSmrg _LT_LINKER_OPTION([if $CC understands -b], 5224dd0822caSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5225dd0822caSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5226dd0822caSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5227dd0822caSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5228dc407927Smrg ;; 5229dc407927Smrg esac 5230dc407927Smrg fi 5231dc407927Smrg if test "$with_gnu_ld" = no; then 5232dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5233dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52343eed67faSmbalmer 5235dc407927Smrg case $host_cpu in 5236dc407927Smrg hppa*64*|ia64*) 5237dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5238dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5239dc407927Smrg ;; 5240dc407927Smrg *) 5241dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5242dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5243dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52443eed67faSmbalmer 5245dc407927Smrg # hardcode_minus_L: Not really in the search PATH, 5246dc407927Smrg # but as the default location of the library. 5247dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5248dc407927Smrg ;; 5249dc407927Smrg esac 5250dc407927Smrg fi 52513eed67faSmbalmer ;; 5252dc407927Smrg 5253dc407927Smrg irix5* | irix6* | nonstopux*) 5254dc407927Smrg if test "$GCC" = yes; then 5255dd0822caSmrg _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' 5256dc407927Smrg # Try to use the -exported_symbol ld option, if it does not 5257dc407927Smrg # work, assume that -exports_file does not work either and 5258dc407927Smrg # implicitly export all symbols. 5259dd0822caSmrg # This should be the same for all languages, so no per-tag cache variable. 5260dd0822caSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5261dd0822caSmrg [lt_cv_irix_exported_symbol], 5262dd0822caSmrg [save_LDFLAGS="$LDFLAGS" 5263dd0822caSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5264dd0822caSmrg AC_LINK_IFELSE( 5265dd0822caSmrg [AC_LANG_SOURCE( 5266dd0822caSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5267dd0822caSmrg [C++], [[int foo (void) { return 0; }]], 5268dd0822caSmrg [Fortran 77], [[ 5269dd0822caSmrg subroutine foo 5270dd0822caSmrg end]], 5271dd0822caSmrg [Fortran], [[ 5272dd0822caSmrg subroutine foo 5273dd0822caSmrg end]])])], 5274dd0822caSmrg [lt_cv_irix_exported_symbol=yes], 5275dd0822caSmrg [lt_cv_irix_exported_symbol=no]) 5276dd0822caSmrg LDFLAGS="$save_LDFLAGS"]) 5277dd0822caSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 5278dd0822caSmrg _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' 5279dd0822caSmrg fi 5280dc407927Smrg else 5281dd0822caSmrg _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' 5282dd0822caSmrg _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' 5283dc407927Smrg fi 5284dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5285dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5286dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5287dc407927Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5288dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 52893eed67faSmbalmer ;; 52903eed67faSmbalmer 5291dc407927Smrg netbsd*) 5292dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5293dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5294dc407927Smrg else 5295dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5296dc407927Smrg fi 5297dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5298dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5299dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5300dc407927Smrg ;; 53013eed67faSmbalmer 5302dc407927Smrg newsos6) 5303dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5304dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5305dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5306dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5307dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5308dc407927Smrg ;; 53093eed67faSmbalmer 5310dc407927Smrg *nto* | *qnx*) 5311dc407927Smrg ;; 53123eed67faSmbalmer 5313dc407927Smrg openbsd*) 5314dc407927Smrg if test -f /usr/libexec/ld.so; then 5315dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5316dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5317dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5318dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5319dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5320dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5321dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5322dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5323dc407927Smrg else 5324dc407927Smrg case $host_os in 5325dc407927Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5326dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5327dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5328dc407927Smrg ;; 5329dc407927Smrg *) 5330dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5331dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5332dc407927Smrg ;; 5333dc407927Smrg esac 5334dc407927Smrg fi 5335dc407927Smrg else 5336dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5337dc407927Smrg fi 5338dc407927Smrg ;; 53393eed67faSmbalmer 5340dc407927Smrg os2*) 5341dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5342dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5343dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5344dd0822caSmrg _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' 5345dc407927Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5346dc407927Smrg ;; 53473eed67faSmbalmer 5348dc407927Smrg osf3*) 5349dc407927Smrg if test "$GCC" = yes; then 5350dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5351dd0822caSmrg _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' 5352dc407927Smrg else 5353dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5354dd0822caSmrg _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' 5355dc407927Smrg fi 5356dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359dc407927Smrg ;; 53603eed67faSmbalmer 5361dc407927Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5362dc407927Smrg if test "$GCC" = yes; then 5363dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5364dd0822caSmrg _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' 5365dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5366dc407927Smrg else 5367dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5368dd0822caSmrg _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' 5369dc407927Smrg _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~ 5370dd0822caSmrg $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' 53713eed67faSmbalmer 5372dc407927Smrg # Both c and cxx compiler support -rpath directly 5373dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5374dc407927Smrg fi 5375dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5376dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5377dc407927Smrg ;; 53783eed67faSmbalmer 5379dc407927Smrg solaris*) 5380dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5381dc407927Smrg if test "$GCC" = yes; then 5382dc407927Smrg wlarc='${wl}' 5383dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5384dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5385dd0822caSmrg $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' 5386dc407927Smrg else 5387dc407927Smrg case `$CC -V 2>&1` in 5388dc407927Smrg *"Compilers 5.0"*) 5389dc407927Smrg wlarc='' 5390dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5391dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5392dc407927Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5393dc407927Smrg ;; 5394dc407927Smrg *) 5395dc407927Smrg wlarc='${wl}' 5396dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5397dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5398dc407927Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5399dc407927Smrg ;; 5400dc407927Smrg esac 5401dc407927Smrg fi 5402dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5403dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5404dc407927Smrg case $host_os in 5405dc407927Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5406dc407927Smrg *) 5407dc407927Smrg # The compiler driver will combine and reorder linker options, 5408dc407927Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5409dc407927Smrg # but is careful enough not to reorder. 5410dc407927Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5411dc407927Smrg if test "$GCC" = yes; then 5412dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5413dc407927Smrg else 5414dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5415dc407927Smrg fi 5416dc407927Smrg ;; 5417dc407927Smrg esac 5418dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5419dc407927Smrg ;; 54203eed67faSmbalmer 5421dc407927Smrg sunos4*) 5422dc407927Smrg if test "x$host_vendor" = xsequent; then 5423dc407927Smrg # Use $CC to link under sequent, because it throws in some extra .o 5424dc407927Smrg # files that make .init and .fini sections work. 5425dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5426dc407927Smrg else 5427dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5428dc407927Smrg fi 5429dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5430dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5431dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5432dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5433dc407927Smrg ;; 54343eed67faSmbalmer 5435dc407927Smrg sysv4) 5436dc407927Smrg case $host_vendor in 5437dc407927Smrg sni) 5438dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5439dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5440dc407927Smrg ;; 5441dc407927Smrg siemens) 5442dc407927Smrg ## LD is ld it makes a PLAMLIB 5443dc407927Smrg ## CC just makes a GrossModule. 5444dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5445dc407927Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5446dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5447dc407927Smrg ;; 5448dc407927Smrg motorola) 5449dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5450dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5451dc407927Smrg ;; 5452dc407927Smrg esac 5453dc407927Smrg runpath_var='LD_RUN_PATH' 5454dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5455dc407927Smrg ;; 54563eed67faSmbalmer 5457dc407927Smrg sysv4.3*) 5458dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5459dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5460dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5461dc407927Smrg ;; 54623eed67faSmbalmer 5463dc407927Smrg sysv4*MP*) 5464dc407927Smrg if test -d /usr/nec; then 5465dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5466dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5467dc407927Smrg runpath_var=LD_RUN_PATH 5468dc407927Smrg hardcode_runpath_var=yes 5469dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5470dc407927Smrg fi 5471dc407927Smrg ;; 54723eed67faSmbalmer 5473dc407927Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5474dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5475dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5476dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5477dc407927Smrg runpath_var='LD_RUN_PATH' 54783eed67faSmbalmer 5479dc407927Smrg if test "$GCC" = yes; then 5480dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5481dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5482dc407927Smrg else 5483dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5484dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5485dc407927Smrg fi 5486dc407927Smrg ;; 54873eed67faSmbalmer 5488dc407927Smrg sysv5* | sco3.2v5* | sco5v6*) 5489dc407927Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5490dc407927Smrg # link with -lc, and that would cause any symbols used from libc to 5491dc407927Smrg # always be unresolved, which means just about no library would 5492dc407927Smrg # ever link correctly. If we're not using GNU ld we use -z text 5493dc407927Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5494dc407927Smrg # as -z defs. 5495dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5496dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5497dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5498dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5499dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5500dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5501dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5502dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5503dc407927Smrg runpath_var='LD_RUN_PATH' 55043eed67faSmbalmer 5505dc407927Smrg if test "$GCC" = yes; then 5506dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5507dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5508dc407927Smrg else 5509dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5510dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5511dc407927Smrg fi 5512dc407927Smrg ;; 55133eed67faSmbalmer 5514dc407927Smrg uts4*) 5515dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5516dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5517dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5518dc407927Smrg ;; 55193eed67faSmbalmer 5520dc407927Smrg *) 5521dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5522dc407927Smrg ;; 5523dc407927Smrg esac 55243eed67faSmbalmer 5525dc407927Smrg if test x$host_vendor = xsni; then 5526dc407927Smrg case $host in 5527dc407927Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5528dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5529dc407927Smrg ;; 5530dc407927Smrg esac 5531dc407927Smrg fi 5532dc407927Smrg fi 5533dc407927Smrg]) 5534dc407927SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5535dc407927Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 55363eed67faSmbalmer 5537dc407927Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 55383eed67faSmbalmer 5539dc407927Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5540dc407927Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5541dc407927Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5542dc407927Smrg [The commands to extract the exported symbol list from a shared archive]) 55433eed67faSmbalmer 5544dc407927Smrg# 5545dc407927Smrg# Do we need to explicitly link libc? 5546dc407927Smrg# 5547dc407927Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5548dc407927Smrgx|xyes) 5549dc407927Smrg # Assume -lc should be added 5550dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55513eed67faSmbalmer 5552dc407927Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5553dc407927Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5554dc407927Smrg *'~'*) 5555dc407927Smrg # FIXME: we may have to deal with multi-command sequences. 5556dc407927Smrg ;; 5557dc407927Smrg '$CC '*) 5558dc407927Smrg # Test whether the compiler implicitly links with -lc since on some 5559dc407927Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5560dc407927Smrg # to ld, don't add -lc before -lgcc. 5561dd0822caSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5562dd0822caSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5563dd0822caSmrg [$RM conftest* 5564dd0822caSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5565dd0822caSmrg 5566dd0822caSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5567dd0822caSmrg soname=conftest 5568dd0822caSmrg lib=conftest 5569dd0822caSmrg libobjs=conftest.$ac_objext 5570dd0822caSmrg deplibs= 5571dd0822caSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5572dd0822caSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5573dd0822caSmrg compiler_flags=-v 5574dd0822caSmrg linker_flags=-v 5575dd0822caSmrg verstring= 5576dd0822caSmrg output_objdir=. 5577dd0822caSmrg libname=conftest 5578dd0822caSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5579dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5580dd0822caSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5581dd0822caSmrg then 5582dd0822caSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5583dd0822caSmrg else 5584dd0822caSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5585dd0822caSmrg fi 5586dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5587dd0822caSmrg else 5588dd0822caSmrg cat conftest.err 1>&5 5589dd0822caSmrg fi 5590dd0822caSmrg $RM conftest* 5591dd0822caSmrg ]) 5592dd0822caSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5593dc407927Smrg ;; 5594dc407927Smrg esac 5595dc407927Smrg fi 5596dc407927Smrg ;; 5597dc407927Smrgesac 55983eed67faSmbalmer 5599dc407927Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5600dc407927Smrg [Whether or not to add -lc for building shared libraries]) 5601dc407927Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5602dc407927Smrg [enable_shared_with_static_runtimes], [0], 5603dc407927Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5604dc407927Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5605dc407927Smrg [Compiler flag to allow reflexive dlopens]) 5606dc407927Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5607dc407927Smrg [Compiler flag to generate shared objects directly from archives]) 5608dc407927Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5609dc407927Smrg [Whether the compiler copes with passing no objects directly]) 5610dc407927Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5611dc407927Smrg [Create an old-style archive from a shared archive]) 5612dc407927Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5613dc407927Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5614dc407927Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5615dc407927Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5616dc407927Smrg_LT_TAGDECL([], [module_cmds], [2], 5617dc407927Smrg [Commands used to build a loadable module if different from building 5618dc407927Smrg a shared archive.]) 5619dc407927Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5620dc407927Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5621dc407927Smrg [Whether we are building with GNU ld or not]) 5622dc407927Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5623dc407927Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5624dc407927Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5625dc407927Smrg [Flag that enforces no undefined symbols]) 5626dc407927Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5627dc407927Smrg [Flag to hardcode $libdir into a binary during linking. 5628dc407927Smrg This must work even if $libdir does not exist]) 5629dc407927Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5630dc407927Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5631dc407927Smrg during linking. This must work even if $libdir does not exist]]) 5632dc407927Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5633dc407927Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5634dc407927Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5635dc407927Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5636dc407927Smrg DIR into the resulting binary]) 5637dc407927Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5638dc407927Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5639dc407927Smrg DIR into the resulting binary and the resulting library dependency is 5640dc407927Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5641dc407927Smrg library is relocated]) 5642dc407927Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5643dc407927Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5644dc407927Smrg into the resulting binary]) 5645dc407927Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5646dc407927Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5647dc407927Smrg into the resulting binary]) 5648dc407927Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5649dc407927Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5650dc407927Smrg into the library and all subsequent libraries and executables linked 5651dc407927Smrg against it]) 5652dc407927Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5653dc407927Smrg [Set to yes if linker adds runtime paths of dependent libraries 5654dc407927Smrg to runtime path list]) 5655dc407927Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5656dc407927Smrg [Whether libtool must link a program against all its dependency libraries]) 5657dc407927Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5658dc407927Smrg [Set to "yes" if exported symbols are required]) 5659dc407927Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5660dc407927Smrg [The commands to list exported symbols]) 5661dc407927Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5662dc407927Smrg [Symbols that should not be listed in the preloaded symbols]) 5663dc407927Smrg_LT_TAGDECL([], [include_expsyms], [1], 5664dc407927Smrg [Symbols that must always be exported]) 5665dc407927Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5666dc407927Smrg [Commands necessary for linking programs (against libraries) with templates]) 5667dd0822caSmrg_LT_TAGDECL([], [postlink_cmds], [2], 5668dd0822caSmrg [Commands necessary for finishing linking programs]) 5669dc407927Smrg_LT_TAGDECL([], [file_list_spec], [1], 5670dc407927Smrg [Specify filename containing input files]) 5671dc407927Smrgdnl FIXME: Not yet implemented 5672dc407927Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5673dc407927Smrgdnl [Compiler flag to generate thread safe objects]) 5674dc407927Smrg])# _LT_LINKER_SHLIBS 5675dc407927Smrg 5676dc407927Smrg 5677dc407927Smrg# _LT_LANG_C_CONFIG([TAG]) 5678dc407927Smrg# ------------------------ 5679dc407927Smrg# Ensure that the configuration variables for a C compiler are suitably 5680dc407927Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5681dc407927Smrg# the compiler configuration to `libtool'. 5682dc407927Smrgm4_defun([_LT_LANG_C_CONFIG], 5683dc407927Smrg[m4_require([_LT_DECL_EGREP])dnl 5684dc407927Smrglt_save_CC="$CC" 5685dc407927SmrgAC_LANG_PUSH(C) 56863eed67faSmbalmer 5687dc407927Smrg# Source file extension for C test sources. 5688dc407927Smrgac_ext=c 56893eed67faSmbalmer 5690dc407927Smrg# Object file extension for compiled C test sources. 5691dc407927Smrgobjext=o 5692dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 56933eed67faSmbalmer 5694dc407927Smrg# Code to be used in simple compile tests 5695dc407927Smrglt_simple_compile_test_code="int some_variable = 0;" 56963eed67faSmbalmer 5697dc407927Smrg# Code to be used in simple link tests 5698dc407927Smrglt_simple_link_test_code='int main(){return(0);}' 56993eed67faSmbalmer 5700dc407927Smrg_LT_TAG_COMPILER 5701dc407927Smrg# Save the default compiler, since it gets overwritten when the other 5702dc407927Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5703dc407927Smrgcompiler_DEFAULT=$CC 57043eed67faSmbalmer 5705dc407927Smrg# save warnings/boilerplate of simple test code 5706dc407927Smrg_LT_COMPILER_BOILERPLATE 5707dc407927Smrg_LT_LINKER_BOILERPLATE 57083eed67faSmbalmer 5709dc407927Smrgif test -n "$compiler"; then 5710dc407927Smrg _LT_COMPILER_NO_RTTI($1) 5711dc407927Smrg _LT_COMPILER_PIC($1) 5712dc407927Smrg _LT_COMPILER_C_O($1) 5713dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 5714dc407927Smrg _LT_LINKER_SHLIBS($1) 5715dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 5716dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5717dc407927Smrg LT_SYS_DLOPEN_SELF 5718dc407927Smrg _LT_CMD_STRIPLIB 5719dc407927Smrg 5720dc407927Smrg # Report which library types will actually be built 5721dc407927Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5722dc407927Smrg AC_MSG_RESULT([$can_build_shared]) 5723dc407927Smrg 5724dc407927Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5725dc407927Smrg test "$can_build_shared" = "no" && enable_shared=no 5726dc407927Smrg 5727dc407927Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5728dc407927Smrg # are all built from PIC. 5729dc407927Smrg case $host_os in 5730dc407927Smrg aix3*) 5731dc407927Smrg test "$enable_shared" = yes && enable_static=no 5732dc407927Smrg if test -n "$RANLIB"; then 5733dc407927Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5734dc407927Smrg postinstall_cmds='$RANLIB $lib' 5735dc407927Smrg fi 5736dc407927Smrg ;; 57373eed67faSmbalmer 5738dc407927Smrg aix[[4-9]]*) 5739dc407927Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5740dc407927Smrg test "$enable_shared" = yes && enable_static=no 5741dc407927Smrg fi 5742dc407927Smrg ;; 5743dc407927Smrg esac 5744dc407927Smrg AC_MSG_RESULT([$enable_shared]) 57453eed67faSmbalmer 5746dc407927Smrg AC_MSG_CHECKING([whether to build static libraries]) 5747dc407927Smrg # Make sure either enable_shared or enable_static is yes. 5748dc407927Smrg test "$enable_shared" = yes || enable_static=yes 5749dc407927Smrg AC_MSG_RESULT([$enable_static]) 57503eed67faSmbalmer 5751dc407927Smrg _LT_CONFIG($1) 5752dc407927Smrgfi 5753dc407927SmrgAC_LANG_POP 5754dc407927SmrgCC="$lt_save_CC" 5755dc407927Smrg])# _LT_LANG_C_CONFIG 57563eed67faSmbalmer 57573eed67faSmbalmer 5758dc407927Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5759dc407927Smrg# -------------------------- 5760dc407927Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5761dc407927Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5762dc407927Smrg# the compiler configuration to `libtool'. 5763dc407927Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5764dd0822caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5765dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 5766dd0822caSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5767dd0822caSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5768dd0822caSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5769dd0822caSmrg (test "X$CXX" != "Xg++"))) ; then 5770dd0822caSmrg AC_PROG_CXXCPP 5771dd0822caSmrgelse 5772dd0822caSmrg _lt_caught_CXX_error=yes 5773dd0822caSmrgfi 5774dc407927Smrg 5775dc407927SmrgAC_LANG_PUSH(C++) 5776dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5777dc407927Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5778dc407927Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5779dc407927Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5780dc407927Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5781dc407927Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5782dc407927Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5783dc407927Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5784dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5785dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5786dc407927Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5787dc407927Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5788dc407927Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5789dc407927Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5790dc407927Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5791dc407927Smrg_LT_TAGVAR(module_cmds, $1)= 5792dc407927Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5793dc407927Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5794dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5795dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5796dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5797dc407927Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5798dc407927Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5799dc407927Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58003eed67faSmbalmer 5801dc407927Smrg# Source file extension for C++ test sources. 5802dc407927Smrgac_ext=cpp 58033eed67faSmbalmer 5804dc407927Smrg# Object file extension for compiled C++ test sources. 5805dc407927Smrgobjext=o 5806dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 5807dc407927Smrg 5808dc407927Smrg# No sense in running all these tests if we already determined that 5809dc407927Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5810dc407927Smrg# are currently assumed to apply to all compilers on this platform, 5811dc407927Smrg# and will be corrupted by setting them based on a non-working compiler. 5812dc407927Smrgif test "$_lt_caught_CXX_error" != yes; then 5813dc407927Smrg # Code to be used in simple compile tests 5814dc407927Smrg lt_simple_compile_test_code="int some_variable = 0;" 5815dc407927Smrg 5816dc407927Smrg # Code to be used in simple link tests 5817dc407927Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5818dc407927Smrg 5819dc407927Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5820dc407927Smrg _LT_TAG_COMPILER 5821dc407927Smrg 5822dc407927Smrg # save warnings/boilerplate of simple test code 5823dc407927Smrg _LT_COMPILER_BOILERPLATE 5824dc407927Smrg _LT_LINKER_BOILERPLATE 5825dc407927Smrg 5826dc407927Smrg # Allow CC to be a program name with arguments. 5827dc407927Smrg lt_save_CC=$CC 5828dd0822caSmrg lt_save_CFLAGS=$CFLAGS 5829dc407927Smrg lt_save_LD=$LD 5830dc407927Smrg lt_save_GCC=$GCC 5831dc407927Smrg GCC=$GXX 5832dc407927Smrg lt_save_with_gnu_ld=$with_gnu_ld 5833dc407927Smrg lt_save_path_LD=$lt_cv_path_LD 5834dc407927Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5835dc407927Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5836dc407927Smrg else 5837dc407927Smrg $as_unset lt_cv_prog_gnu_ld 5838dc407927Smrg fi 5839dc407927Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5840dc407927Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5841dc407927Smrg else 5842dc407927Smrg $as_unset lt_cv_path_LD 5843dc407927Smrg fi 5844dc407927Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5845dc407927Smrg CC=${CXX-"c++"} 5846dd0822caSmrg CFLAGS=$CXXFLAGS 5847dc407927Smrg compiler=$CC 5848dc407927Smrg _LT_TAGVAR(compiler, $1)=$CC 5849dc407927Smrg _LT_CC_BASENAME([$compiler]) 58503eed67faSmbalmer 5851dc407927Smrg if test -n "$compiler"; then 5852dc407927Smrg # We don't want -fno-exception when compiling C++ code, so set the 5853dc407927Smrg # no_builtin_flag separately 5854dc407927Smrg if test "$GXX" = yes; then 5855dc407927Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5856dc407927Smrg else 5857dc407927Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5858dc407927Smrg fi 58593eed67faSmbalmer 5860dc407927Smrg if test "$GXX" = yes; then 5861dc407927Smrg # Set up default GNU C++ configuration 58623eed67faSmbalmer 5863dc407927Smrg LT_PATH_LD 58643eed67faSmbalmer 5865dc407927Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5866dc407927Smrg # archiving commands below assume that GNU ld is being used. 5867dc407927Smrg if test "$with_gnu_ld" = yes; then 5868dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5869dd0822caSmrg _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' 58703eed67faSmbalmer 5871dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5872dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58733eed67faSmbalmer 5874dc407927Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5875dc407927Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5876dc407927Smrg # investigate it a little bit more. (MM) 5877dc407927Smrg wlarc='${wl}' 58783eed67faSmbalmer 5879dc407927Smrg # ancient GNU ld didn't support --whole-archive et. al. 5880dc407927Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5881dc407927Smrg $GREP 'no-whole-archive' > /dev/null; then 5882dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5883dc407927Smrg else 5884dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5885dc407927Smrg fi 5886dc407927Smrg else 5887dc407927Smrg with_gnu_ld=no 5888dc407927Smrg wlarc= 5889dc407927Smrg 5890dc407927Smrg # A generic and very simple default shared library creation 5891dc407927Smrg # command for GNU C++ for the case where it uses the native 5892dc407927Smrg # linker, instead of GNU ld. If possible, this setting should 5893dc407927Smrg # overridden to take advantage of the native linker features on 5894dc407927Smrg # the platform it is being used on. 5895dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5896dc407927Smrg fi 58973eed67faSmbalmer 5898dc407927Smrg # Commands to make compiler produce verbose output that lists 5899dc407927Smrg # what "hidden" libraries, object files and flags are used when 5900dc407927Smrg # linking a shared library. 5901dd0822caSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 59023eed67faSmbalmer 5903dc407927Smrg else 5904dc407927Smrg GXX=no 5905dc407927Smrg with_gnu_ld=no 5906dc407927Smrg wlarc= 5907dc407927Smrg fi 59083eed67faSmbalmer 5909dc407927Smrg # PORTME: fill in a description of your system's C++ link characteristics 5910dc407927Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5911dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5912dc407927Smrg case $host_os in 5913dc407927Smrg aix3*) 5914dc407927Smrg # FIXME: insert proper C++ library support 5915dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5916dc407927Smrg ;; 5917dc407927Smrg aix[[4-9]]*) 5918dc407927Smrg if test "$host_cpu" = ia64; then 5919dc407927Smrg # On IA64, the linker does run time linking by default, so we don't 5920dc407927Smrg # have to do anything special. 5921dc407927Smrg aix_use_runtimelinking=no 5922dc407927Smrg exp_sym_flag='-Bexport' 5923dc407927Smrg no_entry_flag="" 5924dc407927Smrg else 5925dc407927Smrg aix_use_runtimelinking=no 5926dc407927Smrg 5927dc407927Smrg # Test if we are trying to use run time linking or normal 5928dc407927Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5929dc407927Smrg # need to do runtime linking. 5930dc407927Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5931dc407927Smrg for ld_flag in $LDFLAGS; do 5932dc407927Smrg case $ld_flag in 5933dc407927Smrg *-brtl*) 5934dc407927Smrg aix_use_runtimelinking=yes 5935dc407927Smrg break 5936dc407927Smrg ;; 5937dc407927Smrg esac 5938dc407927Smrg done 5939dc407927Smrg ;; 5940dc407927Smrg esac 59413eed67faSmbalmer 5942dc407927Smrg exp_sym_flag='-bexport' 5943dc407927Smrg no_entry_flag='-bnoentry' 5944dc407927Smrg fi 59453eed67faSmbalmer 5946dc407927Smrg # When large executables or shared objects are built, AIX ld can 5947dc407927Smrg # have problems creating the table of contents. If linking a library 5948dc407927Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5949dc407927Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5950dc407927Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5951dc407927Smrg 5952dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='' 5953dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5954dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5955dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5956dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5957dc407927Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5958dc407927Smrg 5959dc407927Smrg if test "$GXX" = yes; then 5960dc407927Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5961dc407927Smrg # We only want to do this on AIX 4.2 and lower, the check 5962dc407927Smrg # below for broken collect2 doesn't work under 4.3+ 5963dc407927Smrg collect2name=`${CC} -print-prog-name=collect2` 5964dc407927Smrg if test -f "$collect2name" && 5965dc407927Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5966dc407927Smrg then 5967dc407927Smrg # We have reworked collect2 5968dc407927Smrg : 5969dc407927Smrg else 5970dc407927Smrg # We have old collect2 5971dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5972dc407927Smrg # It fails to find uninstalled libraries when the uninstalled 5973dc407927Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5974dc407927Smrg # to unsupported forces relinking 5975dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5976dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5977dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5978dc407927Smrg fi 5979dc407927Smrg esac 5980dc407927Smrg shared_flag='-shared' 5981dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 5982dc407927Smrg shared_flag="$shared_flag "'${wl}-G' 5983dc407927Smrg fi 5984dc407927Smrg else 5985dc407927Smrg # not using gcc 5986dc407927Smrg if test "$host_cpu" = ia64; then 5987dc407927Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5988dc407927Smrg # chokes on -Wl,-G. The following line is correct: 5989dc407927Smrg shared_flag='-G' 5990dc407927Smrg else 5991dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 5992dc407927Smrg shared_flag='${wl}-G' 5993dc407927Smrg else 5994dc407927Smrg shared_flag='${wl}-bM:SRE' 5995dc407927Smrg fi 5996dc407927Smrg fi 5997dc407927Smrg fi 59983eed67faSmbalmer 5999dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6000dc407927Smrg # It seems that -bexpall does not export symbols beginning with 6001dc407927Smrg # underscore (_), so it is better to generate a list of symbols to 6002dc407927Smrg # export. 6003dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6004dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 6005dc407927Smrg # Warning - without using the other runtime loading flags (-brtl), 6006dc407927Smrg # -berok will link without error, but may produce a broken library. 6007dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6008dc407927Smrg # Determine the default libpath from the value encoded in an empty 6009dc407927Smrg # executable. 6010dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6011dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6012dc407927Smrg 6013dd0822caSmrg _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" 6014dc407927Smrg else 6015dc407927Smrg if test "$host_cpu" = ia64; then 6016dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6017dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6018dc407927Smrg _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" 6019dc407927Smrg else 6020dc407927Smrg # Determine the default libpath from the value encoded in an 6021dc407927Smrg # empty executable. 6022dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6023dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6024dc407927Smrg # Warning - without using the other run time loading flags, 6025dc407927Smrg # -berok will link without error, but may produce a broken library. 6026dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6027dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6028dd0822caSmrg if test "$with_gnu_ld" = yes; then 6029dd0822caSmrg # We only use this code for GNU lds that support --whole-archive. 6030dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6031dd0822caSmrg else 6032dd0822caSmrg # Exported symbols can be pulled into shared objects from archives 6033dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6034dd0822caSmrg fi 6035dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6036dc407927Smrg # This is similar to how AIX traditionally builds its shared 6037dc407927Smrg # libraries. 6038dc407927Smrg _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' 6039dc407927Smrg fi 6040dc407927Smrg fi 6041dc407927Smrg ;; 60423eed67faSmbalmer 6043dc407927Smrg beos*) 6044dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6045dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6046dc407927Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6047dc407927Smrg # support --undefined. This deserves some investigation. FIXME 6048dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6049dc407927Smrg else 6050dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6051dc407927Smrg fi 6052dc407927Smrg ;; 60533eed67faSmbalmer 6054dc407927Smrg chorus*) 6055dc407927Smrg case $cc_basename in 6056dc407927Smrg *) 6057dc407927Smrg # FIXME: insert proper C++ library support 6058dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6059dc407927Smrg ;; 6060dd0822caSmrg esac 6061dd0822caSmrg ;; 6062dd0822caSmrg 6063dd0822caSmrg cygwin* | mingw* | pw32* | cegcc*) 6064dd0822caSmrg case $GXX,$cc_basename in 6065dd0822caSmrg ,cl* | no,cl*) 6066dd0822caSmrg # Native MSVC 6067dd0822caSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6068dd0822caSmrg # no search path for DLLs. 6069dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6070dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6071dd0822caSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072dd0822caSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6073dd0822caSmrg # Tell ltmain to make .lib files, not .a files. 6074dd0822caSmrg libext=lib 6075dd0822caSmrg # Tell ltmain to make .dll files, not .so files. 6076dd0822caSmrg shrext_cmds=".dll" 6077dd0822caSmrg # FIXME: Setting linknames here is a bad hack. 6078dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6079dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6080dd0822caSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6081dd0822caSmrg else 6082dd0822caSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6083dd0822caSmrg fi~ 6084dd0822caSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6085dd0822caSmrg linknames=' 6086dd0822caSmrg # The linker will not automatically build a static lib if we build a DLL. 6087dd0822caSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6088dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6089dd0822caSmrg # Don't use ranlib 6090dd0822caSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6091dd0822caSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6092dd0822caSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6093dd0822caSmrg case $lt_outputfile in 6094dd0822caSmrg *.exe|*.EXE) ;; 6095dd0822caSmrg *) 6096dd0822caSmrg lt_outputfile="$lt_outputfile.exe" 6097dd0822caSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6098dd0822caSmrg ;; 6099dd0822caSmrg esac~ 6100dd0822caSmrg func_to_tool_file "$lt_outputfile"~ 6101dd0822caSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6102dd0822caSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6103dd0822caSmrg $RM "$lt_outputfile.manifest"; 6104dd0822caSmrg fi' 6105dd0822caSmrg ;; 6106dd0822caSmrg *) 6107dd0822caSmrg # g++ 6108dd0822caSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6109dd0822caSmrg # as there is no search path for DLLs. 6110dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6111dd0822caSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6112dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6113dd0822caSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6114dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6115dd0822caSmrg 6116dd0822caSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6117dd0822caSmrg _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' 6118dd0822caSmrg # If the export-symbols file already is a .def file (1st line 6119dd0822caSmrg # is EXPORTS), use it as is; otherwise, prepend... 6120dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6121dd0822caSmrg cp $export_symbols $output_objdir/$soname.def; 6122dd0822caSmrg else 6123dd0822caSmrg echo EXPORTS > $output_objdir/$soname.def; 6124dd0822caSmrg cat $export_symbols >> $output_objdir/$soname.def; 6125dd0822caSmrg fi~ 6126dd0822caSmrg $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' 6127dd0822caSmrg else 6128dd0822caSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6129dd0822caSmrg fi 6130dd0822caSmrg ;; 6131dd0822caSmrg esac 6132dd0822caSmrg ;; 6133dc407927Smrg darwin* | rhapsody*) 6134dc407927Smrg _LT_DARWIN_LINKER_FEATURES($1) 6135dc407927Smrg ;; 61363eed67faSmbalmer 6137dc407927Smrg dgux*) 6138dc407927Smrg case $cc_basename in 6139dc407927Smrg ec++*) 6140dc407927Smrg # FIXME: insert proper C++ library support 6141dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6142dc407927Smrg ;; 6143dc407927Smrg ghcx*) 6144dc407927Smrg # Green Hills C++ Compiler 6145dc407927Smrg # FIXME: insert proper C++ library support 6146dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6147dc407927Smrg ;; 6148dc407927Smrg *) 6149dc407927Smrg # FIXME: insert proper C++ library support 6150dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6151dc407927Smrg ;; 6152dc407927Smrg esac 6153dc407927Smrg ;; 61543eed67faSmbalmer 6155dc407927Smrg freebsd[[12]]*) 6156dc407927Smrg # C++ shared libraries reported to be fairly broken before 6157dc407927Smrg # switch to ELF 6158dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6159dc407927Smrg ;; 61603eed67faSmbalmer 6161dc407927Smrg freebsd-elf*) 6162dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6163dc407927Smrg ;; 6164dc407927Smrg 6165dc407927Smrg freebsd* | dragonfly*) 6166dc407927Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6167dc407927Smrg # conventions 6168dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6169dc407927Smrg ;; 61703eed67faSmbalmer 6171dc407927Smrg gnu*) 6172dc407927Smrg ;; 61733eed67faSmbalmer 6174dd0822caSmrg haiku*) 6175dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6176dd0822caSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6177dd0822caSmrg ;; 6178dd0822caSmrg 6179dc407927Smrg hpux9*) 6180dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6181dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6182dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6183dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6184dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6185dc407927Smrg # but as the default 6186dc407927Smrg # location of the library. 6187dc407927Smrg 6188dc407927Smrg case $cc_basename in 6189dc407927Smrg CC*) 6190dc407927Smrg # FIXME: insert proper C++ library support 6191dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6192dc407927Smrg ;; 6193dc407927Smrg aCC*) 6194dc407927Smrg _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' 6195dc407927Smrg # Commands to make compiler produce verbose output that lists 6196dc407927Smrg # what "hidden" libraries, object files and flags are used when 6197dc407927Smrg # linking a shared library. 6198dc407927Smrg # 6199dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6200dc407927Smrg # explicitly linking system object files so we need to strip them 6201dc407927Smrg # from the output so that they don't get included in the library 6202dc407927Smrg # dependencies. 6203dd0822caSmrg 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"' 6204dc407927Smrg ;; 6205dc407927Smrg *) 6206dc407927Smrg if test "$GXX" = yes; then 6207dd0822caSmrg _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' 6208dc407927Smrg else 6209dc407927Smrg # FIXME: insert proper C++ library support 6210dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6211dc407927Smrg fi 6212dc407927Smrg ;; 6213dc407927Smrg esac 6214dc407927Smrg ;; 62153eed67faSmbalmer 6216dc407927Smrg hpux10*|hpux11*) 6217dc407927Smrg if test $with_gnu_ld = no; then 6218dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6219dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6220dc407927Smrg 6221dc407927Smrg case $host_cpu in 6222dc407927Smrg hppa*64*|ia64*) 6223dc407927Smrg ;; 6224dc407927Smrg *) 6225dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6226dc407927Smrg ;; 6227dc407927Smrg esac 6228dc407927Smrg fi 6229dc407927Smrg case $host_cpu in 6230dc407927Smrg hppa*64*|ia64*) 6231dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6232dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6233dc407927Smrg ;; 6234dc407927Smrg *) 6235dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6236dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6237dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6238dc407927Smrg # but as the default 6239dc407927Smrg # location of the library. 6240dc407927Smrg ;; 6241dc407927Smrg esac 6242dc407927Smrg 6243dc407927Smrg case $cc_basename in 6244dc407927Smrg CC*) 6245dc407927Smrg # FIXME: insert proper C++ library support 6246dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6247dc407927Smrg ;; 6248dc407927Smrg aCC*) 6249dc407927Smrg case $host_cpu in 6250dc407927Smrg hppa*64*) 6251dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6252dc407927Smrg ;; 6253dc407927Smrg ia64*) 6254dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6255dc407927Smrg ;; 6256dc407927Smrg *) 6257dc407927Smrg _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' 6258dc407927Smrg ;; 6259dc407927Smrg esac 6260dc407927Smrg # Commands to make compiler produce verbose output that lists 6261dc407927Smrg # what "hidden" libraries, object files and flags are used when 6262dc407927Smrg # linking a shared library. 6263dc407927Smrg # 6264dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6265dc407927Smrg # explicitly linking system object files so we need to strip them 6266dc407927Smrg # from the output so that they don't get included in the library 6267dc407927Smrg # dependencies. 6268dd0822caSmrg 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"' 6269dc407927Smrg ;; 6270dc407927Smrg *) 6271dc407927Smrg if test "$GXX" = yes; then 6272dc407927Smrg if test $with_gnu_ld = no; then 6273dc407927Smrg case $host_cpu in 6274dc407927Smrg hppa*64*) 6275dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6276dc407927Smrg ;; 6277dc407927Smrg ia64*) 6278dd0822caSmrg _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' 6279dc407927Smrg ;; 6280dc407927Smrg *) 6281dd0822caSmrg _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' 6282dc407927Smrg ;; 6283dc407927Smrg esac 6284dc407927Smrg fi 6285dc407927Smrg else 6286dc407927Smrg # FIXME: insert proper C++ library support 6287dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6288dc407927Smrg fi 6289dc407927Smrg ;; 6290dc407927Smrg esac 6291dc407927Smrg ;; 62923eed67faSmbalmer 6293dc407927Smrg interix[[3-9]]*) 6294dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6295dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6296dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6297dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6298dc407927Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6299dc407927Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6300dc407927Smrg # default) and relocated if they conflict, which is a slow very memory 6301dc407927Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6302dc407927Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6303dc407927Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6304dc407927Smrg _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' 6305dc407927Smrg _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' 6306dc407927Smrg ;; 6307dc407927Smrg irix5* | irix6*) 6308dc407927Smrg case $cc_basename in 6309dc407927Smrg CC*) 6310dc407927Smrg # SGI C++ 6311dd0822caSmrg _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' 6312dc407927Smrg 6313dc407927Smrg # Archives containing C++ object files must be created using 6314dc407927Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6315dc407927Smrg # necessary to make sure instantiated templates are included 6316dc407927Smrg # in the archive. 6317dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6318dc407927Smrg ;; 6319dc407927Smrg *) 6320dc407927Smrg if test "$GXX" = yes; then 6321dc407927Smrg if test "$with_gnu_ld" = no; then 6322dd0822caSmrg _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' 6323dc407927Smrg else 6324dd0822caSmrg _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' 6325dc407927Smrg fi 6326dc407927Smrg fi 6327dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6328dc407927Smrg ;; 6329dc407927Smrg esac 6330dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6331dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6332dc407927Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6333dc407927Smrg ;; 63343eed67faSmbalmer 6335dd0822caSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6336dc407927Smrg case $cc_basename in 6337dc407927Smrg KCC*) 6338dc407927Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6339dc407927Smrg 6340dc407927Smrg # KCC will only create a shared library if the output file 6341dc407927Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6342dc407927Smrg # to its proper name (with version) after linking. 6343dc407927Smrg _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' 6344dc407927Smrg _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' 6345dc407927Smrg # Commands to make compiler produce verbose output that lists 6346dc407927Smrg # what "hidden" libraries, object files and flags are used when 6347dc407927Smrg # linking a shared library. 6348dc407927Smrg # 6349dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6350dc407927Smrg # explicitly linking system object files so we need to strip them 6351dc407927Smrg # from the output so that they don't get included in the library 6352dc407927Smrg # dependencies. 6353dd0822caSmrg 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"' 6354dc407927Smrg 6355dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6356dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6357dc407927Smrg 6358dc407927Smrg # Archives containing C++ object files must be created using 6359dc407927Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6360dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6361dc407927Smrg ;; 6362dc407927Smrg icpc* | ecpc* ) 6363dc407927Smrg # Intel C++ 6364dc407927Smrg with_gnu_ld=yes 6365dc407927Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6366dc407927Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6367dc407927Smrg # earlier do not add the objects themselves. 6368dc407927Smrg case `$CC -V 2>&1` in 6369dc407927Smrg *"Version 7."*) 6370dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6371dc407927Smrg _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' 6372dc407927Smrg ;; 6373dc407927Smrg *) # Version 8.0 or newer 6374dc407927Smrg tmp_idyn= 6375dc407927Smrg case $host_cpu in 6376dc407927Smrg ia64*) tmp_idyn=' -i_dynamic';; 6377dc407927Smrg esac 6378dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6379dc407927Smrg _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' 6380dc407927Smrg ;; 6381dc407927Smrg esac 6382dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6383dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6384dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6385dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6386dc407927Smrg ;; 6387dc407927Smrg pgCC* | pgcpp*) 6388dc407927Smrg # Portland Group C++ compiler 6389dc407927Smrg case `$CC -V` in 6390dd0822caSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6391dc407927Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6392dc407927Smrg rm -rf $tpldir~ 6393dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6394dd0822caSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6395dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6396dc407927Smrg rm -rf $tpldir~ 6397dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6398dd0822caSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6399dc407927Smrg $RANLIB $oldlib' 6400dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6401dc407927Smrg rm -rf $tpldir~ 6402dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6403dd0822caSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6404dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6405dc407927Smrg rm -rf $tpldir~ 6406dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6407dd0822caSmrg $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' 6408dc407927Smrg ;; 6409dd0822caSmrg *) # Version 6 and above use weak symbols 6410dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6411dc407927Smrg _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' 6412dc407927Smrg ;; 6413dc407927Smrg esac 64143eed67faSmbalmer 6415dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6416dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6417dd0822caSmrg _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' 6418dc407927Smrg ;; 6419dc407927Smrg cxx*) 6420dc407927Smrg # Compaq C++ 6421dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6422dc407927Smrg _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' 64233eed67faSmbalmer 6424dc407927Smrg runpath_var=LD_RUN_PATH 6425dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6426dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64273eed67faSmbalmer 6428dc407927Smrg # Commands to make compiler produce verbose output that lists 6429dc407927Smrg # what "hidden" libraries, object files and flags are used when 6430dc407927Smrg # linking a shared library. 6431dc407927Smrg # 6432dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6433dc407927Smrg # explicitly linking system object files so we need to strip them 6434dc407927Smrg # from the output so that they don't get included in the library 6435dc407927Smrg # dependencies. 6436dd0822caSmrg 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' 6437dc407927Smrg ;; 6438dd0822caSmrg xl* | mpixl* | bgxl*) 6439dc407927Smrg # IBM XL 8.0 on PPC, with GNU ld 6440dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6441dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6442dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6443dc407927Smrg if test "x$supports_anon_versioning" = xyes; then 6444dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6445dc407927Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6446dc407927Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6447dc407927Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6448dc407927Smrg fi 6449dc407927Smrg ;; 6450dc407927Smrg *) 6451dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 6452dc407927Smrg *Sun\ C*) 6453dc407927Smrg # Sun C++ 5.9 6454dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6455dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6456dc407927Smrg _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' 6457dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6458dd0822caSmrg _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' 6459dc407927Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6460dc407927Smrg 6461dc407927Smrg # Not sure whether something based on 6462dc407927Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6463dc407927Smrg # would be better. 6464dd0822caSmrg output_verbose_link_cmd='func_echo_all' 6465dc407927Smrg 6466dc407927Smrg # Archives containing C++ object files must be created using 6467dc407927Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6468dc407927Smrg # necessary to make sure instantiated templates are included 6469dc407927Smrg # in the archive. 6470dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6471dc407927Smrg ;; 6472dc407927Smrg esac 6473dc407927Smrg ;; 6474dc407927Smrg esac 6475dc407927Smrg ;; 64763eed67faSmbalmer 6477dc407927Smrg lynxos*) 6478dc407927Smrg # FIXME: insert proper C++ library support 6479dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6480dc407927Smrg ;; 64813eed67faSmbalmer 6482dc407927Smrg m88k*) 6483dc407927Smrg # FIXME: insert proper C++ library support 6484dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6485dc407927Smrg ;; 64863eed67faSmbalmer 6487dc407927Smrg mvs*) 6488dc407927Smrg case $cc_basename in 6489dc407927Smrg cxx*) 6490dc407927Smrg # FIXME: insert proper C++ library support 6491dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6492dc407927Smrg ;; 6493dc407927Smrg *) 6494dc407927Smrg # FIXME: insert proper C++ library support 6495dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6496dc407927Smrg ;; 6497dc407927Smrg esac 6498dc407927Smrg ;; 64993eed67faSmbalmer 6500dc407927Smrg netbsd*) 6501dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6502dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6503dc407927Smrg wlarc= 6504dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6505dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6506dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6507dc407927Smrg fi 6508dc407927Smrg # Workaround some broken pre-1.5 toolchains 6509dc407927Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6510dc407927Smrg ;; 65113eed67faSmbalmer 6512dc407927Smrg *nto* | *qnx*) 6513dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6514dc407927Smrg ;; 65153eed67faSmbalmer 6516dc407927Smrg openbsd2*) 6517dc407927Smrg # C++ shared libraries are fairly broken 6518dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6519dc407927Smrg ;; 65203eed67faSmbalmer 6521dc407927Smrg openbsd*) 6522dc407927Smrg if test -f /usr/libexec/ld.so; then 6523dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6524dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6525dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6526dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6527dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6528dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6529dc407927Smrg _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' 6530dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6531dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6532dc407927Smrg fi 6533dd0822caSmrg output_verbose_link_cmd=func_echo_all 6534dc407927Smrg else 6535dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6536dc407927Smrg fi 6537dc407927Smrg ;; 65383eed67faSmbalmer 6539dc407927Smrg osf3* | osf4* | osf5*) 6540dc407927Smrg case $cc_basename in 6541dc407927Smrg KCC*) 6542dc407927Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6543dc407927Smrg 6544dc407927Smrg # KCC will only create a shared library if the output file 6545dc407927Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6546dc407927Smrg # to its proper name (with version) after linking. 6547dc407927Smrg _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' 6548dc407927Smrg 6549dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6550dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6551dc407927Smrg 6552dc407927Smrg # Archives containing C++ object files must be created using 6553dc407927Smrg # the KAI C++ compiler. 6554dc407927Smrg case $host in 6555dc407927Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6556dc407927Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6557dc407927Smrg esac 6558dc407927Smrg ;; 6559dc407927Smrg RCC*) 6560dc407927Smrg # Rational C++ 2.4.1 6561dc407927Smrg # FIXME: insert proper C++ library support 6562dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6563dc407927Smrg ;; 6564dc407927Smrg cxx*) 6565dc407927Smrg case $host in 6566dc407927Smrg osf3*) 6567dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6568dd0822caSmrg _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' 6569dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6570dc407927Smrg ;; 6571dc407927Smrg *) 6572dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6573dd0822caSmrg _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' 6574dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6575dc407927Smrg echo "-hidden">> $lib.exp~ 6576dd0822caSmrg $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~ 6577dc407927Smrg $RM $lib.exp' 6578dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6579dc407927Smrg ;; 6580dc407927Smrg esac 65813eed67faSmbalmer 6582dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65833eed67faSmbalmer 6584dc407927Smrg # Commands to make compiler produce verbose output that lists 6585dc407927Smrg # what "hidden" libraries, object files and flags are used when 6586dc407927Smrg # linking a shared library. 6587dc407927Smrg # 6588dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6589dc407927Smrg # explicitly linking system object files so we need to strip them 6590dc407927Smrg # from the output so that they don't get included in the library 6591dc407927Smrg # dependencies. 6592dd0822caSmrg 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"' 6593dc407927Smrg ;; 6594dc407927Smrg *) 6595dc407927Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6596dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6597dc407927Smrg case $host in 6598dc407927Smrg osf3*) 6599dd0822caSmrg _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' 6600dc407927Smrg ;; 6601dc407927Smrg *) 6602dd0822caSmrg _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' 6603dc407927Smrg ;; 6604dc407927Smrg esac 6605dc407927Smrg 6606dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6607dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6608dc407927Smrg 6609dc407927Smrg # Commands to make compiler produce verbose output that lists 6610dc407927Smrg # what "hidden" libraries, object files and flags are used when 6611dc407927Smrg # linking a shared library. 6612dd0822caSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6613dc407927Smrg 6614dc407927Smrg else 6615dc407927Smrg # FIXME: insert proper C++ library support 6616dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6617dc407927Smrg fi 6618dc407927Smrg ;; 6619dc407927Smrg esac 6620dc407927Smrg ;; 66213eed67faSmbalmer 6622dc407927Smrg psos*) 6623dc407927Smrg # FIXME: insert proper C++ library support 6624dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6625dc407927Smrg ;; 66263eed67faSmbalmer 6627dc407927Smrg sunos4*) 6628dc407927Smrg case $cc_basename in 6629dc407927Smrg CC*) 6630dc407927Smrg # Sun C++ 4.x 6631dc407927Smrg # FIXME: insert proper C++ library support 6632dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6633dc407927Smrg ;; 6634dc407927Smrg lcc*) 6635dc407927Smrg # Lucid 6636dc407927Smrg # FIXME: insert proper C++ library support 6637dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6638dc407927Smrg ;; 6639dc407927Smrg *) 6640dc407927Smrg # FIXME: insert proper C++ library support 6641dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6642dc407927Smrg ;; 6643dc407927Smrg esac 6644dc407927Smrg ;; 66453eed67faSmbalmer 6646dc407927Smrg solaris*) 6647dc407927Smrg case $cc_basename in 6648dd0822caSmrg CC* | sunCC*) 6649dc407927Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6650dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6651dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6652dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6653dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6654dc407927Smrg $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' 6655dc407927Smrg 6656dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6657dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6658dc407927Smrg case $host_os in 6659dc407927Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6660dc407927Smrg *) 6661dc407927Smrg # The compiler driver will combine and reorder linker options, 6662dc407927Smrg # but understands `-z linker_flag'. 6663dc407927Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6664dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6665dc407927Smrg ;; 6666dc407927Smrg esac 6667dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66683eed67faSmbalmer 6669dd0822caSmrg output_verbose_link_cmd='func_echo_all' 66703eed67faSmbalmer 6671dc407927Smrg # Archives containing C++ object files must be created using 6672dc407927Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6673dc407927Smrg # necessary to make sure instantiated templates are included 6674dc407927Smrg # in the archive. 6675dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6676dc407927Smrg ;; 6677dc407927Smrg gcx*) 6678dc407927Smrg # Green Hills C++ Compiler 6679dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 66803eed67faSmbalmer 6681dc407927Smrg # The C++ compiler must be used to create the archive. 6682dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6683dc407927Smrg ;; 6684dc407927Smrg *) 6685dc407927Smrg # GNU C++ compiler with Solaris linker 6686dc407927Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6687dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6688dc407927Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6689dd0822caSmrg _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' 6690dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6691dd0822caSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6692dc407927Smrg 6693dc407927Smrg # Commands to make compiler produce verbose output that lists 6694dc407927Smrg # what "hidden" libraries, object files and flags are used when 6695dc407927Smrg # linking a shared library. 6696dd0822caSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6697dc407927Smrg else 6698dc407927Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6699dc407927Smrg # platform. 6700dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6701dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6702dc407927Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6703dc407927Smrg 6704dc407927Smrg # Commands to make compiler produce verbose output that lists 6705dc407927Smrg # what "hidden" libraries, object files and flags are used when 6706dc407927Smrg # linking a shared library. 6707dd0822caSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6708dc407927Smrg fi 6709dc407927Smrg 6710dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6711dc407927Smrg case $host_os in 6712dc407927Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6713dc407927Smrg *) 6714dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6715dc407927Smrg ;; 6716dc407927Smrg esac 6717dc407927Smrg fi 6718dc407927Smrg ;; 6719dc407927Smrg esac 6720dc407927Smrg ;; 67213eed67faSmbalmer 6722dc407927Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6723dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6724dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6725dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726dc407927Smrg runpath_var='LD_RUN_PATH' 67273eed67faSmbalmer 6728dc407927Smrg case $cc_basename in 6729dc407927Smrg CC*) 6730dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6731dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6732dc407927Smrg ;; 6733dc407927Smrg *) 6734dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6735dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6736dc407927Smrg ;; 6737dc407927Smrg esac 6738dc407927Smrg ;; 67393eed67faSmbalmer 6740dc407927Smrg sysv5* | sco3.2v5* | sco5v6*) 6741dc407927Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6742dc407927Smrg # link with -lc, and that would cause any symbols used from libc to 6743dc407927Smrg # always be unresolved, which means just about no library would 6744dc407927Smrg # ever link correctly. If we're not using GNU ld we use -z text 6745dc407927Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6746dc407927Smrg # as -z defs. 6747dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6748dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6749dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6750dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6751dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6752dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6753dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6754dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6755dc407927Smrg runpath_var='LD_RUN_PATH' 67563eed67faSmbalmer 6757dc407927Smrg case $cc_basename in 6758dc407927Smrg CC*) 6759dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6760dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6761dd0822caSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6762dd0822caSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6763dd0822caSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6764dd0822caSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 6765dc407927Smrg ;; 6766dc407927Smrg *) 6767dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6768dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6769dc407927Smrg ;; 6770dc407927Smrg esac 6771dc407927Smrg ;; 67723eed67faSmbalmer 6773dc407927Smrg tandem*) 6774dc407927Smrg case $cc_basename in 6775dc407927Smrg NCC*) 6776dc407927Smrg # NonStop-UX NCC 3.20 6777dc407927Smrg # FIXME: insert proper C++ library support 6778dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6779dc407927Smrg ;; 6780dc407927Smrg *) 6781dc407927Smrg # FIXME: insert proper C++ library support 6782dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6783dc407927Smrg ;; 6784dc407927Smrg esac 6785dc407927Smrg ;; 67863eed67faSmbalmer 6787dc407927Smrg vxworks*) 6788dc407927Smrg # FIXME: insert proper C++ library support 6789dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6790dc407927Smrg ;; 67913eed67faSmbalmer 6792dc407927Smrg *) 6793dc407927Smrg # FIXME: insert proper C++ library support 6794dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6795dc407927Smrg ;; 6796dc407927Smrg esac 67973eed67faSmbalmer 6798dc407927Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6799dc407927Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6800dc407927Smrg 6801dc407927Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6802dc407927Smrg _LT_TAGVAR(LD, $1)="$LD" 6803dc407927Smrg 6804dc407927Smrg ## CAVEAT EMPTOR: 6805dc407927Smrg ## There is no encapsulation within the following macros, do not change 6806dc407927Smrg ## the running order or otherwise move them around unless you know exactly 6807dc407927Smrg ## what you are doing... 6808dc407927Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6809dc407927Smrg _LT_COMPILER_PIC($1) 6810dc407927Smrg _LT_COMPILER_C_O($1) 6811dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 6812dc407927Smrg _LT_LINKER_SHLIBS($1) 6813dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 6814dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6815dc407927Smrg 6816dc407927Smrg _LT_CONFIG($1) 6817dc407927Smrg fi # test -n "$compiler" 6818dc407927Smrg 6819dc407927Smrg CC=$lt_save_CC 6820dd0822caSmrg CFLAGS=$lt_save_CFLAGS 6821dc407927Smrg LDCXX=$LD 6822dc407927Smrg LD=$lt_save_LD 6823dc407927Smrg GCC=$lt_save_GCC 6824dc407927Smrg with_gnu_ld=$lt_save_with_gnu_ld 6825dc407927Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6826dc407927Smrg lt_cv_path_LD=$lt_save_path_LD 6827dc407927Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6828dc407927Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6829dc407927Smrgfi # test "$_lt_caught_CXX_error" != yes 68303eed67faSmbalmer 6831dc407927SmrgAC_LANG_POP 6832dc407927Smrg])# _LT_LANG_CXX_CONFIG 68333eed67faSmbalmer 68343eed67faSmbalmer 6835dd0822caSmrg# _LT_FUNC_STRIPNAME_CNF 6836dd0822caSmrg# ---------------------- 6837dd0822caSmrg# func_stripname_cnf prefix suffix name 6838dd0822caSmrg# strip PREFIX and SUFFIX off of NAME. 6839dd0822caSmrg# PREFIX and SUFFIX must not contain globbing or regex special 6840dd0822caSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6841dd0822caSmrg# dot (in which case that matches only a dot). 6842dd0822caSmrg# 6843dd0822caSmrg# This function is identical to the (non-XSI) version of func_stripname, 6844dd0822caSmrg# except this one can be used by m4 code that may be executed by configure, 6845dd0822caSmrg# rather than the libtool script. 6846dd0822caSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6847dd0822caSmrgAC_REQUIRE([_LT_DECL_SED]) 6848dd0822caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6849dd0822caSmrgfunc_stripname_cnf () 6850dd0822caSmrg{ 6851dd0822caSmrg case ${2} in 6852dd0822caSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6853dd0822caSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6854dd0822caSmrg esac 6855dd0822caSmrg} # func_stripname_cnf 6856dd0822caSmrg])# _LT_FUNC_STRIPNAME_CNF 6857dd0822caSmrg 6858dc407927Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6859dc407927Smrg# --------------------------------- 6860dc407927Smrg# Figure out "hidden" library dependencies from verbose 6861dc407927Smrg# compiler output when linking a shared library. 6862dc407927Smrg# Parse the compiler output and extract the necessary 6863dc407927Smrg# objects, libraries and library flags. 6864dc407927Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6865dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6866dd0822caSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6867dc407927Smrg# Dependencies to place before and after the object being linked: 6868dc407927Smrg_LT_TAGVAR(predep_objects, $1)= 6869dc407927Smrg_LT_TAGVAR(postdep_objects, $1)= 6870dc407927Smrg_LT_TAGVAR(predeps, $1)= 6871dc407927Smrg_LT_TAGVAR(postdeps, $1)= 6872dc407927Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 68733eed67faSmbalmer 6874dc407927Smrgdnl we can't use the lt_simple_compile_test_code here, 6875dc407927Smrgdnl because it contains code intended for an executable, 6876dc407927Smrgdnl not a library. It's possible we should let each 6877dc407927Smrgdnl tag define a new lt_????_link_test_code variable, 6878dc407927Smrgdnl but it's only used here... 6879dc407927Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6880dc407927Smrgint a; 6881dc407927Smrgvoid foo (void) { a = 0; } 6882dc407927Smrg_LT_EOF 6883dc407927Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6884dc407927Smrgclass Foo 6885dc407927Smrg{ 6886dc407927Smrgpublic: 6887dc407927Smrg Foo (void) { a = 0; } 6888dc407927Smrgprivate: 6889dc407927Smrg int a; 6890dc407927Smrg}; 6891dc407927Smrg_LT_EOF 6892dc407927Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6893dc407927Smrg subroutine foo 6894dc407927Smrg implicit none 6895dc407927Smrg integer*4 a 6896dc407927Smrg a=0 6897dc407927Smrg return 6898dc407927Smrg end 6899dc407927Smrg_LT_EOF 6900dc407927Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6901dc407927Smrg subroutine foo 6902dc407927Smrg implicit none 6903dc407927Smrg integer a 6904dc407927Smrg a=0 6905dc407927Smrg return 6906dc407927Smrg end 6907dc407927Smrg_LT_EOF 6908dc407927Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6909dc407927Smrgpublic class foo { 6910dc407927Smrg private int a; 6911dc407927Smrg public void bar (void) { 6912dc407927Smrg a = 0; 6913dc407927Smrg } 6914dc407927Smrg}; 6915dc407927Smrg_LT_EOF 6916dc407927Smrg]) 6917dd0822caSmrg 6918dd0822caSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 6919dd0822caSmrgcase "$CC $CFLAGS " in #( 6920dd0822caSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6921dd0822caSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6922dd0822caSmrgesac 6923dd0822caSmrg 6924dc407927Smrgdnl Parse the compiler output and extract the necessary 6925dc407927Smrgdnl objects, libraries and library flags. 6926dc407927Smrgif AC_TRY_EVAL(ac_compile); then 6927dc407927Smrg # Parse the compiler output and extract the necessary 6928dc407927Smrg # objects, libraries and library flags. 69293eed67faSmbalmer 6930dc407927Smrg # Sentinel used to keep track of whether or not we are before 6931dc407927Smrg # the conftest object file. 6932dc407927Smrg pre_test_object_deps_done=no 69333eed67faSmbalmer 6934dc407927Smrg for p in `eval "$output_verbose_link_cmd"`; do 6935dd0822caSmrg case ${prev}${p} in 69363eed67faSmbalmer 6937dc407927Smrg -L* | -R* | -l*) 6938dc407927Smrg # Some compilers place space between "-{L,R}" and the path. 6939dc407927Smrg # Remove the space. 6940dc407927Smrg if test $p = "-L" || 6941dc407927Smrg test $p = "-R"; then 6942dc407927Smrg prev=$p 6943dc407927Smrg continue 6944dc407927Smrg fi 69453eed67faSmbalmer 6946dd0822caSmrg # Expand the sysroot to ease extracting the directories later. 6947dd0822caSmrg if test -z "$prev"; then 6948dd0822caSmrg case $p in 6949dd0822caSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6950dd0822caSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6951dd0822caSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6952dd0822caSmrg esac 6953dd0822caSmrg fi 6954dd0822caSmrg case $p in 6955dd0822caSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6956dd0822caSmrg esac 6957dc407927Smrg if test "$pre_test_object_deps_done" = no; then 6958dd0822caSmrg case ${prev} in 6959dd0822caSmrg -L | -R) 6960dc407927Smrg # Internal compiler library paths should come after those 6961dc407927Smrg # provided the user. The postdeps already come after the 6962dc407927Smrg # user supplied libs so there is no need to process them. 6963dc407927Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6964dc407927Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6965dc407927Smrg else 6966dc407927Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6967dc407927Smrg fi 6968dc407927Smrg ;; 6969dc407927Smrg # The "-l" case would never come before the object being 6970dc407927Smrg # linked, so don't bother handling this case. 6971dc407927Smrg esac 6972dc407927Smrg else 6973dc407927Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6974dc407927Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6975dc407927Smrg else 6976dc407927Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6977dc407927Smrg fi 6978dc407927Smrg fi 6979dd0822caSmrg prev= 6980dc407927Smrg ;; 69813eed67faSmbalmer 6982dd0822caSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 6983dc407927Smrg *.$objext) 6984dc407927Smrg # This assumes that the test object file only shows up 6985dc407927Smrg # once in the compiler output. 6986dc407927Smrg if test "$p" = "conftest.$objext"; then 6987dc407927Smrg pre_test_object_deps_done=yes 6988dc407927Smrg continue 6989dc407927Smrg fi 69903eed67faSmbalmer 6991dc407927Smrg if test "$pre_test_object_deps_done" = no; then 6992dc407927Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6993dc407927Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6994dc407927Smrg else 6995dc407927Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6996dc407927Smrg fi 6997dc407927Smrg else 6998dc407927Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6999dc407927Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7000dc407927Smrg else 7001dc407927Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7002dc407927Smrg fi 7003dc407927Smrg fi 7004dc407927Smrg ;; 70053eed67faSmbalmer 7006dc407927Smrg *) ;; # Ignore the rest. 70073eed67faSmbalmer 7008dc407927Smrg esac 7009dc407927Smrg done 70103eed67faSmbalmer 7011dc407927Smrg # Clean up. 7012dc407927Smrg rm -f a.out a.exe 70133eed67faSmbalmerelse 7014dc407927Smrg echo "libtool.m4: error: problem compiling $1 test program" 70153eed67faSmbalmerfi 70163eed67faSmbalmer 7017dc407927Smrg$RM -f confest.$objext 7018dd0822caSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 70193eed67faSmbalmer 7020dc407927Smrg# PORTME: override above test on systems where it is broken 7021dc407927Smrgm4_if([$1], [CXX], 7022dc407927Smrg[case $host_os in 7023dc407927Smrginterix[[3-9]]*) 7024dc407927Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7025dc407927Smrg # hack all around it, let's just trust "g++" to DTRT. 7026dc407927Smrg _LT_TAGVAR(predep_objects,$1)= 7027dc407927Smrg _LT_TAGVAR(postdep_objects,$1)= 7028dc407927Smrg _LT_TAGVAR(postdeps,$1)= 7029dc407927Smrg ;; 70303eed67faSmbalmer 7031dc407927Smrglinux*) 7032dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 7033dc407927Smrg *Sun\ C*) 7034dc407927Smrg # Sun C++ 5.9 70353eed67faSmbalmer 7036dc407927Smrg # The more standards-conforming stlport4 library is 7037dc407927Smrg # incompatible with the Cstd library. Avoid specifying 7038dc407927Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7039dc407927Smrg # -library=stlport4 depends on it. 7040dc407927Smrg case " $CXX $CXXFLAGS " in 7041dc407927Smrg *" -library=stlport4 "*) 7042dc407927Smrg solaris_use_stlport4=yes 7043dc407927Smrg ;; 7044dc407927Smrg esac 70453eed67faSmbalmer 7046dc407927Smrg if test "$solaris_use_stlport4" != yes; then 7047dc407927Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7048dc407927Smrg fi 7049dc407927Smrg ;; 7050dc407927Smrg esac 7051dc407927Smrg ;; 7052dc407927Smrg 7053dc407927Smrgsolaris*) 7054dc407927Smrg case $cc_basename in 7055dd0822caSmrg CC* | sunCC*) 7056dc407927Smrg # The more standards-conforming stlport4 library is 7057dc407927Smrg # incompatible with the Cstd library. Avoid specifying 7058dc407927Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7059dc407927Smrg # -library=stlport4 depends on it. 7060dc407927Smrg case " $CXX $CXXFLAGS " in 7061dc407927Smrg *" -library=stlport4 "*) 7062dc407927Smrg solaris_use_stlport4=yes 7063dc407927Smrg ;; 7064dc407927Smrg esac 70653eed67faSmbalmer 7066dc407927Smrg # Adding this requires a known-good setup of shared libraries for 7067dc407927Smrg # Sun compiler versions before 5.6, else PIC objects from an old 7068dc407927Smrg # archive will be linked into the output, leading to subtle bugs. 7069dc407927Smrg if test "$solaris_use_stlport4" != yes; then 7070dc407927Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7071dc407927Smrg fi 7072dc407927Smrg ;; 7073dc407927Smrg esac 7074dc407927Smrg ;; 7075dc407927Smrgesac 7076dc407927Smrg]) 70773eed67faSmbalmer 7078dc407927Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7079dc407927Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7080dc407927Smrgesac 7081dc407927Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7082dc407927Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7083dc407927Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7084dc407927Smrgfi 7085dc407927Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7086dc407927Smrg [The directories searched by this compiler when creating a shared library]) 7087dc407927Smrg_LT_TAGDECL([], [predep_objects], [1], 7088dc407927Smrg [Dependencies to place before and after the objects being linked to 7089dc407927Smrg create a shared library]) 7090dc407927Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7091dc407927Smrg_LT_TAGDECL([], [predeps], [1]) 7092dc407927Smrg_LT_TAGDECL([], [postdeps], [1]) 7093dc407927Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7094dc407927Smrg [The library search path used internally by the compiler when linking 7095dc407927Smrg a shared library]) 7096dc407927Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7097dc407927Smrg 7098dc407927Smrg 7099dc407927Smrg# _LT_LANG_F77_CONFIG([TAG]) 7100dc407927Smrg# -------------------------- 7101dc407927Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7102dc407927Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7103dc407927Smrg# to write the compiler configuration to `libtool'. 7104dc407927Smrgm4_defun([_LT_LANG_F77_CONFIG], 7105dd0822caSmrg[AC_LANG_PUSH(Fortran 77) 7106dd0822caSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 7107dd0822caSmrg _lt_disable_F77=yes 7108dd0822caSmrgfi 71093eed67faSmbalmer 7110dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7111dc407927Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7112dc407927Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7113dc407927Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7114dc407927Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7115dc407927Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7116dc407927Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7117dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7118dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7119dc407927Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7120dc407927Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7121dc407927Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7122dc407927Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7123dc407927Smrg_LT_TAGVAR(module_cmds, $1)= 7124dc407927Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7125dc407927Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7126dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7127dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7128dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7129dc407927Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7130dc407927Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7131dc407927Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 71323eed67faSmbalmer 7133dc407927Smrg# Source file extension for f77 test sources. 7134dc407927Smrgac_ext=f 71353eed67faSmbalmer 7136dc407927Smrg# Object file extension for compiled f77 test sources. 7137dc407927Smrgobjext=o 7138dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 7139dc407927Smrg 7140dc407927Smrg# No sense in running all these tests if we already determined that 7141dc407927Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7142dc407927Smrg# are currently assumed to apply to all compilers on this platform, 7143dc407927Smrg# and will be corrupted by setting them based on a non-working compiler. 7144dc407927Smrgif test "$_lt_disable_F77" != yes; then 7145dc407927Smrg # Code to be used in simple compile tests 7146dc407927Smrg lt_simple_compile_test_code="\ 7147dc407927Smrg subroutine t 7148dc407927Smrg return 7149dc407927Smrg end 7150dc407927Smrg" 71513eed67faSmbalmer 7152dc407927Smrg # Code to be used in simple link tests 7153dc407927Smrg lt_simple_link_test_code="\ 7154dc407927Smrg program t 7155dc407927Smrg end 7156dc407927Smrg" 71573eed67faSmbalmer 7158dc407927Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7159dc407927Smrg _LT_TAG_COMPILER 71603eed67faSmbalmer 7161dc407927Smrg # save warnings/boilerplate of simple test code 7162dc407927Smrg _LT_COMPILER_BOILERPLATE 7163dc407927Smrg _LT_LINKER_BOILERPLATE 71643eed67faSmbalmer 7165dc407927Smrg # Allow CC to be a program name with arguments. 7166dc407927Smrg lt_save_CC="$CC" 7167dc407927Smrg lt_save_GCC=$GCC 7168dd0822caSmrg lt_save_CFLAGS=$CFLAGS 7169dc407927Smrg CC=${F77-"f77"} 7170dd0822caSmrg CFLAGS=$FFLAGS 7171dc407927Smrg compiler=$CC 7172dc407927Smrg _LT_TAGVAR(compiler, $1)=$CC 7173dc407927Smrg _LT_CC_BASENAME([$compiler]) 7174dc407927Smrg GCC=$G77 7175dc407927Smrg if test -n "$compiler"; then 7176dc407927Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7177dc407927Smrg AC_MSG_RESULT([$can_build_shared]) 71783eed67faSmbalmer 7179dc407927Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7180dc407927Smrg test "$can_build_shared" = "no" && enable_shared=no 71813eed67faSmbalmer 7182dc407927Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7183dc407927Smrg # are all built from PIC. 7184dc407927Smrg case $host_os in 7185dc407927Smrg aix3*) 7186dc407927Smrg test "$enable_shared" = yes && enable_static=no 7187dc407927Smrg if test -n "$RANLIB"; then 7188dc407927Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7189dc407927Smrg postinstall_cmds='$RANLIB $lib' 7190dc407927Smrg fi 7191dc407927Smrg ;; 7192dc407927Smrg aix[[4-9]]*) 7193dc407927Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7194dc407927Smrg test "$enable_shared" = yes && enable_static=no 7195dc407927Smrg fi 7196dc407927Smrg ;; 7197dc407927Smrg esac 7198dc407927Smrg AC_MSG_RESULT([$enable_shared]) 7199dc407927Smrg 7200dc407927Smrg AC_MSG_CHECKING([whether to build static libraries]) 7201dc407927Smrg # Make sure either enable_shared or enable_static is yes. 7202dc407927Smrg test "$enable_shared" = yes || enable_static=yes 7203dc407927Smrg AC_MSG_RESULT([$enable_static]) 7204dc407927Smrg 7205dc407927Smrg _LT_TAGVAR(GCC, $1)="$G77" 7206dc407927Smrg _LT_TAGVAR(LD, $1)="$LD" 7207dc407927Smrg 7208dc407927Smrg ## CAVEAT EMPTOR: 7209dc407927Smrg ## There is no encapsulation within the following macros, do not change 7210dc407927Smrg ## the running order or otherwise move them around unless you know exactly 7211dc407927Smrg ## what you are doing... 7212dc407927Smrg _LT_COMPILER_PIC($1) 7213dc407927Smrg _LT_COMPILER_C_O($1) 7214dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 7215dc407927Smrg _LT_LINKER_SHLIBS($1) 7216dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 7217dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7218dc407927Smrg 7219dc407927Smrg _LT_CONFIG($1) 7220dc407927Smrg fi # test -n "$compiler" 7221dc407927Smrg 7222dc407927Smrg GCC=$lt_save_GCC 7223dc407927Smrg CC="$lt_save_CC" 7224dd0822caSmrg CFLAGS="$lt_save_CFLAGS" 7225dc407927Smrgfi # test "$_lt_disable_F77" != yes 72263eed67faSmbalmer 7227dc407927SmrgAC_LANG_POP 7228dc407927Smrg])# _LT_LANG_F77_CONFIG 72293eed67faSmbalmer 72303eed67faSmbalmer 7231dc407927Smrg# _LT_LANG_FC_CONFIG([TAG]) 7232dc407927Smrg# ------------------------- 7233dc407927Smrg# Ensure that the configuration variables for a Fortran compiler are 7234dc407927Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7235dc407927Smrg# to write the compiler configuration to `libtool'. 7236dc407927Smrgm4_defun([_LT_LANG_FC_CONFIG], 7237dd0822caSmrg[AC_LANG_PUSH(Fortran) 7238dd0822caSmrg 7239dd0822caSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 7240dd0822caSmrg _lt_disable_FC=yes 7241dd0822caSmrgfi 7242dc407927Smrg 7243dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7244dc407927Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7245dc407927Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7246dc407927Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7247dc407927Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7248dc407927Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7249dc407927Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7250dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7251dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7252dc407927Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7253dc407927Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7254dc407927Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7255dc407927Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7256dc407927Smrg_LT_TAGVAR(module_cmds, $1)= 7257dc407927Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7258dc407927Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7259dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7260dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7261dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7262dc407927Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7263dc407927Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7264dc407927Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7265dc407927Smrg 7266dc407927Smrg# Source file extension for fc test sources. 7267dc407927Smrgac_ext=${ac_fc_srcext-f} 7268dc407927Smrg 7269dc407927Smrg# Object file extension for compiled fc test sources. 7270dc407927Smrgobjext=o 7271dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 7272dc407927Smrg 7273dc407927Smrg# No sense in running all these tests if we already determined that 7274dc407927Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7275dc407927Smrg# are currently assumed to apply to all compilers on this platform, 7276dc407927Smrg# and will be corrupted by setting them based on a non-working compiler. 7277dc407927Smrgif test "$_lt_disable_FC" != yes; then 7278dc407927Smrg # Code to be used in simple compile tests 7279dc407927Smrg lt_simple_compile_test_code="\ 7280dc407927Smrg subroutine t 7281dc407927Smrg return 7282dc407927Smrg end 7283dc407927Smrg" 72843eed67faSmbalmer 7285dc407927Smrg # Code to be used in simple link tests 7286dc407927Smrg lt_simple_link_test_code="\ 7287dc407927Smrg program t 7288dc407927Smrg end 7289dc407927Smrg" 72903eed67faSmbalmer 7291dc407927Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7292dc407927Smrg _LT_TAG_COMPILER 72933eed67faSmbalmer 7294dc407927Smrg # save warnings/boilerplate of simple test code 7295dc407927Smrg _LT_COMPILER_BOILERPLATE 7296dc407927Smrg _LT_LINKER_BOILERPLATE 72973eed67faSmbalmer 7298dc407927Smrg # Allow CC to be a program name with arguments. 7299dc407927Smrg lt_save_CC="$CC" 7300dc407927Smrg lt_save_GCC=$GCC 7301dd0822caSmrg lt_save_CFLAGS=$CFLAGS 7302dc407927Smrg CC=${FC-"f95"} 7303dd0822caSmrg CFLAGS=$FCFLAGS 7304dc407927Smrg compiler=$CC 7305dc407927Smrg GCC=$ac_cv_fc_compiler_gnu 7306dc407927Smrg 7307dc407927Smrg _LT_TAGVAR(compiler, $1)=$CC 7308dc407927Smrg _LT_CC_BASENAME([$compiler]) 73093eed67faSmbalmer 7310dc407927Smrg if test -n "$compiler"; then 7311dc407927Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7312dc407927Smrg AC_MSG_RESULT([$can_build_shared]) 7313dc407927Smrg 7314dc407927Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7315dc407927Smrg test "$can_build_shared" = "no" && enable_shared=no 7316dc407927Smrg 7317dc407927Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7318dc407927Smrg # are all built from PIC. 73193eed67faSmbalmer case $host_os in 7320dc407927Smrg aix3*) 7321dc407927Smrg test "$enable_shared" = yes && enable_static=no 7322dc407927Smrg if test -n "$RANLIB"; then 7323dc407927Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7324dc407927Smrg postinstall_cmds='$RANLIB $lib' 7325dc407927Smrg fi 7326dc407927Smrg ;; 73273eed67faSmbalmer aix[[4-9]]*) 7328dc407927Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7329dc407927Smrg test "$enable_shared" = yes && enable_static=no 73303eed67faSmbalmer fi 7331dc407927Smrg ;; 73323eed67faSmbalmer esac 7333dc407927Smrg AC_MSG_RESULT([$enable_shared]) 7334dc407927Smrg 7335dc407927Smrg AC_MSG_CHECKING([whether to build static libraries]) 7336dc407927Smrg # Make sure either enable_shared or enable_static is yes. 7337dc407927Smrg test "$enable_shared" = yes || enable_static=yes 7338dc407927Smrg AC_MSG_RESULT([$enable_static]) 7339dc407927Smrg 7340dc407927Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7341dc407927Smrg _LT_TAGVAR(LD, $1)="$LD" 7342dc407927Smrg 7343dc407927Smrg ## CAVEAT EMPTOR: 7344dc407927Smrg ## There is no encapsulation within the following macros, do not change 7345dc407927Smrg ## the running order or otherwise move them around unless you know exactly 7346dc407927Smrg ## what you are doing... 7347dc407927Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7348dc407927Smrg _LT_COMPILER_PIC($1) 7349dc407927Smrg _LT_COMPILER_C_O($1) 7350dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 7351dc407927Smrg _LT_LINKER_SHLIBS($1) 7352dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 7353dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7354dc407927Smrg 7355dc407927Smrg _LT_CONFIG($1) 7356dc407927Smrg fi # test -n "$compiler" 7357dc407927Smrg 7358dc407927Smrg GCC=$lt_save_GCC 7359dd0822caSmrg CC=$lt_save_CC 7360dd0822caSmrg CFLAGS=$lt_save_CFLAGS 7361dc407927Smrgfi # test "$_lt_disable_FC" != yes 73623eed67faSmbalmer 7363dc407927SmrgAC_LANG_POP 7364dc407927Smrg])# _LT_LANG_FC_CONFIG 73653eed67faSmbalmer 73663eed67faSmbalmer 7367dc407927Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7368dc407927Smrg# -------------------------- 7369dc407927Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7370dc407927Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7371dc407927Smrg# to write the compiler configuration to `libtool'. 7372dc407927Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7373dc407927Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7374dc407927SmrgAC_LANG_SAVE 73753eed67faSmbalmer 7376dc407927Smrg# Source file extension for Java test sources. 7377dc407927Smrgac_ext=java 73783eed67faSmbalmer 7379dc407927Smrg# Object file extension for compiled Java test sources. 7380dc407927Smrgobjext=o 7381dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 73823eed67faSmbalmer 7383dc407927Smrg# Code to be used in simple compile tests 7384dc407927Smrglt_simple_compile_test_code="class foo {}" 73853eed67faSmbalmer 7386dc407927Smrg# Code to be used in simple link tests 7387dc407927Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 73883eed67faSmbalmer 7389dc407927Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7390dc407927Smrg_LT_TAG_COMPILER 73913eed67faSmbalmer 7392dc407927Smrg# save warnings/boilerplate of simple test code 7393dc407927Smrg_LT_COMPILER_BOILERPLATE 7394dc407927Smrg_LT_LINKER_BOILERPLATE 7395dc407927Smrg 7396dc407927Smrg# Allow CC to be a program name with arguments. 7397dd0822caSmrglt_save_CC=$CC 7398dd0822caSmrglt_save_CFLAGS=$CFLAGS 7399dc407927Smrglt_save_GCC=$GCC 7400dc407927SmrgGCC=yes 7401dc407927SmrgCC=${GCJ-"gcj"} 7402dd0822caSmrgCFLAGS=$GCJFLAGS 7403dc407927Smrgcompiler=$CC 7404dc407927Smrg_LT_TAGVAR(compiler, $1)=$CC 7405dc407927Smrg_LT_TAGVAR(LD, $1)="$LD" 7406dc407927Smrg_LT_CC_BASENAME([$compiler]) 7407dc407927Smrg 7408dc407927Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7409dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7410dc407927Smrg 7411dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7412dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7413dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7414dc407927Smrg 7415dc407927Smrgif test -n "$compiler"; then 7416dc407927Smrg _LT_COMPILER_NO_RTTI($1) 7417dc407927Smrg _LT_COMPILER_PIC($1) 7418dc407927Smrg _LT_COMPILER_C_O($1) 7419dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 7420dc407927Smrg _LT_LINKER_SHLIBS($1) 7421dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7422dc407927Smrg 7423dc407927Smrg _LT_CONFIG($1) 7424dc407927Smrgfi 7425dc407927Smrg 7426dc407927SmrgAC_LANG_RESTORE 74273eed67faSmbalmer 7428dc407927SmrgGCC=$lt_save_GCC 7429dd0822caSmrgCC=$lt_save_CC 7430dd0822caSmrgCFLAGS=$lt_save_CFLAGS 7431dc407927Smrg])# _LT_LANG_GCJ_CONFIG 74323eed67faSmbalmer 74333eed67faSmbalmer 7434dc407927Smrg# _LT_LANG_RC_CONFIG([TAG]) 7435dc407927Smrg# ------------------------- 7436dc407927Smrg# Ensure that the configuration variables for the Windows resource compiler 7437dc407927Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7438dc407927Smrg# to write the compiler configuration to `libtool'. 7439dc407927Smrgm4_defun([_LT_LANG_RC_CONFIG], 7440dc407927Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7441dc407927SmrgAC_LANG_SAVE 74423eed67faSmbalmer 7443dc407927Smrg# Source file extension for RC test sources. 7444dc407927Smrgac_ext=rc 74453eed67faSmbalmer 7446dc407927Smrg# Object file extension for compiled RC test sources. 7447dc407927Smrgobjext=o 7448dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 74493eed67faSmbalmer 7450dc407927Smrg# Code to be used in simple compile tests 7451dc407927Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 74523eed67faSmbalmer 7453dc407927Smrg# Code to be used in simple link tests 7454dc407927Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 74553eed67faSmbalmer 7456dc407927Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7457dc407927Smrg_LT_TAG_COMPILER 74583eed67faSmbalmer 7459dc407927Smrg# save warnings/boilerplate of simple test code 7460dc407927Smrg_LT_COMPILER_BOILERPLATE 7461dc407927Smrg_LT_LINKER_BOILERPLATE 74623eed67faSmbalmer 7463dc407927Smrg# Allow CC to be a program name with arguments. 7464dc407927Smrglt_save_CC="$CC" 7465dd0822caSmrglt_save_CFLAGS=$CFLAGS 7466dc407927Smrglt_save_GCC=$GCC 7467dc407927SmrgGCC= 7468dc407927SmrgCC=${RC-"windres"} 7469dd0822caSmrgCFLAGS= 7470dc407927Smrgcompiler=$CC 7471dc407927Smrg_LT_TAGVAR(compiler, $1)=$CC 7472dc407927Smrg_LT_CC_BASENAME([$compiler]) 7473dc407927Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 74743eed67faSmbalmer 7475dc407927Smrgif test -n "$compiler"; then 7476dc407927Smrg : 7477dc407927Smrg _LT_CONFIG($1) 7478dc407927Smrgfi 74793eed67faSmbalmer 7480dc407927SmrgGCC=$lt_save_GCC 7481dc407927SmrgAC_LANG_RESTORE 7482dd0822caSmrgCC=$lt_save_CC 7483dd0822caSmrgCFLAGS=$lt_save_CFLAGS 7484dc407927Smrg])# _LT_LANG_RC_CONFIG 74853eed67faSmbalmer 74863eed67faSmbalmer 7487dc407927Smrg# LT_PROG_GCJ 7488dc407927Smrg# ----------- 7489dc407927SmrgAC_DEFUN([LT_PROG_GCJ], 7490dc407927Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7491dc407927Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7492dc407927Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7493dc407927Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7494dc407927Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7495dc407927Smrg]) 74963eed67faSmbalmer 7497dc407927Smrg# Old name: 7498dc407927SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7499dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7500dc407927Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 75013eed67faSmbalmer 7502dc407927Smrg 7503dc407927Smrg# LT_PROG_RC 7504dc407927Smrg# ---------- 7505dc407927SmrgAC_DEFUN([LT_PROG_RC], 7506dc407927Smrg[AC_CHECK_TOOL(RC, windres,) 75073eed67faSmbalmer]) 75083eed67faSmbalmer 7509dc407927Smrg# Old name: 7510dc407927SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7511dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7512dc407927Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 75133eed67faSmbalmer 7514dc407927Smrg 7515dc407927Smrg# _LT_DECL_EGREP 7516dc407927Smrg# -------------- 7517dc407927Smrg# If we don't have a new enough Autoconf to choose the best grep 7518dc407927Smrg# available, choose the one first in the user's PATH. 7519dc407927Smrgm4_defun([_LT_DECL_EGREP], 7520dc407927Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7521dc407927SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7522dc407927Smrgtest -z "$GREP" && GREP=grep 7523dc407927Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7524dc407927Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7525dc407927Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7526dc407927Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7527dc407927SmrgAC_SUBST([GREP]) 75283eed67faSmbalmer]) 75293eed67faSmbalmer 75303eed67faSmbalmer 7531dc407927Smrg# _LT_DECL_OBJDUMP 7532dc407927Smrg# -------------- 7533dc407927Smrg# If we don't have a new enough Autoconf to choose the best objdump 7534dc407927Smrg# available, choose the one first in the user's PATH. 7535dc407927Smrgm4_defun([_LT_DECL_OBJDUMP], 7536dc407927Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7537dc407927Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7538dc407927Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7539dc407927SmrgAC_SUBST([OBJDUMP]) 7540dc407927Smrg]) 7541dc407927Smrg 7542dd0822caSmrg# _LT_DECL_DLLTOOL 7543dd0822caSmrg# ---------------- 7544dd0822caSmrg# Ensure DLLTOOL variable is set. 7545dd0822caSmrgm4_defun([_LT_DECL_DLLTOOL], 7546dd0822caSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7547dd0822caSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7548dd0822caSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7549dd0822caSmrgAC_SUBST([DLLTOOL]) 7550dd0822caSmrg]) 7551dc407927Smrg 7552dc407927Smrg# _LT_DECL_SED 7553dc407927Smrg# ------------ 7554dc407927Smrg# Check for a fully-functional sed program, that truncates 7555dc407927Smrg# as few characters as possible. Prefer GNU sed if found. 7556dc407927Smrgm4_defun([_LT_DECL_SED], 7557dc407927Smrg[AC_PROG_SED 7558dc407927Smrgtest -z "$SED" && SED=sed 7559dc407927SmrgXsed="$SED -e 1s/^X//" 7560dc407927Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7561dc407927Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7562dc407927Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7563dc407927Smrg])# _LT_DECL_SED 7564dc407927Smrg 7565dc407927Smrgm4_ifndef([AC_PROG_SED], [ 7566dc407927Smrg# NOTE: This macro has been submitted for inclusion into # 7567dc407927Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7568dc407927Smrg# a released version of Autoconf we should remove this # 7569dc407927Smrg# macro and use it instead. # 7570dc407927Smrg 7571dc407927Smrgm4_defun([AC_PROG_SED], 7572dc407927Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7573dc407927SmrgAC_CACHE_VAL(lt_cv_path_SED, 7574dc407927Smrg[# Loop through the user's path and test for sed and gsed. 7575dc407927Smrg# Then use that list of sed's as ones to test for truncation. 7576dc407927Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7577dc407927Smrgfor as_dir in $PATH 7578dc407927Smrgdo 7579dc407927Smrg IFS=$as_save_IFS 7580dc407927Smrg test -z "$as_dir" && as_dir=. 7581dc407927Smrg for lt_ac_prog in sed gsed; do 7582dc407927Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7583dc407927Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7584dc407927Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7585dc407927Smrg fi 7586dc407927Smrg done 7587dc407927Smrg done 7588dc407927Smrgdone 7589dc407927SmrgIFS=$as_save_IFS 7590dc407927Smrglt_ac_max=0 7591dc407927Smrglt_ac_count=0 7592dc407927Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7593dc407927Smrg# along with /bin/sed that truncates output. 7594dc407927Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7595dc407927Smrg test ! -f $lt_ac_sed && continue 7596dc407927Smrg cat /dev/null > conftest.in 7597dc407927Smrg lt_ac_count=0 7598dc407927Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7599dc407927Smrg # Check for GNU sed and select it if it is found. 7600dc407927Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7601dc407927Smrg lt_cv_path_SED=$lt_ac_sed 7602dc407927Smrg break 7603dc407927Smrg fi 7604dc407927Smrg while true; do 7605dc407927Smrg cat conftest.in conftest.in >conftest.tmp 7606dc407927Smrg mv conftest.tmp conftest.in 7607dc407927Smrg cp conftest.in conftest.nl 7608dc407927Smrg echo >>conftest.nl 7609dc407927Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7610dc407927Smrg cmp -s conftest.out conftest.nl || break 7611dc407927Smrg # 10000 chars as input seems more than enough 7612dc407927Smrg test $lt_ac_count -gt 10 && break 7613dc407927Smrg lt_ac_count=`expr $lt_ac_count + 1` 7614dc407927Smrg if test $lt_ac_count -gt $lt_ac_max; then 7615dc407927Smrg lt_ac_max=$lt_ac_count 7616dc407927Smrg lt_cv_path_SED=$lt_ac_sed 76173eed67faSmbalmer fi 7618dc407927Smrg done 7619dc407927Smrgdone 7620dc407927Smrg]) 7621dc407927SmrgSED=$lt_cv_path_SED 7622dc407927SmrgAC_SUBST([SED]) 7623dc407927SmrgAC_MSG_RESULT([$SED]) 7624dc407927Smrg])#AC_PROG_SED 7625dc407927Smrg])#m4_ifndef 7626dc407927Smrg 7627dc407927Smrg# Old name: 7628dc407927SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7629dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7630dc407927Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7631dc407927Smrg 7632dc407927Smrg 7633dc407927Smrg# _LT_CHECK_SHELL_FEATURES 7634dc407927Smrg# ------------------------ 7635dc407927Smrg# Find out whether the shell is Bourne or XSI compatible, 7636dc407927Smrg# or has some other useful features. 7637dc407927Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7638dc407927Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7639dc407927Smrg# Try some XSI features 7640dc407927Smrgxsi_shell=no 7641dc407927Smrg( _lt_dummy="a/b/c" 7642dd0822caSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7643dd0822caSmrg = c,a/b,b/c, \ 7644dc407927Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7645dc407927Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7646dc407927Smrg && xsi_shell=yes 7647dc407927SmrgAC_MSG_RESULT([$xsi_shell]) 7648dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7649dc407927Smrg 7650dc407927SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7651dc407927Smrglt_shell_append=no 7652dc407927Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7653dc407927Smrg >/dev/null 2>&1 \ 7654dc407927Smrg && lt_shell_append=yes 7655dc407927SmrgAC_MSG_RESULT([$lt_shell_append]) 7656dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7657dc407927Smrg 7658dc407927Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7659dc407927Smrg lt_unset=unset 7660dc407927Smrgelse 7661dc407927Smrg lt_unset=false 7662dc407927Smrgfi 7663dc407927Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7664dc407927Smrg 7665dc407927Smrg# test EBCDIC or ASCII 7666dc407927Smrgcase `echo X|tr X '\101'` in 7667dc407927Smrg A) # ASCII based system 7668dc407927Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7669dc407927Smrg lt_SP2NL='tr \040 \012' 7670dc407927Smrg lt_NL2SP='tr \015\012 \040\040' 76713eed67faSmbalmer ;; 7672dc407927Smrg *) # EBCDIC based system 7673dc407927Smrg lt_SP2NL='tr \100 \n' 7674dc407927Smrg lt_NL2SP='tr \r\n \100\100' 76753eed67faSmbalmer ;; 7676dc407927Smrgesac 7677dc407927Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7678dc407927Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7679dc407927Smrg])# _LT_CHECK_SHELL_FEATURES 7680dc407927Smrg 7681dc407927Smrg 7682dd0822caSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7683dd0822caSmrg# ------------------------------------------------------ 7684dd0822caSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7685dd0822caSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7686dd0822caSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7687dd0822caSmrg[dnl { 7688dd0822caSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7689dd0822caSmrg$1 ()\ 7690dd0822caSmrg{\ 7691dd0822caSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7692dd0822caSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7693dd0822caSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7694dd0822caSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7695dd0822caSmrgtest 0 -eq $? || _lt_function_replace_fail=: 7696dd0822caSmrg]) 76973eed67faSmbalmer 76983eed67faSmbalmer 7699dd0822caSmrg# _LT_PROG_REPLACE_SHELLFNS 7700dd0822caSmrg# ------------------------- 7701dd0822caSmrg# Replace existing portable implementations of several shell functions with 7702dd0822caSmrg# equivalent extended shell implementations where those features are available.. 7703dd0822caSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7704dd0822caSmrg[if test x"$xsi_shell" = xyes; then 7705dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7706dd0822caSmrg case ${1} in 7707dd0822caSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7708dd0822caSmrg * ) func_dirname_result="${3}" ;; 7709dd0822caSmrg esac]) 7710dd0822caSmrg 7711dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7712dd0822caSmrg func_basename_result="${1##*/}"]) 7713dd0822caSmrg 7714dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7715dd0822caSmrg case ${1} in 7716dd0822caSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7717dd0822caSmrg * ) func_dirname_result="${3}" ;; 7718dd0822caSmrg esac 7719dd0822caSmrg func_basename_result="${1##*/}"]) 77203eed67faSmbalmer 7721dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7722dd0822caSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7723dd0822caSmrg # positional parameters, so assign one to ordinary parameter first. 7724dd0822caSmrg func_stripname_result=${3} 7725dd0822caSmrg func_stripname_result=${func_stripname_result#"${1}"} 7726dd0822caSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 77273eed67faSmbalmer 7728dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7729dd0822caSmrg func_split_long_opt_name=${1%%=*} 7730dd0822caSmrg func_split_long_opt_arg=${1#*=}]) 7731dc407927Smrg 7732dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7733dd0822caSmrg func_split_short_opt_arg=${1#??} 7734dd0822caSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 77353eed67faSmbalmer 7736dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7737dd0822caSmrg case ${1} in 7738dd0822caSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7739dd0822caSmrg *) func_lo2o_result=${1} ;; 7740dd0822caSmrg esac]) 77413eed67faSmbalmer 7742dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 77433eed67faSmbalmer 7744dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 77453eed67faSmbalmer 7746dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7747dd0822caSmrgfi 77483eed67faSmbalmer 7749dd0822caSmrgif test x"$lt_shell_append" = xyes; then 7750dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 77513eed67faSmbalmer 7752dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7753dd0822caSmrg func_quote_for_eval "${2}" 7754dd0822caSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7755dd0822caSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 77563eed67faSmbalmer 7757dd0822caSmrg # Save a `func_append' function call where possible by direct use of '+=' 7758dd0822caSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7759dd0822caSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7760dd0822caSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7761dd0822caSmrg test 0 -eq $? || _lt_function_replace_fail=: 7762dd0822caSmrgelse 7763dd0822caSmrg # Save a `func_append' function call even when '+=' is not available 7764dd0822caSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7765dd0822caSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7766dd0822caSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7767dd0822caSmrg test 0 -eq $? || _lt_function_replace_fail=: 7768dd0822caSmrgfi 7769dc407927Smrg 7770dd0822caSmrgif test x"$_lt_function_replace_fail" = x":"; then 7771dd0822caSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7772dd0822caSmrgfi 7773dd0822caSmrg]) 77743eed67faSmbalmer 7775dd0822caSmrg# _LT_PATH_CONVERSION_FUNCTIONS 7776dd0822caSmrg# ----------------------------- 7777dd0822caSmrg# Determine which file name conversion functions should be used by 7778dd0822caSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7779dd0822caSmrg# for certain cross-compile configurations and native mingw. 7780dd0822caSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7781dd0822caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7782dd0822caSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7783dd0822caSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7784dd0822caSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7785dd0822caSmrg[case $host in 7786dd0822caSmrg *-*-mingw* ) 7787dd0822caSmrg case $build in 7788dd0822caSmrg *-*-mingw* ) # actually msys 7789dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7790dd0822caSmrg ;; 7791dd0822caSmrg *-*-cygwin* ) 7792dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7793dd0822caSmrg ;; 7794dd0822caSmrg * ) # otherwise, assume *nix 7795dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7796dd0822caSmrg ;; 7797dd0822caSmrg esac 7798dc407927Smrg ;; 7799dd0822caSmrg *-*-cygwin* ) 7800dd0822caSmrg case $build in 7801dd0822caSmrg *-*-mingw* ) # actually msys 7802dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7803dd0822caSmrg ;; 7804dd0822caSmrg *-*-cygwin* ) 7805dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7806dd0822caSmrg ;; 7807dd0822caSmrg * ) # otherwise, assume *nix 7808dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7809dd0822caSmrg ;; 7810dd0822caSmrg esac 7811dc407927Smrg ;; 7812dd0822caSmrg * ) # unhandled hosts (and "normal" native builds) 7813dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7814dd0822caSmrg ;; 7815dd0822caSmrgesac 7816dd0822caSmrg]) 7817dd0822caSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7818dd0822caSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7819dd0822caSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7820dd0822caSmrg [0], [convert $build file names to $host format])dnl 7821dd0822caSmrg 7822dd0822caSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7823dd0822caSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7824dd0822caSmrg[#assume ordinary cross tools, or native build. 7825dd0822caSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 7826dd0822caSmrgcase $host in 7827dd0822caSmrg *-*-mingw* ) 7828dd0822caSmrg case $build in 7829dd0822caSmrg *-*-mingw* ) # actually msys 7830dd0822caSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7831dd0822caSmrg ;; 7832dd0822caSmrg esac 7833dd0822caSmrg ;; 7834dd0822caSmrgesac 7835dc407927Smrg]) 7836dd0822caSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7837dd0822caSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7838dd0822caSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7839dd0822caSmrg [0], [convert $build files to toolchain format])dnl 7840dd0822caSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 78413eed67faSmbalmer 7842dc407927Smrg# Helper functions for option handling. -*- Autoconf -*- 7843dc407927Smrg# 7844dd0822caSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7845dd0822caSmrg# Inc. 7846dc407927Smrg# Written by Gary V. Vaughan, 2004 7847dc407927Smrg# 7848dc407927Smrg# This file is free software; the Free Software Foundation gives 7849dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 7850dc407927Smrg# modifications, as long as this notice is preserved. 78513eed67faSmbalmer 7852dd0822caSmrg# serial 7 ltoptions.m4 78533eed67faSmbalmer 7854dc407927Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7855dc407927SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 78563eed67faSmbalmer 78573eed67faSmbalmer 7858dc407927Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7859dc407927Smrg# ------------------------------------------ 7860dc407927Smrgm4_define([_LT_MANGLE_OPTION], 7861dc407927Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 78623eed67faSmbalmer 78633eed67faSmbalmer 7864dc407927Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7865dc407927Smrg# --------------------------------------- 7866dc407927Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7867dc407927Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7868dc407927Smrg# saved as a flag. 7869dc407927Smrgm4_define([_LT_SET_OPTION], 7870dc407927Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7871dc407927Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7872dc407927Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7873dc407927Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7874dc407927Smrg]) 7875dc407927Smrg 7876dc407927Smrg 7877dc407927Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7878dc407927Smrg# ------------------------------------------------------------ 7879dc407927Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7880dc407927Smrgm4_define([_LT_IF_OPTION], 7881dc407927Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7882dc407927Smrg 7883dc407927Smrg 7884dc407927Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7885dc407927Smrg# ------------------------------------------------------- 7886dc407927Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7887dc407927Smrg# are set. 7888dc407927Smrgm4_define([_LT_UNLESS_OPTIONS], 7889dc407927Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7890dc407927Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7891dc407927Smrg [m4_define([$0_found])])])[]dnl 7892dc407927Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7893dc407927Smrg])[]dnl 7894dc407927Smrg]) 7895dc407927Smrg 7896dc407927Smrg 7897dc407927Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7898dc407927Smrg# ---------------------------------------- 7899dc407927Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7900dc407927Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7901dc407927Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7902dc407927Smrg# the unknown option and exit. 7903dc407927Smrgm4_defun([_LT_SET_OPTIONS], 7904dc407927Smrg[# Set options 7905dc407927Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7906dc407927Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7907dc407927Smrg 7908dc407927Smrgm4_if([$1],[LT_INIT],[ 7909dc407927Smrg dnl 7910dc407927Smrg dnl Simply set some default values (i.e off) if boolean options were not 7911dc407927Smrg dnl specified: 7912dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7913dc407927Smrg ]) 7914dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7915dc407927Smrg ]) 7916dc407927Smrg dnl 7917dc407927Smrg dnl If no reference was made to various pairs of opposing options, then 7918dc407927Smrg dnl we run the default mode handler for the pair. For example, if neither 7919dc407927Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7920dc407927Smrg dnl archives by default: 7921dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7922dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7923dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7924dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7925dc407927Smrg [_LT_ENABLE_FAST_INSTALL]) 7926dc407927Smrg ]) 7927dc407927Smrg])# _LT_SET_OPTIONS 7928dc407927Smrg 79293eed67faSmbalmer 79303eed67faSmbalmer 7931dc407927Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7932dc407927Smrg# ----------------------------------------- 7933dc407927Smrgm4_define([_LT_MANGLE_DEFUN], 7934dc407927Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 79353eed67faSmbalmer 79363eed67faSmbalmer 7937dc407927Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7938dc407927Smrg# ----------------------------------------------- 7939dc407927Smrgm4_define([LT_OPTION_DEFINE], 7940dc407927Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7941dc407927Smrg])# LT_OPTION_DEFINE 79423eed67faSmbalmer 79433eed67faSmbalmer 7944dc407927Smrg# dlopen 7945dc407927Smrg# ------ 7946dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7947dc407927Smrg]) 79483eed67faSmbalmer 7949dc407927SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7950dc407927Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7951dc407927SmrgAC_DIAGNOSE([obsolete], 7952dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7953dc407927Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7954dc407927Smrg]) 79553eed67faSmbalmer 7956dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7957dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 79583eed67faSmbalmer 79593eed67faSmbalmer 7960dc407927Smrg# win32-dll 7961dc407927Smrg# --------- 7962dc407927Smrg# Declare package support for building win32 dll's. 7963dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7964dc407927Smrg[enable_win32_dll=yes 79653eed67faSmbalmer 7966dc407927Smrgcase $host in 7967dd0822caSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7968dc407927Smrg AC_CHECK_TOOL(AS, as, false) 7969dc407927Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7970dc407927Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7971dc407927Smrg ;; 7972dc407927Smrgesac 79733eed67faSmbalmer 7974dc407927Smrgtest -z "$AS" && AS=as 7975dd0822caSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 79763eed67faSmbalmer 7977dc407927Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7978dd0822caSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 79793eed67faSmbalmer 7980dc407927Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7981dd0822caSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7982dc407927Smrg])# win32-dll 79833eed67faSmbalmer 7984dc407927SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7985dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7986dc407927Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7987dc407927SmrgAC_DIAGNOSE([obsolete], 7988dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7989dc407927Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7990dc407927Smrg]) 79913eed67faSmbalmer 7992dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7993dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 79943eed67faSmbalmer 79953eed67faSmbalmer 7996dc407927Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7997dc407927Smrg# ---------------------------- 7998dc407927Smrg# implement the --enable-shared flag, and supports the `shared' and 7999dc407927Smrg# `disable-shared' LT_INIT options. 8000dc407927Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8001dc407927Smrgm4_define([_LT_ENABLE_SHARED], 8002dc407927Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8003dc407927SmrgAC_ARG_ENABLE([shared], 8004dc407927Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8005dc407927Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8006dc407927Smrg [p=${PACKAGE-default} 8007dc407927Smrg case $enableval in 8008dc407927Smrg yes) enable_shared=yes ;; 8009dc407927Smrg no) enable_shared=no ;; 8010dc407927Smrg *) 8011dc407927Smrg enable_shared=no 8012dc407927Smrg # Look at the argument we got. We use all the common list separators. 8013dc407927Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8014dc407927Smrg for pkg in $enableval; do 8015dc407927Smrg IFS="$lt_save_ifs" 8016dc407927Smrg if test "X$pkg" = "X$p"; then 8017dc407927Smrg enable_shared=yes 8018dc407927Smrg fi 8019dc407927Smrg done 8020dc407927Smrg IFS="$lt_save_ifs" 80213eed67faSmbalmer ;; 8022dc407927Smrg esac], 8023dc407927Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 80243eed67faSmbalmer 8025dc407927Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8026dc407927Smrg [Whether or not to build shared libraries]) 8027dc407927Smrg])# _LT_ENABLE_SHARED 80283eed67faSmbalmer 8029dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8030dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 80313eed67faSmbalmer 8032dc407927Smrg# Old names: 8033dc407927SmrgAC_DEFUN([AC_ENABLE_SHARED], 8034dc407927Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8035dc407927Smrg]) 80363eed67faSmbalmer 8037dc407927SmrgAC_DEFUN([AC_DISABLE_SHARED], 8038dc407927Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8039dc407927Smrg]) 80403eed67faSmbalmer 8041dc407927SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8042dc407927SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 80433eed67faSmbalmer 8044dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8045dc407927Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8046dc407927Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 80473eed67faSmbalmer 80483eed67faSmbalmer 80493eed67faSmbalmer 8050dc407927Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8051dc407927Smrg# ---------------------------- 8052dc407927Smrg# implement the --enable-static flag, and support the `static' and 8053dc407927Smrg# `disable-static' LT_INIT options. 8054dc407927Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8055dc407927Smrgm4_define([_LT_ENABLE_STATIC], 8056dc407927Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8057dc407927SmrgAC_ARG_ENABLE([static], 8058dc407927Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8059dc407927Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8060dc407927Smrg [p=${PACKAGE-default} 8061dc407927Smrg case $enableval in 8062dc407927Smrg yes) enable_static=yes ;; 8063dc407927Smrg no) enable_static=no ;; 8064dc407927Smrg *) 8065dc407927Smrg enable_static=no 8066dc407927Smrg # Look at the argument we got. We use all the common list separators. 8067dc407927Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8068dc407927Smrg for pkg in $enableval; do 8069dc407927Smrg IFS="$lt_save_ifs" 8070dc407927Smrg if test "X$pkg" = "X$p"; then 8071dc407927Smrg enable_static=yes 80723eed67faSmbalmer fi 8073dc407927Smrg done 8074dc407927Smrg IFS="$lt_save_ifs" 80753eed67faSmbalmer ;; 8076dc407927Smrg esac], 8077dc407927Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 80783eed67faSmbalmer 8079dc407927Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8080dc407927Smrg [Whether or not to build static libraries]) 8081dc407927Smrg])# _LT_ENABLE_STATIC 80823eed67faSmbalmer 8083dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8084dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8085dc407927Smrg 8086dc407927Smrg# Old names: 8087dc407927SmrgAC_DEFUN([AC_ENABLE_STATIC], 8088dc407927Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8089dc407927Smrg]) 8090dc407927Smrg 8091dc407927SmrgAC_DEFUN([AC_DISABLE_STATIC], 8092dc407927Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8093dc407927Smrg]) 8094dc407927Smrg 8095dc407927SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8096dc407927SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8097dc407927Smrg 8098dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8099dc407927Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8100dc407927Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8101dc407927Smrg 8102dc407927Smrg 8103dc407927Smrg 8104dc407927Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8105dc407927Smrg# ---------------------------------- 8106dc407927Smrg# implement the --enable-fast-install flag, and support the `fast-install' 8107dc407927Smrg# and `disable-fast-install' LT_INIT options. 8108dc407927Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8109dc407927Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8110dc407927Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8111dc407927SmrgAC_ARG_ENABLE([fast-install], 8112dc407927Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8113dc407927Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8114dc407927Smrg [p=${PACKAGE-default} 8115dc407927Smrg case $enableval in 8116dc407927Smrg yes) enable_fast_install=yes ;; 8117dc407927Smrg no) enable_fast_install=no ;; 8118dc407927Smrg *) 8119dc407927Smrg enable_fast_install=no 8120dc407927Smrg # Look at the argument we got. We use all the common list separators. 8121dc407927Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8122dc407927Smrg for pkg in $enableval; do 8123dc407927Smrg IFS="$lt_save_ifs" 8124dc407927Smrg if test "X$pkg" = "X$p"; then 8125dc407927Smrg enable_fast_install=yes 8126dc407927Smrg fi 8127dc407927Smrg done 8128dc407927Smrg IFS="$lt_save_ifs" 81293eed67faSmbalmer ;; 8130dc407927Smrg esac], 8131dc407927Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 81323eed67faSmbalmer 8133dc407927Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8134dc407927Smrg [Whether or not to optimize for fast installation])dnl 8135dc407927Smrg])# _LT_ENABLE_FAST_INSTALL 81363eed67faSmbalmer 8137dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8138dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 81393eed67faSmbalmer 8140dc407927Smrg# Old names: 8141dc407927SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8142dc407927Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8143dc407927SmrgAC_DIAGNOSE([obsolete], 8144dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8145dc407927Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8146dc407927Smrg]) 81473eed67faSmbalmer 8148dc407927SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8149dc407927Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8150dc407927SmrgAC_DIAGNOSE([obsolete], 8151dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8152dc407927Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8153dc407927Smrg]) 81543eed67faSmbalmer 8155dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8156dc407927Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8157dc407927Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 81583eed67faSmbalmer 81593eed67faSmbalmer 8160dc407927Smrg# _LT_WITH_PIC([MODE]) 8161dc407927Smrg# -------------------- 8162dc407927Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8163dc407927Smrg# LT_INIT options. 8164dc407927Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8165dc407927Smrgm4_define([_LT_WITH_PIC], 8166dc407927Smrg[AC_ARG_WITH([pic], 8167dc407927Smrg [AS_HELP_STRING([--with-pic], 8168dc407927Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8169dc407927Smrg [pic_mode="$withval"], 8170dc407927Smrg [pic_mode=default]) 81713eed67faSmbalmer 8172dc407927Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8173dc407927Smrg 8174dc407927Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8175dc407927Smrg])# _LT_WITH_PIC 8176dc407927Smrg 8177dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8178dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8179dc407927Smrg 8180dc407927Smrg# Old name: 8181dc407927SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8182dc407927Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8183dc407927SmrgAC_DIAGNOSE([obsolete], 8184dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8185dc407927Smrgput the `pic-only' option into LT_INIT's first parameter.]) 81863eed67faSmbalmer]) 81873eed67faSmbalmer 8188dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8189dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8190dc407927Smrg 8191dc407927Smrg 8192dc407927Smrgm4_define([_LTDL_MODE], []) 8193dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8194dc407927Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8195dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8196dc407927Smrg [m4_define([_LTDL_MODE], [recursive])]) 8197dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8198dc407927Smrg [m4_define([_LTDL_MODE], [subproject])]) 8199dc407927Smrg 8200dc407927Smrgm4_define([_LTDL_TYPE], []) 8201dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8202dc407927Smrg [m4_define([_LTDL_TYPE], [installable])]) 8203dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8204dc407927Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8205dc407927Smrg 8206dc407927Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 82073eed67faSmbalmer# 8208dc407927Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8209dc407927Smrg# Written by Gary V. Vaughan, 2004 82103eed67faSmbalmer# 8211dc407927Smrg# This file is free software; the Free Software Foundation gives 8212dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 8213dc407927Smrg# modifications, as long as this notice is preserved. 82143eed67faSmbalmer 8215dc407927Smrg# serial 6 ltsugar.m4 82163eed67faSmbalmer 8217dc407927Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8218dc407927SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 82193eed67faSmbalmer 82203eed67faSmbalmer 8221dc407927Smrg# lt_join(SEP, ARG1, [ARG2...]) 8222dc407927Smrg# ----------------------------- 8223dc407927Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8224dc407927Smrg# associated separator. 8225dc407927Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8226dc407927Smrg# versions in m4sugar had bugs. 8227dc407927Smrgm4_define([lt_join], 8228dc407927Smrg[m4_if([$#], [1], [], 8229dc407927Smrg [$#], [2], [[$2]], 8230dc407927Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8231dc407927Smrgm4_define([_lt_join], 8232dc407927Smrg[m4_if([$#$2], [2], [], 8233dc407927Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8234dc407927Smrg 8235dc407927Smrg 8236dc407927Smrg# lt_car(LIST) 8237dc407927Smrg# lt_cdr(LIST) 8238dc407927Smrg# ------------ 8239dc407927Smrg# Manipulate m4 lists. 8240dc407927Smrg# These macros are necessary as long as will still need to support 8241dc407927Smrg# Autoconf-2.59 which quotes differently. 8242dc407927Smrgm4_define([lt_car], [[$1]]) 8243dc407927Smrgm4_define([lt_cdr], 8244dc407927Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8245dc407927Smrg [$#], 1, [], 8246dc407927Smrg [m4_dquote(m4_shift($@))])]) 8247dc407927Smrgm4_define([lt_unquote], $1) 8248dc407927Smrg 8249dc407927Smrg 8250dc407927Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8251dc407927Smrg# ------------------------------------------ 8252dc407927Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8253dc407927Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8254dc407927Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8255dc407927Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8256dc407927Smrg# than defined and empty). 8257dc407927Smrg# 8258dc407927Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8259dc407927Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8260dc407927Smrgm4_define([lt_append], 8261dc407927Smrg[m4_define([$1], 8262dc407927Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8263dc407927Smrg 8264dc407927Smrg 8265dc407927Smrg 8266dc407927Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8267dc407927Smrg# ---------------------------------------------------------- 8268dc407927Smrg# Produce a SEP delimited list of all paired combinations of elements of 8269dc407927Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8270dc407927Smrg# has the form PREFIXmINFIXSUFFIXn. 8271dc407927Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8272dc407927Smrgm4_define([lt_combine], 8273dc407927Smrg[m4_if(m4_eval([$# > 3]), [1], 8274dc407927Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8275dc407927Smrg[[m4_foreach([_Lt_prefix], [$2], 8276dc407927Smrg [m4_foreach([_Lt_suffix], 8277dc407927Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8278dc407927Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8279dc407927Smrg 8280dc407927Smrg 8281dc407927Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8282dc407927Smrg# ----------------------------------------------------------------------- 8283dc407927Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8284dc407927Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8285dc407927Smrgm4_define([lt_if_append_uniq], 8286dc407927Smrg[m4_ifdef([$1], 8287dc407927Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8288dc407927Smrg [lt_append([$1], [$2], [$3])$4], 8289dc407927Smrg [$5])], 8290dc407927Smrg [lt_append([$1], [$2], [$3])$4])]) 8291dc407927Smrg 8292dc407927Smrg 8293dc407927Smrg# lt_dict_add(DICT, KEY, VALUE) 8294dc407927Smrg# ----------------------------- 8295dc407927Smrgm4_define([lt_dict_add], 8296dc407927Smrg[m4_define([$1($2)], [$3])]) 82973eed67faSmbalmer 82983eed67faSmbalmer 8299dc407927Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8300dc407927Smrg# -------------------------------------------- 8301dc407927Smrgm4_define([lt_dict_add_subkey], 8302dc407927Smrg[m4_define([$1($2:$3)], [$4])]) 83033eed67faSmbalmer 83043eed67faSmbalmer 8305dc407927Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8306dc407927Smrg# ---------------------------------- 8307dc407927Smrgm4_define([lt_dict_fetch], 8308dc407927Smrg[m4_ifval([$3], 8309dc407927Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8310dc407927Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8311dc407927Smrg 8312dc407927Smrg 8313dc407927Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8314dc407927Smrg# ----------------------------------------------------------------- 8315dc407927Smrgm4_define([lt_if_dict_fetch], 8316dc407927Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8317dc407927Smrg [$5], 8318dc407927Smrg [$6])]) 83193eed67faSmbalmer 8320dc407927Smrg 8321dc407927Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8322dc407927Smrg# -------------------------------------------------------------- 8323dc407927Smrgm4_define([lt_dict_filter], 8324dc407927Smrg[m4_if([$5], [], [], 8325dc407927Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8326dc407927Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8327dc407927Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 83283eed67faSmbalmer]) 83293eed67faSmbalmer 8330dc407927Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8331dc407927Smrg# 8332dc407927Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8333dc407927Smrg# Written by Scott James Remnant, 2004 8334dc407927Smrg# 8335dc407927Smrg# This file is free software; the Free Software Foundation gives 8336dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 8337dc407927Smrg# modifications, as long as this notice is preserved. 83383eed67faSmbalmer 8339dd0822caSmrg# @configure_input@ 83403eed67faSmbalmer 8341dd0822caSmrg# serial 3293 ltversion.m4 8342dc407927Smrg# This file is part of GNU Libtool 83433eed67faSmbalmer 8344dd0822caSmrgm4_define([LT_PACKAGE_VERSION], [2.4]) 8345dd0822caSmrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 83463eed67faSmbalmer 8347dc407927SmrgAC_DEFUN([LTVERSION_VERSION], 8348dd0822caSmrg[macro_version='2.4' 8349dd0822caSmrgmacro_revision='1.3293' 8350dc407927Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8351dc407927Smrg_LT_DECL(, macro_revision, 0) 83523eed67faSmbalmer]) 83533eed67faSmbalmer 8354dc407927Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8355dc407927Smrg# 8356dd0822caSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8357dc407927Smrg# Written by Scott James Remnant, 2004. 8358dc407927Smrg# 8359dc407927Smrg# This file is free software; the Free Software Foundation gives 8360dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 8361dc407927Smrg# modifications, as long as this notice is preserved. 8362dc407927Smrg 8363dd0822caSmrg# serial 5 lt~obsolete.m4 8364dc407927Smrg 8365dc407927Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8366dc407927Smrg# 8367dc407927Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8368dc407927Smrg# which have later been changed to m4_define as they aren't part of the 8369dc407927Smrg# exported API, or moved to Autoconf or Automake where they belong. 8370dc407927Smrg# 8371dc407927Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8372dc407927Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8373dc407927Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8374dc407927Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8375dc407927Smrg# and doesn't know about Autoconf macros at all.) 8376dc407927Smrg# 8377dc407927Smrg# So we provide this file, which has a silly filename so it's always 8378dc407927Smrg# included after everything else. This provides aclocal with the 8379dc407927Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8380dc407927Smrg# because those macros already exist, or will be overwritten later. 8381dc407927Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8382dc407927Smrg# 8383dc407927Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8384dc407927Smrg# Yes, that means every name once taken will need to remain here until 8385dc407927Smrg# we give up compatibility with versions before 1.7, at which point 8386dc407927Smrg# we need to keep only those names which we still refer to. 8387dc407927Smrg 8388dc407927Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8389dc407927SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8390dc407927Smrg 8391dc407927Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8392dc407927Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8393dc407927Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8394dc407927Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8395dc407927Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8396dc407927Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8397dc407927Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8398dc407927Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8399dc407927Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8400dc407927Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8401dc407927Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8402dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8403dc407927Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8404dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8405dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8406dc407927Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8407dc407927Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8408dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8409dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8410dc407927Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8411dc407927Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8412dc407927Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8413dc407927Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8414dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8415dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8416dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8417dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8418dc407927Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8419dc407927Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8420dc407927Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8421dc407927Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8422dc407927Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8423dc407927Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8424dc407927Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8425dc407927Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8426dc407927Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8427dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8428dc407927Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8429dc407927Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8430dc407927Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8431dc407927Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8432dc407927Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8433dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8434dc407927Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8435dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8436dc407927Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8437dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8438dc407927Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8439dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8440dc407927Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8441dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8442dc407927Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8443dc407927Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8444dc407927Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8445dd0822caSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8446dd0822caSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8447dd0822caSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8448dd0822caSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8449dd0822caSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8450dd0822caSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8451dd0822caSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8452dc407927Smrg 84533eed67faSmbalmer# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8454dd0822caSmrg# serial 1 (pkg-config-0.24) 84553eed67faSmbalmer# 84563eed67faSmbalmer# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 84573eed67faSmbalmer# 84583eed67faSmbalmer# This program is free software; you can redistribute it and/or modify 84593eed67faSmbalmer# it under the terms of the GNU General Public License as published by 84603eed67faSmbalmer# the Free Software Foundation; either version 2 of the License, or 84613eed67faSmbalmer# (at your option) any later version. 84623eed67faSmbalmer# 84633eed67faSmbalmer# This program is distributed in the hope that it will be useful, but 84643eed67faSmbalmer# WITHOUT ANY WARRANTY; without even the implied warranty of 84653eed67faSmbalmer# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 84663eed67faSmbalmer# General Public License for more details. 84673eed67faSmbalmer# 84683eed67faSmbalmer# You should have received a copy of the GNU General Public License 84693eed67faSmbalmer# along with this program; if not, write to the Free Software 84703eed67faSmbalmer# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 84713eed67faSmbalmer# 84723eed67faSmbalmer# As a special exception to the GNU General Public License, if you 84733eed67faSmbalmer# distribute this file as part of a program that contains a 84743eed67faSmbalmer# configuration script generated by Autoconf, you may include it under 84753eed67faSmbalmer# the same distribution terms that you use for the rest of that program. 84763eed67faSmbalmer 84773eed67faSmbalmer# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 84783eed67faSmbalmer# ---------------------------------- 84793eed67faSmbalmerAC_DEFUN([PKG_PROG_PKG_CONFIG], 84803eed67faSmbalmer[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 84813eed67faSmbalmerm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8482dd0822caSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8483dd0822caSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8484dd0822caSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8485dd0822caSmrg 84863eed67faSmbalmerif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 84873eed67faSmbalmer AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 84883eed67faSmbalmerfi 84893eed67faSmbalmerif test -n "$PKG_CONFIG"; then 84903eed67faSmbalmer _pkg_min_version=m4_default([$1], [0.9.0]) 84913eed67faSmbalmer AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 84923eed67faSmbalmer if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 84933eed67faSmbalmer AC_MSG_RESULT([yes]) 84943eed67faSmbalmer else 84953eed67faSmbalmer AC_MSG_RESULT([no]) 84963eed67faSmbalmer PKG_CONFIG="" 84973eed67faSmbalmer fi 84983eed67faSmbalmerfi[]dnl 84993eed67faSmbalmer])# PKG_PROG_PKG_CONFIG 85003eed67faSmbalmer 85013eed67faSmbalmer# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 85023eed67faSmbalmer# 85033eed67faSmbalmer# Check to see whether a particular set of modules exists. Similar 85043eed67faSmbalmer# to PKG_CHECK_MODULES(), but does not set variables or print errors. 85053eed67faSmbalmer# 8506dd0822caSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8507dd0822caSmrg# only at the first occurence in configure.ac, so if the first place 8508dd0822caSmrg# it's called might be skipped (such as if it is within an "if", you 8509dd0822caSmrg# have to call PKG_CHECK_EXISTS manually 85103eed67faSmbalmer# -------------------------------------------------------------- 85113eed67faSmbalmerAC_DEFUN([PKG_CHECK_EXISTS], 85123eed67faSmbalmer[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 85133eed67faSmbalmerif test -n "$PKG_CONFIG" && \ 85143eed67faSmbalmer AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8515dd0822caSmrg m4_default([$2], [:]) 85163eed67faSmbalmerm4_ifvaln([$3], [else 85173eed67faSmbalmer $3])dnl 85183eed67faSmbalmerfi]) 85193eed67faSmbalmer 85203eed67faSmbalmer# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 85213eed67faSmbalmer# --------------------------------------------- 85223eed67faSmbalmerm4_define([_PKG_CONFIG], 8523dc407927Smrg[if test -n "$$1"; then 8524dc407927Smrg pkg_cv_[]$1="$$1" 8525dc407927Smrg elif test -n "$PKG_CONFIG"; then 8526dc407927Smrg PKG_CHECK_EXISTS([$3], 8527dc407927Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8528dc407927Smrg [pkg_failed=yes]) 8529dc407927Smrg else 8530dc407927Smrg pkg_failed=untried 85313eed67faSmbalmerfi[]dnl 85323eed67faSmbalmer])# _PKG_CONFIG 85333eed67faSmbalmer 85343eed67faSmbalmer# _PKG_SHORT_ERRORS_SUPPORTED 85353eed67faSmbalmer# ----------------------------- 85363eed67faSmbalmerAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 85373eed67faSmbalmer[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 85383eed67faSmbalmerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 85393eed67faSmbalmer _pkg_short_errors_supported=yes 85403eed67faSmbalmerelse 85413eed67faSmbalmer _pkg_short_errors_supported=no 85423eed67faSmbalmerfi[]dnl 85433eed67faSmbalmer])# _PKG_SHORT_ERRORS_SUPPORTED 85443eed67faSmbalmer 85453eed67faSmbalmer 85463eed67faSmbalmer# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 85473eed67faSmbalmer# [ACTION-IF-NOT-FOUND]) 85483eed67faSmbalmer# 85493eed67faSmbalmer# 85503eed67faSmbalmer# Note that if there is a possibility the first call to 85513eed67faSmbalmer# PKG_CHECK_MODULES might not happen, you should be sure to include an 85523eed67faSmbalmer# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 85533eed67faSmbalmer# 85543eed67faSmbalmer# 85553eed67faSmbalmer# -------------------------------------------------------------- 85563eed67faSmbalmerAC_DEFUN([PKG_CHECK_MODULES], 85573eed67faSmbalmer[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 85583eed67faSmbalmerAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 85593eed67faSmbalmerAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 85603eed67faSmbalmer 85613eed67faSmbalmerpkg_failed=no 85623eed67faSmbalmerAC_MSG_CHECKING([for $1]) 85633eed67faSmbalmer 85643eed67faSmbalmer_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 85653eed67faSmbalmer_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 85663eed67faSmbalmer 85673eed67faSmbalmerm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 85683eed67faSmbalmerand $1[]_LIBS to avoid the need to call pkg-config. 85693eed67faSmbalmerSee the pkg-config man page for more details.]) 85703eed67faSmbalmer 85713eed67faSmbalmerif test $pkg_failed = yes; then 8572dd0822caSmrg AC_MSG_RESULT([no]) 85733eed67faSmbalmer _PKG_SHORT_ERRORS_SUPPORTED 85743eed67faSmbalmer if test $_pkg_short_errors_supported = yes; then 8575dc407927Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 85763eed67faSmbalmer else 8577dc407927Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 85783eed67faSmbalmer fi 85793eed67faSmbalmer # Put the nasty error message in config.log where it belongs 85803eed67faSmbalmer echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 85813eed67faSmbalmer 8582dd0822caSmrg m4_default([$4], [AC_MSG_ERROR( 85833eed67faSmbalmer[Package requirements ($2) were not met: 85843eed67faSmbalmer 85853eed67faSmbalmer$$1_PKG_ERRORS 85863eed67faSmbalmer 85873eed67faSmbalmerConsider adjusting the PKG_CONFIG_PATH environment variable if you 85883eed67faSmbalmerinstalled software in a non-standard prefix. 85893eed67faSmbalmer 8590dd0822caSmrg_PKG_TEXT]) 8591dd0822caSmrg ]) 85923eed67faSmbalmerelif test $pkg_failed = untried; then 8593dd0822caSmrg AC_MSG_RESULT([no]) 8594dd0822caSmrg m4_default([$4], [AC_MSG_FAILURE( 85953eed67faSmbalmer[The pkg-config script could not be found or is too old. Make sure it 85963eed67faSmbalmeris in your PATH or set the PKG_CONFIG environment variable to the full 85973eed67faSmbalmerpath to pkg-config. 85983eed67faSmbalmer 85993eed67faSmbalmer_PKG_TEXT 86003eed67faSmbalmer 8601dd0822caSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8602dd0822caSmrg ]) 86033eed67faSmbalmerelse 86043eed67faSmbalmer $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 86053eed67faSmbalmer $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 86063eed67faSmbalmer AC_MSG_RESULT([yes]) 8607dd0822caSmrg $3 86083eed67faSmbalmerfi[]dnl 86093eed67faSmbalmer])# PKG_CHECK_MODULES 86103eed67faSmbalmer 8611dc407927Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 86123eed67faSmbalmer# 86133eed67faSmbalmer# This file is free software; the Free Software Foundation 86143eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 86153eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 86163eed67faSmbalmer 86173eed67faSmbalmer# AM_AUTOMAKE_VERSION(VERSION) 86183eed67faSmbalmer# ---------------------------- 86193eed67faSmbalmer# Automake X.Y traces this macro to ensure aclocal.m4 has been 86203eed67faSmbalmer# generated from the m4 files accompanying Automake X.Y. 8621dc407927Smrg# (This private macro should not be called outside this file.) 8622dc407927SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8623dc407927Smrg[am__api_version='1.11' 8624dc407927Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8625dc407927Smrgdnl require some minimum version. Point them to the right macro. 8626dc407927Smrgm4_if([$1], [1.11.1], [], 8627dc407927Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8628dc407927Smrg]) 8629dc407927Smrg 8630dc407927Smrg# _AM_AUTOCONF_VERSION(VERSION) 8631dc407927Smrg# ----------------------------- 8632dc407927Smrg# aclocal traces this macro to find the Autoconf version. 8633dc407927Smrg# This is a private macro too. Using m4_define simplifies 8634dc407927Smrg# the logic in aclocal, which can simply ignore this definition. 8635dc407927Smrgm4_define([_AM_AUTOCONF_VERSION], []) 86363eed67faSmbalmer 86373eed67faSmbalmer# AM_SET_CURRENT_AUTOMAKE_VERSION 86383eed67faSmbalmer# ------------------------------- 8639dc407927Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8640dc407927Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 86413eed67faSmbalmerAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8642dc407927Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 8643dc407927Smrgm4_ifndef([AC_AUTOCONF_VERSION], 8644dc407927Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8645dc407927Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 86463eed67faSmbalmer 86473eed67faSmbalmer# AM_AUX_DIR_EXPAND -*- Autoconf -*- 86483eed67faSmbalmer 86493eed67faSmbalmer# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 86503eed67faSmbalmer# 86513eed67faSmbalmer# This file is free software; the Free Software Foundation 86523eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 86533eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 86543eed67faSmbalmer 86553eed67faSmbalmer# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 86563eed67faSmbalmer# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 86573eed67faSmbalmer# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 86583eed67faSmbalmer# 86593eed67faSmbalmer# Of course, Automake must honor this variable whenever it calls a 86603eed67faSmbalmer# tool from the auxiliary directory. The problem is that $srcdir (and 86613eed67faSmbalmer# therefore $ac_aux_dir as well) can be either absolute or relative, 86623eed67faSmbalmer# depending on how configure is run. This is pretty annoying, since 86633eed67faSmbalmer# it makes $ac_aux_dir quite unusable in subdirectories: in the top 86643eed67faSmbalmer# source directory, any form will work fine, but in subdirectories a 86653eed67faSmbalmer# relative path needs to be adjusted first. 86663eed67faSmbalmer# 86673eed67faSmbalmer# $ac_aux_dir/missing 86683eed67faSmbalmer# fails when called from a subdirectory if $ac_aux_dir is relative 86693eed67faSmbalmer# $top_srcdir/$ac_aux_dir/missing 86703eed67faSmbalmer# fails if $ac_aux_dir is absolute, 86713eed67faSmbalmer# fails when called from a subdirectory in a VPATH build with 86723eed67faSmbalmer# a relative $ac_aux_dir 86733eed67faSmbalmer# 86743eed67faSmbalmer# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86753eed67faSmbalmer# are both prefixed by $srcdir. In an in-source build this is usually 86763eed67faSmbalmer# harmless because $srcdir is `.', but things will broke when you 86773eed67faSmbalmer# start a VPATH build or use an absolute $srcdir. 86783eed67faSmbalmer# 86793eed67faSmbalmer# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 86803eed67faSmbalmer# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 86813eed67faSmbalmer# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 86823eed67faSmbalmer# and then we would define $MISSING as 86833eed67faSmbalmer# MISSING="\${SHELL} $am_aux_dir/missing" 86843eed67faSmbalmer# This will work as long as MISSING is not called from configure, because 86853eed67faSmbalmer# unfortunately $(top_srcdir) has no meaning in configure. 86863eed67faSmbalmer# However there are other variables, like CC, which are often used in 86873eed67faSmbalmer# configure, and could therefore not use this "fixed" $ac_aux_dir. 86883eed67faSmbalmer# 86893eed67faSmbalmer# Another solution, used here, is to always expand $ac_aux_dir to an 86903eed67faSmbalmer# absolute PATH. The drawback is that using absolute paths prevent a 86913eed67faSmbalmer# configured tree to be moved without reconfiguration. 86923eed67faSmbalmer 86933eed67faSmbalmerAC_DEFUN([AM_AUX_DIR_EXPAND], 86943eed67faSmbalmer[dnl Rely on autoconf to set up CDPATH properly. 86953eed67faSmbalmerAC_PREREQ([2.50])dnl 86963eed67faSmbalmer# expand $ac_aux_dir to an absolute path 86973eed67faSmbalmeram_aux_dir=`cd $ac_aux_dir && pwd` 86983eed67faSmbalmer]) 86993eed67faSmbalmer 87003eed67faSmbalmer# AM_CONDITIONAL -*- Autoconf -*- 87013eed67faSmbalmer 8702dc407927Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 87033eed67faSmbalmer# Free Software Foundation, Inc. 87043eed67faSmbalmer# 87053eed67faSmbalmer# This file is free software; the Free Software Foundation 87063eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 87073eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 87083eed67faSmbalmer 8709dc407927Smrg# serial 9 87103eed67faSmbalmer 87113eed67faSmbalmer# AM_CONDITIONAL(NAME, SHELL-CONDITION) 87123eed67faSmbalmer# ------------------------------------- 87133eed67faSmbalmer# Define a conditional. 87143eed67faSmbalmerAC_DEFUN([AM_CONDITIONAL], 87153eed67faSmbalmer[AC_PREREQ(2.52)dnl 87163eed67faSmbalmer ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 87173eed67faSmbalmer [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8718dc407927SmrgAC_SUBST([$1_TRUE])dnl 8719dc407927SmrgAC_SUBST([$1_FALSE])dnl 8720dc407927Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8721dc407927Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8722dc407927Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 87233eed67faSmbalmerif $2; then 87243eed67faSmbalmer $1_TRUE= 87253eed67faSmbalmer $1_FALSE='#' 87263eed67faSmbalmerelse 87273eed67faSmbalmer $1_TRUE='#' 87283eed67faSmbalmer $1_FALSE= 87293eed67faSmbalmerfi 87303eed67faSmbalmerAC_CONFIG_COMMANDS_PRE( 87313eed67faSmbalmer[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 87323eed67faSmbalmer AC_MSG_ERROR([[conditional "$1" was never defined. 87333eed67faSmbalmerUsually this means the macro was only invoked conditionally.]]) 87343eed67faSmbalmerfi])]) 87353eed67faSmbalmer 8736dc407927Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 87373eed67faSmbalmer# Free Software Foundation, Inc. 87383eed67faSmbalmer# 87393eed67faSmbalmer# This file is free software; the Free Software Foundation 87403eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 87413eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 87423eed67faSmbalmer 8743dc407927Smrg# serial 10 87443eed67faSmbalmer 87453eed67faSmbalmer# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 87463eed67faSmbalmer# written in clear, in which case automake, when reading aclocal.m4, 87473eed67faSmbalmer# will think it sees a *use*, and therefore will trigger all it's 87483eed67faSmbalmer# C support machinery. Also note that it means that autoscan, seeing 87493eed67faSmbalmer# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 87503eed67faSmbalmer 87513eed67faSmbalmer 87523eed67faSmbalmer# _AM_DEPENDENCIES(NAME) 87533eed67faSmbalmer# ---------------------- 87543eed67faSmbalmer# See how the compiler implements dependency checking. 87553eed67faSmbalmer# NAME is "CC", "CXX", "GCJ", or "OBJC". 87563eed67faSmbalmer# We try a few techniques and use that to set a single cache variable. 87573eed67faSmbalmer# 87583eed67faSmbalmer# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 87593eed67faSmbalmer# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 87603eed67faSmbalmer# dependency, and given that the user is not expected to run this macro, 87613eed67faSmbalmer# just rely on AC_PROG_CC. 87623eed67faSmbalmerAC_DEFUN([_AM_DEPENDENCIES], 87633eed67faSmbalmer[AC_REQUIRE([AM_SET_DEPDIR])dnl 87643eed67faSmbalmerAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 87653eed67faSmbalmerAC_REQUIRE([AM_MAKE_INCLUDE])dnl 87663eed67faSmbalmerAC_REQUIRE([AM_DEP_TRACK])dnl 87673eed67faSmbalmer 87683eed67faSmbalmerifelse([$1], CC, [depcc="$CC" am_compiler_list=], 87693eed67faSmbalmer [$1], CXX, [depcc="$CXX" am_compiler_list=], 87703eed67faSmbalmer [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8771dc407927Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 87723eed67faSmbalmer [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 87733eed67faSmbalmer [depcc="$$1" am_compiler_list=]) 87743eed67faSmbalmer 87753eed67faSmbalmerAC_CACHE_CHECK([dependency style of $depcc], 87763eed67faSmbalmer [am_cv_$1_dependencies_compiler_type], 87773eed67faSmbalmer[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 87783eed67faSmbalmer # We make a subdir and do the tests there. Otherwise we can end up 87793eed67faSmbalmer # making bogus files that we don't know about and never remove. For 87803eed67faSmbalmer # instance it was reported that on HP-UX the gcc test will end up 87813eed67faSmbalmer # making a dummy file named `D' -- because `-MD' means `put the output 87823eed67faSmbalmer # in D'. 87833eed67faSmbalmer mkdir conftest.dir 87843eed67faSmbalmer # Copy depcomp to subdir because otherwise we won't find it if we're 87853eed67faSmbalmer # using a relative directory. 87863eed67faSmbalmer cp "$am_depcomp" conftest.dir 87873eed67faSmbalmer cd conftest.dir 87883eed67faSmbalmer # We will build objects and dependencies in a subdirectory because 87893eed67faSmbalmer # it helps to detect inapplicable dependency modes. For instance 87903eed67faSmbalmer # both Tru64's cc and ICC support -MD to output dependencies as a 87913eed67faSmbalmer # side effect of compilation, but ICC will put the dependencies in 87923eed67faSmbalmer # the current directory while Tru64 will put them in the object 87933eed67faSmbalmer # directory. 87943eed67faSmbalmer mkdir sub 87953eed67faSmbalmer 87963eed67faSmbalmer am_cv_$1_dependencies_compiler_type=none 87973eed67faSmbalmer if test "$am_compiler_list" = ""; then 87983eed67faSmbalmer am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 87993eed67faSmbalmer fi 8800dc407927Smrg am__universal=false 8801dc407927Smrg m4_case([$1], [CC], 8802dc407927Smrg [case " $depcc " in #( 8803dc407927Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8804dc407927Smrg esac], 8805dc407927Smrg [CXX], 8806dc407927Smrg [case " $depcc " in #( 8807dc407927Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8808dc407927Smrg esac]) 8809dc407927Smrg 88103eed67faSmbalmer for depmode in $am_compiler_list; do 88113eed67faSmbalmer # Setup a source with many dependencies, because some compilers 88123eed67faSmbalmer # like to wrap large dependency lists on column 80 (with \), and 88133eed67faSmbalmer # we should not choose a depcomp mode which is confused by this. 88143eed67faSmbalmer # 88153eed67faSmbalmer # We need to recreate these files for each test, as the compiler may 88163eed67faSmbalmer # overwrite some of them when testing with obscure command lines. 88173eed67faSmbalmer # This happens at least with the AIX C compiler. 88183eed67faSmbalmer : > sub/conftest.c 88193eed67faSmbalmer for i in 1 2 3 4 5 6; do 88203eed67faSmbalmer echo '#include "conftst'$i'.h"' >> sub/conftest.c 88213eed67faSmbalmer # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 88223eed67faSmbalmer # Solaris 8's {/usr,}/bin/sh. 88233eed67faSmbalmer touch sub/conftst$i.h 88243eed67faSmbalmer done 88253eed67faSmbalmer echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 88263eed67faSmbalmer 8827dc407927Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8828dc407927Smrg # mode. It turns out that the SunPro C++ compiler does not properly 8829dc407927Smrg # handle `-M -o', and we need to detect this. Also, some Intel 8830dc407927Smrg # versions had trouble with output in subdirs 8831dc407927Smrg am__obj=sub/conftest.${OBJEXT-o} 8832dc407927Smrg am__minus_obj="-o $am__obj" 88333eed67faSmbalmer case $depmode in 8834dc407927Smrg gcc) 8835dc407927Smrg # This depmode causes a compiler race in universal mode. 8836dc407927Smrg test "$am__universal" = false || continue 8837dc407927Smrg ;; 88383eed67faSmbalmer nosideeffect) 88393eed67faSmbalmer # after this tag, mechanisms are not by side-effect, so they'll 88403eed67faSmbalmer # only be used when explicitly requested 88413eed67faSmbalmer if test "x$enable_dependency_tracking" = xyes; then 88423eed67faSmbalmer continue 88433eed67faSmbalmer else 88443eed67faSmbalmer break 88453eed67faSmbalmer fi 88463eed67faSmbalmer ;; 8847dc407927Smrg msvisualcpp | msvcmsys) 8848dc407927Smrg # This compiler won't grok `-c -o', but also, the minuso test has 8849dc407927Smrg # not run yet. These depmodes are late enough in the game, and 8850dc407927Smrg # so weak that their functioning should not be impacted. 8851dc407927Smrg am__obj=conftest.${OBJEXT-o} 8852dc407927Smrg am__minus_obj= 8853dc407927Smrg ;; 88543eed67faSmbalmer none) break ;; 88553eed67faSmbalmer esac 88563eed67faSmbalmer if depmode=$depmode \ 8857dc407927Smrg source=sub/conftest.c object=$am__obj \ 88583eed67faSmbalmer depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8859dc407927Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 88603eed67faSmbalmer >/dev/null 2>conftest.err && 8861dc407927Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 88623eed67faSmbalmer grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8863dc407927Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 88643eed67faSmbalmer ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 88653eed67faSmbalmer # icc doesn't choke on unknown options, it will just issue warnings 88663eed67faSmbalmer # or remarks (even with -Werror). So we grep stderr for any message 88673eed67faSmbalmer # that says an option was ignored or not supported. 88683eed67faSmbalmer # When given -MP, icc 7.0 and 7.1 complain thusly: 88693eed67faSmbalmer # icc: Command line warning: ignoring option '-M'; no argument required 88703eed67faSmbalmer # The diagnosis changed in icc 8.0: 88713eed67faSmbalmer # icc: Command line remark: option '-MP' not supported 88723eed67faSmbalmer if (grep 'ignoring option' conftest.err || 88733eed67faSmbalmer grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 88743eed67faSmbalmer am_cv_$1_dependencies_compiler_type=$depmode 88753eed67faSmbalmer break 88763eed67faSmbalmer fi 88773eed67faSmbalmer fi 88783eed67faSmbalmer done 88793eed67faSmbalmer 88803eed67faSmbalmer cd .. 88813eed67faSmbalmer rm -rf conftest.dir 88823eed67faSmbalmerelse 88833eed67faSmbalmer am_cv_$1_dependencies_compiler_type=none 88843eed67faSmbalmerfi 88853eed67faSmbalmer]) 88863eed67faSmbalmerAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 88873eed67faSmbalmerAM_CONDITIONAL([am__fastdep$1], [ 88883eed67faSmbalmer test "x$enable_dependency_tracking" != xno \ 88893eed67faSmbalmer && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 88903eed67faSmbalmer]) 88913eed67faSmbalmer 88923eed67faSmbalmer 88933eed67faSmbalmer# AM_SET_DEPDIR 88943eed67faSmbalmer# ------------- 88953eed67faSmbalmer# Choose a directory name for dependency files. 88963eed67faSmbalmer# This macro is AC_REQUIREd in _AM_DEPENDENCIES 88973eed67faSmbalmerAC_DEFUN([AM_SET_DEPDIR], 88983eed67faSmbalmer[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 88993eed67faSmbalmerAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 89003eed67faSmbalmer]) 89013eed67faSmbalmer 89023eed67faSmbalmer 89033eed67faSmbalmer# AM_DEP_TRACK 89043eed67faSmbalmer# ------------ 89053eed67faSmbalmerAC_DEFUN([AM_DEP_TRACK], 89063eed67faSmbalmer[AC_ARG_ENABLE(dependency-tracking, 89073eed67faSmbalmer[ --disable-dependency-tracking speeds up one-time build 89083eed67faSmbalmer --enable-dependency-tracking do not reject slow dependency extractors]) 89093eed67faSmbalmerif test "x$enable_dependency_tracking" != xno; then 89103eed67faSmbalmer am_depcomp="$ac_aux_dir/depcomp" 89113eed67faSmbalmer AMDEPBACKSLASH='\' 89123eed67faSmbalmerfi 89133eed67faSmbalmerAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8914dc407927SmrgAC_SUBST([AMDEPBACKSLASH])dnl 8915dc407927Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 89163eed67faSmbalmer]) 89173eed67faSmbalmer 89183eed67faSmbalmer# Generate code to set up dependency tracking. -*- Autoconf -*- 89193eed67faSmbalmer 8920dc407927Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 89213eed67faSmbalmer# Free Software Foundation, Inc. 89223eed67faSmbalmer# 89233eed67faSmbalmer# This file is free software; the Free Software Foundation 89243eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 89253eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 89263eed67faSmbalmer 8927dc407927Smrg#serial 5 89283eed67faSmbalmer 89293eed67faSmbalmer# _AM_OUTPUT_DEPENDENCY_COMMANDS 89303eed67faSmbalmer# ------------------------------ 89313eed67faSmbalmerAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8932dc407927Smrg[{ 8933dc407927Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 8934dc407927Smrg # are listed without --file. Let's play safe and only enable the eval 8935dc407927Smrg # if we detect the quoting. 8936dc407927Smrg case $CONFIG_FILES in 8937dc407927Smrg *\'*) eval set x "$CONFIG_FILES" ;; 8938dc407927Smrg *) set x $CONFIG_FILES ;; 8939dc407927Smrg esac 8940dc407927Smrg shift 8941dc407927Smrg for mf 8942dc407927Smrg do 8943dc407927Smrg # Strip MF so we end up with the name of the file. 8944dc407927Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8945dc407927Smrg # Check whether this is an Automake generated Makefile or not. 8946dc407927Smrg # We used to match only the files named `Makefile.in', but 8947dc407927Smrg # some people rename them; so instead we look at the file content. 8948dc407927Smrg # Grep'ing the first line is not enough: some people post-process 8949dc407927Smrg # each Makefile.in and add a new line on top of each file to say so. 8950dc407927Smrg # Grep'ing the whole file is not good either: AIX grep has a line 8951dc407927Smrg # limit of 2048, but all sed's we know have understand at least 4000. 8952dc407927Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8953dc407927Smrg dirpart=`AS_DIRNAME("$mf")` 8954dc407927Smrg else 8955dc407927Smrg continue 8956dc407927Smrg fi 8957dc407927Smrg # Extract the definition of DEPDIR, am__include, and am__quote 8958dc407927Smrg # from the Makefile without running `make'. 8959dc407927Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8960dc407927Smrg test -z "$DEPDIR" && continue 8961dc407927Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8962dc407927Smrg test -z "am__include" && continue 8963dc407927Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8964dc407927Smrg # When using ansi2knr, U may be empty or an underscore; expand it 8965dc407927Smrg U=`sed -n 's/^U = //p' < "$mf"` 8966dc407927Smrg # Find all dependency output files, they are included files with 8967dc407927Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8968dc407927Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 8969dc407927Smrg # expansion. 8970dc407927Smrg for file in `sed -n " 8971dc407927Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8972dc407927Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8973dc407927Smrg # Make sure the directory exists. 8974dc407927Smrg test -f "$dirpart/$file" && continue 8975dc407927Smrg fdir=`AS_DIRNAME(["$file"])` 8976dc407927Smrg AS_MKDIR_P([$dirpart/$fdir]) 8977dc407927Smrg # echo "creating $dirpart/$file" 8978dc407927Smrg echo '# dummy' > "$dirpart/$file" 8979dc407927Smrg done 89803eed67faSmbalmer done 8981dc407927Smrg} 89823eed67faSmbalmer])# _AM_OUTPUT_DEPENDENCY_COMMANDS 89833eed67faSmbalmer 89843eed67faSmbalmer 89853eed67faSmbalmer# AM_OUTPUT_DEPENDENCY_COMMANDS 89863eed67faSmbalmer# ----------------------------- 89873eed67faSmbalmer# This macro should only be invoked once -- use via AC_REQUIRE. 89883eed67faSmbalmer# 89893eed67faSmbalmer# This code is only required when automatic dependency tracking 89903eed67faSmbalmer# is enabled. FIXME. This creates each `.P' file that we will 89913eed67faSmbalmer# need in order to bootstrap the dependency handling code. 89923eed67faSmbalmerAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 89933eed67faSmbalmer[AC_CONFIG_COMMANDS([depfiles], 89943eed67faSmbalmer [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 89953eed67faSmbalmer [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 89963eed67faSmbalmer]) 89973eed67faSmbalmer 89983eed67faSmbalmer# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 89993eed67faSmbalmer# Free Software Foundation, Inc. 90003eed67faSmbalmer# 90013eed67faSmbalmer# This file is free software; the Free Software Foundation 90023eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 90033eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 90043eed67faSmbalmer 90053eed67faSmbalmer# serial 8 90063eed67faSmbalmer 90073eed67faSmbalmer# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 90083eed67faSmbalmerAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 90093eed67faSmbalmer 90103eed67faSmbalmer# Do all the work for Automake. -*- Autoconf -*- 90113eed67faSmbalmer 9012dc407927Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 9013dc407927Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 90143eed67faSmbalmer# 90153eed67faSmbalmer# This file is free software; the Free Software Foundation 90163eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 90173eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 90183eed67faSmbalmer 9019dc407927Smrg# serial 16 90203eed67faSmbalmer 90213eed67faSmbalmer# This macro actually does too much. Some checks are only needed if 90223eed67faSmbalmer# your package does certain things. But this isn't really a big deal. 90233eed67faSmbalmer 90243eed67faSmbalmer# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 90253eed67faSmbalmer# AM_INIT_AUTOMAKE([OPTIONS]) 90263eed67faSmbalmer# ----------------------------------------------- 90273eed67faSmbalmer# The call with PACKAGE and VERSION arguments is the old style 90283eed67faSmbalmer# call (pre autoconf-2.50), which is being phased out. PACKAGE 90293eed67faSmbalmer# and VERSION should now be passed to AC_INIT and removed from 90303eed67faSmbalmer# the call to AM_INIT_AUTOMAKE. 90313eed67faSmbalmer# We support both call styles for the transition. After 90323eed67faSmbalmer# the next Automake release, Autoconf can make the AC_INIT 90333eed67faSmbalmer# arguments mandatory, and then we can depend on a new Autoconf 90343eed67faSmbalmer# release and drop the old call support. 90353eed67faSmbalmerAC_DEFUN([AM_INIT_AUTOMAKE], 9036dc407927Smrg[AC_PREREQ([2.62])dnl 90373eed67faSmbalmerdnl Autoconf wants to disallow AM_ names. We explicitly allow 90383eed67faSmbalmerdnl the ones we care about. 90393eed67faSmbalmerm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 90403eed67faSmbalmerAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 90413eed67faSmbalmerAC_REQUIRE([AC_PROG_INSTALL])dnl 9042dc407927Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9043dc407927Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9044dc407927Smrg # is not polluted with repeated "-I." 9045dc407927Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9046dc407927Smrg # test to see if srcdir already configured 9047dc407927Smrg if test -f $srcdir/config.status; then 9048dc407927Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9049dc407927Smrg fi 90503eed67faSmbalmerfi 90513eed67faSmbalmer 90523eed67faSmbalmer# test whether we have cygpath 90533eed67faSmbalmerif test -z "$CYGPATH_W"; then 90543eed67faSmbalmer if (cygpath --version) >/dev/null 2>/dev/null; then 90553eed67faSmbalmer CYGPATH_W='cygpath -w' 90563eed67faSmbalmer else 90573eed67faSmbalmer CYGPATH_W=echo 90583eed67faSmbalmer fi 90593eed67faSmbalmerfi 90603eed67faSmbalmerAC_SUBST([CYGPATH_W]) 90613eed67faSmbalmer 90623eed67faSmbalmer# Define the identity of the package. 90633eed67faSmbalmerdnl Distinguish between old-style and new-style calls. 90643eed67faSmbalmerm4_ifval([$2], 90653eed67faSmbalmer[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 90663eed67faSmbalmer AC_SUBST([PACKAGE], [$1])dnl 90673eed67faSmbalmer AC_SUBST([VERSION], [$2])], 90683eed67faSmbalmer[_AM_SET_OPTIONS([$1])dnl 9069dc407927Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9070dc407927Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 9071dc407927Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 90723eed67faSmbalmer AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 90733eed67faSmbalmer AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 90743eed67faSmbalmer 90753eed67faSmbalmer_AM_IF_OPTION([no-define],, 90763eed67faSmbalmer[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 90773eed67faSmbalmer AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 90783eed67faSmbalmer 90793eed67faSmbalmer# Some tools Automake needs. 90803eed67faSmbalmerAC_REQUIRE([AM_SANITY_CHECK])dnl 90813eed67faSmbalmerAC_REQUIRE([AC_ARG_PROGRAM])dnl 90823eed67faSmbalmerAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 90833eed67faSmbalmerAM_MISSING_PROG(AUTOCONF, autoconf) 90843eed67faSmbalmerAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 90853eed67faSmbalmerAM_MISSING_PROG(AUTOHEADER, autoheader) 90863eed67faSmbalmerAM_MISSING_PROG(MAKEINFO, makeinfo) 9087dc407927SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9088dc407927SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 90893eed67faSmbalmerAC_REQUIRE([AM_PROG_MKDIR_P])dnl 90903eed67faSmbalmer# We need awk for the "check" target. The system "awk" is bad on 90913eed67faSmbalmer# some platforms. 90923eed67faSmbalmerAC_REQUIRE([AC_PROG_AWK])dnl 90933eed67faSmbalmerAC_REQUIRE([AC_PROG_MAKE_SET])dnl 90943eed67faSmbalmerAC_REQUIRE([AM_SET_LEADING_DOT])dnl 90953eed67faSmbalmer_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9096dc407927Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9097dc407927Smrg [_AM_PROG_TAR([v7])])]) 90983eed67faSmbalmer_AM_IF_OPTION([no-dependencies],, 90993eed67faSmbalmer[AC_PROVIDE_IFELSE([AC_PROG_CC], 9100dc407927Smrg [_AM_DEPENDENCIES(CC)], 9101dc407927Smrg [define([AC_PROG_CC], 9102dc407927Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 91033eed67faSmbalmerAC_PROVIDE_IFELSE([AC_PROG_CXX], 9104dc407927Smrg [_AM_DEPENDENCIES(CXX)], 9105dc407927Smrg [define([AC_PROG_CXX], 9106dc407927Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 9107dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9108dc407927Smrg [_AM_DEPENDENCIES(OBJC)], 9109dc407927Smrg [define([AC_PROG_OBJC], 9110dc407927Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 91113eed67faSmbalmer]) 9112dc407927Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 9113dc407927Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 9114dc407927Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 9115dc407927Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 9116dc407927SmrgAC_CONFIG_COMMANDS_PRE(dnl 9117dc407927Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 9118dc407927Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 91193eed67faSmbalmer]) 91203eed67faSmbalmer 9121dc407927Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9122dc407927Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9123dc407927Smrgdnl mangled by Autoconf and run in a shell conditional statement. 9124dc407927Smrgm4_define([_AC_COMPILER_EXEEXT], 9125dc407927Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9126dc407927Smrg 91273eed67faSmbalmer 91283eed67faSmbalmer# When config.status generates a header, we must update the stamp-h file. 91293eed67faSmbalmer# This file resides in the same directory as the config header 91303eed67faSmbalmer# that is generated. The stamp files are numbered to have different names. 91313eed67faSmbalmer 91323eed67faSmbalmer# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 91333eed67faSmbalmer# loop where config.status creates the headers, so we can generate 91343eed67faSmbalmer# our stamp files there. 91353eed67faSmbalmerAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 91363eed67faSmbalmer[# Compute $1's index in $config_headers. 9137dc407927Smrg_am_arg=$1 91383eed67faSmbalmer_am_stamp_count=1 91393eed67faSmbalmerfor _am_header in $config_headers :; do 91403eed67faSmbalmer case $_am_header in 9141dc407927Smrg $_am_arg | $_am_arg:* ) 91423eed67faSmbalmer break ;; 91433eed67faSmbalmer * ) 91443eed67faSmbalmer _am_stamp_count=`expr $_am_stamp_count + 1` ;; 91453eed67faSmbalmer esac 91463eed67faSmbalmerdone 9147dc407927Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 91483eed67faSmbalmer 9149dc407927Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 91503eed67faSmbalmer# 91513eed67faSmbalmer# This file is free software; the Free Software Foundation 91523eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 91533eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 91543eed67faSmbalmer 91553eed67faSmbalmer# AM_PROG_INSTALL_SH 91563eed67faSmbalmer# ------------------ 91573eed67faSmbalmer# Define $install_sh. 91583eed67faSmbalmerAC_DEFUN([AM_PROG_INSTALL_SH], 91593eed67faSmbalmer[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9160dc407927Smrgif test x"${install_sh}" != xset; then 9161dc407927Smrg case $am_aux_dir in 9162dc407927Smrg *\ * | *\ *) 9163dc407927Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9164dc407927Smrg *) 9165dc407927Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 9166dc407927Smrg esac 9167dc407927Smrgfi 91683eed67faSmbalmerAC_SUBST(install_sh)]) 91693eed67faSmbalmer 91703eed67faSmbalmer# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 91713eed67faSmbalmer# 91723eed67faSmbalmer# This file is free software; the Free Software Foundation 91733eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 91743eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 91753eed67faSmbalmer 91763eed67faSmbalmer# serial 2 91773eed67faSmbalmer 91783eed67faSmbalmer# Check whether the underlying file-system supports filenames 91793eed67faSmbalmer# with a leading dot. For instance MS-DOS doesn't. 91803eed67faSmbalmerAC_DEFUN([AM_SET_LEADING_DOT], 91813eed67faSmbalmer[rm -rf .tst 2>/dev/null 91823eed67faSmbalmermkdir .tst 2>/dev/null 91833eed67faSmbalmerif test -d .tst; then 91843eed67faSmbalmer am__leading_dot=. 91853eed67faSmbalmerelse 91863eed67faSmbalmer am__leading_dot=_ 91873eed67faSmbalmerfi 91883eed67faSmbalmerrmdir .tst 2>/dev/null 91893eed67faSmbalmerAC_SUBST([am__leading_dot])]) 91903eed67faSmbalmer 91913eed67faSmbalmer# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 91923eed67faSmbalmer# From Jim Meyering 91933eed67faSmbalmer 9194dc407927Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 91953eed67faSmbalmer# Free Software Foundation, Inc. 91963eed67faSmbalmer# 91973eed67faSmbalmer# This file is free software; the Free Software Foundation 91983eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 91993eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 92003eed67faSmbalmer 9201dc407927Smrg# serial 5 92023eed67faSmbalmer 9203dc407927Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 9204dc407927Smrg# ---------------------------------- 9205dc407927Smrg# Control maintainer-specific portions of Makefiles. 9206dc407927Smrg# Default is to disable them, unless `enable' is passed literally. 9207dc407927Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 9208dc407927Smrg# can override the default with the --enable/--disable switch. 92093eed67faSmbalmerAC_DEFUN([AM_MAINTAINER_MODE], 9210dc407927Smrg[m4_case(m4_default([$1], [disable]), 9211dc407927Smrg [enable], [m4_define([am_maintainer_other], [disable])], 9212dc407927Smrg [disable], [m4_define([am_maintainer_other], [enable])], 9213dc407927Smrg [m4_define([am_maintainer_other], [enable]) 9214dc407927Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 9215dc407927SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 9216dc407927Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 9217dc407927Smrg AC_ARG_ENABLE([maintainer-mode], 9218dc407927Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 92193eed67faSmbalmer (and sometimes confusing) to the casual installer], 9220dc407927Smrg [USE_MAINTAINER_MODE=$enableval], 9221dc407927Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 92223eed67faSmbalmer AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9223dc407927Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 92243eed67faSmbalmer MAINT=$MAINTAINER_MODE_TRUE 9225dc407927Smrg AC_SUBST([MAINT])dnl 92263eed67faSmbalmer] 92273eed67faSmbalmer) 92283eed67faSmbalmer 92293eed67faSmbalmerAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 92303eed67faSmbalmer 92313eed67faSmbalmer# Check to see how 'make' treats includes. -*- Autoconf -*- 92323eed67faSmbalmer 9233dc407927Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 92343eed67faSmbalmer# 92353eed67faSmbalmer# This file is free software; the Free Software Foundation 92363eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 92373eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 92383eed67faSmbalmer 9239dc407927Smrg# serial 4 92403eed67faSmbalmer 92413eed67faSmbalmer# AM_MAKE_INCLUDE() 92423eed67faSmbalmer# ----------------- 92433eed67faSmbalmer# Check to see how make treats includes. 92443eed67faSmbalmerAC_DEFUN([AM_MAKE_INCLUDE], 92453eed67faSmbalmer[am_make=${MAKE-make} 92463eed67faSmbalmercat > confinc << 'END' 92473eed67faSmbalmeram__doit: 9248dc407927Smrg @echo this is the am__doit target 92493eed67faSmbalmer.PHONY: am__doit 92503eed67faSmbalmerEND 92513eed67faSmbalmer# If we don't find an include directive, just comment out the code. 92523eed67faSmbalmerAC_MSG_CHECKING([for style of include used by $am_make]) 92533eed67faSmbalmeram__include="#" 92543eed67faSmbalmeram__quote= 92553eed67faSmbalmer_am_result=none 92563eed67faSmbalmer# First try GNU make style include. 92573eed67faSmbalmerecho "include confinc" > confmf 9258dc407927Smrg# Ignore all kinds of additional output from `make'. 9259dc407927Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 9260dc407927Smrg*the\ am__doit\ target*) 9261dc407927Smrg am__include=include 9262dc407927Smrg am__quote= 9263dc407927Smrg _am_result=GNU 9264dc407927Smrg ;; 9265dc407927Smrgesac 92663eed67faSmbalmer# Now try BSD make style include. 92673eed67faSmbalmerif test "$am__include" = "#"; then 92683eed67faSmbalmer echo '.include "confinc"' > confmf 9269dc407927Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 9270dc407927Smrg *the\ am__doit\ target*) 9271dc407927Smrg am__include=.include 9272dc407927Smrg am__quote="\"" 9273dc407927Smrg _am_result=BSD 9274dc407927Smrg ;; 9275dc407927Smrg esac 92763eed67faSmbalmerfi 92773eed67faSmbalmerAC_SUBST([am__include]) 92783eed67faSmbalmerAC_SUBST([am__quote]) 92793eed67faSmbalmerAC_MSG_RESULT([$_am_result]) 92803eed67faSmbalmerrm -f confinc confmf 92813eed67faSmbalmer]) 92823eed67faSmbalmer 92833eed67faSmbalmer# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 92843eed67faSmbalmer 9285dc407927Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 92863eed67faSmbalmer# Free Software Foundation, Inc. 92873eed67faSmbalmer# 92883eed67faSmbalmer# This file is free software; the Free Software Foundation 92893eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 92903eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 92913eed67faSmbalmer 9292dc407927Smrg# serial 6 92933eed67faSmbalmer 92943eed67faSmbalmer# AM_MISSING_PROG(NAME, PROGRAM) 92953eed67faSmbalmer# ------------------------------ 92963eed67faSmbalmerAC_DEFUN([AM_MISSING_PROG], 92973eed67faSmbalmer[AC_REQUIRE([AM_MISSING_HAS_RUN]) 92983eed67faSmbalmer$1=${$1-"${am_missing_run}$2"} 92993eed67faSmbalmerAC_SUBST($1)]) 93003eed67faSmbalmer 93013eed67faSmbalmer 93023eed67faSmbalmer# AM_MISSING_HAS_RUN 93033eed67faSmbalmer# ------------------ 93043eed67faSmbalmer# Define MISSING if not defined so far and test if it supports --run. 93053eed67faSmbalmer# If it does, set am_missing_run to use it, otherwise, to nothing. 93063eed67faSmbalmerAC_DEFUN([AM_MISSING_HAS_RUN], 93073eed67faSmbalmer[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9308dc407927SmrgAC_REQUIRE_AUX_FILE([missing])dnl 9309dc407927Smrgif test x"${MISSING+set}" != xset; then 9310dc407927Smrg case $am_aux_dir in 9311dc407927Smrg *\ * | *\ *) 9312dc407927Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 9313dc407927Smrg *) 9314dc407927Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 9315dc407927Smrg esac 9316dc407927Smrgfi 93173eed67faSmbalmer# Use eval to expand $SHELL 93183eed67faSmbalmerif eval "$MISSING --run true"; then 93193eed67faSmbalmer am_missing_run="$MISSING --run " 93203eed67faSmbalmerelse 93213eed67faSmbalmer am_missing_run= 93223eed67faSmbalmer AC_MSG_WARN([`missing' script is too old or missing]) 93233eed67faSmbalmerfi 93243eed67faSmbalmer]) 93253eed67faSmbalmer 9326dc407927Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 93273eed67faSmbalmer# 93283eed67faSmbalmer# This file is free software; the Free Software Foundation 93293eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 93303eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 93313eed67faSmbalmer 93323eed67faSmbalmer# AM_PROG_MKDIR_P 93333eed67faSmbalmer# --------------- 9334dc407927Smrg# Check for `mkdir -p'. 93353eed67faSmbalmerAC_DEFUN([AM_PROG_MKDIR_P], 9336dc407927Smrg[AC_PREREQ([2.60])dnl 9337dc407927SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9338dc407927Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 9339dc407927Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 9340dc407927Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 9341dc407927Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 9342dc407927Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 9343dc407927Smrgdnl adjustment using top_builddir (which is defined more often than 9344dc407927Smrgdnl MKDIR_P). 9345dc407927SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 9346dc407927Smrgcase $mkdir_p in 9347dc407927Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 9348dc407927Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 9349dc407927Smrgesac 9350dc407927Smrg]) 93513eed67faSmbalmer 93523eed67faSmbalmer# Helper functions for option handling. -*- Autoconf -*- 93533eed67faSmbalmer 9354dc407927Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 93553eed67faSmbalmer# 93563eed67faSmbalmer# This file is free software; the Free Software Foundation 93573eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 93583eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 93593eed67faSmbalmer 9360dc407927Smrg# serial 4 93613eed67faSmbalmer 93623eed67faSmbalmer# _AM_MANGLE_OPTION(NAME) 93633eed67faSmbalmer# ----------------------- 93643eed67faSmbalmerAC_DEFUN([_AM_MANGLE_OPTION], 93653eed67faSmbalmer[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 93663eed67faSmbalmer 93673eed67faSmbalmer# _AM_SET_OPTION(NAME) 93683eed67faSmbalmer# ------------------------------ 93693eed67faSmbalmer# Set option NAME. Presently that only means defining a flag for this option. 93703eed67faSmbalmerAC_DEFUN([_AM_SET_OPTION], 93713eed67faSmbalmer[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 93723eed67faSmbalmer 93733eed67faSmbalmer# _AM_SET_OPTIONS(OPTIONS) 93743eed67faSmbalmer# ---------------------------------- 93753eed67faSmbalmer# OPTIONS is a space-separated list of Automake options. 93763eed67faSmbalmerAC_DEFUN([_AM_SET_OPTIONS], 9377dc407927Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 93783eed67faSmbalmer 93793eed67faSmbalmer# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 93803eed67faSmbalmer# ------------------------------------------- 93813eed67faSmbalmer# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 93823eed67faSmbalmerAC_DEFUN([_AM_IF_OPTION], 93833eed67faSmbalmer[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 93843eed67faSmbalmer 9385dc407927Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9386dc407927Smrg 9387dc407927Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 9388dc407927Smrg# Free Software Foundation, Inc. 9389dc407927Smrg# 9390dc407927Smrg# This file is free software; the Free Software Foundation 9391dc407927Smrg# gives unlimited permission to copy and/or distribute it, 9392dc407927Smrg# with or without modifications, as long as this notice is preserved. 9393dc407927Smrg 9394dc407927Smrg# serial 5 9395dc407927Smrg 9396dc407927Smrg# AM_SANITY_CHECK 9397dc407927Smrg# --------------- 9398dc407927SmrgAC_DEFUN([AM_SANITY_CHECK], 9399dc407927Smrg[AC_MSG_CHECKING([whether build environment is sane]) 9400dc407927Smrg# Just in case 9401dc407927Smrgsleep 1 9402dc407927Smrgecho timestamp > conftest.file 9403dc407927Smrg# Reject unsafe characters in $srcdir or the absolute working directory 9404dc407927Smrg# name. Accept space and tab only in the latter. 9405dc407927Smrgam_lf=' 9406dc407927Smrg' 9407dc407927Smrgcase `pwd` in 9408dc407927Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 9409dc407927Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 9410dc407927Smrgesac 9411dc407927Smrgcase $srcdir in 9412dc407927Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9413dc407927Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 9414dc407927Smrgesac 9415dc407927Smrg 9416dc407927Smrg# Do `set' in a subshell so we don't clobber the current shell's 9417dc407927Smrg# arguments. Must try -L first in case configure is actually a 9418dc407927Smrg# symlink; some systems play weird games with the mod time of symlinks 9419dc407927Smrg# (eg FreeBSD returns the mod time of the symlink's containing 9420dc407927Smrg# directory). 9421dc407927Smrgif ( 9422dc407927Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9423dc407927Smrg if test "$[*]" = "X"; then 9424dc407927Smrg # -L didn't work. 9425dc407927Smrg set X `ls -t "$srcdir/configure" conftest.file` 9426dc407927Smrg fi 9427dc407927Smrg rm -f conftest.file 9428dc407927Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9429dc407927Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9430dc407927Smrg 9431dc407927Smrg # If neither matched, then we have a broken ls. This can happen 9432dc407927Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9433dc407927Smrg # broken ls alias from the environment. This has actually 9434dc407927Smrg # happened. Such a system could not be considered "sane". 9435dc407927Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9436dc407927Smrgalias in your environment]) 9437dc407927Smrg fi 9438dc407927Smrg 9439dc407927Smrg test "$[2]" = conftest.file 9440dc407927Smrg ) 9441dc407927Smrgthen 9442dc407927Smrg # Ok. 9443dc407927Smrg : 9444dc407927Smrgelse 9445dc407927Smrg AC_MSG_ERROR([newly created file is older than distributed files! 9446dc407927SmrgCheck your system clock]) 9447dc407927Smrgfi 9448dc407927SmrgAC_MSG_RESULT(yes)]) 9449dc407927Smrg 94503eed67faSmbalmer# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 94513eed67faSmbalmer# 94523eed67faSmbalmer# This file is free software; the Free Software Foundation 94533eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 94543eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 94553eed67faSmbalmer 94563eed67faSmbalmer# AM_PROG_INSTALL_STRIP 94573eed67faSmbalmer# --------------------- 94583eed67faSmbalmer# One issue with vendor `install' (even GNU) is that you can't 94593eed67faSmbalmer# specify the program used to strip binaries. This is especially 94603eed67faSmbalmer# annoying in cross-compiling environments, where the build's strip 94613eed67faSmbalmer# is unlikely to handle the host's binaries. 94623eed67faSmbalmer# Fortunately install-sh will honor a STRIPPROG variable, so we 94633eed67faSmbalmer# always use install-sh in `make install-strip', and initialize 94643eed67faSmbalmer# STRIPPROG with the value of the STRIP variable (set by the user). 94653eed67faSmbalmerAC_DEFUN([AM_PROG_INSTALL_STRIP], 94663eed67faSmbalmer[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 94673eed67faSmbalmer# Installed binaries are usually stripped using `strip' when the user 94683eed67faSmbalmer# run `make install-strip'. However `strip' might not be the right 94693eed67faSmbalmer# tool to use in cross-compilation environments, therefore Automake 94703eed67faSmbalmer# will honor the `STRIP' environment variable to overrule this program. 94713eed67faSmbalmerdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 94723eed67faSmbalmerif test "$cross_compiling" != no; then 94733eed67faSmbalmer AC_CHECK_TOOL([STRIP], [strip], :) 94743eed67faSmbalmerfi 9475dc407927SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 94763eed67faSmbalmerAC_SUBST([INSTALL_STRIP_PROGRAM])]) 94773eed67faSmbalmer 9478dc407927Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9479dc407927Smrg# 9480dc407927Smrg# This file is free software; the Free Software Foundation 9481dc407927Smrg# gives unlimited permission to copy and/or distribute it, 9482dc407927Smrg# with or without modifications, as long as this notice is preserved. 9483dc407927Smrg 9484dc407927Smrg# serial 2 9485dc407927Smrg 9486dc407927Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9487dc407927Smrg# --------------------------- 9488dc407927Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9489dc407927Smrg# This macro is traced by Automake. 9490dc407927SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9491dc407927Smrg 9492dc407927Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9493dc407927Smrg# --------------------------- 9494dc407927Smrg# Public sister of _AM_SUBST_NOTMAKE. 9495dc407927SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9496dc407927Smrg 94973eed67faSmbalmer# Check how to create a tarball. -*- Autoconf -*- 94983eed67faSmbalmer 94993eed67faSmbalmer# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 95003eed67faSmbalmer# 95013eed67faSmbalmer# This file is free software; the Free Software Foundation 95023eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 95033eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 95043eed67faSmbalmer 95053eed67faSmbalmer# serial 2 95063eed67faSmbalmer 95073eed67faSmbalmer# _AM_PROG_TAR(FORMAT) 95083eed67faSmbalmer# -------------------- 95093eed67faSmbalmer# Check how to create a tarball in format FORMAT. 95103eed67faSmbalmer# FORMAT should be one of `v7', `ustar', or `pax'. 95113eed67faSmbalmer# 95123eed67faSmbalmer# Substitute a variable $(am__tar) that is a command 95133eed67faSmbalmer# writing to stdout a FORMAT-tarball containing the directory 95143eed67faSmbalmer# $tardir. 95153eed67faSmbalmer# tardir=directory && $(am__tar) > result.tar 95163eed67faSmbalmer# 95173eed67faSmbalmer# Substitute a variable $(am__untar) that extract such 95183eed67faSmbalmer# a tarball read from stdin. 95193eed67faSmbalmer# $(am__untar) < result.tar 95203eed67faSmbalmerAC_DEFUN([_AM_PROG_TAR], 95213eed67faSmbalmer[# Always define AMTAR for backward compatibility. 95223eed67faSmbalmerAM_MISSING_PROG([AMTAR], [tar]) 95233eed67faSmbalmerm4_if([$1], [v7], 95243eed67faSmbalmer [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 95253eed67faSmbalmer [m4_case([$1], [ustar],, [pax],, 95263eed67faSmbalmer [m4_fatal([Unknown tar format])]) 95273eed67faSmbalmerAC_MSG_CHECKING([how to create a $1 tar archive]) 95283eed67faSmbalmer# Loop over all known methods to create a tar archive until one works. 95293eed67faSmbalmer_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 95303eed67faSmbalmer_am_tools=${am_cv_prog_tar_$1-$_am_tools} 95313eed67faSmbalmer# Do not fold the above two line into one, because Tru64 sh and 95323eed67faSmbalmer# Solaris sh will not grok spaces in the rhs of `-'. 95333eed67faSmbalmerfor _am_tool in $_am_tools 95343eed67faSmbalmerdo 95353eed67faSmbalmer case $_am_tool in 95363eed67faSmbalmer gnutar) 95373eed67faSmbalmer for _am_tar in tar gnutar gtar; 95383eed67faSmbalmer do 95393eed67faSmbalmer AM_RUN_LOG([$_am_tar --version]) && break 95403eed67faSmbalmer done 95413eed67faSmbalmer am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 95423eed67faSmbalmer am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 95433eed67faSmbalmer am__untar="$_am_tar -xf -" 95443eed67faSmbalmer ;; 95453eed67faSmbalmer plaintar) 95463eed67faSmbalmer # Must skip GNU tar: if it does not support --format= it doesn't create 95473eed67faSmbalmer # ustar tarball either. 95483eed67faSmbalmer (tar --version) >/dev/null 2>&1 && continue 95493eed67faSmbalmer am__tar='tar chf - "$$tardir"' 95503eed67faSmbalmer am__tar_='tar chf - "$tardir"' 95513eed67faSmbalmer am__untar='tar xf -' 95523eed67faSmbalmer ;; 95533eed67faSmbalmer pax) 95543eed67faSmbalmer am__tar='pax -L -x $1 -w "$$tardir"' 95553eed67faSmbalmer am__tar_='pax -L -x $1 -w "$tardir"' 95563eed67faSmbalmer am__untar='pax -r' 95573eed67faSmbalmer ;; 95583eed67faSmbalmer cpio) 95593eed67faSmbalmer am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 95603eed67faSmbalmer am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 95613eed67faSmbalmer am__untar='cpio -i -H $1 -d' 95623eed67faSmbalmer ;; 95633eed67faSmbalmer none) 95643eed67faSmbalmer am__tar=false 95653eed67faSmbalmer am__tar_=false 95663eed67faSmbalmer am__untar=false 95673eed67faSmbalmer ;; 95683eed67faSmbalmer esac 95693eed67faSmbalmer 95703eed67faSmbalmer # If the value was cached, stop now. We just wanted to have am__tar 95713eed67faSmbalmer # and am__untar set. 95723eed67faSmbalmer test -n "${am_cv_prog_tar_$1}" && break 95733eed67faSmbalmer 95743eed67faSmbalmer # tar/untar a dummy directory, and stop if the command works 95753eed67faSmbalmer rm -rf conftest.dir 95763eed67faSmbalmer mkdir conftest.dir 95773eed67faSmbalmer echo GrepMe > conftest.dir/file 95783eed67faSmbalmer AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 95793eed67faSmbalmer rm -rf conftest.dir 95803eed67faSmbalmer if test -s conftest.tar; then 95813eed67faSmbalmer AM_RUN_LOG([$am__untar <conftest.tar]) 95823eed67faSmbalmer grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 95833eed67faSmbalmer fi 95843eed67faSmbalmerdone 95853eed67faSmbalmerrm -rf conftest.dir 95863eed67faSmbalmer 95873eed67faSmbalmerAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 95883eed67faSmbalmerAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 95893eed67faSmbalmerAC_SUBST([am__tar]) 95903eed67faSmbalmerAC_SUBST([am__untar]) 95913eed67faSmbalmer]) # _AM_PROG_TAR 95923eed67faSmbalmer 9593dc407927Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 95943eed67faSmbalmerdnl 9595dd0822caSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 95963eed67faSmbalmerdnl 95973eed67faSmbalmerdnl Permission is hereby granted, free of charge, to any person obtaining a 9598dc407927Smrgdnl copy of this software and associated documentation files (the "Software"), 9599dc407927Smrgdnl to deal in the Software without restriction, including without limitation 9600dc407927Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9601dc407927Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9602dc407927Smrgdnl Software is furnished to do so, subject to the following conditions: 96033eed67faSmbalmerdnl 9604dc407927Smrgdnl The above copyright notice and this permission notice (including the next 9605dc407927Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9606dc407927Smrgdnl Software. 96073eed67faSmbalmerdnl 9608dc407927Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9609dc407927Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9610dc407927Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9611dc407927Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9612dc407927Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9613dc407927Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9614dc407927Smrgdnl DEALINGS IN THE SOFTWARE. 96153eed67faSmbalmer 96163eed67faSmbalmer# XORG_MACROS_VERSION(required-version) 96173eed67faSmbalmer# ------------------------------------- 96183eed67faSmbalmer# Minimum version: 1.1.0 96193eed67faSmbalmer# 96203eed67faSmbalmer# If you're using a macro added in Version 1.1 or newer, include this in 96213eed67faSmbalmer# your configure.ac with the minimum required version, such as: 96223eed67faSmbalmer# XORG_MACROS_VERSION(1.1) 96233eed67faSmbalmer# 9624dc407927Smrg# To ensure that this macro is defined, also add: 9625dc407927Smrg# m4_ifndef([XORG_MACROS_VERSION], 9626dc407927Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 96273eed67faSmbalmer# 96283eed67faSmbalmer# 96293eed67faSmbalmer# See the "minimum version" comment for each macro you use to see what 9630dc407927Smrg# version you require. 9631dc407927Smrgm4_defun([XORG_MACROS_VERSION],[ 9632dd0822caSmrgm4_define([vers_have], [1.14.0]) 9633dc407927Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9634dc407927Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9635dc407927Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9636dc407927Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9637dc407927Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9638dc407927Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9639dc407927Smrgm4_undefine([vers_have]) 9640dc407927Smrgm4_undefine([maj_have]) 9641dc407927Smrgm4_undefine([maj_needed]) 96423eed67faSmbalmer]) # XORG_MACROS_VERSION 96433eed67faSmbalmer 96443eed67faSmbalmer# XORG_PROG_RAWCPP() 96453eed67faSmbalmer# ------------------ 96463eed67faSmbalmer# Minimum version: 1.0.0 96473eed67faSmbalmer# 96483eed67faSmbalmer# Find cpp program and necessary flags for use in pre-processing text files 96493eed67faSmbalmer# such as man pages and config files 96503eed67faSmbalmerAC_DEFUN([XORG_PROG_RAWCPP],[ 96513eed67faSmbalmerAC_REQUIRE([AC_PROG_CPP]) 96523eed67faSmbalmerAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 96533eed67faSmbalmer [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 96543eed67faSmbalmer 96553eed67faSmbalmer# Check for flag to avoid builtin definitions - assumes unix is predefined, 96563eed67faSmbalmer# which is not the best choice for supporting other OS'es, but covers most 96573eed67faSmbalmer# of the ones we need for now. 96583eed67faSmbalmerAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9659dd0822caSmrgAC_LANG_CONFTEST([Does cpp redefine unix ? 9660dd0822caSmrg AC_LANG_DEFINES_PROVIDED]) 96613eed67faSmbalmerif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96623eed67faSmbalmer AC_MSG_RESULT([no]) 96633eed67faSmbalmerelse 96643eed67faSmbalmer if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96653eed67faSmbalmer RAWCPPFLAGS=-undef 96663eed67faSmbalmer AC_MSG_RESULT([yes]) 9667dc407927Smrg # under Cygwin unix is still defined even with -undef 9668dc407927Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9669dc407927Smrg RAWCPPFLAGS="-undef -ansi" 9670dc407927Smrg AC_MSG_RESULT([yes, with -ansi]) 96713eed67faSmbalmer else 96723eed67faSmbalmer AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 96733eed67faSmbalmer fi 96743eed67faSmbalmerfi 96753eed67faSmbalmerrm -f conftest.$ac_ext 96763eed67faSmbalmer 96773eed67faSmbalmerAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9678dd0822caSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"? 9679dd0822caSmrg AC_LANG_DEFINES_PROVIDED]) 96803eed67faSmbalmerif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 96813eed67faSmbalmer AC_MSG_RESULT([no]) 96823eed67faSmbalmerelse 96833eed67faSmbalmer if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 96843eed67faSmbalmer RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 96853eed67faSmbalmer AC_MSG_RESULT([yes]) 96863eed67faSmbalmer else 96873eed67faSmbalmer AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 96883eed67faSmbalmer fi 96893eed67faSmbalmerfi 96903eed67faSmbalmerrm -f conftest.$ac_ext 96913eed67faSmbalmerAC_SUBST(RAWCPPFLAGS) 96923eed67faSmbalmer]) # XORG_PROG_RAWCPP 96933eed67faSmbalmer 96943eed67faSmbalmer# XORG_MANPAGE_SECTIONS() 96953eed67faSmbalmer# ----------------------- 96963eed67faSmbalmer# Minimum version: 1.0.0 96973eed67faSmbalmer# 96983eed67faSmbalmer# Determine which sections man pages go in for the different man page types 96993eed67faSmbalmer# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 97003eed67faSmbalmer# Not sure if there's any better way than just hardcoding by OS name. 97013eed67faSmbalmer# Override default settings by setting environment variables 9702dc407927Smrg# Added MAN_SUBSTS in version 1.8 9703dc407927Smrg# Added AC_PROG_SED in version 1.8 97043eed67faSmbalmer 97053eed67faSmbalmerAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 97063eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_HOST]) 9707dc407927SmrgAC_REQUIRE([AC_PROG_SED]) 97083eed67faSmbalmer 97093eed67faSmbalmerif test x$APP_MAN_SUFFIX = x ; then 97103eed67faSmbalmer APP_MAN_SUFFIX=1 97113eed67faSmbalmerfi 97123eed67faSmbalmerif test x$APP_MAN_DIR = x ; then 97133eed67faSmbalmer APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 97143eed67faSmbalmerfi 97153eed67faSmbalmer 97163eed67faSmbalmerif test x$LIB_MAN_SUFFIX = x ; then 97173eed67faSmbalmer LIB_MAN_SUFFIX=3 97183eed67faSmbalmerfi 97193eed67faSmbalmerif test x$LIB_MAN_DIR = x ; then 97203eed67faSmbalmer LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 97213eed67faSmbalmerfi 97223eed67faSmbalmer 97233eed67faSmbalmerif test x$FILE_MAN_SUFFIX = x ; then 97243eed67faSmbalmer case $host_os in 97253eed67faSmbalmer solaris*) FILE_MAN_SUFFIX=4 ;; 97263eed67faSmbalmer *) FILE_MAN_SUFFIX=5 ;; 97273eed67faSmbalmer esac 97283eed67faSmbalmerfi 97293eed67faSmbalmerif test x$FILE_MAN_DIR = x ; then 97303eed67faSmbalmer FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 97313eed67faSmbalmerfi 97323eed67faSmbalmer 97333eed67faSmbalmerif test x$MISC_MAN_SUFFIX = x ; then 97343eed67faSmbalmer case $host_os in 97353eed67faSmbalmer solaris*) MISC_MAN_SUFFIX=5 ;; 97363eed67faSmbalmer *) MISC_MAN_SUFFIX=7 ;; 97373eed67faSmbalmer esac 97383eed67faSmbalmerfi 97393eed67faSmbalmerif test x$MISC_MAN_DIR = x ; then 97403eed67faSmbalmer MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 97413eed67faSmbalmerfi 97423eed67faSmbalmer 97433eed67faSmbalmerif test x$DRIVER_MAN_SUFFIX = x ; then 97443eed67faSmbalmer case $host_os in 97453eed67faSmbalmer solaris*) DRIVER_MAN_SUFFIX=7 ;; 97463eed67faSmbalmer *) DRIVER_MAN_SUFFIX=4 ;; 97473eed67faSmbalmer esac 97483eed67faSmbalmerfi 97493eed67faSmbalmerif test x$DRIVER_MAN_DIR = x ; then 97503eed67faSmbalmer DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 97513eed67faSmbalmerfi 97523eed67faSmbalmer 97533eed67faSmbalmerif test x$ADMIN_MAN_SUFFIX = x ; then 97543eed67faSmbalmer case $host_os in 97553eed67faSmbalmer solaris*) ADMIN_MAN_SUFFIX=1m ;; 97563eed67faSmbalmer *) ADMIN_MAN_SUFFIX=8 ;; 97573eed67faSmbalmer esac 97583eed67faSmbalmerfi 97593eed67faSmbalmerif test x$ADMIN_MAN_DIR = x ; then 97603eed67faSmbalmer ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 97613eed67faSmbalmerfi 97623eed67faSmbalmer 97633eed67faSmbalmer 97643eed67faSmbalmerAC_SUBST([APP_MAN_SUFFIX]) 97653eed67faSmbalmerAC_SUBST([LIB_MAN_SUFFIX]) 97663eed67faSmbalmerAC_SUBST([FILE_MAN_SUFFIX]) 97673eed67faSmbalmerAC_SUBST([MISC_MAN_SUFFIX]) 97683eed67faSmbalmerAC_SUBST([DRIVER_MAN_SUFFIX]) 97693eed67faSmbalmerAC_SUBST([ADMIN_MAN_SUFFIX]) 97703eed67faSmbalmerAC_SUBST([APP_MAN_DIR]) 97713eed67faSmbalmerAC_SUBST([LIB_MAN_DIR]) 97723eed67faSmbalmerAC_SUBST([FILE_MAN_DIR]) 97733eed67faSmbalmerAC_SUBST([MISC_MAN_DIR]) 97743eed67faSmbalmerAC_SUBST([DRIVER_MAN_DIR]) 97753eed67faSmbalmerAC_SUBST([ADMIN_MAN_DIR]) 9776dc407927Smrg 9777dc407927SmrgXORG_MAN_PAGE="X Version 11" 9778dc407927SmrgAC_SUBST([XORG_MAN_PAGE]) 9779dc407927SmrgMAN_SUBSTS="\ 9780dc407927Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9781dc407927Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9782dc407927Smrg -e 's|__xservername__|Xorg|g' \ 9783dc407927Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9784dd0822caSmrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 9785dc407927Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9786dd0822caSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9787dc407927Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9788dc407927Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9789dc407927Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9790dc407927Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9791dc407927Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9792dc407927Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9793dc407927SmrgAC_SUBST([MAN_SUBSTS]) 9794dc407927Smrg 97953eed67faSmbalmer]) # XORG_MANPAGE_SECTIONS 97963eed67faSmbalmer 9797dc407927Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9798dc407927Smrg# ------------------------ 9799dc407927Smrg# Minimum version: 1.7.0 9800dc407927Smrg# 9801dc407927Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9802dc407927Smrg# provided by xorg-sgml-doctools, if installed. 9803dc407927SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9804dc407927SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9805dc407927SmrgXORG_SGML_PATH= 9806dc407927SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9807dc407927Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9808dc407927Smrg [m4_ifval([$1],[:], 9809dc407927Smrg [if test x"$cross_compiling" != x"yes" ; then 9810dc407927Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9811dc407927Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9812dc407927Smrg fi]) 9813dc407927Smrg ]) 9814dc407927Smrg 9815dd0822caSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9816dd0822caSmrg# the path and the name of the doc stylesheet 9817dc407927Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9818dc407927Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9819dd0822caSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9820dd0822caSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9821dc407927Smrgelse 9822dc407927Smrg AC_MSG_RESULT([no]) 9823dc407927Smrgfi 9824dc407927Smrg 9825dc407927SmrgAC_SUBST(XORG_SGML_PATH) 9826dd0822caSmrgAC_SUBST(STYLESHEET_SRCDIR) 9827dd0822caSmrgAC_SUBST(XSL_STYLESHEET) 9828dd0822caSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9829dc407927Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9830dc407927Smrg 98313eed67faSmbalmer# XORG_CHECK_LINUXDOC 98323eed67faSmbalmer# ------------------- 98333eed67faSmbalmer# Minimum version: 1.0.0 98343eed67faSmbalmer# 98353eed67faSmbalmer# Defines the variable MAKE_TEXT if the necessary tools and 98363eed67faSmbalmer# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 98373eed67faSmbalmer# Whether or not the necessary tools and files are found can be checked 98383eed67faSmbalmer# with the AM_CONDITIONAL "BUILD_LINUXDOC" 98393eed67faSmbalmerAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9840dc407927SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9841dc407927SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 98423eed67faSmbalmer 98433eed67faSmbalmerAC_PATH_PROG(LINUXDOC, linuxdoc) 98443eed67faSmbalmer 9845dc407927SmrgAC_MSG_CHECKING([whether to build documentation]) 98463eed67faSmbalmer 9847dc407927Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 98483eed67faSmbalmer BUILDDOC=yes 98493eed67faSmbalmerelse 98503eed67faSmbalmer BUILDDOC=no 98513eed67faSmbalmerfi 98523eed67faSmbalmer 98533eed67faSmbalmerAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 98543eed67faSmbalmer 98553eed67faSmbalmerAC_MSG_RESULT([$BUILDDOC]) 98563eed67faSmbalmer 9857dc407927SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 98583eed67faSmbalmer 9859dc407927Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 98603eed67faSmbalmer BUILDPDFDOC=yes 98613eed67faSmbalmerelse 98623eed67faSmbalmer BUILDPDFDOC=no 98633eed67faSmbalmerfi 98643eed67faSmbalmer 98653eed67faSmbalmerAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 98663eed67faSmbalmer 98673eed67faSmbalmerAC_MSG_RESULT([$BUILDPDFDOC]) 98683eed67faSmbalmer 9869dc407927SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 98703eed67faSmbalmerMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 98713eed67faSmbalmerMAKE_PDF="$PS2PDF" 98723eed67faSmbalmerMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 98733eed67faSmbalmer 98743eed67faSmbalmerAC_SUBST(MAKE_TEXT) 98753eed67faSmbalmerAC_SUBST(MAKE_PS) 98763eed67faSmbalmerAC_SUBST(MAKE_PDF) 98773eed67faSmbalmerAC_SUBST(MAKE_HTML) 98783eed67faSmbalmer]) # XORG_CHECK_LINUXDOC 98793eed67faSmbalmer 98803eed67faSmbalmer# XORG_CHECK_DOCBOOK 98813eed67faSmbalmer# ------------------- 98823eed67faSmbalmer# Minimum version: 1.0.0 98833eed67faSmbalmer# 98843eed67faSmbalmer# Checks for the ability to build output formats from SGML DocBook source. 98853eed67faSmbalmer# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 98863eed67faSmbalmer# indicates whether the necessary tools and files are found and, if set, 98873eed67faSmbalmer# $(MAKE_XXX) blah.sgml will produce blah.xxx. 98883eed67faSmbalmerAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9889dc407927SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9890dc407927Smrg 98913eed67faSmbalmerBUILDTXTDOC=no 98923eed67faSmbalmerBUILDPDFDOC=no 98933eed67faSmbalmerBUILDPSDOC=no 98943eed67faSmbalmerBUILDHTMLDOC=no 98953eed67faSmbalmer 98963eed67faSmbalmerAC_PATH_PROG(DOCBOOKPS, docbook2ps) 98973eed67faSmbalmerAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 98983eed67faSmbalmerAC_PATH_PROG(DOCBOOKHTML, docbook2html) 98993eed67faSmbalmerAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 99003eed67faSmbalmer 9901dc407927SmrgAC_MSG_CHECKING([whether to build text documentation]) 9902dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 99033eed67faSmbalmer test x$BUILD_TXTDOC != xno; then 99043eed67faSmbalmer BUILDTXTDOC=yes 99053eed67faSmbalmerfi 99063eed67faSmbalmerAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 99073eed67faSmbalmerAC_MSG_RESULT([$BUILDTXTDOC]) 99083eed67faSmbalmer 9909dc407927SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9910dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 99113eed67faSmbalmer test x$BUILD_PDFDOC != xno; then 99123eed67faSmbalmer BUILDPDFDOC=yes 99133eed67faSmbalmerfi 99143eed67faSmbalmerAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 99153eed67faSmbalmerAC_MSG_RESULT([$BUILDPDFDOC]) 99163eed67faSmbalmer 9917dc407927SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9918dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 99193eed67faSmbalmer test x$BUILD_PSDOC != xno; then 99203eed67faSmbalmer BUILDPSDOC=yes 99213eed67faSmbalmerfi 99223eed67faSmbalmerAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 99233eed67faSmbalmerAC_MSG_RESULT([$BUILDPSDOC]) 99243eed67faSmbalmer 9925dc407927SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9926dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 99273eed67faSmbalmer test x$BUILD_HTMLDOC != xno; then 99283eed67faSmbalmer BUILDHTMLDOC=yes 99293eed67faSmbalmerfi 99303eed67faSmbalmerAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 99313eed67faSmbalmerAC_MSG_RESULT([$BUILDHTMLDOC]) 99323eed67faSmbalmer 99333eed67faSmbalmerMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 99343eed67faSmbalmerMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 99353eed67faSmbalmerMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 99363eed67faSmbalmerMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 99373eed67faSmbalmer 99383eed67faSmbalmerAC_SUBST(MAKE_TEXT) 99393eed67faSmbalmerAC_SUBST(MAKE_PS) 99403eed67faSmbalmerAC_SUBST(MAKE_PDF) 99413eed67faSmbalmerAC_SUBST(MAKE_HTML) 99423eed67faSmbalmer]) # XORG_CHECK_DOCBOOK 99433eed67faSmbalmer 9944dd0822caSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9945dc407927Smrg# ---------------- 9946dc407927Smrg# Minimum version: 1.5.0 9947dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9948dc407927Smrg# 9949dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 9950dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 9951dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9952dc407927Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9953dd0822caSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9954dd0822caSmrg# --with-xmlto assumes 'auto'. 9955dc407927Smrg# 9956dc407927Smrg# Interface to module: 9957dc407927Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9958dc407927Smrg# XMLTO: returns the path of the xmlto program found 9959dc407927Smrg# returns the path set by the user in the environment 9960dc407927Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9961dc407927Smrg# 'no' user instructs the module not to use xmlto 9962dc407927Smrg# 9963dd0822caSmrg# Added in version 1.10.0 9964dd0822caSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9965dd0822caSmrg# xmlto for text output requires either lynx, links, or w3m browsers 9966dd0822caSmrg# 9967dc407927Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9968dc407927Smrg# 9969dc407927SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9970dc407927SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9971dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 9972dc407927SmrgAC_ARG_WITH(xmlto, 9973dc407927Smrg AS_HELP_STRING([--with-xmlto], 9974dd0822caSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9975dd0822caSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9976dd0822caSmrgm4_undefine([_defopt]) 9977dc407927Smrg 9978dc407927Smrgif test "x$use_xmlto" = x"auto"; then 9979dc407927Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9980dc407927Smrg if test "x$XMLTO" = "x"; then 9981dc407927Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9982dc407927Smrg have_xmlto=no 9983dc407927Smrg else 9984dc407927Smrg have_xmlto=yes 9985dc407927Smrg fi 9986dc407927Smrgelif test "x$use_xmlto" = x"yes" ; then 9987dc407927Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9988dc407927Smrg if test "x$XMLTO" = "x"; then 9989dc407927Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9990dc407927Smrg fi 9991dc407927Smrg have_xmlto=yes 9992dc407927Smrgelif test "x$use_xmlto" = x"no" ; then 9993dc407927Smrg if test "x$XMLTO" != "x"; then 9994dc407927Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9995dc407927Smrg fi 9996dc407927Smrg have_xmlto=no 9997dc407927Smrgelse 9998dc407927Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9999dc407927Smrgfi 10000dd0822caSmrg 10001dd0822caSmrg# Test for a minimum version of xmlto, if provided. 10002dc407927Smrgm4_ifval([$1], 10003dc407927Smrg[if test "$have_xmlto" = yes; then 10004dc407927Smrg # scrape the xmlto version 10005dc407927Smrg AC_MSG_CHECKING([the xmlto version]) 10006dc407927Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10007dc407927Smrg AC_MSG_RESULT([$xmlto_version]) 10008dc407927Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10009dc407927Smrg [if test "x$use_xmlto" = xauto; then 10010dc407927Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10011dc407927Smrg have_xmlto=no 10012dc407927Smrg else 10013dc407927Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10014dc407927Smrg fi]) 10015dc407927Smrgfi]) 10016dd0822caSmrg 10017dd0822caSmrg# Test for the ability of xmlto to generate a text target 10018dd0822caSmrghave_xmlto_text=no 10019dd0822caSmrgcat > conftest.xml << "EOF" 10020dd0822caSmrgEOF 10021dd0822caSmrgAS_IF([test "$have_xmlto" = yes], 10022dd0822caSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10023dd0822caSmrg [have_xmlto_text=yes], 10024dd0822caSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10025dd0822caSmrgrm -f conftest.xml 10026dd0822caSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10027dc407927SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10028dc407927Smrg]) # XORG_WITH_XMLTO 10029dc407927Smrg 10030dd0822caSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10031dd0822caSmrg# -------------------------------------------- 10032dd0822caSmrg# Minimum version: 1.12.0 10033dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.12.0 10034dd0822caSmrg# 10035dd0822caSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10036dd0822caSmrg# XML-based language used for the transformation of XML documents. 10037dd0822caSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10038dd0822caSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10039dd0822caSmrg# The XSLT processor is often used as a standalone tool for transformations. 10040dd0822caSmrg# It should not be assumed that this tool is used only to work with documnetation. 10041dd0822caSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10042dd0822caSmrg# 10043dd0822caSmrg# Interface to module: 10044dd0822caSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10045dd0822caSmrg# XSLTPROC: returns the path of the xsltproc program found 10046dd0822caSmrg# returns the path set by the user in the environment 10047dd0822caSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10048dd0822caSmrg# 'no' user instructs the module not to use xsltproc 10049dd0822caSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10050dd0822caSmrg# 10051dd0822caSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10052dd0822caSmrg# 10053dd0822caSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10054dd0822caSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10055dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10056dd0822caSmrgAC_ARG_WITH(xsltproc, 10057dd0822caSmrg AS_HELP_STRING([--with-xsltproc], 10058dd0822caSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10059dd0822caSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10060dd0822caSmrgm4_undefine([_defopt]) 10061dd0822caSmrg 10062dd0822caSmrgif test "x$use_xsltproc" = x"auto"; then 10063dd0822caSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10064dd0822caSmrg if test "x$XSLTPROC" = "x"; then 10065dd0822caSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10066dd0822caSmrg have_xsltproc=no 10067dd0822caSmrg else 10068dd0822caSmrg have_xsltproc=yes 10069dd0822caSmrg fi 10070dd0822caSmrgelif test "x$use_xsltproc" = x"yes" ; then 10071dd0822caSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10072dd0822caSmrg if test "x$XSLTPROC" = "x"; then 10073dd0822caSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10074dd0822caSmrg fi 10075dd0822caSmrg have_xsltproc=yes 10076dd0822caSmrgelif test "x$use_xsltproc" = x"no" ; then 10077dd0822caSmrg if test "x$XSLTPROC" != "x"; then 10078dd0822caSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10079dd0822caSmrg fi 10080dd0822caSmrg have_xsltproc=no 10081dd0822caSmrgelse 10082dd0822caSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10083dd0822caSmrgfi 10084dd0822caSmrg 10085dd0822caSmrg# Checking for minimum version is not implemented 10086dd0822caSmrg# but we want to keep the interface consistent with other commands 10087dd0822caSmrgm4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)]) 10088dd0822caSmrg 10089dd0822caSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10090dd0822caSmrg]) # XORG_WITH_XSLTPROC 10091dd0822caSmrg 10092dd0822caSmrg 10093dd0822caSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10094dc407927Smrg# ---------------- 10095dc407927Smrg# Minimum version: 1.5.0 10096dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10097dc407927Smrg# 10098dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10099dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10100dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10101dc407927Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10102dd0822caSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10103dd0822caSmrg# --with-asciidoc assumes 'auto'. 10104dc407927Smrg# 10105dc407927Smrg# Interface to module: 10106dc407927Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10107dc407927Smrg# ASCIIDOC: returns the path of the asciidoc program found 10108dc407927Smrg# returns the path set by the user in the environment 10109dc407927Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10110dc407927Smrg# 'no' user instructs the module not to use asciidoc 10111dc407927Smrg# 10112dc407927Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10113dc407927Smrg# 10114dc407927SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10115dc407927SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10116dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10117dc407927SmrgAC_ARG_WITH(asciidoc, 10118dc407927Smrg AS_HELP_STRING([--with-asciidoc], 10119dd0822caSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10120dd0822caSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10121dd0822caSmrgm4_undefine([_defopt]) 10122dc407927Smrg 10123dc407927Smrgif test "x$use_asciidoc" = x"auto"; then 10124dc407927Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10125dc407927Smrg if test "x$ASCIIDOC" = "x"; then 10126dc407927Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10127dc407927Smrg have_asciidoc=no 10128dc407927Smrg else 10129dc407927Smrg have_asciidoc=yes 10130dc407927Smrg fi 10131dc407927Smrgelif test "x$use_asciidoc" = x"yes" ; then 10132dc407927Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10133dc407927Smrg if test "x$ASCIIDOC" = "x"; then 10134dc407927Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10135dc407927Smrg fi 10136dc407927Smrg have_asciidoc=yes 10137dc407927Smrgelif test "x$use_asciidoc" = x"no" ; then 10138dc407927Smrg if test "x$ASCIIDOC" != "x"; then 10139dc407927Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10140dc407927Smrg fi 10141dc407927Smrg have_asciidoc=no 10142dc407927Smrgelse 10143dc407927Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10144dc407927Smrgfi 10145dc407927Smrgm4_ifval([$1], 10146dc407927Smrg[if test "$have_asciidoc" = yes; then 10147dc407927Smrg # scrape the asciidoc version 10148dc407927Smrg AC_MSG_CHECKING([the asciidoc version]) 10149dc407927Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10150dc407927Smrg AC_MSG_RESULT([$asciidoc_version]) 10151dc407927Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10152dc407927Smrg [if test "x$use_asciidoc" = xauto; then 10153dc407927Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10154dc407927Smrg have_asciidoc=no 10155dc407927Smrg else 10156dc407927Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10157dc407927Smrg fi]) 10158dc407927Smrgfi]) 10159dc407927SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10160dc407927Smrg]) # XORG_WITH_ASCIIDOC 10161dc407927Smrg 10162dd0822caSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10163dc407927Smrg# -------------------------------- 10164dc407927Smrg# Minimum version: 1.5.0 10165dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10166dc407927Smrg# 10167dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10168dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10169dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10170dc407927Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10171dd0822caSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10172dd0822caSmrg# --with-doxygen assumes 'auto'. 10173dc407927Smrg# 10174dc407927Smrg# Interface to module: 10175dc407927Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10176dc407927Smrg# DOXYGEN: returns the path of the doxygen program found 10177dc407927Smrg# returns the path set by the user in the environment 10178dc407927Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10179dc407927Smrg# 'no' user instructs the module not to use doxygen 10180dc407927Smrg# 10181dc407927Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10182dc407927Smrg# 10183dc407927SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10184dc407927SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10185dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10186dc407927SmrgAC_ARG_WITH(doxygen, 10187dc407927Smrg AS_HELP_STRING([--with-doxygen], 10188dd0822caSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10189dd0822caSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10190dd0822caSmrgm4_undefine([_defopt]) 10191dc407927Smrg 10192dc407927Smrgif test "x$use_doxygen" = x"auto"; then 10193dc407927Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10194dc407927Smrg if test "x$DOXYGEN" = "x"; then 10195dc407927Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10196dc407927Smrg have_doxygen=no 10197dc407927Smrg else 10198dc407927Smrg have_doxygen=yes 10199dc407927Smrg fi 10200dc407927Smrgelif test "x$use_doxygen" = x"yes" ; then 10201dc407927Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10202dc407927Smrg if test "x$DOXYGEN" = "x"; then 10203dc407927Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10204dc407927Smrg fi 10205dc407927Smrg have_doxygen=yes 10206dc407927Smrgelif test "x$use_doxygen" = x"no" ; then 10207dc407927Smrg if test "x$DOXYGEN" != "x"; then 10208dc407927Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10209dc407927Smrg fi 10210dc407927Smrg have_doxygen=no 10211dc407927Smrgelse 10212dc407927Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10213dc407927Smrgfi 10214dc407927Smrgm4_ifval([$1], 10215dc407927Smrg[if test "$have_doxygen" = yes; then 10216dc407927Smrg # scrape the doxygen version 10217dc407927Smrg AC_MSG_CHECKING([the doxygen version]) 10218dc407927Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10219dc407927Smrg AC_MSG_RESULT([$doxygen_version]) 10220dc407927Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10221dc407927Smrg [if test "x$use_doxygen" = xauto; then 10222dc407927Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10223dc407927Smrg have_doxygen=no 10224dc407927Smrg else 10225dc407927Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10226dc407927Smrg fi]) 10227dc407927Smrgfi]) 10228dc407927SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10229dc407927Smrg]) # XORG_WITH_DOXYGEN 10230dc407927Smrg 10231dd0822caSmrg# XORG_WITH_GROFF([DEFAULT]) 10232dc407927Smrg# ---------------- 10233dc407927Smrg# Minimum version: 1.6.0 10234dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10235dc407927Smrg# 10236dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10237dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10238dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10239dc407927Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10240dd0822caSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 10241dd0822caSmrg# --with-groff assumes 'auto'. 10242dc407927Smrg# 10243dc407927Smrg# Interface to module: 10244dc407927Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10245dc407927Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10246dc407927Smrg# HAVE_GROFF_MS: the -ms macros package 10247dc407927Smrg# GROFF: returns the path of the groff program found 10248dc407927Smrg# returns the path set by the user in the environment 10249dc407927Smrg# --with-groff: 'yes' user instructs the module to use groff 10250dc407927Smrg# 'no' user instructs the module not to use groff 10251dc407927Smrg# 10252dd0822caSmrg# Added in version 1.9.0: 10253dd0822caSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10254dd0822caSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10255dd0822caSmrg# psselect from the psutils package. 10256dd0822caSmrg# the ghostcript package. Refer to the grohtml man pages 10257dd0822caSmrg# 10258dc407927Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10259dc407927Smrg# 10260dc407927Smrg# OS and distros often splits groff in a basic and full package, the former 10261dc407927Smrg# having the groff program and the later having devices, fonts and macros 10262dc407927Smrg# Checking for the groff executable is not enough. 10263dc407927Smrg# 10264dc407927Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10265dc407927Smrg# unset HAVE_GROFF or GROFF env variables. 10266dc407927Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10267dc407927Smrg# 10268dc407927SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10269dc407927SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10270dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10271dc407927SmrgAC_ARG_WITH(groff, 10272dc407927Smrg AS_HELP_STRING([--with-groff], 10273dd0822caSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10274dd0822caSmrg [use_groff=$withval], [use_groff=]_defopt) 10275dd0822caSmrgm4_undefine([_defopt]) 10276dc407927Smrg 10277dc407927Smrgif test "x$use_groff" = x"auto"; then 10278dc407927Smrg AC_PATH_PROG([GROFF], [groff]) 10279dc407927Smrg if test "x$GROFF" = "x"; then 10280dc407927Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10281dc407927Smrg have_groff=no 10282dc407927Smrg else 10283dc407927Smrg have_groff=yes 10284dc407927Smrg fi 10285dc407927Smrgelif test "x$use_groff" = x"yes" ; then 10286dc407927Smrg AC_PATH_PROG([GROFF], [groff]) 10287dc407927Smrg if test "x$GROFF" = "x"; then 10288dc407927Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10289dc407927Smrg fi 10290dc407927Smrg have_groff=yes 10291dc407927Smrgelif test "x$use_groff" = x"no" ; then 10292dc407927Smrg if test "x$GROFF" != "x"; then 10293dc407927Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10294dc407927Smrg fi 10295dc407927Smrg have_groff=no 10296dc407927Smrgelse 10297dc407927Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10298dc407927Smrgfi 10299dd0822caSmrg 10300dc407927Smrg# We have groff, test for the presence of the macro packages 10301dc407927Smrgif test "x$have_groff" = x"yes"; then 10302dc407927Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10303dc407927Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10304dc407927Smrg groff_ms_works=yes 10305dc407927Smrg else 10306dc407927Smrg groff_ms_works=no 10307dc407927Smrg fi 10308dc407927Smrg AC_MSG_RESULT([$groff_ms_works]) 10309dc407927Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10310dc407927Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10311dc407927Smrg groff_mm_works=yes 10312dc407927Smrg else 10313dc407927Smrg groff_mm_works=no 10314dc407927Smrg fi 10315dc407927Smrg AC_MSG_RESULT([$groff_mm_works]) 10316dc407927Smrgfi 10317dd0822caSmrg 10318dd0822caSmrg# We have groff, test for HTML dependencies, one command per package 10319dd0822caSmrgif test "x$have_groff" = x"yes"; then 10320dd0822caSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10321dd0822caSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10322dd0822caSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10323dd0822caSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10324dd0822caSmrg have_groff_html=yes 10325dd0822caSmrg else 10326dd0822caSmrg have_groff_html=no 10327dd0822caSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10328dd0822caSmrg fi 10329dd0822caSmrgfi 10330dd0822caSmrg 10331dd0822caSmrg# Set Automake conditionals for Makefiles 10332dc407927SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10333dc407927SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10334dc407927SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10335dd0822caSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10336dc407927Smrg]) # XORG_WITH_GROFF 10337dc407927Smrg 10338dd0822caSmrg# XORG_WITH_FOP([DEFAULT]) 10339dc407927Smrg# ---------------- 10340dc407927Smrg# Minimum version: 1.6.0 10341dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10342dc407927Smrg# 10343dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10344dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10345dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10346dc407927Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10347dd0822caSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 10348dd0822caSmrg# --with-fop assumes 'auto'. 10349dc407927Smrg# 10350dc407927Smrg# Interface to module: 10351dc407927Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10352dc407927Smrg# FOP: returns the path of the fop program found 10353dc407927Smrg# returns the path set by the user in the environment 10354dc407927Smrg# --with-fop: 'yes' user instructs the module to use fop 10355dc407927Smrg# 'no' user instructs the module not to use fop 10356dc407927Smrg# 10357dc407927Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10358dc407927Smrg# 10359dc407927SmrgAC_DEFUN([XORG_WITH_FOP],[ 10360dc407927SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10361dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10362dc407927SmrgAC_ARG_WITH(fop, 10363dc407927Smrg AS_HELP_STRING([--with-fop], 10364dd0822caSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10365dd0822caSmrg [use_fop=$withval], [use_fop=]_defopt) 10366dd0822caSmrgm4_undefine([_defopt]) 10367dc407927Smrg 10368dc407927Smrgif test "x$use_fop" = x"auto"; then 10369dc407927Smrg AC_PATH_PROG([FOP], [fop]) 10370dc407927Smrg if test "x$FOP" = "x"; then 10371dc407927Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10372dc407927Smrg have_fop=no 10373dc407927Smrg else 10374dc407927Smrg have_fop=yes 10375dc407927Smrg fi 10376dc407927Smrgelif test "x$use_fop" = x"yes" ; then 10377dc407927Smrg AC_PATH_PROG([FOP], [fop]) 10378dc407927Smrg if test "x$FOP" = "x"; then 10379dc407927Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10380dc407927Smrg fi 10381dc407927Smrg have_fop=yes 10382dc407927Smrgelif test "x$use_fop" = x"no" ; then 10383dc407927Smrg if test "x$FOP" != "x"; then 10384dc407927Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10385dc407927Smrg fi 10386dc407927Smrg have_fop=no 10387dc407927Smrgelse 10388dc407927Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10389dc407927Smrgfi 10390dc407927SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10391dc407927Smrg]) # XORG_WITH_FOP 10392dc407927Smrg 10393dd0822caSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10394dc407927Smrg# ---------------- 10395dc407927Smrg# Minimum version: 1.6.0 10396dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10397dc407927Smrg# 10398dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10399dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10400dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10401dc407927Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10402dd0822caSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10403dd0822caSmrg# --with-ps2pdf assumes 'auto'. 10404dc407927Smrg# 10405dc407927Smrg# Interface to module: 10406dc407927Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10407dc407927Smrg# PS2PDF: returns the path of the ps2pdf program found 10408dc407927Smrg# returns the path set by the user in the environment 10409dc407927Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10410dc407927Smrg# 'no' user instructs the module not to use ps2pdf 10411dc407927Smrg# 10412dc407927Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10413dc407927Smrg# 10414dc407927SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10415dc407927SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10416dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10417dc407927SmrgAC_ARG_WITH(ps2pdf, 10418dc407927Smrg AS_HELP_STRING([--with-ps2pdf], 10419dd0822caSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10420dd0822caSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10421dd0822caSmrgm4_undefine([_defopt]) 10422dc407927Smrg 10423dc407927Smrgif test "x$use_ps2pdf" = x"auto"; then 10424dc407927Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10425dc407927Smrg if test "x$PS2PDF" = "x"; then 10426dc407927Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10427dc407927Smrg have_ps2pdf=no 10428dc407927Smrg else 10429dc407927Smrg have_ps2pdf=yes 10430dc407927Smrg fi 10431dc407927Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10432dc407927Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10433dc407927Smrg if test "x$PS2PDF" = "x"; then 10434dc407927Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10435dc407927Smrg fi 10436dc407927Smrg have_ps2pdf=yes 10437dc407927Smrgelif test "x$use_ps2pdf" = x"no" ; then 10438dc407927Smrg if test "x$PS2PDF" != "x"; then 10439dc407927Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10440dc407927Smrg fi 10441dc407927Smrg have_ps2pdf=no 10442dc407927Smrgelse 10443dc407927Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10444dc407927Smrgfi 10445dc407927SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10446dc407927Smrg]) # XORG_WITH_PS2PDF 10447dc407927Smrg 10448dc407927Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10449dc407927Smrg# ---------------- 10450dc407927Smrg# Minimum version: 1.6.0 10451dc407927Smrg# 10452dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10453dc407927Smrg# not at the appropriate level. This macro enables a builder to skip all 10454dc407927Smrg# documentation targets except traditional man pages. 10455dc407927Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10456dc407927Smrg# maximum flexibilty in controlling documentation building. 10457dc407927Smrg# Refer to: 10458dc407927Smrg# XORG_WITH_XMLTO --with-xmlto 10459dc407927Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10460dc407927Smrg# XORG_WITH_DOXYGEN --with-doxygen 10461dc407927Smrg# XORG_WITH_FOP --with-fop 10462dc407927Smrg# XORG_WITH_GROFF --with-groff 10463dc407927Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10464dc407927Smrg# 10465dc407927Smrg# Interface to module: 10466dc407927Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10467dc407927Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10468dc407927Smrg# 'no' user instructs the module not to generate docs 10469dc407927Smrg# parm1: specify the default value, yes or no. 10470dc407927Smrg# 10471dc407927SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10472dd0822caSmrgm4_define([docs_default], m4_default([$1], [yes])) 10473dc407927SmrgAC_ARG_ENABLE(docs, 10474dc407927Smrg AS_HELP_STRING([--enable-docs], 10475dd0822caSmrg [Enable building the documentation (default: ]docs_default[)]), 10476dd0822caSmrg [build_docs=$enableval], [build_docs=]docs_default) 10477dd0822caSmrgm4_undefine([docs_default]) 10478dc407927SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10479dc407927SmrgAC_MSG_CHECKING([whether to build documentation]) 10480dc407927SmrgAC_MSG_RESULT([$build_docs]) 10481dc407927Smrg]) # XORG_ENABLE_DOCS 10482dc407927Smrg 10483dc407927Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10484dc407927Smrg# ---------------- 10485dc407927Smrg# Minimum version: 1.6.0 10486dc407927Smrg# 10487dc407927Smrg# This macro enables a builder to skip all developer documentation. 10488dc407927Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10489dc407927Smrg# maximum flexibilty in controlling documentation building. 10490dc407927Smrg# Refer to: 10491dc407927Smrg# XORG_WITH_XMLTO --with-xmlto 10492dc407927Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10493dc407927Smrg# XORG_WITH_DOXYGEN --with-doxygen 10494dc407927Smrg# XORG_WITH_FOP --with-fop 10495dc407927Smrg# XORG_WITH_GROFF --with-groff 10496dc407927Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10497dc407927Smrg# 10498dc407927Smrg# Interface to module: 10499dc407927Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10500dc407927Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10501dc407927Smrg# 'no' user instructs the module not to generate developer docs 10502dc407927Smrg# parm1: specify the default value, yes or no. 10503dc407927Smrg# 10504dc407927SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10505dd0822caSmrgm4_define([devel_default], m4_default([$1], [yes])) 10506dc407927SmrgAC_ARG_ENABLE(devel-docs, 10507dc407927Smrg AS_HELP_STRING([--enable-devel-docs], 10508dd0822caSmrg [Enable building the developer documentation (default: ]devel_default[)]), 10509dd0822caSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10510dd0822caSmrgm4_undefine([devel_default]) 10511dc407927SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10512dc407927SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10513dc407927SmrgAC_MSG_RESULT([$build_devel_docs]) 10514dc407927Smrg]) # XORG_ENABLE_DEVEL_DOCS 10515dc407927Smrg 10516dc407927Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10517dc407927Smrg# ---------------- 10518dc407927Smrg# Minimum version: 1.6.0 10519dc407927Smrg# 10520dc407927Smrg# This macro enables a builder to skip all functional specification targets. 10521dc407927Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10522dc407927Smrg# maximum flexibilty in controlling documentation building. 10523dc407927Smrg# Refer to: 10524dc407927Smrg# XORG_WITH_XMLTO --with-xmlto 10525dc407927Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10526dc407927Smrg# XORG_WITH_DOXYGEN --with-doxygen 10527dc407927Smrg# XORG_WITH_FOP --with-fop 10528dc407927Smrg# XORG_WITH_GROFF --with-groff 10529dc407927Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10530dc407927Smrg# 10531dc407927Smrg# Interface to module: 10532dc407927Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10533dc407927Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10534dc407927Smrg# 'no' user instructs the module not to generate specs 10535dc407927Smrg# parm1: specify the default value, yes or no. 10536dc407927Smrg# 10537dc407927SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10538dd0822caSmrgm4_define([spec_default], m4_default([$1], [yes])) 10539dc407927SmrgAC_ARG_ENABLE(specs, 10540dc407927Smrg AS_HELP_STRING([--enable-specs], 10541dd0822caSmrg [Enable building the specs (default: ]spec_default[)]), 10542dd0822caSmrg [build_specs=$enableval], [build_specs=]spec_default) 10543dd0822caSmrgm4_undefine([spec_default]) 10544dc407927SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10545dc407927SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10546dc407927SmrgAC_MSG_RESULT([$build_specs]) 10547dc407927Smrg]) # XORG_ENABLE_SPECS 10548dc407927Smrg 10549dd0822caSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10550dd0822caSmrg# ---------------------------------------------- 10551dd0822caSmrg# Minimum version: 1.13.0 10552dd0822caSmrg# 10553dd0822caSmrg# This macro enables a builder to enable/disable unit testing 10554dd0822caSmrg# It makes no assumption about the test cases implementation 10555dd0822caSmrg# Test cases may or may not use Automake "Support for test suites" 10556dd0822caSmrg# They may or may not use the software utility library GLib 10557dd0822caSmrg# 10558dd0822caSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10559dd0822caSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10560dd0822caSmrg# The variable enable_unit_tests is used by other macros in this file. 10561dd0822caSmrg# 10562dd0822caSmrg# Interface to module: 10563dd0822caSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10564dd0822caSmrg# enable_unit_tests: used in configure.ac for additional configuration 10565dd0822caSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10566dd0822caSmrg# 'no' user instructs the module not to build tests 10567dd0822caSmrg# parm1: specify the default value, yes or no. 10568dd0822caSmrg# 10569dd0822caSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10570dd0822caSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10571dd0822caSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10572dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10573dd0822caSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10574dd0822caSmrg [Enable building unit test cases (default: ]_defopt[)]), 10575dd0822caSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10576dd0822caSmrgm4_undefine([_defopt]) 10577dd0822caSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10578dd0822caSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10579dd0822caSmrgAC_MSG_RESULT([$enable_unit_tests]) 10580dd0822caSmrg]) # XORG_ENABLE_UNIT_TESTS 10581dd0822caSmrg 10582dd0822caSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10583dd0822caSmrg# ---------------------------------------- 10584dd0822caSmrg# Minimum version: 1.13.0 10585dd0822caSmrg# 10586dd0822caSmrg# GLib is a library which provides advanced data structures and functions. 10587dd0822caSmrg# This macro enables a module to test for the presence of Glib. 10588dd0822caSmrg# 10589dd0822caSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10590dd0822caSmrg# Otherwise the value of $enable_unit_tests is blank. 10591dd0822caSmrg# 10592dd0822caSmrg# Interface to module: 10593dd0822caSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 10594dd0822caSmrg# with_glib: used in configure.ac to know if GLib has been found 10595dd0822caSmrg# --with-glib: 'yes' user instructs the module to use glib 10596dd0822caSmrg# 'no' user instructs the module not to use glib 10597dd0822caSmrg# 10598dd0822caSmrgAC_DEFUN([XORG_WITH_GLIB],[ 10599dd0822caSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10600dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10601dd0822caSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10602dd0822caSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 10603dd0822caSmrg [with_glib=$withval], [with_glib=]_defopt) 10604dd0822caSmrgm4_undefine([_defopt]) 10605dd0822caSmrg 10606dd0822caSmrghave_glib=no 10607dd0822caSmrg# Do not probe GLib if user explicitly disabled unit testing 10608dd0822caSmrgif test "x$enable_unit_tests" != x"no"; then 10609dd0822caSmrg # Do not probe GLib if user explicitly disabled it 10610dd0822caSmrg if test "x$with_glib" != x"no"; then 10611dd0822caSmrg m4_ifval( 10612dd0822caSmrg [$1], 10613dd0822caSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10614dd0822caSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10615dd0822caSmrg ) 10616dd0822caSmrg fi 10617dd0822caSmrgfi 10618dd0822caSmrg 10619dd0822caSmrg# Not having GLib when unit testing has been explicitly requested is an error 10620dd0822caSmrgif test "x$enable_unit_tests" = x"yes"; then 10621dd0822caSmrg if test "x$have_glib" = x"no"; then 10622dd0822caSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10623dd0822caSmrg fi 10624dd0822caSmrgfi 10625dd0822caSmrg 10626dd0822caSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 10627dd0822caSmrgif test "x$enable_unit_tests" = x"no"; then 10628dd0822caSmrg if test "x$with_glib" = x"yes"; then 10629dd0822caSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10630dd0822caSmrg fi 10631dd0822caSmrgfi 10632dd0822caSmrg 10633dd0822caSmrg# Not having GLib when it has been explicitly requested is an error 10634dd0822caSmrgif test "x$with_glib" = x"yes"; then 10635dd0822caSmrg if test "x$have_glib" = x"no"; then 10636dd0822caSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10637dd0822caSmrg fi 10638dd0822caSmrgfi 10639dd0822caSmrg 10640dd0822caSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10641dd0822caSmrg]) # XORG_WITH_GLIB 10642dd0822caSmrg 10643dd0822caSmrg# XORG_LD_WRAP 10644dd0822caSmrg# ------------ 10645dd0822caSmrg# Minimum version: 1.13.0 10646dd0822caSmrg# 10647dd0822caSmrg# Check if linker supports -wrap, passed via compiler flags 10648dd0822caSmrg# 10649dd0822caSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10650dd0822caSmrg# Otherwise the value of $enable_unit_tests is blank. 10651dd0822caSmrg# 10652dd0822caSmrgAC_DEFUN([XORG_LD_WRAP],[ 10653dd0822caSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no]) 10654dd0822caSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 10655dd0822caSmrgif test "x$enable_unit_tests" = x"yes"; then 10656dd0822caSmrg if test "x$have_ld_wrap" = x"no"; then 10657dd0822caSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10658dd0822caSmrg fi 10659dd0822caSmrgfi 10660dd0822caSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10661dd0822caSmrg# 10662dd0822caSmrg]) # XORG_LD_WRAP 10663dd0822caSmrg 10664dd0822caSmrg# XORG_CHECK_LINKER_FLAGS 10665dd0822caSmrg# ----------------------- 10666dd0822caSmrg# SYNOPSIS 10667dd0822caSmrg# 10668dd0822caSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) 10669dd0822caSmrg# 10670dd0822caSmrg# DESCRIPTION 10671dd0822caSmrg# 10672dd0822caSmrg# Check whether the given linker FLAGS work with the current language's 10673dd0822caSmrg# linker, or whether they give an error. 10674dd0822caSmrg# 10675dd0822caSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10676dd0822caSmrg# success/failure. 10677dd0822caSmrg# 10678dd0822caSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10679dd0822caSmrg# 10680dd0822caSmrg# LICENSE 10681dd0822caSmrg# 10682dd0822caSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10683dd0822caSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10684dd0822caSmrg# Copyright (c) 2009 Matteo Frigo 10685dd0822caSmrg# 10686dd0822caSmrg# This program is free software: you can redistribute it and/or modify it 10687dd0822caSmrg# under the terms of the GNU General Public License as published by the 10688dd0822caSmrg# Free Software Foundation, either version 3 of the License, or (at your 10689dd0822caSmrg# option) any later version. 10690dd0822caSmrg# 10691dd0822caSmrg# This program is distributed in the hope that it will be useful, but 10692dd0822caSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10693dd0822caSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10694dd0822caSmrg# Public License for more details. 10695dd0822caSmrg# 10696dd0822caSmrg# You should have received a copy of the GNU General Public License along 10697dd0822caSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10698dd0822caSmrg# 10699dd0822caSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10700dd0822caSmrg# gives unlimited permission to copy, distribute and modify the configure 10701dd0822caSmrg# scripts that are the output of Autoconf when processing the Macro. You 10702dd0822caSmrg# need not follow the terms of the GNU General Public License when using 10703dd0822caSmrg# or distributing such scripts, even though portions of the text of the 10704dd0822caSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 10705dd0822caSmrg# all other use of the material that constitutes the Autoconf Macro. 10706dd0822caSmrg# 10707dd0822caSmrg# This special exception to the GPL applies to versions of the Autoconf 10708dd0822caSmrg# Macro released by the Autoconf Archive. When you make and distribute a 10709dd0822caSmrg# modified version of the Autoconf Macro, you may extend this special 10710dd0822caSmrg# exception to the GPL to apply to your modified version as well.# 10711dd0822caSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10712dd0822caSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10713dd0822caSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10714dd0822caSmrgAS_LITERAL_IF([$1], 10715dd0822caSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10716dd0822caSmrg ax_save_FLAGS=$LDFLAGS 10717dd0822caSmrg LDFLAGS="$1" 10718dd0822caSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10719dd0822caSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10720dd0822caSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10721dd0822caSmrg LDFLAGS=$ax_save_FLAGS])], 10722dd0822caSmrg [ax_save_FLAGS=$LDFLAGS 10723dd0822caSmrg LDFLAGS="$1" 10724dd0822caSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10725dd0822caSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10726dd0822caSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10727dd0822caSmrg LDFLAGS=$ax_save_FLAGS]) 10728dd0822caSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10729dd0822caSmrgAC_MSG_RESULT($xorg_check_linker_flags) 10730dd0822caSmrgif test "x$xorg_check_linker_flags" = xyes; then 10731dd0822caSmrg m4_default([$2], :) 10732dd0822caSmrgelse 10733dd0822caSmrg m4_default([$3], :) 10734dd0822caSmrgfi 10735dd0822caSmrg]) # XORG_CHECK_LINKER_FLAGS 10736dd0822caSmrg 107373eed67faSmbalmer# XORG_CHECK_MALLOC_ZERO 107383eed67faSmbalmer# ---------------------- 107393eed67faSmbalmer# Minimum version: 1.0.0 107403eed67faSmbalmer# 107413eed67faSmbalmer# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 107423eed67faSmbalmer# malloc(0) returns NULL. Packages should add one of these cflags to 107433eed67faSmbalmer# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 107443eed67faSmbalmerAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 107453eed67faSmbalmerAC_ARG_ENABLE(malloc0returnsnull, 10746dc407927Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 107473eed67faSmbalmer [malloc(0) returns NULL (default: auto)]), 107483eed67faSmbalmer [MALLOC_ZERO_RETURNS_NULL=$enableval], 107493eed67faSmbalmer [MALLOC_ZERO_RETURNS_NULL=auto]) 107503eed67faSmbalmer 107513eed67faSmbalmerAC_MSG_CHECKING([whether malloc(0) returns NULL]) 107523eed67faSmbalmerif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10753dd0822caSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10754dd0822caSmrg#include <stdlib.h> 10755dd0822caSmrg],[ 107563eed67faSmbalmer char *m0, *r0, *c0, *p; 107573eed67faSmbalmer m0 = malloc(0); 107583eed67faSmbalmer p = malloc(10); 107593eed67faSmbalmer r0 = realloc(p,0); 10760dd0822caSmrg c0 = calloc(0,10); 10761dd0822caSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10762dd0822caSmrg])], 107633eed67faSmbalmer [MALLOC_ZERO_RETURNS_NULL=yes], 10764dc407927Smrg [MALLOC_ZERO_RETURNS_NULL=no], 10765dc407927Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 107663eed67faSmbalmerfi 107673eed67faSmbalmerAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 107683eed67faSmbalmer 107693eed67faSmbalmerif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 107703eed67faSmbalmer MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 107713eed67faSmbalmer XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 107723eed67faSmbalmer XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 107733eed67faSmbalmerelse 107743eed67faSmbalmer MALLOC_ZERO_CFLAGS="" 107753eed67faSmbalmer XMALLOC_ZERO_CFLAGS="" 107763eed67faSmbalmer XTMALLOC_ZERO_CFLAGS="" 107773eed67faSmbalmerfi 107783eed67faSmbalmer 107793eed67faSmbalmerAC_SUBST([MALLOC_ZERO_CFLAGS]) 107803eed67faSmbalmerAC_SUBST([XMALLOC_ZERO_CFLAGS]) 107813eed67faSmbalmerAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 107823eed67faSmbalmer]) # XORG_CHECK_MALLOC_ZERO 107833eed67faSmbalmer 107843eed67faSmbalmer# XORG_WITH_LINT() 107853eed67faSmbalmer# ---------------- 107863eed67faSmbalmer# Minimum version: 1.1.0 107873eed67faSmbalmer# 10788dc407927Smrg# This macro enables the use of a tool that flags some suspicious and 10789dc407927Smrg# non-portable constructs (likely to be bugs) in C language source code. 10790dc407927Smrg# It will attempt to locate the tool and use appropriate options. 10791dc407927Smrg# There are various lint type tools on different platforms. 10792dc407927Smrg# 10793dc407927Smrg# Interface to module: 10794dc407927Smrg# LINT: returns the path to the tool found on the platform 10795dc407927Smrg# or the value set to LINT on the configure cmd line 10796dc407927Smrg# also an Automake conditional 10797dc407927Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10798dc407927Smrg# 10799dc407927Smrg# --with-lint: 'yes' user instructs the module to use lint 10800dc407927Smrg# 'no' user instructs the module not to use lint (default) 10801dc407927Smrg# 10802dc407927Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10803dc407927Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 108043eed67faSmbalmer# 108053eed67faSmbalmerAC_DEFUN([XORG_WITH_LINT],[ 108063eed67faSmbalmer 10807dc407927SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10808dc407927SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10809dc407927SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 108103eed67faSmbalmer [Use a lint-style source code checker (default: disabled)])], 108113eed67faSmbalmer [use_lint=$withval], [use_lint=no]) 10812dc407927Smrg 10813dc407927Smrg# Obtain platform specific info like program name and options 10814dc407927Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10815dc407927Smrgcase $host_os in 10816dc407927Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10817dc407927Smrg lint_name=splint 10818dc407927Smrg lint_options="-badflag" 10819dc407927Smrg ;; 10820dc407927Smrg *freebsd* | *netbsd*) 10821dc407927Smrg lint_name=lint 10822dc407927Smrg lint_options="-u -b" 10823dc407927Smrg ;; 10824dc407927Smrg *solaris*) 10825dc407927Smrg lint_name=lint 10826dc407927Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10827dc407927Smrg ;; 10828dc407927Smrgesac 10829dc407927Smrg 10830dc407927Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10831dc407927Smrgif test "x$use_lint" = x"yes" ; then 10832dc407927Smrg AC_PATH_PROG([LINT], [$lint_name]) 10833dc407927Smrg if test "x$LINT" = "x"; then 10834dc407927Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10835dc407927Smrg fi 10836dc407927Smrgelif test "x$use_lint" = x"no" ; then 10837dc407927Smrg if test "x$LINT" != "x"; then 10838dc407927Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10839dc407927Smrg fi 108403eed67faSmbalmerelse 10841dc407927Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 108423eed67faSmbalmerfi 10843dc407927Smrg 10844dc407927Smrg# User supplied flags override default flags 10845dc407927Smrgif test "x$LINT_FLAGS" != "x"; then 10846dc407927Smrg lint_options=$LINT_FLAGS 108473eed67faSmbalmerfi 108483eed67faSmbalmer 10849dc407927SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10850dc407927SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 108513eed67faSmbalmer 108523eed67faSmbalmer]) # XORG_WITH_LINT 108533eed67faSmbalmer 108543eed67faSmbalmer# XORG_LINT_LIBRARY(LIBNAME) 108553eed67faSmbalmer# -------------------------- 108563eed67faSmbalmer# Minimum version: 1.1.0 108573eed67faSmbalmer# 108583eed67faSmbalmer# Sets up flags for building lint libraries for checking programs that call 108593eed67faSmbalmer# functions in the library. 108603eed67faSmbalmer# 10861dc407927Smrg# Interface to module: 10862dc407927Smrg# LINTLIB - Automake variable with the name of lint library file to make 10863dc407927Smrg# MAKE_LINT_LIB - Automake conditional 10864dc407927Smrg# 10865dc407927Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10866dc407927Smrg# - 'no' user instructs the module not to create a lint library (default) 108673eed67faSmbalmer 108683eed67faSmbalmerAC_DEFUN([XORG_LINT_LIBRARY],[ 108693eed67faSmbalmerAC_REQUIRE([XORG_WITH_LINT]) 10870dc407927SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 108713eed67faSmbalmer [Create lint library (default: disabled)])], 108723eed67faSmbalmer [make_lint_lib=$enableval], [make_lint_lib=no]) 10873dc407927Smrg 10874dc407927Smrgif test "x$make_lint_lib" = x"yes" ; then 10875dc407927Smrg LINTLIB=llib-l$1.ln 10876dc407927Smrg if test "x$LINT" = "x"; then 10877dc407927Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10878dc407927Smrg fi 10879dc407927Smrgelif test "x$make_lint_lib" != x"no" ; then 10880dc407927Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 108813eed67faSmbalmerfi 10882dc407927Smrg 108833eed67faSmbalmerAC_SUBST(LINTLIB) 108843eed67faSmbalmerAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 108853eed67faSmbalmer 108863eed67faSmbalmer]) # XORG_LINT_LIBRARY 108873eed67faSmbalmer 10888dd0822caSmrg# XORG_COMPILER_BRAND 10889dd0822caSmrg# ------------------- 10890dd0822caSmrg# Minimum version: 1.14.0 10891dd0822caSmrg# 10892dd0822caSmrg# Checks for various brands of compilers and sets flags as appropriate: 10893dd0822caSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10894dd0822caSmrg# clang compiler - sets CLANGCC to "yes" 10895dd0822caSmrg# Intel compiler - sets INTELCC to "yes" 10896dd0822caSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10897dd0822caSmrg# 10898dd0822caSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10899dd0822caSmrgAC_REQUIRE([AC_PROG_CC_C99]) 10900dd0822caSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10901dd0822caSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10902dd0822caSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10903dd0822caSmrg]) # XORG_COMPILER_BRAND 10904dd0822caSmrg 10905dc407927Smrg# XORG_CWARNFLAGS 10906dc407927Smrg# --------------- 10907dc407927Smrg# Minimum version: 1.2.0 10908dc407927Smrg# 10909dc407927Smrg# Defines CWARNFLAGS to enable C compiler warnings. 10910dc407927Smrg# 10911dc407927SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10912dc407927SmrgAC_REQUIRE([AC_PROG_CC_C99]) 10913dd0822caSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10914dc407927Smrgif test "x$GCC" = xyes ; then 10915dc407927Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 10916dc407927Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 10917dc407927Smrg-Wbad-function-cast -Wformat=2" 10918dc407927Smrg case `$CC -dumpversion` in 10919dc407927Smrg 3.4.* | 4.*) 10920dc407927Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 10921dc407927Smrg ;; 10922dc407927Smrg esac 10923dc407927Smrgelse 10924dc407927Smrg if test "x$SUNCC" = "xyes"; then 10925dc407927Smrg CWARNFLAGS="-v" 10926dc407927Smrg fi 10927dc407927Smrgfi 10928dc407927SmrgAC_SUBST(CWARNFLAGS) 10929dc407927Smrg]) # XORG_CWARNFLAGS 109303eed67faSmbalmer 10931dc407927Smrg# XORG_STRICT_OPTION 10932dc407927Smrg# ----------------------- 10933dc407927Smrg# Minimum version: 1.3.0 10934dc407927Smrg# 10935dd0822caSmrg# Add configure option to enable strict compilation flags, such as treating 10936dd0822caSmrg# warnings as fatal errors. 10937dd0822caSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10938dd0822caSmrg# $CWARNFLAGS. 10939dd0822caSmrg# 10940dd0822caSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10941dd0822caSmrg# when strict compilation is unconditionally desired. 10942dc407927SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10943dc407927Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 10944dc407927SmrgAC_REQUIRE([AC_PROG_CC_C99]) 10945dd0822caSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10946dc407927SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10947dc407927Smrg 10948dc407927SmrgAC_ARG_ENABLE(strict-compilation, 10949dc407927Smrg AS_HELP_STRING([--enable-strict-compilation], 10950dc407927Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10951dc407927Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10952dd0822caSmrgif test "x$GCC" = xyes ; then 10953dd0822caSmrg STRICT_CFLAGS="-pedantic -Werror" 10954dd0822caSmrg # Add -Werror=attributes if supported (gcc 4.2 & later) 10955dd0822caSmrg AC_MSG_CHECKING([if $CC supports -Werror=attributes]) 10956dd0822caSmrg save_CFLAGS="$CFLAGS" 10957dd0822caSmrg CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" 10958dd0822caSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])], 10959dd0822caSmrg [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" 10960dd0822caSmrg AC_MSG_RESULT([yes])], 10961dd0822caSmrg [AC_MSG_RESULT([no])]) 10962dd0822caSmrg CFLAGS="$save_CFLAGS" 10963dd0822caSmrgelif test "x$SUNCC" = "xyes"; then 10964dd0822caSmrg STRICT_CFLAGS="-errwarn" 10965dd0822caSmrgelif test "x$INTELCC" = "xyes"; then 10966dd0822caSmrg STRICT_CFLAGS="-Werror" 10967dd0822caSmrgfi 10968dc407927Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10969dd0822caSmrg CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 10970dc407927Smrgfi 10971dd0822caSmrgAC_SUBST([STRICT_CFLAGS]) 10972dc407927SmrgAC_SUBST([CWARNFLAGS]) 10973dc407927Smrg]) # XORG_STRICT_OPTION 109743eed67faSmbalmer 10975dc407927Smrg# XORG_DEFAULT_OPTIONS 10976dc407927Smrg# -------------------- 10977dc407927Smrg# Minimum version: 1.3.0 10978dc407927Smrg# 10979dc407927Smrg# Defines default options for X.Org modules. 10980dc407927Smrg# 10981dc407927SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10982dc407927SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10983dc407927SmrgXORG_CWARNFLAGS 10984dc407927SmrgXORG_STRICT_OPTION 10985dc407927SmrgXORG_RELEASE_VERSION 10986dc407927SmrgXORG_CHANGELOG 10987dc407927SmrgXORG_INSTALL 10988dc407927SmrgXORG_MANPAGE_SECTIONS 10989dc407927Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10990dc407927Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10991dc407927Smrg]) # XORG_DEFAULT_OPTIONS 10992dc407927Smrg 10993dc407927Smrg# XORG_INSTALL() 10994dc407927Smrg# ---------------- 10995dc407927Smrg# Minimum version: 1.4.0 10996dc407927Smrg# 10997dc407927Smrg# Defines the variable INSTALL_CMD as the command to copy 10998dc407927Smrg# INSTALL from $prefix/share/util-macros. 10999dc407927Smrg# 11000dc407927SmrgAC_DEFUN([XORG_INSTALL], [ 11001dc407927SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11002dc407927Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11003dc407927SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11004dc407927Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11005dc407927Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11006dc407927Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11007dc407927SmrgAC_SUBST([INSTALL_CMD]) 11008dc407927Smrg]) # XORG_INSTALL 110093eed67faSmbalmerdnl Copyright 2005 Red Hat, Inc 110103eed67faSmbalmerdnl 110113eed67faSmbalmerdnl Permission to use, copy, modify, distribute, and sell this software and its 110123eed67faSmbalmerdnl documentation for any purpose is hereby granted without fee, provided that 110133eed67faSmbalmerdnl the above copyright notice appear in all copies and that both that 110143eed67faSmbalmerdnl copyright notice and this permission notice appear in supporting 110153eed67faSmbalmerdnl documentation. 110163eed67faSmbalmerdnl 110173eed67faSmbalmerdnl The above copyright notice and this permission notice shall be included 110183eed67faSmbalmerdnl in all copies or substantial portions of the Software. 110193eed67faSmbalmerdnl 110203eed67faSmbalmerdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 110213eed67faSmbalmerdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 110223eed67faSmbalmerdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 110233eed67faSmbalmerdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 110243eed67faSmbalmerdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 110253eed67faSmbalmerdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 110263eed67faSmbalmerdnl OTHER DEALINGS IN THE SOFTWARE. 110273eed67faSmbalmerdnl 110283eed67faSmbalmerdnl Except as contained in this notice, the name of the copyright holders shall 110293eed67faSmbalmerdnl not be used in advertising or otherwise to promote the sale, use or 110303eed67faSmbalmerdnl other dealings in this Software without prior written authorization 110313eed67faSmbalmerdnl from the copyright holders. 110323eed67faSmbalmerdnl 110333eed67faSmbalmer 110343eed67faSmbalmer# XORG_RELEASE_VERSION 110353eed67faSmbalmer# -------------------- 11036dc407927Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 110373eed67faSmbalmer 110383eed67faSmbalmerAC_DEFUN([XORG_RELEASE_VERSION],[ 110393eed67faSmbalmer AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 110403eed67faSmbalmer [`echo $PACKAGE_VERSION | cut -d . -f 1`], 110413eed67faSmbalmer [Major version of this package]) 110423eed67faSmbalmer PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 110433eed67faSmbalmer if test "x$PVM" = "x"; then 110443eed67faSmbalmer PVM="0" 110453eed67faSmbalmer fi 110463eed67faSmbalmer AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 110473eed67faSmbalmer [$PVM], 110483eed67faSmbalmer [Minor version of this package]) 110493eed67faSmbalmer PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 110503eed67faSmbalmer if test "x$PVP" = "x"; then 110513eed67faSmbalmer PVP="0" 110523eed67faSmbalmer fi 110533eed67faSmbalmer AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 110543eed67faSmbalmer [$PVP], 110553eed67faSmbalmer [Patch version of this package]) 110563eed67faSmbalmer]) 110573eed67faSmbalmer 11058dc407927Smrg# XORG_CHANGELOG() 11059dc407927Smrg# ---------------- 11060dc407927Smrg# Minimum version: 1.2.0 11061dc407927Smrg# 11062dc407927Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11063dc407927Smrg# ChangeLog from git. 11064dc407927Smrg# 11065dc407927Smrg# 11066dc407927SmrgAC_DEFUN([XORG_CHANGELOG], [ 11067dc407927SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11068dc407927Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11069dc407927Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11070dc407927Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11071dc407927SmrgAC_SUBST([CHANGELOG_CMD]) 11072dc407927Smrg]) # XORG_CHANGELOG 11073dc407927Smrg 11074dc407927Smrgdnl Copyright 2005 Red Hat, Inc 11075dc407927Smrgdnl 11076dc407927Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11077dc407927Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11078dc407927Smrgdnl the above copyright notice appear in all copies and that both that 11079dc407927Smrgdnl copyright notice and this permission notice appear in supporting 11080dc407927Smrgdnl documentation. 11081dc407927Smrgdnl 11082dc407927Smrgdnl The above copyright notice and this permission notice shall be included 11083dc407927Smrgdnl in all copies or substantial portions of the Software. 11084dc407927Smrgdnl 11085dc407927Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11086dc407927Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11087dc407927Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11088dc407927Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11089dc407927Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11090dc407927Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11091dc407927Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11092dc407927Smrgdnl 11093dc407927Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11094dc407927Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11095dc407927Smrgdnl other dealings in this Software without prior written authorization 11096dc407927Smrgdnl from the copyright holders. 11097dc407927Smrgdnl 11098dc407927Smrg 11099dc407927Smrg# XORG_DRIVER_CHECK_EXT() 11100dc407927Smrg# -------------------------- 11101dc407927Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 11102dc407927Smrg# is defined, then add $1 to $REQUIRED_MODULES. 11103dc407927Smrg 11104dc407927SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11105dc407927Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11106dc407927Smrg SAVE_CFLAGS="$CFLAGS" 11107dc407927Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11108dc407927Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11109dc407927Smrg#include "xorg-server.h" 11110dc407927Smrg#if !defined $1 11111dc407927Smrg#error $1 not defined 11112dc407927Smrg#endif 11113dc407927Smrg ]])], 11114dc407927Smrg [_EXT_CHECK=yes], 11115dc407927Smrg [_EXT_CHECK=no]) 11116dc407927Smrg CFLAGS="$SAVE_CFLAGS" 11117dc407927Smrg AC_MSG_CHECKING([if $1 is defined]) 11118dc407927Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11119dc407927Smrg if test "$_EXT_CHECK" != no; then 11120dc407927Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11121dc407927Smrg fi 11122dc407927Smrg]) 11123dc407927Smrg 11124