aclocal.m4 revision dbcfc9ff
1d422ce2eSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 26257f37dSmrg 3d422ce2eSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4fc5a983dSmrg 5fc5a983dSmrg# This file is free software; the Free Software Foundation 6fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 7fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 8fc5a983dSmrg 9fc5a983dSmrg# This program is distributed in the hope that it will be useful, 10fc5a983dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fc5a983dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fc5a983dSmrg# PARTICULAR PURPOSE. 13fc5a983dSmrg 146257f37dSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15fc5a983dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16fc5a983dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17dbcfc9ffSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, 18dbcfc9ffSmrg[m4_warning([this file was generated for autoconf 2.72. 19fc5a983dSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20fc5a983dSmrgIf you have problems, you may need to regenerate the build system entirely. 216257f37dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22fc5a983dSmrg 23d422ce2eSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24f3561b8bSmrg# 25d422ce2eSmrg# This file is free software; the Free Software Foundation 26d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 27d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 286257f37dSmrg 29d422ce2eSmrg# AM_AUTOMAKE_VERSION(VERSION) 30d422ce2eSmrg# ---------------------------- 31d422ce2eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32d422ce2eSmrg# generated from the m4 files accompanying Automake X.Y. 33d422ce2eSmrg# (This private macro should not be called outside this file.) 34d422ce2eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35d422ce2eSmrg[am__api_version='1.16' 36d422ce2eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37d422ce2eSmrgdnl require some minimum version. Point them to the right macro. 38d422ce2eSmrgm4_if([$1], [1.16.5], [], 39d422ce2eSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40f3561b8bSmrg]) 41fc5a983dSmrg 42d422ce2eSmrg# _AM_AUTOCONF_VERSION(VERSION) 43d422ce2eSmrg# ----------------------------- 44d422ce2eSmrg# aclocal traces this macro to find the Autoconf version. 45d422ce2eSmrg# This is a private macro too. Using m4_define simplifies 46d422ce2eSmrg# the logic in aclocal, which can simply ignore this definition. 47d422ce2eSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48fc5a983dSmrg 49d422ce2eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50d422ce2eSmrg# ------------------------------- 51d422ce2eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52d422ce2eSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53d422ce2eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54d422ce2eSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55d422ce2eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56d422ce2eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57d422ce2eSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58fc5a983dSmrg 59d422ce2eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60fc5a983dSmrg 61d422ce2eSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62d422ce2eSmrg# 63d422ce2eSmrg# This file is free software; the Free Software Foundation 64d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 65d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 66fc5a983dSmrg 67d422ce2eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68d422ce2eSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69d422ce2eSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70d422ce2eSmrg# 71d422ce2eSmrg# Of course, Automake must honor this variable whenever it calls a 72d422ce2eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73d422ce2eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74d422ce2eSmrg# depending on how configure is run. This is pretty annoying, since 75d422ce2eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76d422ce2eSmrg# source directory, any form will work fine, but in subdirectories a 77d422ce2eSmrg# relative path needs to be adjusted first. 78d422ce2eSmrg# 79d422ce2eSmrg# $ac_aux_dir/missing 80d422ce2eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81d422ce2eSmrg# $top_srcdir/$ac_aux_dir/missing 82d422ce2eSmrg# fails if $ac_aux_dir is absolute, 83d422ce2eSmrg# fails when called from a subdirectory in a VPATH build with 84d422ce2eSmrg# a relative $ac_aux_dir 85d422ce2eSmrg# 86d422ce2eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87d422ce2eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 88d422ce2eSmrg# harmless because $srcdir is '.', but things will broke when you 89d422ce2eSmrg# start a VPATH build or use an absolute $srcdir. 90d422ce2eSmrg# 91d422ce2eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92d422ce2eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93d422ce2eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94d422ce2eSmrg# and then we would define $MISSING as 95d422ce2eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96d422ce2eSmrg# This will work as long as MISSING is not called from configure, because 97d422ce2eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98d422ce2eSmrg# However there are other variables, like CC, which are often used in 99d422ce2eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100d422ce2eSmrg# 101d422ce2eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102d422ce2eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103d422ce2eSmrg# configured tree to be moved without reconfiguration. 104d422ce2eSmrg 105d422ce2eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106d422ce2eSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107d422ce2eSmrg# Expand $ac_aux_dir to an absolute path. 108d422ce2eSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109f3561b8bSmrg]) 110f3561b8bSmrg 111d422ce2eSmrg# AM_CONDITIONAL -*- Autoconf -*- 112f3561b8bSmrg 113d422ce2eSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114d422ce2eSmrg# 115d422ce2eSmrg# This file is free software; the Free Software Foundation 116d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 117d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 118f3561b8bSmrg 119d422ce2eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120d422ce2eSmrg# ------------------------------------- 121d422ce2eSmrg# Define a conditional. 122d422ce2eSmrgAC_DEFUN([AM_CONDITIONAL], 123d422ce2eSmrg[AC_PREREQ([2.52])dnl 124d422ce2eSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125d422ce2eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126d422ce2eSmrgAC_SUBST([$1_TRUE])dnl 127d422ce2eSmrgAC_SUBST([$1_FALSE])dnl 128d422ce2eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129d422ce2eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130d422ce2eSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131d422ce2eSmrgif $2; then 132d422ce2eSmrg $1_TRUE= 133d422ce2eSmrg $1_FALSE='#' 134d422ce2eSmrgelse 135d422ce2eSmrg $1_TRUE='#' 136d422ce2eSmrg $1_FALSE= 137d422ce2eSmrgfi 138d422ce2eSmrgAC_CONFIG_COMMANDS_PRE( 139d422ce2eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140d422ce2eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 141d422ce2eSmrgUsually this means the macro was only invoked conditionally.]]) 142d422ce2eSmrgfi])]) 143f3561b8bSmrg 144d422ce2eSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145d422ce2eSmrg# 146d422ce2eSmrg# This file is free software; the Free Software Foundation 147d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 148d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 149bd304fc0Smrg 150fc5a983dSmrg 151d422ce2eSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152d422ce2eSmrg# written in clear, in which case automake, when reading aclocal.m4, 153d422ce2eSmrg# will think it sees a *use*, and therefore will trigger all it's 154d422ce2eSmrg# C support machinery. Also note that it means that autoscan, seeing 155d422ce2eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156fc5a983dSmrg 157fc5a983dSmrg 158d422ce2eSmrg# _AM_DEPENDENCIES(NAME) 159d422ce2eSmrg# ---------------------- 160d422ce2eSmrg# See how the compiler implements dependency checking. 161d422ce2eSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162d422ce2eSmrg# We try a few techniques and use that to set a single cache variable. 163d422ce2eSmrg# 164d422ce2eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165d422ce2eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166d422ce2eSmrg# dependency, and given that the user is not expected to run this macro, 167d422ce2eSmrg# just rely on AC_PROG_CC. 168d422ce2eSmrgAC_DEFUN([_AM_DEPENDENCIES], 169d422ce2eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170d422ce2eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171d422ce2eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172d422ce2eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173fc5a983dSmrg 174d422ce2eSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175d422ce2eSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176d422ce2eSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177d422ce2eSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178d422ce2eSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179d422ce2eSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180d422ce2eSmrg [depcc="$$1" am_compiler_list=]) 181fc5a983dSmrg 182d422ce2eSmrgAC_CACHE_CHECK([dependency style of $depcc], 183d422ce2eSmrg [am_cv_$1_dependencies_compiler_type], 184d422ce2eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185d422ce2eSmrg # We make a subdir and do the tests there. Otherwise we can end up 186d422ce2eSmrg # making bogus files that we don't know about and never remove. For 187d422ce2eSmrg # instance it was reported that on HP-UX the gcc test will end up 188d422ce2eSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 189d422ce2eSmrg # in D". 190d422ce2eSmrg rm -rf conftest.dir 191d422ce2eSmrg mkdir conftest.dir 192d422ce2eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 193d422ce2eSmrg # using a relative directory. 194d422ce2eSmrg cp "$am_depcomp" conftest.dir 195d422ce2eSmrg cd conftest.dir 196d422ce2eSmrg # We will build objects and dependencies in a subdirectory because 197d422ce2eSmrg # it helps to detect inapplicable dependency modes. For instance 198d422ce2eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 199d422ce2eSmrg # side effect of compilation, but ICC will put the dependencies in 200d422ce2eSmrg # the current directory while Tru64 will put them in the object 201d422ce2eSmrg # directory. 202d422ce2eSmrg mkdir sub 203f3561b8bSmrg 204d422ce2eSmrg am_cv_$1_dependencies_compiler_type=none 205d422ce2eSmrg if test "$am_compiler_list" = ""; then 206d422ce2eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207d422ce2eSmrg fi 208d422ce2eSmrg am__universal=false 209d422ce2eSmrg m4_case([$1], [CC], 210d422ce2eSmrg [case " $depcc " in #( 211d422ce2eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212d422ce2eSmrg esac], 213d422ce2eSmrg [CXX], 214d422ce2eSmrg [case " $depcc " in #( 215d422ce2eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216d422ce2eSmrg esac]) 217f3561b8bSmrg 218d422ce2eSmrg for depmode in $am_compiler_list; do 219d422ce2eSmrg # Setup a source with many dependencies, because some compilers 220d422ce2eSmrg # like to wrap large dependency lists on column 80 (with \), and 221d422ce2eSmrg # we should not choose a depcomp mode which is confused by this. 222d422ce2eSmrg # 223d422ce2eSmrg # We need to recreate these files for each test, as the compiler may 224d422ce2eSmrg # overwrite some of them when testing with obscure command lines. 225d422ce2eSmrg # This happens at least with the AIX C compiler. 226d422ce2eSmrg : > sub/conftest.c 227d422ce2eSmrg for i in 1 2 3 4 5 6; do 228d422ce2eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229d422ce2eSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230d422ce2eSmrg # Solaris 10 /bin/sh. 231d422ce2eSmrg echo '/* dummy */' > sub/conftst$i.h 2326257f37dSmrg done 233d422ce2eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2346257f37dSmrg 235d422ce2eSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236d422ce2eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 237d422ce2eSmrg # handle '-M -o', and we need to detect this. Also, some Intel 238d422ce2eSmrg # versions had trouble with output in subdirs. 239d422ce2eSmrg am__obj=sub/conftest.${OBJEXT-o} 240d422ce2eSmrg am__minus_obj="-o $am__obj" 241d422ce2eSmrg case $depmode in 242d422ce2eSmrg gcc) 243d422ce2eSmrg # This depmode causes a compiler race in universal mode. 244d422ce2eSmrg test "$am__universal" = false || continue 245d422ce2eSmrg ;; 246d422ce2eSmrg nosideeffect) 247d422ce2eSmrg # After this tag, mechanisms are not by side-effect, so they'll 248d422ce2eSmrg # only be used when explicitly requested. 249d422ce2eSmrg if test "x$enable_dependency_tracking" = xyes; then 250d422ce2eSmrg continue 251d422ce2eSmrg else 252d422ce2eSmrg break 253d422ce2eSmrg fi 254d422ce2eSmrg ;; 255d422ce2eSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256d422ce2eSmrg # This compiler won't grok '-c -o', but also, the minuso test has 257d422ce2eSmrg # not run yet. These depmodes are late enough in the game, and 258d422ce2eSmrg # so weak that their functioning should not be impacted. 259d422ce2eSmrg am__obj=conftest.${OBJEXT-o} 260d422ce2eSmrg am__minus_obj= 261d422ce2eSmrg ;; 262d422ce2eSmrg none) break ;; 263d422ce2eSmrg esac 264d422ce2eSmrg if depmode=$depmode \ 265d422ce2eSmrg source=sub/conftest.c object=$am__obj \ 266d422ce2eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267d422ce2eSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268d422ce2eSmrg >/dev/null 2>conftest.err && 269d422ce2eSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270d422ce2eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271d422ce2eSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272d422ce2eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273d422ce2eSmrg # icc doesn't choke on unknown options, it will just issue warnings 274d422ce2eSmrg # or remarks (even with -Werror). So we grep stderr for any message 275d422ce2eSmrg # that says an option was ignored or not supported. 276d422ce2eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277d422ce2eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 278d422ce2eSmrg # The diagnosis changed in icc 8.0: 279d422ce2eSmrg # icc: Command line remark: option '-MP' not supported 280d422ce2eSmrg if (grep 'ignoring option' conftest.err || 281d422ce2eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282d422ce2eSmrg am_cv_$1_dependencies_compiler_type=$depmode 283d422ce2eSmrg break 284d422ce2eSmrg fi 285d422ce2eSmrg fi 286d422ce2eSmrg done 2876257f37dSmrg 288d422ce2eSmrg cd .. 289d422ce2eSmrg rm -rf conftest.dir 290d422ce2eSmrgelse 291d422ce2eSmrg am_cv_$1_dependencies_compiler_type=none 292d422ce2eSmrgfi 293d422ce2eSmrg]) 294d422ce2eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295d422ce2eSmrgAM_CONDITIONAL([am__fastdep$1], [ 296d422ce2eSmrg test "x$enable_dependency_tracking" != xno \ 297d422ce2eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298f3561b8bSmrg]) 299f3561b8bSmrg 300f3561b8bSmrg 301d422ce2eSmrg# AM_SET_DEPDIR 302d422ce2eSmrg# ------------- 303d422ce2eSmrg# Choose a directory name for dependency files. 304d422ce2eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305d422ce2eSmrgAC_DEFUN([AM_SET_DEPDIR], 306d422ce2eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307d422ce2eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308d422ce2eSmrg]) 309bd304fc0Smrg 310f3561b8bSmrg 311d422ce2eSmrg# AM_DEP_TRACK 312d422ce2eSmrg# ------------ 313d422ce2eSmrgAC_DEFUN([AM_DEP_TRACK], 314d422ce2eSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315d422ce2eSmrgAS_HELP_STRING( 316d422ce2eSmrg [--enable-dependency-tracking], 317d422ce2eSmrg [do not reject slow dependency extractors]) 318d422ce2eSmrgAS_HELP_STRING( 319d422ce2eSmrg [--disable-dependency-tracking], 320d422ce2eSmrg [speeds up one-time build])]) 321d422ce2eSmrgif test "x$enable_dependency_tracking" != xno; then 322d422ce2eSmrg am_depcomp="$ac_aux_dir/depcomp" 323d422ce2eSmrg AMDEPBACKSLASH='\' 324d422ce2eSmrg am__nodep='_no' 325f3561b8bSmrgfi 326d422ce2eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327d422ce2eSmrgAC_SUBST([AMDEPBACKSLASH])dnl 328d422ce2eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329d422ce2eSmrgAC_SUBST([am__nodep])dnl 330d422ce2eSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331f3561b8bSmrg]) 332f3561b8bSmrg 333d422ce2eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334fc5a983dSmrg 335d422ce2eSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336d422ce2eSmrg# 337d422ce2eSmrg# This file is free software; the Free Software Foundation 338d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 339d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 340fc5a983dSmrg 341d422ce2eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342d422ce2eSmrg# ------------------------------ 343d422ce2eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344d422ce2eSmrg[{ 345d422ce2eSmrg # Older Autoconf quotes --file arguments for eval, but not when files 346d422ce2eSmrg # are listed without --file. Let's play safe and only enable the eval 347d422ce2eSmrg # if we detect the quoting. 348d422ce2eSmrg # TODO: see whether this extra hack can be removed once we start 349d422ce2eSmrg # requiring Autoconf 2.70 or later. 350d422ce2eSmrg AS_CASE([$CONFIG_FILES], 351d422ce2eSmrg [*\'*], [eval set x "$CONFIG_FILES"], 352d422ce2eSmrg [*], [set x $CONFIG_FILES]) 353d422ce2eSmrg shift 354d422ce2eSmrg # Used to flag and report bootstrapping failures. 355d422ce2eSmrg am_rc=0 356d422ce2eSmrg for am_mf 357d422ce2eSmrg do 358d422ce2eSmrg # Strip MF so we end up with the name of the file. 359d422ce2eSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360d422ce2eSmrg # Check whether this is an Automake generated Makefile which includes 361d422ce2eSmrg # dependency-tracking related rules and includes. 362d422ce2eSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 363d422ce2eSmrg # limit of 2048, but all sed's we know have understand at least 4000. 364d422ce2eSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365d422ce2eSmrg || continue 366d422ce2eSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367d422ce2eSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 368d422ce2eSmrg AM_RUN_LOG([cd "$am_dirpart" \ 369d422ce2eSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370d422ce2eSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 371d422ce2eSmrg done 372d422ce2eSmrg if test $am_rc -ne 0; then 373d422ce2eSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374d422ce2eSmrg for automatic dependency tracking. If GNU make was not used, consider 375d422ce2eSmrg re-running the configure script with MAKE="gmake" (or whatever is 376d422ce2eSmrg necessary). You can also try re-running configure with the 377d422ce2eSmrg '--disable-dependency-tracking' option to at least be able to build 378d422ce2eSmrg the package (albeit without support for automatic dependency tracking).]) 379fc5a983dSmrg fi 380d422ce2eSmrg AS_UNSET([am_dirpart]) 381d422ce2eSmrg AS_UNSET([am_filepart]) 382d422ce2eSmrg AS_UNSET([am_mf]) 383d422ce2eSmrg AS_UNSET([am_rc]) 384d422ce2eSmrg rm -f conftest-deps.mk 385d422ce2eSmrg} 386d422ce2eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387fc5a983dSmrg 388fc5a983dSmrg 389d422ce2eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390d422ce2eSmrg# ----------------------------- 391d422ce2eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 392d422ce2eSmrg# 393d422ce2eSmrg# This code is only required when automatic dependency tracking is enabled. 394d422ce2eSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395d422ce2eSmrg# order to bootstrap the dependency handling code. 396d422ce2eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397d422ce2eSmrg[AC_CONFIG_COMMANDS([depfiles], 398d422ce2eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399d422ce2eSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400fc5a983dSmrg 401d422ce2eSmrg# Do all the work for Automake. -*- Autoconf -*- 402fc5a983dSmrg 403d422ce2eSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404d422ce2eSmrg# 405d422ce2eSmrg# This file is free software; the Free Software Foundation 406d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 407d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 408fc5a983dSmrg 409d422ce2eSmrg# This macro actually does too much. Some checks are only needed if 410d422ce2eSmrg# your package does certain things. But this isn't really a big deal. 411fc5a983dSmrg 412d422ce2eSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413d422ce2eSmrgm4_define([AC_PROG_CC], 414d422ce2eSmrgm4_defn([AC_PROG_CC]) 415d422ce2eSmrg[_AM_PROG_CC_C_O 416d422ce2eSmrg]) 417fc5a983dSmrg 418d422ce2eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419d422ce2eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 420d422ce2eSmrg# ----------------------------------------------- 421d422ce2eSmrg# The call with PACKAGE and VERSION arguments is the old style 422d422ce2eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423d422ce2eSmrg# and VERSION should now be passed to AC_INIT and removed from 424d422ce2eSmrg# the call to AM_INIT_AUTOMAKE. 425d422ce2eSmrg# We support both call styles for the transition. After 426d422ce2eSmrg# the next Automake release, Autoconf can make the AC_INIT 427d422ce2eSmrg# arguments mandatory, and then we can depend on a new Autoconf 428d422ce2eSmrg# release and drop the old call support. 429d422ce2eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430d422ce2eSmrg[AC_PREREQ([2.65])dnl 431d422ce2eSmrgm4_ifdef([_$0_ALREADY_INIT], 432d422ce2eSmrg [m4_fatal([$0 expanded multiple times 433d422ce2eSmrg]m4_defn([_$0_ALREADY_INIT]))], 434d422ce2eSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435d422ce2eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436d422ce2eSmrgdnl the ones we care about. 437d422ce2eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438d422ce2eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439d422ce2eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440d422ce2eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441d422ce2eSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442d422ce2eSmrg # is not polluted with repeated "-I." 443d422ce2eSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444d422ce2eSmrg # test to see if srcdir already configured 445d422ce2eSmrg if test -f $srcdir/config.status; then 446d422ce2eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447d422ce2eSmrg fi 448d422ce2eSmrgfi 449bd304fc0Smrg 450d422ce2eSmrg# test whether we have cygpath 451d422ce2eSmrgif test -z "$CYGPATH_W"; then 452d422ce2eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 453d422ce2eSmrg CYGPATH_W='cygpath -w' 454d422ce2eSmrg else 455d422ce2eSmrg CYGPATH_W=echo 456d422ce2eSmrg fi 457d422ce2eSmrgfi 458d422ce2eSmrgAC_SUBST([CYGPATH_W]) 459bd304fc0Smrg 460d422ce2eSmrg# Define the identity of the package. 461d422ce2eSmrgdnl Distinguish between old-style and new-style calls. 462d422ce2eSmrgm4_ifval([$2], 463d422ce2eSmrg[AC_DIAGNOSE([obsolete], 464d422ce2eSmrg [$0: two- and three-arguments forms are deprecated.]) 465d422ce2eSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466d422ce2eSmrg AC_SUBST([PACKAGE], [$1])dnl 467d422ce2eSmrg AC_SUBST([VERSION], [$2])], 468d422ce2eSmrg[_AM_SET_OPTIONS([$1])dnl 469d422ce2eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470d422ce2eSmrgm4_if( 471d422ce2eSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472d422ce2eSmrg [ok:ok],, 473d422ce2eSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474d422ce2eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475d422ce2eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476bd304fc0Smrg 477d422ce2eSmrg_AM_IF_OPTION([no-define],, 478d422ce2eSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479d422ce2eSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480bd304fc0Smrg 481d422ce2eSmrg# Some tools Automake needs. 482d422ce2eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483d422ce2eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484d422ce2eSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485d422ce2eSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486d422ce2eSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487d422ce2eSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488d422ce2eSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489d422ce2eSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490d422ce2eSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491d422ce2eSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492d422ce2eSmrg# For better backward compatibility. To be removed once Automake 1.9.x 493d422ce2eSmrg# dies out for good. For more background, see: 494d422ce2eSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495d422ce2eSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496d422ce2eSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497d422ce2eSmrg# We need awk for the "check" target (and possibly the TAP driver). The 498d422ce2eSmrg# system "awk" is bad on some platforms. 499d422ce2eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 500d422ce2eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501d422ce2eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502d422ce2eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503d422ce2eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504d422ce2eSmrg [_AM_PROG_TAR([v7])])]) 505d422ce2eSmrg_AM_IF_OPTION([no-dependencies],, 506d422ce2eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507d422ce2eSmrg [_AM_DEPENDENCIES([CC])], 508d422ce2eSmrg [m4_define([AC_PROG_CC], 509d422ce2eSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511d422ce2eSmrg [_AM_DEPENDENCIES([CXX])], 512d422ce2eSmrg [m4_define([AC_PROG_CXX], 513d422ce2eSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515d422ce2eSmrg [_AM_DEPENDENCIES([OBJC])], 516d422ce2eSmrg [m4_define([AC_PROG_OBJC], 517d422ce2eSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519d422ce2eSmrg [_AM_DEPENDENCIES([OBJCXX])], 520d422ce2eSmrg [m4_define([AC_PROG_OBJCXX], 521d422ce2eSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522bd304fc0Smrg]) 523d422ce2eSmrg# Variables for tags utilities; see am/tags.am 524d422ce2eSmrgif test -z "$CTAGS"; then 525d422ce2eSmrg CTAGS=ctags 526d422ce2eSmrgfi 527d422ce2eSmrgAC_SUBST([CTAGS]) 528d422ce2eSmrgif test -z "$ETAGS"; then 529d422ce2eSmrg ETAGS=etags 530d422ce2eSmrgfi 531d422ce2eSmrgAC_SUBST([ETAGS]) 532d422ce2eSmrgif test -z "$CSCOPE"; then 533d422ce2eSmrg CSCOPE=cscope 534d422ce2eSmrgfi 535d422ce2eSmrgAC_SUBST([CSCOPE]) 536bd304fc0Smrg 537d422ce2eSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538d422ce2eSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 539d422ce2eSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540d422ce2eSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541d422ce2eSmrgAC_CONFIG_COMMANDS_PRE(dnl 542d422ce2eSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543d422ce2eSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544f3561b8bSmrg 545d422ce2eSmrg# POSIX will say in a future version that running "rm -f" with no argument 546d422ce2eSmrg# is OK; and we want to be able to make that assumption in our Makefile 547d422ce2eSmrg# recipes. So use an aggressive probe to check that the usage we want is 548d422ce2eSmrg# actually supported "in the wild" to an acceptable degree. 549d422ce2eSmrg# See automake bug#10828. 550d422ce2eSmrg# To make any issue more visible, cause the running configure to be aborted 551d422ce2eSmrg# by default if the 'rm' program in use doesn't match our expectations; the 552d422ce2eSmrg# user can still override this though. 553d422ce2eSmrgif rm -f && rm -fr && rm -rf; then : OK; else 554d422ce2eSmrg cat >&2 <<'END' 555d422ce2eSmrgOops! 556f3561b8bSmrg 557d422ce2eSmrgYour 'rm' program seems unable to run without file operands specified 558d422ce2eSmrgon the command line, even when the '-f' option is present. This is contrary 559d422ce2eSmrgto the behaviour of most rm programs out there, and not conforming with 560d422ce2eSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561f3561b8bSmrg 562d422ce2eSmrgPlease tell bug-automake@gnu.org about your system, including the value 563d422ce2eSmrgof your $PATH and any error possibly output before this message. This 564d422ce2eSmrgcan help us improve future automake versions. 565f3561b8bSmrg 566d422ce2eSmrgEND 567d422ce2eSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568d422ce2eSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 569d422ce2eSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570d422ce2eSmrg echo >&2 571d422ce2eSmrg else 572d422ce2eSmrg cat >&2 <<'END' 573d422ce2eSmrgAborting the configuration process, to ensure you take notice of the issue. 574f3561b8bSmrg 575d422ce2eSmrgYou can download and install GNU coreutils to get an 'rm' implementation 576d422ce2eSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 577f3561b8bSmrg 578d422ce2eSmrgIf you want to complete the configuration process using your problematic 579d422ce2eSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580d422ce2eSmrgto "yes", and re-run configure. 581f3561b8bSmrg 582d422ce2eSmrgEND 583d422ce2eSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584d422ce2eSmrg fi 585d422ce2eSmrgfi 586d422ce2eSmrgdnl The trailing newline in this macro's definition is deliberate, for 587d422ce2eSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588d422ce2eSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589f3561b8bSmrg]) 590f3561b8bSmrg 591d422ce2eSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592d422ce2eSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593d422ce2eSmrgdnl mangled by Autoconf and run in a shell conditional statement. 594d422ce2eSmrgm4_define([_AC_COMPILER_EXEEXT], 595d422ce2eSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596f3561b8bSmrg 597d422ce2eSmrg# When config.status generates a header, we must update the stamp-h file. 598d422ce2eSmrg# This file resides in the same directory as the config header 599d422ce2eSmrg# that is generated. The stamp files are numbered to have different names. 600f3561b8bSmrg 601d422ce2eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602d422ce2eSmrg# loop where config.status creates the headers, so we can generate 603d422ce2eSmrg# our stamp files there. 604d422ce2eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605d422ce2eSmrg[# Compute $1's index in $config_headers. 606d422ce2eSmrg_am_arg=$1 607d422ce2eSmrg_am_stamp_count=1 608d422ce2eSmrgfor _am_header in $config_headers :; do 609d422ce2eSmrg case $_am_header in 610d422ce2eSmrg $_am_arg | $_am_arg:* ) 611d422ce2eSmrg break ;; 612d422ce2eSmrg * ) 613d422ce2eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614d422ce2eSmrg esac 615d422ce2eSmrgdone 616d422ce2eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617f3561b8bSmrg 618d422ce2eSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619d422ce2eSmrg# 620d422ce2eSmrg# This file is free software; the Free Software Foundation 621d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 622d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 623f3561b8bSmrg 624d422ce2eSmrg# AM_PROG_INSTALL_SH 625d422ce2eSmrg# ------------------ 626d422ce2eSmrg# Define $install_sh. 627d422ce2eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628d422ce2eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629d422ce2eSmrgif test x"${install_sh+set}" != xset; then 630d422ce2eSmrg case $am_aux_dir in 631d422ce2eSmrg *\ * | *\ *) 632d422ce2eSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633d422ce2eSmrg *) 634d422ce2eSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635d422ce2eSmrg esac 636d422ce2eSmrgfi 637d422ce2eSmrgAC_SUBST([install_sh])]) 638f3561b8bSmrg 639d422ce2eSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640d422ce2eSmrg# 641d422ce2eSmrg# This file is free software; the Free Software Foundation 642d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 643d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 644f3561b8bSmrg 645d422ce2eSmrg# Check whether the underlying file-system supports filenames 646d422ce2eSmrg# with a leading dot. For instance MS-DOS doesn't. 647d422ce2eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 648d422ce2eSmrg[rm -rf .tst 2>/dev/null 649d422ce2eSmrgmkdir .tst 2>/dev/null 650d422ce2eSmrgif test -d .tst; then 651d422ce2eSmrg am__leading_dot=. 652d422ce2eSmrgelse 653d422ce2eSmrg am__leading_dot=_ 654d422ce2eSmrgfi 655d422ce2eSmrgrmdir .tst 2>/dev/null 656d422ce2eSmrgAC_SUBST([am__leading_dot])]) 657f3561b8bSmrg 658d422ce2eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659f3561b8bSmrg 660d422ce2eSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661d422ce2eSmrg# 662d422ce2eSmrg# This file is free software; the Free Software Foundation 663d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 664d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 665f3561b8bSmrg 666d422ce2eSmrg# AM_MAKE_INCLUDE() 667d422ce2eSmrg# ----------------- 668d422ce2eSmrg# Check whether make has an 'include' directive that can support all 669d422ce2eSmrg# the idioms we need for our automatic dependency tracking code. 670d422ce2eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 671d422ce2eSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672d422ce2eSmrgcat > confinc.mk << 'END' 673d422ce2eSmrgam__doit: 674d422ce2eSmrg @echo this is the am__doit target >confinc.out 675d422ce2eSmrg.PHONY: am__doit 676d422ce2eSmrgEND 677d422ce2eSmrgam__include="#" 678d422ce2eSmrgam__quote= 679d422ce2eSmrg# BSD make does it like this. 680d422ce2eSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681d422ce2eSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682d422ce2eSmrgecho 'include confinc.mk # ignored' > confmf.GNU 683d422ce2eSmrg_am_result=no 684d422ce2eSmrgfor s in GNU BSD; do 685d422ce2eSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686d422ce2eSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687d422ce2eSmrg ['0:this is the am__doit target'], 688d422ce2eSmrg [AS_CASE([$s], 689d422ce2eSmrg [BSD], [am__include='.include' am__quote='"'], 690d422ce2eSmrg [am__include='include' am__quote=''])]) 691d422ce2eSmrg if test "$am__include" != "#"; then 692d422ce2eSmrg _am_result="yes ($s style)" 693d422ce2eSmrg break 694d422ce2eSmrg fi 695d422ce2eSmrgdone 696d422ce2eSmrgrm -f confinc.* confmf.* 697d422ce2eSmrgAC_MSG_RESULT([${_am_result}]) 698d422ce2eSmrgAC_SUBST([am__include])]) 699d422ce2eSmrgAC_SUBST([am__quote])]) 700f3561b8bSmrg 701d422ce2eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702f3561b8bSmrg 703d422ce2eSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704d422ce2eSmrg# 705d422ce2eSmrg# This file is free software; the Free Software Foundation 706d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 707d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 708f3561b8bSmrg 709d422ce2eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 710d422ce2eSmrg# ------------------------------ 711d422ce2eSmrgAC_DEFUN([AM_MISSING_PROG], 712d422ce2eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713d422ce2eSmrg$1=${$1-"${am_missing_run}$2"} 714d422ce2eSmrgAC_SUBST($1)]) 715d422ce2eSmrg 716d422ce2eSmrg# AM_MISSING_HAS_RUN 717d422ce2eSmrg# ------------------ 718d422ce2eSmrg# Define MISSING if not defined so far and test if it is modern enough. 719d422ce2eSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720d422ce2eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721d422ce2eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722d422ce2eSmrgAC_REQUIRE_AUX_FILE([missing])dnl 723d422ce2eSmrgif test x"${MISSING+set}" != xset; then 724d422ce2eSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725d422ce2eSmrgfi 726d422ce2eSmrg# Use eval to expand $SHELL 727d422ce2eSmrgif eval "$MISSING --is-lightweight"; then 728d422ce2eSmrg am_missing_run="$MISSING " 729d422ce2eSmrgelse 730d422ce2eSmrg am_missing_run= 731d422ce2eSmrg AC_MSG_WARN(['missing' script is too old or missing]) 732d422ce2eSmrgfi 733d422ce2eSmrg]) 734f3561b8bSmrg 735d422ce2eSmrg# Helper functions for option handling. -*- Autoconf -*- 736f3561b8bSmrg 737d422ce2eSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738d422ce2eSmrg# 739d422ce2eSmrg# This file is free software; the Free Software Foundation 740d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 741d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 742f3561b8bSmrg 743d422ce2eSmrg# _AM_MANGLE_OPTION(NAME) 744d422ce2eSmrg# ----------------------- 745d422ce2eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 746d422ce2eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747f3561b8bSmrg 748d422ce2eSmrg# _AM_SET_OPTION(NAME) 749d422ce2eSmrg# -------------------- 750d422ce2eSmrg# Set option NAME. Presently that only means defining a flag for this option. 751d422ce2eSmrgAC_DEFUN([_AM_SET_OPTION], 752d422ce2eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753f3561b8bSmrg 754d422ce2eSmrg# _AM_SET_OPTIONS(OPTIONS) 755d422ce2eSmrg# ------------------------ 756d422ce2eSmrg# OPTIONS is a space-separated list of Automake options. 757d422ce2eSmrgAC_DEFUN([_AM_SET_OPTIONS], 758d422ce2eSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759f3561b8bSmrg 760d422ce2eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761d422ce2eSmrg# ------------------------------------------- 762d422ce2eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763d422ce2eSmrgAC_DEFUN([_AM_IF_OPTION], 764d422ce2eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765f3561b8bSmrg 766d422ce2eSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767d422ce2eSmrg# 768d422ce2eSmrg# This file is free software; the Free Software Foundation 769d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 770d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 771f3561b8bSmrg 772d422ce2eSmrg# _AM_PROG_CC_C_O 773d422ce2eSmrg# --------------- 774d422ce2eSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775d422ce2eSmrg# to automatically call this. 776d422ce2eSmrgAC_DEFUN([_AM_PROG_CC_C_O], 777d422ce2eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778d422ce2eSmrgAC_REQUIRE_AUX_FILE([compile])dnl 779d422ce2eSmrgAC_LANG_PUSH([C])dnl 780d422ce2eSmrgAC_CACHE_CHECK( 781d422ce2eSmrg [whether $CC understands -c and -o together], 782d422ce2eSmrg [am_cv_prog_cc_c_o], 783d422ce2eSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784d422ce2eSmrg # Make sure it works both with $CC and with simple cc. 785d422ce2eSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 786d422ce2eSmrg # compilers refuse to overwrite an existing .o file with -o, 787d422ce2eSmrg # though they will create one. 788d422ce2eSmrg am_cv_prog_cc_c_o=yes 789d422ce2eSmrg for am_i in 1 2; do 790d422ce2eSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791d422ce2eSmrg && test -f conftest2.$ac_objext; then 792d422ce2eSmrg : OK 793d422ce2eSmrg else 794d422ce2eSmrg am_cv_prog_cc_c_o=no 795d422ce2eSmrg break 796d422ce2eSmrg fi 797d422ce2eSmrg done 798d422ce2eSmrg rm -f core conftest* 799d422ce2eSmrg unset am_i]) 800d422ce2eSmrgif test "$am_cv_prog_cc_c_o" != yes; then 801d422ce2eSmrg # Losing compiler, so override with the script. 802d422ce2eSmrg # FIXME: It is wrong to rewrite CC. 803d422ce2eSmrg # But if we don't then we get into trouble of one sort or another. 804d422ce2eSmrg # A longer-term fix would be to have automake use am__CC in this case, 805d422ce2eSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806d422ce2eSmrg CC="$am_aux_dir/compile $CC" 807d422ce2eSmrgfi 808d422ce2eSmrgAC_LANG_POP([C])]) 809f3561b8bSmrg 810d422ce2eSmrg# For backward compatibility. 811d422ce2eSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812f3561b8bSmrg 813d422ce2eSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814fc5a983dSmrg# 815d422ce2eSmrg# This file is free software; the Free Software Foundation 816d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 817d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 818f3561b8bSmrg 819d422ce2eSmrg# AM_RUN_LOG(COMMAND) 820d422ce2eSmrg# ------------------- 821d422ce2eSmrg# Run COMMAND, save the exit status in ac_status, and log it. 822d422ce2eSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823d422ce2eSmrgAC_DEFUN([AM_RUN_LOG], 824d422ce2eSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825d422ce2eSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826d422ce2eSmrg ac_status=$? 827d422ce2eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828d422ce2eSmrg (exit $ac_status); }]) 829f3561b8bSmrg 830d422ce2eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831f3561b8bSmrg 832d422ce2eSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833fc5a983dSmrg# 834d422ce2eSmrg# This file is free software; the Free Software Foundation 835d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 836d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 837fc5a983dSmrg 838d422ce2eSmrg# AM_SANITY_CHECK 839d422ce2eSmrg# --------------- 840d422ce2eSmrgAC_DEFUN([AM_SANITY_CHECK], 841d422ce2eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 842d422ce2eSmrg# Reject unsafe characters in $srcdir or the absolute working directory 843d422ce2eSmrg# name. Accept space and tab only in the latter. 844d422ce2eSmrgam_lf=' 845d422ce2eSmrg' 846d422ce2eSmrgcase `pwd` in 847d422ce2eSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848d422ce2eSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849d422ce2eSmrgesac 850d422ce2eSmrgcase $srcdir in 851d422ce2eSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852d422ce2eSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853d422ce2eSmrgesac 854fc5a983dSmrg 855d422ce2eSmrg# Do 'set' in a subshell so we don't clobber the current shell's 856d422ce2eSmrg# arguments. Must try -L first in case configure is actually a 857d422ce2eSmrg# symlink; some systems play weird games with the mod time of symlinks 858d422ce2eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 859d422ce2eSmrg# directory). 860d422ce2eSmrgif ( 861d422ce2eSmrg am_has_slept=no 862d422ce2eSmrg for am_try in 1 2; do 863d422ce2eSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 864d422ce2eSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865d422ce2eSmrg if test "$[*]" = "X"; then 866d422ce2eSmrg # -L didn't work. 867d422ce2eSmrg set X `ls -t "$srcdir/configure" conftest.file` 868d422ce2eSmrg fi 869d422ce2eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870d422ce2eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 871f3561b8bSmrg 872d422ce2eSmrg # If neither matched, then we have a broken ls. This can happen 873d422ce2eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874d422ce2eSmrg # broken ls alias from the environment. This has actually 875d422ce2eSmrg # happened. Such a system could not be considered "sane". 876d422ce2eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877d422ce2eSmrg alias in your environment]) 878d422ce2eSmrg fi 879d422ce2eSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880d422ce2eSmrg break 881d422ce2eSmrg fi 882d422ce2eSmrg # Just in case. 883d422ce2eSmrg sleep 1 884d422ce2eSmrg am_has_slept=yes 885d422ce2eSmrg done 886d422ce2eSmrg test "$[2]" = conftest.file 887d422ce2eSmrg ) 888d422ce2eSmrgthen 889d422ce2eSmrg # Ok. 890d422ce2eSmrg : 891d422ce2eSmrgelse 892d422ce2eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 893d422ce2eSmrgCheck your system clock]) 894d422ce2eSmrgfi 895d422ce2eSmrgAC_MSG_RESULT([yes]) 896d422ce2eSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897d422ce2eSmrg# generated files are strictly newer. 898d422ce2eSmrgam_sleep_pid= 899d422ce2eSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900d422ce2eSmrg ( sleep 1 ) & 901d422ce2eSmrg am_sleep_pid=$! 902d422ce2eSmrgfi 903d422ce2eSmrgAC_CONFIG_COMMANDS_PRE( 904d422ce2eSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905d422ce2eSmrg if test -n "$am_sleep_pid"; then 906d422ce2eSmrg # Hide warnings about reused PIDs. 907d422ce2eSmrg wait $am_sleep_pid 2>/dev/null 908d422ce2eSmrg fi 909d422ce2eSmrg AC_MSG_RESULT([done])]) 910d422ce2eSmrgrm -f conftest.file 911d422ce2eSmrg]) 912f3561b8bSmrg 913d422ce2eSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914d422ce2eSmrg# 915d422ce2eSmrg# This file is free software; the Free Software Foundation 916d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 917d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 918f3561b8bSmrg 919d422ce2eSmrg# AM_SILENT_RULES([DEFAULT]) 920d422ce2eSmrg# -------------------------- 921d422ce2eSmrg# Enable less verbose build rules; with the default set to DEFAULT 922d422ce2eSmrg# ("yes" being less verbose, "no" or empty being verbose). 923d422ce2eSmrgAC_DEFUN([AM_SILENT_RULES], 924d422ce2eSmrg[AC_ARG_ENABLE([silent-rules], [dnl 925d422ce2eSmrgAS_HELP_STRING( 926d422ce2eSmrg [--enable-silent-rules], 927d422ce2eSmrg [less verbose build output (undo: "make V=1")]) 928d422ce2eSmrgAS_HELP_STRING( 929d422ce2eSmrg [--disable-silent-rules], 930d422ce2eSmrg [verbose build output (undo: "make V=0")])dnl 931d422ce2eSmrg]) 932d422ce2eSmrgcase $enable_silent_rules in @%:@ ((( 933d422ce2eSmrg yes) AM_DEFAULT_VERBOSITY=0;; 934d422ce2eSmrg no) AM_DEFAULT_VERBOSITY=1;; 935d422ce2eSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936d422ce2eSmrgesac 937d422ce2eSmrgdnl 938d422ce2eSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939d422ce2eSmrgdnl do not support nested variable expansions. 940d422ce2eSmrgdnl See automake bug#9928 and bug#10237. 941d422ce2eSmrgam_make=${MAKE-make} 942d422ce2eSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943d422ce2eSmrg [am_cv_make_support_nested_variables], 944d422ce2eSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945d422ce2eSmrgBAR0=false 946d422ce2eSmrgBAR1=true 947d422ce2eSmrgV=1 948d422ce2eSmrgam__doit: 949d422ce2eSmrg @$(TRUE) 950d422ce2eSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951d422ce2eSmrg am_cv_make_support_nested_variables=yes 952d422ce2eSmrgelse 953d422ce2eSmrg am_cv_make_support_nested_variables=no 954d422ce2eSmrgfi]) 955d422ce2eSmrgif test $am_cv_make_support_nested_variables = yes; then 956d422ce2eSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957d422ce2eSmrg AM_V='$(V)' 958d422ce2eSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959d422ce2eSmrgelse 960d422ce2eSmrg AM_V=$AM_DEFAULT_VERBOSITY 961d422ce2eSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962d422ce2eSmrgfi 963d422ce2eSmrgAC_SUBST([AM_V])dnl 964d422ce2eSmrgAM_SUBST_NOTMAKE([AM_V])dnl 965d422ce2eSmrgAC_SUBST([AM_DEFAULT_V])dnl 966d422ce2eSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967d422ce2eSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968d422ce2eSmrgAM_BACKSLASH='\' 969d422ce2eSmrgAC_SUBST([AM_BACKSLASH])dnl 970d422ce2eSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971d422ce2eSmrg]) 972f3561b8bSmrg 973d422ce2eSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974d422ce2eSmrg# 975d422ce2eSmrg# This file is free software; the Free Software Foundation 976d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 977d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 978f3561b8bSmrg 979d422ce2eSmrg# AM_PROG_INSTALL_STRIP 980d422ce2eSmrg# --------------------- 981d422ce2eSmrg# One issue with vendor 'install' (even GNU) is that you can't 982d422ce2eSmrg# specify the program used to strip binaries. This is especially 983d422ce2eSmrg# annoying in cross-compiling environments, where the build's strip 984d422ce2eSmrg# is unlikely to handle the host's binaries. 985d422ce2eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986d422ce2eSmrg# always use install-sh in "make install-strip", and initialize 987d422ce2eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 988d422ce2eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989d422ce2eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990d422ce2eSmrg# Installed binaries are usually stripped using 'strip' when the user 991d422ce2eSmrg# run "make install-strip". However 'strip' might not be the right 992d422ce2eSmrg# tool to use in cross-compilation environments, therefore Automake 993d422ce2eSmrg# will honor the 'STRIP' environment variable to overrule this program. 994d422ce2eSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995d422ce2eSmrgif test "$cross_compiling" != no; then 996d422ce2eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 997d422ce2eSmrgfi 998d422ce2eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999d422ce2eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000f3561b8bSmrg 1001d422ce2eSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002d422ce2eSmrg# 1003d422ce2eSmrg# This file is free software; the Free Software Foundation 1004d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 1005d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 1006f3561b8bSmrg 1007d422ce2eSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008d422ce2eSmrg# --------------------------- 1009d422ce2eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010d422ce2eSmrg# This macro is traced by Automake. 1011d422ce2eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012f3561b8bSmrg 1013d422ce2eSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1014d422ce2eSmrg# -------------------------- 1015d422ce2eSmrg# Public sister of _AM_SUBST_NOTMAKE. 1016d422ce2eSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017f3561b8bSmrg 1018d422ce2eSmrg# Check how to create a tarball. -*- Autoconf -*- 1019bd304fc0Smrg 1020d422ce2eSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021d422ce2eSmrg# 1022d422ce2eSmrg# This file is free software; the Free Software Foundation 1023d422ce2eSmrg# gives unlimited permission to copy and/or distribute it, 1024d422ce2eSmrg# with or without modifications, as long as this notice is preserved. 1025f3561b8bSmrg 1026d422ce2eSmrg# _AM_PROG_TAR(FORMAT) 1027d422ce2eSmrg# -------------------- 1028d422ce2eSmrg# Check how to create a tarball in format FORMAT. 1029d422ce2eSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030d422ce2eSmrg# 1031d422ce2eSmrg# Substitute a variable $(am__tar) that is a command 1032d422ce2eSmrg# writing to stdout a FORMAT-tarball containing the directory 1033d422ce2eSmrg# $tardir. 1034d422ce2eSmrg# tardir=directory && $(am__tar) > result.tar 1035d422ce2eSmrg# 1036d422ce2eSmrg# Substitute a variable $(am__untar) that extract such 1037d422ce2eSmrg# a tarball read from stdin. 1038d422ce2eSmrg# $(am__untar) < result.tar 1039d422ce2eSmrg# 1040d422ce2eSmrgAC_DEFUN([_AM_PROG_TAR], 1041d422ce2eSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042d422ce2eSmrg# in the wild :-( We should find a proper way to deprecate it ... 1043d422ce2eSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044f3561b8bSmrg 1045d422ce2eSmrg# We'll loop over all known methods to create a tar archive until one works. 1046d422ce2eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047f3561b8bSmrg 1048d422ce2eSmrgm4_if([$1], [v7], 1049d422ce2eSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050f3561b8bSmrg 1051d422ce2eSmrg [m4_case([$1], 1052d422ce2eSmrg [ustar], 1053d422ce2eSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054d422ce2eSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055d422ce2eSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056d422ce2eSmrg # and bug#13588). 1057d422ce2eSmrg am_max_uid=2097151 # 2^21 - 1 1058d422ce2eSmrg am_max_gid=$am_max_uid 1059d422ce2eSmrg # The $UID and $GID variables are not portable, so we need to resort 1060d422ce2eSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061d422ce2eSmrg # below are definitely unexpected, so allow the users to see them 1062d422ce2eSmrg # (that is, avoid stderr redirection). 1063d422ce2eSmrg am_uid=`id -u || echo unknown` 1064d422ce2eSmrg am_gid=`id -g || echo unknown` 1065d422ce2eSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066d422ce2eSmrg if test $am_uid -le $am_max_uid; then 1067d422ce2eSmrg AC_MSG_RESULT([yes]) 1068d422ce2eSmrg else 1069d422ce2eSmrg AC_MSG_RESULT([no]) 1070d422ce2eSmrg _am_tools=none 1071d422ce2eSmrg fi 1072d422ce2eSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073d422ce2eSmrg if test $am_gid -le $am_max_gid; then 1074d422ce2eSmrg AC_MSG_RESULT([yes]) 1075d422ce2eSmrg else 1076d422ce2eSmrg AC_MSG_RESULT([no]) 1077d422ce2eSmrg _am_tools=none 1078d422ce2eSmrg fi], 1079f3561b8bSmrg 1080d422ce2eSmrg [pax], 1081d422ce2eSmrg [], 1082f3561b8bSmrg 1083d422ce2eSmrg [m4_fatal([Unknown tar format])]) 1084f3561b8bSmrg 1085d422ce2eSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1086f3561b8bSmrg 1087d422ce2eSmrg # Go ahead even if we have the value already cached. We do so because we 1088d422ce2eSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089d422ce2eSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090f3561b8bSmrg 1091d422ce2eSmrg for _am_tool in $_am_tools; do 1092d422ce2eSmrg case $_am_tool in 1093d422ce2eSmrg gnutar) 1094d422ce2eSmrg for _am_tar in tar gnutar gtar; do 1095d422ce2eSmrg AM_RUN_LOG([$_am_tar --version]) && break 1096d422ce2eSmrg done 1097d422ce2eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098d422ce2eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099d422ce2eSmrg am__untar="$_am_tar -xf -" 1100d422ce2eSmrg ;; 1101d422ce2eSmrg plaintar) 1102d422ce2eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103d422ce2eSmrg # ustar tarball either. 1104d422ce2eSmrg (tar --version) >/dev/null 2>&1 && continue 1105d422ce2eSmrg am__tar='tar chf - "$$tardir"' 1106d422ce2eSmrg am__tar_='tar chf - "$tardir"' 1107d422ce2eSmrg am__untar='tar xf -' 1108d422ce2eSmrg ;; 1109d422ce2eSmrg pax) 1110d422ce2eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1111d422ce2eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1112d422ce2eSmrg am__untar='pax -r' 1113d422ce2eSmrg ;; 1114d422ce2eSmrg cpio) 1115d422ce2eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116d422ce2eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117d422ce2eSmrg am__untar='cpio -i -H $1 -d' 1118d422ce2eSmrg ;; 1119d422ce2eSmrg none) 1120d422ce2eSmrg am__tar=false 1121d422ce2eSmrg am__tar_=false 1122d422ce2eSmrg am__untar=false 1123d422ce2eSmrg ;; 1124d422ce2eSmrg esac 1125f3561b8bSmrg 1126d422ce2eSmrg # If the value was cached, stop now. We just wanted to have am__tar 1127d422ce2eSmrg # and am__untar set. 1128d422ce2eSmrg test -n "${am_cv_prog_tar_$1}" && break 1129f3561b8bSmrg 1130d422ce2eSmrg # tar/untar a dummy directory, and stop if the command works. 1131d422ce2eSmrg rm -rf conftest.dir 1132d422ce2eSmrg mkdir conftest.dir 1133d422ce2eSmrg echo GrepMe > conftest.dir/file 1134d422ce2eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135d422ce2eSmrg rm -rf conftest.dir 1136d422ce2eSmrg if test -s conftest.tar; then 1137d422ce2eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138d422ce2eSmrg AM_RUN_LOG([cat conftest.dir/file]) 1139d422ce2eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140d422ce2eSmrg fi 1141d422ce2eSmrg done 1142d422ce2eSmrg rm -rf conftest.dir 1143f3561b8bSmrg 1144d422ce2eSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145d422ce2eSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146f3561b8bSmrg 1147d422ce2eSmrgAC_SUBST([am__tar]) 1148d422ce2eSmrgAC_SUBST([am__untar]) 1149d422ce2eSmrg]) # _AM_PROG_TAR 1150f3561b8bSmrg 1151d422ce2eSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152d422ce2eSmrgdnl serial 11 (pkg-config-0.29) 1153d422ce2eSmrgdnl 1154d422ce2eSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155d422ce2eSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156d422ce2eSmrgdnl 1157d422ce2eSmrgdnl This program is free software; you can redistribute it and/or modify 1158d422ce2eSmrgdnl it under the terms of the GNU General Public License as published by 1159d422ce2eSmrgdnl the Free Software Foundation; either version 2 of the License, or 1160d422ce2eSmrgdnl (at your option) any later version. 1161d422ce2eSmrgdnl 1162d422ce2eSmrgdnl This program is distributed in the hope that it will be useful, but 1163d422ce2eSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164d422ce2eSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165d422ce2eSmrgdnl General Public License for more details. 1166d422ce2eSmrgdnl 1167d422ce2eSmrgdnl You should have received a copy of the GNU General Public License 1168d422ce2eSmrgdnl along with this program; if not, write to the Free Software 1169d422ce2eSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170d422ce2eSmrgdnl 02111-1307, USA. 1171d422ce2eSmrgdnl 1172d422ce2eSmrgdnl As a special exception to the GNU General Public License, if you 1173d422ce2eSmrgdnl distribute this file as part of a program that contains a 1174d422ce2eSmrgdnl configuration script generated by Autoconf, you may include it under 1175d422ce2eSmrgdnl the same distribution terms that you use for the rest of that 1176d422ce2eSmrgdnl program. 1177d422ce2eSmrg 1178d422ce2eSmrgdnl PKG_PREREQ(MIN-VERSION) 1179d422ce2eSmrgdnl ----------------------- 1180d422ce2eSmrgdnl Since: 0.29 1181d422ce2eSmrgdnl 1182d422ce2eSmrgdnl Verify that the version of the pkg-config macros are at least 1183d422ce2eSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184d422ce2eSmrgdnl installed version of pkg-config, this checks the developer's version 1185d422ce2eSmrgdnl of pkg.m4 when generating configure. 1186d422ce2eSmrgdnl 1187d422ce2eSmrgdnl To ensure that this macro is defined, also add: 1188d422ce2eSmrgdnl m4_ifndef([PKG_PREREQ], 1189d422ce2eSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190d422ce2eSmrgdnl 1191d422ce2eSmrgdnl See the "Since" comment for each macro you use to see what version 1192d422ce2eSmrgdnl of the macros you require. 1193d422ce2eSmrgm4_defun([PKG_PREREQ], 1194d422ce2eSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195d422ce2eSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196d422ce2eSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197d422ce2eSmrg])dnl PKG_PREREQ 1198d422ce2eSmrg 1199d422ce2eSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200d422ce2eSmrgdnl ---------------------------------- 1201d422ce2eSmrgdnl Since: 0.16 1202d422ce2eSmrgdnl 1203d422ce2eSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204d422ce2eSmrgdnl first found in the path. Checks that the version of pkg-config found 1205d422ce2eSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206d422ce2eSmrgdnl used since that's the first version where most current features of 1207d422ce2eSmrgdnl pkg-config existed. 1208d422ce2eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209d422ce2eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210d422ce2eSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211d422ce2eSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212d422ce2eSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213d422ce2eSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214d422ce2eSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1215f3561b8bSmrg 1216d422ce2eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217d422ce2eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218d422ce2eSmrgfi 1219d422ce2eSmrgif test -n "$PKG_CONFIG"; then 1220d422ce2eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221d422ce2eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222d422ce2eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223d422ce2eSmrg AC_MSG_RESULT([yes]) 1224d422ce2eSmrg else 1225d422ce2eSmrg AC_MSG_RESULT([no]) 1226d422ce2eSmrg PKG_CONFIG="" 1227d422ce2eSmrg fi 1228d422ce2eSmrgfi[]dnl 1229d422ce2eSmrg])dnl PKG_PROG_PKG_CONFIG 1230fc5a983dSmrg 1231d422ce2eSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232d422ce2eSmrgdnl ------------------------------------------------------------------- 1233d422ce2eSmrgdnl Since: 0.18 1234d422ce2eSmrgdnl 1235d422ce2eSmrgdnl Check to see whether a particular set of modules exists. Similar to 1236d422ce2eSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237d422ce2eSmrgdnl 1238d422ce2eSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239d422ce2eSmrgdnl only at the first occurence in configure.ac, so if the first place 1240d422ce2eSmrgdnl it's called might be skipped (such as if it is within an "if", you 1241d422ce2eSmrgdnl have to call PKG_CHECK_EXISTS manually 1242d422ce2eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243d422ce2eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244d422ce2eSmrgif test -n "$PKG_CONFIG" && \ 1245d422ce2eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246d422ce2eSmrg m4_default([$2], [:]) 1247d422ce2eSmrgm4_ifvaln([$3], [else 1248d422ce2eSmrg $3])dnl 1249d422ce2eSmrgfi]) 1250fc5a983dSmrg 1251d422ce2eSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252d422ce2eSmrgdnl --------------------------------------------- 1253d422ce2eSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254d422ce2eSmrgdnl pkg_failed based on the result. 1255d422ce2eSmrgm4_define([_PKG_CONFIG], 1256d422ce2eSmrg[if test -n "$$1"; then 1257d422ce2eSmrg pkg_cv_[]$1="$$1" 1258d422ce2eSmrg elif test -n "$PKG_CONFIG"; then 1259d422ce2eSmrg PKG_CHECK_EXISTS([$3], 1260d422ce2eSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261d422ce2eSmrg test "x$?" != "x0" && pkg_failed=yes ], 1262d422ce2eSmrg [pkg_failed=yes]) 1263d422ce2eSmrg else 1264d422ce2eSmrg pkg_failed=untried 1265d422ce2eSmrgfi[]dnl 1266d422ce2eSmrg])dnl _PKG_CONFIG 1267fc5a983dSmrg 1268d422ce2eSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269d422ce2eSmrgdnl --------------------------- 1270d422ce2eSmrgdnl Internal check to see if pkg-config supports short errors. 1271d422ce2eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272d422ce2eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273d422ce2eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274d422ce2eSmrg _pkg_short_errors_supported=yes 1275d422ce2eSmrgelse 1276d422ce2eSmrg _pkg_short_errors_supported=no 1277d422ce2eSmrgfi[]dnl 1278d422ce2eSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 12796257f37dSmrg 12806257f37dSmrg 1281d422ce2eSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282d422ce2eSmrgdnl [ACTION-IF-NOT-FOUND]) 1283d422ce2eSmrgdnl -------------------------------------------------------------- 1284d422ce2eSmrgdnl Since: 0.4.0 1285d422ce2eSmrgdnl 1286d422ce2eSmrgdnl Note that if there is a possibility the first call to 1287d422ce2eSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288d422ce2eSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289d422ce2eSmrgAC_DEFUN([PKG_CHECK_MODULES], 1290d422ce2eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291d422ce2eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292d422ce2eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293f3561b8bSmrg 1294d422ce2eSmrgpkg_failed=no 1295d422ce2eSmrgAC_MSG_CHECKING([for $1]) 12966257f37dSmrg 1297d422ce2eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298d422ce2eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299f3561b8bSmrg 1300d422ce2eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301d422ce2eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 1302d422ce2eSmrgSee the pkg-config man page for more details.]) 13036257f37dSmrg 1304d422ce2eSmrgif test $pkg_failed = yes; then 1305d422ce2eSmrg AC_MSG_RESULT([no]) 1306d422ce2eSmrg _PKG_SHORT_ERRORS_SUPPORTED 1307d422ce2eSmrg if test $_pkg_short_errors_supported = yes; then 1308d422ce2eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309d422ce2eSmrg else 1310d422ce2eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311d422ce2eSmrg fi 1312d422ce2eSmrg # Put the nasty error message in config.log where it belongs 1313d422ce2eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 13146257f37dSmrg 1315d422ce2eSmrg m4_default([$4], [AC_MSG_ERROR( 1316d422ce2eSmrg[Package requirements ($2) were not met: 13176257f37dSmrg 1318d422ce2eSmrg$$1_PKG_ERRORS 13196257f37dSmrg 1320d422ce2eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321d422ce2eSmrginstalled software in a non-standard prefix. 13226257f37dSmrg 1323d422ce2eSmrg_PKG_TEXT])[]dnl 1324d422ce2eSmrg ]) 1325d422ce2eSmrgelif test $pkg_failed = untried; then 1326d422ce2eSmrg AC_MSG_RESULT([no]) 1327d422ce2eSmrg m4_default([$4], [AC_MSG_FAILURE( 1328d422ce2eSmrg[The pkg-config script could not be found or is too old. Make sure it 1329d422ce2eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330d422ce2eSmrgpath to pkg-config. 1331f3561b8bSmrg 1332d422ce2eSmrg_PKG_TEXT 1333fc5a983dSmrg 1334d422ce2eSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335d422ce2eSmrg ]) 1336d422ce2eSmrgelse 1337d422ce2eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338d422ce2eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339d422ce2eSmrg AC_MSG_RESULT([yes]) 1340d422ce2eSmrg $3 1341d422ce2eSmrgfi[]dnl 1342d422ce2eSmrg])dnl PKG_CHECK_MODULES 1343fc5a983dSmrg 1344f3561b8bSmrg 1345d422ce2eSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346d422ce2eSmrgdnl [ACTION-IF-NOT-FOUND]) 1347d422ce2eSmrgdnl --------------------------------------------------------------------- 1348d422ce2eSmrgdnl Since: 0.29 1349d422ce2eSmrgdnl 1350d422ce2eSmrgdnl Checks for existence of MODULES and gathers its build flags with 1351d422ce2eSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352d422ce2eSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353d422ce2eSmrgdnl 1354d422ce2eSmrgdnl Note that if there is a possibility the first call to 1355d422ce2eSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356d422ce2eSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357d422ce2eSmrgdnl configure.ac. 1358d422ce2eSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359d422ce2eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360d422ce2eSmrg_save_PKG_CONFIG=$PKG_CONFIG 1361d422ce2eSmrgPKG_CONFIG="$PKG_CONFIG --static" 1362d422ce2eSmrgPKG_CHECK_MODULES($@) 1363d422ce2eSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364d422ce2eSmrg])dnl PKG_CHECK_MODULES_STATIC 1365f3561b8bSmrg 1366f3561b8bSmrg 1367d422ce2eSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368d422ce2eSmrgdnl ------------------------- 1369d422ce2eSmrgdnl Since: 0.27 1370d422ce2eSmrgdnl 1371d422ce2eSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372d422ce2eSmrgdnl should install pkg-config .pc files. By default the directory is 1373d422ce2eSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374d422ce2eSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375d422ce2eSmrgdnl parameter. 1376d422ce2eSmrgAC_DEFUN([PKG_INSTALLDIR], 1377d422ce2eSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378d422ce2eSmrgm4_pushdef([pkg_description], 1379d422ce2eSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380d422ce2eSmrgAC_ARG_WITH([pkgconfigdir], 1381d422ce2eSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382d422ce2eSmrg [with_pkgconfigdir=]pkg_default) 1383d422ce2eSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384d422ce2eSmrgm4_popdef([pkg_default]) 1385d422ce2eSmrgm4_popdef([pkg_description]) 1386d422ce2eSmrg])dnl PKG_INSTALLDIR 1387f3561b8bSmrg 1388f3561b8bSmrg 1389d422ce2eSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390d422ce2eSmrgdnl -------------------------------- 1391d422ce2eSmrgdnl Since: 0.27 1392d422ce2eSmrgdnl 1393d422ce2eSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394d422ce2eSmrgdnl module should install arch-independent pkg-config .pc files. By 1395d422ce2eSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396d422ce2eSmrgdnl changed by passing DIRECTORY. The user can override through the 1397d422ce2eSmrgdnl --with-noarch-pkgconfigdir parameter. 1398d422ce2eSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399d422ce2eSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400d422ce2eSmrgm4_pushdef([pkg_description], 1401d422ce2eSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402d422ce2eSmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403d422ce2eSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404d422ce2eSmrg [with_noarch_pkgconfigdir=]pkg_default) 1405d422ce2eSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406d422ce2eSmrgm4_popdef([pkg_default]) 1407d422ce2eSmrgm4_popdef([pkg_description]) 1408d422ce2eSmrg])dnl PKG_NOARCH_INSTALLDIR 1409f3561b8bSmrg 1410f3561b8bSmrg 1411d422ce2eSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412d422ce2eSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413d422ce2eSmrgdnl ------------------------------------------- 1414d422ce2eSmrgdnl Since: 0.28 1415d422ce2eSmrgdnl 1416d422ce2eSmrgdnl Retrieves the value of the pkg-config variable for the given module. 1417d422ce2eSmrgAC_DEFUN([PKG_CHECK_VAR], 1418d422ce2eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419d422ce2eSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1420f3561b8bSmrg 1421d422ce2eSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422d422ce2eSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1423f3561b8bSmrg 1424d422ce2eSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425d422ce2eSmrg])dnl PKG_CHECK_VAR 1426f3561b8bSmrg 1427d422ce2eSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428d422ce2eSmrgdnl 1429dbcfc9ffSmrgdnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 1430d422ce2eSmrgdnl 1431d422ce2eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432d422ce2eSmrgdnl copy of this software and associated documentation files (the "Software"), 1433d422ce2eSmrgdnl to deal in the Software without restriction, including without limitation 1434d422ce2eSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435d422ce2eSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436d422ce2eSmrgdnl Software is furnished to do so, subject to the following conditions: 1437d422ce2eSmrgdnl 1438d422ce2eSmrgdnl The above copyright notice and this permission notice (including the next 1439d422ce2eSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1440d422ce2eSmrgdnl Software. 1441d422ce2eSmrgdnl 1442d422ce2eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443d422ce2eSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444d422ce2eSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445d422ce2eSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446d422ce2eSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447d422ce2eSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448d422ce2eSmrgdnl DEALINGS IN THE SOFTWARE. 1449f3561b8bSmrg 1450d422ce2eSmrg# XORG_MACROS_VERSION(required-version) 1451d422ce2eSmrg# ------------------------------------- 1452d422ce2eSmrg# Minimum version: 1.1.0 1453d422ce2eSmrg# 1454d422ce2eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1455d422ce2eSmrg# your configure.ac with the minimum required version, such as: 1456d422ce2eSmrg# XORG_MACROS_VERSION(1.1) 1457d422ce2eSmrg# 1458d422ce2eSmrg# To ensure that this macro is defined, also add: 1459d422ce2eSmrg# m4_ifndef([XORG_MACROS_VERSION], 1460d422ce2eSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461d422ce2eSmrg# 1462d422ce2eSmrg# 1463d422ce2eSmrg# See the "minimum version" comment for each macro you use to see what 1464d422ce2eSmrg# version you require. 1465d422ce2eSmrgm4_defun([XORG_MACROS_VERSION],[ 1466dbcfc9ffSmrgm4_define([vers_have], [1.20.0]) 1467d422ce2eSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468d422ce2eSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469d422ce2eSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470d422ce2eSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471d422ce2eSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472d422ce2eSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473d422ce2eSmrgm4_undefine([vers_have]) 1474d422ce2eSmrgm4_undefine([maj_have]) 1475d422ce2eSmrgm4_undefine([maj_needed]) 1476d422ce2eSmrg]) # XORG_MACROS_VERSION 1477f3561b8bSmrg 1478d422ce2eSmrg# XORG_PROG_RAWCPP() 1479d422ce2eSmrg# ------------------ 1480d422ce2eSmrg# Minimum version: 1.0.0 1481d422ce2eSmrg# 1482d422ce2eSmrg# Find cpp program and necessary flags for use in pre-processing text files 1483d422ce2eSmrg# such as man pages and config files 1484d422ce2eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485d422ce2eSmrgAC_REQUIRE([AC_PROG_CPP]) 1486d422ce2eSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487d422ce2eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488d422ce2eSmrg 1489d422ce2eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490d422ce2eSmrg# which is not the best choice for supporting other OS'es, but covers most 1491d422ce2eSmrg# of the ones we need for now. 1492d422ce2eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493d422ce2eSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494d422ce2eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495d422ce2eSmrg AC_MSG_RESULT([no]) 1496d422ce2eSmrgelse 1497d422ce2eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498d422ce2eSmrg RAWCPPFLAGS=-undef 1499d422ce2eSmrg AC_MSG_RESULT([yes]) 1500d422ce2eSmrg # under Cygwin unix is still defined even with -undef 1501d422ce2eSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502d422ce2eSmrg RAWCPPFLAGS="-undef -ansi" 1503d422ce2eSmrg AC_MSG_RESULT([yes, with -ansi]) 1504d422ce2eSmrg else 1505d422ce2eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506d422ce2eSmrg fi 1507bd304fc0Smrgfi 1508d422ce2eSmrgrm -f conftest.$ac_ext 1509bd304fc0Smrg 1510d422ce2eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511d422ce2eSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512dbcfc9ffSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 1513d422ce2eSmrg AC_MSG_RESULT([no]) 1514d422ce2eSmrgelse 1515dbcfc9ffSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 1516d422ce2eSmrg TRADITIONALCPPFLAGS="-traditional" 1517d422ce2eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518d422ce2eSmrg AC_MSG_RESULT([yes]) 1519d422ce2eSmrg else 1520d422ce2eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521d422ce2eSmrg fi 1522d422ce2eSmrgfi 1523d422ce2eSmrgrm -f conftest.$ac_ext 1524d422ce2eSmrgAC_SUBST(RAWCPPFLAGS) 1525d422ce2eSmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526d422ce2eSmrg]) # XORG_PROG_RAWCPP 1527bd304fc0Smrg 1528d422ce2eSmrg# XORG_MANPAGE_SECTIONS() 1529f3561b8bSmrg# ----------------------- 1530d422ce2eSmrg# Minimum version: 1.0.0 1531d422ce2eSmrg# 1532d422ce2eSmrg# Determine which sections man pages go in for the different man page types 1533d422ce2eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534d422ce2eSmrg# Not sure if there's any better way than just hardcoding by OS name. 1535d422ce2eSmrg# Override default settings by setting environment variables 1536d422ce2eSmrg# Added MAN_SUBSTS in version 1.8 1537d422ce2eSmrg# Added AC_PROG_SED in version 1.8 1538f3561b8bSmrg 1539d422ce2eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540d422ce2eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541d422ce2eSmrgAC_REQUIRE([AC_PROG_SED]) 1542f3561b8bSmrg 1543d422ce2eSmrgcase $host_os in 1544d422ce2eSmrg solaris*) 1545d422ce2eSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546d422ce2eSmrg # check for a man page file found in later versions that use 1547d422ce2eSmrg # traditional section numbers instead 1548d422ce2eSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549d422ce2eSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550d422ce2eSmrg ;; 1551d422ce2eSmrg *) SYSV_MAN_SECTIONS=false ;; 1552d422ce2eSmrgesac 1553f3561b8bSmrg 1554d422ce2eSmrgif test x$APP_MAN_SUFFIX = x ; then 1555d422ce2eSmrg APP_MAN_SUFFIX=1 1556d422ce2eSmrgfi 1557d422ce2eSmrgif test x$APP_MAN_DIR = x ; then 1558d422ce2eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559d422ce2eSmrgfi 1560f3561b8bSmrg 1561d422ce2eSmrgif test x$LIB_MAN_SUFFIX = x ; then 1562d422ce2eSmrg LIB_MAN_SUFFIX=3 1563d422ce2eSmrgfi 1564d422ce2eSmrgif test x$LIB_MAN_DIR = x ; then 1565d422ce2eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566d422ce2eSmrgfi 1567bd304fc0Smrg 1568d422ce2eSmrgif test x$FILE_MAN_SUFFIX = x ; then 1569d422ce2eSmrg case $SYSV_MAN_SECTIONS in 1570d422ce2eSmrg true) FILE_MAN_SUFFIX=4 ;; 1571d422ce2eSmrg *) FILE_MAN_SUFFIX=5 ;; 1572d422ce2eSmrg esac 1573d422ce2eSmrgfi 1574d422ce2eSmrgif test x$FILE_MAN_DIR = x ; then 1575d422ce2eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576d422ce2eSmrgfi 1577f3561b8bSmrg 1578d422ce2eSmrgif test x$MISC_MAN_SUFFIX = x ; then 1579d422ce2eSmrg case $SYSV_MAN_SECTIONS in 1580d422ce2eSmrg true) MISC_MAN_SUFFIX=5 ;; 1581d422ce2eSmrg *) MISC_MAN_SUFFIX=7 ;; 1582d422ce2eSmrg esac 1583d422ce2eSmrgfi 1584d422ce2eSmrgif test x$MISC_MAN_DIR = x ; then 1585d422ce2eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586d422ce2eSmrgfi 1587f3561b8bSmrg 1588d422ce2eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589d422ce2eSmrg case $SYSV_MAN_SECTIONS in 1590d422ce2eSmrg true) DRIVER_MAN_SUFFIX=7 ;; 1591d422ce2eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1592d422ce2eSmrg esac 1593d422ce2eSmrgfi 1594d422ce2eSmrgif test x$DRIVER_MAN_DIR = x ; then 1595d422ce2eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596d422ce2eSmrgfi 1597f3561b8bSmrg 1598d422ce2eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599d422ce2eSmrg case $SYSV_MAN_SECTIONS in 1600d422ce2eSmrg true) ADMIN_MAN_SUFFIX=1m ;; 1601d422ce2eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1602d422ce2eSmrg esac 1603d422ce2eSmrgfi 1604d422ce2eSmrgif test x$ADMIN_MAN_DIR = x ; then 1605d422ce2eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606d422ce2eSmrgfi 1607fc5a983dSmrg 1608f3561b8bSmrg 1609d422ce2eSmrgAC_SUBST([APP_MAN_SUFFIX]) 1610d422ce2eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611d422ce2eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612d422ce2eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613d422ce2eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614d422ce2eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615d422ce2eSmrgAC_SUBST([APP_MAN_DIR]) 1616d422ce2eSmrgAC_SUBST([LIB_MAN_DIR]) 1617d422ce2eSmrgAC_SUBST([FILE_MAN_DIR]) 1618d422ce2eSmrgAC_SUBST([MISC_MAN_DIR]) 1619d422ce2eSmrgAC_SUBST([DRIVER_MAN_DIR]) 1620d422ce2eSmrgAC_SUBST([ADMIN_MAN_DIR]) 1621fc5a983dSmrg 1622d422ce2eSmrgXORG_MAN_PAGE="X Version 11" 1623d422ce2eSmrgAC_SUBST([XORG_MAN_PAGE]) 1624d422ce2eSmrgMAN_SUBSTS="\ 1625d422ce2eSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626d422ce2eSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627d422ce2eSmrg -e 's|__xservername__|Xorg|g' \ 1628d422ce2eSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629d422ce2eSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1630d422ce2eSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631d422ce2eSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632d422ce2eSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633d422ce2eSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634d422ce2eSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635d422ce2eSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636d422ce2eSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637d422ce2eSmrgAC_SUBST([MAN_SUBSTS]) 1638fc5a983dSmrg 1639d422ce2eSmrg]) # XORG_MANPAGE_SECTIONS 1640fc5a983dSmrg 1641d422ce2eSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642fc5a983dSmrg# ------------------------ 1643d422ce2eSmrg# Minimum version: 1.7.0 1644d422ce2eSmrg# 1645d422ce2eSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646d422ce2eSmrg# provided by xorg-sgml-doctools, if installed. 1647d422ce2eSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648d422ce2eSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649d422ce2eSmrgXORG_SGML_PATH= 1650d422ce2eSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651d422ce2eSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652d422ce2eSmrg [m4_ifval([$1],[:], 1653d422ce2eSmrg [if test x"$cross_compiling" != x"yes" ; then 1654d422ce2eSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655d422ce2eSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656d422ce2eSmrg fi]) 1657bd304fc0Smrg ]) 1658f3561b8bSmrg 1659d422ce2eSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660d422ce2eSmrg# the path and the name of the doc stylesheet 1661d422ce2eSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1662d422ce2eSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663d422ce2eSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664d422ce2eSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665bd304fc0Smrgelse 1666d422ce2eSmrg AC_MSG_RESULT([no]) 1667bd304fc0Smrgfi 1668fc5a983dSmrg 1669d422ce2eSmrgAC_SUBST(XORG_SGML_PATH) 1670d422ce2eSmrgAC_SUBST(STYLESHEET_SRCDIR) 1671d422ce2eSmrgAC_SUBST(XSL_STYLESHEET) 1672d422ce2eSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673d422ce2eSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1674fc5a983dSmrg 1675d422ce2eSmrg# XORG_CHECK_LINUXDOC 1676f3561b8bSmrg# ------------------- 1677d422ce2eSmrg# Minimum version: 1.0.0 1678d422ce2eSmrg# 1679d422ce2eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1680d422ce2eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681d422ce2eSmrg# Whether or not the necessary tools and files are found can be checked 1682d422ce2eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683d422ce2eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684d422ce2eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685d422ce2eSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1686bd304fc0Smrg 1687d422ce2eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1688fc5a983dSmrg 1689d422ce2eSmrgAC_MSG_CHECKING([whether to build documentation]) 1690fc5a983dSmrg 1691d422ce2eSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692d422ce2eSmrg BUILDDOC=yes 1693d422ce2eSmrgelse 1694d422ce2eSmrg BUILDDOC=no 1695d422ce2eSmrgfi 1696bd304fc0Smrg 1697d422ce2eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1698d422ce2eSmrg 1699d422ce2eSmrgAC_MSG_RESULT([$BUILDDOC]) 1700d422ce2eSmrg 1701d422ce2eSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1702d422ce2eSmrg 1703d422ce2eSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704d422ce2eSmrg BUILDPDFDOC=yes 1705fc5a983dSmrgelse 1706d422ce2eSmrg BUILDPDFDOC=no 1707fc5a983dSmrgfi 1708fc5a983dSmrg 1709d422ce2eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1710fc5a983dSmrg 1711d422ce2eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1712fc5a983dSmrg 1713d422ce2eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714d422ce2eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715d422ce2eSmrgMAKE_PDF="$PS2PDF" 1716d422ce2eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1717fc5a983dSmrg 1718d422ce2eSmrgAC_SUBST(MAKE_TEXT) 1719d422ce2eSmrgAC_SUBST(MAKE_PS) 1720d422ce2eSmrgAC_SUBST(MAKE_PDF) 1721d422ce2eSmrgAC_SUBST(MAKE_HTML) 1722d422ce2eSmrg]) # XORG_CHECK_LINUXDOC 1723fc5a983dSmrg 1724d422ce2eSmrg# XORG_CHECK_DOCBOOK 1725d422ce2eSmrg# ------------------- 1726d422ce2eSmrg# Minimum version: 1.0.0 1727d422ce2eSmrg# 1728d422ce2eSmrg# Checks for the ability to build output formats from SGML DocBook source. 1729d422ce2eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730d422ce2eSmrg# indicates whether the necessary tools and files are found and, if set, 1731d422ce2eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732d422ce2eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733d422ce2eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1734fc5a983dSmrg 1735d422ce2eSmrgBUILDTXTDOC=no 1736d422ce2eSmrgBUILDPDFDOC=no 1737d422ce2eSmrgBUILDPSDOC=no 1738d422ce2eSmrgBUILDHTMLDOC=no 1739bd304fc0Smrg 1740d422ce2eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741d422ce2eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742d422ce2eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743d422ce2eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744bd304fc0Smrg 1745d422ce2eSmrgAC_MSG_CHECKING([whether to build text documentation]) 1746d422ce2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747d422ce2eSmrg test x$BUILD_TXTDOC != xno; then 1748d422ce2eSmrg BUILDTXTDOC=yes 1749d422ce2eSmrgfi 1750d422ce2eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751d422ce2eSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752bd304fc0Smrg 1753d422ce2eSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754d422ce2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755d422ce2eSmrg test x$BUILD_PDFDOC != xno; then 1756d422ce2eSmrg BUILDPDFDOC=yes 1757d422ce2eSmrgfi 1758d422ce2eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759d422ce2eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1760fc5a983dSmrg 1761d422ce2eSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762d422ce2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763d422ce2eSmrg test x$BUILD_PSDOC != xno; then 1764d422ce2eSmrg BUILDPSDOC=yes 1765d422ce2eSmrgfi 1766d422ce2eSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767d422ce2eSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768fc5a983dSmrg 1769d422ce2eSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770d422ce2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771d422ce2eSmrg test x$BUILD_HTMLDOC != xno; then 1772d422ce2eSmrg BUILDHTMLDOC=yes 1773d422ce2eSmrgfi 1774d422ce2eSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775d422ce2eSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1776f3561b8bSmrg 1777d422ce2eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778d422ce2eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779d422ce2eSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780d422ce2eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781f3561b8bSmrg 1782d422ce2eSmrgAC_SUBST(MAKE_TEXT) 1783d422ce2eSmrgAC_SUBST(MAKE_PS) 1784d422ce2eSmrgAC_SUBST(MAKE_PDF) 1785d422ce2eSmrgAC_SUBST(MAKE_HTML) 1786d422ce2eSmrg]) # XORG_CHECK_DOCBOOK 1787bd304fc0Smrg 1788d422ce2eSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789d422ce2eSmrg# ---------------- 1790d422ce2eSmrg# Minimum version: 1.5.0 1791d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1792d422ce2eSmrg# 1793d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 1794d422ce2eSmrg# not at the appropriate level. This macro enables a module to test for the 1795d422ce2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796dbcfc9ffSmrg# the --with-xmlto option, it allows maximum flexibility in making decisions 1797d422ce2eSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798d422ce2eSmrg# --with-xmlto assumes 'auto'. 1799d422ce2eSmrg# 1800d422ce2eSmrg# Interface to module: 1801d422ce2eSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802d422ce2eSmrg# XMLTO: returns the path of the xmlto program found 1803d422ce2eSmrg# returns the path set by the user in the environment 1804d422ce2eSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805d422ce2eSmrg# 'no' user instructs the module not to use xmlto 1806d422ce2eSmrg# 1807d422ce2eSmrg# Added in version 1.10.0 1808d422ce2eSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809d422ce2eSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1810d422ce2eSmrg# 1811d422ce2eSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812d422ce2eSmrg# 1813d422ce2eSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814d422ce2eSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 1816d422ce2eSmrgAC_ARG_WITH(xmlto, 1817d422ce2eSmrg AS_HELP_STRING([--with-xmlto], 1818d422ce2eSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819d422ce2eSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820d422ce2eSmrgm4_undefine([_defopt]) 1821bd304fc0Smrg 1822d422ce2eSmrgif test "x$use_xmlto" = x"auto"; then 1823d422ce2eSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1824d422ce2eSmrg if test "x$XMLTO" = "x"; then 1825d422ce2eSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826d422ce2eSmrg have_xmlto=no 1827d422ce2eSmrg else 1828d422ce2eSmrg have_xmlto=yes 1829d422ce2eSmrg fi 1830d422ce2eSmrgelif test "x$use_xmlto" = x"yes" ; then 1831d422ce2eSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1832d422ce2eSmrg if test "x$XMLTO" = "x"; then 1833d422ce2eSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834d422ce2eSmrg fi 1835d422ce2eSmrg have_xmlto=yes 1836d422ce2eSmrgelif test "x$use_xmlto" = x"no" ; then 1837d422ce2eSmrg if test "x$XMLTO" != "x"; then 1838d422ce2eSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839d422ce2eSmrg fi 1840d422ce2eSmrg have_xmlto=no 1841bd304fc0Smrgelse 1842d422ce2eSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1843bd304fc0Smrgfi 1844bd304fc0Smrg 1845d422ce2eSmrg# Test for a minimum version of xmlto, if provided. 1846d422ce2eSmrgm4_ifval([$1], 1847d422ce2eSmrg[if test "$have_xmlto" = yes; then 1848d422ce2eSmrg # scrape the xmlto version 1849d422ce2eSmrg AC_MSG_CHECKING([the xmlto version]) 1850d422ce2eSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851d422ce2eSmrg AC_MSG_RESULT([$xmlto_version]) 1852d422ce2eSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853d422ce2eSmrg [if test "x$use_xmlto" = xauto; then 1854d422ce2eSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855d422ce2eSmrg have_xmlto=no 1856d422ce2eSmrg else 1857d422ce2eSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858d422ce2eSmrg fi]) 1859d422ce2eSmrgfi]) 1860f3561b8bSmrg 1861d422ce2eSmrg# Test for the ability of xmlto to generate a text target 1862d422ce2eSmrg# 1863d422ce2eSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864d422ce2eSmrg# following test for empty XML docbook files. 1865d422ce2eSmrg# For compatibility reasons use the following empty XML docbook file and if 1866d422ce2eSmrg# it fails try it again with a non-empty XML file. 1867d422ce2eSmrghave_xmlto_text=no 1868d422ce2eSmrgcat > conftest.xml << "EOF" 1869d422ce2eSmrgEOF 1870d422ce2eSmrgAS_IF([test "$have_xmlto" = yes], 1871d422ce2eSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872d422ce2eSmrg [have_xmlto_text=yes], 1873d422ce2eSmrg [# Try it again with a non-empty XML file. 1874d422ce2eSmrg cat > conftest.xml << "EOF" 1875d422ce2eSmrg<x></x> 1876d422ce2eSmrgEOF 1877d422ce2eSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878d422ce2eSmrg [have_xmlto_text=yes], 1879d422ce2eSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880d422ce2eSmrgrm -f conftest.xml 1881d422ce2eSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882d422ce2eSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883d422ce2eSmrg]) # XORG_WITH_XMLTO 1884f3561b8bSmrg 1885d422ce2eSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886d422ce2eSmrg# -------------------------------------------- 1887d422ce2eSmrg# Minimum version: 1.12.0 1888d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1889d422ce2eSmrg# 1890d422ce2eSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891d422ce2eSmrg# XML-based language used for the transformation of XML documents. 1892d422ce2eSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893d422ce2eSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894d422ce2eSmrg# The XSLT processor is often used as a standalone tool for transformations. 1895d422ce2eSmrg# It should not be assumed that this tool is used only to work with documnetation. 1896d422ce2eSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897d422ce2eSmrg# 1898d422ce2eSmrg# Interface to module: 1899d422ce2eSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900d422ce2eSmrg# XSLTPROC: returns the path of the xsltproc program found 1901d422ce2eSmrg# returns the path set by the user in the environment 1902d422ce2eSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903d422ce2eSmrg# 'no' user instructs the module not to use xsltproc 1904d422ce2eSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905d422ce2eSmrg# 1906d422ce2eSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907d422ce2eSmrg# 1908d422ce2eSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909d422ce2eSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910d422ce2eSmrg# Preserves the interface, should it be implemented later 1911d422ce2eSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 1913d422ce2eSmrgAC_ARG_WITH(xsltproc, 1914d422ce2eSmrg AS_HELP_STRING([--with-xsltproc], 1915d422ce2eSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916d422ce2eSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917d422ce2eSmrgm4_undefine([_defopt]) 1918f3561b8bSmrg 1919d422ce2eSmrgif test "x$use_xsltproc" = x"auto"; then 1920d422ce2eSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921d422ce2eSmrg if test "x$XSLTPROC" = "x"; then 1922d422ce2eSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923d422ce2eSmrg have_xsltproc=no 1924d422ce2eSmrg else 1925d422ce2eSmrg have_xsltproc=yes 1926d422ce2eSmrg fi 1927d422ce2eSmrgelif test "x$use_xsltproc" = x"yes" ; then 1928d422ce2eSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929d422ce2eSmrg if test "x$XSLTPROC" = "x"; then 1930d422ce2eSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931d422ce2eSmrg fi 1932d422ce2eSmrg have_xsltproc=yes 1933d422ce2eSmrgelif test "x$use_xsltproc" = x"no" ; then 1934d422ce2eSmrg if test "x$XSLTPROC" != "x"; then 1935d422ce2eSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936d422ce2eSmrg fi 1937d422ce2eSmrg have_xsltproc=no 1938d422ce2eSmrgelse 1939d422ce2eSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1940f3561b8bSmrgfi 1941bd304fc0Smrg 1942d422ce2eSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943d422ce2eSmrg]) # XORG_WITH_XSLTPROC 1944fc5a983dSmrg 1945d422ce2eSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946d422ce2eSmrg# ---------------------------------------- 1947d422ce2eSmrg# Minimum version: 1.15.0 1948d422ce2eSmrg# 1949d422ce2eSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950d422ce2eSmrg# scanning arbitrary text files, extracting information from those text files, 1951d422ce2eSmrg# and printing reports based on that information. 1952d422ce2eSmrg# 1953d422ce2eSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954d422ce2eSmrg# 1955d422ce2eSmrg# Interface to module: 1956d422ce2eSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957d422ce2eSmrg# PERL: returns the path of the perl program found 1958d422ce2eSmrg# returns the path set by the user in the environment 1959d422ce2eSmrg# --with-perl: 'yes' user instructs the module to use perl 1960d422ce2eSmrg# 'no' user instructs the module not to use perl 1961d422ce2eSmrg# have_perl: returns yes if perl found in PATH or no 1962d422ce2eSmrg# 1963d422ce2eSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964d422ce2eSmrg# 1965d422ce2eSmrgAC_DEFUN([XORG_WITH_PERL],[ 1966d422ce2eSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967d422ce2eSmrg# Preserves the interface, should it be implemented later 1968d422ce2eSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 1970d422ce2eSmrgAC_ARG_WITH(perl, 1971d422ce2eSmrg AS_HELP_STRING([--with-perl], 1972d422ce2eSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973d422ce2eSmrg [use_perl=$withval], [use_perl=]_defopt) 1974d422ce2eSmrgm4_undefine([_defopt]) 1975fc5a983dSmrg 1976d422ce2eSmrgif test "x$use_perl" = x"auto"; then 1977d422ce2eSmrg AC_PATH_PROG([PERL], [perl]) 1978d422ce2eSmrg if test "x$PERL" = "x"; then 1979d422ce2eSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980d422ce2eSmrg have_perl=no 1981d422ce2eSmrg else 1982d422ce2eSmrg have_perl=yes 1983fc5a983dSmrg fi 1984d422ce2eSmrgelif test "x$use_perl" = x"yes" ; then 1985d422ce2eSmrg AC_PATH_PROG([PERL], [perl]) 1986d422ce2eSmrg if test "x$PERL" = "x"; then 1987d422ce2eSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988d422ce2eSmrg fi 1989d422ce2eSmrg have_perl=yes 1990d422ce2eSmrgelif test "x$use_perl" = x"no" ; then 1991d422ce2eSmrg if test "x$PERL" != "x"; then 1992d422ce2eSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993d422ce2eSmrg fi 1994d422ce2eSmrg have_perl=no 1995fc5a983dSmrgelse 1996d422ce2eSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1997fc5a983dSmrgfi 1998fc5a983dSmrg 1999d422ce2eSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000d422ce2eSmrg]) # XORG_WITH_PERL 2001fc5a983dSmrg 2002d422ce2eSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003d422ce2eSmrg# ---------------- 2004d422ce2eSmrg# Minimum version: 1.5.0 2005d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2006d422ce2eSmrg# 2007d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 2008d422ce2eSmrg# not at the appropriate level. This macro enables a module to test for the 2009d422ce2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010dbcfc9ffSmrg# the --with-asciidoc option, it allows maximum flexibility in making decisions 2011d422ce2eSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012d422ce2eSmrg# --with-asciidoc assumes 'auto'. 2013d422ce2eSmrg# 2014d422ce2eSmrg# Interface to module: 2015d422ce2eSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016d422ce2eSmrg# ASCIIDOC: returns the path of the asciidoc program found 2017d422ce2eSmrg# returns the path set by the user in the environment 2018d422ce2eSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019d422ce2eSmrg# 'no' user instructs the module not to use asciidoc 2020d422ce2eSmrg# 2021d422ce2eSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022d422ce2eSmrg# 2023d422ce2eSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024d422ce2eSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 2026d422ce2eSmrgAC_ARG_WITH(asciidoc, 2027d422ce2eSmrg AS_HELP_STRING([--with-asciidoc], 2028d422ce2eSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029d422ce2eSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030d422ce2eSmrgm4_undefine([_defopt]) 2031f3561b8bSmrg 2032d422ce2eSmrgif test "x$use_asciidoc" = x"auto"; then 2033d422ce2eSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034d422ce2eSmrg if test "x$ASCIIDOC" = "x"; then 2035d422ce2eSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036d422ce2eSmrg have_asciidoc=no 2037d422ce2eSmrg else 2038d422ce2eSmrg have_asciidoc=yes 2039fc5a983dSmrg fi 2040d422ce2eSmrgelif test "x$use_asciidoc" = x"yes" ; then 2041d422ce2eSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042d422ce2eSmrg if test "x$ASCIIDOC" = "x"; then 2043d422ce2eSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044d422ce2eSmrg fi 2045d422ce2eSmrg have_asciidoc=yes 2046d422ce2eSmrgelif test "x$use_asciidoc" = x"no" ; then 2047d422ce2eSmrg if test "x$ASCIIDOC" != "x"; then 2048d422ce2eSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049d422ce2eSmrg fi 2050d422ce2eSmrg have_asciidoc=no 2051fc5a983dSmrgelse 2052d422ce2eSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053fc5a983dSmrgfi 2054d422ce2eSmrgm4_ifval([$1], 2055d422ce2eSmrg[if test "$have_asciidoc" = yes; then 2056d422ce2eSmrg # scrape the asciidoc version 2057d422ce2eSmrg AC_MSG_CHECKING([the asciidoc version]) 2058d422ce2eSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059d422ce2eSmrg AC_MSG_RESULT([$asciidoc_version]) 2060d422ce2eSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061d422ce2eSmrg [if test "x$use_asciidoc" = xauto; then 2062d422ce2eSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063d422ce2eSmrg have_asciidoc=no 2064d422ce2eSmrg else 2065d422ce2eSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066d422ce2eSmrg fi]) 2067d422ce2eSmrgfi]) 2068d422ce2eSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069d422ce2eSmrg]) # XORG_WITH_ASCIIDOC 2070f3561b8bSmrg 2071d422ce2eSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072d422ce2eSmrg# ------------------------------------------- 2073d422ce2eSmrg# Minimum version: 1.5.0 2074d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2075d422ce2eSmrg# Minimum version for optional DOT checking: 1.18.0 2076d422ce2eSmrg# 2077d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 2078d422ce2eSmrg# not at the appropriate level. This macro enables a module to test for the 2079d422ce2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080dbcfc9ffSmrg# the --with-doxygen option, it allows maximum flexibility in making decisions 2081d422ce2eSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082d422ce2eSmrg# --with-doxygen assumes 'auto'. 2083d422ce2eSmrg# 2084d422ce2eSmrg# Interface to module: 2085d422ce2eSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086d422ce2eSmrg# DOXYGEN: returns the path of the doxygen program found 2087d422ce2eSmrg# returns the path set by the user in the environment 2088d422ce2eSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089d422ce2eSmrg# 'no' user instructs the module not to use doxygen 2090d422ce2eSmrg# 2091d422ce2eSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092d422ce2eSmrg# 2093d422ce2eSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094d422ce2eSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095d422ce2eSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 2097d422ce2eSmrgAC_ARG_WITH(doxygen, 2098d422ce2eSmrg AS_HELP_STRING([--with-doxygen], 2099d422ce2eSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100d422ce2eSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101d422ce2eSmrgm4_undefine([_defopt]) 2102fc5a983dSmrg 2103d422ce2eSmrgif test "x$use_doxygen" = x"auto"; then 2104d422ce2eSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105d422ce2eSmrg if test "x$DOXYGEN" = "x"; then 2106d422ce2eSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107d422ce2eSmrg have_doxygen=no 2108d422ce2eSmrg else 2109d422ce2eSmrg have_doxygen=yes 2110d422ce2eSmrg fi 2111d422ce2eSmrgelif test "x$use_doxygen" = x"yes" ; then 2112d422ce2eSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113d422ce2eSmrg if test "x$DOXYGEN" = "x"; then 2114d422ce2eSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115d422ce2eSmrg fi 2116d422ce2eSmrg have_doxygen=yes 2117d422ce2eSmrgelif test "x$use_doxygen" = x"no" ; then 2118d422ce2eSmrg if test "x$DOXYGEN" != "x"; then 2119d422ce2eSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120d422ce2eSmrg fi 2121d422ce2eSmrg have_doxygen=no 2122d422ce2eSmrgelse 2123d422ce2eSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124d422ce2eSmrgfi 2125d422ce2eSmrgm4_ifval([$1], 2126d422ce2eSmrg[if test "$have_doxygen" = yes; then 2127d422ce2eSmrg # scrape the doxygen version 2128d422ce2eSmrg AC_MSG_CHECKING([the doxygen version]) 2129d422ce2eSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130d422ce2eSmrg AC_MSG_RESULT([$doxygen_version]) 2131d422ce2eSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132d422ce2eSmrg [if test "x$use_doxygen" = xauto; then 2133d422ce2eSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134d422ce2eSmrg have_doxygen=no 2135d422ce2eSmrg else 2136d422ce2eSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137d422ce2eSmrg fi]) 2138d422ce2eSmrgfi]) 2139fc5a983dSmrg 2140d422ce2eSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141d422ce2eSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142d422ce2eSmrgdnl HAVE_DOT = @HAVE_DOT@ 2143d422ce2eSmrgHAVE_DOT=no 2144d422ce2eSmrgif test "x$have_doxygen" = "xyes"; then 2145d422ce2eSmrg AC_PATH_PROG([DOT], [dot]) 2146d422ce2eSmrg if test "x$DOT" != "x"; then 2147d422ce2eSmrg HAVE_DOT=yes 2148d422ce2eSmrg fi 2149d422ce2eSmrgfi 2150fc5a983dSmrg 2151d422ce2eSmrgAC_SUBST([HAVE_DOT]) 2152d422ce2eSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153d422ce2eSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154d422ce2eSmrg]) # XORG_WITH_DOXYGEN 2155fc5a983dSmrg 2156d422ce2eSmrg# XORG_WITH_GROFF([DEFAULT]) 2157d422ce2eSmrg# ---------------- 2158d422ce2eSmrg# Minimum version: 1.6.0 2159d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2160d422ce2eSmrg# 2161d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 2162d422ce2eSmrg# not at the appropriate level. This macro enables a module to test for the 2163d422ce2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164dbcfc9ffSmrg# the --with-groff option, it allows maximum flexibility in making decisions 2165d422ce2eSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166d422ce2eSmrg# --with-groff assumes 'auto'. 2167d422ce2eSmrg# 2168d422ce2eSmrg# Interface to module: 2169d422ce2eSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170d422ce2eSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171d422ce2eSmrg# HAVE_GROFF_MS: the -ms macros package 2172d422ce2eSmrg# GROFF: returns the path of the groff program found 2173d422ce2eSmrg# returns the path set by the user in the environment 2174d422ce2eSmrg# --with-groff: 'yes' user instructs the module to use groff 2175d422ce2eSmrg# 'no' user instructs the module not to use groff 2176d422ce2eSmrg# 2177d422ce2eSmrg# Added in version 1.9.0: 2178d422ce2eSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179d422ce2eSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180d422ce2eSmrg# psselect from the psutils package. 2181d422ce2eSmrg# the ghostcript package. Refer to the grohtml man pages 2182d422ce2eSmrg# 2183d422ce2eSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184d422ce2eSmrg# 2185d422ce2eSmrg# OS and distros often splits groff in a basic and full package, the former 2186d422ce2eSmrg# having the groff program and the later having devices, fonts and macros 2187d422ce2eSmrg# Checking for the groff executable is not enough. 2188d422ce2eSmrg# 2189d422ce2eSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190d422ce2eSmrg# unset HAVE_GROFF or GROFF env variables. 2191d422ce2eSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192d422ce2eSmrg# 2193d422ce2eSmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194d422ce2eSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195d422ce2eSmrgm4_define([_defopt], m4_default([$1], [auto])) 2196d422ce2eSmrgAC_ARG_WITH(groff, 2197d422ce2eSmrg AS_HELP_STRING([--with-groff], 2198d422ce2eSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199d422ce2eSmrg [use_groff=$withval], [use_groff=]_defopt) 2200d422ce2eSmrgm4_undefine([_defopt]) 2201bd304fc0Smrg 2202d422ce2eSmrgif test "x$use_groff" = x"auto"; then 2203d422ce2eSmrg AC_PATH_PROG([GROFF], [groff]) 2204d422ce2eSmrg if test "x$GROFF" = "x"; then 2205d422ce2eSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206d422ce2eSmrg have_groff=no 2207d422ce2eSmrg else 2208d422ce2eSmrg have_groff=yes 2209d422ce2eSmrg fi 2210d422ce2eSmrgelif test "x$use_groff" = x"yes" ; then 2211d422ce2eSmrg AC_PATH_PROG([GROFF], [groff]) 2212d422ce2eSmrg if test "x$GROFF" = "x"; then 2213d422ce2eSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214d422ce2eSmrg fi 2215d422ce2eSmrg have_groff=yes 2216d422ce2eSmrgelif test "x$use_groff" = x"no" ; then 2217d422ce2eSmrg if test "x$GROFF" != "x"; then 2218d422ce2eSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219d422ce2eSmrg fi 2220d422ce2eSmrg have_groff=no 2221d422ce2eSmrgelse 2222d422ce2eSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223d422ce2eSmrgfi 2224fc5a983dSmrg 2225d422ce2eSmrg# We have groff, test for the presence of the macro packages 2226d422ce2eSmrgif test "x$have_groff" = x"yes"; then 2227d422ce2eSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228d422ce2eSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229d422ce2eSmrg groff_ms_works=yes 2230fc5a983dSmrg else 2231d422ce2eSmrg groff_ms_works=no 2232fc5a983dSmrg fi 2233d422ce2eSmrg AC_MSG_RESULT([$groff_ms_works]) 2234d422ce2eSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235d422ce2eSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236d422ce2eSmrg groff_mm_works=yes 2237d422ce2eSmrg else 2238d422ce2eSmrg groff_mm_works=no 2239d422ce2eSmrg fi 2240d422ce2eSmrg AC_MSG_RESULT([$groff_mm_works]) 2241d422ce2eSmrgfi 2242fc5a983dSmrg 2243d422ce2eSmrg# We have groff, test for HTML dependencies, one command per package 2244d422ce2eSmrgif test "x$have_groff" = x"yes"; then 2245d422ce2eSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246d422ce2eSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247d422ce2eSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248d422ce2eSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249d422ce2eSmrg have_groff_html=yes 2250d422ce2eSmrg else 2251d422ce2eSmrg have_groff_html=no 2252d422ce2eSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253d422ce2eSmrg fi 2254d422ce2eSmrgfi 2255fc5a983dSmrg 2256d422ce2eSmrg# Set Automake conditionals for Makefiles 2257d422ce2eSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258d422ce2eSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259d422ce2eSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260d422ce2eSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261d422ce2eSmrg]) # XORG_WITH_GROFF 2262bd304fc0Smrg 2263d422ce2eSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264d422ce2eSmrg# --------------------------------------- 2265d422ce2eSmrg# Minimum version: 1.6.0 2266d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2267d422ce2eSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268d422ce2eSmrg# 2269d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 2270d422ce2eSmrg# not at the appropriate level. This macro enables a module to test for the 2271d422ce2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272dbcfc9ffSmrg# the --with-fop option, it allows maximum flexibility in making decisions 2273d422ce2eSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274d422ce2eSmrg# --with-fop assumes 'auto'. 2275d422ce2eSmrg# 2276d422ce2eSmrg# Interface to module: 2277d422ce2eSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278d422ce2eSmrg# FOP: returns the path of the fop program found 2279d422ce2eSmrg# returns the path set by the user in the environment 2280d422ce2eSmrg# --with-fop: 'yes' user instructs the module to use fop 2281d422ce2eSmrg# 'no' user instructs the module not to use fop 2282d422ce2eSmrg# 2283d422ce2eSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284d422ce2eSmrg# 2285d422ce2eSmrgAC_DEFUN([XORG_WITH_FOP],[ 2286d422ce2eSmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 2288d422ce2eSmrgAC_ARG_WITH(fop, 2289d422ce2eSmrg AS_HELP_STRING([--with-fop], 2290d422ce2eSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291d422ce2eSmrg [use_fop=$withval], [use_fop=]_defopt) 2292d422ce2eSmrgm4_undefine([_defopt]) 2293d422ce2eSmrg 2294d422ce2eSmrgif test "x$use_fop" = x"auto"; then 2295d422ce2eSmrg AC_PATH_PROG([FOP], [fop]) 2296d422ce2eSmrg if test "x$FOP" = "x"; then 2297d422ce2eSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298d422ce2eSmrg have_fop=no 2299d422ce2eSmrg else 2300d422ce2eSmrg have_fop=yes 2301d422ce2eSmrg fi 2302d422ce2eSmrgelif test "x$use_fop" = x"yes" ; then 2303d422ce2eSmrg AC_PATH_PROG([FOP], [fop]) 2304d422ce2eSmrg if test "x$FOP" = "x"; then 2305d422ce2eSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306d422ce2eSmrg fi 2307d422ce2eSmrg have_fop=yes 2308d422ce2eSmrgelif test "x$use_fop" = x"no" ; then 2309d422ce2eSmrg if test "x$FOP" != "x"; then 2310d422ce2eSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311d422ce2eSmrg fi 2312d422ce2eSmrg have_fop=no 2313fc5a983dSmrgelse 2314d422ce2eSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315fc5a983dSmrgfi 2316fc5a983dSmrg 2317d422ce2eSmrg# Test for a minimum version of fop, if provided. 2318d422ce2eSmrgm4_ifval([$1], 2319d422ce2eSmrg[if test "$have_fop" = yes; then 2320d422ce2eSmrg # scrape the fop version 2321d422ce2eSmrg AC_MSG_CHECKING([for fop minimum version]) 2322d422ce2eSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323d422ce2eSmrg AC_MSG_RESULT([$fop_version]) 2324d422ce2eSmrg AS_VERSION_COMPARE([$fop_version], [$1], 2325d422ce2eSmrg [if test "x$use_fop" = xauto; then 2326d422ce2eSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327d422ce2eSmrg have_fop=no 2328d422ce2eSmrg else 2329d422ce2eSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330d422ce2eSmrg fi]) 2331d422ce2eSmrgfi]) 2332d422ce2eSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333d422ce2eSmrg]) # XORG_WITH_FOP 2334d422ce2eSmrg 2335d422ce2eSmrg# XORG_WITH_M4([MIN-VERSION]) 2336d422ce2eSmrg# --------------------------- 2337d422ce2eSmrg# Minimum version: 1.19.0 2338d422ce2eSmrg# 2339d422ce2eSmrg# This macro attempts to locate an m4 macro processor which supports 2340d422ce2eSmrg# -I option and is only useful for modules relying on M4 in order to 2341d422ce2eSmrg# expand macros in source code files. 2342d422ce2eSmrg# 2343d422ce2eSmrg# Interface to module: 2344d422ce2eSmrg# M4: returns the path of the m4 program found 2345d422ce2eSmrg# returns the path set by the user in the environment 2346d422ce2eSmrg# 2347d422ce2eSmrgAC_DEFUN([XORG_WITH_M4], [ 2348d422ce2eSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349d422ce2eSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350d422ce2eSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351d422ce2eSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352d422ce2eSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353d422ce2eSmrg [$PATH:/usr/gnu/bin])]) 2354fc5a983dSmrg 2355d422ce2eSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356d422ce2eSmrg]) # XORG_WITH_M4 2357f3561b8bSmrg 2358d422ce2eSmrg# XORG_WITH_PS2PDF([DEFAULT]) 2359f3561b8bSmrg# ---------------- 2360d422ce2eSmrg# Minimum version: 1.6.0 2361d422ce2eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2362d422ce2eSmrg# 2363d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 2364d422ce2eSmrg# not at the appropriate level. This macro enables a module to test for the 2365d422ce2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366dbcfc9ffSmrg# the --with-ps2pdf option, it allows maximum flexibility in making decisions 2367d422ce2eSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368d422ce2eSmrg# --with-ps2pdf assumes 'auto'. 2369d422ce2eSmrg# 2370d422ce2eSmrg# Interface to module: 2371d422ce2eSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372d422ce2eSmrg# PS2PDF: returns the path of the ps2pdf program found 2373d422ce2eSmrg# returns the path set by the user in the environment 2374d422ce2eSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375d422ce2eSmrg# 'no' user instructs the module not to use ps2pdf 2376d422ce2eSmrg# 2377d422ce2eSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378d422ce2eSmrg# 2379d422ce2eSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380d422ce2eSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381d422ce2eSmrgm4_define([_defopt], m4_default([$1], [auto])) 2382d422ce2eSmrgAC_ARG_WITH(ps2pdf, 2383d422ce2eSmrg AS_HELP_STRING([--with-ps2pdf], 2384d422ce2eSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385d422ce2eSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386d422ce2eSmrgm4_undefine([_defopt]) 2387fc5a983dSmrg 2388d422ce2eSmrgif test "x$use_ps2pdf" = x"auto"; then 2389d422ce2eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390d422ce2eSmrg if test "x$PS2PDF" = "x"; then 2391d422ce2eSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392d422ce2eSmrg have_ps2pdf=no 2393d422ce2eSmrg else 2394d422ce2eSmrg have_ps2pdf=yes 2395d422ce2eSmrg fi 2396d422ce2eSmrgelif test "x$use_ps2pdf" = x"yes" ; then 2397d422ce2eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398d422ce2eSmrg if test "x$PS2PDF" = "x"; then 2399d422ce2eSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400d422ce2eSmrg fi 2401d422ce2eSmrg have_ps2pdf=yes 2402d422ce2eSmrgelif test "x$use_ps2pdf" = x"no" ; then 2403d422ce2eSmrg if test "x$PS2PDF" != "x"; then 2404d422ce2eSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405d422ce2eSmrg fi 2406d422ce2eSmrg have_ps2pdf=no 2407fc5a983dSmrgelse 2408d422ce2eSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409d422ce2eSmrgfi 2410d422ce2eSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411d422ce2eSmrg]) # XORG_WITH_PS2PDF 2412fc5a983dSmrg 2413d422ce2eSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414d422ce2eSmrg# ---------------- 2415d422ce2eSmrg# Minimum version: 1.6.0 2416d422ce2eSmrg# 2417d422ce2eSmrg# Documentation tools are not always available on all platforms and sometimes 2418d422ce2eSmrg# not at the appropriate level. This macro enables a builder to skip all 2419d422ce2eSmrg# documentation targets except traditional man pages. 2420d422ce2eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421dbcfc9ffSmrg# maximum flexibility in controlling documentation building. 2422d422ce2eSmrg# Refer to: 2423d422ce2eSmrg# XORG_WITH_XMLTO --with-xmlto 2424d422ce2eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425d422ce2eSmrg# XORG_WITH_DOXYGEN --with-doxygen 2426d422ce2eSmrg# XORG_WITH_FOP --with-fop 2427d422ce2eSmrg# XORG_WITH_GROFF --with-groff 2428d422ce2eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2429d422ce2eSmrg# 2430d422ce2eSmrg# Interface to module: 2431d422ce2eSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432d422ce2eSmrg# --enable-docs: 'yes' user instructs the module to generate docs 2433d422ce2eSmrg# 'no' user instructs the module not to generate docs 2434d422ce2eSmrg# parm1: specify the default value, yes or no. 2435d422ce2eSmrg# 2436d422ce2eSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437d422ce2eSmrgm4_define([docs_default], m4_default([$1], [yes])) 2438d422ce2eSmrgAC_ARG_ENABLE(docs, 2439d422ce2eSmrg AS_HELP_STRING([--enable-docs], 2440d422ce2eSmrg [Enable building the documentation (default: ]docs_default[)]), 2441d422ce2eSmrg [build_docs=$enableval], [build_docs=]docs_default) 2442d422ce2eSmrgm4_undefine([docs_default]) 2443d422ce2eSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444d422ce2eSmrgAC_MSG_CHECKING([whether to build documentation]) 2445d422ce2eSmrgAC_MSG_RESULT([$build_docs]) 2446d422ce2eSmrg]) # XORG_ENABLE_DOCS 2447fc5a983dSmrg 2448d422ce2eSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449d422ce2eSmrg# ---------------- 2450d422ce2eSmrg# Minimum version: 1.6.0 2451d422ce2eSmrg# 2452d422ce2eSmrg# This macro enables a builder to skip all developer documentation. 2453d422ce2eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454dbcfc9ffSmrg# maximum flexibility in controlling documentation building. 2455d422ce2eSmrg# Refer to: 2456d422ce2eSmrg# XORG_WITH_XMLTO --with-xmlto 2457d422ce2eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458d422ce2eSmrg# XORG_WITH_DOXYGEN --with-doxygen 2459d422ce2eSmrg# XORG_WITH_FOP --with-fop 2460d422ce2eSmrg# XORG_WITH_GROFF --with-groff 2461d422ce2eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2462d422ce2eSmrg# 2463d422ce2eSmrg# Interface to module: 2464d422ce2eSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465d422ce2eSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466d422ce2eSmrg# 'no' user instructs the module not to generate developer docs 2467d422ce2eSmrg# parm1: specify the default value, yes or no. 2468d422ce2eSmrg# 2469d422ce2eSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470d422ce2eSmrgm4_define([devel_default], m4_default([$1], [yes])) 2471d422ce2eSmrgAC_ARG_ENABLE(devel-docs, 2472d422ce2eSmrg AS_HELP_STRING([--enable-devel-docs], 2473d422ce2eSmrg [Enable building the developer documentation (default: ]devel_default[)]), 2474d422ce2eSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475d422ce2eSmrgm4_undefine([devel_default]) 2476d422ce2eSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477d422ce2eSmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478d422ce2eSmrgAC_MSG_RESULT([$build_devel_docs]) 2479d422ce2eSmrg]) # XORG_ENABLE_DEVEL_DOCS 2480fc5a983dSmrg 2481d422ce2eSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482d422ce2eSmrg# ---------------- 2483d422ce2eSmrg# Minimum version: 1.6.0 2484d422ce2eSmrg# 2485d422ce2eSmrg# This macro enables a builder to skip all functional specification targets. 2486d422ce2eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487dbcfc9ffSmrg# maximum flexibility in controlling documentation building. 2488d422ce2eSmrg# Refer to: 2489d422ce2eSmrg# XORG_WITH_XMLTO --with-xmlto 2490d422ce2eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491d422ce2eSmrg# XORG_WITH_DOXYGEN --with-doxygen 2492d422ce2eSmrg# XORG_WITH_FOP --with-fop 2493d422ce2eSmrg# XORG_WITH_GROFF --with-groff 2494d422ce2eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2495d422ce2eSmrg# 2496d422ce2eSmrg# Interface to module: 2497d422ce2eSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498d422ce2eSmrg# --enable-specs: 'yes' user instructs the module to generate specs 2499d422ce2eSmrg# 'no' user instructs the module not to generate specs 2500d422ce2eSmrg# parm1: specify the default value, yes or no. 2501d422ce2eSmrg# 2502d422ce2eSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503d422ce2eSmrgm4_define([spec_default], m4_default([$1], [yes])) 2504d422ce2eSmrgAC_ARG_ENABLE(specs, 2505d422ce2eSmrg AS_HELP_STRING([--enable-specs], 2506d422ce2eSmrg [Enable building the specs (default: ]spec_default[)]), 2507d422ce2eSmrg [build_specs=$enableval], [build_specs=]spec_default) 2508d422ce2eSmrgm4_undefine([spec_default]) 2509d422ce2eSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510d422ce2eSmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511d422ce2eSmrgAC_MSG_RESULT([$build_specs]) 2512d422ce2eSmrg]) # XORG_ENABLE_SPECS 2513bd304fc0Smrg 2514d422ce2eSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515d422ce2eSmrg# ---------------------------------------------- 2516d422ce2eSmrg# Minimum version: 1.13.0 2517d422ce2eSmrg# 2518d422ce2eSmrg# This macro enables a builder to enable/disable unit testing 2519d422ce2eSmrg# It makes no assumption about the test cases implementation 2520d422ce2eSmrg# Test cases may or may not use Automake "Support for test suites" 2521d422ce2eSmrg# They may or may not use the software utility library GLib 2522d422ce2eSmrg# 2523d422ce2eSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524d422ce2eSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525d422ce2eSmrg# The variable enable_unit_tests is used by other macros in this file. 2526d422ce2eSmrg# 2527d422ce2eSmrg# Interface to module: 2528d422ce2eSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529d422ce2eSmrg# enable_unit_tests: used in configure.ac for additional configuration 2530d422ce2eSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531d422ce2eSmrg# 'no' user instructs the module not to build tests 2532d422ce2eSmrg# parm1: specify the default value, yes or no. 2533d422ce2eSmrg# 2534d422ce2eSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535d422ce2eSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536d422ce2eSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537d422ce2eSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538d422ce2eSmrgm4_define([_defopt], m4_default([$1], [auto])) 2539d422ce2eSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540d422ce2eSmrg [Enable building unit test cases (default: ]_defopt[)]), 2541d422ce2eSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542d422ce2eSmrgm4_undefine([_defopt]) 2543d422ce2eSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544d422ce2eSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545d422ce2eSmrgAC_MSG_RESULT([$enable_unit_tests]) 2546d422ce2eSmrg]) # XORG_ENABLE_UNIT_TESTS 2547fc5a983dSmrg 2548d422ce2eSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549d422ce2eSmrg# ------------------------------------------------------ 2550d422ce2eSmrg# Minimum version: 1.17.0 2551d422ce2eSmrg# 2552d422ce2eSmrg# This macro enables a builder to enable/disable integration testing 2553d422ce2eSmrg# It makes no assumption about the test cases' implementation 2554d422ce2eSmrg# Test cases may or may not use Automake "Support for test suites" 2555d422ce2eSmrg# 2556d422ce2eSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557d422ce2eSmrg# usually requires less dependencies and may be built and run under less 2558d422ce2eSmrg# stringent environments than integration tests. 2559d422ce2eSmrg# 2560d422ce2eSmrg# Interface to module: 2561d422ce2eSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562d422ce2eSmrg# enable_integration_tests: used in configure.ac for additional configuration 2563d422ce2eSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564d422ce2eSmrg# 'no' user instructs the module not to build tests 2565d422ce2eSmrg# parm1: specify the default value, yes or no. 2566d422ce2eSmrg# 2567d422ce2eSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568d422ce2eSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569d422ce2eSmrgm4_define([_defopt], m4_default([$1], [auto])) 2570d422ce2eSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571d422ce2eSmrg [Enable building integration test cases (default: ]_defopt[)]), 2572d422ce2eSmrg [enable_integration_tests=$enableval], 2573d422ce2eSmrg [enable_integration_tests=]_defopt) 2574d422ce2eSmrgm4_undefine([_defopt]) 2575d422ce2eSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576d422ce2eSmrg [test "x$enable_integration_tests" != xno]) 2577d422ce2eSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578d422ce2eSmrgAC_MSG_RESULT([$enable_integration_tests]) 2579d422ce2eSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2580fc5a983dSmrg 2581d422ce2eSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582d422ce2eSmrg# ---------------------------------------- 2583d422ce2eSmrg# Minimum version: 1.13.0 2584d422ce2eSmrg# 2585d422ce2eSmrg# GLib is a library which provides advanced data structures and functions. 2586d422ce2eSmrg# This macro enables a module to test for the presence of Glib. 2587d422ce2eSmrg# 2588d422ce2eSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589d422ce2eSmrg# Otherwise the value of $enable_unit_tests is blank. 2590d422ce2eSmrg# 2591d422ce2eSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592d422ce2eSmrg# test support usually requires less dependencies and may be built and run under 2593d422ce2eSmrg# less stringent environments than integration tests. 2594d422ce2eSmrg# 2595d422ce2eSmrg# Interface to module: 2596d422ce2eSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597d422ce2eSmrg# with_glib: used in configure.ac to know if GLib has been found 2598d422ce2eSmrg# --with-glib: 'yes' user instructs the module to use glib 2599d422ce2eSmrg# 'no' user instructs the module not to use glib 2600d422ce2eSmrg# 2601d422ce2eSmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602d422ce2eSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603d422ce2eSmrgm4_define([_defopt], m4_default([$2], [auto])) 2604d422ce2eSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605d422ce2eSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606d422ce2eSmrg [with_glib=$withval], [with_glib=]_defopt) 2607d422ce2eSmrgm4_undefine([_defopt]) 2608d422ce2eSmrg 2609d422ce2eSmrghave_glib=no 2610d422ce2eSmrg# Do not probe GLib if user explicitly disabled unit testing 2611d422ce2eSmrgif test "x$enable_unit_tests" != x"no"; then 2612d422ce2eSmrg # Do not probe GLib if user explicitly disabled it 2613d422ce2eSmrg if test "x$with_glib" != x"no"; then 2614d422ce2eSmrg m4_ifval( 2615d422ce2eSmrg [$1], 2616d422ce2eSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617d422ce2eSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618d422ce2eSmrg ) 2619fc5a983dSmrg fi 2620fc5a983dSmrgfi 2621fc5a983dSmrg 2622d422ce2eSmrg# Not having GLib when unit testing has been explicitly requested is an error 2623d422ce2eSmrgif test "x$enable_unit_tests" = x"yes"; then 2624d422ce2eSmrg if test "x$have_glib" = x"no"; then 2625d422ce2eSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626d422ce2eSmrg fi 2627d422ce2eSmrgfi 2628fc5a983dSmrg 2629d422ce2eSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630d422ce2eSmrgif test "x$enable_unit_tests" = x"no"; then 2631d422ce2eSmrg if test "x$with_glib" = x"yes"; then 2632d422ce2eSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2633d422ce2eSmrg fi 2634d422ce2eSmrgfi 2635fc5a983dSmrg 2636d422ce2eSmrg# Not having GLib when it has been explicitly requested is an error 2637d422ce2eSmrgif test "x$with_glib" = x"yes"; then 2638d422ce2eSmrg if test "x$have_glib" = x"no"; then 2639d422ce2eSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640d422ce2eSmrg fi 2641d422ce2eSmrgfi 2642fc5a983dSmrg 2643d422ce2eSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644d422ce2eSmrg]) # XORG_WITH_GLIB 2645fc5a983dSmrg 2646d422ce2eSmrg# XORG_LD_WRAP([required|optional]) 2647d422ce2eSmrg# --------------------------------- 2648d422ce2eSmrg# Minimum version: 1.13.0 2649d422ce2eSmrg# 2650d422ce2eSmrg# Check if linker supports -wrap, passed via compiler flags 2651d422ce2eSmrg# 2652d422ce2eSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653d422ce2eSmrg# Otherwise the value of $enable_unit_tests is blank. 2654d422ce2eSmrg# 2655d422ce2eSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656d422ce2eSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657d422ce2eSmrg# available, an argument of "optional" allows use when some unit tests require 2658d422ce2eSmrg# ld -wrap and others do not. 2659d422ce2eSmrg# 2660d422ce2eSmrgAC_DEFUN([XORG_LD_WRAP],[ 2661d422ce2eSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662d422ce2eSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663d422ce2eSmrg void __wrap_exit(int status) { return; }], 2664d422ce2eSmrg [exit(0);])]) 2665d422ce2eSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666d422ce2eSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667d422ce2eSmrg if test "x$have_ld_wrap" = x"no"; then 2668d422ce2eSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669fc5a983dSmrg fi 2670d422ce2eSmrgfi 2671d422ce2eSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672d422ce2eSmrg# 2673d422ce2eSmrg]) # XORG_LD_WRAP 2674fc5a983dSmrg 2675d422ce2eSmrg# XORG_CHECK_LINKER_FLAGS 2676d422ce2eSmrg# ----------------------- 2677d422ce2eSmrg# SYNOPSIS 2678d422ce2eSmrg# 2679d422ce2eSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680d422ce2eSmrg# 2681d422ce2eSmrg# DESCRIPTION 2682d422ce2eSmrg# 2683d422ce2eSmrg# Check whether the given linker FLAGS work with the current language's 2684d422ce2eSmrg# linker, or whether they give an error. 2685d422ce2eSmrg# 2686d422ce2eSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687d422ce2eSmrg# success/failure. 2688d422ce2eSmrg# 2689d422ce2eSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2690d422ce2eSmrg# 2691d422ce2eSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692d422ce2eSmrg# 2693d422ce2eSmrg# LICENSE 2694d422ce2eSmrg# 2695d422ce2eSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696d422ce2eSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697d422ce2eSmrg# Copyright (c) 2009 Matteo Frigo 2698d422ce2eSmrg# 2699d422ce2eSmrg# This program is free software: you can redistribute it and/or modify it 2700d422ce2eSmrg# under the terms of the GNU General Public License as published by the 2701d422ce2eSmrg# Free Software Foundation, either version 3 of the License, or (at your 2702d422ce2eSmrg# option) any later version. 2703d422ce2eSmrg# 2704d422ce2eSmrg# This program is distributed in the hope that it will be useful, but 2705d422ce2eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706d422ce2eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707d422ce2eSmrg# Public License for more details. 2708d422ce2eSmrg# 2709d422ce2eSmrg# You should have received a copy of the GNU General Public License along 2710d422ce2eSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711d422ce2eSmrg# 2712d422ce2eSmrg# As a special exception, the respective Autoconf Macro's copyright owner 2713d422ce2eSmrg# gives unlimited permission to copy, distribute and modify the configure 2714d422ce2eSmrg# scripts that are the output of Autoconf when processing the Macro. You 2715d422ce2eSmrg# need not follow the terms of the GNU General Public License when using 2716d422ce2eSmrg# or distributing such scripts, even though portions of the text of the 2717d422ce2eSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718d422ce2eSmrg# all other use of the material that constitutes the Autoconf Macro. 2719d422ce2eSmrg# 2720d422ce2eSmrg# This special exception to the GPL applies to versions of the Autoconf 2721d422ce2eSmrg# Macro released by the Autoconf Archive. When you make and distribute a 2722d422ce2eSmrg# modified version of the Autoconf Macro, you may extend this special 2723d422ce2eSmrg# exception to the GPL to apply to your modified version as well.# 2724d422ce2eSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725d422ce2eSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726d422ce2eSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727d422ce2eSmrgAS_LITERAL_IF([$1], 2728d422ce2eSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729d422ce2eSmrg ax_save_FLAGS=$LDFLAGS 2730d422ce2eSmrg LDFLAGS="$1" 2731d422ce2eSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732d422ce2eSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733d422ce2eSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734d422ce2eSmrg LDFLAGS=$ax_save_FLAGS])], 2735d422ce2eSmrg [ax_save_FLAGS=$LDFLAGS 2736d422ce2eSmrg LDFLAGS="$1" 2737d422ce2eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738d422ce2eSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739d422ce2eSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740d422ce2eSmrg LDFLAGS=$ax_save_FLAGS]) 2741d422ce2eSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742d422ce2eSmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743d422ce2eSmrgif test "x$xorg_check_linker_flags" = xyes; then 2744d422ce2eSmrg m4_default([$2], :) 2745d422ce2eSmrgelse 2746d422ce2eSmrg m4_default([$3], :) 2747d422ce2eSmrgfi 2748d422ce2eSmrg]) # XORG_CHECK_LINKER_FLAGS 2749fc5a983dSmrg 2750d422ce2eSmrg# XORG_MEMORY_CHECK_FLAGS 2751d422ce2eSmrg# ----------------------- 2752d422ce2eSmrg# Minimum version: 1.16.0 2753d422ce2eSmrg# 2754d422ce2eSmrg# This macro attempts to find appropriate memory checking functionality 2755d422ce2eSmrg# for various platforms which unit testing code may use to catch various 2756d422ce2eSmrg# forms of memory allocation and access errors in testing. 2757d422ce2eSmrg# 2758d422ce2eSmrg# Interface to module: 2759d422ce2eSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760d422ce2eSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761d422ce2eSmrg# 2762d422ce2eSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763d422ce2eSmrg# 2764d422ce2eSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2765fc5a983dSmrg 2766d422ce2eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767d422ce2eSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768d422ce2eSmrg [Environment variables to enable memory checking in tests]) 2769fc5a983dSmrg 2770d422ce2eSmrg# Check for different types of support on different platforms 2771d422ce2eSmrgcase $host_os in 2772d422ce2eSmrg solaris*) 2773d422ce2eSmrg AC_CHECK_LIB([umem], [umem_alloc], 2774d422ce2eSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775d422ce2eSmrg ;; 2776d422ce2eSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777d422ce2eSmrg # both directly and inverted, so should not be 0 or 255. 2778d422ce2eSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2779d422ce2eSmrg ;; 2780d422ce2eSmrg darwin*) 2781d422ce2eSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782d422ce2eSmrg ;; 2783d422ce2eSmrg *bsd*) 2784d422ce2eSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785d422ce2eSmrg ;; 2786d422ce2eSmrgesac 2787fc5a983dSmrg 2788d422ce2eSmrg# User supplied flags override default flags 2789d422ce2eSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790d422ce2eSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2791fc5a983dSmrgfi 2792fc5a983dSmrg 2793d422ce2eSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794d422ce2eSmrg]) # XORG_WITH_LINT 2795f3561b8bSmrg 2796d422ce2eSmrg# XORG_CHECK_MALLOC_ZERO 2797d422ce2eSmrg# ---------------------- 2798d422ce2eSmrg# Minimum version: 1.0.0 2799d422ce2eSmrg# 2800d422ce2eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801d422ce2eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802d422ce2eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803d422ce2eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804d422ce2eSmrgAC_ARG_ENABLE(malloc0returnsnull, 2805d422ce2eSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806d422ce2eSmrg [malloc(0) returns NULL (default: auto)]), 2807d422ce2eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808d422ce2eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2809fc5a983dSmrg 2810d422ce2eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811d422ce2eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812d422ce2eSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813d422ce2eSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814d422ce2eSmrg#include <stdlib.h> 2815d422ce2eSmrg],[ 2816d422ce2eSmrg char *m0, *r0, *c0, *p; 2817d422ce2eSmrg m0 = malloc(0); 2818d422ce2eSmrg p = malloc(10); 2819d422ce2eSmrg r0 = realloc(p,0); 2820d422ce2eSmrg c0 = calloc(0,10); 2821d422ce2eSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822d422ce2eSmrg])], 2823d422ce2eSmrg [xorg_cv_malloc0_returns_null=yes], 2824d422ce2eSmrg [xorg_cv_malloc0_returns_null=no])]) 2825d422ce2eSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826d422ce2eSmrgfi 2827d422ce2eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2828fc5a983dSmrg 2829d422ce2eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830d422ce2eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831d422ce2eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832d422ce2eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2833fc5a983dSmrgelse 2834d422ce2eSmrg MALLOC_ZERO_CFLAGS="" 2835d422ce2eSmrg XMALLOC_ZERO_CFLAGS="" 2836d422ce2eSmrg XTMALLOC_ZERO_CFLAGS="" 2837fc5a983dSmrgfi 2838fc5a983dSmrg 2839d422ce2eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840d422ce2eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841d422ce2eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842d422ce2eSmrg]) # XORG_CHECK_MALLOC_ZERO 2843fc5a983dSmrg 2844d422ce2eSmrg# XORG_WITH_LINT() 2845f3561b8bSmrg# ---------------- 2846d422ce2eSmrg# Minimum version: 1.1.0 2847d422ce2eSmrg# 2848d422ce2eSmrg# This macro enables the use of a tool that flags some suspicious and 2849d422ce2eSmrg# non-portable constructs (likely to be bugs) in C language source code. 2850d422ce2eSmrg# It will attempt to locate the tool and use appropriate options. 2851d422ce2eSmrg# There are various lint type tools on different platforms. 2852d422ce2eSmrg# 2853d422ce2eSmrg# Interface to module: 2854d422ce2eSmrg# LINT: returns the path to the tool found on the platform 2855d422ce2eSmrg# or the value set to LINT on the configure cmd line 2856d422ce2eSmrg# also an Automake conditional 2857d422ce2eSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2858d422ce2eSmrg# 2859d422ce2eSmrg# --with-lint: 'yes' user instructs the module to use lint 2860d422ce2eSmrg# 'no' user instructs the module not to use lint (default) 2861d422ce2eSmrg# 2862d422ce2eSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863d422ce2eSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864d422ce2eSmrg# 2865d422ce2eSmrgAC_DEFUN([XORG_WITH_LINT],[ 2866fc5a983dSmrg 2867d422ce2eSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868d422ce2eSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869d422ce2eSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870d422ce2eSmrg [Use a lint-style source code checker (default: disabled)])], 2871d422ce2eSmrg [use_lint=$withval], [use_lint=no]) 2872fc5a983dSmrg 2873d422ce2eSmrg# Obtain platform specific info like program name and options 2874d422ce2eSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875d422ce2eSmrgcase $host_os in 2876d422ce2eSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877d422ce2eSmrg lint_name=splint 2878d422ce2eSmrg lint_options="-badflag" 2879d422ce2eSmrg ;; 2880d422ce2eSmrg *freebsd* | *netbsd*) 2881d422ce2eSmrg lint_name=lint 2882d422ce2eSmrg lint_options="-u -b" 2883d422ce2eSmrg ;; 2884d422ce2eSmrg *solaris*) 2885d422ce2eSmrg lint_name=lint 2886d422ce2eSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887d422ce2eSmrg ;; 2888d422ce2eSmrgesac 2889fc5a983dSmrg 2890d422ce2eSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891d422ce2eSmrgif test "x$use_lint" = x"yes" ; then 2892d422ce2eSmrg AC_PATH_PROG([LINT], [$lint_name]) 2893d422ce2eSmrg if test "x$LINT" = "x"; then 2894d422ce2eSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895d422ce2eSmrg fi 2896d422ce2eSmrgelif test "x$use_lint" = x"no" ; then 2897d422ce2eSmrg if test "x$LINT" != "x"; then 2898d422ce2eSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899d422ce2eSmrg fi 2900fc5a983dSmrgelse 2901d422ce2eSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2902fc5a983dSmrgfi 2903fc5a983dSmrg 2904d422ce2eSmrg# User supplied flags override default flags 2905d422ce2eSmrgif test "x$LINT_FLAGS" != "x"; then 2906d422ce2eSmrg lint_options=$LINT_FLAGS 2907fc5a983dSmrgfi 2908fc5a983dSmrg 2909d422ce2eSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910d422ce2eSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911fc5a983dSmrg 2912d422ce2eSmrg]) # XORG_WITH_LINT 2913fc5a983dSmrg 2914d422ce2eSmrg# XORG_LINT_LIBRARY(LIBNAME) 2915d422ce2eSmrg# -------------------------- 2916d422ce2eSmrg# Minimum version: 1.1.0 2917d422ce2eSmrg# 2918d422ce2eSmrg# Sets up flags for building lint libraries for checking programs that call 2919d422ce2eSmrg# functions in the library. 2920d422ce2eSmrg# 2921d422ce2eSmrg# Interface to module: 2922d422ce2eSmrg# LINTLIB - Automake variable with the name of lint library file to make 2923d422ce2eSmrg# MAKE_LINT_LIB - Automake conditional 2924d422ce2eSmrg# 2925d422ce2eSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926d422ce2eSmrg# - 'no' user instructs the module not to create a lint library (default) 29276257f37dSmrg 2928d422ce2eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929d422ce2eSmrgAC_REQUIRE([XORG_WITH_LINT]) 2930d422ce2eSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931d422ce2eSmrg [Create lint library (default: disabled)])], 2932d422ce2eSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 29336257f37dSmrg 2934d422ce2eSmrgif test "x$make_lint_lib" = x"yes" ; then 2935d422ce2eSmrg LINTLIB=llib-l$1.ln 2936d422ce2eSmrg if test "x$LINT" = "x"; then 2937d422ce2eSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938d422ce2eSmrg fi 2939d422ce2eSmrgelif test "x$make_lint_lib" != x"no" ; then 2940d422ce2eSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2941d422ce2eSmrgfi 2942fc5a983dSmrg 2943d422ce2eSmrgAC_SUBST(LINTLIB) 2944d422ce2eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2945fc5a983dSmrg 2946d422ce2eSmrg]) # XORG_LINT_LIBRARY 29476257f37dSmrg 2948d422ce2eSmrg# XORG_COMPILER_BRAND 2949d422ce2eSmrg# ------------------- 2950d422ce2eSmrg# Minimum version: 1.14.0 2951d422ce2eSmrg# 2952d422ce2eSmrg# Checks for various brands of compilers and sets flags as appropriate: 2953d422ce2eSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954d422ce2eSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955d422ce2eSmrg# clang compiler - sets CLANGCC to "yes" 2956d422ce2eSmrg# Intel compiler - sets INTELCC to "yes" 2957d422ce2eSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958d422ce2eSmrg# 2959d422ce2eSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960d422ce2eSmrgAC_LANG_CASE( 2961d422ce2eSmrg [C], [ 2962dbcfc9ffSmrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 2963dbcfc9ffSmrg dnl and complains that AC_PROG_CC_C99 is obsolete 2964dbcfc9ffSmrg m4_version_prereq([2.70], 2965dbcfc9ffSmrg [AC_REQUIRE([AC_PROG_CC])], 2966dbcfc9ffSmrg [AC_REQUIRE([AC_PROG_CC_C99])]) 2967d422ce2eSmrg ], 2968d422ce2eSmrg [C++], [ 2969d422ce2eSmrg AC_REQUIRE([AC_PROG_CXX]) 2970d422ce2eSmrg ] 2971d422ce2eSmrg) 2972d422ce2eSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2973d422ce2eSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2974d422ce2eSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2975d422ce2eSmrg]) # XORG_COMPILER_BRAND 2976fc5a983dSmrg 2977d422ce2eSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2978d422ce2eSmrg# --------------- 2979d422ce2eSmrg# Minimum version: 1.16.0 2980d422ce2eSmrg# 2981d422ce2eSmrg# Test if the compiler works when passed the given flag as a command line argument. 2982dbcfc9ffSmrg# If it succeeds, the flag is appended to the given variable. If not, it tries the 2983d422ce2eSmrg# next flag in the list until there are no more options. 2984d422ce2eSmrg# 2985d422ce2eSmrg# Note that this does not guarantee that the compiler supports the flag as some 2986d422ce2eSmrg# compilers will simply ignore arguments that they do not understand, but we do 2987d422ce2eSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2988d422ce2eSmrg# -Werror=unused-command-line-argument 2989d422ce2eSmrg# 2990d422ce2eSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2991d422ce2eSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2992d422ce2eSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2993fc5a983dSmrg 2994d422ce2eSmrgAC_LANG_COMPILER_REQUIRE 2995fc5a983dSmrg 2996d422ce2eSmrgAC_LANG_CASE( 2997d422ce2eSmrg [C], [ 2998dbcfc9ffSmrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 2999dbcfc9ffSmrg dnl and complains that AC_PROG_CC_C99 is obsolete 3000dbcfc9ffSmrg m4_version_prereq([2.70], 3001dbcfc9ffSmrg [AC_REQUIRE([AC_PROG_CC])], 3002dbcfc9ffSmrg [AC_REQUIRE([AC_PROG_CC_C99])]) 3003d422ce2eSmrg define([PREFIX], [C]) 3004d422ce2eSmrg define([CACHE_PREFIX], [cc]) 3005d422ce2eSmrg define([COMPILER], [$CC]) 3006d422ce2eSmrg ], 3007d422ce2eSmrg [C++], [ 3008d422ce2eSmrg define([PREFIX], [CXX]) 3009d422ce2eSmrg define([CACHE_PREFIX], [cxx]) 3010d422ce2eSmrg define([COMPILER], [$CXX]) 3011d422ce2eSmrg ] 3012d422ce2eSmrg) 3013fc5a983dSmrg 3014d422ce2eSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3015fc5a983dSmrg 3016d422ce2eSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3017d422ce2eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3018d422ce2eSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3019d422ce2eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3020d422ce2eSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3021d422ce2eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3022d422ce2eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3023d422ce2eSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3024d422ce2eSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3025d422ce2eSmrgfi 3026fc5a983dSmrg 3027d422ce2eSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3028d422ce2eSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3029d422ce2eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3030d422ce2eSmrg fi 3031d422ce2eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3032d422ce2eSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3033d422ce2eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3034d422ce2eSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3035d422ce2eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3036d422ce2eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3037d422ce2eSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3038d422ce2eSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3039d422ce2eSmrgfi 3040fc5a983dSmrg 3041d422ce2eSmrgfound="no" 3042d422ce2eSmrgm4_foreach([flag], m4_cdr($@), [ 3043d422ce2eSmrg if test $found = "no" ; then 3044d422ce2eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3045d422ce2eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3046d422ce2eSmrg fi 3047fc5a983dSmrg 3048d422ce2eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3049d422ce2eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3050d422ce2eSmrg fi 3051bd304fc0Smrg 3052d422ce2eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3053bd304fc0Smrg 3054d422ce2eSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3055d422ce2eSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3056d422ce2eSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3057d422ce2eSmrg AC_CACHE_VAL($cacheid, 3058d422ce2eSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3059d422ce2eSmrg [eval $cacheid=yes], 3060d422ce2eSmrg [eval $cacheid=no])]) 3061bd304fc0Smrg 3062d422ce2eSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3063fc5a983dSmrg 3064d422ce2eSmrg eval supported=\$$cacheid 3065d422ce2eSmrg AC_MSG_RESULT([$supported]) 3066d422ce2eSmrg if test "$supported" = "yes" ; then 3067d422ce2eSmrg $1="$$1 ]flag[" 3068d422ce2eSmrg found="yes" 3069d422ce2eSmrg fi 3070d422ce2eSmrg fi 3071d422ce2eSmrg]) 3072d422ce2eSmrg]) # XORG_TESTSET_CFLAG 3073fc5a983dSmrg 3074d422ce2eSmrg# XORG_COMPILER_FLAGS 3075d422ce2eSmrg# --------------- 3076d422ce2eSmrg# Minimum version: 1.16.0 3077d422ce2eSmrg# 3078d422ce2eSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3079d422ce2eSmrg# arguments supported by the selected compiler which do NOT alter the generated 3080d422ce2eSmrg# code. These arguments will cause the compiler to print various warnings 3081d422ce2eSmrg# during compilation AND turn a conservative set of warnings into errors. 3082d422ce2eSmrg# 3083d422ce2eSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3084d422ce2eSmrg# future versions of util-macros as options are added to new compilers. 3085d422ce2eSmrg# 3086d422ce2eSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3087d422ce2eSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3088fc5a983dSmrg 3089d422ce2eSmrgAC_ARG_ENABLE(selective-werror, 3090d422ce2eSmrg AS_HELP_STRING([--disable-selective-werror], 3091d422ce2eSmrg [Turn off selective compiler errors. (default: enabled)]), 3092d422ce2eSmrg [SELECTIVE_WERROR=$enableval], 3093d422ce2eSmrg [SELECTIVE_WERROR=yes]) 3094fc5a983dSmrg 3095d422ce2eSmrgAC_LANG_CASE( 3096d422ce2eSmrg [C], [ 3097d422ce2eSmrg define([PREFIX], [C]) 3098d422ce2eSmrg ], 3099d422ce2eSmrg [C++], [ 3100d422ce2eSmrg define([PREFIX], [CXX]) 3101d422ce2eSmrg ] 3102d422ce2eSmrg) 3103d422ce2eSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3104d422ce2eSmrgif test "x$SUNCC" = "xyes"; then 3105d422ce2eSmrg [BASE_]PREFIX[FLAGS]="-v" 3106d422ce2eSmrgelse 3107d422ce2eSmrg [BASE_]PREFIX[FLAGS]="" 3108d422ce2eSmrgfi 3109fc5a983dSmrg 3110d422ce2eSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3111d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3112d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3113d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3114d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3115fc5a983dSmrg 3116d422ce2eSmrgAC_LANG_CASE( 3117d422ce2eSmrg [C], [ 3118d422ce2eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3119d422ce2eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3120d422ce2eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3121d422ce2eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3122d422ce2eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3123d422ce2eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3124d422ce2eSmrg ] 3125d422ce2eSmrg) 3126fc5a983dSmrg 3127d422ce2eSmrg# This chunk adds additional warnings that could catch undesired effects. 3128d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3129d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3130d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3131d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3132d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3133d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3134d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3135fc5a983dSmrg 3136d422ce2eSmrg# These are currently disabled because they are noisy. They will be enabled 3137d422ce2eSmrg# in the future once the codebase is sufficiently modernized to silence 3138d422ce2eSmrg# them. For now, I don't want them to drown out the other warnings. 3139d422ce2eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3140d422ce2eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3141d422ce2eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31426257f37dSmrg 3143dbcfc9ffSmrg# Turn some warnings into errors, so we don't accidentally get successful builds 3144d422ce2eSmrg# when there are problems that should be fixed. 31456257f37dSmrg 3146d422ce2eSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3147d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3148d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3149d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3150d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3151d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3152d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3153d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3154d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3155d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3156d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3157d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3158d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3159d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3160d422ce2eSmrgelse 3161d422ce2eSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 3162d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3163d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3164d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3165d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3166d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3167d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3168d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3169d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3170d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3171d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3172d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3173d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3174d422ce2eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3175d422ce2eSmrgfi 3176fc5a983dSmrg 3177d422ce2eSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3178d422ce2eSmrg]) # XORG_COMPILER_FLAGS 3179fc5a983dSmrg 3180d422ce2eSmrg# XORG_CWARNFLAGS 3181d422ce2eSmrg# --------------- 3182d422ce2eSmrg# Minimum version: 1.2.0 3183d422ce2eSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3184d422ce2eSmrg# 3185d422ce2eSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3186d422ce2eSmrg# 3187d422ce2eSmrg# This function is deprecated because it defines -fno-strict-aliasing 3188d422ce2eSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3189d422ce2eSmrg# is needed, then it should be added explicitly in the module when 3190d422ce2eSmrg# it is updated to use BASE_CFLAGS. 3191d422ce2eSmrg# 3192d422ce2eSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3193d422ce2eSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3194d422ce2eSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3195d422ce2eSmrgAC_LANG_CASE( 3196d422ce2eSmrg [C], [ 3197d422ce2eSmrg CWARNFLAGS="$BASE_CFLAGS" 3198d422ce2eSmrg if test "x$GCC" = xyes ; then 3199d422ce2eSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3200d422ce2eSmrg fi 3201d422ce2eSmrg AC_SUBST(CWARNFLAGS) 3202d422ce2eSmrg ] 3203d422ce2eSmrg) 3204d422ce2eSmrg]) # XORG_CWARNFLAGS 3205fc5a983dSmrg 3206d422ce2eSmrg# XORG_STRICT_OPTION 3207d422ce2eSmrg# ----------------------- 3208d422ce2eSmrg# Minimum version: 1.3.0 3209d422ce2eSmrg# 3210d422ce2eSmrg# Add configure option to enable strict compilation flags, such as treating 3211d422ce2eSmrg# warnings as fatal errors. 3212d422ce2eSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3213d422ce2eSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3214d422ce2eSmrg# 3215d422ce2eSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3216d422ce2eSmrg# when strict compilation is unconditionally desired. 3217d422ce2eSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3218d422ce2eSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3219d422ce2eSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3220fc5a983dSmrg 3221d422ce2eSmrgAC_ARG_ENABLE(strict-compilation, 3222d422ce2eSmrg AS_HELP_STRING([--enable-strict-compilation], 3223d422ce2eSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3224d422ce2eSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3225fc5a983dSmrg 3226d422ce2eSmrgAC_LANG_CASE( 3227d422ce2eSmrg [C], [ 3228d422ce2eSmrg define([PREFIX], [C]) 3229d422ce2eSmrg ], 3230d422ce2eSmrg [C++], [ 3231d422ce2eSmrg define([PREFIX], [CXX]) 3232d422ce2eSmrg ] 3233d422ce2eSmrg) 3234fc5a983dSmrg 3235d422ce2eSmrg[STRICT_]PREFIX[FLAGS]="" 3236d422ce2eSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3237d422ce2eSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3238fc5a983dSmrg 3239d422ce2eSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3240d422ce2eSmrg# activate it with -Werror, so we add it here explicitly. 3241d422ce2eSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3242fc5a983dSmrg 3243d422ce2eSmrgif test "x$STRICT_COMPILE" = "xyes"; then 3244d422ce2eSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3245d422ce2eSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3246d422ce2eSmrgfi 3247d422ce2eSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3248d422ce2eSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3249d422ce2eSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3250d422ce2eSmrg]) # XORG_STRICT_OPTION 3251fc5a983dSmrg 3252dbcfc9ffSmrg# XORG_DEFAULT_NOCODE_OPTIONS 3253dbcfc9ffSmrg# --------------------------- 3254dbcfc9ffSmrg# Minimum version: 1.20.0 3255dbcfc9ffSmrg# 3256dbcfc9ffSmrg# Defines default options for X.Org modules which don't compile code, 3257dbcfc9ffSmrg# such as fonts, bitmaps, cursors, and docs. 3258dbcfc9ffSmrg# 3259dbcfc9ffSmrgAC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 3260dbcfc9ffSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3261dbcfc9ffSmrgXORG_RELEASE_VERSION 3262dbcfc9ffSmrgXORG_CHANGELOG 3263dbcfc9ffSmrgXORG_INSTALL 3264dbcfc9ffSmrgXORG_MANPAGE_SECTIONS 3265dbcfc9ffSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3266dbcfc9ffSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3267dbcfc9ffSmrg]) # XORG_DEFAULT_NOCODE_OPTIONS 3268dbcfc9ffSmrg 3269d422ce2eSmrg# XORG_DEFAULT_OPTIONS 3270d422ce2eSmrg# -------------------- 3271d422ce2eSmrg# Minimum version: 1.3.0 3272d422ce2eSmrg# 3273dbcfc9ffSmrg# Defines default options for X.Org modules which compile code. 3274d422ce2eSmrg# 3275d422ce2eSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3276d422ce2eSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3277d422ce2eSmrgXORG_COMPILER_FLAGS 3278d422ce2eSmrgXORG_CWARNFLAGS 3279d422ce2eSmrgXORG_STRICT_OPTION 3280dbcfc9ffSmrgXORG_DEFAULT_NOCODE_OPTIONS 3281d422ce2eSmrg]) # XORG_DEFAULT_OPTIONS 3282fc5a983dSmrg 3283d422ce2eSmrg# XORG_INSTALL() 3284d422ce2eSmrg# ---------------- 3285d422ce2eSmrg# Minimum version: 1.4.0 3286d422ce2eSmrg# 3287d422ce2eSmrg# Defines the variable INSTALL_CMD as the command to copy 3288d422ce2eSmrg# INSTALL from $prefix/share/util-macros. 3289d422ce2eSmrg# 3290d422ce2eSmrgAC_DEFUN([XORG_INSTALL], [ 3291d422ce2eSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3292d422ce2eSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3293d422ce2eSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3294d422ce2eSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3295d422ce2eSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3296d422ce2eSmrgtouch \$(top_srcdir)/INSTALL; \ 3297d422ce2eSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3298d422ce2eSmrgAC_SUBST([INSTALL_CMD]) 3299d422ce2eSmrg]) # XORG_INSTALL 3300d422ce2eSmrgdnl Copyright 2005 Red Hat, Inc 3301d422ce2eSmrgdnl 3302d422ce2eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3303d422ce2eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3304d422ce2eSmrgdnl the above copyright notice appear in all copies and that both that 3305d422ce2eSmrgdnl copyright notice and this permission notice appear in supporting 3306d422ce2eSmrgdnl documentation. 3307d422ce2eSmrgdnl 3308d422ce2eSmrgdnl The above copyright notice and this permission notice shall be included 3309d422ce2eSmrgdnl in all copies or substantial portions of the Software. 3310d422ce2eSmrgdnl 3311d422ce2eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3312d422ce2eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3313d422ce2eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3314d422ce2eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3315d422ce2eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3316d422ce2eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3317d422ce2eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3318d422ce2eSmrgdnl 3319d422ce2eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3320d422ce2eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3321d422ce2eSmrgdnl other dealings in this Software without prior written authorization 3322d422ce2eSmrgdnl from the copyright holders. 3323d422ce2eSmrgdnl 3324fc5a983dSmrg 3325d422ce2eSmrg# XORG_RELEASE_VERSION 3326d422ce2eSmrg# -------------------- 3327d422ce2eSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3328fc5a983dSmrg 3329d422ce2eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3330d422ce2eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3331d422ce2eSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3332d422ce2eSmrg [Major version of this package]) 3333d422ce2eSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3334d422ce2eSmrg if test "x$PVM" = "x"; then 3335d422ce2eSmrg PVM="0" 3336d422ce2eSmrg fi 3337d422ce2eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3338d422ce2eSmrg [$PVM], 3339d422ce2eSmrg [Minor version of this package]) 3340d422ce2eSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3341d422ce2eSmrg if test "x$PVP" = "x"; then 3342d422ce2eSmrg PVP="0" 3343d422ce2eSmrg fi 3344d422ce2eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3345d422ce2eSmrg [$PVP], 3346d422ce2eSmrg [Patch version of this package]) 3347d422ce2eSmrg]) 3348fc5a983dSmrg 3349d422ce2eSmrg# XORG_CHANGELOG() 3350d422ce2eSmrg# ---------------- 3351d422ce2eSmrg# Minimum version: 1.2.0 3352d422ce2eSmrg# 3353d422ce2eSmrg# Defines the variable CHANGELOG_CMD as the command to generate 3354d422ce2eSmrg# ChangeLog from git. 3355d422ce2eSmrg# 3356d422ce2eSmrg# 3357d422ce2eSmrgAC_DEFUN([XORG_CHANGELOG], [ 3358d422ce2eSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3359d422ce2eSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3360d422ce2eSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3361d422ce2eSmrgtouch \$(top_srcdir)/ChangeLog; \ 3362d422ce2eSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3363d422ce2eSmrgAC_SUBST([CHANGELOG_CMD]) 3364d422ce2eSmrg]) # XORG_CHANGELOG 3365fc5a983dSmrg 3366dbcfc9ffSmrgdnl Copyright 2005 Red Hat, Inc 3367dbcfc9ffSmrgdnl 3368dbcfc9ffSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3369dbcfc9ffSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3370dbcfc9ffSmrgdnl the above copyright notice appear in all copies and that both that 3371dbcfc9ffSmrgdnl copyright notice and this permission notice appear in supporting 3372dbcfc9ffSmrgdnl documentation. 3373dbcfc9ffSmrgdnl 3374dbcfc9ffSmrgdnl The above copyright notice and this permission notice shall be included 3375dbcfc9ffSmrgdnl in all copies or substantial portions of the Software. 3376dbcfc9ffSmrgdnl 3377dbcfc9ffSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3378dbcfc9ffSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3379dbcfc9ffSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3380dbcfc9ffSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3381dbcfc9ffSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3382dbcfc9ffSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3383dbcfc9ffSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3384dbcfc9ffSmrgdnl 3385dbcfc9ffSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3386dbcfc9ffSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3387dbcfc9ffSmrgdnl other dealings in this Software without prior written authorization 3388dbcfc9ffSmrgdnl from the copyright holders. 3389dbcfc9ffSmrgdnl 3390dbcfc9ffSmrg 3391dbcfc9ffSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 3392dbcfc9ffSmrg# -------------------------- 3393dbcfc9ffSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 3394dbcfc9ffSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 3395dbcfc9ffSmrg 3396dbcfc9ffSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 3397dbcfc9ffSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3398dbcfc9ffSmrg SAVE_CFLAGS="$CFLAGS" 3399dbcfc9ffSmrg CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" 3400dbcfc9ffSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 3401dbcfc9ffSmrg#include "xorg-server.h" 3402dbcfc9ffSmrg#if !defined $1 3403dbcfc9ffSmrg#error $1 not defined 3404dbcfc9ffSmrg#endif 3405dbcfc9ffSmrg ]])], 3406dbcfc9ffSmrg [_EXT_CHECK=yes], 3407dbcfc9ffSmrg [_EXT_CHECK=no]) 3408dbcfc9ffSmrg CFLAGS="$SAVE_CFLAGS" 3409dbcfc9ffSmrg AC_MSG_CHECKING([if $1 is defined]) 3410dbcfc9ffSmrg AC_MSG_RESULT([$_EXT_CHECK]) 3411dbcfc9ffSmrg if test "$_EXT_CHECK" != no; then 3412dbcfc9ffSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 3413dbcfc9ffSmrg fi 3414dbcfc9ffSmrg]) 3415dbcfc9ffSmrg 3416d422ce2eSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3417d422ce2eSmrg# 3418d422ce2eSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3419d422ce2eSmrg# Foundation, Inc. 3420d422ce2eSmrg# Written by Gordon Matzigkeit, 1996 3421d422ce2eSmrg# 3422d422ce2eSmrg# This file is free software; the Free Software Foundation gives 3423d422ce2eSmrg# unlimited permission to copy and/or distribute it, with or without 3424d422ce2eSmrg# modifications, as long as this notice is preserved. 3425fc5a983dSmrg 3426d422ce2eSmrgm4_define([_LT_COPYING], [dnl 3427d422ce2eSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 3428d422ce2eSmrg# This is free software; see the source for copying conditions. There is NO 3429d422ce2eSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3430f3561b8bSmrg 3431d422ce2eSmrg# GNU Libtool is free software; you can redistribute it and/or modify 3432d422ce2eSmrg# it under the terms of the GNU General Public License as published by 3433d422ce2eSmrg# the Free Software Foundation; either version 2 of of the License, or 3434d422ce2eSmrg# (at your option) any later version. 3435d422ce2eSmrg# 3436d422ce2eSmrg# As a special exception to the GNU General Public License, if you 3437d422ce2eSmrg# distribute this file as part of a program or library that is built 3438d422ce2eSmrg# using GNU Libtool, you may include this file under the same 3439d422ce2eSmrg# distribution terms that you use for the rest of that program. 3440d422ce2eSmrg# 3441d422ce2eSmrg# GNU Libtool is distributed in the hope that it will be useful, but 3442d422ce2eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3443d422ce2eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3444d422ce2eSmrg# GNU General Public License for more details. 3445d422ce2eSmrg# 3446d422ce2eSmrg# You should have received a copy of the GNU General Public License 3447d422ce2eSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3448d422ce2eSmrg]) 3449fc5a983dSmrg 3450d422ce2eSmrg# serial 59 LT_INIT 3451fc5a983dSmrg 3452fc5a983dSmrg 3453d422ce2eSmrg# LT_PREREQ(VERSION) 3454d422ce2eSmrg# ------------------ 3455d422ce2eSmrg# Complain and exit if this libtool version is less that VERSION. 3456d422ce2eSmrgm4_defun([LT_PREREQ], 3457d422ce2eSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3458d422ce2eSmrg [m4_default([$3], 3459d422ce2eSmrg [m4_fatal([Libtool version $1 or higher is required], 3460d422ce2eSmrg 63)])], 3461d422ce2eSmrg [$2])]) 34626257f37dSmrg 3463fc5a983dSmrg 3464d422ce2eSmrg# _LT_CHECK_BUILDDIR 3465d422ce2eSmrg# ------------------ 3466d422ce2eSmrg# Complain if the absolute build directory name contains unusual characters 3467d422ce2eSmrgm4_defun([_LT_CHECK_BUILDDIR], 3468d422ce2eSmrg[case `pwd` in 3469d422ce2eSmrg *\ * | *\ *) 3470d422ce2eSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3471d422ce2eSmrgesac 3472d422ce2eSmrg]) 34736257f37dSmrg 34746257f37dSmrg 3475d422ce2eSmrg# LT_INIT([OPTIONS]) 3476d422ce2eSmrg# ------------------ 3477d422ce2eSmrgAC_DEFUN([LT_INIT], 3478d422ce2eSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3479d422ce2eSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3480d422ce2eSmrgAC_BEFORE([$0], [LT_LANG])dnl 3481d422ce2eSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3482d422ce2eSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3483d422ce2eSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 34846257f37dSmrg 3485d422ce2eSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3486d422ce2eSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3487d422ce2eSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3488d422ce2eSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3489d422ce2eSmrgdnl unless we require an AC_DEFUNed macro: 3490d422ce2eSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3491d422ce2eSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3492d422ce2eSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3493d422ce2eSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3494d422ce2eSmrgm4_require([_LT_PROG_LTMAIN])dnl 3495fc5a983dSmrg 3496d422ce2eSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3497fc5a983dSmrg 3498d422ce2eSmrgdnl Parse OPTIONS 3499d422ce2eSmrg_LT_SET_OPTIONS([$0], [$1]) 3500fc5a983dSmrg 3501d422ce2eSmrg# This can be used to rebuild libtool when needed 3502d422ce2eSmrgLIBTOOL_DEPS=$ltmain 3503fc5a983dSmrg 3504d422ce2eSmrg# Always use our own libtool. 3505d422ce2eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3506d422ce2eSmrgAC_SUBST(LIBTOOL)dnl 3507f3561b8bSmrg 3508d422ce2eSmrg_LT_SETUP 3509fc5a983dSmrg 3510d422ce2eSmrg# Only expand once: 3511d422ce2eSmrgm4_define([LT_INIT]) 3512d422ce2eSmrg])# LT_INIT 3513fc5a983dSmrg 3514d422ce2eSmrg# Old names: 3515d422ce2eSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3516d422ce2eSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3517d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 3518d422ce2eSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3519d422ce2eSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3520f3561b8bSmrg 3521f3561b8bSmrg 3522d422ce2eSmrg# _LT_PREPARE_CC_BASENAME 3523d422ce2eSmrg# ----------------------- 3524d422ce2eSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3525d422ce2eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3526d422ce2eSmrgfunc_cc_basename () 3527d422ce2eSmrg{ 3528d422ce2eSmrg for cc_temp in @S|@*""; do 3529d422ce2eSmrg case $cc_temp in 3530d422ce2eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3531d422ce2eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3532d422ce2eSmrg \-*) ;; 3533d422ce2eSmrg *) break;; 3534fc5a983dSmrg esac 3535d422ce2eSmrg done 3536d422ce2eSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3537d422ce2eSmrg} 3538d422ce2eSmrg])# _LT_PREPARE_CC_BASENAME 3539fc5a983dSmrg 3540fc5a983dSmrg 3541d422ce2eSmrg# _LT_CC_BASENAME(CC) 3542d422ce2eSmrg# ------------------- 3543d422ce2eSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3544d422ce2eSmrg# but that macro is also expanded into generated libtool script, which 3545d422ce2eSmrg# arranges for $SED and $ECHO to be set by different means. 3546d422ce2eSmrgm4_defun([_LT_CC_BASENAME], 3547d422ce2eSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3548d422ce2eSmrgAC_REQUIRE([_LT_DECL_SED])dnl 3549d422ce2eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3550d422ce2eSmrgfunc_cc_basename $1 3551d422ce2eSmrgcc_basename=$func_cc_basename_result 3552d422ce2eSmrg]) 3553f3561b8bSmrg 3554f3561b8bSmrg 3555d422ce2eSmrg# _LT_FILEUTILS_DEFAULTS 3556d422ce2eSmrg# ---------------------- 3557d422ce2eSmrg# It is okay to use these file commands and assume they have been set 3558d422ce2eSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3559d422ce2eSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3560d422ce2eSmrg[: ${CP="cp -f"} 3561d422ce2eSmrg: ${MV="mv -f"} 3562d422ce2eSmrg: ${RM="rm -f"} 3563d422ce2eSmrg])# _LT_FILEUTILS_DEFAULTS 3564fc5a983dSmrg 3565fc5a983dSmrg 3566d422ce2eSmrg# _LT_SETUP 3567d422ce2eSmrg# --------- 3568d422ce2eSmrgm4_defun([_LT_SETUP], 3569d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3570d422ce2eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3571d422ce2eSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3572d422ce2eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35736257f37dSmrg 3574d422ce2eSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3575d422ce2eSmrgdnl 3576d422ce2eSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3577d422ce2eSmrg_LT_DECL([], [host], [0])dnl 3578d422ce2eSmrg_LT_DECL([], [host_os], [0])dnl 3579d422ce2eSmrgdnl 3580d422ce2eSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3581d422ce2eSmrg_LT_DECL([], [build], [0])dnl 3582d422ce2eSmrg_LT_DECL([], [build_os], [0])dnl 3583d422ce2eSmrgdnl 3584d422ce2eSmrgAC_REQUIRE([AC_PROG_CC])dnl 3585d422ce2eSmrgAC_REQUIRE([LT_PATH_LD])dnl 3586d422ce2eSmrgAC_REQUIRE([LT_PATH_NM])dnl 3587d422ce2eSmrgdnl 3588d422ce2eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3589d422ce2eSmrgtest -z "$LN_S" && LN_S="ln -s" 3590d422ce2eSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3591d422ce2eSmrgdnl 3592d422ce2eSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3593d422ce2eSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3594d422ce2eSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3595d422ce2eSmrgdnl 3596d422ce2eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3597d422ce2eSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3598d422ce2eSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3599d422ce2eSmrgm4_require([_LT_CMD_RELOAD])dnl 3600d422ce2eSmrgm4_require([_LT_DECL_FILECMD])dnl 3601d422ce2eSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3602d422ce2eSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3603d422ce2eSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3604d422ce2eSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3605d422ce2eSmrgm4_require([_LT_WITH_SYSROOT])dnl 3606d422ce2eSmrgm4_require([_LT_CMD_TRUNCATE])dnl 36076257f37dSmrg 3608d422ce2eSmrg_LT_CONFIG_LIBTOOL_INIT([ 3609d422ce2eSmrg# See if we are running on zsh, and set the options that allow our 3610d422ce2eSmrg# commands through without removal of \ escapes INIT. 3611d422ce2eSmrgif test -n "\${ZSH_VERSION+set}"; then 3612d422ce2eSmrg setopt NO_GLOB_SUBST 3613d422ce2eSmrgfi 3614d422ce2eSmrg]) 3615d422ce2eSmrgif test -n "${ZSH_VERSION+set}"; then 3616d422ce2eSmrg setopt NO_GLOB_SUBST 36176257f37dSmrgfi 36186257f37dSmrg 3619d422ce2eSmrg_LT_CHECK_OBJDIR 36206257f37dSmrg 3621d422ce2eSmrgm4_require([_LT_TAG_COMPILER])dnl 3622fc5a983dSmrg 3623fc5a983dSmrgcase $host_os in 3624d422ce2eSmrgaix3*) 3625d422ce2eSmrg # AIX sometimes has problems with the GCC collect2 program. For some 3626d422ce2eSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3627d422ce2eSmrg # vanish in a puff of smoke. 3628d422ce2eSmrg if test set != "${COLLECT_NAMES+set}"; then 3629d422ce2eSmrg COLLECT_NAMES= 3630d422ce2eSmrg export COLLECT_NAMES 3631d422ce2eSmrg fi 3632fc5a983dSmrg ;; 3633d422ce2eSmrgesac 3634fc5a983dSmrg 3635d422ce2eSmrg# Global variables: 3636d422ce2eSmrgofile=libtool 3637d422ce2eSmrgcan_build_shared=yes 3638fc5a983dSmrg 3639d422ce2eSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 3640d422ce2eSmrg# ICC, which need '.lib'). 3641d422ce2eSmrglibext=a 3642fc5a983dSmrg 3643d422ce2eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3644fc5a983dSmrg 3645d422ce2eSmrgold_CC=$CC 3646d422ce2eSmrgold_CFLAGS=$CFLAGS 3647fc5a983dSmrg 3648d422ce2eSmrg# Set sane defaults for various variables 3649d422ce2eSmrgtest -z "$CC" && CC=cc 3650d422ce2eSmrgtest -z "$LTCC" && LTCC=$CC 3651d422ce2eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3652d422ce2eSmrgtest -z "$LD" && LD=ld 3653d422ce2eSmrgtest -z "$ac_objext" && ac_objext=o 3654f3561b8bSmrg 3655d422ce2eSmrg_LT_CC_BASENAME([$compiler]) 3656fc5a983dSmrg 3657d422ce2eSmrg# Only perform the check for file, if the check method requires it 3658d422ce2eSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3659d422ce2eSmrgcase $deplibs_check_method in 3660d422ce2eSmrgfile_magic*) 3661d422ce2eSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3662d422ce2eSmrg _LT_PATH_MAGIC 3663fc5a983dSmrg fi 3664fc5a983dSmrg ;; 3665d422ce2eSmrgesac 3666fc5a983dSmrg 3667d422ce2eSmrg# Use C for the default configuration in the libtool script 3668d422ce2eSmrgLT_SUPPORTED_TAG([CC]) 3669d422ce2eSmrg_LT_LANG_C_CONFIG 3670d422ce2eSmrg_LT_LANG_DEFAULT_CONFIG 3671d422ce2eSmrg_LT_CONFIG_COMMANDS 3672d422ce2eSmrg])# _LT_SETUP 3673bd304fc0Smrg 3674fc5a983dSmrg 3675d422ce2eSmrg# _LT_PREPARE_SED_QUOTE_VARS 3676d422ce2eSmrg# -------------------------- 3677d422ce2eSmrg# Define a few sed substitution that help us do robust quoting. 3678d422ce2eSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3679d422ce2eSmrg[# Backslashify metacharacters that are still active within 3680d422ce2eSmrg# double-quoted strings. 3681d422ce2eSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3682fc5a983dSmrg 3683d422ce2eSmrg# Same as above, but do not quote variable references. 3684d422ce2eSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3685fc5a983dSmrg 3686d422ce2eSmrg# Sed substitution to delay expansion of an escaped shell variable in a 3687d422ce2eSmrg# double_quote_subst'ed string. 3688d422ce2eSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3689fc5a983dSmrg 3690d422ce2eSmrg# Sed substitution to delay expansion of an escaped single quote. 3691d422ce2eSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3692fc5a983dSmrg 3693d422ce2eSmrg# Sed substitution to avoid accidental globbing in evaled expressions 3694d422ce2eSmrgno_glob_subst='s/\*/\\\*/g' 3695d422ce2eSmrg]) 3696fc5a983dSmrg 3697d422ce2eSmrg# _LT_PROG_LTMAIN 3698d422ce2eSmrg# --------------- 3699d422ce2eSmrg# Note that this code is called both from 'configure', and 'config.status' 3700d422ce2eSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3701d422ce2eSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3702d422ce2eSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3703d422ce2eSmrgm4_defun([_LT_PROG_LTMAIN], 3704d422ce2eSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3705d422ce2eSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3706d422ce2eSmrgltmain=$ac_aux_dir/ltmain.sh 3707d422ce2eSmrg])# _LT_PROG_LTMAIN 3708fc5a983dSmrg 3709fc5a983dSmrg 3710fc5a983dSmrg 3711d422ce2eSmrg# So that we can recreate a full libtool script including additional 3712d422ce2eSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3713d422ce2eSmrg# in macros and then make a single call at the end using the 'libtool' 3714d422ce2eSmrg# label. 3715fc5a983dSmrg 3716fc5a983dSmrg 3717d422ce2eSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3718d422ce2eSmrg# ---------------------------------------- 3719d422ce2eSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3720d422ce2eSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3721d422ce2eSmrg[m4_ifval([$1], 3722d422ce2eSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3723d422ce2eSmrg [$1 3724d422ce2eSmrg])])]) 3725f3561b8bSmrg 3726d422ce2eSmrg# Initialize. 3727d422ce2eSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3728fc5a983dSmrg 3729d422ce2eSmrg 3730d422ce2eSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3731d422ce2eSmrg# ------------------------------ 3732d422ce2eSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3733d422ce2eSmrgm4_define([_LT_CONFIG_LIBTOOL], 3734d422ce2eSmrg[m4_ifval([$1], 3735d422ce2eSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3736d422ce2eSmrg [$1 3737d422ce2eSmrg])])]) 3738d422ce2eSmrg 3739d422ce2eSmrg# Initialize. 3740d422ce2eSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3741d422ce2eSmrg 3742d422ce2eSmrg 3743d422ce2eSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3744d422ce2eSmrg# ----------------------------------------------------- 3745d422ce2eSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3746d422ce2eSmrg[_LT_CONFIG_LIBTOOL([$1]) 3747d422ce2eSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3748fc5a983dSmrg]) 3749bd304fc0Smrg 3750bd304fc0Smrg 3751d422ce2eSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3752d422ce2eSmrg# ----------------------------- 3753d422ce2eSmrg# Add leading comment marks to the start of each line, and a trailing 3754d422ce2eSmrg# full-stop to the whole comment if one is not present already. 3755d422ce2eSmrgm4_define([_LT_FORMAT_COMMENT], 3756d422ce2eSmrg[m4_ifval([$1], [ 3757d422ce2eSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3758d422ce2eSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3759d422ce2eSmrg)]) 3760fc5a983dSmrg 3761fc5a983dSmrg 3762f3561b8bSmrg 3763f3561b8bSmrg 3764fc5a983dSmrg 3765d422ce2eSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3766d422ce2eSmrg# ------------------------------------------------------------------- 3767d422ce2eSmrg# CONFIGNAME is the name given to the value in the libtool script. 3768d422ce2eSmrg# VARNAME is the (base) name used in the configure script. 3769d422ce2eSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3770d422ce2eSmrg# VARNAME. Any other value will be used directly. 3771d422ce2eSmrgm4_define([_LT_DECL], 3772d422ce2eSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3773d422ce2eSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3774d422ce2eSmrg [m4_ifval([$1], [$1], [$2])]) 3775d422ce2eSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3776d422ce2eSmrg m4_ifval([$4], 3777d422ce2eSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3778d422ce2eSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3779d422ce2eSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3780d422ce2eSmrg]) 3781fc5a983dSmrg 3782bd304fc0Smrg 3783d422ce2eSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3784d422ce2eSmrg# -------------------------------------------------------- 3785d422ce2eSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3786bd304fc0Smrg 3787bd304fc0Smrg 3788d422ce2eSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3789d422ce2eSmrg# ------------------------------------------------ 3790d422ce2eSmrgm4_define([lt_decl_tag_varnames], 3791d422ce2eSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3792bd304fc0Smrg 3793bd304fc0Smrg 3794d422ce2eSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3795d422ce2eSmrg# --------------------------------------------------------- 3796d422ce2eSmrgm4_define([_lt_decl_filter], 3797d422ce2eSmrg[m4_case([$#], 3798d422ce2eSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3799d422ce2eSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3800d422ce2eSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3801d422ce2eSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3802d422ce2eSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3803d422ce2eSmrg]) 3804f3561b8bSmrg 38056257f37dSmrg 3806d422ce2eSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3807d422ce2eSmrg# -------------------------------------------------- 3808d422ce2eSmrgm4_define([lt_decl_quote_varnames], 3809d422ce2eSmrg[_lt_decl_filter([value], [1], $@)]) 38106257f37dSmrg 3811fc5a983dSmrg 3812d422ce2eSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3813d422ce2eSmrg# --------------------------------------------------- 3814d422ce2eSmrgm4_define([lt_decl_dquote_varnames], 3815d422ce2eSmrg[_lt_decl_filter([value], [2], $@)]) 3816fc5a983dSmrg 3817fc5a983dSmrg 3818d422ce2eSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3819d422ce2eSmrg# --------------------------------------------------- 3820d422ce2eSmrgm4_define([lt_decl_varnames_tagged], 3821d422ce2eSmrg[m4_assert([$# <= 2])dnl 3822d422ce2eSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 3823d422ce2eSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3824d422ce2eSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3825d422ce2eSmrgm4_define([_lt_decl_varnames_tagged], 3826d422ce2eSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3827fc5a983dSmrg 3828fc5a983dSmrg 3829d422ce2eSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3830d422ce2eSmrg# ------------------------------------------------ 3831d422ce2eSmrgm4_define([lt_decl_all_varnames], 3832d422ce2eSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3833d422ce2eSmrg m4_if([$2], [], 3834d422ce2eSmrg m4_quote(lt_decl_varnames), 3835d422ce2eSmrg m4_quote(m4_shift($@))))[]dnl 3836d422ce2eSmrg]) 3837d422ce2eSmrgm4_define([_lt_decl_all_varnames], 3838d422ce2eSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 3839d422ce2eSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3840d422ce2eSmrg]) 3841fc5a983dSmrg 3842fc5a983dSmrg 3843d422ce2eSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3844d422ce2eSmrg# ------------------------------------ 3845d422ce2eSmrg# Quote a variable value, and forward it to 'config.status' so that its 3846d422ce2eSmrg# declaration there will have the same value as in 'configure'. VARNAME 3847d422ce2eSmrg# must have a single quote delimited value for this to work. 3848d422ce2eSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3849d422ce2eSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3850fc5a983dSmrg 3851fc5a983dSmrg 3852d422ce2eSmrg# _LT_CONFIG_STATUS_DECLARATIONS 3853d422ce2eSmrg# ------------------------------ 3854d422ce2eSmrg# We delimit libtool config variables with single quotes, so when 3855d422ce2eSmrg# we write them to config.status, we have to be sure to quote all 3856d422ce2eSmrg# embedded single quotes properly. In configure, this macro expands 3857d422ce2eSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3858d422ce2eSmrg# 3859d422ce2eSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3860d422ce2eSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3861d422ce2eSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3862d422ce2eSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3863fc5a983dSmrg 3864fc5a983dSmrg 3865d422ce2eSmrg# _LT_LIBTOOL_TAGS 3866d422ce2eSmrg# ---------------- 3867d422ce2eSmrg# Output comment and list of tags supported by the script 3868d422ce2eSmrgm4_defun([_LT_LIBTOOL_TAGS], 3869d422ce2eSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3870d422ce2eSmrgavailable_tags='_LT_TAGS'dnl 3871d422ce2eSmrg]) 3872fc5a983dSmrg 3873fc5a983dSmrg 3874d422ce2eSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3875d422ce2eSmrg# ----------------------------------- 3876d422ce2eSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3877d422ce2eSmrg# expand to a commented shell variable setting: 3878d422ce2eSmrg# 3879d422ce2eSmrg# # Some comment about what VAR is for. 3880d422ce2eSmrg# visible_name=$lt_internal_name 3881d422ce2eSmrgm4_define([_LT_LIBTOOL_DECLARE], 3882d422ce2eSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3883d422ce2eSmrg [description])))[]dnl 3884d422ce2eSmrgm4_pushdef([_libtool_name], 3885d422ce2eSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3886d422ce2eSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3887d422ce2eSmrg [0], [_libtool_name=[$]$1], 3888d422ce2eSmrg [1], [_libtool_name=$lt_[]$1], 3889d422ce2eSmrg [2], [_libtool_name=$lt_[]$1], 3890d422ce2eSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3891d422ce2eSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3892d422ce2eSmrg]) 3893fc5a983dSmrg 38946257f37dSmrg 3895d422ce2eSmrg# _LT_LIBTOOL_CONFIG_VARS 3896d422ce2eSmrg# ----------------------- 3897d422ce2eSmrg# Produce commented declarations of non-tagged libtool config variables 3898d422ce2eSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3899d422ce2eSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3900d422ce2eSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3901d422ce2eSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3902d422ce2eSmrg[m4_foreach([_lt_var], 3903d422ce2eSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3904d422ce2eSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3905fc5a983dSmrg 39066257f37dSmrg 3907d422ce2eSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 3908d422ce2eSmrg# ------------------------- 3909d422ce2eSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 3910d422ce2eSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3911d422ce2eSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3912fc5a983dSmrg 3913fc5a983dSmrg 3914d422ce2eSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3915d422ce2eSmrg# ------------------------------ 3916d422ce2eSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3917fc5a983dSmrg 3918fc5a983dSmrg 3919d422ce2eSmrg# _LT_CONFIG_COMMANDS 3920d422ce2eSmrg# ------------------- 3921d422ce2eSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3922d422ce2eSmrg# variables for single and double quote escaping we saved from calls 3923d422ce2eSmrg# to _LT_DECL, we can put quote escaped variables declarations 3924d422ce2eSmrg# into 'config.status', and then the shell code to quote escape them in 3925d422ce2eSmrg# for loops in 'config.status'. Finally, any additional code accumulated 3926d422ce2eSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3927d422ce2eSmrgm4_defun([_LT_CONFIG_COMMANDS], 3928d422ce2eSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3929d422ce2eSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3930d422ce2eSmrg dnl instead of duplicating it all over again into config.status, 3931d422ce2eSmrg dnl then we will have config.status run $CONFIG_LT later, so it 3932d422ce2eSmrg dnl needs to know what name is stored there: 3933d422ce2eSmrg [AC_CONFIG_COMMANDS([libtool], 3934d422ce2eSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3935d422ce2eSmrg dnl If the libtool generation code is destined for config.status, 3936d422ce2eSmrg dnl expand the accumulated commands and init code now: 3937d422ce2eSmrg [AC_CONFIG_COMMANDS([libtool], 3938d422ce2eSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3939d422ce2eSmrg])#_LT_CONFIG_COMMANDS 3940fc5a983dSmrg 3941fc5a983dSmrg 3942d422ce2eSmrg# Initialize. 3943d422ce2eSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3944d422ce2eSmrg[ 3945fc5a983dSmrg 3946d422ce2eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3947d422ce2eSmrg# if CDPATH is set. 3948d422ce2eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3949fc5a983dSmrg 3950d422ce2eSmrgsed_quote_subst='$sed_quote_subst' 3951d422ce2eSmrgdouble_quote_subst='$double_quote_subst' 3952d422ce2eSmrgdelay_variable_subst='$delay_variable_subst' 3953d422ce2eSmrg_LT_CONFIG_STATUS_DECLARATIONS 3954d422ce2eSmrgLTCC='$LTCC' 3955d422ce2eSmrgLTCFLAGS='$LTCFLAGS' 3956d422ce2eSmrgcompiler='$compiler_DEFAULT' 3957bd304fc0Smrg 3958d422ce2eSmrg# A function that is used when there is no print builtin or printf. 3959d422ce2eSmrgfunc_fallback_echo () 3960d422ce2eSmrg{ 3961d422ce2eSmrg eval 'cat <<_LTECHO_EOF 3962d422ce2eSmrg\$[]1 3963d422ce2eSmrg_LTECHO_EOF' 3964d422ce2eSmrg} 3965fc5a983dSmrg 3966d422ce2eSmrg# Quote evaled strings. 3967d422ce2eSmrgfor var in lt_decl_all_varnames([[ \ 3968d422ce2eSmrg]], lt_decl_quote_varnames); do 3969d422ce2eSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3970d422ce2eSmrg *[[\\\\\\\`\\"\\\$]]*) 3971d422ce2eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3972d422ce2eSmrg ;; 3973d422ce2eSmrg *) 3974d422ce2eSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3975d422ce2eSmrg ;; 3976d422ce2eSmrg esac 3977d422ce2eSmrgdone 3978fc5a983dSmrg 3979d422ce2eSmrg# Double-quote double-evaled strings. 3980d422ce2eSmrgfor var in lt_decl_all_varnames([[ \ 3981d422ce2eSmrg]], lt_decl_dquote_varnames); do 3982d422ce2eSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3983d422ce2eSmrg *[[\\\\\\\`\\"\\\$]]*) 3984d422ce2eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3985d422ce2eSmrg ;; 3986d422ce2eSmrg *) 3987d422ce2eSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3988d422ce2eSmrg ;; 3989d422ce2eSmrg esac 3990d422ce2eSmrgdone 3991fc5a983dSmrg 3992d422ce2eSmrg_LT_OUTPUT_LIBTOOL_INIT 3993d422ce2eSmrg]) 3994fc5a983dSmrg 3995d422ce2eSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3996d422ce2eSmrg# ------------------------------------ 3997d422ce2eSmrg# Generate a child script FILE with all initialization necessary to 3998d422ce2eSmrg# reuse the environment learned by the parent script, and make the 3999d422ce2eSmrg# file executable. If COMMENT is supplied, it is inserted after the 4000d422ce2eSmrg# '#!' sequence but before initialization text begins. After this 4001d422ce2eSmrg# macro, additional text can be appended to FILE to form the body of 4002d422ce2eSmrg# the child script. The macro ends with non-zero status if the 4003d422ce2eSmrg# file could not be fully written (such as if the disk is full). 4004d422ce2eSmrgm4_ifdef([AS_INIT_GENERATED], 4005d422ce2eSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4006d422ce2eSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 4007d422ce2eSmrg[m4_require([AS_PREPARE])]dnl 4008d422ce2eSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4009d422ce2eSmrg[lt_write_fail=0 4010d422ce2eSmrgcat >$1 <<_ASEOF || lt_write_fail=1 4011d422ce2eSmrg#! $SHELL 4012d422ce2eSmrg# Generated by $as_me. 4013d422ce2eSmrg$2 4014d422ce2eSmrgSHELL=\${CONFIG_SHELL-$SHELL} 4015d422ce2eSmrgexport SHELL 4016d422ce2eSmrg_ASEOF 4017d422ce2eSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4018d422ce2eSmrgAS_SHELL_SANITIZE 4019d422ce2eSmrg_AS_PREPARE 4020d422ce2eSmrgexec AS_MESSAGE_FD>&1 4021d422ce2eSmrg_ASEOF 4022d422ce2eSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4023d422ce2eSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4024fc5a983dSmrg 4025d422ce2eSmrg# LT_OUTPUT 4026d422ce2eSmrg# --------- 4027d422ce2eSmrg# This macro allows early generation of the libtool script (before 4028d422ce2eSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 4029d422ce2eSmrg# tests. 4030d422ce2eSmrgAC_DEFUN([LT_OUTPUT], 4031d422ce2eSmrg[: ${CONFIG_LT=./config.lt} 4032d422ce2eSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4033d422ce2eSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4034d422ce2eSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 4035fc5a983dSmrg 4036d422ce2eSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4037d422ce2eSmrglt_cl_silent=false 4038d422ce2eSmrgexec AS_MESSAGE_LOG_FD>>config.log 4039d422ce2eSmrg{ 4040d422ce2eSmrg echo 4041d422ce2eSmrg AS_BOX([Running $as_me.]) 4042d422ce2eSmrg} >&AS_MESSAGE_LOG_FD 4043d422ce2eSmrg 4044d422ce2eSmrglt_cl_help="\ 4045d422ce2eSmrg'$as_me' creates a local libtool stub from the current configuration, 4046d422ce2eSmrgfor use in further configure time tests before the real libtool is 4047d422ce2eSmrggenerated. 4048d422ce2eSmrg 4049d422ce2eSmrgUsage: $[0] [[OPTIONS]] 4050d422ce2eSmrg 4051d422ce2eSmrg -h, --help print this help, then exit 4052d422ce2eSmrg -V, --version print version number, then exit 4053d422ce2eSmrg -q, --quiet do not print progress messages 4054d422ce2eSmrg -d, --debug don't remove temporary files 4055d422ce2eSmrg 4056d422ce2eSmrgReport bugs to <bug-libtool@gnu.org>." 4057d422ce2eSmrg 4058d422ce2eSmrglt_cl_version="\ 4059d422ce2eSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4060d422ce2eSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4061d422ce2eSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4062d422ce2eSmrg 4063d422ce2eSmrgCopyright (C) 2011 Free Software Foundation, Inc. 4064d422ce2eSmrgThis config.lt script is free software; the Free Software Foundation 4065d422ce2eSmrggives unlimited permision to copy, distribute and modify it." 4066d422ce2eSmrg 4067d422ce2eSmrgwhile test 0 != $[#] 4068d422ce2eSmrgdo 4069d422ce2eSmrg case $[1] in 4070d422ce2eSmrg --version | --v* | -V ) 4071d422ce2eSmrg echo "$lt_cl_version"; exit 0 ;; 4072d422ce2eSmrg --help | --h* | -h ) 4073d422ce2eSmrg echo "$lt_cl_help"; exit 0 ;; 4074d422ce2eSmrg --debug | --d* | -d ) 4075d422ce2eSmrg debug=: ;; 4076d422ce2eSmrg --quiet | --q* | --silent | --s* | -q ) 4077d422ce2eSmrg lt_cl_silent=: ;; 4078d422ce2eSmrg 4079d422ce2eSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4080d422ce2eSmrgTry '$[0] --help' for more information.]) ;; 4081d422ce2eSmrg 4082d422ce2eSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4083d422ce2eSmrgTry '$[0] --help' for more information.]) ;; 4084d422ce2eSmrg esac 4085d422ce2eSmrg shift 4086f3561b8bSmrgdone 4087fc5a983dSmrg 4088d422ce2eSmrgif $lt_cl_silent; then 4089d422ce2eSmrg exec AS_MESSAGE_FD>/dev/null 4090bd304fc0Smrgfi 4091d422ce2eSmrg_LTEOF 4092bd304fc0Smrg 4093d422ce2eSmrgcat >>"$CONFIG_LT" <<_LTEOF 4094d422ce2eSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4095d422ce2eSmrg_LTEOF 4096fc5a983dSmrg 4097d422ce2eSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4098d422ce2eSmrgAC_MSG_NOTICE([creating $ofile]) 4099d422ce2eSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 4100d422ce2eSmrgAS_EXIT(0) 4101d422ce2eSmrg_LTEOF 4102d422ce2eSmrgchmod +x "$CONFIG_LT" 4103fc5a983dSmrg 4104d422ce2eSmrg# configure is writing to config.log, but config.lt does its own redirection, 4105d422ce2eSmrg# appending to config.log, which fails on DOS, as config.log is still kept 4106d422ce2eSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4107d422ce2eSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4108d422ce2eSmrglt_cl_success=: 4109d422ce2eSmrgtest yes = "$silent" && 4110d422ce2eSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 4111d422ce2eSmrgexec AS_MESSAGE_LOG_FD>/dev/null 4112d422ce2eSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4113d422ce2eSmrgexec AS_MESSAGE_LOG_FD>>config.log 4114d422ce2eSmrg$lt_cl_success || AS_EXIT(1) 4115d422ce2eSmrg])# LT_OUTPUT 4116fc5a983dSmrg 4117fc5a983dSmrg 4118d422ce2eSmrg# _LT_CONFIG(TAG) 4119d422ce2eSmrg# --------------- 4120d422ce2eSmrg# If TAG is the built-in tag, create an initial libtool script with a 4121d422ce2eSmrg# default configuration from the untagged config vars. Otherwise add code 4122d422ce2eSmrg# to config.status for appending the configuration named by TAG from the 4123d422ce2eSmrg# matching tagged config vars. 4124d422ce2eSmrgm4_defun([_LT_CONFIG], 4125d422ce2eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4126d422ce2eSmrg_LT_CONFIG_SAVE_COMMANDS([ 4127d422ce2eSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4128d422ce2eSmrg m4_if(_LT_TAG, [C], [ 4129d422ce2eSmrg # See if we are running on zsh, and set the options that allow our 4130d422ce2eSmrg # commands through without removal of \ escapes. 4131d422ce2eSmrg if test -n "${ZSH_VERSION+set}"; then 4132d422ce2eSmrg setopt NO_GLOB_SUBST 4133d422ce2eSmrg fi 4134fc5a983dSmrg 4135d422ce2eSmrg cfgfile=${ofile}T 4136d422ce2eSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4137d422ce2eSmrg $RM "$cfgfile" 4138fc5a983dSmrg 4139d422ce2eSmrg cat <<_LT_EOF >> "$cfgfile" 4140d422ce2eSmrg#! $SHELL 4141d422ce2eSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4142d422ce2eSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4143d422ce2eSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4144d422ce2eSmrg 4145d422ce2eSmrg# Provide generalized library-building support services. 4146d422ce2eSmrg# Written by Gordon Matzigkeit, 1996 4147d422ce2eSmrg 4148d422ce2eSmrg_LT_COPYING 4149d422ce2eSmrg_LT_LIBTOOL_TAGS 4150d422ce2eSmrg 4151d422ce2eSmrg# Configured defaults for sys_lib_dlsearch_path munging. 4152d422ce2eSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4153d422ce2eSmrg 4154d422ce2eSmrg# ### BEGIN LIBTOOL CONFIG 4155d422ce2eSmrg_LT_LIBTOOL_CONFIG_VARS 4156d422ce2eSmrg_LT_LIBTOOL_TAG_VARS 4157d422ce2eSmrg# ### END LIBTOOL CONFIG 4158d422ce2eSmrg 4159d422ce2eSmrg_LT_EOF 4160d422ce2eSmrg 4161d422ce2eSmrg cat <<'_LT_EOF' >> "$cfgfile" 4162d422ce2eSmrg 4163d422ce2eSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4164d422ce2eSmrg 4165d422ce2eSmrg_LT_PREPARE_MUNGE_PATH_LIST 4166d422ce2eSmrg_LT_PREPARE_CC_BASENAME 4167d422ce2eSmrg 4168d422ce2eSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4169d422ce2eSmrg 4170d422ce2eSmrg_LT_EOF 4171d422ce2eSmrg 4172d422ce2eSmrg case $host_os in 4173d422ce2eSmrg aix3*) 4174d422ce2eSmrg cat <<\_LT_EOF >> "$cfgfile" 4175d422ce2eSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4176d422ce2eSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4177d422ce2eSmrg# vanish in a puff of smoke. 4178d422ce2eSmrgif test set != "${COLLECT_NAMES+set}"; then 4179d422ce2eSmrg COLLECT_NAMES= 4180d422ce2eSmrg export COLLECT_NAMES 4181d422ce2eSmrgfi 4182d422ce2eSmrg_LT_EOF 4183d422ce2eSmrg ;; 4184d422ce2eSmrg esac 4185d422ce2eSmrg 4186d422ce2eSmrg _LT_PROG_LTMAIN 4187d422ce2eSmrg 4188d422ce2eSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4189d422ce2eSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4190d422ce2eSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4191d422ce2eSmrg # is reportedly fixed, but why not run on old versions too? 4192d422ce2eSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4193d422ce2eSmrg || (rm -f "$cfgfile"; exit 1) 4194d422ce2eSmrg 4195d422ce2eSmrg mv -f "$cfgfile" "$ofile" || 4196d422ce2eSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4197d422ce2eSmrg chmod +x "$ofile" 4198d422ce2eSmrg], 4199d422ce2eSmrg[cat <<_LT_EOF >> "$ofile" 4200d422ce2eSmrg 4201d422ce2eSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4202d422ce2eSmrgdnl in a comment (ie after a #). 4203d422ce2eSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4204d422ce2eSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4205d422ce2eSmrg# ### END LIBTOOL TAG CONFIG: $1 4206d422ce2eSmrg_LT_EOF 4207d422ce2eSmrg])dnl /m4_if 4208d422ce2eSmrg], 4209d422ce2eSmrg[m4_if([$1], [], [ 4210d422ce2eSmrg PACKAGE='$PACKAGE' 4211d422ce2eSmrg VERSION='$VERSION' 4212d422ce2eSmrg RM='$RM' 4213d422ce2eSmrg ofile='$ofile'], []) 4214d422ce2eSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4215d422ce2eSmrg])# _LT_CONFIG 4216d422ce2eSmrg 4217d422ce2eSmrg 4218d422ce2eSmrg# LT_SUPPORTED_TAG(TAG) 4219d422ce2eSmrg# --------------------- 4220d422ce2eSmrg# Trace this macro to discover what tags are supported by the libtool 4221d422ce2eSmrg# --tag option, using: 4222d422ce2eSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4223d422ce2eSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4224d422ce2eSmrg 4225d422ce2eSmrg 4226d422ce2eSmrg# C support is built-in for now 4227d422ce2eSmrgm4_define([_LT_LANG_C_enabled], []) 4228d422ce2eSmrgm4_define([_LT_TAGS], []) 4229d422ce2eSmrg 4230d422ce2eSmrg 4231d422ce2eSmrg# LT_LANG(LANG) 4232d422ce2eSmrg# ------------- 4233d422ce2eSmrg# Enable libtool support for the given language if not already enabled. 4234d422ce2eSmrgAC_DEFUN([LT_LANG], 4235d422ce2eSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4236d422ce2eSmrgm4_case([$1], 4237d422ce2eSmrg [C], [_LT_LANG(C)], 4238d422ce2eSmrg [C++], [_LT_LANG(CXX)], 4239d422ce2eSmrg [Go], [_LT_LANG(GO)], 4240d422ce2eSmrg [Java], [_LT_LANG(GCJ)], 4241d422ce2eSmrg [Fortran 77], [_LT_LANG(F77)], 4242d422ce2eSmrg [Fortran], [_LT_LANG(FC)], 4243d422ce2eSmrg [Windows Resource], [_LT_LANG(RC)], 4244d422ce2eSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4245d422ce2eSmrg [_LT_LANG($1)], 4246d422ce2eSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4247d422ce2eSmrg])# LT_LANG 4248d422ce2eSmrg 4249d422ce2eSmrg 4250d422ce2eSmrg# _LT_LANG(LANGNAME) 4251d422ce2eSmrg# ------------------ 4252d422ce2eSmrgm4_defun([_LT_LANG], 4253d422ce2eSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4254d422ce2eSmrg [LT_SUPPORTED_TAG([$1])dnl 4255d422ce2eSmrg m4_append([_LT_TAGS], [$1 ])dnl 4256d422ce2eSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4257d422ce2eSmrg _LT_LANG_$1_CONFIG($1)])dnl 4258d422ce2eSmrg])# _LT_LANG 4259d422ce2eSmrg 4260d422ce2eSmrg 4261d422ce2eSmrgm4_ifndef([AC_PROG_GO], [ 4262d422ce2eSmrg# NOTE: This macro has been submitted for inclusion into # 4263d422ce2eSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4264d422ce2eSmrg# a released version of Autoconf we should remove this # 4265d422ce2eSmrg# macro and use it instead. # 4266d422ce2eSmrgm4_defun([AC_PROG_GO], 4267d422ce2eSmrg[AC_LANG_PUSH(Go)dnl 4268d422ce2eSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4269d422ce2eSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4270d422ce2eSmrg_AC_ARG_VAR_LDFLAGS()dnl 4271d422ce2eSmrgAC_CHECK_TOOL(GOC, gccgo) 4272d422ce2eSmrgif test -z "$GOC"; then 4273d422ce2eSmrg if test -n "$ac_tool_prefix"; then 4274d422ce2eSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4275f3561b8bSmrg fi 4276d422ce2eSmrgfi 4277d422ce2eSmrgif test -z "$GOC"; then 4278d422ce2eSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4279d422ce2eSmrgfi 4280d422ce2eSmrg])#m4_defun 4281d422ce2eSmrg])#m4_ifndef 4282d422ce2eSmrg 4283d422ce2eSmrg 4284d422ce2eSmrg# _LT_LANG_DEFAULT_CONFIG 4285d422ce2eSmrg# ----------------------- 4286d422ce2eSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4287d422ce2eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4288d422ce2eSmrg [LT_LANG(CXX)], 4289d422ce2eSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4290d422ce2eSmrg 4291d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4292d422ce2eSmrg [LT_LANG(F77)], 4293d422ce2eSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4294d422ce2eSmrg 4295d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4296d422ce2eSmrg [LT_LANG(FC)], 4297d422ce2eSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4298d422ce2eSmrg 4299d422ce2eSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4300d422ce2eSmrgdnl pulling things in needlessly. 4301d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4302d422ce2eSmrg [LT_LANG(GCJ)], 4303d422ce2eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4304d422ce2eSmrg [LT_LANG(GCJ)], 4305d422ce2eSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4306d422ce2eSmrg [LT_LANG(GCJ)], 4307d422ce2eSmrg [m4_ifdef([AC_PROG_GCJ], 4308d422ce2eSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4309d422ce2eSmrg m4_ifdef([A][M_PROG_GCJ], 4310d422ce2eSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4311d422ce2eSmrg m4_ifdef([LT_PROG_GCJ], 4312d422ce2eSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4313d422ce2eSmrg 4314d422ce2eSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4315d422ce2eSmrg [LT_LANG(GO)], 4316d422ce2eSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4317d422ce2eSmrg 4318d422ce2eSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4319d422ce2eSmrg [LT_LANG(RC)], 4320d422ce2eSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4321d422ce2eSmrg])# _LT_LANG_DEFAULT_CONFIG 4322d422ce2eSmrg 4323d422ce2eSmrg# Obsolete macros: 4324d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4325d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4326d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4327d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4328d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4329d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 4330d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4331d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4332d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4333d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4334d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4335d422ce2eSmrg 4336d422ce2eSmrg 4337d422ce2eSmrg# _LT_TAG_COMPILER 4338d422ce2eSmrg# ---------------- 4339d422ce2eSmrgm4_defun([_LT_TAG_COMPILER], 4340d422ce2eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4341d422ce2eSmrg 4342d422ce2eSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4343d422ce2eSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4344d422ce2eSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4345d422ce2eSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4346d422ce2eSmrg 4347d422ce2eSmrg# If no C compiler was specified, use CC. 4348d422ce2eSmrgLTCC=${LTCC-"$CC"} 4349d422ce2eSmrg 4350d422ce2eSmrg# If no C compiler flags were specified, use CFLAGS. 4351d422ce2eSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4352d422ce2eSmrg 4353d422ce2eSmrg# Allow CC to be a program name with arguments. 4354d422ce2eSmrgcompiler=$CC 4355d422ce2eSmrg])# _LT_TAG_COMPILER 4356d422ce2eSmrg 4357d422ce2eSmrg 4358d422ce2eSmrg# _LT_COMPILER_BOILERPLATE 4359d422ce2eSmrg# ------------------------ 4360d422ce2eSmrg# Check for compiler boilerplate output or warnings with 4361d422ce2eSmrg# the simple compiler test code. 4362d422ce2eSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 4363d422ce2eSmrg[m4_require([_LT_DECL_SED])dnl 4364d422ce2eSmrgac_outfile=conftest.$ac_objext 4365d422ce2eSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4366d422ce2eSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4367d422ce2eSmrg_lt_compiler_boilerplate=`cat conftest.err` 4368d422ce2eSmrg$RM conftest* 4369d422ce2eSmrg])# _LT_COMPILER_BOILERPLATE 4370d422ce2eSmrg 4371d422ce2eSmrg 4372d422ce2eSmrg# _LT_LINKER_BOILERPLATE 4373d422ce2eSmrg# ---------------------- 4374d422ce2eSmrg# Check for linker boilerplate output or warnings with 4375d422ce2eSmrg# the simple link test code. 4376d422ce2eSmrgm4_defun([_LT_LINKER_BOILERPLATE], 4377d422ce2eSmrg[m4_require([_LT_DECL_SED])dnl 4378d422ce2eSmrgac_outfile=conftest.$ac_objext 4379d422ce2eSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4380d422ce2eSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4381d422ce2eSmrg_lt_linker_boilerplate=`cat conftest.err` 4382d422ce2eSmrg$RM -r conftest* 4383d422ce2eSmrg])# _LT_LINKER_BOILERPLATE 4384d422ce2eSmrg 4385d422ce2eSmrg# _LT_REQUIRED_DARWIN_CHECKS 4386d422ce2eSmrg# ------------------------- 4387d422ce2eSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4388d422ce2eSmrg case $host_os in 4389d422ce2eSmrg rhapsody* | darwin*) 4390d422ce2eSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4391d422ce2eSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4392d422ce2eSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4393d422ce2eSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4394d422ce2eSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4395d422ce2eSmrg _LT_DECL([], [DSYMUTIL], [1], 4396d422ce2eSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4397d422ce2eSmrg _LT_DECL([], [NMEDIT], [1], 4398d422ce2eSmrg [Tool to change global to local symbols on Mac OS X]) 4399d422ce2eSmrg _LT_DECL([], [LIPO], [1], 4400d422ce2eSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 4401d422ce2eSmrg _LT_DECL([], [OTOOL], [1], 4402d422ce2eSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4403d422ce2eSmrg _LT_DECL([], [OTOOL64], [1], 4404d422ce2eSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4405d422ce2eSmrg 4406d422ce2eSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4407d422ce2eSmrg [lt_cv_apple_cc_single_mod=no 4408d422ce2eSmrg if test -z "$LT_MULTI_MODULE"; then 4409d422ce2eSmrg # By default we will add the -single_module flag. You can override 4410d422ce2eSmrg # by either setting the environment variable LT_MULTI_MODULE 4411d422ce2eSmrg # non-empty at configure time, or by adding -multi_module to the 4412d422ce2eSmrg # link flags. 4413d422ce2eSmrg rm -rf libconftest.dylib* 4414d422ce2eSmrg echo "int foo(void){return 1;}" > conftest.c 4415d422ce2eSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4416d422ce2eSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4417d422ce2eSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4418d422ce2eSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4419d422ce2eSmrg _lt_result=$? 4420d422ce2eSmrg # If there is a non-empty error log, and "single_module" 4421d422ce2eSmrg # appears in it, assume the flag caused a linker warning 4422d422ce2eSmrg if test -s conftest.err && $GREP single_module conftest.err; then 4423d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4424d422ce2eSmrg # Otherwise, if the output was created with a 0 exit code from 4425d422ce2eSmrg # the compiler, it worked. 4426d422ce2eSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4427d422ce2eSmrg lt_cv_apple_cc_single_mod=yes 4428d422ce2eSmrg else 4429d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4430d422ce2eSmrg fi 4431d422ce2eSmrg rm -rf libconftest.dylib* 4432d422ce2eSmrg rm -f conftest.* 4433d422ce2eSmrg fi]) 4434d422ce2eSmrg 4435d422ce2eSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4436d422ce2eSmrg [lt_cv_ld_exported_symbols_list], 4437d422ce2eSmrg [lt_cv_ld_exported_symbols_list=no 4438d422ce2eSmrg save_LDFLAGS=$LDFLAGS 4439d422ce2eSmrg echo "_main" > conftest.sym 4440d422ce2eSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4441d422ce2eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4442d422ce2eSmrg [lt_cv_ld_exported_symbols_list=yes], 4443d422ce2eSmrg [lt_cv_ld_exported_symbols_list=no]) 4444d422ce2eSmrg LDFLAGS=$save_LDFLAGS 4445d422ce2eSmrg ]) 4446d422ce2eSmrg 4447d422ce2eSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4448d422ce2eSmrg [lt_cv_ld_force_load=no 4449d422ce2eSmrg cat > conftest.c << _LT_EOF 4450d422ce2eSmrgint forced_loaded() { return 2;} 4451d422ce2eSmrg_LT_EOF 4452d422ce2eSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4453d422ce2eSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4454d422ce2eSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4455d422ce2eSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4456d422ce2eSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4457d422ce2eSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4458d422ce2eSmrg cat > conftest.c << _LT_EOF 4459d422ce2eSmrgint main() { return 0;} 4460d422ce2eSmrg_LT_EOF 4461d422ce2eSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4462d422ce2eSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4463d422ce2eSmrg _lt_result=$? 4464d422ce2eSmrg if test -s conftest.err && $GREP force_load conftest.err; then 4465d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4466d422ce2eSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4467d422ce2eSmrg lt_cv_ld_force_load=yes 4468d422ce2eSmrg else 4469d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4470d422ce2eSmrg fi 4471d422ce2eSmrg rm -f conftest.err libconftest.a conftest conftest.c 4472d422ce2eSmrg rm -rf conftest.dSYM 4473d422ce2eSmrg ]) 4474d422ce2eSmrg case $host_os in 4475d422ce2eSmrg rhapsody* | darwin1.[[012]]) 4476d422ce2eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4477d422ce2eSmrg darwin1.*) 4478d422ce2eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4479d422ce2eSmrg darwin*) 4480d422ce2eSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4481d422ce2eSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4482d422ce2eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4483d422ce2eSmrg *) 4484d422ce2eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4485d422ce2eSmrg esac 4486d422ce2eSmrg ;; 4487d422ce2eSmrg esac 4488d422ce2eSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4489d422ce2eSmrg _lt_dar_single_mod='$single_module' 4490d422ce2eSmrg fi 4491d422ce2eSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4492d422ce2eSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4493d422ce2eSmrg else 4494d422ce2eSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4495d422ce2eSmrg fi 4496d422ce2eSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4497d422ce2eSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4498d422ce2eSmrg else 4499d422ce2eSmrg _lt_dsymutil= 4500d422ce2eSmrg fi 4501d422ce2eSmrg ;; 4502d422ce2eSmrg esac 4503d422ce2eSmrg]) 4504f3561b8bSmrg 4505f3561b8bSmrg 4506d422ce2eSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4507d422ce2eSmrg# --------------------------------- 4508d422ce2eSmrg# Checks for linker and compiler features on darwin 4509d422ce2eSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4510d422ce2eSmrg[ 4511d422ce2eSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4512d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4513d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4514d422ce2eSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4515d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4516d422ce2eSmrg if test yes = "$lt_cv_ld_force_load"; then 4517d422ce2eSmrg _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\"`' 4518d422ce2eSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4519d422ce2eSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4520d422ce2eSmrg else 4521d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4522d422ce2eSmrg fi 4523d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4524d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4525d422ce2eSmrg case $cc_basename in 4526d422ce2eSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4527d422ce2eSmrg *) _lt_dar_can_shared=$GCC ;; 4528d422ce2eSmrg esac 4529d422ce2eSmrg if test yes = "$_lt_dar_can_shared"; then 4530d422ce2eSmrg output_verbose_link_cmd=func_echo_all 4531d422ce2eSmrg _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" 4532d422ce2eSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4533d422ce2eSmrg _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" 4534d422ce2eSmrg _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" 4535d422ce2eSmrg m4_if([$1], [CXX], 4536d422ce2eSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4537d422ce2eSmrg _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" 4538d422ce2eSmrg _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" 4539d422ce2eSmrg fi 4540d422ce2eSmrg],[]) 4541d422ce2eSmrg else 4542d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4543d422ce2eSmrg fi 4544d422ce2eSmrg]) 4545f3561b8bSmrg 4546d422ce2eSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4547d422ce2eSmrg# ---------------------------------- 4548d422ce2eSmrg# Links a minimal program and checks the executable 4549d422ce2eSmrg# for the system default hardcoded library path. In most cases, 4550d422ce2eSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 4551d422ce2eSmrg# the location of the communication and MPI libs are included too. 4552d422ce2eSmrg# If we don't find anything, use the default library path according 4553d422ce2eSmrg# to the aix ld manual. 4554d422ce2eSmrg# Store the results from the different compilers for each TAGNAME. 4555d422ce2eSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 4556d422ce2eSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4557d422ce2eSmrg[m4_require([_LT_DECL_SED])dnl 4558d422ce2eSmrgif test set = "${lt_cv_aix_libpath+set}"; then 4559d422ce2eSmrg aix_libpath=$lt_cv_aix_libpath 4560d422ce2eSmrgelse 4561d422ce2eSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4562d422ce2eSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4563d422ce2eSmrg lt_aix_libpath_sed='[ 4564d422ce2eSmrg /Import File Strings/,/^$/ { 4565d422ce2eSmrg /^0/ { 4566d422ce2eSmrg s/^0 *\([^ ]*\) *$/\1/ 4567d422ce2eSmrg p 4568d422ce2eSmrg } 4569d422ce2eSmrg }]' 4570d422ce2eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4571d422ce2eSmrg # Check for a 64-bit object if we didn't find anything. 4572d422ce2eSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4573d422ce2eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4574d422ce2eSmrg fi],[]) 4575d422ce2eSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4576d422ce2eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4577d422ce2eSmrg fi 4578d422ce2eSmrg ]) 4579d422ce2eSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4580d422ce2eSmrgfi 4581d422ce2eSmrg])# _LT_SYS_MODULE_PATH_AIX 4582f3561b8bSmrg 4583f3561b8bSmrg 4584d422ce2eSmrg# _LT_SHELL_INIT(ARG) 4585d422ce2eSmrg# ------------------- 4586d422ce2eSmrgm4_define([_LT_SHELL_INIT], 4587d422ce2eSmrg[m4_divert_text([M4SH-INIT], [$1 4588d422ce2eSmrg])])# _LT_SHELL_INIT 4589f3561b8bSmrg 4590bd304fc0Smrg 4591f3561b8bSmrg 4592d422ce2eSmrg# _LT_PROG_ECHO_BACKSLASH 4593d422ce2eSmrg# ----------------------- 4594d422ce2eSmrg# Find how we can fake an echo command that does not interpret backslash. 4595d422ce2eSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 4596d422ce2eSmrg# of the generated configure script that will find a shell with a builtin 4597d422ce2eSmrg# printf (that we can use as an echo command). 4598d422ce2eSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4599d422ce2eSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4600d422ce2eSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4601d422ce2eSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4602f3561b8bSmrg 4603d422ce2eSmrgAC_MSG_CHECKING([how to print strings]) 4604d422ce2eSmrg# Test print first, because it will be a builtin if present. 4605d422ce2eSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4606d422ce2eSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4607d422ce2eSmrg ECHO='print -r --' 4608d422ce2eSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4609d422ce2eSmrg ECHO='printf %s\n' 4610d422ce2eSmrgelse 4611d422ce2eSmrg # Use this function as a fallback that always works. 4612d422ce2eSmrg func_fallback_echo () 4613d422ce2eSmrg { 4614d422ce2eSmrg eval 'cat <<_LTECHO_EOF 4615d422ce2eSmrg$[]1 4616d422ce2eSmrg_LTECHO_EOF' 4617d422ce2eSmrg } 4618d422ce2eSmrg ECHO='func_fallback_echo' 4619d422ce2eSmrgfi 4620f3561b8bSmrg 4621d422ce2eSmrg# func_echo_all arg... 4622d422ce2eSmrg# Invoke $ECHO with all args, space-separated. 4623d422ce2eSmrgfunc_echo_all () 4624d422ce2eSmrg{ 4625d422ce2eSmrg $ECHO "$*" 4626d422ce2eSmrg} 4627f3561b8bSmrg 4628d422ce2eSmrgcase $ECHO in 4629d422ce2eSmrg printf*) AC_MSG_RESULT([printf]) ;; 4630d422ce2eSmrg print*) AC_MSG_RESULT([print -r]) ;; 4631d422ce2eSmrg *) AC_MSG_RESULT([cat]) ;; 4632d422ce2eSmrgesac 4633f3561b8bSmrg 4634d422ce2eSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 4635d422ce2eSmrg[_AS_DETECT_SUGGESTED([ 4636d422ce2eSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4637d422ce2eSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4638d422ce2eSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4639d422ce2eSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4640d422ce2eSmrg PATH=/empty FPATH=/empty; export PATH FPATH 4641d422ce2eSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4642d422ce2eSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4643bd304fc0Smrg 4644d422ce2eSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4645d422ce2eSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4646d422ce2eSmrg])# _LT_PROG_ECHO_BACKSLASH 4647f3561b8bSmrg 46486257f37dSmrg 4649d422ce2eSmrg# _LT_WITH_SYSROOT 4650d422ce2eSmrg# ---------------- 4651d422ce2eSmrgAC_DEFUN([_LT_WITH_SYSROOT], 4652d422ce2eSmrg[m4_require([_LT_DECL_SED])dnl 4653d422ce2eSmrgAC_MSG_CHECKING([for sysroot]) 4654d422ce2eSmrgAC_ARG_WITH([sysroot], 4655d422ce2eSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4656d422ce2eSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 4657d422ce2eSmrg if not specified).])], 4658d422ce2eSmrg[], [with_sysroot=no]) 4659d422ce2eSmrg 4660d422ce2eSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 4661d422ce2eSmrgdnl in case the user passed a directory name. 4662d422ce2eSmrglt_sysroot= 4663d422ce2eSmrgcase $with_sysroot in #( 4664d422ce2eSmrg yes) 4665d422ce2eSmrg if test yes = "$GCC"; then 4666d422ce2eSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4667d422ce2eSmrg fi 4668d422ce2eSmrg ;; #( 4669d422ce2eSmrg /*) 4670d422ce2eSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4671d422ce2eSmrg ;; #( 4672d422ce2eSmrg no|'') 4673d422ce2eSmrg ;; #( 4674d422ce2eSmrg *) 4675d422ce2eSmrg AC_MSG_RESULT([$with_sysroot]) 4676d422ce2eSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4677d422ce2eSmrg ;; 4678d422ce2eSmrgesac 4679f3561b8bSmrg 4680d422ce2eSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4681d422ce2eSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4682d422ce2eSmrg[dependent libraries, and where our libraries should be installed.])]) 4683fc5a983dSmrg 4684d422ce2eSmrg# _LT_ENABLE_LOCK 4685d422ce2eSmrg# --------------- 4686d422ce2eSmrgm4_defun([_LT_ENABLE_LOCK], 4687d422ce2eSmrg[AC_ARG_ENABLE([libtool-lock], 4688d422ce2eSmrg [AS_HELP_STRING([--disable-libtool-lock], 4689d422ce2eSmrg [avoid locking (might break parallel builds)])]) 4690d422ce2eSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4691fc5a983dSmrg 4692d422ce2eSmrg# Some flags need to be propagated to the compiler or linker for good 4693d422ce2eSmrg# libtool support. 4694d422ce2eSmrgcase $host in 4695d422ce2eSmrgia64-*-hpux*) 4696d422ce2eSmrg # Find out what ABI is being produced by ac_compile, and set mode 4697d422ce2eSmrg # options accordingly. 4698d422ce2eSmrg echo 'int i;' > conftest.$ac_ext 4699d422ce2eSmrg if AC_TRY_EVAL(ac_compile); then 4700d422ce2eSmrg case `$FILECMD conftest.$ac_objext` in 4701d422ce2eSmrg *ELF-32*) 4702d422ce2eSmrg HPUX_IA64_MODE=32 47036257f37dSmrg ;; 4704d422ce2eSmrg *ELF-64*) 4705d422ce2eSmrg HPUX_IA64_MODE=64 4706f3561b8bSmrg ;; 4707d422ce2eSmrg esac 4708d422ce2eSmrg fi 4709d422ce2eSmrg rm -rf conftest* 4710d422ce2eSmrg ;; 4711d422ce2eSmrg*-*-irix6*) 4712d422ce2eSmrg # Find out what ABI is being produced by ac_compile, and set linker 4713d422ce2eSmrg # options accordingly. 4714d422ce2eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4715d422ce2eSmrg if AC_TRY_EVAL(ac_compile); then 4716d422ce2eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 4717d422ce2eSmrg case `$FILECMD conftest.$ac_objext` in 4718d422ce2eSmrg *32-bit*) 4719d422ce2eSmrg LD="${LD-ld} -melf32bsmip" 4720bd304fc0Smrg ;; 4721d422ce2eSmrg *N32*) 4722d422ce2eSmrg LD="${LD-ld} -melf32bmipn32" 4723bd304fc0Smrg ;; 4724d422ce2eSmrg *64-bit*) 4725d422ce2eSmrg LD="${LD-ld} -melf64bmip" 4726d422ce2eSmrg ;; 4727d422ce2eSmrg esac 4728d422ce2eSmrg else 4729d422ce2eSmrg case `$FILECMD conftest.$ac_objext` in 4730d422ce2eSmrg *32-bit*) 4731d422ce2eSmrg LD="${LD-ld} -32" 4732f3561b8bSmrg ;; 4733d422ce2eSmrg *N32*) 4734d422ce2eSmrg LD="${LD-ld} -n32" 4735bd304fc0Smrg ;; 4736d422ce2eSmrg *64-bit*) 4737d422ce2eSmrg LD="${LD-ld} -64" 4738f3561b8bSmrg ;; 4739d422ce2eSmrg esac 4740d422ce2eSmrg fi 4741d422ce2eSmrg fi 4742d422ce2eSmrg rm -rf conftest* 4743d422ce2eSmrg ;; 4744d422ce2eSmrg 4745d422ce2eSmrgmips64*-*linux*) 4746d422ce2eSmrg # Find out what ABI is being produced by ac_compile, and set linker 4747d422ce2eSmrg # options accordingly. 4748d422ce2eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4749d422ce2eSmrg if AC_TRY_EVAL(ac_compile); then 4750d422ce2eSmrg emul=elf 4751d422ce2eSmrg case `$FILECMD conftest.$ac_objext` in 4752d422ce2eSmrg *32-bit*) 4753d422ce2eSmrg emul="${emul}32" 4754d422ce2eSmrg ;; 4755d422ce2eSmrg *64-bit*) 4756d422ce2eSmrg emul="${emul}64" 4757d422ce2eSmrg ;; 4758d422ce2eSmrg esac 4759d422ce2eSmrg case `$FILECMD conftest.$ac_objext` in 4760d422ce2eSmrg *MSB*) 4761d422ce2eSmrg emul="${emul}btsmip" 4762d422ce2eSmrg ;; 4763d422ce2eSmrg *LSB*) 4764d422ce2eSmrg emul="${emul}ltsmip" 4765d422ce2eSmrg ;; 4766d422ce2eSmrg esac 4767d422ce2eSmrg case `$FILECMD conftest.$ac_objext` in 4768d422ce2eSmrg *N32*) 4769d422ce2eSmrg emul="${emul}n32" 4770d422ce2eSmrg ;; 4771d422ce2eSmrg esac 4772d422ce2eSmrg LD="${LD-ld} -m $emul" 4773d422ce2eSmrg fi 4774d422ce2eSmrg rm -rf conftest* 4775d422ce2eSmrg ;; 4776d422ce2eSmrg 4777d422ce2eSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4778d422ce2eSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4779d422ce2eSmrg # Find out what ABI is being produced by ac_compile, and set linker 4780d422ce2eSmrg # options accordingly. Note that the listed cases only cover the 4781d422ce2eSmrg # situations where additional linker options are needed (such as when 4782d422ce2eSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4783d422ce2eSmrg # vice versa); the common cases where no linker options are needed do 4784d422ce2eSmrg # not appear in the list. 4785d422ce2eSmrg echo 'int i;' > conftest.$ac_ext 4786d422ce2eSmrg if AC_TRY_EVAL(ac_compile); then 4787d422ce2eSmrg case `$FILECMD conftest.o` in 4788d422ce2eSmrg *32-bit*) 4789d422ce2eSmrg case $host in 4790d422ce2eSmrg x86_64-*kfreebsd*-gnu) 4791d422ce2eSmrg LD="${LD-ld} -m elf_i386_fbsd" 4792d422ce2eSmrg ;; 4793d422ce2eSmrg x86_64-*linux*) 4794d422ce2eSmrg case `$FILECMD conftest.o` in 4795d422ce2eSmrg *x86-64*) 4796d422ce2eSmrg LD="${LD-ld} -m elf32_x86_64" 4797d422ce2eSmrg ;; 4798d422ce2eSmrg *) 4799d422ce2eSmrg LD="${LD-ld} -m elf_i386" 4800d422ce2eSmrg ;; 4801d422ce2eSmrg esac 4802d422ce2eSmrg ;; 4803d422ce2eSmrg powerpc64le-*linux*) 4804d422ce2eSmrg LD="${LD-ld} -m elf32lppclinux" 4805d422ce2eSmrg ;; 4806d422ce2eSmrg powerpc64-*linux*) 4807d422ce2eSmrg LD="${LD-ld} -m elf32ppclinux" 4808d422ce2eSmrg ;; 4809d422ce2eSmrg s390x-*linux*) 4810d422ce2eSmrg LD="${LD-ld} -m elf_s390" 4811d422ce2eSmrg ;; 4812d422ce2eSmrg sparc64-*linux*) 4813d422ce2eSmrg LD="${LD-ld} -m elf32_sparc" 4814d422ce2eSmrg ;; 4815d422ce2eSmrg esac 4816d422ce2eSmrg ;; 4817d422ce2eSmrg *64-bit*) 4818d422ce2eSmrg case $host in 4819d422ce2eSmrg x86_64-*kfreebsd*-gnu) 4820d422ce2eSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 4821d422ce2eSmrg ;; 4822d422ce2eSmrg x86_64-*linux*) 4823d422ce2eSmrg LD="${LD-ld} -m elf_x86_64" 4824d422ce2eSmrg ;; 4825d422ce2eSmrg powerpcle-*linux*) 4826d422ce2eSmrg LD="${LD-ld} -m elf64lppc" 4827d422ce2eSmrg ;; 4828d422ce2eSmrg powerpc-*linux*) 4829d422ce2eSmrg LD="${LD-ld} -m elf64ppc" 4830d422ce2eSmrg ;; 4831d422ce2eSmrg s390*-*linux*|s390*-*tpf*) 4832d422ce2eSmrg LD="${LD-ld} -m elf64_s390" 4833d422ce2eSmrg ;; 4834d422ce2eSmrg sparc*-*linux*) 4835d422ce2eSmrg LD="${LD-ld} -m elf64_sparc" 4836d422ce2eSmrg ;; 4837f3561b8bSmrg esac 4838f3561b8bSmrg ;; 4839d422ce2eSmrg esac 4840d422ce2eSmrg fi 4841d422ce2eSmrg rm -rf conftest* 4842d422ce2eSmrg ;; 4843fc5a983dSmrg 4844d422ce2eSmrg*-*-sco3.2v5*) 4845d422ce2eSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4846d422ce2eSmrg SAVE_CFLAGS=$CFLAGS 4847d422ce2eSmrg CFLAGS="$CFLAGS -belf" 4848d422ce2eSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4849d422ce2eSmrg [AC_LANG_PUSH(C) 4850d422ce2eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4851d422ce2eSmrg AC_LANG_POP]) 4852d422ce2eSmrg if test yes != "$lt_cv_cc_needs_belf"; then 4853d422ce2eSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4854d422ce2eSmrg CFLAGS=$SAVE_CFLAGS 4855d422ce2eSmrg fi 4856d422ce2eSmrg ;; 4857d422ce2eSmrg*-*solaris*) 4858d422ce2eSmrg # Find out what ABI is being produced by ac_compile, and set linker 4859d422ce2eSmrg # options accordingly. 4860d422ce2eSmrg echo 'int i;' > conftest.$ac_ext 4861d422ce2eSmrg if AC_TRY_EVAL(ac_compile); then 4862d422ce2eSmrg case `$FILECMD conftest.o` in 4863d422ce2eSmrg *64-bit*) 4864d422ce2eSmrg case $lt_cv_prog_gnu_ld in 4865d422ce2eSmrg yes*) 4866d422ce2eSmrg case $host in 4867d422ce2eSmrg i?86-*-solaris*|x86_64-*-solaris*) 4868d422ce2eSmrg LD="${LD-ld} -m elf_x86_64" 4869d422ce2eSmrg ;; 4870d422ce2eSmrg sparc*-*-solaris*) 4871d422ce2eSmrg LD="${LD-ld} -m elf64_sparc" 4872d422ce2eSmrg ;; 4873d422ce2eSmrg esac 4874d422ce2eSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4875d422ce2eSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4876d422ce2eSmrg LD=${LD-ld}_sol2 4877d422ce2eSmrg fi 4878d422ce2eSmrg ;; 4879f3561b8bSmrg *) 4880d422ce2eSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4881d422ce2eSmrg LD="${LD-ld} -64" 4882d422ce2eSmrg fi 4883d422ce2eSmrg ;; 4884f3561b8bSmrg esac 4885f3561b8bSmrg ;; 4886f3561b8bSmrg esac 4887f3561b8bSmrg fi 4888d422ce2eSmrg rm -rf conftest* 4889d422ce2eSmrg ;; 4890f3561b8bSmrgesac 4891bd304fc0Smrg 4892d422ce2eSmrgneed_locks=$enable_libtool_lock 4893d422ce2eSmrg])# _LT_ENABLE_LOCK 4894d422ce2eSmrg 4895d422ce2eSmrg 4896d422ce2eSmrg# _LT_PROG_AR 4897d422ce2eSmrg# ----------- 4898d422ce2eSmrgm4_defun([_LT_PROG_AR], 4899d422ce2eSmrg[AC_CHECK_TOOLS(AR, [ar], false) 4900d422ce2eSmrg: ${AR=ar} 4901d422ce2eSmrg_LT_DECL([], [AR], [1], [The archiver]) 4902d422ce2eSmrg 4903d422ce2eSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4904d422ce2eSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4905d422ce2eSmrg# higher priority because thats what people were doing historically (setting 4906d422ce2eSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4907d422ce2eSmrg# variable obsoleted/removed. 4908d422ce2eSmrg 4909d422ce2eSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4910d422ce2eSmrglt_ar_flags=$AR_FLAGS 4911d422ce2eSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4912d422ce2eSmrg 4913d422ce2eSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4914d422ce2eSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4915d422ce2eSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4916d422ce2eSmrg [Flags to create an archive]) 4917d422ce2eSmrg 4918d422ce2eSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4919d422ce2eSmrg [lt_cv_ar_at_file=no 4920d422ce2eSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4921d422ce2eSmrg [echo conftest.$ac_objext > conftest.lst 4922d422ce2eSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4923d422ce2eSmrg AC_TRY_EVAL([lt_ar_try]) 4924d422ce2eSmrg if test 0 -eq "$ac_status"; then 4925d422ce2eSmrg # Ensure the archiver fails upon bogus file names. 4926d422ce2eSmrg rm -f conftest.$ac_objext libconftest.a 4927d422ce2eSmrg AC_TRY_EVAL([lt_ar_try]) 4928d422ce2eSmrg if test 0 -ne "$ac_status"; then 4929d422ce2eSmrg lt_cv_ar_at_file=@ 4930d422ce2eSmrg fi 4931d422ce2eSmrg fi 4932d422ce2eSmrg rm -f conftest.* libconftest.a 4933d422ce2eSmrg ]) 4934d422ce2eSmrg ]) 4935d422ce2eSmrg 4936d422ce2eSmrgif test no = "$lt_cv_ar_at_file"; then 4937d422ce2eSmrg archiver_list_spec= 4938d422ce2eSmrgelse 4939d422ce2eSmrg archiver_list_spec=$lt_cv_ar_at_file 4940d422ce2eSmrgfi 4941d422ce2eSmrg_LT_DECL([], [archiver_list_spec], [1], 4942d422ce2eSmrg [How to feed a file listing to the archiver]) 4943d422ce2eSmrg])# _LT_PROG_AR 4944d422ce2eSmrg 4945d422ce2eSmrg 4946d422ce2eSmrg# _LT_CMD_OLD_ARCHIVE 4947d422ce2eSmrg# ------------------- 4948d422ce2eSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4949d422ce2eSmrg[_LT_PROG_AR 4950d422ce2eSmrg 4951d422ce2eSmrgAC_CHECK_TOOL(STRIP, strip, :) 4952d422ce2eSmrgtest -z "$STRIP" && STRIP=: 4953d422ce2eSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4954d422ce2eSmrg 4955d422ce2eSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4956d422ce2eSmrgtest -z "$RANLIB" && RANLIB=: 4957d422ce2eSmrg_LT_DECL([], [RANLIB], [1], 4958d422ce2eSmrg [Commands used to install an old-style archive]) 4959d422ce2eSmrg 4960d422ce2eSmrg# Determine commands to create old-style static archives. 4961d422ce2eSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4962d422ce2eSmrgold_postinstall_cmds='chmod 644 $oldlib' 4963d422ce2eSmrgold_postuninstall_cmds= 4964fc5a983dSmrg 4965d422ce2eSmrgif test -n "$RANLIB"; then 4966f3561b8bSmrg case $host_os in 4967d422ce2eSmrg bitrig* | openbsd*) 4968d422ce2eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 4969f3561b8bSmrg ;; 4970d422ce2eSmrg *) 4971d422ce2eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 4972f3561b8bSmrg ;; 4973fc5a983dSmrg esac 4974d422ce2eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4975d422ce2eSmrgfi 4976fc5a983dSmrg 4977d422ce2eSmrgcase $host_os in 4978d422ce2eSmrg darwin*) 4979d422ce2eSmrg lock_old_archive_extraction=yes ;; 4980d422ce2eSmrg *) 4981d422ce2eSmrg lock_old_archive_extraction=no ;; 4982d422ce2eSmrgesac 4983d422ce2eSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 4984d422ce2eSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4985d422ce2eSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 4986d422ce2eSmrg [Commands used to build an old-style archive]) 4987d422ce2eSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 4988d422ce2eSmrg [Whether to use a lock for old archive extraction]) 4989d422ce2eSmrg])# _LT_CMD_OLD_ARCHIVE 4990bd304fc0Smrg 4991bd304fc0Smrg 4992d422ce2eSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4993d422ce2eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4994d422ce2eSmrg# ---------------------------------------------------------------- 4995d422ce2eSmrg# Check whether the given compiler option works 4996d422ce2eSmrgAC_DEFUN([_LT_COMPILER_OPTION], 4997d422ce2eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4998d422ce2eSmrgm4_require([_LT_DECL_SED])dnl 4999d422ce2eSmrgAC_CACHE_CHECK([$1], [$2], 5000d422ce2eSmrg [$2=no 5001d422ce2eSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5002d422ce2eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5003d422ce2eSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5004d422ce2eSmrg # Insert the option either (1) after the last *FLAGS variable, or 5005d422ce2eSmrg # (2) before a word containing "conftest.", or (3) at the end. 5006d422ce2eSmrg # Note that $ac_compile itself does not contain backslashes and begins 5007d422ce2eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5008d422ce2eSmrg # The option is referenced via a variable to avoid confusing sed. 5009d422ce2eSmrg lt_compile=`echo "$ac_compile" | $SED \ 5010d422ce2eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5011d422ce2eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5012d422ce2eSmrg -e 's:$: $lt_compiler_flag:'` 5013d422ce2eSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5014d422ce2eSmrg (eval "$lt_compile" 2>conftest.err) 5015d422ce2eSmrg ac_status=$? 5016d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5017d422ce2eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5018d422ce2eSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 5019d422ce2eSmrg # The compiler can only warn and ignore the option if not recognized 5020d422ce2eSmrg # So say no if there are warnings other than the usual output. 5021d422ce2eSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5022d422ce2eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5023d422ce2eSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5024d422ce2eSmrg $2=yes 5025d422ce2eSmrg fi 5026d422ce2eSmrg fi 5027d422ce2eSmrg $RM conftest* 5028d422ce2eSmrg]) 5029fc5a983dSmrg 5030d422ce2eSmrgif test yes = "[$]$2"; then 5031d422ce2eSmrg m4_if([$5], , :, [$5]) 5032d422ce2eSmrgelse 5033d422ce2eSmrg m4_if([$6], , :, [$6]) 5034d422ce2eSmrgfi 5035d422ce2eSmrg])# _LT_COMPILER_OPTION 5036fc5a983dSmrg 5037d422ce2eSmrg# Old name: 5038d422ce2eSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5039d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 5040d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5041fc5a983dSmrg 5042fc5a983dSmrg 5043d422ce2eSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5044d422ce2eSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5045d422ce2eSmrg# ---------------------------------------------------- 5046d422ce2eSmrg# Check whether the given linker option works 5047d422ce2eSmrgAC_DEFUN([_LT_LINKER_OPTION], 5048d422ce2eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5049d422ce2eSmrgm4_require([_LT_DECL_SED])dnl 5050d422ce2eSmrgAC_CACHE_CHECK([$1], [$2], 5051d422ce2eSmrg [$2=no 5052d422ce2eSmrg save_LDFLAGS=$LDFLAGS 5053d422ce2eSmrg LDFLAGS="$LDFLAGS $3" 5054d422ce2eSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5055d422ce2eSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5056d422ce2eSmrg # The linker can only warn and ignore the option if not recognized 5057d422ce2eSmrg # So say no if there are warnings 5058d422ce2eSmrg if test -s conftest.err; then 5059d422ce2eSmrg # Append any errors to the config.log. 5060d422ce2eSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5061d422ce2eSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5062d422ce2eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5063d422ce2eSmrg if diff conftest.exp conftest.er2 >/dev/null; then 5064d422ce2eSmrg $2=yes 5065d422ce2eSmrg fi 5066d422ce2eSmrg else 5067d422ce2eSmrg $2=yes 5068d422ce2eSmrg fi 5069d422ce2eSmrg fi 5070d422ce2eSmrg $RM -r conftest* 5071d422ce2eSmrg LDFLAGS=$save_LDFLAGS 5072d422ce2eSmrg]) 5073d422ce2eSmrg 5074d422ce2eSmrgif test yes = "[$]$2"; then 5075d422ce2eSmrg m4_if([$4], , :, [$4]) 5076d422ce2eSmrgelse 5077d422ce2eSmrg m4_if([$5], , :, [$5]) 5078d422ce2eSmrgfi 5079d422ce2eSmrg])# _LT_LINKER_OPTION 5080d422ce2eSmrg 5081d422ce2eSmrg# Old name: 5082d422ce2eSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5083d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 5084d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5085fc5a983dSmrg 5086fc5a983dSmrg 5087d422ce2eSmrg# LT_CMD_MAX_LEN 5088d422ce2eSmrg#--------------- 5089d422ce2eSmrgAC_DEFUN([LT_CMD_MAX_LEN], 5090d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5091d422ce2eSmrg# find the maximum length of command line arguments 5092d422ce2eSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5093d422ce2eSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5094d422ce2eSmrg i=0 5095d422ce2eSmrg teststring=ABCD 5096fc5a983dSmrg 5097d422ce2eSmrg case $build_os in 5098d422ce2eSmrg msdosdjgpp*) 5099d422ce2eSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5100d422ce2eSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5101d422ce2eSmrg # during glob expansion). Even if it were fixed, the result of this 5102d422ce2eSmrg # check would be larger than it should be. 5103d422ce2eSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5104d422ce2eSmrg ;; 5105f3561b8bSmrg 5106d422ce2eSmrg gnu*) 5107d422ce2eSmrg # Under GNU Hurd, this test is not required because there is 5108d422ce2eSmrg # no limit to the length of command line arguments. 5109d422ce2eSmrg # Libtool will interpret -1 as no limit whatsoever 5110d422ce2eSmrg lt_cv_sys_max_cmd_len=-1; 5111d422ce2eSmrg ;; 5112fc5a983dSmrg 5113d422ce2eSmrg cygwin* | mingw* | cegcc*) 5114d422ce2eSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5115d422ce2eSmrg # about 5 minutes as the teststring grows exponentially. 5116d422ce2eSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 5117d422ce2eSmrg # you end up with a "frozen" computer, even though with patience 5118d422ce2eSmrg # the test eventually succeeds (with a max line length of 256k). 5119d422ce2eSmrg # Instead, let's just punt: use the minimum linelength reported by 5120d422ce2eSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 5121d422ce2eSmrg lt_cv_sys_max_cmd_len=8192; 5122d422ce2eSmrg ;; 5123bd304fc0Smrg 5124d422ce2eSmrg mint*) 5125d422ce2eSmrg # On MiNT this can take a long time and run out of memory. 5126d422ce2eSmrg lt_cv_sys_max_cmd_len=8192; 5127d422ce2eSmrg ;; 51286257f37dSmrg 5129d422ce2eSmrg amigaos*) 5130d422ce2eSmrg # On AmigaOS with pdksh, this test takes hours, literally. 5131d422ce2eSmrg # So we just punt and use a minimum line length of 8192. 5132d422ce2eSmrg lt_cv_sys_max_cmd_len=8192; 5133d422ce2eSmrg ;; 5134fc5a983dSmrg 5135d422ce2eSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5136d422ce2eSmrg # This has been around since 386BSD, at least. Likely further. 5137d422ce2eSmrg if test -x /sbin/sysctl; then 5138d422ce2eSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5139d422ce2eSmrg elif test -x /usr/sbin/sysctl; then 5140d422ce2eSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5141d422ce2eSmrg else 5142d422ce2eSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5143d422ce2eSmrg fi 5144d422ce2eSmrg # And add a safety zone 5145d422ce2eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5146d422ce2eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5147d422ce2eSmrg ;; 5148fc5a983dSmrg 5149d422ce2eSmrg interix*) 5150d422ce2eSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5151d422ce2eSmrg lt_cv_sys_max_cmd_len=196608 5152d422ce2eSmrg ;; 5153d422ce2eSmrg 5154d422ce2eSmrg os2*) 5155d422ce2eSmrg # The test takes a long time on OS/2. 5156d422ce2eSmrg lt_cv_sys_max_cmd_len=8192 5157d422ce2eSmrg ;; 5158d422ce2eSmrg 5159d422ce2eSmrg osf*) 5160d422ce2eSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5161d422ce2eSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5162d422ce2eSmrg # nice to cause kernel panics so lets avoid the loop below. 5163d422ce2eSmrg # First set a reasonable default. 5164d422ce2eSmrg lt_cv_sys_max_cmd_len=16384 5165d422ce2eSmrg # 5166d422ce2eSmrg if test -x /sbin/sysconfig; then 5167d422ce2eSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5168d422ce2eSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5169d422ce2eSmrg esac 5170d422ce2eSmrg fi 5171d422ce2eSmrg ;; 5172d422ce2eSmrg sco3.2v5*) 5173d422ce2eSmrg lt_cv_sys_max_cmd_len=102400 5174d422ce2eSmrg ;; 5175d422ce2eSmrg sysv5* | sco5v6* | sysv4.2uw2*) 5176d422ce2eSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5177d422ce2eSmrg if test -n "$kargmax"; then 5178d422ce2eSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5179d422ce2eSmrg else 5180d422ce2eSmrg lt_cv_sys_max_cmd_len=32768 5181d422ce2eSmrg fi 5182d422ce2eSmrg ;; 5183d422ce2eSmrg *) 5184d422ce2eSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5185d422ce2eSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5186d422ce2eSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5187d422ce2eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5188d422ce2eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5189d422ce2eSmrg else 5190d422ce2eSmrg # Make teststring a little bigger before we do anything with it. 5191d422ce2eSmrg # a 1K string should be a reasonable start. 5192d422ce2eSmrg for i in 1 2 3 4 5 6 7 8; do 5193d422ce2eSmrg teststring=$teststring$teststring 5194d422ce2eSmrg done 5195d422ce2eSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5196d422ce2eSmrg # If test is not a shell built-in, we'll probably end up computing a 5197d422ce2eSmrg # maximum length that is only half of the actual maximum length, but 5198d422ce2eSmrg # we can't tell. 5199d422ce2eSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5200d422ce2eSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5201d422ce2eSmrg test 17 != "$i" # 1/2 MB should be enough 5202d422ce2eSmrg do 5203d422ce2eSmrg i=`expr $i + 1` 5204d422ce2eSmrg teststring=$teststring$teststring 5205d422ce2eSmrg done 5206d422ce2eSmrg # Only check the string length outside the loop. 5207d422ce2eSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5208d422ce2eSmrg teststring= 5209d422ce2eSmrg # Add a significant safety factor because C++ compilers can tack on 5210d422ce2eSmrg # massive amounts of additional arguments before passing them to the 5211d422ce2eSmrg # linker. It appears as though 1/2 is a usable value. 5212d422ce2eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5213d422ce2eSmrg fi 5214d422ce2eSmrg ;; 5215d422ce2eSmrg esac 5216d422ce2eSmrg]) 5217d422ce2eSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 5218d422ce2eSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5219d422ce2eSmrgelse 5220d422ce2eSmrg AC_MSG_RESULT(none) 5221d422ce2eSmrgfi 5222d422ce2eSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5223d422ce2eSmrg_LT_DECL([], [max_cmd_len], [0], 5224d422ce2eSmrg [What is the maximum length of a command?]) 5225d422ce2eSmrg])# LT_CMD_MAX_LEN 5226fc5a983dSmrg 5227d422ce2eSmrg# Old name: 5228d422ce2eSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5229d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 5230d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5231fc5a983dSmrg 5232fc5a983dSmrg 5233d422ce2eSmrg# _LT_HEADER_DLFCN 5234d422ce2eSmrg# ---------------- 5235d422ce2eSmrgm4_defun([_LT_HEADER_DLFCN], 5236d422ce2eSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5237d422ce2eSmrg])# _LT_HEADER_DLFCN 5238fc5a983dSmrg 5239fc5a983dSmrg 5240d422ce2eSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5241d422ce2eSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5242d422ce2eSmrg# ---------------------------------------------------------------- 5243d422ce2eSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 5244d422ce2eSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5245d422ce2eSmrgif test yes = "$cross_compiling"; then : 5246d422ce2eSmrg [$4] 5247d422ce2eSmrgelse 5248d422ce2eSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5249d422ce2eSmrg lt_status=$lt_dlunknown 5250d422ce2eSmrg cat > conftest.$ac_ext <<_LT_EOF 5251d422ce2eSmrg[#line $LINENO "configure" 5252d422ce2eSmrg#include "confdefs.h" 5253fc5a983dSmrg 5254d422ce2eSmrg#if HAVE_DLFCN_H 5255d422ce2eSmrg#include <dlfcn.h> 5256d422ce2eSmrg#endif 5257fc5a983dSmrg 5258d422ce2eSmrg#include <stdio.h> 5259fc5a983dSmrg 5260d422ce2eSmrg#ifdef RTLD_GLOBAL 5261d422ce2eSmrg# define LT_DLGLOBAL RTLD_GLOBAL 5262d422ce2eSmrg#else 5263d422ce2eSmrg# ifdef DL_GLOBAL 5264d422ce2eSmrg# define LT_DLGLOBAL DL_GLOBAL 5265d422ce2eSmrg# else 5266d422ce2eSmrg# define LT_DLGLOBAL 0 5267d422ce2eSmrg# endif 5268d422ce2eSmrg#endif 5269fc5a983dSmrg 5270d422ce2eSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5271d422ce2eSmrg find out it does not work in some platform. */ 5272d422ce2eSmrg#ifndef LT_DLLAZY_OR_NOW 5273d422ce2eSmrg# ifdef RTLD_LAZY 5274d422ce2eSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5275d422ce2eSmrg# else 5276d422ce2eSmrg# ifdef DL_LAZY 5277d422ce2eSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 5278d422ce2eSmrg# else 5279d422ce2eSmrg# ifdef RTLD_NOW 5280d422ce2eSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5281d422ce2eSmrg# else 5282d422ce2eSmrg# ifdef DL_NOW 5283d422ce2eSmrg# define LT_DLLAZY_OR_NOW DL_NOW 5284d422ce2eSmrg# else 5285d422ce2eSmrg# define LT_DLLAZY_OR_NOW 0 5286d422ce2eSmrg# endif 5287d422ce2eSmrg# endif 5288d422ce2eSmrg# endif 5289d422ce2eSmrg# endif 5290d422ce2eSmrg#endif 5291fc5a983dSmrg 5292d422ce2eSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 5293d422ce2eSmrg correspondingly for the symbols needed. */ 5294d422ce2eSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5295d422ce2eSmrgint fnord () __attribute__((visibility("default"))); 5296d422ce2eSmrg#endif 5297fc5a983dSmrg 5298d422ce2eSmrgint fnord () { return 42; } 5299d422ce2eSmrgint main () 5300d422ce2eSmrg{ 5301d422ce2eSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5302d422ce2eSmrg int status = $lt_dlunknown; 5303fc5a983dSmrg 5304d422ce2eSmrg if (self) 5305d422ce2eSmrg { 5306d422ce2eSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5307f3561b8bSmrg else 5308d422ce2eSmrg { 5309d422ce2eSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5310d422ce2eSmrg else puts (dlerror ()); 5311d422ce2eSmrg } 5312d422ce2eSmrg /* dlclose (self); */ 5313d422ce2eSmrg } 5314d422ce2eSmrg else 5315d422ce2eSmrg puts (dlerror ()); 5316fc5a983dSmrg 5317d422ce2eSmrg return status; 5318d422ce2eSmrg}] 5319d422ce2eSmrg_LT_EOF 5320d422ce2eSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5321d422ce2eSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5322d422ce2eSmrg lt_status=$? 5323d422ce2eSmrg case x$lt_status in 5324d422ce2eSmrg x$lt_dlno_uscore) $1 ;; 5325d422ce2eSmrg x$lt_dlneed_uscore) $2 ;; 5326d422ce2eSmrg x$lt_dlunknown|x*) $3 ;; 5327d422ce2eSmrg esac 5328d422ce2eSmrg else : 5329d422ce2eSmrg # compilation failed 5330d422ce2eSmrg $3 5331d422ce2eSmrg fi 5332d422ce2eSmrgfi 5333d422ce2eSmrgrm -fr conftest* 5334d422ce2eSmrg])# _LT_TRY_DLOPEN_SELF 5335fc5a983dSmrg 5336f3561b8bSmrg 5337d422ce2eSmrg# LT_SYS_DLOPEN_SELF 5338d422ce2eSmrg# ------------------ 5339d422ce2eSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5340d422ce2eSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5341d422ce2eSmrgif test yes != "$enable_dlopen"; then 5342d422ce2eSmrg enable_dlopen=unknown 5343d422ce2eSmrg enable_dlopen_self=unknown 5344d422ce2eSmrg enable_dlopen_self_static=unknown 5345d422ce2eSmrgelse 5346d422ce2eSmrg lt_cv_dlopen=no 5347d422ce2eSmrg lt_cv_dlopen_libs= 5348fc5a983dSmrg 5349d422ce2eSmrg case $host_os in 5350d422ce2eSmrg beos*) 5351d422ce2eSmrg lt_cv_dlopen=load_add_on 5352d422ce2eSmrg lt_cv_dlopen_libs= 5353d422ce2eSmrg lt_cv_dlopen_self=yes 5354d422ce2eSmrg ;; 5355fc5a983dSmrg 5356d422ce2eSmrg mingw* | pw32* | cegcc*) 5357d422ce2eSmrg lt_cv_dlopen=LoadLibrary 5358d422ce2eSmrg lt_cv_dlopen_libs= 5359d422ce2eSmrg ;; 5360fc5a983dSmrg 5361d422ce2eSmrg cygwin*) 5362d422ce2eSmrg lt_cv_dlopen=dlopen 5363d422ce2eSmrg lt_cv_dlopen_libs= 5364d422ce2eSmrg ;; 5365fc5a983dSmrg 5366d422ce2eSmrg darwin*) 5367d422ce2eSmrg # if libdl is installed we need to link against it 5368d422ce2eSmrg AC_CHECK_LIB([dl], [dlopen], 5369d422ce2eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5370d422ce2eSmrg lt_cv_dlopen=dyld 5371d422ce2eSmrg lt_cv_dlopen_libs= 5372d422ce2eSmrg lt_cv_dlopen_self=yes 5373d422ce2eSmrg ]) 5374d422ce2eSmrg ;; 5375fc5a983dSmrg 5376d422ce2eSmrg tpf*) 5377d422ce2eSmrg # Don't try to run any link tests for TPF. We know it's impossible 5378d422ce2eSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 5379d422ce2eSmrg lt_cv_dlopen=dlopen 5380d422ce2eSmrg lt_cv_dlopen_libs= 5381d422ce2eSmrg lt_cv_dlopen_self=no 5382d422ce2eSmrg ;; 5383fc5a983dSmrg 5384d422ce2eSmrg *) 5385d422ce2eSmrg AC_CHECK_FUNC([shl_load], 5386d422ce2eSmrg [lt_cv_dlopen=shl_load], 5387d422ce2eSmrg [AC_CHECK_LIB([dld], [shl_load], 5388d422ce2eSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5389d422ce2eSmrg [AC_CHECK_FUNC([dlopen], 5390d422ce2eSmrg [lt_cv_dlopen=dlopen], 5391d422ce2eSmrg [AC_CHECK_LIB([dl], [dlopen], 5392d422ce2eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5393d422ce2eSmrg [AC_CHECK_LIB([svld], [dlopen], 5394d422ce2eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5395d422ce2eSmrg [AC_CHECK_LIB([dld], [dld_link], 5396d422ce2eSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5397d422ce2eSmrg ]) 5398d422ce2eSmrg ]) 5399d422ce2eSmrg ]) 5400d422ce2eSmrg ]) 5401d422ce2eSmrg ]) 5402d422ce2eSmrg ;; 5403d422ce2eSmrg esac 5404fc5a983dSmrg 5405d422ce2eSmrg if test no = "$lt_cv_dlopen"; then 5406d422ce2eSmrg enable_dlopen=no 5407d422ce2eSmrg else 5408d422ce2eSmrg enable_dlopen=yes 5409d422ce2eSmrg fi 5410fc5a983dSmrg 5411d422ce2eSmrg case $lt_cv_dlopen in 5412d422ce2eSmrg dlopen) 5413d422ce2eSmrg save_CPPFLAGS=$CPPFLAGS 5414d422ce2eSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5415fc5a983dSmrg 5416d422ce2eSmrg save_LDFLAGS=$LDFLAGS 5417d422ce2eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5418fc5a983dSmrg 5419d422ce2eSmrg save_LIBS=$LIBS 5420d422ce2eSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 5421fc5a983dSmrg 5422d422ce2eSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 5423d422ce2eSmrg lt_cv_dlopen_self, [dnl 5424d422ce2eSmrg _LT_TRY_DLOPEN_SELF( 5425d422ce2eSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5426d422ce2eSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5427d422ce2eSmrg ]) 5428fc5a983dSmrg 5429d422ce2eSmrg if test yes = "$lt_cv_dlopen_self"; then 5430d422ce2eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5431d422ce2eSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5432d422ce2eSmrg lt_cv_dlopen_self_static, [dnl 5433d422ce2eSmrg _LT_TRY_DLOPEN_SELF( 5434d422ce2eSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5435d422ce2eSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5436d422ce2eSmrg ]) 5437d422ce2eSmrg fi 5438fc5a983dSmrg 5439d422ce2eSmrg CPPFLAGS=$save_CPPFLAGS 5440d422ce2eSmrg LDFLAGS=$save_LDFLAGS 5441d422ce2eSmrg LIBS=$save_LIBS 5442d422ce2eSmrg ;; 5443d422ce2eSmrg esac 5444fc5a983dSmrg 5445d422ce2eSmrg case $lt_cv_dlopen_self in 5446d422ce2eSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5447d422ce2eSmrg *) enable_dlopen_self=unknown ;; 5448d422ce2eSmrg esac 5449fc5a983dSmrg 5450d422ce2eSmrg case $lt_cv_dlopen_self_static in 5451d422ce2eSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5452d422ce2eSmrg *) enable_dlopen_self_static=unknown ;; 5453d422ce2eSmrg esac 5454d422ce2eSmrgfi 5455d422ce2eSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5456d422ce2eSmrg [Whether dlopen is supported]) 5457d422ce2eSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5458d422ce2eSmrg [Whether dlopen of programs is supported]) 5459d422ce2eSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5460d422ce2eSmrg [Whether dlopen of statically linked programs is supported]) 5461d422ce2eSmrg])# LT_SYS_DLOPEN_SELF 5462fc5a983dSmrg 5463d422ce2eSmrg# Old name: 5464d422ce2eSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5465d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 5466d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5467f3561b8bSmrg 5468f3561b8bSmrg 5469d422ce2eSmrg# _LT_COMPILER_C_O([TAGNAME]) 5470d422ce2eSmrg# --------------------------- 5471d422ce2eSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 5472d422ce2eSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5473d422ce2eSmrgm4_defun([_LT_COMPILER_C_O], 5474d422ce2eSmrg[m4_require([_LT_DECL_SED])dnl 5475d422ce2eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5476d422ce2eSmrgm4_require([_LT_TAG_COMPILER])dnl 5477d422ce2eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5478d422ce2eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5479d422ce2eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5480d422ce2eSmrg $RM -r conftest 2>/dev/null 5481d422ce2eSmrg mkdir conftest 5482d422ce2eSmrg cd conftest 5483d422ce2eSmrg mkdir out 5484d422ce2eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5485d422ce2eSmrg 5486d422ce2eSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5487d422ce2eSmrg # Insert the option either (1) after the last *FLAGS variable, or 5488d422ce2eSmrg # (2) before a word containing "conftest.", or (3) at the end. 5489d422ce2eSmrg # Note that $ac_compile itself does not contain backslashes and begins 5490d422ce2eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5491d422ce2eSmrg lt_compile=`echo "$ac_compile" | $SED \ 5492d422ce2eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5493d422ce2eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5494d422ce2eSmrg -e 's:$: $lt_compiler_flag:'` 5495d422ce2eSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5496d422ce2eSmrg (eval "$lt_compile" 2>out/conftest.err) 5497d422ce2eSmrg ac_status=$? 5498d422ce2eSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5499d422ce2eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5500d422ce2eSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5501d422ce2eSmrg then 5502d422ce2eSmrg # The compiler can only warn and ignore the option if not recognized 5503d422ce2eSmrg # So say no if there are warnings 5504d422ce2eSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5505d422ce2eSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5506d422ce2eSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5507d422ce2eSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5508d422ce2eSmrg fi 5509d422ce2eSmrg fi 5510d422ce2eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5511d422ce2eSmrg $RM conftest* 5512d422ce2eSmrg # SGI C++ compiler will create directory out/ii_files/ for 5513d422ce2eSmrg # template instantiation 5514d422ce2eSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5515d422ce2eSmrg $RM out/* && rmdir out 5516d422ce2eSmrg cd .. 5517d422ce2eSmrg $RM -r conftest 5518d422ce2eSmrg $RM conftest* 5519d422ce2eSmrg]) 5520d422ce2eSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5521d422ce2eSmrg [Does compiler simultaneously support -c and -o options?]) 5522d422ce2eSmrg])# _LT_COMPILER_C_O 5523fc5a983dSmrg 55246257f37dSmrg 5525d422ce2eSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5526d422ce2eSmrg# ---------------------------------- 5527d422ce2eSmrg# Check to see if we can do hard links to lock some files if needed 5528d422ce2eSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5529d422ce2eSmrg[m4_require([_LT_ENABLE_LOCK])dnl 5530d422ce2eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5531d422ce2eSmrg_LT_COMPILER_C_O([$1]) 5532fc5a983dSmrg 5533d422ce2eSmrghard_links=nottested 5534d422ce2eSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5535d422ce2eSmrg # do not overwrite the value of need_locks provided by the user 5536d422ce2eSmrg AC_MSG_CHECKING([if we can lock with hard links]) 5537d422ce2eSmrg hard_links=yes 5538d422ce2eSmrg $RM conftest* 5539d422ce2eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5540d422ce2eSmrg touch conftest.a 5541d422ce2eSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 5542d422ce2eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5543d422ce2eSmrg AC_MSG_RESULT([$hard_links]) 5544d422ce2eSmrg if test no = "$hard_links"; then 5545d422ce2eSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5546d422ce2eSmrg need_locks=warn 5547d422ce2eSmrg fi 5548d422ce2eSmrgelse 5549d422ce2eSmrg need_locks=no 5550d422ce2eSmrgfi 5551d422ce2eSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5552d422ce2eSmrg])# _LT_COMPILER_FILE_LOCKS 5553fc5a983dSmrg 5554fc5a983dSmrg 5555d422ce2eSmrg# _LT_CHECK_OBJDIR 5556d422ce2eSmrg# ---------------- 5557d422ce2eSmrgm4_defun([_LT_CHECK_OBJDIR], 5558d422ce2eSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5559d422ce2eSmrg[rm -f .libs 2>/dev/null 5560d422ce2eSmrgmkdir .libs 2>/dev/null 5561d422ce2eSmrgif test -d .libs; then 5562d422ce2eSmrg lt_cv_objdir=.libs 5563d422ce2eSmrgelse 5564d422ce2eSmrg # MS-DOS does not allow filenames that begin with a dot. 5565d422ce2eSmrg lt_cv_objdir=_libs 5566d422ce2eSmrgfi 5567d422ce2eSmrgrmdir .libs 2>/dev/null]) 5568d422ce2eSmrgobjdir=$lt_cv_objdir 5569d422ce2eSmrg_LT_DECL([], [objdir], [0], 5570d422ce2eSmrg [The name of the directory that contains temporary libtool files])dnl 5571d422ce2eSmrgm4_pattern_allow([LT_OBJDIR])dnl 5572d422ce2eSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5573d422ce2eSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5574d422ce2eSmrg])# _LT_CHECK_OBJDIR 5575fc5a983dSmrg 5576fc5a983dSmrg 5577d422ce2eSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5578d422ce2eSmrg# -------------------------------------- 5579d422ce2eSmrg# Check hardcoding attributes. 5580d422ce2eSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5581d422ce2eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5582d422ce2eSmrg_LT_TAGVAR(hardcode_action, $1)= 5583d422ce2eSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5584d422ce2eSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5585d422ce2eSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5586fc5a983dSmrg 5587d422ce2eSmrg # We can hardcode non-existent directories. 5588d422ce2eSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5589d422ce2eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5590d422ce2eSmrg # have to relink, otherwise we might link with an installed library 5591d422ce2eSmrg # when we should be linking with a yet-to-be-installed one 5592d422ce2eSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5593d422ce2eSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5594d422ce2eSmrg # Linking always hardcodes the temporary library directory. 5595d422ce2eSmrg _LT_TAGVAR(hardcode_action, $1)=relink 5596d422ce2eSmrg else 5597d422ce2eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5598d422ce2eSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 5599d422ce2eSmrg fi 5600d422ce2eSmrgelse 5601d422ce2eSmrg # We cannot hardcode anything, or else we can only hardcode existing 5602d422ce2eSmrg # directories. 5603d422ce2eSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5604d422ce2eSmrgfi 5605d422ce2eSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5606fc5a983dSmrg 5607d422ce2eSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5608d422ce2eSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5609d422ce2eSmrg # Fast installation is not supported 5610d422ce2eSmrg enable_fast_install=no 5611d422ce2eSmrgelif test yes = "$shlibpath_overrides_runpath" || 5612d422ce2eSmrg test no = "$enable_shared"; then 5613d422ce2eSmrg # Fast installation is not necessary 5614d422ce2eSmrg enable_fast_install=needless 5615d422ce2eSmrgfi 5616d422ce2eSmrg_LT_TAGDECL([], [hardcode_action], [0], 5617d422ce2eSmrg [How to hardcode a shared library path into an executable]) 5618d422ce2eSmrg])# _LT_LINKER_HARDCODE_LIBPATH 5619fc5a983dSmrg 5620d422ce2eSmrg 5621d422ce2eSmrg# _LT_CMD_STRIPLIB 5622d422ce2eSmrg# ---------------- 5623d422ce2eSmrgm4_defun([_LT_CMD_STRIPLIB], 5624d422ce2eSmrg[m4_require([_LT_DECL_EGREP]) 5625d422ce2eSmrgstriplib= 5626d422ce2eSmrgold_striplib= 5627d422ce2eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5628d422ce2eSmrgif test -z "$STRIP"; then 5629d422ce2eSmrg AC_MSG_RESULT([no]) 5630d422ce2eSmrgelse 5631d422ce2eSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5632d422ce2eSmrg old_striplib="$STRIP --strip-debug" 5633d422ce2eSmrg striplib="$STRIP --strip-unneeded" 5634d422ce2eSmrg AC_MSG_RESULT([yes]) 5635d422ce2eSmrg else 5636d422ce2eSmrg case $host_os in 5637d422ce2eSmrg darwin*) 5638d422ce2eSmrg # FIXME - insert some real tests, host_os isn't really good enough 5639d422ce2eSmrg striplib="$STRIP -x" 5640d422ce2eSmrg old_striplib="$STRIP -S" 5641d422ce2eSmrg AC_MSG_RESULT([yes]) 5642f3561b8bSmrg ;; 5643d422ce2eSmrg freebsd*) 5644d422ce2eSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5645d422ce2eSmrg old_striplib="$STRIP --strip-debug" 5646d422ce2eSmrg striplib="$STRIP --strip-unneeded" 5647d422ce2eSmrg AC_MSG_RESULT([yes]) 5648f3561b8bSmrg else 5649d422ce2eSmrg AC_MSG_RESULT([no]) 5650f3561b8bSmrg fi 5651f3561b8bSmrg ;; 5652d422ce2eSmrg *) 5653d422ce2eSmrg AC_MSG_RESULT([no]) 5654d422ce2eSmrg ;; 5655d422ce2eSmrg esac 5656d422ce2eSmrg fi 5657d422ce2eSmrgfi 5658d422ce2eSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5659d422ce2eSmrg_LT_DECL([], [striplib], [1]) 5660d422ce2eSmrg])# _LT_CMD_STRIPLIB 5661fc5a983dSmrg 5662d422ce2eSmrg 5663d422ce2eSmrg# _LT_PREPARE_MUNGE_PATH_LIST 5664d422ce2eSmrg# --------------------------- 5665d422ce2eSmrg# Make sure func_munge_path_list() is defined correctly. 5666d422ce2eSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5667d422ce2eSmrg[[# func_munge_path_list VARIABLE PATH 5668d422ce2eSmrg# ----------------------------------- 5669d422ce2eSmrg# VARIABLE is name of variable containing _space_ separated list of 5670d422ce2eSmrg# directories to be munged by the contents of PATH, which is string 5671d422ce2eSmrg# having a format: 5672d422ce2eSmrg# "DIR[:DIR]:" 5673d422ce2eSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 5674d422ce2eSmrg# ":DIR[:DIR]" 5675d422ce2eSmrg# string "DIR[ DIR]" will be appended to VARIABLE 5676d422ce2eSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5677d422ce2eSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5678d422ce2eSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 5679d422ce2eSmrg# "DIR[:DIR]" 5680d422ce2eSmrg# VARIABLE will be replaced by "DIR[ DIR]" 5681d422ce2eSmrgfunc_munge_path_list () 5682d422ce2eSmrg{ 5683d422ce2eSmrg case x@S|@2 in 5684d422ce2eSmrg x) 5685f3561b8bSmrg ;; 5686d422ce2eSmrg *:) 5687d422ce2eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5688d422ce2eSmrg ;; 5689d422ce2eSmrg x:*) 5690d422ce2eSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5691d422ce2eSmrg ;; 5692d422ce2eSmrg *::*) 5693d422ce2eSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5694d422ce2eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5695d422ce2eSmrg ;; 5696d422ce2eSmrg *) 5697d422ce2eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5698d422ce2eSmrg ;; 5699d422ce2eSmrg esac 5700d422ce2eSmrg} 5701d422ce2eSmrg]])# _LT_PREPARE_PATH_LIST 5702fc5a983dSmrg 5703fc5a983dSmrg 5704d422ce2eSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5705d422ce2eSmrg# ----------------------------- 5706d422ce2eSmrg# PORTME Fill in your ld.so characteristics 5707d422ce2eSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5708d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5709d422ce2eSmrgm4_require([_LT_DECL_EGREP])dnl 5710d422ce2eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5711d422ce2eSmrgm4_require([_LT_DECL_OBJDUMP])dnl 5712d422ce2eSmrgm4_require([_LT_DECL_SED])dnl 5713d422ce2eSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5714d422ce2eSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5715d422ce2eSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5716d422ce2eSmrgm4_if([$1], 5717d422ce2eSmrg [], [ 5718d422ce2eSmrgif test yes = "$GCC"; then 5719d422ce2eSmrg case $host_os in 5720d422ce2eSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5721d422ce2eSmrg *) lt_awk_arg='/^libraries:/' ;; 5722d422ce2eSmrg esac 5723d422ce2eSmrg case $host_os in 5724d422ce2eSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5725d422ce2eSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5726d422ce2eSmrg esac 5727d422ce2eSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5728d422ce2eSmrg case $lt_search_path_spec in 5729d422ce2eSmrg *\;*) 5730d422ce2eSmrg # if the path contains ";" then we assume it to be the separator 5731d422ce2eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 5732d422ce2eSmrg # assumed that no part of a normal pathname contains ";" but that should 5733d422ce2eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 5734d422ce2eSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5735d422ce2eSmrg ;; 5736d422ce2eSmrg *) 5737d422ce2eSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5738d422ce2eSmrg ;; 5739d422ce2eSmrg esac 5740d422ce2eSmrg # Ok, now we have the path, separated by spaces, we can step through it 5741d422ce2eSmrg # and add multilib dir if necessary... 5742d422ce2eSmrg lt_tmp_lt_search_path_spec= 5743d422ce2eSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5744d422ce2eSmrg # ...but if some path component already ends with the multilib dir we assume 5745d422ce2eSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5746d422ce2eSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5747d422ce2eSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5748d422ce2eSmrg lt_multi_os_dir= 5749d422ce2eSmrg ;; 5750d422ce2eSmrg esac 5751d422ce2eSmrg for lt_sys_path in $lt_search_path_spec; do 5752d422ce2eSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5753d422ce2eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5754d422ce2eSmrg elif test -n "$lt_multi_os_dir"; then 5755d422ce2eSmrg test -d "$lt_sys_path" && \ 5756d422ce2eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5757d422ce2eSmrg fi 5758d422ce2eSmrg done 5759d422ce2eSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5760d422ce2eSmrgBEGIN {RS = " "; FS = "/|\n";} { 5761d422ce2eSmrg lt_foo = ""; 5762d422ce2eSmrg lt_count = 0; 5763d422ce2eSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 5764d422ce2eSmrg if ($lt_i != "" && $lt_i != ".") { 5765d422ce2eSmrg if ($lt_i == "..") { 5766d422ce2eSmrg lt_count++; 5767d422ce2eSmrg } else { 5768d422ce2eSmrg if (lt_count == 0) { 5769d422ce2eSmrg lt_foo = "/" $lt_i lt_foo; 5770d422ce2eSmrg } else { 5771d422ce2eSmrg lt_count--; 5772d422ce2eSmrg } 5773d422ce2eSmrg } 5774d422ce2eSmrg } 5775d422ce2eSmrg } 5776d422ce2eSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5777d422ce2eSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5778d422ce2eSmrg}'` 5779d422ce2eSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 5780d422ce2eSmrg # for these hosts. 5781d422ce2eSmrg case $host_os in 5782d422ce2eSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5783d422ce2eSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5784d422ce2eSmrg esac 5785d422ce2eSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5786d422ce2eSmrgelse 5787d422ce2eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5788d422ce2eSmrgfi]) 5789d422ce2eSmrglibrary_names_spec= 5790d422ce2eSmrglibname_spec='lib$name' 5791d422ce2eSmrgsoname_spec= 5792d422ce2eSmrgshrext_cmds=.so 5793d422ce2eSmrgpostinstall_cmds= 5794d422ce2eSmrgpostuninstall_cmds= 5795d422ce2eSmrgfinish_cmds= 5796d422ce2eSmrgfinish_eval= 5797d422ce2eSmrgshlibpath_var= 5798d422ce2eSmrgshlibpath_overrides_runpath=unknown 5799d422ce2eSmrgversion_type=none 5800d422ce2eSmrgdynamic_linker="$host_os ld.so" 5801d422ce2eSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5802d422ce2eSmrgneed_lib_prefix=unknown 5803d422ce2eSmrghardcode_into_libs=no 5804fc5a983dSmrg 5805d422ce2eSmrg# when you set need_version to no, make sure it does not cause -set_version 5806d422ce2eSmrg# flags to be left without arguments 5807d422ce2eSmrgneed_version=unknown 5808fc5a983dSmrg 5809d422ce2eSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5810d422ce2eSmrg[User-defined run-time library search path.]) 5811fc5a983dSmrg 5812d422ce2eSmrgcase $host_os in 5813d422ce2eSmrgaix3*) 5814d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 5815d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5816d422ce2eSmrg shlibpath_var=LIBPATH 5817fc5a983dSmrg 5818d422ce2eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 5819d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 5820d422ce2eSmrg ;; 5821d422ce2eSmrg 5822d422ce2eSmrgaix[[4-9]]*) 5823d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 5824d422ce2eSmrg need_lib_prefix=no 5825d422ce2eSmrg need_version=no 5826d422ce2eSmrg hardcode_into_libs=yes 5827d422ce2eSmrg if test ia64 = "$host_cpu"; then 5828d422ce2eSmrg # AIX 5 supports IA64 5829d422ce2eSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5830d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 5831d422ce2eSmrg else 5832d422ce2eSmrg # With GCC up to 2.95.x, collect2 would create an import file 5833d422ce2eSmrg # for dependence libraries. The import file would start with 5834d422ce2eSmrg # the line '#! .'. This would cause the generated library to 5835d422ce2eSmrg # depend on '.', always an invalid library. This was fixed in 5836d422ce2eSmrg # development snapshots of GCC prior to 3.0. 5837d422ce2eSmrg case $host_os in 5838d422ce2eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5839d422ce2eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5840d422ce2eSmrg echo ' yes ' 5841d422ce2eSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5842d422ce2eSmrg : 5843f3561b8bSmrg else 5844d422ce2eSmrg can_build_shared=no 5845f3561b8bSmrg fi 5846f3561b8bSmrg ;; 5847d422ce2eSmrg esac 5848d422ce2eSmrg # Using Import Files as archive members, it is possible to support 5849d422ce2eSmrg # filename-based versioning of shared library archives on AIX. While 5850d422ce2eSmrg # this would work for both with and without runtime linking, it will 5851d422ce2eSmrg # prevent static linking of such archives. So we do filename-based 5852d422ce2eSmrg # shared library versioning with .so extension only, which is used 5853d422ce2eSmrg # when both runtime linking and shared linking is enabled. 5854d422ce2eSmrg # Unfortunately, runtime linking may impact performance, so we do 5855d422ce2eSmrg # not want this to be the default eventually. Also, we use the 5856d422ce2eSmrg # versioned .so libs for executables only if there is the -brtl 5857d422ce2eSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5858d422ce2eSmrg # To allow for filename-based versioning support, we need to create 5859d422ce2eSmrg # libNAME.so.V as an archive file, containing: 5860d422ce2eSmrg # *) an Import File, referring to the versioned filename of the 5861d422ce2eSmrg # archive as well as the shared archive member, telling the 5862d422ce2eSmrg # bitwidth (32 or 64) of that shared object, and providing the 5863d422ce2eSmrg # list of exported symbols of that shared object, eventually 5864d422ce2eSmrg # decorated with the 'weak' keyword 5865d422ce2eSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5866d422ce2eSmrg # it being seen by the linker. 5867d422ce2eSmrg # At run time we better use the real file rather than another symlink, 5868d422ce2eSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5869fc5a983dSmrg 5870d422ce2eSmrg case $with_aix_soname,$aix_use_runtimelinking in 5871d422ce2eSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5872d422ce2eSmrg # soname into executable. Probably we can add versioning support to 5873d422ce2eSmrg # collect2, so additional links can be useful in future. 5874d422ce2eSmrg aix,yes) # traditional libtool 5875d422ce2eSmrg dynamic_linker='AIX unversionable lib.so' 5876d422ce2eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5877d422ce2eSmrg # instead of lib<name>.a to let people know that these are not 5878d422ce2eSmrg # typical AIX shared libraries. 5879d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5880f3561b8bSmrg ;; 5881d422ce2eSmrg aix,no) # traditional AIX only 5882d422ce2eSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5883d422ce2eSmrg # We preserve .a as extension for shared libraries through AIX4.2 5884d422ce2eSmrg # and later when we are not doing run time linking. 5885d422ce2eSmrg library_names_spec='$libname$release.a $libname.a' 5886d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 5887d422ce2eSmrg ;; 5888d422ce2eSmrg svr4,*) # full svr4 only 5889d422ce2eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5890d422ce2eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5891d422ce2eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5892d422ce2eSmrg shlibpath_overrides_runpath=yes 5893d422ce2eSmrg ;; 5894d422ce2eSmrg *,yes) # both, prefer svr4 5895d422ce2eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5896d422ce2eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5897d422ce2eSmrg # unpreferred sharedlib libNAME.a needs extra handling 5898d422ce2eSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 5899d422ce2eSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 5900d422ce2eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5901d422ce2eSmrg shlibpath_overrides_runpath=yes 5902d422ce2eSmrg ;; 5903d422ce2eSmrg *,no) # both, prefer aix 5904d422ce2eSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5905d422ce2eSmrg library_names_spec='$libname$release.a $libname.a' 5906d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 5907d422ce2eSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5908d422ce2eSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 5909d422ce2eSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 5910f3561b8bSmrg ;; 5911f3561b8bSmrg esac 5912d422ce2eSmrg shlibpath_var=LIBPATH 5913f3561b8bSmrg fi 5914d422ce2eSmrg ;; 5915fc5a983dSmrg 5916d422ce2eSmrgamigaos*) 5917d422ce2eSmrg case $host_cpu in 5918d422ce2eSmrg powerpc) 5919d422ce2eSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5920d422ce2eSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5921d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5922d422ce2eSmrg ;; 5923d422ce2eSmrg m68k) 5924d422ce2eSmrg library_names_spec='$libname.ixlibrary $libname.a' 5925d422ce2eSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5926d422ce2eSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 5927d422ce2eSmrg ;; 5928d422ce2eSmrg esac 5929d422ce2eSmrg ;; 5930fc5a983dSmrg 5931d422ce2eSmrgbeos*) 5932d422ce2eSmrg library_names_spec='$libname$shared_ext' 5933d422ce2eSmrg dynamic_linker="$host_os ld.so" 5934d422ce2eSmrg shlibpath_var=LIBRARY_PATH 5935d422ce2eSmrg ;; 5936bd304fc0Smrg 5937d422ce2eSmrgbsdi[[45]]*) 5938d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 5939d422ce2eSmrg need_version=no 5940d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5941d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 5942d422ce2eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5943d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 5944d422ce2eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5945d422ce2eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5946d422ce2eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 5947d422ce2eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5948d422ce2eSmrg # libtool to hard-code these into programs 5949f3561b8bSmrg ;; 5950fc5a983dSmrg 5951d422ce2eSmrgcygwin* | mingw* | pw32* | cegcc*) 5952d422ce2eSmrg version_type=windows 5953d422ce2eSmrg shrext_cmds=.dll 5954d422ce2eSmrg need_version=no 5955d422ce2eSmrg need_lib_prefix=no 5956f3561b8bSmrg 5957d422ce2eSmrg case $GCC,$cc_basename in 5958d422ce2eSmrg yes,*) 5959d422ce2eSmrg # gcc 5960d422ce2eSmrg library_names_spec='$libname.dll.a' 5961d422ce2eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5962d422ce2eSmrg postinstall_cmds='base_file=`basename \$file`~ 5963d422ce2eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5964d422ce2eSmrg dldir=$destdir/`dirname \$dlpath`~ 5965d422ce2eSmrg test -d \$dldir || mkdir -p \$dldir~ 5966d422ce2eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 5967d422ce2eSmrg chmod a+x \$dldir/$dlname~ 5968d422ce2eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5969d422ce2eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5970d422ce2eSmrg fi' 5971d422ce2eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5972d422ce2eSmrg dlpath=$dir/\$dldll~ 5973d422ce2eSmrg $RM \$dlpath' 5974d422ce2eSmrg shlibpath_overrides_runpath=yes 5975f3561b8bSmrg 5976d422ce2eSmrg case $host_os in 5977d422ce2eSmrg cygwin*) 5978d422ce2eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5979d422ce2eSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5980d422ce2eSmrgm4_if([$1], [],[ 5981d422ce2eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5982d422ce2eSmrg ;; 5983d422ce2eSmrg mingw* | cegcc*) 5984d422ce2eSmrg # MinGW DLLs use traditional 'lib' prefix 5985d422ce2eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5986d422ce2eSmrg ;; 5987d422ce2eSmrg pw32*) 5988d422ce2eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5989d422ce2eSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5990d422ce2eSmrg ;; 5991d422ce2eSmrg esac 5992d422ce2eSmrg dynamic_linker='Win32 ld.exe' 5993d422ce2eSmrg ;; 5994fc5a983dSmrg 5995d422ce2eSmrg *,cl* | *,icl*) 5996d422ce2eSmrg # Native MSVC or ICC 5997d422ce2eSmrg libname_spec='$name' 5998d422ce2eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5999d422ce2eSmrg library_names_spec='$libname.dll.lib' 6000fc5a983dSmrg 6001d422ce2eSmrg case $build_os in 6002d422ce2eSmrg mingw*) 6003d422ce2eSmrg sys_lib_search_path_spec= 6004d422ce2eSmrg lt_save_ifs=$IFS 6005d422ce2eSmrg IFS=';' 6006d422ce2eSmrg for lt_path in $LIB 6007d422ce2eSmrg do 6008d422ce2eSmrg IFS=$lt_save_ifs 6009d422ce2eSmrg # Let DOS variable expansion print the short 8.3 style file name. 6010d422ce2eSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6011d422ce2eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6012d422ce2eSmrg done 6013d422ce2eSmrg IFS=$lt_save_ifs 6014d422ce2eSmrg # Convert to MSYS style. 6015d422ce2eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6016d422ce2eSmrg ;; 6017d422ce2eSmrg cygwin*) 6018d422ce2eSmrg # Convert to unix form, then to dos form, then back to unix form 6019d422ce2eSmrg # but this time dos style (no spaces!) so that the unix form looks 6020d422ce2eSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 6021d422ce2eSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6022d422ce2eSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6023d422ce2eSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6024d422ce2eSmrg ;; 6025d422ce2eSmrg *) 6026d422ce2eSmrg sys_lib_search_path_spec=$LIB 6027d422ce2eSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6028d422ce2eSmrg # It is most probably a Windows format PATH. 6029d422ce2eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6030d422ce2eSmrg else 6031d422ce2eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6032d422ce2eSmrg fi 6033d422ce2eSmrg # FIXME: find the short name or the path components, as spaces are 6034d422ce2eSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 6035d422ce2eSmrg ;; 6036d422ce2eSmrg esac 6037fc5a983dSmrg 6038d422ce2eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6039d422ce2eSmrg postinstall_cmds='base_file=`basename \$file`~ 6040d422ce2eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6041d422ce2eSmrg dldir=$destdir/`dirname \$dlpath`~ 6042d422ce2eSmrg test -d \$dldir || mkdir -p \$dldir~ 6043d422ce2eSmrg $install_prog $dir/$dlname \$dldir/$dlname' 6044d422ce2eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6045d422ce2eSmrg dlpath=$dir/\$dldll~ 6046d422ce2eSmrg $RM \$dlpath' 6047d422ce2eSmrg shlibpath_overrides_runpath=yes 6048d422ce2eSmrg dynamic_linker='Win32 link.exe' 6049d422ce2eSmrg ;; 6050fc5a983dSmrg 6051d422ce2eSmrg *) 6052d422ce2eSmrg # Assume MSVC and ICC wrapper 6053d422ce2eSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6054d422ce2eSmrg dynamic_linker='Win32 ld.exe' 6055d422ce2eSmrg ;; 6056d422ce2eSmrg esac 6057d422ce2eSmrg # FIXME: first we should search . and the directory the executable is in 6058d422ce2eSmrg shlibpath_var=PATH 6059d422ce2eSmrg ;; 6060fc5a983dSmrg 6061d422ce2eSmrgdarwin* | rhapsody*) 6062d422ce2eSmrg dynamic_linker="$host_os dyld" 6063d422ce2eSmrg version_type=darwin 6064d422ce2eSmrg need_lib_prefix=no 6065d422ce2eSmrg need_version=no 6066d422ce2eSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6067d422ce2eSmrg soname_spec='$libname$release$major$shared_ext' 6068d422ce2eSmrg shlibpath_overrides_runpath=yes 6069d422ce2eSmrg shlibpath_var=DYLD_LIBRARY_PATH 6070d422ce2eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6071d422ce2eSmrgm4_if([$1], [],[ 6072d422ce2eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6073d422ce2eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6074d422ce2eSmrg ;; 6075fc5a983dSmrg 6076d422ce2eSmrgdgux*) 6077d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6078d422ce2eSmrg need_lib_prefix=no 6079d422ce2eSmrg need_version=no 6080d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6081d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6082d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6083d422ce2eSmrg ;; 6084fc5a983dSmrg 6085d422ce2eSmrgfreebsd* | dragonfly* | midnightbsd*) 6086d422ce2eSmrg # DragonFly does not have aout. When/if they implement a new 6087d422ce2eSmrg # versioning mechanism, adjust this. 6088d422ce2eSmrg if test -x /usr/bin/objformat; then 6089d422ce2eSmrg objformat=`/usr/bin/objformat` 6090d422ce2eSmrg else 6091d422ce2eSmrg case $host_os in 6092d422ce2eSmrg freebsd[[23]].*) objformat=aout ;; 6093d422ce2eSmrg *) objformat=elf ;; 6094d422ce2eSmrg esac 6095d422ce2eSmrg fi 6096d422ce2eSmrg version_type=freebsd-$objformat 6097d422ce2eSmrg case $version_type in 6098d422ce2eSmrg freebsd-elf*) 6099d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6100d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6101d422ce2eSmrg need_version=no 6102d422ce2eSmrg need_lib_prefix=no 6103d422ce2eSmrg ;; 6104d422ce2eSmrg freebsd-*) 6105d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6106d422ce2eSmrg need_version=yes 6107d422ce2eSmrg ;; 6108d422ce2eSmrg esac 6109d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6110d422ce2eSmrg case $host_os in 6111d422ce2eSmrg freebsd2.*) 6112d422ce2eSmrg shlibpath_overrides_runpath=yes 6113d422ce2eSmrg ;; 6114d422ce2eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6115d422ce2eSmrg shlibpath_overrides_runpath=yes 6116d422ce2eSmrg hardcode_into_libs=yes 6117d422ce2eSmrg ;; 6118d422ce2eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6119d422ce2eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6120d422ce2eSmrg shlibpath_overrides_runpath=no 6121d422ce2eSmrg hardcode_into_libs=yes 6122d422ce2eSmrg ;; 6123d422ce2eSmrg *) # from 4.6 on, and DragonFly 6124d422ce2eSmrg shlibpath_overrides_runpath=yes 6125d422ce2eSmrg hardcode_into_libs=yes 6126d422ce2eSmrg ;; 6127d422ce2eSmrg esac 6128d422ce2eSmrg ;; 6129f3561b8bSmrg 6130d422ce2eSmrghaiku*) 6131d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6132d422ce2eSmrg need_lib_prefix=no 6133d422ce2eSmrg need_version=no 6134d422ce2eSmrg dynamic_linker="$host_os runtime_loader" 6135d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6136d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6137d422ce2eSmrg shlibpath_var=LIBRARY_PATH 6138d422ce2eSmrg shlibpath_overrides_runpath=no 6139d422ce2eSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6140d422ce2eSmrg hardcode_into_libs=yes 6141d422ce2eSmrg ;; 6142d422ce2eSmrg 6143d422ce2eSmrghpux9* | hpux10* | hpux11*) 6144d422ce2eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 6145d422ce2eSmrg # link against other versions. 6146d422ce2eSmrg version_type=sunos 6147d422ce2eSmrg need_lib_prefix=no 6148d422ce2eSmrg need_version=no 6149d422ce2eSmrg case $host_cpu in 6150d422ce2eSmrg ia64*) 6151d422ce2eSmrg shrext_cmds='.so' 6152d422ce2eSmrg hardcode_into_libs=yes 6153d422ce2eSmrg dynamic_linker="$host_os dld.so" 6154d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6155d422ce2eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6156d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6157d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6158d422ce2eSmrg if test 32 = "$HPUX_IA64_MODE"; then 6159d422ce2eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6160d422ce2eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6161d422ce2eSmrg else 6162d422ce2eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6163d422ce2eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6164d422ce2eSmrg fi 6165d422ce2eSmrg ;; 6166d422ce2eSmrg hppa*64*) 6167d422ce2eSmrg shrext_cmds='.sl' 6168d422ce2eSmrg hardcode_into_libs=yes 6169d422ce2eSmrg dynamic_linker="$host_os dld.sl" 6170d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6171d422ce2eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6172d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6173d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6174d422ce2eSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6175d422ce2eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6176d422ce2eSmrg ;; 6177d422ce2eSmrg *) 6178d422ce2eSmrg shrext_cmds='.sl' 6179d422ce2eSmrg dynamic_linker="$host_os dld.sl" 6180d422ce2eSmrg shlibpath_var=SHLIB_PATH 6181d422ce2eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6182d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6183d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6184d422ce2eSmrg ;; 6185d422ce2eSmrg esac 6186d422ce2eSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6187d422ce2eSmrg postinstall_cmds='chmod 555 $lib' 6188d422ce2eSmrg # or fails outright, so override atomically: 6189d422ce2eSmrg install_override_mode=555 6190d422ce2eSmrg ;; 6191f3561b8bSmrg 6192d422ce2eSmrginterix[[3-9]]*) 6193d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6194d422ce2eSmrg need_lib_prefix=no 6195d422ce2eSmrg need_version=no 6196d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6197d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6198d422ce2eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6199d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6200d422ce2eSmrg shlibpath_overrides_runpath=no 6201d422ce2eSmrg hardcode_into_libs=yes 6202d422ce2eSmrg ;; 6203f3561b8bSmrg 6204d422ce2eSmrgirix5* | irix6* | nonstopux*) 6205f3561b8bSmrg case $host_os in 6206d422ce2eSmrg nonstopux*) version_type=nonstopux ;; 6207d422ce2eSmrg *) 6208d422ce2eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 6209d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6210d422ce2eSmrg else 6211d422ce2eSmrg version_type=irix 6212d422ce2eSmrg fi ;; 6213d422ce2eSmrg esac 6214d422ce2eSmrg need_lib_prefix=no 6215d422ce2eSmrg need_version=no 6216d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6217d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6218d422ce2eSmrg case $host_os in 6219d422ce2eSmrg irix5* | nonstopux*) 6220d422ce2eSmrg libsuff= shlibsuff= 6221f3561b8bSmrg ;; 6222d422ce2eSmrg *) 6223d422ce2eSmrg case $LD in # libtool.m4 will add one of these switches to LD 6224d422ce2eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6225d422ce2eSmrg libsuff= shlibsuff= libmagic=32-bit;; 6226d422ce2eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6227d422ce2eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6228d422ce2eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6229d422ce2eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6230d422ce2eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 6231d422ce2eSmrg esac 6232f3561b8bSmrg ;; 6233f3561b8bSmrg esac 6234d422ce2eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6235d422ce2eSmrg shlibpath_overrides_runpath=no 6236d422ce2eSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6237d422ce2eSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6238d422ce2eSmrg hardcode_into_libs=yes 6239d422ce2eSmrg ;; 6240f3561b8bSmrg 6241d422ce2eSmrg# No shared lib support for Linux oldld, aout, or coff. 6242d422ce2eSmrglinux*oldld* | linux*aout* | linux*coff*) 6243d422ce2eSmrg dynamic_linker=no 6244d422ce2eSmrg ;; 6245fc5a983dSmrg 6246d422ce2eSmrglinux*android*) 6247d422ce2eSmrg version_type=none # Android doesn't support versioned libraries. 6248d422ce2eSmrg need_lib_prefix=no 6249d422ce2eSmrg need_version=no 6250d422ce2eSmrg library_names_spec='$libname$release$shared_ext' 6251d422ce2eSmrg soname_spec='$libname$release$shared_ext' 6252d422ce2eSmrg finish_cmds= 6253d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6254d422ce2eSmrg shlibpath_overrides_runpath=yes 6255fc5a983dSmrg 6256d422ce2eSmrg # This implies no fast_install, which is unacceptable. 6257d422ce2eSmrg # Some rework will be needed to allow for fast_install 6258d422ce2eSmrg # before this can be enabled. 6259d422ce2eSmrg hardcode_into_libs=yes 6260f3561b8bSmrg 6261d422ce2eSmrg dynamic_linker='Android linker' 6262d422ce2eSmrg # Don't embed -rpath directories since the linker doesn't support them. 6263d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6264d422ce2eSmrg ;; 6265f3561b8bSmrg 6266d422ce2eSmrg# This must be glibc/ELF. 6267d422ce2eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6268d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6269d422ce2eSmrg need_lib_prefix=no 6270d422ce2eSmrg need_version=no 6271d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6272d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6273d422ce2eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6274d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6275d422ce2eSmrg shlibpath_overrides_runpath=no 6276f3561b8bSmrg 6277d422ce2eSmrg # Some binutils ld are patched to set DT_RUNPATH 6278d422ce2eSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6279d422ce2eSmrg [lt_cv_shlibpath_overrides_runpath=no 6280d422ce2eSmrg save_LDFLAGS=$LDFLAGS 6281d422ce2eSmrg save_libdir=$libdir 6282d422ce2eSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6283d422ce2eSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6284d422ce2eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6285d422ce2eSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6286d422ce2eSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6287d422ce2eSmrg LDFLAGS=$save_LDFLAGS 6288d422ce2eSmrg libdir=$save_libdir 6289d422ce2eSmrg ]) 6290d422ce2eSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6291f3561b8bSmrg 6292d422ce2eSmrg # This implies no fast_install, which is unacceptable. 6293d422ce2eSmrg # Some rework will be needed to allow for fast_install 6294d422ce2eSmrg # before this can be enabled. 6295d422ce2eSmrg hardcode_into_libs=yes 6296f3561b8bSmrg 6297d422ce2eSmrg # Ideally, we could use ldconfig to report *all* directores which are 6298d422ce2eSmrg # searched for libraries, however this is still not possible. Aside from not 6299d422ce2eSmrg # being certain /sbin/ldconfig is available, command 6300d422ce2eSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6301d422ce2eSmrg # even though it is searched at run-time. Try to do the best guess by 6302d422ce2eSmrg # appending ld.so.conf contents (and includes) to the search path. 6303d422ce2eSmrg if test -f /etc/ld.so.conf; then 6304d422ce2eSmrg 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' ' '` 6305d422ce2eSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6306f3561b8bSmrg fi 6307f3561b8bSmrg 6308d422ce2eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6309d422ce2eSmrg # powerpc, because MkLinux only supported shared libraries with the 6310d422ce2eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 6311d422ce2eSmrg # most powerpc-linux boxes support dynamic linking these days and 6312d422ce2eSmrg # people can always --disable-shared, the test was removed, and we 6313d422ce2eSmrg # assume the GNU/Linux dynamic linker is in use. 6314d422ce2eSmrg dynamic_linker='GNU/Linux ld.so' 6315d422ce2eSmrg ;; 6316fc5a983dSmrg 6317d422ce2eSmrgnetbsd*) 6318d422ce2eSmrg version_type=sunos 6319d422ce2eSmrg need_lib_prefix=no 6320d422ce2eSmrg need_version=no 6321d422ce2eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6322d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6323d422ce2eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6324d422ce2eSmrg dynamic_linker='NetBSD (a.out) ld.so' 6325d422ce2eSmrg else 6326d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6327d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6328d422ce2eSmrg dynamic_linker='NetBSD ld.elf_so' 6329d422ce2eSmrg fi 6330d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6331d422ce2eSmrg shlibpath_overrides_runpath=yes 6332d422ce2eSmrg hardcode_into_libs=yes 6333d422ce2eSmrg ;; 6334fc5a983dSmrg 6335d422ce2eSmrgnewsos6) 6336d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6337d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6338d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6339d422ce2eSmrg shlibpath_overrides_runpath=yes 6340d422ce2eSmrg ;; 6341fc5a983dSmrg 6342d422ce2eSmrg*nto* | *qnx*) 6343d422ce2eSmrg version_type=qnx 6344d422ce2eSmrg need_lib_prefix=no 6345d422ce2eSmrg need_version=no 6346d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6347d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6348d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6349d422ce2eSmrg shlibpath_overrides_runpath=no 6350d422ce2eSmrg hardcode_into_libs=yes 6351d422ce2eSmrg dynamic_linker='ldqnx.so' 6352d422ce2eSmrg ;; 6353f3561b8bSmrg 6354d422ce2eSmrgopenbsd* | bitrig*) 6355d422ce2eSmrg version_type=sunos 6356d422ce2eSmrg sys_lib_dlsearch_path_spec=/usr/lib 6357d422ce2eSmrg need_lib_prefix=no 6358d422ce2eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6359d422ce2eSmrg need_version=no 6360d422ce2eSmrg else 6361d422ce2eSmrg need_version=yes 6362d422ce2eSmrg fi 6363d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6364d422ce2eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6365d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6366d422ce2eSmrg shlibpath_overrides_runpath=yes 6367d422ce2eSmrg ;; 6368fc5a983dSmrg 6369d422ce2eSmrgos2*) 6370d422ce2eSmrg libname_spec='$name' 6371d422ce2eSmrg version_type=windows 6372d422ce2eSmrg shrext_cmds=.dll 6373d422ce2eSmrg need_version=no 6374d422ce2eSmrg need_lib_prefix=no 6375d422ce2eSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6376d422ce2eSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6377d422ce2eSmrg v=$($ECHO $release$versuffix | tr -d .-); 6378d422ce2eSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6379d422ce2eSmrg $ECHO $n$v`$shared_ext' 6380d422ce2eSmrg library_names_spec='${libname}_dll.$libext' 6381d422ce2eSmrg dynamic_linker='OS/2 ld.exe' 6382d422ce2eSmrg shlibpath_var=BEGINLIBPATH 6383d422ce2eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6384d422ce2eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6385d422ce2eSmrg postinstall_cmds='base_file=`basename \$file`~ 6386d422ce2eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6387d422ce2eSmrg dldir=$destdir/`dirname \$dlpath`~ 6388d422ce2eSmrg test -d \$dldir || mkdir -p \$dldir~ 6389d422ce2eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6390d422ce2eSmrg chmod a+x \$dldir/$dlname~ 6391d422ce2eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6392d422ce2eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6393d422ce2eSmrg fi' 6394d422ce2eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6395d422ce2eSmrg dlpath=$dir/\$dldll~ 6396d422ce2eSmrg $RM \$dlpath' 6397d422ce2eSmrg ;; 6398fc5a983dSmrg 6399d422ce2eSmrgosf3* | osf4* | osf5*) 6400d422ce2eSmrg version_type=osf 6401d422ce2eSmrg need_lib_prefix=no 6402d422ce2eSmrg need_version=no 6403d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6404d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6405d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6406d422ce2eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6407d422ce2eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6408d422ce2eSmrg ;; 6409f3561b8bSmrg 6410d422ce2eSmrgrdos*) 6411d422ce2eSmrg dynamic_linker=no 6412d422ce2eSmrg ;; 6413f3561b8bSmrg 6414d422ce2eSmrgsolaris*) 6415d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6416d422ce2eSmrg need_lib_prefix=no 6417d422ce2eSmrg need_version=no 6418d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6419d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6420d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6421d422ce2eSmrg shlibpath_overrides_runpath=yes 6422d422ce2eSmrg hardcode_into_libs=yes 6423d422ce2eSmrg # ldd complains unless libraries are executable 6424d422ce2eSmrg postinstall_cmds='chmod +x $lib' 6425d422ce2eSmrg ;; 6426d422ce2eSmrg 6427d422ce2eSmrgsunos4*) 6428d422ce2eSmrg version_type=sunos 6429d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6430d422ce2eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6431d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6432d422ce2eSmrg shlibpath_overrides_runpath=yes 6433d422ce2eSmrg if test yes = "$with_gnu_ld"; then 6434d422ce2eSmrg need_lib_prefix=no 6435d422ce2eSmrg fi 6436d422ce2eSmrg need_version=yes 6437d422ce2eSmrg ;; 6438fc5a983dSmrg 6439d422ce2eSmrgsysv4 | sysv4.3*) 6440d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6441d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6442d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6443d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6444d422ce2eSmrg case $host_vendor in 6445d422ce2eSmrg sni) 6446d422ce2eSmrg shlibpath_overrides_runpath=no 6447d422ce2eSmrg need_lib_prefix=no 6448d422ce2eSmrg runpath_var=LD_RUN_PATH 6449d422ce2eSmrg ;; 6450d422ce2eSmrg siemens) 6451d422ce2eSmrg need_lib_prefix=no 6452d422ce2eSmrg ;; 6453d422ce2eSmrg motorola) 6454d422ce2eSmrg need_lib_prefix=no 6455d422ce2eSmrg need_version=no 6456d422ce2eSmrg shlibpath_overrides_runpath=no 6457d422ce2eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6458d422ce2eSmrg ;; 6459d422ce2eSmrg esac 6460d422ce2eSmrg ;; 6461f3561b8bSmrg 6462d422ce2eSmrgsysv4*MP*) 6463d422ce2eSmrg if test -d /usr/nec; then 6464d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6465d422ce2eSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6466d422ce2eSmrg soname_spec='$libname$shared_ext.$major' 6467d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6468d422ce2eSmrg fi 6469d422ce2eSmrg ;; 6470fc5a983dSmrg 6471d422ce2eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6472d422ce2eSmrg version_type=sco 6473d422ce2eSmrg need_lib_prefix=no 6474d422ce2eSmrg need_version=no 6475d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6476d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6477d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6478d422ce2eSmrg shlibpath_overrides_runpath=yes 6479d422ce2eSmrg hardcode_into_libs=yes 6480d422ce2eSmrg if test yes = "$with_gnu_ld"; then 6481d422ce2eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6482d422ce2eSmrg else 6483d422ce2eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6484d422ce2eSmrg case $host_os in 6485d422ce2eSmrg sco3.2v5*) 6486d422ce2eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6487f3561b8bSmrg ;; 6488d422ce2eSmrg esac 6489d422ce2eSmrg fi 6490d422ce2eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 6491d422ce2eSmrg ;; 6492fc5a983dSmrg 6493d422ce2eSmrgtpf*) 6494d422ce2eSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6495d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6496d422ce2eSmrg need_lib_prefix=no 6497d422ce2eSmrg need_version=no 6498d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6499d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6500d422ce2eSmrg shlibpath_overrides_runpath=no 6501d422ce2eSmrg hardcode_into_libs=yes 6502d422ce2eSmrg ;; 6503fc5a983dSmrg 6504d422ce2eSmrguts4*) 6505d422ce2eSmrg version_type=linux # correct to gnu/linux during the next big refactor 6506d422ce2eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6507d422ce2eSmrg soname_spec='$libname$release$shared_ext$major' 6508d422ce2eSmrg shlibpath_var=LD_LIBRARY_PATH 6509d422ce2eSmrg ;; 6510bd304fc0Smrg 6511d422ce2eSmrg*) 6512d422ce2eSmrg dynamic_linker=no 6513d422ce2eSmrg ;; 6514d422ce2eSmrgesac 6515d422ce2eSmrgAC_MSG_RESULT([$dynamic_linker]) 6516d422ce2eSmrgtest no = "$dynamic_linker" && can_build_shared=no 6517fc5a983dSmrg 6518d422ce2eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6519d422ce2eSmrgif test yes = "$GCC"; then 6520d422ce2eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6521d422ce2eSmrgfi 6522d422ce2eSmrg 6523d422ce2eSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6524d422ce2eSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6525d422ce2eSmrgfi 6526d422ce2eSmrg 6527d422ce2eSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6528d422ce2eSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6529d422ce2eSmrgfi 6530d422ce2eSmrg 6531d422ce2eSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6532d422ce2eSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 65336257f37dSmrg 6534d422ce2eSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6535d422ce2eSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6536f3561b8bSmrg 6537d422ce2eSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6538d422ce2eSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6539fc5a983dSmrg 6540d422ce2eSmrg_LT_DECL([], [variables_saved_for_relink], [1], 6541d422ce2eSmrg [Variables whose values should be saved in libtool wrapper scripts and 6542d422ce2eSmrg restored at link time]) 6543d422ce2eSmrg_LT_DECL([], [need_lib_prefix], [0], 6544d422ce2eSmrg [Do we need the "lib" prefix for modules?]) 6545d422ce2eSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6546d422ce2eSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6547d422ce2eSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6548d422ce2eSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6549d422ce2eSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6550d422ce2eSmrg [Is shlibpath searched before the hard-coded library search path?]) 6551d422ce2eSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6552d422ce2eSmrg_LT_DECL([], [library_names_spec], [1], 6553d422ce2eSmrg [[List of archive names. First name is the real one, the rest are links. 6554d422ce2eSmrg The last name is the one that the linker finds with -lNAME]]) 6555d422ce2eSmrg_LT_DECL([], [soname_spec], [1], 6556d422ce2eSmrg [[The coded name of the library, if different from the real name]]) 6557d422ce2eSmrg_LT_DECL([], [install_override_mode], [1], 6558d422ce2eSmrg [Permission mode override for installation of shared libraries]) 6559d422ce2eSmrg_LT_DECL([], [postinstall_cmds], [2], 6560d422ce2eSmrg [Command to use after installation of a shared archive]) 6561d422ce2eSmrg_LT_DECL([], [postuninstall_cmds], [2], 6562d422ce2eSmrg [Command to use after uninstallation of a shared archive]) 6563d422ce2eSmrg_LT_DECL([], [finish_cmds], [2], 6564d422ce2eSmrg [Commands used to finish a libtool library installation in a directory]) 6565d422ce2eSmrg_LT_DECL([], [finish_eval], [1], 6566d422ce2eSmrg [[As "finish_cmds", except a single script fragment to be evaled but 6567d422ce2eSmrg not shown]]) 6568d422ce2eSmrg_LT_DECL([], [hardcode_into_libs], [0], 6569d422ce2eSmrg [Whether we should hardcode library paths into libraries]) 6570d422ce2eSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6571d422ce2eSmrg [Compile-time system search path for libraries]) 6572d422ce2eSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6573d422ce2eSmrg [Detected run-time system search path for libraries]) 6574d422ce2eSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6575d422ce2eSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6576d422ce2eSmrg])# _LT_SYS_DYNAMIC_LINKER 6577fc5a983dSmrg 6578fc5a983dSmrg 6579d422ce2eSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 6580d422ce2eSmrg# -------------------------- 6581d422ce2eSmrg# find a file program that can recognize shared library 6582d422ce2eSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6583d422ce2eSmrg[m4_require([_LT_DECL_EGREP])dnl 6584d422ce2eSmrgAC_MSG_CHECKING([for $1]) 6585d422ce2eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6586d422ce2eSmrg[case $MAGIC_CMD in 6587d422ce2eSmrg[[\\/*] | ?:[\\/]*]) 6588d422ce2eSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6589d422ce2eSmrg ;; 6590d422ce2eSmrg*) 6591d422ce2eSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 6592d422ce2eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6593d422ce2eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6594d422ce2eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6595d422ce2eSmrgdnl not every word. This closes a longstanding sh security hole. 6596d422ce2eSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6597d422ce2eSmrg for ac_dir in $ac_dummy; do 6598d422ce2eSmrg IFS=$lt_save_ifs 6599d422ce2eSmrg test -z "$ac_dir" && ac_dir=. 6600d422ce2eSmrg if test -f "$ac_dir/$1"; then 6601d422ce2eSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6602d422ce2eSmrg if test -n "$file_magic_test_file"; then 6603d422ce2eSmrg case $deplibs_check_method in 6604d422ce2eSmrg "file_magic "*) 6605d422ce2eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6606d422ce2eSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6607d422ce2eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6608d422ce2eSmrg $EGREP "$file_magic_regex" > /dev/null; then 6609d422ce2eSmrg : 6610d422ce2eSmrg else 6611d422ce2eSmrg cat <<_LT_EOF 1>&2 6612bd304fc0Smrg 6613d422ce2eSmrg*** Warning: the command libtool uses to detect shared libraries, 6614d422ce2eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6615d422ce2eSmrg*** The result is that libtool may fail to recognize shared libraries 6616d422ce2eSmrg*** as such. This will affect the creation of libtool libraries that 6617d422ce2eSmrg*** depend on shared libraries, but programs linked with such libtool 6618d422ce2eSmrg*** libraries will work regardless of this problem. Nevertheless, you 6619d422ce2eSmrg*** may want to report the problem to your system manager and/or to 6620d422ce2eSmrg*** bug-libtool@gnu.org 6621f3561b8bSmrg 6622d422ce2eSmrg_LT_EOF 6623d422ce2eSmrg fi ;; 6624d422ce2eSmrg esac 6625d422ce2eSmrg fi 6626d422ce2eSmrg break 6627d422ce2eSmrg fi 6628d422ce2eSmrg done 6629d422ce2eSmrg IFS=$lt_save_ifs 6630d422ce2eSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 6631d422ce2eSmrg ;; 6632d422ce2eSmrgesac]) 6633d422ce2eSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6634d422ce2eSmrgif test -n "$MAGIC_CMD"; then 6635d422ce2eSmrg AC_MSG_RESULT($MAGIC_CMD) 6636d422ce2eSmrgelse 6637d422ce2eSmrg AC_MSG_RESULT(no) 6638d422ce2eSmrgfi 6639d422ce2eSmrg_LT_DECL([], [MAGIC_CMD], [0], 6640d422ce2eSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6641d422ce2eSmrg])# _LT_PATH_TOOL_PREFIX 6642fc5a983dSmrg 6643d422ce2eSmrg# Old name: 6644d422ce2eSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6645d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 6646d422ce2eSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6647f3561b8bSmrg 6648f3561b8bSmrg 6649d422ce2eSmrg# _LT_PATH_MAGIC 6650d422ce2eSmrg# -------------- 6651d422ce2eSmrg# find a file program that can recognize a shared library 6652d422ce2eSmrgm4_defun([_LT_PATH_MAGIC], 6653d422ce2eSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6654d422ce2eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6655d422ce2eSmrg if test -n "$ac_tool_prefix"; then 6656d422ce2eSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6657d422ce2eSmrg else 6658d422ce2eSmrg MAGIC_CMD=: 6659d422ce2eSmrg fi 6660d422ce2eSmrgfi 6661d422ce2eSmrg])# _LT_PATH_MAGIC 6662fc5a983dSmrg 6663d422ce2eSmrg 6664d422ce2eSmrg# LT_PATH_LD 6665d422ce2eSmrg# ---------- 6666d422ce2eSmrg# find the pathname to the GNU or non-GNU linker 6667d422ce2eSmrgAC_DEFUN([LT_PATH_LD], 6668d422ce2eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 6669d422ce2eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6670d422ce2eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6671d422ce2eSmrgm4_require([_LT_DECL_SED])dnl 6672d422ce2eSmrgm4_require([_LT_DECL_EGREP])dnl 6673d422ce2eSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6674d422ce2eSmrg 6675d422ce2eSmrgAC_ARG_WITH([gnu-ld], 6676d422ce2eSmrg [AS_HELP_STRING([--with-gnu-ld], 6677d422ce2eSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6678d422ce2eSmrg [test no = "$withval" || with_gnu_ld=yes], 6679d422ce2eSmrg [with_gnu_ld=no])dnl 6680d422ce2eSmrg 6681d422ce2eSmrgac_prog=ld 6682d422ce2eSmrgif test yes = "$GCC"; then 6683d422ce2eSmrg # Check if gcc -print-prog-name=ld gives a path. 6684d422ce2eSmrg AC_MSG_CHECKING([for ld used by $CC]) 6685d422ce2eSmrg case $host in 6686d422ce2eSmrg *-*-mingw*) 6687d422ce2eSmrg # gcc leaves a trailing carriage return, which upsets mingw 6688d422ce2eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6689d422ce2eSmrg *) 6690d422ce2eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6691d422ce2eSmrg esac 6692d422ce2eSmrg case $ac_prog in 6693d422ce2eSmrg # Accept absolute paths. 6694d422ce2eSmrg [[\\/]]* | ?:[[\\/]]*) 6695d422ce2eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 6696d422ce2eSmrg # Canonicalize the pathname of ld 6697d422ce2eSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6698d422ce2eSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6699d422ce2eSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6700d422ce2eSmrg done 6701d422ce2eSmrg test -z "$LD" && LD=$ac_prog 6702d422ce2eSmrg ;; 6703d422ce2eSmrg "") 6704d422ce2eSmrg # If it fails, then pretend we aren't using GCC. 6705d422ce2eSmrg ac_prog=ld 6706d422ce2eSmrg ;; 6707d422ce2eSmrg *) 6708d422ce2eSmrg # If it is relative, then search for the first ld in PATH. 6709d422ce2eSmrg with_gnu_ld=unknown 6710d422ce2eSmrg ;; 6711d422ce2eSmrg esac 6712d422ce2eSmrgelif test yes = "$with_gnu_ld"; then 6713d422ce2eSmrg AC_MSG_CHECKING([for GNU ld]) 6714d422ce2eSmrgelse 6715d422ce2eSmrg AC_MSG_CHECKING([for non-GNU ld]) 6716d422ce2eSmrgfi 6717d422ce2eSmrgAC_CACHE_VAL(lt_cv_path_LD, 6718d422ce2eSmrg[if test -z "$LD"; then 6719d422ce2eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6720d422ce2eSmrg for ac_dir in $PATH; do 6721d422ce2eSmrg IFS=$lt_save_ifs 6722d422ce2eSmrg test -z "$ac_dir" && ac_dir=. 6723d422ce2eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6724d422ce2eSmrg lt_cv_path_LD=$ac_dir/$ac_prog 6725d422ce2eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 6726d422ce2eSmrg # but apparently some variants of GNU ld only accept -v. 6727d422ce2eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 6728d422ce2eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6729d422ce2eSmrg *GNU* | *'with BFD'*) 6730d422ce2eSmrg test no != "$with_gnu_ld" && break 6731f3561b8bSmrg ;; 6732d422ce2eSmrg *) 6733d422ce2eSmrg test yes != "$with_gnu_ld" && break 6734d422ce2eSmrg ;; 6735d422ce2eSmrg esac 6736d422ce2eSmrg fi 6737d422ce2eSmrg done 6738d422ce2eSmrg IFS=$lt_save_ifs 6739d422ce2eSmrgelse 6740d422ce2eSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6741d422ce2eSmrgfi]) 6742d422ce2eSmrgLD=$lt_cv_path_LD 6743d422ce2eSmrgif test -n "$LD"; then 6744d422ce2eSmrg AC_MSG_RESULT($LD) 6745d422ce2eSmrgelse 6746d422ce2eSmrg AC_MSG_RESULT(no) 6747d422ce2eSmrgfi 6748d422ce2eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6749d422ce2eSmrg_LT_PATH_LD_GNU 6750d422ce2eSmrgAC_SUBST([LD]) 6751f3561b8bSmrg 6752d422ce2eSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6753d422ce2eSmrg])# LT_PATH_LD 6754fc5a983dSmrg 6755d422ce2eSmrg# Old names: 6756d422ce2eSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6757d422ce2eSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6758d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 6759d422ce2eSmrgdnl AC_DEFUN([AM_PROG_LD], []) 6760d422ce2eSmrgdnl AC_DEFUN([AC_PROG_LD], []) 6761f3561b8bSmrg 6762f3561b8bSmrg 6763d422ce2eSmrg# _LT_PATH_LD_GNU 6764d422ce2eSmrg#- -------------- 6765d422ce2eSmrgm4_defun([_LT_PATH_LD_GNU], 6766d422ce2eSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6767d422ce2eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6768d422ce2eSmrgcase `$LD -v 2>&1 </dev/null` in 6769d422ce2eSmrg*GNU* | *'with BFD'*) 6770d422ce2eSmrg lt_cv_prog_gnu_ld=yes 6771d422ce2eSmrg ;; 6772d422ce2eSmrg*) 6773d422ce2eSmrg lt_cv_prog_gnu_ld=no 6774d422ce2eSmrg ;; 6775d422ce2eSmrgesac]) 6776d422ce2eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6777d422ce2eSmrg])# _LT_PATH_LD_GNU 6778f3561b8bSmrg 6779fc5a983dSmrg 6780d422ce2eSmrg# _LT_CMD_RELOAD 6781d422ce2eSmrg# -------------- 6782d422ce2eSmrg# find reload flag for linker 6783d422ce2eSmrg# -- PORTME Some linkers may need a different reload flag. 6784d422ce2eSmrgm4_defun([_LT_CMD_RELOAD], 6785d422ce2eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 6786d422ce2eSmrg lt_cv_ld_reload_flag, 6787d422ce2eSmrg [lt_cv_ld_reload_flag='-r']) 6788d422ce2eSmrgreload_flag=$lt_cv_ld_reload_flag 6789d422ce2eSmrgcase $reload_flag in 6790d422ce2eSmrg"" | " "*) ;; 6791d422ce2eSmrg*) reload_flag=" $reload_flag" ;; 6792d422ce2eSmrgesac 6793d422ce2eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6794d422ce2eSmrgcase $host_os in 6795d422ce2eSmrg cygwin* | mingw* | pw32* | cegcc*) 6796d422ce2eSmrg if test yes != "$GCC"; then 6797d422ce2eSmrg reload_cmds=false 6798d422ce2eSmrg fi 6799d422ce2eSmrg ;; 6800d422ce2eSmrg darwin*) 6801d422ce2eSmrg if test yes = "$GCC"; then 6802d422ce2eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6803d422ce2eSmrg else 6804d422ce2eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6805d422ce2eSmrg fi 6806d422ce2eSmrg ;; 6807d422ce2eSmrgesac 6808d422ce2eSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6809d422ce2eSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6810d422ce2eSmrg])# _LT_CMD_RELOAD 6811d422ce2eSmrg 6812fc5a983dSmrg 6813d422ce2eSmrg# _LT_PATH_DD 6814d422ce2eSmrg# ----------- 6815d422ce2eSmrg# find a working dd 6816d422ce2eSmrgm4_defun([_LT_PATH_DD], 6817d422ce2eSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6818d422ce2eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6819d422ce2eSmrgcat conftest.i conftest.i >conftest2.i 6820d422ce2eSmrg: ${lt_DD:=$DD} 6821d422ce2eSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6822d422ce2eSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6823d422ce2eSmrg cmp -s conftest.i conftest.out \ 6824d422ce2eSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6825d422ce2eSmrgfi]) 6826d422ce2eSmrgrm -f conftest.i conftest2.i conftest.out]) 6827d422ce2eSmrg])# _LT_PATH_DD 6828fc5a983dSmrg 6829f3561b8bSmrg 6830d422ce2eSmrg# _LT_CMD_TRUNCATE 6831d422ce2eSmrg# ---------------- 6832d422ce2eSmrg# find command to truncate a binary pipe 6833d422ce2eSmrgm4_defun([_LT_CMD_TRUNCATE], 6834d422ce2eSmrg[m4_require([_LT_PATH_DD]) 6835d422ce2eSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6836d422ce2eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6837d422ce2eSmrgcat conftest.i conftest.i >conftest2.i 6838d422ce2eSmrglt_cv_truncate_bin= 6839d422ce2eSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6840d422ce2eSmrg cmp -s conftest.i conftest.out \ 6841d422ce2eSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6842d422ce2eSmrgfi 6843d422ce2eSmrgrm -f conftest.i conftest2.i conftest.out 6844d422ce2eSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6845d422ce2eSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6846d422ce2eSmrg [Command to truncate a binary pipe]) 6847d422ce2eSmrg])# _LT_CMD_TRUNCATE 6848f3561b8bSmrg 6849fc5a983dSmrg 6850d422ce2eSmrg# _LT_CHECK_MAGIC_METHOD 6851d422ce2eSmrg# ---------------------- 6852d422ce2eSmrg# how to check for library dependencies 6853d422ce2eSmrg# -- PORTME fill in with the dynamic library characteristics 6854d422ce2eSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6855d422ce2eSmrg[m4_require([_LT_DECL_EGREP]) 6856d422ce2eSmrgm4_require([_LT_DECL_OBJDUMP]) 6857d422ce2eSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6858d422ce2eSmrglt_cv_deplibs_check_method, 6859d422ce2eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6860d422ce2eSmrglt_cv_file_magic_test_file= 6861d422ce2eSmrglt_cv_deplibs_check_method='unknown' 6862d422ce2eSmrg# Need to set the preceding variable on all platforms that support 6863d422ce2eSmrg# interlibrary dependencies. 6864d422ce2eSmrg# 'none' -- dependencies not supported. 6865d422ce2eSmrg# 'unknown' -- same as none, but documents that we really don't know. 6866d422ce2eSmrg# 'pass_all' -- all dependencies passed with no checks. 6867d422ce2eSmrg# 'test_compile' -- check by making test program. 6868d422ce2eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 6869d422ce2eSmrg# that responds to the $file_magic_cmd with a given extended regex. 6870d422ce2eSmrg# If you have 'file' or equivalent on your system and you're not sure 6871d422ce2eSmrg# whether 'pass_all' will *always* work, you probably want this one. 6872fc5a983dSmrg 6873d422ce2eSmrgcase $host_os in 6874d422ce2eSmrgaix[[4-9]]*) 6875d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6876d422ce2eSmrg ;; 6877fc5a983dSmrg 6878d422ce2eSmrgbeos*) 6879d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6880d422ce2eSmrg ;; 6881fc5a983dSmrg 6882d422ce2eSmrgbsdi[[45]]*) 6883d422ce2eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6884d422ce2eSmrg lt_cv_file_magic_cmd='$FILECMD -L' 6885d422ce2eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 6886d422ce2eSmrg ;; 6887fc5a983dSmrg 6888d422ce2eSmrgcygwin*) 6889d422ce2eSmrg # func_win32_libid is a shell function defined in ltmain.sh 6890d422ce2eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6891d422ce2eSmrg lt_cv_file_magic_cmd='func_win32_libid' 6892d422ce2eSmrg ;; 6893fc5a983dSmrg 6894d422ce2eSmrgmingw* | pw32*) 6895d422ce2eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 6896d422ce2eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6897d422ce2eSmrg # unless we find 'file', for example because we are cross-compiling. 6898d422ce2eSmrg if ( file / ) >/dev/null 2>&1; then 6899d422ce2eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6900d422ce2eSmrg lt_cv_file_magic_cmd='func_win32_libid' 6901d422ce2eSmrg else 6902d422ce2eSmrg # Keep this pattern in sync with the one in func_win32_libid. 6903d422ce2eSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6904d422ce2eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6905d422ce2eSmrg fi 6906d422ce2eSmrg ;; 6907fc5a983dSmrg 6908d422ce2eSmrgcegcc*) 6909d422ce2eSmrg # use the weaker test based on 'objdump'. See mingw*. 6910d422ce2eSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6911d422ce2eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6912d422ce2eSmrg ;; 6913f3561b8bSmrg 6914d422ce2eSmrgdarwin* | rhapsody*) 6915d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6916d422ce2eSmrg ;; 6917f3561b8bSmrg 6918d422ce2eSmrgfreebsd* | dragonfly* | midnightbsd*) 6919d422ce2eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6920d422ce2eSmrg case $host_cpu in 6921d422ce2eSmrg i*86 ) 6922d422ce2eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 6923d422ce2eSmrg # Let's accept both of them until this is cleared up. 6924d422ce2eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6925d422ce2eSmrg lt_cv_file_magic_cmd=$FILECMD 6926d422ce2eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6927d422ce2eSmrg ;; 6928d422ce2eSmrg esac 6929d422ce2eSmrg else 6930d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6931d422ce2eSmrg fi 6932d422ce2eSmrg ;; 6933f3561b8bSmrg 6934d422ce2eSmrghaiku*) 6935d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6936d422ce2eSmrg ;; 6937fc5a983dSmrg 6938d422ce2eSmrghpux10.20* | hpux11*) 6939d422ce2eSmrg lt_cv_file_magic_cmd=$FILECMD 6940d422ce2eSmrg case $host_cpu in 6941d422ce2eSmrg ia64*) 6942d422ce2eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6943d422ce2eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6944d422ce2eSmrg ;; 6945d422ce2eSmrg hppa*64*) 6946d422ce2eSmrg [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]'] 6947d422ce2eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6948d422ce2eSmrg ;; 6949d422ce2eSmrg *) 6950d422ce2eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6951d422ce2eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6952d422ce2eSmrg ;; 6953d422ce2eSmrg esac 6954d422ce2eSmrg ;; 6955fc5a983dSmrg 6956d422ce2eSmrginterix[[3-9]]*) 6957d422ce2eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6958d422ce2eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6959d422ce2eSmrg ;; 6960f3561b8bSmrg 6961d422ce2eSmrgirix5* | irix6* | nonstopux*) 6962d422ce2eSmrg case $LD in 6963d422ce2eSmrg *-32|*"-32 ") libmagic=32-bit;; 6964d422ce2eSmrg *-n32|*"-n32 ") libmagic=N32;; 6965d422ce2eSmrg *-64|*"-64 ") libmagic=64-bit;; 6966d422ce2eSmrg *) libmagic=never-match;; 6967d422ce2eSmrg esac 6968d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6969d422ce2eSmrg ;; 6970f3561b8bSmrg 6971d422ce2eSmrg# This must be glibc/ELF. 6972d422ce2eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6973d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6974d422ce2eSmrg ;; 6975f3561b8bSmrg 6976d422ce2eSmrgnetbsd*) 6977d422ce2eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6978d422ce2eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6979d422ce2eSmrg else 6980d422ce2eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6981d422ce2eSmrg fi 6982d422ce2eSmrg ;; 6983fc5a983dSmrg 6984d422ce2eSmrgnewos6*) 6985d422ce2eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6986d422ce2eSmrg lt_cv_file_magic_cmd=$FILECMD 6987d422ce2eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6988d422ce2eSmrg ;; 6989fc5a983dSmrg 6990d422ce2eSmrg*nto* | *qnx*) 6991d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 6992d422ce2eSmrg ;; 6993fc5a983dSmrg 6994d422ce2eSmrgopenbsd* | bitrig*) 6995d422ce2eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6996d422ce2eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6997d422ce2eSmrg else 6998d422ce2eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6999d422ce2eSmrg fi 7000d422ce2eSmrg ;; 7001f3561b8bSmrg 7002d422ce2eSmrgosf3* | osf4* | osf5*) 7003d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7004d422ce2eSmrg ;; 7005fc5a983dSmrg 7006d422ce2eSmrgrdos*) 7007d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7008d422ce2eSmrg ;; 7009fc5a983dSmrg 7010d422ce2eSmrgsolaris*) 7011d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7012d422ce2eSmrg ;; 7013fc5a983dSmrg 7014d422ce2eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7015d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7016d422ce2eSmrg ;; 7017f3561b8bSmrg 7018d422ce2eSmrgsysv4 | sysv4.3*) 7019d422ce2eSmrg case $host_vendor in 7020d422ce2eSmrg motorola) 7021d422ce2eSmrg 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]]' 7022d422ce2eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7023d422ce2eSmrg ;; 7024d422ce2eSmrg ncr) 7025d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7026d422ce2eSmrg ;; 7027d422ce2eSmrg sequent) 7028d422ce2eSmrg lt_cv_file_magic_cmd='/bin/file' 7029d422ce2eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7030d422ce2eSmrg ;; 7031d422ce2eSmrg sni) 7032d422ce2eSmrg lt_cv_file_magic_cmd='/bin/file' 7033d422ce2eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7034d422ce2eSmrg lt_cv_file_magic_test_file=/lib/libc.so 7035d422ce2eSmrg ;; 7036d422ce2eSmrg siemens) 7037d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7038d422ce2eSmrg ;; 7039d422ce2eSmrg pc) 7040d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7041d422ce2eSmrg ;; 7042d422ce2eSmrg esac 7043d422ce2eSmrg ;; 7044f3561b8bSmrg 7045d422ce2eSmrgtpf*) 7046d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7047d422ce2eSmrg ;; 7048d422ce2eSmrgos2*) 7049d422ce2eSmrg lt_cv_deplibs_check_method=pass_all 7050d422ce2eSmrg ;; 7051d422ce2eSmrgesac 7052d422ce2eSmrg]) 7053f3561b8bSmrg 7054d422ce2eSmrgfile_magic_glob= 7055d422ce2eSmrgwant_nocaseglob=no 7056d422ce2eSmrgif test "$build" = "$host"; then 7057d422ce2eSmrg case $host_os in 7058d422ce2eSmrg mingw* | pw32*) 7059d422ce2eSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7060d422ce2eSmrg want_nocaseglob=yes 7061d422ce2eSmrg else 7062d422ce2eSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7063d422ce2eSmrg fi 7064d422ce2eSmrg ;; 7065d422ce2eSmrg esac 7066d422ce2eSmrgfi 7067fc5a983dSmrg 7068d422ce2eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 7069d422ce2eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 7070d422ce2eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7071d422ce2eSmrg 7072d422ce2eSmrg_LT_DECL([], [deplibs_check_method], [1], 7073d422ce2eSmrg [Method to check whether dependent libraries are shared objects]) 7074d422ce2eSmrg_LT_DECL([], [file_magic_cmd], [1], 7075d422ce2eSmrg [Command to use when deplibs_check_method = "file_magic"]) 7076d422ce2eSmrg_LT_DECL([], [file_magic_glob], [1], 7077d422ce2eSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 7078d422ce2eSmrg_LT_DECL([], [want_nocaseglob], [1], 7079d422ce2eSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7080d422ce2eSmrg])# _LT_CHECK_MAGIC_METHOD 7081fc5a983dSmrg 7082d422ce2eSmrg 7083d422ce2eSmrg# LT_PATH_NM 7084d422ce2eSmrg# ---------- 7085d422ce2eSmrg# find the pathname to a BSD- or MS-compatible name lister 7086d422ce2eSmrgAC_DEFUN([LT_PATH_NM], 7087d422ce2eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 7088d422ce2eSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7089d422ce2eSmrg[if test -n "$NM"; then 7090d422ce2eSmrg # Let the user override the test. 7091d422ce2eSmrg lt_cv_path_NM=$NM 7092d422ce2eSmrgelse 7093d422ce2eSmrg lt_nm_to_check=${ac_tool_prefix}nm 7094d422ce2eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7095d422ce2eSmrg lt_nm_to_check="$lt_nm_to_check nm" 7096d422ce2eSmrg fi 7097d422ce2eSmrg for lt_tmp_nm in $lt_nm_to_check; do 7098d422ce2eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7099d422ce2eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7100d422ce2eSmrg IFS=$lt_save_ifs 7101d422ce2eSmrg test -z "$ac_dir" && ac_dir=. 7102d422ce2eSmrg tmp_nm=$ac_dir/$lt_tmp_nm 7103d422ce2eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7104d422ce2eSmrg # Check to see if the nm accepts a BSD-compat flag. 7105d422ce2eSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7106d422ce2eSmrg # nm: unknown option "B" ignored 7107d422ce2eSmrg # Tru64's nm complains that /dev/null is an invalid object file 7108d422ce2eSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7109d422ce2eSmrg case $build_os in 7110d422ce2eSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7111d422ce2eSmrg *) lt_bad_file=/dev/null ;; 7112d422ce2eSmrg esac 7113d422ce2eSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7114d422ce2eSmrg *$lt_bad_file* | *'Invalid file or object type'*) 7115d422ce2eSmrg lt_cv_path_NM="$tmp_nm -B" 7116d422ce2eSmrg break 2 7117f3561b8bSmrg ;; 7118f3561b8bSmrg *) 7119d422ce2eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7120d422ce2eSmrg */dev/null*) 7121d422ce2eSmrg lt_cv_path_NM="$tmp_nm -p" 7122d422ce2eSmrg break 2 7123f3561b8bSmrg ;; 7124f3561b8bSmrg *) 7125d422ce2eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7126d422ce2eSmrg continue # so that we can try to find one that supports BSD flags 7127f3561b8bSmrg ;; 7128d422ce2eSmrg esac 7129d422ce2eSmrg ;; 7130f3561b8bSmrg esac 7131d422ce2eSmrg fi 7132d422ce2eSmrg done 7133d422ce2eSmrg IFS=$lt_save_ifs 7134d422ce2eSmrg done 7135d422ce2eSmrg : ${lt_cv_path_NM=no} 7136d422ce2eSmrgfi]) 7137d422ce2eSmrgif test no != "$lt_cv_path_NM"; then 7138d422ce2eSmrg NM=$lt_cv_path_NM 7139d422ce2eSmrgelse 7140d422ce2eSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 7141d422ce2eSmrg if test -n "$DUMPBIN"; then : 7142d422ce2eSmrg # Let the user override the test. 7143d422ce2eSmrg else 7144d422ce2eSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7145d422ce2eSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7146d422ce2eSmrg *COFF*) 7147d422ce2eSmrg DUMPBIN="$DUMPBIN -symbols -headers" 7148d422ce2eSmrg ;; 7149d422ce2eSmrg *) 7150d422ce2eSmrg DUMPBIN=: 7151f3561b8bSmrg ;; 7152f3561b8bSmrg esac 7153d422ce2eSmrg fi 7154d422ce2eSmrg AC_SUBST([DUMPBIN]) 7155d422ce2eSmrg if test : != "$DUMPBIN"; then 7156d422ce2eSmrg NM=$DUMPBIN 7157d422ce2eSmrg fi 7158d422ce2eSmrgfi 7159d422ce2eSmrgtest -z "$NM" && NM=nm 7160d422ce2eSmrgAC_SUBST([NM]) 7161d422ce2eSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7162fc5a983dSmrg 7163d422ce2eSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7164d422ce2eSmrg [lt_cv_nm_interface="BSD nm" 7165d422ce2eSmrg echo "int some_variable = 0;" > conftest.$ac_ext 7166d422ce2eSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7167d422ce2eSmrg (eval "$ac_compile" 2>conftest.err) 7168d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7169d422ce2eSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7170d422ce2eSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7171d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7172d422ce2eSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7173d422ce2eSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 7174d422ce2eSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7175d422ce2eSmrg lt_cv_nm_interface="MS dumpbin" 7176d422ce2eSmrg fi 7177d422ce2eSmrg rm -f conftest*]) 7178d422ce2eSmrg])# LT_PATH_NM 7179f3561b8bSmrg 7180d422ce2eSmrg# Old names: 7181d422ce2eSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7182d422ce2eSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7183d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 7184d422ce2eSmrgdnl AC_DEFUN([AM_PROG_NM], []) 7185d422ce2eSmrgdnl AC_DEFUN([AC_PROG_NM], []) 7186f3561b8bSmrg 7187d422ce2eSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7188d422ce2eSmrg# -------------------------------- 7189d422ce2eSmrg# how to determine the name of the shared library 7190d422ce2eSmrg# associated with a specific link library. 7191d422ce2eSmrg# -- PORTME fill in with the dynamic library characteristics 7192d422ce2eSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7193d422ce2eSmrg[m4_require([_LT_DECL_EGREP]) 7194d422ce2eSmrgm4_require([_LT_DECL_OBJDUMP]) 7195d422ce2eSmrgm4_require([_LT_DECL_DLLTOOL]) 7196d422ce2eSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7197d422ce2eSmrglt_cv_sharedlib_from_linklib_cmd, 7198d422ce2eSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7199f3561b8bSmrg 7200d422ce2eSmrgcase $host_os in 7201d422ce2eSmrgcygwin* | mingw* | pw32* | cegcc*) 7202d422ce2eSmrg # two different shell functions defined in ltmain.sh; 7203d422ce2eSmrg # decide which one to use based on capabilities of $DLLTOOL 7204d422ce2eSmrg case `$DLLTOOL --help 2>&1` in 7205d422ce2eSmrg *--identify-strict*) 7206d422ce2eSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7207d422ce2eSmrg ;; 7208d422ce2eSmrg *) 7209d422ce2eSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7210d422ce2eSmrg ;; 7211d422ce2eSmrg esac 7212d422ce2eSmrg ;; 7213d422ce2eSmrg*) 7214d422ce2eSmrg # fallback: assume linklib IS sharedlib 7215d422ce2eSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7216d422ce2eSmrg ;; 7217d422ce2eSmrgesac 7218d422ce2eSmrg]) 7219d422ce2eSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7220d422ce2eSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7221fc5a983dSmrg 7222d422ce2eSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7223d422ce2eSmrg [Command to associate shared and link libraries]) 7224d422ce2eSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7225fc5a983dSmrg 7226fc5a983dSmrg 7227d422ce2eSmrg# _LT_PATH_MANIFEST_TOOL 7228bd304fc0Smrg# ---------------------- 7229d422ce2eSmrg# locate the manifest tool 7230d422ce2eSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7231d422ce2eSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7232d422ce2eSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7233d422ce2eSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7234d422ce2eSmrg [lt_cv_path_mainfest_tool=no 7235d422ce2eSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7236d422ce2eSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7237d422ce2eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7238d422ce2eSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7239d422ce2eSmrg lt_cv_path_mainfest_tool=yes 7240d422ce2eSmrg fi 7241d422ce2eSmrg rm -f conftest*]) 7242d422ce2eSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 7243d422ce2eSmrg MANIFEST_TOOL=: 7244d422ce2eSmrgfi 7245d422ce2eSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7246d422ce2eSmrg])# _LT_PATH_MANIFEST_TOOL 7247bd304fc0Smrg 72486257f37dSmrg 7249d422ce2eSmrg# _LT_DLL_DEF_P([FILE]) 7250d422ce2eSmrg# --------------------- 7251d422ce2eSmrg# True iff FILE is a Windows DLL '.def' file. 7252d422ce2eSmrg# Keep in sync with func_dll_def_p in the libtool script 7253d422ce2eSmrgAC_DEFUN([_LT_DLL_DEF_P], 7254d422ce2eSmrg[dnl 7255d422ce2eSmrg test DEF = "`$SED -n dnl 7256d422ce2eSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7257d422ce2eSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7258d422ce2eSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7259d422ce2eSmrg -e q dnl Only consider the first "real" line 7260d422ce2eSmrg $1`" dnl 7261d422ce2eSmrg])# _LT_DLL_DEF_P 7262fc5a983dSmrg 7263bd304fc0Smrg 7264d422ce2eSmrg# LT_LIB_M 7265d422ce2eSmrg# -------- 7266d422ce2eSmrg# check for math library 7267d422ce2eSmrgAC_DEFUN([LT_LIB_M], 7268d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7269d422ce2eSmrgLIBM= 7270d422ce2eSmrgcase $host in 7271d422ce2eSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7272d422ce2eSmrg # These system don't have libm, or don't need it 7273d422ce2eSmrg ;; 7274d422ce2eSmrg*-ncr-sysv4.3*) 7275d422ce2eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7276d422ce2eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7277d422ce2eSmrg ;; 7278d422ce2eSmrg*) 7279d422ce2eSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7280d422ce2eSmrg ;; 7281bd304fc0Smrgesac 7282d422ce2eSmrgAC_SUBST([LIBM]) 7283d422ce2eSmrg])# LT_LIB_M 7284bd304fc0Smrg 7285d422ce2eSmrg# Old name: 7286d422ce2eSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7287d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 7288d422ce2eSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7289fc5a983dSmrg 7290fc5a983dSmrg 7291d422ce2eSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7292d422ce2eSmrg# ------------------------------- 7293d422ce2eSmrgm4_defun([_LT_COMPILER_NO_RTTI], 7294d422ce2eSmrg[m4_require([_LT_TAG_COMPILER])dnl 7295fc5a983dSmrg 7296d422ce2eSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7297fc5a983dSmrg 7298d422ce2eSmrgif test yes = "$GCC"; then 7299d422ce2eSmrg case $cc_basename in 7300d422ce2eSmrg nvcc*) 7301d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7302d422ce2eSmrg *) 7303d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7304d422ce2eSmrg esac 7305fc5a983dSmrg 7306d422ce2eSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7307d422ce2eSmrg lt_cv_prog_compiler_rtti_exceptions, 7308d422ce2eSmrg [-fno-rtti -fno-exceptions], [], 7309d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7310d422ce2eSmrgfi 7311d422ce2eSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7312d422ce2eSmrg [Compiler flag to turn off builtin functions]) 7313d422ce2eSmrg])# _LT_COMPILER_NO_RTTI 7314fc5a983dSmrg 7315fc5a983dSmrg 7316d422ce2eSmrg# _LT_CMD_GLOBAL_SYMBOLS 7317d422ce2eSmrg# ---------------------- 7318d422ce2eSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7319d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7320d422ce2eSmrgAC_REQUIRE([AC_PROG_CC])dnl 7321d422ce2eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7322d422ce2eSmrgAC_REQUIRE([LT_PATH_NM])dnl 7323d422ce2eSmrgAC_REQUIRE([LT_PATH_LD])dnl 7324d422ce2eSmrgm4_require([_LT_DECL_SED])dnl 7325d422ce2eSmrgm4_require([_LT_DECL_EGREP])dnl 7326d422ce2eSmrgm4_require([_LT_TAG_COMPILER])dnl 7327fc5a983dSmrg 7328d422ce2eSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7329d422ce2eSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7330d422ce2eSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7331d422ce2eSmrg[ 7332d422ce2eSmrg# These are sane defaults that work on at least a few old systems. 7333d422ce2eSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7334fc5a983dSmrg 7335d422ce2eSmrg# Character class describing NM global symbol codes. 7336d422ce2eSmrgsymcode='[[BCDEGRST]]' 7337fc5a983dSmrg 7338d422ce2eSmrg# Regexp to match symbols that can be accessed directly from C. 7339d422ce2eSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7340fc5a983dSmrg 7341d422ce2eSmrg# Define system-specific variables. 7342d422ce2eSmrgcase $host_os in 7343d422ce2eSmrgaix*) 7344d422ce2eSmrg symcode='[[BCDT]]' 7345d422ce2eSmrg ;; 7346d422ce2eSmrgcygwin* | mingw* | pw32* | cegcc*) 7347d422ce2eSmrg symcode='[[ABCDGISTW]]' 7348d422ce2eSmrg ;; 7349d422ce2eSmrghpux*) 7350d422ce2eSmrg if test ia64 = "$host_cpu"; then 7351d422ce2eSmrg symcode='[[ABCDEGRST]]' 7352d422ce2eSmrg fi 7353d422ce2eSmrg ;; 7354d422ce2eSmrgirix* | nonstopux*) 7355d422ce2eSmrg symcode='[[BCDEGRST]]' 7356d422ce2eSmrg ;; 7357d422ce2eSmrgosf*) 7358d422ce2eSmrg symcode='[[BCDEGQRST]]' 7359d422ce2eSmrg ;; 7360d422ce2eSmrgsolaris*) 7361d422ce2eSmrg symcode='[[BDRT]]' 7362d422ce2eSmrg ;; 7363d422ce2eSmrgsco3.2v5*) 7364d422ce2eSmrg symcode='[[DT]]' 7365d422ce2eSmrg ;; 7366d422ce2eSmrgsysv4.2uw2*) 7367d422ce2eSmrg symcode='[[DT]]' 7368d422ce2eSmrg ;; 7369d422ce2eSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7370d422ce2eSmrg symcode='[[ABDT]]' 7371d422ce2eSmrg ;; 7372d422ce2eSmrgsysv4) 7373d422ce2eSmrg symcode='[[DFNSTU]]' 7374f3561b8bSmrg ;; 7375f3561b8bSmrgesac 7376fc5a983dSmrg 7377d422ce2eSmrg# If we're using GNU nm, then use its standard symbol codes. 7378d422ce2eSmrgcase `$NM -V 2>&1` in 7379d422ce2eSmrg*GNU* | *'with BFD'*) 7380d422ce2eSmrg symcode='[[ABCDGIRSTW]]' ;; 7381f3561b8bSmrgesac 7382f3561b8bSmrg 7383d422ce2eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7384d422ce2eSmrg # Gets list of data symbols to import. 7385d422ce2eSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7386d422ce2eSmrg # Adjust the below global symbol transforms to fixup imported variables. 7387d422ce2eSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7388d422ce2eSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7389d422ce2eSmrg lt_c_name_lib_hook="\ 7390d422ce2eSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7391d422ce2eSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7392d422ce2eSmrgelse 7393d422ce2eSmrg # Disable hooks by default. 7394d422ce2eSmrg lt_cv_sys_global_symbol_to_import= 7395d422ce2eSmrg lt_cdecl_hook= 7396d422ce2eSmrg lt_c_name_hook= 7397d422ce2eSmrg lt_c_name_lib_hook= 7398bd304fc0Smrgfi 7399fc5a983dSmrg 7400d422ce2eSmrg# Transform an extracted symbol line into a proper C declaration. 7401d422ce2eSmrg# Some systems (esp. on ia64) link data and code symbols differently, 7402d422ce2eSmrg# so use this general approach. 7403d422ce2eSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7404d422ce2eSmrg$lt_cdecl_hook\ 7405d422ce2eSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7406d422ce2eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7407fc5a983dSmrg 7408d422ce2eSmrg# Transform an extracted symbol line into symbol name and symbol address 7409d422ce2eSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7410d422ce2eSmrg$lt_c_name_hook\ 7411d422ce2eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7412d422ce2eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7413fc5a983dSmrg 7414d422ce2eSmrg# Transform an extracted symbol line into symbol name with lib prefix and 7415d422ce2eSmrg# symbol address. 7416d422ce2eSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7417d422ce2eSmrg$lt_c_name_lib_hook\ 7418d422ce2eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7419d422ce2eSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7420d422ce2eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7421fc5a983dSmrg 7422d422ce2eSmrg# Handle CRLF in mingw tool chain 7423d422ce2eSmrgopt_cr= 7424d422ce2eSmrgcase $build_os in 7425d422ce2eSmrgmingw*) 7426d422ce2eSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7427d422ce2eSmrg ;; 7428d422ce2eSmrgesac 7429fc5a983dSmrg 7430d422ce2eSmrg# Try without a prefix underscore, then with it. 7431d422ce2eSmrgfor ac_symprfx in "" "_"; do 7432f3561b8bSmrg 7433d422ce2eSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7434d422ce2eSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7435f3561b8bSmrg 7436d422ce2eSmrg # Write the raw and C identifiers. 7437d422ce2eSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7438d422ce2eSmrg # Fake it for dumpbin and say T for any non-static function, 7439d422ce2eSmrg # D for any global variable and I for any imported variable. 7440d422ce2eSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7441d422ce2eSmrg # which start with @ or ?. 7442d422ce2eSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7443d422ce2eSmrg" {last_section=section; section=\$ 3};"\ 7444d422ce2eSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7445d422ce2eSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7446d422ce2eSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7447d422ce2eSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7448d422ce2eSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7449d422ce2eSmrg" \$ 0!~/External *\|/{next};"\ 7450d422ce2eSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7451d422ce2eSmrg" {if(hide[section]) next};"\ 7452d422ce2eSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7453d422ce2eSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7454d422ce2eSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7455d422ce2eSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7456d422ce2eSmrg" ' prfx=^$ac_symprfx]" 7457d422ce2eSmrg else 7458d422ce2eSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7459d422ce2eSmrg fi 7460d422ce2eSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7461f3561b8bSmrg 7462d422ce2eSmrg # Check to see that the pipe works correctly. 7463d422ce2eSmrg pipe_works=no 7464f3561b8bSmrg 7465d422ce2eSmrg rm -f conftest* 7466d422ce2eSmrg cat > conftest.$ac_ext <<_LT_EOF 7467d422ce2eSmrg#ifdef __cplusplus 7468d422ce2eSmrgextern "C" { 7469d422ce2eSmrg#endif 7470d422ce2eSmrgchar nm_test_var; 7471d422ce2eSmrgvoid nm_test_func(void); 7472d422ce2eSmrgvoid nm_test_func(void){} 7473d422ce2eSmrg#ifdef __cplusplus 7474d422ce2eSmrg} 7475d422ce2eSmrg#endif 7476d422ce2eSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 7477d422ce2eSmrg_LT_EOF 7478f3561b8bSmrg 7479d422ce2eSmrg if AC_TRY_EVAL(ac_compile); then 7480d422ce2eSmrg # Now try to grab the symbols. 7481d422ce2eSmrg nlist=conftest.nm 7482d422ce2eSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7483d422ce2eSmrg # Try sorting and uniquifying the output. 7484d422ce2eSmrg if sort "$nlist" | uniq > "$nlist"T; then 7485d422ce2eSmrg mv -f "$nlist"T "$nlist" 7486d422ce2eSmrg else 7487d422ce2eSmrg rm -f "$nlist"T 7488d422ce2eSmrg fi 7489fc5a983dSmrg 7490d422ce2eSmrg # Make sure that we snagged all the symbols we need. 7491d422ce2eSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7492d422ce2eSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7493d422ce2eSmrg cat <<_LT_EOF > conftest.$ac_ext 7494d422ce2eSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7495d422ce2eSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7496d422ce2eSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7497d422ce2eSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7498d422ce2eSmrg# define LT@&t@_DLSYM_CONST 7499d422ce2eSmrg#elif defined __osf__ 7500d422ce2eSmrg/* This system does not cope well with relocations in const data. */ 7501d422ce2eSmrg# define LT@&t@_DLSYM_CONST 7502d422ce2eSmrg#else 7503d422ce2eSmrg# define LT@&t@_DLSYM_CONST const 7504d422ce2eSmrg#endif 7505fc5a983dSmrg 7506d422ce2eSmrg#ifdef __cplusplus 7507d422ce2eSmrgextern "C" { 7508d422ce2eSmrg#endif 7509fc5a983dSmrg 7510d422ce2eSmrg_LT_EOF 7511d422ce2eSmrg # Now generate the symbol file. 7512d422ce2eSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7513bd304fc0Smrg 7514d422ce2eSmrg cat <<_LT_EOF >> conftest.$ac_ext 7515f3561b8bSmrg 7516d422ce2eSmrg/* The mapping between symbol names and symbols. */ 7517d422ce2eSmrgLT@&t@_DLSYM_CONST struct { 7518d422ce2eSmrg const char *name; 7519d422ce2eSmrg void *address; 7520d422ce2eSmrg} 7521d422ce2eSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7522d422ce2eSmrg{ 7523d422ce2eSmrg { "@PROGRAM@", (void *) 0 }, 7524d422ce2eSmrg_LT_EOF 7525d422ce2eSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7526d422ce2eSmrg cat <<\_LT_EOF >> conftest.$ac_ext 7527d422ce2eSmrg {0, (void *) 0} 7528d422ce2eSmrg}; 7529f3561b8bSmrg 7530d422ce2eSmrg/* This works around a problem in FreeBSD linker */ 7531d422ce2eSmrg#ifdef FREEBSD_WORKAROUND 7532d422ce2eSmrgstatic const void *lt_preloaded_setup() { 7533d422ce2eSmrg return lt__PROGRAM__LTX_preloaded_symbols; 7534d422ce2eSmrg} 7535d422ce2eSmrg#endif 7536f3561b8bSmrg 7537d422ce2eSmrg#ifdef __cplusplus 7538d422ce2eSmrg} 7539d422ce2eSmrg#endif 7540d422ce2eSmrg_LT_EOF 7541d422ce2eSmrg # Now try linking the two files. 7542d422ce2eSmrg mv conftest.$ac_objext conftstm.$ac_objext 7543d422ce2eSmrg lt_globsym_save_LIBS=$LIBS 7544d422ce2eSmrg lt_globsym_save_CFLAGS=$CFLAGS 7545d422ce2eSmrg LIBS=conftstm.$ac_objext 7546d422ce2eSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7547d422ce2eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7548d422ce2eSmrg pipe_works=yes 7549d422ce2eSmrg fi 7550d422ce2eSmrg LIBS=$lt_globsym_save_LIBS 7551d422ce2eSmrg CFLAGS=$lt_globsym_save_CFLAGS 7552d422ce2eSmrg else 7553d422ce2eSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7554d422ce2eSmrg fi 7555d422ce2eSmrg else 7556d422ce2eSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7557d422ce2eSmrg fi 7558d422ce2eSmrg else 7559d422ce2eSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7560d422ce2eSmrg fi 7561d422ce2eSmrg else 7562d422ce2eSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7563d422ce2eSmrg cat conftest.$ac_ext >&5 7564d422ce2eSmrg fi 7565d422ce2eSmrg rm -rf conftest* conftst* 7566f3561b8bSmrg 7567d422ce2eSmrg # Do not use the global_symbol_pipe unless it works. 7568d422ce2eSmrg if test yes = "$pipe_works"; then 7569d422ce2eSmrg break 7570d422ce2eSmrg else 7571d422ce2eSmrg lt_cv_sys_global_symbol_pipe= 7572d422ce2eSmrg fi 7573d422ce2eSmrgdone 7574d422ce2eSmrg]) 7575d422ce2eSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7576d422ce2eSmrg lt_cv_sys_global_symbol_to_cdecl= 7577d422ce2eSmrgfi 7578d422ce2eSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7579d422ce2eSmrg AC_MSG_RESULT(failed) 7580d422ce2eSmrgelse 7581d422ce2eSmrg AC_MSG_RESULT(ok) 7582d422ce2eSmrgfi 7583fc5a983dSmrg 7584d422ce2eSmrg# Response file support. 7585d422ce2eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7586d422ce2eSmrg nm_file_list_spec='@' 7587d422ce2eSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7588d422ce2eSmrg nm_file_list_spec='@' 7589d422ce2eSmrgfi 7590fc5a983dSmrg 7591d422ce2eSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7592d422ce2eSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 7593d422ce2eSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7594d422ce2eSmrg [Transform the output of nm in a proper C declaration]) 7595d422ce2eSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7596d422ce2eSmrg [Transform the output of nm into a list of symbols to manually relocate]) 7597d422ce2eSmrg_LT_DECL([global_symbol_to_c_name_address], 7598d422ce2eSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7599d422ce2eSmrg [Transform the output of nm in a C name address pair]) 7600d422ce2eSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7601d422ce2eSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7602d422ce2eSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7603d422ce2eSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7604d422ce2eSmrg [The name lister interface]) 7605d422ce2eSmrg_LT_DECL([], [nm_file_list_spec], [1], 7606d422ce2eSmrg [Specify filename containing input files for $NM]) 7607d422ce2eSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 7608fc5a983dSmrg 7609fc5a983dSmrg 7610d422ce2eSmrg# _LT_COMPILER_PIC([TAGNAME]) 7611d422ce2eSmrg# --------------------------- 7612d422ce2eSmrgm4_defun([_LT_COMPILER_PIC], 7613d422ce2eSmrg[m4_require([_LT_TAG_COMPILER])dnl 7614d422ce2eSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7615d422ce2eSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7616d422ce2eSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7617f3561b8bSmrg 7618d422ce2eSmrgm4_if([$1], [CXX], [ 7619d422ce2eSmrg # C++ specific cases for pic, static, wl, etc. 7620d422ce2eSmrg if test yes = "$GXX"; then 7621d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7622d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7623f3561b8bSmrg 7624d422ce2eSmrg case $host_os in 7625d422ce2eSmrg aix*) 7626d422ce2eSmrg # All AIX code is PIC. 7627d422ce2eSmrg if test ia64 = "$host_cpu"; then 7628d422ce2eSmrg # AIX 5 now supports IA64 processor 7629d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7630d422ce2eSmrg fi 7631d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7632d422ce2eSmrg ;; 7633fc5a983dSmrg 7634d422ce2eSmrg amigaos*) 7635d422ce2eSmrg case $host_cpu in 7636d422ce2eSmrg powerpc) 7637d422ce2eSmrg # see comment about AmigaOS4 .so support 7638d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7639d422ce2eSmrg ;; 7640d422ce2eSmrg m68k) 7641d422ce2eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7642d422ce2eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7643d422ce2eSmrg # like '-m68040'. 7644d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7645d422ce2eSmrg ;; 7646d422ce2eSmrg esac 7647d422ce2eSmrg ;; 7648f3561b8bSmrg 7649d422ce2eSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7650d422ce2eSmrg # PIC is the default for these OSes. 7651d422ce2eSmrg ;; 7652d422ce2eSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7653d422ce2eSmrg # This hack is so that the source file can tell whether it is being 7654d422ce2eSmrg # built for inclusion in a dll (and should export symbols for example). 7655d422ce2eSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7656d422ce2eSmrg # (--disable-auto-import) libraries 7657d422ce2eSmrg m4_if([$1], [GCJ], [], 7658d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7659d422ce2eSmrg case $host_os in 7660d422ce2eSmrg os2*) 7661d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7662d422ce2eSmrg ;; 7663d422ce2eSmrg esac 7664d422ce2eSmrg ;; 7665d422ce2eSmrg darwin* | rhapsody*) 7666d422ce2eSmrg # PIC is the default on this platform 7667d422ce2eSmrg # Common symbols not allowed in MH_DYLIB files 7668d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7669d422ce2eSmrg ;; 7670d422ce2eSmrg *djgpp*) 7671d422ce2eSmrg # DJGPP does not support shared libraries at all 7672d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7673d422ce2eSmrg ;; 7674d422ce2eSmrg haiku*) 7675d422ce2eSmrg # PIC is the default for Haiku. 7676d422ce2eSmrg # The "-static" flag exists, but is broken. 7677d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7678d422ce2eSmrg ;; 7679d422ce2eSmrg interix[[3-9]]*) 7680d422ce2eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7681d422ce2eSmrg # Instead, we relocate shared libraries at runtime. 7682d422ce2eSmrg ;; 7683d422ce2eSmrg sysv4*MP*) 7684d422ce2eSmrg if test -d /usr/nec; then 7685d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7686d422ce2eSmrg fi 7687d422ce2eSmrg ;; 7688d422ce2eSmrg hpux*) 7689d422ce2eSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7690d422ce2eSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7691d422ce2eSmrg # sets the default TLS model and affects inlining. 7692d422ce2eSmrg case $host_cpu in 7693d422ce2eSmrg hppa*64*) 7694d422ce2eSmrg ;; 7695d422ce2eSmrg *) 7696d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7697d422ce2eSmrg ;; 7698d422ce2eSmrg esac 7699d422ce2eSmrg ;; 7700d422ce2eSmrg *qnx* | *nto*) 7701d422ce2eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7702d422ce2eSmrg # it will coredump. 7703d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7704d422ce2eSmrg ;; 7705d422ce2eSmrg *) 7706d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7707d422ce2eSmrg ;; 7708d422ce2eSmrg esac 7709d422ce2eSmrg else 7710fc5a983dSmrg case $host_os in 7711fc5a983dSmrg aix[[4-9]]*) 7712d422ce2eSmrg # All AIX code is PIC. 7713d422ce2eSmrg if test ia64 = "$host_cpu"; then 7714d422ce2eSmrg # AIX 5 now supports IA64 processor 7715d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7716d422ce2eSmrg else 7717d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7718fc5a983dSmrg fi 7719d422ce2eSmrg ;; 7720d422ce2eSmrg chorus*) 7721d422ce2eSmrg case $cc_basename in 7722d422ce2eSmrg cxch68*) 7723d422ce2eSmrg # Green Hills C++ Compiler 7724d422ce2eSmrg # _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" 7725d422ce2eSmrg ;; 7726d422ce2eSmrg esac 7727d422ce2eSmrg ;; 7728d422ce2eSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7729d422ce2eSmrg # This hack is so that the source file can tell whether it is being 7730d422ce2eSmrg # built for inclusion in a dll (and should export symbols for example). 7731d422ce2eSmrg m4_if([$1], [GCJ], [], 7732d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7733d422ce2eSmrg ;; 7734d422ce2eSmrg dgux*) 7735d422ce2eSmrg case $cc_basename in 7736d422ce2eSmrg ec++*) 7737d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7738d422ce2eSmrg ;; 7739d422ce2eSmrg ghcx*) 7740d422ce2eSmrg # Green Hills C++ Compiler 7741d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7742d422ce2eSmrg ;; 7743d422ce2eSmrg *) 7744d422ce2eSmrg ;; 7745d422ce2eSmrg esac 7746d422ce2eSmrg ;; 7747d422ce2eSmrg freebsd* | dragonfly* | midnightbsd*) 7748d422ce2eSmrg # FreeBSD uses GNU C++ 7749d422ce2eSmrg ;; 7750d422ce2eSmrg hpux9* | hpux10* | hpux11*) 7751d422ce2eSmrg case $cc_basename in 7752d422ce2eSmrg CC*) 7753d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7754d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7755d422ce2eSmrg if test ia64 != "$host_cpu"; then 7756d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7757d422ce2eSmrg fi 7758d422ce2eSmrg ;; 7759d422ce2eSmrg aCC*) 7760d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7761d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7762d422ce2eSmrg case $host_cpu in 7763d422ce2eSmrg hppa*64*|ia64*) 7764d422ce2eSmrg # +Z the default 7765d422ce2eSmrg ;; 7766d422ce2eSmrg *) 7767d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7768d422ce2eSmrg ;; 7769d422ce2eSmrg esac 7770d422ce2eSmrg ;; 7771d422ce2eSmrg *) 7772d422ce2eSmrg ;; 7773d422ce2eSmrg esac 7774d422ce2eSmrg ;; 7775d422ce2eSmrg interix*) 7776d422ce2eSmrg # This is c89, which is MS Visual C++ (no shared libs) 7777d422ce2eSmrg # Anyone wants to do a port? 7778d422ce2eSmrg ;; 7779d422ce2eSmrg irix5* | irix6* | nonstopux*) 7780d422ce2eSmrg case $cc_basename in 7781d422ce2eSmrg CC*) 7782d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7783d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7784d422ce2eSmrg # CC pic flag -KPIC is the default. 7785d422ce2eSmrg ;; 7786d422ce2eSmrg *) 7787d422ce2eSmrg ;; 7788d422ce2eSmrg esac 7789d422ce2eSmrg ;; 7790d422ce2eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7791d422ce2eSmrg case $cc_basename in 7792d422ce2eSmrg KCC*) 7793d422ce2eSmrg # KAI C++ Compiler 7794d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7796d422ce2eSmrg ;; 7797d422ce2eSmrg ecpc* ) 7798d422ce2eSmrg # old Intel C++ for x86_64, which still supported -KPIC. 7799d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7800d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7801d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7802d422ce2eSmrg ;; 7803d422ce2eSmrg icpc* ) 7804d422ce2eSmrg # Intel C++, used to be incompatible with GCC. 7805d422ce2eSmrg # ICC 10 doesn't accept -KPIC any more. 7806d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7807d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7808d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7809d422ce2eSmrg ;; 7810d422ce2eSmrg pgCC* | pgcpp*) 7811d422ce2eSmrg # Portland Group C++ compiler 7812d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7813d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7814d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7815d422ce2eSmrg ;; 7816d422ce2eSmrg cxx*) 7817d422ce2eSmrg # Compaq C++ 7818d422ce2eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7819d422ce2eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7820d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7821d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7822d422ce2eSmrg ;; 7823d422ce2eSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7824d422ce2eSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7825d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7826d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7827d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7828d422ce2eSmrg ;; 7829d422ce2eSmrg *) 7830d422ce2eSmrg case `$CC -V 2>&1 | $SED 5q` in 7831d422ce2eSmrg *Sun\ C*) 7832d422ce2eSmrg # Sun C++ 5.9 7833d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7834d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7835d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7836d422ce2eSmrg ;; 7837d422ce2eSmrg esac 7838d422ce2eSmrg ;; 7839d422ce2eSmrg esac 7840d422ce2eSmrg ;; 7841d422ce2eSmrg lynxos*) 7842d422ce2eSmrg ;; 7843d422ce2eSmrg m88k*) 7844d422ce2eSmrg ;; 7845d422ce2eSmrg mvs*) 7846d422ce2eSmrg case $cc_basename in 7847d422ce2eSmrg cxx*) 7848d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7849d422ce2eSmrg ;; 7850d422ce2eSmrg *) 7851d422ce2eSmrg ;; 7852d422ce2eSmrg esac 7853d422ce2eSmrg ;; 7854d422ce2eSmrg netbsd*) 7855d422ce2eSmrg ;; 7856d422ce2eSmrg *qnx* | *nto*) 7857d422ce2eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7858d422ce2eSmrg # it will coredump. 7859d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7860f3561b8bSmrg ;; 7861d422ce2eSmrg osf3* | osf4* | osf5*) 7862d422ce2eSmrg case $cc_basename in 7863d422ce2eSmrg KCC*) 7864d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7865d422ce2eSmrg ;; 7866d422ce2eSmrg RCC*) 7867d422ce2eSmrg # Rational C++ 2.4.1 7868d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7869d422ce2eSmrg ;; 7870d422ce2eSmrg cxx*) 7871d422ce2eSmrg # Digital/Compaq C++ 7872d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7873d422ce2eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7874d422ce2eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7875d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7876d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7877d422ce2eSmrg ;; 7878d422ce2eSmrg *) 7879d422ce2eSmrg ;; 7880d422ce2eSmrg esac 7881d422ce2eSmrg ;; 7882d422ce2eSmrg psos*) 7883d422ce2eSmrg ;; 7884d422ce2eSmrg solaris*) 7885d422ce2eSmrg case $cc_basename in 7886d422ce2eSmrg CC* | sunCC*) 7887d422ce2eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7888d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7889d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7890d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7891d422ce2eSmrg ;; 7892d422ce2eSmrg gcx*) 7893d422ce2eSmrg # Green Hills C++ Compiler 7894d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7895d422ce2eSmrg ;; 7896d422ce2eSmrg *) 7897d422ce2eSmrg ;; 7898d422ce2eSmrg esac 7899d422ce2eSmrg ;; 7900d422ce2eSmrg sunos4*) 7901d422ce2eSmrg case $cc_basename in 7902d422ce2eSmrg CC*) 7903d422ce2eSmrg # Sun C++ 4.x 7904d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7905d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7906d422ce2eSmrg ;; 7907d422ce2eSmrg lcc*) 7908d422ce2eSmrg # Lucid 7909d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7910d422ce2eSmrg ;; 7911d422ce2eSmrg *) 7912d422ce2eSmrg ;; 7913d422ce2eSmrg esac 7914d422ce2eSmrg ;; 7915d422ce2eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7916d422ce2eSmrg case $cc_basename in 7917d422ce2eSmrg CC*) 7918d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7919d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7920d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7921d422ce2eSmrg ;; 7922d422ce2eSmrg esac 7923d422ce2eSmrg ;; 7924d422ce2eSmrg tandem*) 7925d422ce2eSmrg case $cc_basename in 7926d422ce2eSmrg NCC*) 7927d422ce2eSmrg # NonStop-UX NCC 3.20 7928d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7929d422ce2eSmrg ;; 7930d422ce2eSmrg *) 7931d422ce2eSmrg ;; 7932d422ce2eSmrg esac 7933d422ce2eSmrg ;; 7934d422ce2eSmrg vxworks*) 7935d422ce2eSmrg ;; 7936d422ce2eSmrg *) 7937d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7938d422ce2eSmrg ;; 7939fc5a983dSmrg esac 7940d422ce2eSmrg fi 7941d422ce2eSmrg], 7942d422ce2eSmrg[ 7943d422ce2eSmrg if test yes = "$GCC"; then 7944d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7945d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7946bd304fc0Smrg 7947d422ce2eSmrg case $host_os in 7948d422ce2eSmrg aix*) 7949d422ce2eSmrg # All AIX code is PIC. 7950d422ce2eSmrg if test ia64 = "$host_cpu"; then 7951d422ce2eSmrg # AIX 5 now supports IA64 processor 7952d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7953d422ce2eSmrg fi 7954d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7955d422ce2eSmrg ;; 7956bd304fc0Smrg 7957d422ce2eSmrg amigaos*) 7958d422ce2eSmrg case $host_cpu in 7959d422ce2eSmrg powerpc) 7960d422ce2eSmrg # see comment about AmigaOS4 .so support 7961d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7962d422ce2eSmrg ;; 7963d422ce2eSmrg m68k) 7964d422ce2eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7965d422ce2eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7966d422ce2eSmrg # like '-m68040'. 7967d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7968d422ce2eSmrg ;; 7969d422ce2eSmrg esac 7970d422ce2eSmrg ;; 7971fc5a983dSmrg 7972d422ce2eSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7973d422ce2eSmrg # PIC is the default for these OSes. 7974d422ce2eSmrg ;; 7975fc5a983dSmrg 7976d422ce2eSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7977d422ce2eSmrg # This hack is so that the source file can tell whether it is being 7978d422ce2eSmrg # built for inclusion in a dll (and should export symbols for example). 7979d422ce2eSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7980d422ce2eSmrg # (--disable-auto-import) libraries 7981d422ce2eSmrg m4_if([$1], [GCJ], [], 7982d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7983d422ce2eSmrg case $host_os in 7984d422ce2eSmrg os2*) 7985d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7986d422ce2eSmrg ;; 7987d422ce2eSmrg esac 7988d422ce2eSmrg ;; 7989fc5a983dSmrg 7990d422ce2eSmrg darwin* | rhapsody*) 7991d422ce2eSmrg # PIC is the default on this platform 7992d422ce2eSmrg # Common symbols not allowed in MH_DYLIB files 7993d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7994d422ce2eSmrg ;; 7995fc5a983dSmrg 7996d422ce2eSmrg haiku*) 7997d422ce2eSmrg # PIC is the default for Haiku. 7998d422ce2eSmrg # The "-static" flag exists, but is broken. 7999d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8000d422ce2eSmrg ;; 8001fc5a983dSmrg 8002d422ce2eSmrg hpux*) 8003d422ce2eSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8004d422ce2eSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8005d422ce2eSmrg # sets the default TLS model and affects inlining. 8006d422ce2eSmrg case $host_cpu in 8007d422ce2eSmrg hppa*64*) 8008d422ce2eSmrg # +Z the default 8009d422ce2eSmrg ;; 8010d422ce2eSmrg *) 8011d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8012d422ce2eSmrg ;; 8013d422ce2eSmrg esac 8014d422ce2eSmrg ;; 8015fc5a983dSmrg 8016d422ce2eSmrg interix[[3-9]]*) 8017d422ce2eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8018d422ce2eSmrg # Instead, we relocate shared libraries at runtime. 8019d422ce2eSmrg ;; 8020fc5a983dSmrg 8021d422ce2eSmrg msdosdjgpp*) 8022d422ce2eSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8023d422ce2eSmrg # on systems that don't support them. 8024d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8025d422ce2eSmrg enable_shared=no 8026d422ce2eSmrg ;; 8027fc5a983dSmrg 8028d422ce2eSmrg *nto* | *qnx*) 8029d422ce2eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8030d422ce2eSmrg # it will coredump. 8031d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8032d422ce2eSmrg ;; 8033fc5a983dSmrg 8034d422ce2eSmrg sysv4*MP*) 8035d422ce2eSmrg if test -d /usr/nec; then 8036d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8037f3561b8bSmrg fi 8038d422ce2eSmrg ;; 8039f3561b8bSmrg 8040d422ce2eSmrg *) 8041d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8042d422ce2eSmrg ;; 8043d422ce2eSmrg esac 8044f3561b8bSmrg 8045d422ce2eSmrg case $cc_basename in 8046d422ce2eSmrg nvcc*) # Cuda Compiler Driver 2.2 8047d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8048d422ce2eSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8049d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8050d422ce2eSmrg fi 8051d422ce2eSmrg ;; 8052d422ce2eSmrg esac 8053d422ce2eSmrg else 8054d422ce2eSmrg # PORTME Check for flag to pass linker flags through the system compiler. 8055d422ce2eSmrg case $host_os in 8056d422ce2eSmrg aix*) 8057d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8058d422ce2eSmrg if test ia64 = "$host_cpu"; then 8059d422ce2eSmrg # AIX 5 now supports IA64 processor 8060d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8061d422ce2eSmrg else 8062d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8063d422ce2eSmrg fi 8064d422ce2eSmrg ;; 8065f3561b8bSmrg 8066d422ce2eSmrg darwin* | rhapsody*) 8067d422ce2eSmrg # PIC is the default on this platform 8068d422ce2eSmrg # Common symbols not allowed in MH_DYLIB files 8069d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8070d422ce2eSmrg case $cc_basename in 8071d422ce2eSmrg nagfor*) 8072d422ce2eSmrg # NAG Fortran compiler 8073d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8074d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8075d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8076d422ce2eSmrg ;; 8077d422ce2eSmrg esac 8078d422ce2eSmrg ;; 8079f3561b8bSmrg 8080d422ce2eSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8081d422ce2eSmrg # This hack is so that the source file can tell whether it is being 8082d422ce2eSmrg # built for inclusion in a dll (and should export symbols for example). 8083d422ce2eSmrg m4_if([$1], [GCJ], [], 8084d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8085d422ce2eSmrg case $host_os in 8086d422ce2eSmrg os2*) 8087d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8088d422ce2eSmrg ;; 8089d422ce2eSmrg esac 8090d422ce2eSmrg ;; 8091f3561b8bSmrg 8092d422ce2eSmrg hpux9* | hpux10* | hpux11*) 8093d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8094d422ce2eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8095d422ce2eSmrg # not for PA HP-UX. 8096d422ce2eSmrg case $host_cpu in 8097d422ce2eSmrg hppa*64*|ia64*) 8098d422ce2eSmrg # +Z the default 8099d422ce2eSmrg ;; 8100d422ce2eSmrg *) 8101d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8102d422ce2eSmrg ;; 8103d422ce2eSmrg esac 8104d422ce2eSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8105d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8106d422ce2eSmrg ;; 8107d422ce2eSmrg 8108d422ce2eSmrg irix5* | irix6* | nonstopux*) 8109d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8110d422ce2eSmrg # PIC (with -KPIC) is the default. 8111d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8112d422ce2eSmrg ;; 8113d422ce2eSmrg 8114d422ce2eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8115d422ce2eSmrg case $cc_basename in 8116d422ce2eSmrg # old Intel for x86_64, which still supported -KPIC. 8117d422ce2eSmrg ecc*) 8118d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8119d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8120d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8121bd304fc0Smrg ;; 8122d422ce2eSmrg # icc used to be incompatible with GCC. 8123d422ce2eSmrg # ICC 10 doesn't accept -KPIC any more. 8124d422ce2eSmrg icc* | ifort*) 8125d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8126d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8127d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8128bd304fc0Smrg ;; 8129d422ce2eSmrg # Lahey Fortran 8.1. 8130d422ce2eSmrg lf95*) 8131d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8132d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8133d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8134d422ce2eSmrg ;; 8135d422ce2eSmrg nagfor*) 8136d422ce2eSmrg # NAG Fortran compiler 8137d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8138d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8139d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8140d422ce2eSmrg ;; 8141d422ce2eSmrg tcc*) 8142d422ce2eSmrg # Fabrice Bellard et al's Tiny C Compiler 8143d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8144d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8145d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8146d422ce2eSmrg ;; 8147d422ce2eSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8148d422ce2eSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 8149d422ce2eSmrg # which looks to be a dead project) 8150d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8151d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8152d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153bd304fc0Smrg ;; 8154d422ce2eSmrg ccc*) 8155d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8156d422ce2eSmrg # All Alpha code is PIC. 8157d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8158bd304fc0Smrg ;; 8159d422ce2eSmrg xl* | bgxl* | bgf* | mpixl*) 8160d422ce2eSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8161d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8162d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8163d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8164d422ce2eSmrg ;; 8165d422ce2eSmrg *) 8166d422ce2eSmrg case `$CC -V 2>&1 | $SED 5q` in 8167d422ce2eSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8168d422ce2eSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8169d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8172d422ce2eSmrg ;; 8173d422ce2eSmrg *Sun\ F* | *Sun*Fortran*) 8174d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8175d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8176d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8177d422ce2eSmrg ;; 8178d422ce2eSmrg *Sun\ C*) 8179d422ce2eSmrg # Sun C 5.9 8180d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8181d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8182d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8183d422ce2eSmrg ;; 8184d422ce2eSmrg *Intel*\ [[CF]]*Compiler*) 8185d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8186d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8187d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8188d422ce2eSmrg ;; 8189d422ce2eSmrg *Portland\ Group*) 8190d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8191d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8192d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8193d422ce2eSmrg ;; 8194d422ce2eSmrg esac 8195d422ce2eSmrg ;; 8196d422ce2eSmrg esac 8197d422ce2eSmrg ;; 8198bd304fc0Smrg 8199d422ce2eSmrg newsos6) 8200d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8201d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8202d422ce2eSmrg ;; 8203fc5a983dSmrg 8204d422ce2eSmrg *nto* | *qnx*) 8205d422ce2eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8206d422ce2eSmrg # it will coredump. 8207d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8208d422ce2eSmrg ;; 8209fc5a983dSmrg 8210d422ce2eSmrg osf3* | osf4* | osf5*) 8211d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8212d422ce2eSmrg # All OSF/1 code is PIC. 8213d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8214d422ce2eSmrg ;; 8215fc5a983dSmrg 8216d422ce2eSmrg rdos*) 8217d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8218d422ce2eSmrg ;; 8219fc5a983dSmrg 8220d422ce2eSmrg solaris*) 8221d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8222d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8223d422ce2eSmrg case $cc_basename in 8224d422ce2eSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8225d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8226d422ce2eSmrg *) 8227d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8228d422ce2eSmrg esac 8229d422ce2eSmrg ;; 8230fc5a983dSmrg 8231d422ce2eSmrg sunos4*) 8232d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8233d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8234d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8235d422ce2eSmrg ;; 8236fc5a983dSmrg 8237d422ce2eSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 8238d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8239d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8240d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8241d422ce2eSmrg ;; 8242fc5a983dSmrg 8243d422ce2eSmrg sysv4*MP*) 8244d422ce2eSmrg if test -d /usr/nec; then 8245d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8246d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8247d422ce2eSmrg fi 8248d422ce2eSmrg ;; 8249fc5a983dSmrg 8250d422ce2eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8251d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8252d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8253d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8254d422ce2eSmrg ;; 8255fc5a983dSmrg 8256d422ce2eSmrg unicos*) 8257d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8258d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8259d422ce2eSmrg ;; 8260f3561b8bSmrg 8261d422ce2eSmrg uts4*) 8262d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8263d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8264d422ce2eSmrg ;; 8265f3561b8bSmrg 8266d422ce2eSmrg *) 8267d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8268d422ce2eSmrg ;; 8269d422ce2eSmrg esac 8270d422ce2eSmrg fi 8271f3561b8bSmrg]) 8272d422ce2eSmrgcase $host_os in 8273d422ce2eSmrg # For platforms that do not support PIC, -DPIC is meaningless: 8274d422ce2eSmrg *djgpp*) 8275d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8276d422ce2eSmrg ;; 8277d422ce2eSmrg *) 8278d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8279d422ce2eSmrg ;; 8280d422ce2eSmrgesac 8281fc5a983dSmrg 8282d422ce2eSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8283d422ce2eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8284d422ce2eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8285d422ce2eSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8286fc5a983dSmrg 8287d422ce2eSmrg# 8288d422ce2eSmrg# Check to make sure the PIC flag actually works. 8289d422ce2eSmrg# 8290d422ce2eSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8291d422ce2eSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8292d422ce2eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8293d422ce2eSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8294d422ce2eSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8295d422ce2eSmrg "" | " "*) ;; 8296d422ce2eSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8297d422ce2eSmrg esac], 8298d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8299d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8300d422ce2eSmrgfi 8301d422ce2eSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8302d422ce2eSmrg [Additional compiler flags for building library objects]) 8303f3561b8bSmrg 8304d422ce2eSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8305d422ce2eSmrg [How to pass a linker flag through the compiler]) 8306d422ce2eSmrg# 8307d422ce2eSmrg# Check to make sure the static flag actually works. 8308d422ce2eSmrg# 8309d422ce2eSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8310d422ce2eSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8311d422ce2eSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8312d422ce2eSmrg $lt_tmp_static_flag, 8313d422ce2eSmrg [], 8314d422ce2eSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8315d422ce2eSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8316d422ce2eSmrg [Compiler flag to prevent dynamic linking]) 8317d422ce2eSmrg])# _LT_COMPILER_PIC 8318fc5a983dSmrg 8319fc5a983dSmrg 8320d422ce2eSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 8321d422ce2eSmrg# ---------------------------- 8322d422ce2eSmrg# See if the linker supports building shared libraries. 8323d422ce2eSmrgm4_defun([_LT_LINKER_SHLIBS], 8324d422ce2eSmrg[AC_REQUIRE([LT_PATH_LD])dnl 8325d422ce2eSmrgAC_REQUIRE([LT_PATH_NM])dnl 8326d422ce2eSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8327d422ce2eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8328d422ce2eSmrgm4_require([_LT_DECL_EGREP])dnl 8329d422ce2eSmrgm4_require([_LT_DECL_SED])dnl 8330d422ce2eSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8331d422ce2eSmrgm4_require([_LT_TAG_COMPILER])dnl 8332d422ce2eSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8333d422ce2eSmrgm4_if([$1], [CXX], [ 8334d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8335d422ce2eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8336d422ce2eSmrg case $host_os in 8337d422ce2eSmrg aix[[4-9]]*) 8338d422ce2eSmrg # If we're using GNU nm, then we don't want the "-C" option. 8339d422ce2eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8340d422ce2eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8341d422ce2eSmrg # weak defined symbols like other global defined symbols, whereas 8342d422ce2eSmrg # GNU nm marks them as "W". 8343d422ce2eSmrg # While the 'weak' keyword is ignored in the Export File, we need 8344d422ce2eSmrg # it in the Import File for the 'aix-soname' feature, so we have 8345d422ce2eSmrg # to replace the "-B" option with "-P" for AIX nm. 8346d422ce2eSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8347d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8348d422ce2eSmrg else 8349d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8350d422ce2eSmrg fi 8351d422ce2eSmrg ;; 8352d422ce2eSmrg pw32*) 8353d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8354d422ce2eSmrg ;; 8355d422ce2eSmrg cygwin* | mingw* | cegcc*) 8356d422ce2eSmrg case $cc_basename in 8357d422ce2eSmrg cl* | icl*) 8358d422ce2eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8359d422ce2eSmrg ;; 8360d422ce2eSmrg *) 8361d422ce2eSmrg _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' 8362d422ce2eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8363d422ce2eSmrg ;; 8364d422ce2eSmrg esac 8365d422ce2eSmrg ;; 8366d422ce2eSmrg *) 8367d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8368d422ce2eSmrg ;; 8369d422ce2eSmrg esac 8370d422ce2eSmrg], [ 8371d422ce2eSmrg runpath_var= 8372d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 8373d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8374d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)= 8375d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8376d422ce2eSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 8377d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8378d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8379d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8380d422ce2eSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 8381d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8382d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8383d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8384d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8385d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8386d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8387d422ce2eSmrg _LT_TAGVAR(inherit_rpath, $1)=no 8388d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8389d422ce2eSmrg _LT_TAGVAR(module_cmds, $1)= 8390d422ce2eSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 8391d422ce2eSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8392d422ce2eSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8393d422ce2eSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8394d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8395d422ce2eSmrg # include_expsyms should be a list of space-separated symbols to be *always* 8396d422ce2eSmrg # included in the symbol list 8397d422ce2eSmrg _LT_TAGVAR(include_expsyms, $1)= 8398d422ce2eSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 8399d422ce2eSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8400d422ce2eSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8401d422ce2eSmrg # as well as any symbol that contains 'd'. 8402d422ce2eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8403d422ce2eSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8404d422ce2eSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 8405d422ce2eSmrg # the symbol is explicitly referenced. Since portable code cannot 8406d422ce2eSmrg # rely on this symbol name, it's probably fine to never include it in 8407d422ce2eSmrg # preloaded symbol tables. 8408d422ce2eSmrg # Exclude shared library initialization/finalization symbols. 8409d422ce2eSmrgdnl Note also adjust exclude_expsyms for C++ above. 8410d422ce2eSmrg extract_expsyms_cmds= 8411fc5a983dSmrg 8412d422ce2eSmrg case $host_os in 8413d422ce2eSmrg cygwin* | mingw* | pw32* | cegcc*) 8414d422ce2eSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8415d422ce2eSmrg # When not using gcc, we currently assume that we are using 8416d422ce2eSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8417d422ce2eSmrg if test yes != "$GCC"; then 8418d422ce2eSmrg with_gnu_ld=no 8419d422ce2eSmrg fi 8420d422ce2eSmrg ;; 8421d422ce2eSmrg interix*) 8422d422ce2eSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8423d422ce2eSmrg with_gnu_ld=yes 8424d422ce2eSmrg ;; 8425d422ce2eSmrg openbsd* | bitrig*) 8426d422ce2eSmrg with_gnu_ld=no 8427d422ce2eSmrg ;; 8428d422ce2eSmrg esac 8429fc5a983dSmrg 8430d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8431fc5a983dSmrg 8432d422ce2eSmrg # On some targets, GNU ld is compatible enough with the native linker 8433d422ce2eSmrg # that we're better off using the native interface for both. 8434d422ce2eSmrg lt_use_gnu_ld_interface=no 8435d422ce2eSmrg if test yes = "$with_gnu_ld"; then 8436d422ce2eSmrg case $host_os in 8437d422ce2eSmrg aix*) 8438d422ce2eSmrg # The AIX port of GNU ld has always aspired to compatibility 8439d422ce2eSmrg # with the native linker. However, as the warning in the GNU ld 8440d422ce2eSmrg # block says, versions before 2.19.5* couldn't really create working 8441d422ce2eSmrg # shared libraries, regardless of the interface used. 8442d422ce2eSmrg case `$LD -v 2>&1` in 8443d422ce2eSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8444d422ce2eSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8445d422ce2eSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8446d422ce2eSmrg *) 8447d422ce2eSmrg lt_use_gnu_ld_interface=yes 8448d422ce2eSmrg ;; 8449d422ce2eSmrg esac 8450d422ce2eSmrg ;; 8451d422ce2eSmrg *) 8452d422ce2eSmrg lt_use_gnu_ld_interface=yes 8453d422ce2eSmrg ;; 8454d422ce2eSmrg esac 8455d422ce2eSmrg fi 8456fc5a983dSmrg 8457d422ce2eSmrg if test yes = "$lt_use_gnu_ld_interface"; then 8458d422ce2eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 8459d422ce2eSmrg wlarc='$wl' 8460fc5a983dSmrg 8461d422ce2eSmrg # Set some defaults for GNU ld with shared library support. These 8462d422ce2eSmrg # are reset later if shared libraries are not supported. Putting them 8463d422ce2eSmrg # here allows them to be overridden if necessary. 8464d422ce2eSmrg runpath_var=LD_RUN_PATH 8465d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8466d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8467d422ce2eSmrg # ancient GNU ld didn't support --whole-archive et. al. 8468d422ce2eSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8469d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8470d422ce2eSmrg else 8471d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8472d422ce2eSmrg fi 8473d422ce2eSmrg supports_anon_versioning=no 8474d422ce2eSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8475d422ce2eSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 8476d422ce2eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8477d422ce2eSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8478d422ce2eSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8479d422ce2eSmrg *\ 2.11.*) ;; # other 2.11 versions 8480d422ce2eSmrg *) supports_anon_versioning=yes ;; 8481d422ce2eSmrg esac 8482f3561b8bSmrg 8483d422ce2eSmrg # See if GNU ld supports shared libraries. 8484d422ce2eSmrg case $host_os in 8485d422ce2eSmrg aix[[3-9]]*) 8486d422ce2eSmrg # On AIX/PPC, the GNU linker is very broken 8487d422ce2eSmrg if test ia64 != "$host_cpu"; then 8488d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8489d422ce2eSmrg cat <<_LT_EOF 1>&2 8490f3561b8bSmrg 8491d422ce2eSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8492d422ce2eSmrg*** to be unable to reliably create shared libraries on AIX. 8493d422ce2eSmrg*** Therefore, libtool is disabling shared libraries support. If you 8494d422ce2eSmrg*** really care for shared libraries, you may want to install binutils 8495d422ce2eSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8496d422ce2eSmrg*** You will then need to restart the configuration process. 8497f3561b8bSmrg 8498d422ce2eSmrg_LT_EOF 8499d422ce2eSmrg fi 8500d422ce2eSmrg ;; 8501f3561b8bSmrg 8502d422ce2eSmrg amigaos*) 8503d422ce2eSmrg case $host_cpu in 8504d422ce2eSmrg powerpc) 8505d422ce2eSmrg # see comment about AmigaOS4 .so support 8506d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8507d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8508d422ce2eSmrg ;; 8509d422ce2eSmrg m68k) 8510d422ce2eSmrg _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)' 8511d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8512d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8513d422ce2eSmrg ;; 8514d422ce2eSmrg esac 8515d422ce2eSmrg ;; 8516f3561b8bSmrg 8517d422ce2eSmrg beos*) 8518d422ce2eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8519d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8520d422ce2eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8521d422ce2eSmrg # support --undefined. This deserves some investigation. FIXME 8522d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8523d422ce2eSmrg else 8524d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8525d422ce2eSmrg fi 8526d422ce2eSmrg ;; 8527fc5a983dSmrg 8528d422ce2eSmrg cygwin* | mingw* | pw32* | cegcc*) 8529d422ce2eSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8530d422ce2eSmrg # as there is no search path for DLLs. 8531d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8532d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8533d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8534d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8535d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8536d422ce2eSmrg _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' 8537d422ce2eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8538fc5a983dSmrg 8539d422ce2eSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8540d422ce2eSmrg _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' 8541d422ce2eSmrg # If the export-symbols file already is a .def file, use it as 8542d422ce2eSmrg # is; otherwise, prepend EXPORTS... 8543d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8544d422ce2eSmrg cp $export_symbols $output_objdir/$soname.def; 8545d422ce2eSmrg else 8546d422ce2eSmrg echo EXPORTS > $output_objdir/$soname.def; 8547d422ce2eSmrg cat $export_symbols >> $output_objdir/$soname.def; 8548d422ce2eSmrg fi~ 8549d422ce2eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8550d422ce2eSmrg else 8551d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8552d422ce2eSmrg fi 8553d422ce2eSmrg ;; 8554fc5a983dSmrg 8555d422ce2eSmrg haiku*) 8556d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8557d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8558d422ce2eSmrg ;; 8559fc5a983dSmrg 8560d422ce2eSmrg os2*) 8561d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8562d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8563d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8564d422ce2eSmrg shrext_cmds=.dll 8565d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8566d422ce2eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8567d422ce2eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8568d422ce2eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8569d422ce2eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8570d422ce2eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8571d422ce2eSmrg emximp -o $lib $output_objdir/$libname.def' 8572d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8573d422ce2eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8574d422ce2eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8575d422ce2eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8576d422ce2eSmrg prefix_cmds="$SED"~ 8577d422ce2eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8578d422ce2eSmrg prefix_cmds="$prefix_cmds -e 1d"; 8579d422ce2eSmrg fi~ 8580d422ce2eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8581d422ce2eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8582d422ce2eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8583d422ce2eSmrg emximp -o $lib $output_objdir/$libname.def' 8584d422ce2eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8585d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8586d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8587d422ce2eSmrg ;; 8588fc5a983dSmrg 8589d422ce2eSmrg interix[[3-9]]*) 8590d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8591d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8592d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8593d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8594d422ce2eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8595d422ce2eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8596d422ce2eSmrg # default) and relocated if they conflict, which is a slow very memory 8597d422ce2eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8598d422ce2eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8599d422ce2eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8600d422ce2eSmrg _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' 8601d422ce2eSmrg _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' 8602d422ce2eSmrg ;; 8603d422ce2eSmrg 8604d422ce2eSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8605d422ce2eSmrg tmp_diet=no 8606d422ce2eSmrg if test linux-dietlibc = "$host_os"; then 8607d422ce2eSmrg case $cc_basename in 8608d422ce2eSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8609d422ce2eSmrg esac 8610d422ce2eSmrg fi 8611d422ce2eSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8612d422ce2eSmrg && test no = "$tmp_diet" 8613d422ce2eSmrg then 8614d422ce2eSmrg tmp_addflag=' $pic_flag' 8615d422ce2eSmrg tmp_sharedflag='-shared' 8616d422ce2eSmrg case $cc_basename,$host_cpu in 8617d422ce2eSmrg pgcc*) # Portland Group C compiler 8618d422ce2eSmrg _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' 8619d422ce2eSmrg tmp_addflag=' $pic_flag' 8620d422ce2eSmrg ;; 8621d422ce2eSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 8622d422ce2eSmrg # Portland Group f77 and f90 compilers 8623d422ce2eSmrg _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' 8624d422ce2eSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 8625d422ce2eSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8626d422ce2eSmrg tmp_addflag=' -i_dynamic' ;; 8627d422ce2eSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8628d422ce2eSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8629d422ce2eSmrg ifc* | ifort*) # Intel Fortran compiler 8630d422ce2eSmrg tmp_addflag=' -nofor_main' ;; 8631d422ce2eSmrg lf95*) # Lahey Fortran 8.1 8632d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8633d422ce2eSmrg tmp_sharedflag='--shared' ;; 8634d422ce2eSmrg nagfor*) # NAGFOR 5.3 8635d422ce2eSmrg tmp_sharedflag='-Wl,-shared' ;; 8636d422ce2eSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8637d422ce2eSmrg tmp_sharedflag='-qmkshrobj' 8638d422ce2eSmrg tmp_addflag= ;; 8639d422ce2eSmrg nvcc*) # Cuda Compiler Driver 2.2 8640d422ce2eSmrg _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' 8641d422ce2eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8642d422ce2eSmrg ;; 8643d422ce2eSmrg esac 8644d422ce2eSmrg case `$CC -V 2>&1 | $SED 5q` in 8645d422ce2eSmrg *Sun\ C*) # Sun C 5.9 8646d422ce2eSmrg _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' 8647d422ce2eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8648d422ce2eSmrg tmp_sharedflag='-G' ;; 8649d422ce2eSmrg *Sun\ F*) # Sun Fortran 8.3 8650d422ce2eSmrg tmp_sharedflag='-G' ;; 8651d422ce2eSmrg esac 8652d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8653fc5a983dSmrg 8654d422ce2eSmrg if test yes = "$supports_anon_versioning"; then 8655d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8656d422ce2eSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8657d422ce2eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8658d422ce2eSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8659d422ce2eSmrg fi 8660fc5a983dSmrg 8661d422ce2eSmrg case $cc_basename in 8662d422ce2eSmrg tcc*) 8663d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8664d422ce2eSmrg ;; 8665d422ce2eSmrg xlf* | bgf* | bgxlf* | mpixlf*) 8666d422ce2eSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8667d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8668d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8669d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8670d422ce2eSmrg if test yes = "$supports_anon_versioning"; then 8671d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8672d422ce2eSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8673d422ce2eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8674d422ce2eSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8675d422ce2eSmrg fi 8676d422ce2eSmrg ;; 8677d422ce2eSmrg esac 8678d422ce2eSmrg else 8679d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8680d422ce2eSmrg fi 8681fc5a983dSmrg ;; 8682fc5a983dSmrg 8683d422ce2eSmrg netbsd*) 8684d422ce2eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8685d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8686d422ce2eSmrg wlarc= 8687d422ce2eSmrg else 8688d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8689d422ce2eSmrg _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' 8690d422ce2eSmrg fi 8691d422ce2eSmrg ;; 8692fc5a983dSmrg 8693d422ce2eSmrg solaris*) 8694d422ce2eSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8695d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8696d422ce2eSmrg cat <<_LT_EOF 1>&2 8697fc5a983dSmrg 8698d422ce2eSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8699d422ce2eSmrg*** create shared libraries on Solaris systems. Therefore, libtool 8700d422ce2eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8701d422ce2eSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 8702d422ce2eSmrg*** your PATH or compiler configuration so that the native linker is 8703d422ce2eSmrg*** used, and then restart. 8704fc5a983dSmrg 8705d422ce2eSmrg_LT_EOF 8706d422ce2eSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8707d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8708d422ce2eSmrg _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' 8709d422ce2eSmrg else 8710d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8711d422ce2eSmrg fi 8712d422ce2eSmrg ;; 8713fc5a983dSmrg 8714d422ce2eSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8715d422ce2eSmrg case `$LD -v 2>&1` in 8716d422ce2eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8717d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8718d422ce2eSmrg cat <<_LT_EOF 1>&2 8719fc5a983dSmrg 8720d422ce2eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8721d422ce2eSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8722d422ce2eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8723d422ce2eSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8724d422ce2eSmrg*** your PATH or compiler configuration so that the native linker is 8725d422ce2eSmrg*** used, and then restart. 8726fc5a983dSmrg 8727d422ce2eSmrg_LT_EOF 8728d422ce2eSmrg ;; 8729d422ce2eSmrg *) 8730d422ce2eSmrg # For security reasons, it is highly recommended that you always 8731d422ce2eSmrg # use absolute paths for naming shared libraries, and exclude the 8732d422ce2eSmrg # DT_RUNPATH tag from executables and libraries. But doing so 8733d422ce2eSmrg # requires that you compile everything twice, which is a pain. 8734d422ce2eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8735d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8736d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8737d422ce2eSmrg _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' 8738d422ce2eSmrg else 8739d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8740d422ce2eSmrg fi 8741d422ce2eSmrg ;; 8742d422ce2eSmrg esac 8743d422ce2eSmrg ;; 8744fc5a983dSmrg 8745d422ce2eSmrg sunos4*) 8746d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8747d422ce2eSmrg wlarc= 8748d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8749d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8750d422ce2eSmrg ;; 8751fc5a983dSmrg 8752f3561b8bSmrg *) 8753d422ce2eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8754d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8755d422ce2eSmrg _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' 8756d422ce2eSmrg else 8757d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8758d422ce2eSmrg fi 8759fc5a983dSmrg ;; 8760d422ce2eSmrg esac 8761fc5a983dSmrg 8762d422ce2eSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8763d422ce2eSmrg runpath_var= 8764d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8765d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8766d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8767d422ce2eSmrg fi 8768d422ce2eSmrg else 8769d422ce2eSmrg # PORTME fill in a description of your system's linker (not GNU ld) 8770d422ce2eSmrg case $host_os in 8771d422ce2eSmrg aix3*) 8772d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8773d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8774d422ce2eSmrg _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' 8775d422ce2eSmrg # Note: this linker hardcodes the directories in LIBPATH if there 8776d422ce2eSmrg # are no directories specified by -L. 8777d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8778d422ce2eSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8779d422ce2eSmrg # Neither direct hardcoding nor static linking is supported with a 8780d422ce2eSmrg # broken collect2. 8781d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8782d422ce2eSmrg fi 8783d422ce2eSmrg ;; 8784fc5a983dSmrg 8785d422ce2eSmrg aix[[4-9]]*) 8786d422ce2eSmrg if test ia64 = "$host_cpu"; then 8787d422ce2eSmrg # On IA64, the linker does run time linking by default, so we don't 8788d422ce2eSmrg # have to do anything special. 8789d422ce2eSmrg aix_use_runtimelinking=no 8790d422ce2eSmrg exp_sym_flag='-Bexport' 8791d422ce2eSmrg no_entry_flag= 8792d422ce2eSmrg else 8793d422ce2eSmrg # If we're using GNU nm, then we don't want the "-C" option. 8794d422ce2eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8795d422ce2eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8796d422ce2eSmrg # weak defined symbols like other global defined symbols, whereas 8797d422ce2eSmrg # GNU nm marks them as "W". 8798d422ce2eSmrg # While the 'weak' keyword is ignored in the Export File, we need 8799d422ce2eSmrg # it in the Import File for the 'aix-soname' feature, so we have 8800d422ce2eSmrg # to replace the "-B" option with "-P" for AIX nm. 8801d422ce2eSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8802d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8803d422ce2eSmrg else 8804d422ce2eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8805d422ce2eSmrg fi 8806d422ce2eSmrg aix_use_runtimelinking=no 8807fc5a983dSmrg 8808d422ce2eSmrg # Test if we are trying to use run time linking or normal 8809d422ce2eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8810d422ce2eSmrg # have runtime linking enabled, and use it for executables. 8811d422ce2eSmrg # For shared libraries, we enable/disable runtime linking 8812d422ce2eSmrg # depending on the kind of the shared library created - 8813d422ce2eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 8814d422ce2eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8815d422ce2eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 8816d422ce2eSmrg # lib.a static archive 8817d422ce2eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8818d422ce2eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 8819d422ce2eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8820d422ce2eSmrg # lib.a(lib.so.V) shared, rtl:no 8821d422ce2eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8822d422ce2eSmrg # lib.a static archive 8823d422ce2eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8824d422ce2eSmrg for ld_flag in $LDFLAGS; do 8825d422ce2eSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8826d422ce2eSmrg aix_use_runtimelinking=yes 8827d422ce2eSmrg break 8828d422ce2eSmrg fi 8829d422ce2eSmrg done 8830d422ce2eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8831d422ce2eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8832d422ce2eSmrg # so we don't have lib.a shared libs to link our executables. 8833d422ce2eSmrg # We have to force runtime linking in this case. 8834d422ce2eSmrg aix_use_runtimelinking=yes 8835d422ce2eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8836d422ce2eSmrg fi 8837d422ce2eSmrg ;; 8838d422ce2eSmrg esac 8839fc5a983dSmrg 8840d422ce2eSmrg exp_sym_flag='-bexport' 8841d422ce2eSmrg no_entry_flag='-bnoentry' 8842d422ce2eSmrg fi 8843fc5a983dSmrg 8844d422ce2eSmrg # When large executables or shared objects are built, AIX ld can 8845d422ce2eSmrg # have problems creating the table of contents. If linking a library 8846d422ce2eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 8847d422ce2eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8848d422ce2eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8849fc5a983dSmrg 8850d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='' 8851d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8852d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8853d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8854d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8855d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8856d422ce2eSmrg case $with_aix_soname,$aix_use_runtimelinking in 8857d422ce2eSmrg aix,*) ;; # traditional, no import file 8858d422ce2eSmrg svr4,* | *,yes) # use import file 8859d422ce2eSmrg # The Import File defines what to hardcode. 8860d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8861d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8862d422ce2eSmrg ;; 8863d422ce2eSmrg esac 8864fc5a983dSmrg 8865d422ce2eSmrg if test yes = "$GCC"; then 8866d422ce2eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8867d422ce2eSmrg # We only want to do this on AIX 4.2 and lower, the check 8868d422ce2eSmrg # below for broken collect2 doesn't work under 4.3+ 8869d422ce2eSmrg collect2name=`$CC -print-prog-name=collect2` 8870d422ce2eSmrg if test -f "$collect2name" && 8871d422ce2eSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8872d422ce2eSmrg then 8873d422ce2eSmrg # We have reworked collect2 8874d422ce2eSmrg : 8875d422ce2eSmrg else 8876d422ce2eSmrg # We have old collect2 8877d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8878d422ce2eSmrg # It fails to find uninstalled libraries when the uninstalled 8879d422ce2eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 8880d422ce2eSmrg # to unsupported forces relinking 8881d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8882d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8883d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8884d422ce2eSmrg fi 8885d422ce2eSmrg ;; 8886d422ce2eSmrg esac 8887d422ce2eSmrg shared_flag='-shared' 8888d422ce2eSmrg if test yes = "$aix_use_runtimelinking"; then 8889d422ce2eSmrg shared_flag="$shared_flag "'$wl-G' 8890d422ce2eSmrg fi 8891d422ce2eSmrg # Need to ensure runtime linking is disabled for the traditional 8892d422ce2eSmrg # shared library, or the linker may eventually find shared libraries 8893d422ce2eSmrg # /with/ Import File - we do not want to mix them. 8894d422ce2eSmrg shared_flag_aix='-shared' 8895d422ce2eSmrg shared_flag_svr4='-shared $wl-G' 8896d422ce2eSmrg else 8897d422ce2eSmrg # not using gcc 8898d422ce2eSmrg if test ia64 = "$host_cpu"; then 8899d422ce2eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8900d422ce2eSmrg # chokes on -Wl,-G. The following line is correct: 8901d422ce2eSmrg shared_flag='-G' 8902d422ce2eSmrg else 8903d422ce2eSmrg if test yes = "$aix_use_runtimelinking"; then 8904d422ce2eSmrg shared_flag='$wl-G' 8905d422ce2eSmrg else 8906d422ce2eSmrg shared_flag='$wl-bM:SRE' 8907d422ce2eSmrg fi 8908d422ce2eSmrg shared_flag_aix='$wl-bM:SRE' 8909d422ce2eSmrg shared_flag_svr4='$wl-G' 8910d422ce2eSmrg fi 8911d422ce2eSmrg fi 8912fc5a983dSmrg 8913d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8914d422ce2eSmrg # It seems that -bexpall does not export symbols beginning with 8915d422ce2eSmrg # underscore (_), so it is better to generate a list of symbols to export. 8916d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8917d422ce2eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8918d422ce2eSmrg # Warning - without using the other runtime loading flags (-brtl), 8919d422ce2eSmrg # -berok will link without error, but may produce a broken library. 8920d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8921d422ce2eSmrg # Determine the default libpath from the value encoded in an 8922d422ce2eSmrg # empty executable. 8923d422ce2eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8924d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8925d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 8926d422ce2eSmrg else 8927d422ce2eSmrg if test ia64 = "$host_cpu"; then 8928d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8929d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8930d422ce2eSmrg _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" 8931d422ce2eSmrg else 8932d422ce2eSmrg # Determine the default libpath from the value encoded in an 8933d422ce2eSmrg # empty executable. 8934d422ce2eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8935d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8936d422ce2eSmrg # Warning - without using the other run time loading flags, 8937d422ce2eSmrg # -berok will link without error, but may produce a broken library. 8938d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8939d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8940d422ce2eSmrg if test yes = "$with_gnu_ld"; then 8941d422ce2eSmrg # We only use this code for GNU lds that support --whole-archive. 8942d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8943d422ce2eSmrg else 8944d422ce2eSmrg # Exported symbols can be pulled into shared objects from archives 8945d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8946d422ce2eSmrg fi 8947d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8948d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8949d422ce2eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8950d422ce2eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8951d422ce2eSmrg if test svr4 != "$with_aix_soname"; then 8952d422ce2eSmrg # This is similar to how AIX traditionally builds its shared libraries. 8953d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 8954d422ce2eSmrg fi 8955d422ce2eSmrg if test aix != "$with_aix_soname"; then 8956d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 8957d422ce2eSmrg else 8958d422ce2eSmrg # used by -dlpreopen to get the symbols 8959d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8960d422ce2eSmrg fi 8961d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8962fc5a983dSmrg fi 8963d422ce2eSmrg fi 8964fc5a983dSmrg ;; 8965fc5a983dSmrg 8966d422ce2eSmrg amigaos*) 8967d422ce2eSmrg case $host_cpu in 8968d422ce2eSmrg powerpc) 8969d422ce2eSmrg # see comment about AmigaOS4 .so support 8970d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8971d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8972d422ce2eSmrg ;; 8973d422ce2eSmrg m68k) 8974d422ce2eSmrg _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)' 8975d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8976d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8977d422ce2eSmrg ;; 8978d422ce2eSmrg esac 89796257f37dSmrg ;; 89806257f37dSmrg 8981d422ce2eSmrg bsdi[[45]]*) 8982d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8983d422ce2eSmrg ;; 89846257f37dSmrg 8985d422ce2eSmrg cygwin* | mingw* | pw32* | cegcc*) 8986d422ce2eSmrg # When not using gcc, we currently assume that we are using 8987d422ce2eSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8988d422ce2eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8989d422ce2eSmrg # no search path for DLLs. 8990d422ce2eSmrg case $cc_basename in 8991d422ce2eSmrg cl* | icl*) 8992d422ce2eSmrg # Native MSVC or ICC 8993d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8994d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8995d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8996d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8997d422ce2eSmrg # Tell ltmain to make .lib files, not .a files. 8998d422ce2eSmrg libext=lib 8999d422ce2eSmrg # Tell ltmain to make .dll files, not .so files. 9000d422ce2eSmrg shrext_cmds=.dll 9001d422ce2eSmrg # FIXME: Setting linknames here is a bad hack. 9002d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9003d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9004d422ce2eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 9005d422ce2eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9006d422ce2eSmrg else 9007d422ce2eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9008d422ce2eSmrg fi~ 9009d422ce2eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9010d422ce2eSmrg linknames=' 9011d422ce2eSmrg # The linker will not automatically build a static lib if we build a DLL. 9012d422ce2eSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9013d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9014d422ce2eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9015d422ce2eSmrg _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' 9016d422ce2eSmrg # Don't use ranlib 9017d422ce2eSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9018d422ce2eSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9019d422ce2eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9020d422ce2eSmrg case $lt_outputfile in 9021d422ce2eSmrg *.exe|*.EXE) ;; 9022d422ce2eSmrg *) 9023d422ce2eSmrg lt_outputfile=$lt_outputfile.exe 9024d422ce2eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 9025d422ce2eSmrg ;; 9026d422ce2eSmrg esac~ 9027d422ce2eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9028d422ce2eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9029d422ce2eSmrg $RM "$lt_outputfile.manifest"; 9030d422ce2eSmrg fi' 9031d422ce2eSmrg ;; 9032d422ce2eSmrg *) 9033d422ce2eSmrg # Assume MSVC and ICC wrapper 9034d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9035d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9036d422ce2eSmrg # Tell ltmain to make .lib files, not .a files. 9037d422ce2eSmrg libext=lib 9038d422ce2eSmrg # Tell ltmain to make .dll files, not .so files. 9039d422ce2eSmrg shrext_cmds=.dll 9040d422ce2eSmrg # FIXME: Setting linknames here is a bad hack. 9041d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9042d422ce2eSmrg # The linker will automatically build a .lib file if we build a DLL. 9043d422ce2eSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9044d422ce2eSmrg # FIXME: Should let the user specify the lib program. 9045d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9046d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9047d422ce2eSmrg ;; 9048d422ce2eSmrg esac 9049bd304fc0Smrg ;; 9050fc5a983dSmrg 9051d422ce2eSmrg darwin* | rhapsody*) 9052d422ce2eSmrg _LT_DARWIN_LINKER_FEATURES($1) 9053d422ce2eSmrg ;; 9054fc5a983dSmrg 9055d422ce2eSmrg dgux*) 9056d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9057d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9058d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9059d422ce2eSmrg ;; 9060fc5a983dSmrg 9061d422ce2eSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9062d422ce2eSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 9063d422ce2eSmrg # does not break anything, and helps significantly (at the cost of a little 9064d422ce2eSmrg # extra space). 9065d422ce2eSmrg freebsd2.2*) 9066d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9067d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9068d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9069d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9070d422ce2eSmrg ;; 9071fc5a983dSmrg 9072d422ce2eSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9073d422ce2eSmrg freebsd2.*) 9074d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9075d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9076d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9077d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9078d422ce2eSmrg ;; 9079fc5a983dSmrg 9080d422ce2eSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9081d422ce2eSmrg freebsd* | dragonfly* | midnightbsd*) 9082d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9083d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9084d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9085d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9086d422ce2eSmrg ;; 9087f3561b8bSmrg 9088d422ce2eSmrg hpux9*) 9089d422ce2eSmrg if test yes = "$GCC"; then 9090d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9091d422ce2eSmrg else 9092d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9093d422ce2eSmrg fi 9094d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9095d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9096d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9097f3561b8bSmrg 9098d422ce2eSmrg # hardcode_minus_L: Not really in the search PATH, 9099d422ce2eSmrg # but as the default location of the library. 9100d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9101d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9102d422ce2eSmrg ;; 9103f3561b8bSmrg 9104d422ce2eSmrg hpux10*) 9105d422ce2eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9106d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9107d422ce2eSmrg else 9108d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9109d422ce2eSmrg fi 9110d422ce2eSmrg if test no = "$with_gnu_ld"; then 9111d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9112d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9113d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9114d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9115d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9116d422ce2eSmrg # hardcode_minus_L: Not really in the search PATH, 9117d422ce2eSmrg # but as the default location of the library. 9118d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9119d422ce2eSmrg fi 9120d422ce2eSmrg ;; 9121f3561b8bSmrg 9122d422ce2eSmrg hpux11*) 9123d422ce2eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9124d422ce2eSmrg case $host_cpu in 9125d422ce2eSmrg hppa*64*) 9126d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9127d422ce2eSmrg ;; 9128d422ce2eSmrg ia64*) 9129d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9130d422ce2eSmrg ;; 9131d422ce2eSmrg *) 9132d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9133d422ce2eSmrg ;; 9134d422ce2eSmrg esac 9135d422ce2eSmrg else 9136d422ce2eSmrg case $host_cpu in 9137d422ce2eSmrg hppa*64*) 9138d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9139d422ce2eSmrg ;; 9140d422ce2eSmrg ia64*) 9141d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9142d422ce2eSmrg ;; 9143d422ce2eSmrg *) 9144d422ce2eSmrg m4_if($1, [], [ 9145d422ce2eSmrg # Older versions of the 11.00 compiler do not understand -b yet 9146d422ce2eSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9147d422ce2eSmrg _LT_LINKER_OPTION([if $CC understands -b], 9148d422ce2eSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9149d422ce2eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9150d422ce2eSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9151d422ce2eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9152d422ce2eSmrg ;; 9153d422ce2eSmrg esac 9154d422ce2eSmrg fi 9155d422ce2eSmrg if test no = "$with_gnu_ld"; then 9156d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9157d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9158f3561b8bSmrg 9159d422ce2eSmrg case $host_cpu in 9160d422ce2eSmrg hppa*64*|ia64*) 9161d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9162d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9163d422ce2eSmrg ;; 9164d422ce2eSmrg *) 9165d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9166d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9167d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9168f3561b8bSmrg 9169d422ce2eSmrg # hardcode_minus_L: Not really in the search PATH, 9170d422ce2eSmrg # but as the default location of the library. 9171d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9172d422ce2eSmrg ;; 9173d422ce2eSmrg esac 9174d422ce2eSmrg fi 9175d422ce2eSmrg ;; 9176f3561b8bSmrg 9177d422ce2eSmrg irix5* | irix6* | nonstopux*) 9178d422ce2eSmrg if test yes = "$GCC"; then 9179d422ce2eSmrg _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' 9180d422ce2eSmrg # Try to use the -exported_symbol ld option, if it does not 9181d422ce2eSmrg # work, assume that -exports_file does not work either and 9182d422ce2eSmrg # implicitly export all symbols. 9183d422ce2eSmrg # This should be the same for all languages, so no per-tag cache variable. 9184d422ce2eSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9185d422ce2eSmrg [lt_cv_irix_exported_symbol], 9186d422ce2eSmrg [save_LDFLAGS=$LDFLAGS 9187d422ce2eSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9188d422ce2eSmrg AC_LINK_IFELSE( 9189d422ce2eSmrg [AC_LANG_SOURCE( 9190d422ce2eSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9191d422ce2eSmrg [C++], [[int foo (void) { return 0; }]], 9192d422ce2eSmrg [Fortran 77], [[ 9193d422ce2eSmrg subroutine foo 9194d422ce2eSmrg end]], 9195d422ce2eSmrg [Fortran], [[ 9196d422ce2eSmrg subroutine foo 9197d422ce2eSmrg end]])])], 9198d422ce2eSmrg [lt_cv_irix_exported_symbol=yes], 9199d422ce2eSmrg [lt_cv_irix_exported_symbol=no]) 9200d422ce2eSmrg LDFLAGS=$save_LDFLAGS]) 9201d422ce2eSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 9202d422ce2eSmrg _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' 9203d422ce2eSmrg fi 9204d422ce2eSmrg else 9205d422ce2eSmrg _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' 9206d422ce2eSmrg _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' 9207d422ce2eSmrg fi 9208d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9209d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9210d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9211d422ce2eSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 9212d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9213d422ce2eSmrg ;; 9214f3561b8bSmrg 9215d422ce2eSmrg linux*) 9216d422ce2eSmrg case $cc_basename in 9217d422ce2eSmrg tcc*) 9218d422ce2eSmrg # Fabrice Bellard et al's Tiny C Compiler 9219d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9220d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9221d422ce2eSmrg ;; 9222d422ce2eSmrg esac 9223d422ce2eSmrg ;; 9224f3561b8bSmrg 9225d422ce2eSmrg netbsd*) 9226d422ce2eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9227d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9228d422ce2eSmrg else 9229d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9230d422ce2eSmrg fi 9231d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9232d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9233d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9234d422ce2eSmrg ;; 9235f3561b8bSmrg 9236d422ce2eSmrg newsos6) 9237d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9238d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9239d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9240d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9241d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9242d422ce2eSmrg ;; 9243f3561b8bSmrg 9244d422ce2eSmrg *nto* | *qnx*) 9245d422ce2eSmrg ;; 9246f3561b8bSmrg 9247d422ce2eSmrg openbsd* | bitrig*) 9248d422ce2eSmrg if test -f /usr/libexec/ld.so; then 9249d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9250d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9251d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9252d422ce2eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9253d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9254d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9255d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9256d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9257d422ce2eSmrg else 9258d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9259d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9260d422ce2eSmrg fi 9261d422ce2eSmrg else 9262d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9263d422ce2eSmrg fi 9264d422ce2eSmrg ;; 9265f3561b8bSmrg 9266d422ce2eSmrg os2*) 9267d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9268d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9269d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9270d422ce2eSmrg shrext_cmds=.dll 9271d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9272d422ce2eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9273d422ce2eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9274d422ce2eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9275d422ce2eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9276d422ce2eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9277d422ce2eSmrg emximp -o $lib $output_objdir/$libname.def' 9278d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9279d422ce2eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9280d422ce2eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9281d422ce2eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9282d422ce2eSmrg prefix_cmds="$SED"~ 9283d422ce2eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9284d422ce2eSmrg prefix_cmds="$prefix_cmds -e 1d"; 9285d422ce2eSmrg fi~ 9286d422ce2eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9287d422ce2eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9288d422ce2eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9289d422ce2eSmrg emximp -o $lib $output_objdir/$libname.def' 9290d422ce2eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9291d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9292d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9293d422ce2eSmrg ;; 9294f3561b8bSmrg 9295d422ce2eSmrg osf3*) 9296d422ce2eSmrg if test yes = "$GCC"; then 9297d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9298d422ce2eSmrg _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' 9299d422ce2eSmrg else 9300d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9301d422ce2eSmrg _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' 9302d422ce2eSmrg fi 9303d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9304d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9305d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9306d422ce2eSmrg ;; 9307f3561b8bSmrg 9308d422ce2eSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9309d422ce2eSmrg if test yes = "$GCC"; then 9310d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9311d422ce2eSmrg _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' 9312d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9313d422ce2eSmrg else 9314d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9315d422ce2eSmrg _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' 9316d422ce2eSmrg _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~ 9317d422ce2eSmrg $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' 9318fc5a983dSmrg 9319d422ce2eSmrg # Both c and cxx compiler support -rpath directly 9320d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9321d422ce2eSmrg fi 9322d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9323d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9324d422ce2eSmrg ;; 9325fc5a983dSmrg 9326d422ce2eSmrg solaris*) 9327d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9328d422ce2eSmrg if test yes = "$GCC"; then 9329d422ce2eSmrg wlarc='$wl' 9330d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9331d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9332d422ce2eSmrg $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' 9333d422ce2eSmrg else 9334d422ce2eSmrg case `$CC -V 2>&1` in 9335d422ce2eSmrg *"Compilers 5.0"*) 9336d422ce2eSmrg wlarc='' 9337d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9338d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9339d422ce2eSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9340d422ce2eSmrg ;; 9341d422ce2eSmrg *) 9342d422ce2eSmrg wlarc='$wl' 9343d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9344d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9345d422ce2eSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9346d422ce2eSmrg ;; 9347d422ce2eSmrg esac 9348d422ce2eSmrg fi 9349d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9350d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9351d422ce2eSmrg case $host_os in 9352d422ce2eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9353d422ce2eSmrg *) 9354d422ce2eSmrg # The compiler driver will combine and reorder linker options, 9355d422ce2eSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9356d422ce2eSmrg # but is careful enough not to reorder. 9357d422ce2eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9358d422ce2eSmrg if test yes = "$GCC"; then 9359d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9360d422ce2eSmrg else 9361d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9362d422ce2eSmrg fi 9363d422ce2eSmrg ;; 9364d422ce2eSmrg esac 9365d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9366d422ce2eSmrg ;; 9367fc5a983dSmrg 9368d422ce2eSmrg sunos4*) 9369d422ce2eSmrg if test sequent = "$host_vendor"; then 9370d422ce2eSmrg # Use $CC to link under sequent, because it throws in some extra .o 9371d422ce2eSmrg # files that make .init and .fini sections work. 9372d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9373d422ce2eSmrg else 9374d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9375d422ce2eSmrg fi 9376d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9377d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9378d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9379d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9380d422ce2eSmrg ;; 9381fc5a983dSmrg 9382d422ce2eSmrg sysv4) 9383d422ce2eSmrg case $host_vendor in 9384d422ce2eSmrg sni) 9385d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9386d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9387d422ce2eSmrg ;; 9388d422ce2eSmrg siemens) 9389d422ce2eSmrg ## LD is ld it makes a PLAMLIB 9390d422ce2eSmrg ## CC just makes a GrossModule. 9391d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9392d422ce2eSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9393d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9394d422ce2eSmrg ;; 9395d422ce2eSmrg motorola) 9396d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9397d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9398d422ce2eSmrg ;; 9399d422ce2eSmrg esac 9400d422ce2eSmrg runpath_var='LD_RUN_PATH' 9401d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9402d422ce2eSmrg ;; 9403fc5a983dSmrg 9404d422ce2eSmrg sysv4.3*) 9405d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9406d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9407d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9408d422ce2eSmrg ;; 9409fc5a983dSmrg 9410d422ce2eSmrg sysv4*MP*) 9411d422ce2eSmrg if test -d /usr/nec; then 9412d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9413d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9414d422ce2eSmrg runpath_var=LD_RUN_PATH 9415d422ce2eSmrg hardcode_runpath_var=yes 9416d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9417d422ce2eSmrg fi 9418d422ce2eSmrg ;; 9419fc5a983dSmrg 9420d422ce2eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9421d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9422d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9423d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9424d422ce2eSmrg runpath_var='LD_RUN_PATH' 9425f3561b8bSmrg 9426d422ce2eSmrg if test yes = "$GCC"; then 9427d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9428d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9429d422ce2eSmrg else 9430d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9431d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9432d422ce2eSmrg fi 9433d422ce2eSmrg ;; 9434fc5a983dSmrg 9435d422ce2eSmrg sysv5* | sco3.2v5* | sco5v6*) 9436d422ce2eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 9437d422ce2eSmrg # link with -lc, and that would cause any symbols used from libc to 9438d422ce2eSmrg # always be unresolved, which means just about no library would 9439d422ce2eSmrg # ever link correctly. If we're not using GNU ld we use -z text 9440d422ce2eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 9441d422ce2eSmrg # as -z defs. 9442d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9443d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9444d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9445d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9446d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9447d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9448d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9449d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9450d422ce2eSmrg runpath_var='LD_RUN_PATH' 9451fc5a983dSmrg 9452d422ce2eSmrg if test yes = "$GCC"; then 9453d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9454d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9455d422ce2eSmrg else 9456d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9457d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9458d422ce2eSmrg fi 9459d422ce2eSmrg ;; 9460fc5a983dSmrg 9461d422ce2eSmrg uts4*) 9462d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9463d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9464d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9465d422ce2eSmrg ;; 9466fc5a983dSmrg 9467d422ce2eSmrg *) 9468d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9469d422ce2eSmrg ;; 9470d422ce2eSmrg esac 9471fc5a983dSmrg 9472d422ce2eSmrg if test sni = "$host_vendor"; then 9473d422ce2eSmrg case $host in 9474d422ce2eSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9475d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9476d422ce2eSmrg ;; 9477d422ce2eSmrg esac 9478d422ce2eSmrg fi 9479d422ce2eSmrg fi 9480fc5a983dSmrg]) 9481d422ce2eSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9482d422ce2eSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9483fc5a983dSmrg 9484d422ce2eSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9485f3561b8bSmrg 9486d422ce2eSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9487d422ce2eSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9488d422ce2eSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 9489d422ce2eSmrg [The commands to extract the exported symbol list from a shared archive]) 9490f3561b8bSmrg 9491f3561b8bSmrg# 9492d422ce2eSmrg# Do we need to explicitly link libc? 9493f3561b8bSmrg# 9494d422ce2eSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9495d422ce2eSmrgx|xyes) 9496d422ce2eSmrg # Assume -lc should be added 9497d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9498f3561b8bSmrg 9499d422ce2eSmrg if test yes,yes = "$GCC,$enable_shared"; then 9500d422ce2eSmrg case $_LT_TAGVAR(archive_cmds, $1) in 9501d422ce2eSmrg *'~'*) 9502d422ce2eSmrg # FIXME: we may have to deal with multi-command sequences. 9503d422ce2eSmrg ;; 9504d422ce2eSmrg '$CC '*) 9505d422ce2eSmrg # Test whether the compiler implicitly links with -lc since on some 9506d422ce2eSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9507d422ce2eSmrg # to ld, don't add -lc before -lgcc. 9508d422ce2eSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9509d422ce2eSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9510d422ce2eSmrg [$RM conftest* 9511d422ce2eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9512f3561b8bSmrg 9513d422ce2eSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9514d422ce2eSmrg soname=conftest 9515d422ce2eSmrg lib=conftest 9516d422ce2eSmrg libobjs=conftest.$ac_objext 9517d422ce2eSmrg deplibs= 9518d422ce2eSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9519d422ce2eSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9520d422ce2eSmrg compiler_flags=-v 9521d422ce2eSmrg linker_flags=-v 9522d422ce2eSmrg verstring= 9523d422ce2eSmrg output_objdir=. 9524d422ce2eSmrg libname=conftest 9525d422ce2eSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9526d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 9527d422ce2eSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9528d422ce2eSmrg then 9529d422ce2eSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9530d422ce2eSmrg else 9531d422ce2eSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9532d422ce2eSmrg fi 9533d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9534d422ce2eSmrg else 9535d422ce2eSmrg cat conftest.err 1>&5 9536d422ce2eSmrg fi 9537d422ce2eSmrg $RM conftest* 9538d422ce2eSmrg ]) 9539d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9540d422ce2eSmrg ;; 9541d422ce2eSmrg esac 9542d422ce2eSmrg fi 9543d422ce2eSmrg ;; 9544d422ce2eSmrgesac 9545d422ce2eSmrg 9546d422ce2eSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9547d422ce2eSmrg [Whether or not to add -lc for building shared libraries]) 9548d422ce2eSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9549d422ce2eSmrg [enable_shared_with_static_runtimes], [0], 9550d422ce2eSmrg [Whether or not to disallow shared libs when runtime libs are static]) 9551d422ce2eSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9552d422ce2eSmrg [Compiler flag to allow reflexive dlopens]) 9553d422ce2eSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9554d422ce2eSmrg [Compiler flag to generate shared objects directly from archives]) 9555d422ce2eSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 9556d422ce2eSmrg [Whether the compiler copes with passing no objects directly]) 9557d422ce2eSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9558d422ce2eSmrg [Create an old-style archive from a shared archive]) 9559d422ce2eSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9560d422ce2eSmrg [Create a temporary old-style archive to link instead of a shared archive]) 9561d422ce2eSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9562d422ce2eSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9563d422ce2eSmrg_LT_TAGDECL([], [module_cmds], [2], 9564d422ce2eSmrg [Commands used to build a loadable module if different from building 9565d422ce2eSmrg a shared archive.]) 9566d422ce2eSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9567d422ce2eSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 9568d422ce2eSmrg [Whether we are building with GNU ld or not]) 9569d422ce2eSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9570d422ce2eSmrg [Flag that allows shared libraries with undefined symbols to be built]) 9571d422ce2eSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 9572d422ce2eSmrg [Flag that enforces no undefined symbols]) 9573d422ce2eSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9574d422ce2eSmrg [Flag to hardcode $libdir into a binary during linking. 9575d422ce2eSmrg This must work even if $libdir does not exist]) 9576d422ce2eSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9577d422ce2eSmrg [Whether we need a single "-rpath" flag with a separated argument]) 9578d422ce2eSmrg_LT_TAGDECL([], [hardcode_direct], [0], 9579d422ce2eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9580d422ce2eSmrg DIR into the resulting binary]) 9581d422ce2eSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9582d422ce2eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9583d422ce2eSmrg DIR into the resulting binary and the resulting library dependency is 9584d422ce2eSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9585d422ce2eSmrg library is relocated]) 9586d422ce2eSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9587d422ce2eSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9588d422ce2eSmrg into the resulting binary]) 9589d422ce2eSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9590d422ce2eSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9591d422ce2eSmrg into the resulting binary]) 9592d422ce2eSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 9593d422ce2eSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 9594d422ce2eSmrg into the library and all subsequent libraries and executables linked 9595d422ce2eSmrg against it]) 9596d422ce2eSmrg_LT_TAGDECL([], [inherit_rpath], [0], 9597d422ce2eSmrg [Set to yes if linker adds runtime paths of dependent libraries 9598d422ce2eSmrg to runtime path list]) 9599d422ce2eSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 9600d422ce2eSmrg [Whether libtool must link a program against all its dependency libraries]) 9601d422ce2eSmrg_LT_TAGDECL([], [always_export_symbols], [0], 9602d422ce2eSmrg [Set to "yes" if exported symbols are required]) 9603d422ce2eSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9604d422ce2eSmrg [The commands to list exported symbols]) 9605d422ce2eSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 9606d422ce2eSmrg [Symbols that should not be listed in the preloaded symbols]) 9607d422ce2eSmrg_LT_TAGDECL([], [include_expsyms], [1], 9608d422ce2eSmrg [Symbols that must always be exported]) 9609d422ce2eSmrg_LT_TAGDECL([], [prelink_cmds], [2], 9610d422ce2eSmrg [Commands necessary for linking programs (against libraries) with templates]) 9611d422ce2eSmrg_LT_TAGDECL([], [postlink_cmds], [2], 9612d422ce2eSmrg [Commands necessary for finishing linking programs]) 9613d422ce2eSmrg_LT_TAGDECL([], [file_list_spec], [1], 9614d422ce2eSmrg [Specify filename containing input files]) 9615d422ce2eSmrgdnl FIXME: Not yet implemented 9616d422ce2eSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9617d422ce2eSmrgdnl [Compiler flag to generate thread safe objects]) 9618d422ce2eSmrg])# _LT_LINKER_SHLIBS 9619d422ce2eSmrg 9620d422ce2eSmrg 9621d422ce2eSmrg# _LT_LANG_C_CONFIG([TAG]) 9622d422ce2eSmrg# ------------------------ 9623d422ce2eSmrg# Ensure that the configuration variables for a C compiler are suitably 9624d422ce2eSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9625d422ce2eSmrg# the compiler configuration to 'libtool'. 9626d422ce2eSmrgm4_defun([_LT_LANG_C_CONFIG], 9627d422ce2eSmrg[m4_require([_LT_DECL_EGREP])dnl 9628d422ce2eSmrglt_save_CC=$CC 9629d422ce2eSmrgAC_LANG_PUSH(C) 9630f3561b8bSmrg 9631d422ce2eSmrg# Source file extension for C test sources. 9632d422ce2eSmrgac_ext=c 9633fc5a983dSmrg 9634d422ce2eSmrg# Object file extension for compiled C test sources. 9635d422ce2eSmrgobjext=o 9636d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 9637bd304fc0Smrg 9638d422ce2eSmrg# Code to be used in simple compile tests 9639d422ce2eSmrglt_simple_compile_test_code="int some_variable = 0;" 9640fc5a983dSmrg 9641d422ce2eSmrg# Code to be used in simple link tests 9642d422ce2eSmrglt_simple_link_test_code='int main(){return(0);}' 9643fc5a983dSmrg 9644d422ce2eSmrg_LT_TAG_COMPILER 9645d422ce2eSmrg# Save the default compiler, since it gets overwritten when the other 9646d422ce2eSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9647d422ce2eSmrgcompiler_DEFAULT=$CC 9648fc5a983dSmrg 9649d422ce2eSmrg# save warnings/boilerplate of simple test code 9650d422ce2eSmrg_LT_COMPILER_BOILERPLATE 9651d422ce2eSmrg_LT_LINKER_BOILERPLATE 9652d422ce2eSmrg 9653d422ce2eSmrgif test -n "$compiler"; then 9654d422ce2eSmrg _LT_COMPILER_NO_RTTI($1) 9655d422ce2eSmrg _LT_COMPILER_PIC($1) 9656d422ce2eSmrg _LT_COMPILER_C_O($1) 9657d422ce2eSmrg _LT_COMPILER_FILE_LOCKS($1) 9658d422ce2eSmrg _LT_LINKER_SHLIBS($1) 9659d422ce2eSmrg _LT_SYS_DYNAMIC_LINKER($1) 9660d422ce2eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9661d422ce2eSmrg LT_SYS_DLOPEN_SELF 9662d422ce2eSmrg _LT_CMD_STRIPLIB 9663d422ce2eSmrg 9664d422ce2eSmrg # Report what library types will actually be built 9665d422ce2eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9666d422ce2eSmrg AC_MSG_RESULT([$can_build_shared]) 9667d422ce2eSmrg 9668d422ce2eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9669d422ce2eSmrg test no = "$can_build_shared" && enable_shared=no 9670d422ce2eSmrg 9671d422ce2eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9672d422ce2eSmrg # are all built from PIC. 9673d422ce2eSmrg case $host_os in 9674d422ce2eSmrg aix3*) 9675d422ce2eSmrg test yes = "$enable_shared" && enable_static=no 9676d422ce2eSmrg if test -n "$RANLIB"; then 9677d422ce2eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9678d422ce2eSmrg postinstall_cmds='$RANLIB $lib' 9679d422ce2eSmrg fi 9680d422ce2eSmrg ;; 9681d422ce2eSmrg 9682d422ce2eSmrg aix[[4-9]]*) 9683d422ce2eSmrg if test ia64 != "$host_cpu"; then 9684d422ce2eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9685d422ce2eSmrg yes,aix,yes) ;; # shared object as lib.so file only 9686d422ce2eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 9687d422ce2eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9688d422ce2eSmrg esac 9689d422ce2eSmrg fi 9690d422ce2eSmrg ;; 9691d422ce2eSmrg esac 9692d422ce2eSmrg AC_MSG_RESULT([$enable_shared]) 9693d422ce2eSmrg 9694d422ce2eSmrg AC_MSG_CHECKING([whether to build static libraries]) 9695d422ce2eSmrg # Make sure either enable_shared or enable_static is yes. 9696d422ce2eSmrg test yes = "$enable_shared" || enable_static=yes 9697d422ce2eSmrg AC_MSG_RESULT([$enable_static]) 9698d422ce2eSmrg 9699d422ce2eSmrg _LT_CONFIG($1) 9700d422ce2eSmrgfi 9701d422ce2eSmrgAC_LANG_POP 9702d422ce2eSmrgCC=$lt_save_CC 9703d422ce2eSmrg])# _LT_LANG_C_CONFIG 9704d422ce2eSmrg 9705d422ce2eSmrg 9706d422ce2eSmrg# _LT_LANG_CXX_CONFIG([TAG]) 9707d422ce2eSmrg# -------------------------- 9708d422ce2eSmrg# Ensure that the configuration variables for a C++ compiler are suitably 9709d422ce2eSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9710d422ce2eSmrg# the compiler configuration to 'libtool'. 9711d422ce2eSmrgm4_defun([_LT_LANG_CXX_CONFIG], 9712d422ce2eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9713d422ce2eSmrgm4_require([_LT_DECL_EGREP])dnl 9714d422ce2eSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9715d422ce2eSmrgif test -n "$CXX" && ( test no != "$CXX" && 9716d422ce2eSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9717d422ce2eSmrg (test g++ != "$CXX"))); then 9718d422ce2eSmrg AC_PROG_CXXCPP 9719fc5a983dSmrgelse 9720d422ce2eSmrg _lt_caught_CXX_error=yes 9721d422ce2eSmrgfi 9722fc5a983dSmrg 9723d422ce2eSmrgAC_LANG_PUSH(C++) 9724d422ce2eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9725d422ce2eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9726d422ce2eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9727d422ce2eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9728d422ce2eSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 9729d422ce2eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9730d422ce2eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9731d422ce2eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9732d422ce2eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9733d422ce2eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9734d422ce2eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9735d422ce2eSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9736d422ce2eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9737d422ce2eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9738d422ce2eSmrg_LT_TAGVAR(module_cmds, $1)= 9739d422ce2eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9740d422ce2eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9741d422ce2eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9742d422ce2eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9743d422ce2eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9744d422ce2eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9745d422ce2eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9746d422ce2eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9747fc5a983dSmrg 9748d422ce2eSmrg# Source file extension for C++ test sources. 9749d422ce2eSmrgac_ext=cpp 9750fc5a983dSmrg 9751d422ce2eSmrg# Object file extension for compiled C++ test sources. 9752d422ce2eSmrgobjext=o 9753d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 9754fc5a983dSmrg 9755d422ce2eSmrg# No sense in running all these tests if we already determined that 9756d422ce2eSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 9757d422ce2eSmrg# are currently assumed to apply to all compilers on this platform, 9758d422ce2eSmrg# and will be corrupted by setting them based on a non-working compiler. 9759d422ce2eSmrgif test yes != "$_lt_caught_CXX_error"; then 9760d422ce2eSmrg # Code to be used in simple compile tests 9761d422ce2eSmrg lt_simple_compile_test_code="int some_variable = 0;" 9762fc5a983dSmrg 9763d422ce2eSmrg # Code to be used in simple link tests 9764d422ce2eSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9765fc5a983dSmrg 9766d422ce2eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9767d422ce2eSmrg _LT_TAG_COMPILER 9768fc5a983dSmrg 9769d422ce2eSmrg # save warnings/boilerplate of simple test code 9770d422ce2eSmrg _LT_COMPILER_BOILERPLATE 9771d422ce2eSmrg _LT_LINKER_BOILERPLATE 9772fc5a983dSmrg 9773d422ce2eSmrg # Allow CC to be a program name with arguments. 9774d422ce2eSmrg lt_save_CC=$CC 9775d422ce2eSmrg lt_save_CFLAGS=$CFLAGS 9776d422ce2eSmrg lt_save_LD=$LD 9777d422ce2eSmrg lt_save_GCC=$GCC 9778d422ce2eSmrg GCC=$GXX 9779d422ce2eSmrg lt_save_with_gnu_ld=$with_gnu_ld 9780d422ce2eSmrg lt_save_path_LD=$lt_cv_path_LD 9781d422ce2eSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9782d422ce2eSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9783d422ce2eSmrg else 9784d422ce2eSmrg $as_unset lt_cv_prog_gnu_ld 9785d422ce2eSmrg fi 9786d422ce2eSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 9787d422ce2eSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 9788d422ce2eSmrg else 9789d422ce2eSmrg $as_unset lt_cv_path_LD 9790d422ce2eSmrg fi 9791d422ce2eSmrg test -z "${LDCXX+set}" || LD=$LDCXX 9792d422ce2eSmrg CC=${CXX-"c++"} 9793d422ce2eSmrg CFLAGS=$CXXFLAGS 9794d422ce2eSmrg compiler=$CC 9795d422ce2eSmrg _LT_TAGVAR(compiler, $1)=$CC 9796d422ce2eSmrg _LT_CC_BASENAME([$compiler]) 9797fc5a983dSmrg 9798d422ce2eSmrg if test -n "$compiler"; then 9799d422ce2eSmrg # We don't want -fno-exception when compiling C++ code, so set the 9800d422ce2eSmrg # no_builtin_flag separately 9801d422ce2eSmrg if test yes = "$GXX"; then 9802d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9803d422ce2eSmrg else 9804d422ce2eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9805d422ce2eSmrg fi 9806fc5a983dSmrg 9807d422ce2eSmrg if test yes = "$GXX"; then 9808d422ce2eSmrg # Set up default GNU C++ configuration 9809fc5a983dSmrg 9810d422ce2eSmrg LT_PATH_LD 9811fc5a983dSmrg 9812d422ce2eSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9813d422ce2eSmrg # archiving commands below assume that GNU ld is being used. 9814d422ce2eSmrg if test yes = "$with_gnu_ld"; then 9815d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9816d422ce2eSmrg _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' 9817fc5a983dSmrg 9818d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9819d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 98206257f37dSmrg 9821d422ce2eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 9822d422ce2eSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9823d422ce2eSmrg # investigate it a little bit more. (MM) 9824d422ce2eSmrg wlarc='$wl' 98256257f37dSmrg 9826d422ce2eSmrg # ancient GNU ld didn't support --whole-archive et. al. 9827d422ce2eSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9828d422ce2eSmrg $GREP 'no-whole-archive' > /dev/null; then 9829d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9830d422ce2eSmrg else 9831d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9832d422ce2eSmrg fi 9833d422ce2eSmrg else 9834d422ce2eSmrg with_gnu_ld=no 9835d422ce2eSmrg wlarc= 98366257f37dSmrg 9837d422ce2eSmrg # A generic and very simple default shared library creation 9838d422ce2eSmrg # command for GNU C++ for the case where it uses the native 9839d422ce2eSmrg # linker, instead of GNU ld. If possible, this setting should 9840d422ce2eSmrg # overridden to take advantage of the native linker features on 9841d422ce2eSmrg # the platform it is being used on. 9842d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9843d422ce2eSmrg fi 98446257f37dSmrg 9845d422ce2eSmrg # Commands to make compiler produce verbose output that lists 9846d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 9847d422ce2eSmrg # linking a shared library. 9848d422ce2eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 98496257f37dSmrg 9850d422ce2eSmrg else 9851d422ce2eSmrg GXX=no 9852d422ce2eSmrg with_gnu_ld=no 9853d422ce2eSmrg wlarc= 9854d422ce2eSmrg fi 98556257f37dSmrg 9856d422ce2eSmrg # PORTME: fill in a description of your system's C++ link characteristics 9857d422ce2eSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9858d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9859d422ce2eSmrg case $host_os in 9860d422ce2eSmrg aix3*) 9861d422ce2eSmrg # FIXME: insert proper C++ library support 9862d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9863d422ce2eSmrg ;; 9864d422ce2eSmrg aix[[4-9]]*) 9865d422ce2eSmrg if test ia64 = "$host_cpu"; then 9866d422ce2eSmrg # On IA64, the linker does run time linking by default, so we don't 9867d422ce2eSmrg # have to do anything special. 9868d422ce2eSmrg aix_use_runtimelinking=no 9869d422ce2eSmrg exp_sym_flag='-Bexport' 9870d422ce2eSmrg no_entry_flag= 9871d422ce2eSmrg else 9872d422ce2eSmrg aix_use_runtimelinking=no 98736257f37dSmrg 9874d422ce2eSmrg # Test if we are trying to use run time linking or normal 9875d422ce2eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9876d422ce2eSmrg # have runtime linking enabled, and use it for executables. 9877d422ce2eSmrg # For shared libraries, we enable/disable runtime linking 9878d422ce2eSmrg # depending on the kind of the shared library created - 9879d422ce2eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 9880d422ce2eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9881d422ce2eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 9882d422ce2eSmrg # lib.a static archive 9883d422ce2eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9884d422ce2eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 9885d422ce2eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9886d422ce2eSmrg # lib.a(lib.so.V) shared, rtl:no 9887d422ce2eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9888d422ce2eSmrg # lib.a static archive 9889d422ce2eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9890d422ce2eSmrg for ld_flag in $LDFLAGS; do 9891d422ce2eSmrg case $ld_flag in 9892d422ce2eSmrg *-brtl*) 9893d422ce2eSmrg aix_use_runtimelinking=yes 9894d422ce2eSmrg break 9895d422ce2eSmrg ;; 9896d422ce2eSmrg esac 9897d422ce2eSmrg done 9898d422ce2eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9899d422ce2eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9900d422ce2eSmrg # so we don't have lib.a shared libs to link our executables. 9901d422ce2eSmrg # We have to force runtime linking in this case. 9902d422ce2eSmrg aix_use_runtimelinking=yes 9903d422ce2eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9904d422ce2eSmrg fi 9905d422ce2eSmrg ;; 9906d422ce2eSmrg esac 99076257f37dSmrg 9908d422ce2eSmrg exp_sym_flag='-bexport' 9909d422ce2eSmrg no_entry_flag='-bnoentry' 9910d422ce2eSmrg fi 9911fc5a983dSmrg 9912d422ce2eSmrg # When large executables or shared objects are built, AIX ld can 9913d422ce2eSmrg # have problems creating the table of contents. If linking a library 9914d422ce2eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 9915d422ce2eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9916d422ce2eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9917fc5a983dSmrg 9918d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='' 9919d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9920d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9921d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9922d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9923d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9924d422ce2eSmrg case $with_aix_soname,$aix_use_runtimelinking in 9925d422ce2eSmrg aix,*) ;; # no import file 9926d422ce2eSmrg svr4,* | *,yes) # use import file 9927d422ce2eSmrg # The Import File defines what to hardcode. 9928d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9929d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9930d422ce2eSmrg ;; 9931d422ce2eSmrg esac 9932d422ce2eSmrg 9933d422ce2eSmrg if test yes = "$GXX"; then 9934d422ce2eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9935d422ce2eSmrg # We only want to do this on AIX 4.2 and lower, the check 9936d422ce2eSmrg # below for broken collect2 doesn't work under 4.3+ 9937d422ce2eSmrg collect2name=`$CC -print-prog-name=collect2` 9938d422ce2eSmrg if test -f "$collect2name" && 9939d422ce2eSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9940d422ce2eSmrg then 9941d422ce2eSmrg # We have reworked collect2 9942d422ce2eSmrg : 9943d422ce2eSmrg else 9944d422ce2eSmrg # We have old collect2 9945d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9946d422ce2eSmrg # It fails to find uninstalled libraries when the uninstalled 9947d422ce2eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 9948d422ce2eSmrg # to unsupported forces relinking 9949d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9950d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9951d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9952d422ce2eSmrg fi 9953d422ce2eSmrg esac 9954d422ce2eSmrg shared_flag='-shared' 9955d422ce2eSmrg if test yes = "$aix_use_runtimelinking"; then 9956d422ce2eSmrg shared_flag=$shared_flag' $wl-G' 9957d422ce2eSmrg fi 9958d422ce2eSmrg # Need to ensure runtime linking is disabled for the traditional 9959d422ce2eSmrg # shared library, or the linker may eventually find shared libraries 9960d422ce2eSmrg # /with/ Import File - we do not want to mix them. 9961d422ce2eSmrg shared_flag_aix='-shared' 9962d422ce2eSmrg shared_flag_svr4='-shared $wl-G' 9963d422ce2eSmrg else 9964d422ce2eSmrg # not using gcc 9965d422ce2eSmrg if test ia64 = "$host_cpu"; then 9966d422ce2eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9967d422ce2eSmrg # chokes on -Wl,-G. The following line is correct: 9968d422ce2eSmrg shared_flag='-G' 9969d422ce2eSmrg else 9970d422ce2eSmrg if test yes = "$aix_use_runtimelinking"; then 9971d422ce2eSmrg shared_flag='$wl-G' 9972d422ce2eSmrg else 9973d422ce2eSmrg shared_flag='$wl-bM:SRE' 9974d422ce2eSmrg fi 9975d422ce2eSmrg shared_flag_aix='$wl-bM:SRE' 9976d422ce2eSmrg shared_flag_svr4='$wl-G' 9977d422ce2eSmrg fi 9978d422ce2eSmrg fi 9979fc5a983dSmrg 9980d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9981d422ce2eSmrg # It seems that -bexpall does not export symbols beginning with 9982d422ce2eSmrg # underscore (_), so it is better to generate a list of symbols to 9983d422ce2eSmrg # export. 9984d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9985d422ce2eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9986d422ce2eSmrg # Warning - without using the other runtime loading flags (-brtl), 9987d422ce2eSmrg # -berok will link without error, but may produce a broken library. 9988d422ce2eSmrg # The "-G" linker flag allows undefined symbols. 9989d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9990d422ce2eSmrg # Determine the default libpath from the value encoded in an empty 9991d422ce2eSmrg # executable. 9992d422ce2eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9993d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9994fc5a983dSmrg 9995d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 9996d422ce2eSmrg else 9997d422ce2eSmrg if test ia64 = "$host_cpu"; then 9998d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9999d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10000d422ce2eSmrg _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" 10001d422ce2eSmrg else 10002d422ce2eSmrg # Determine the default libpath from the value encoded in an 10003d422ce2eSmrg # empty executable. 10004d422ce2eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 10005d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10006d422ce2eSmrg # Warning - without using the other run time loading flags, 10007d422ce2eSmrg # -berok will link without error, but may produce a broken library. 10008d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10009d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10010d422ce2eSmrg if test yes = "$with_gnu_ld"; then 10011d422ce2eSmrg # We only use this code for GNU lds that support --whole-archive. 10012d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10013d422ce2eSmrg else 10014d422ce2eSmrg # Exported symbols can be pulled into shared objects from archives 10015d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10016d422ce2eSmrg fi 10017d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10018d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10019d422ce2eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10020d422ce2eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10021d422ce2eSmrg if test svr4 != "$with_aix_soname"; then 10022d422ce2eSmrg # This is similar to how AIX traditionally builds its shared 10023d422ce2eSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10024d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 10025d422ce2eSmrg fi 10026d422ce2eSmrg if test aix != "$with_aix_soname"; then 10027d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 10028d422ce2eSmrg else 10029d422ce2eSmrg # used by -dlpreopen to get the symbols 10030d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10031d422ce2eSmrg fi 10032d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10033d422ce2eSmrg fi 10034d422ce2eSmrg fi 10035d422ce2eSmrg ;; 10036d422ce2eSmrg 10037d422ce2eSmrg beos*) 10038d422ce2eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10039d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10040d422ce2eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10041d422ce2eSmrg # support --undefined. This deserves some investigation. FIXME 10042d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10043fc5a983dSmrg else 10044d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10045fc5a983dSmrg fi 10046d422ce2eSmrg ;; 10047fc5a983dSmrg 10048d422ce2eSmrg chorus*) 10049d422ce2eSmrg case $cc_basename in 10050d422ce2eSmrg *) 10051d422ce2eSmrg # FIXME: insert proper C++ library support 10052d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10053d422ce2eSmrg ;; 10054d422ce2eSmrg esac 10055d422ce2eSmrg ;; 10056fc5a983dSmrg 10057d422ce2eSmrg cygwin* | mingw* | pw32* | cegcc*) 10058d422ce2eSmrg case $GXX,$cc_basename in 10059d422ce2eSmrg ,cl* | no,cl* | ,icl* | no,icl*) 10060d422ce2eSmrg # Native MSVC or ICC 10061d422ce2eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10062d422ce2eSmrg # no search path for DLLs. 10063d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10064d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10065d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 10066d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10067d422ce2eSmrg # Tell ltmain to make .lib files, not .a files. 10068d422ce2eSmrg libext=lib 10069d422ce2eSmrg # Tell ltmain to make .dll files, not .so files. 10070d422ce2eSmrg shrext_cmds=.dll 10071d422ce2eSmrg # FIXME: Setting linknames here is a bad hack. 10072d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10073d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10074d422ce2eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 10075d422ce2eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10076d422ce2eSmrg else 10077d422ce2eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10078d422ce2eSmrg fi~ 10079d422ce2eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10080d422ce2eSmrg linknames=' 10081d422ce2eSmrg # The linker will not automatically build a static lib if we build a DLL. 10082d422ce2eSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10083d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10084d422ce2eSmrg # Don't use ranlib 10085d422ce2eSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10086d422ce2eSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10087d422ce2eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10088d422ce2eSmrg case $lt_outputfile in 10089d422ce2eSmrg *.exe|*.EXE) ;; 10090d422ce2eSmrg *) 10091d422ce2eSmrg lt_outputfile=$lt_outputfile.exe 10092d422ce2eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 10093d422ce2eSmrg ;; 10094d422ce2eSmrg esac~ 10095d422ce2eSmrg func_to_tool_file "$lt_outputfile"~ 10096d422ce2eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10097d422ce2eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10098d422ce2eSmrg $RM "$lt_outputfile.manifest"; 10099d422ce2eSmrg fi' 10100d422ce2eSmrg ;; 10101d422ce2eSmrg *) 10102d422ce2eSmrg # g++ 10103d422ce2eSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10104d422ce2eSmrg # as there is no search path for DLLs. 10105d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10106d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10107d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10108d422ce2eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 10109d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10110fc5a983dSmrg 10111d422ce2eSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10112d422ce2eSmrg _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' 10113d422ce2eSmrg # If the export-symbols file already is a .def file, use it as 10114d422ce2eSmrg # is; otherwise, prepend EXPORTS... 10115d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10116d422ce2eSmrg cp $export_symbols $output_objdir/$soname.def; 10117d422ce2eSmrg else 10118d422ce2eSmrg echo EXPORTS > $output_objdir/$soname.def; 10119d422ce2eSmrg cat $export_symbols >> $output_objdir/$soname.def; 10120d422ce2eSmrg fi~ 10121d422ce2eSmrg $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' 10122d422ce2eSmrg else 10123d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10124d422ce2eSmrg fi 10125d422ce2eSmrg ;; 10126d422ce2eSmrg esac 10127d422ce2eSmrg ;; 10128d422ce2eSmrg darwin* | rhapsody*) 10129d422ce2eSmrg _LT_DARWIN_LINKER_FEATURES($1) 10130d422ce2eSmrg ;; 10131fc5a983dSmrg 10132d422ce2eSmrg os2*) 10133d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10134d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10135d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10136d422ce2eSmrg shrext_cmds=.dll 10137d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10138d422ce2eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10139d422ce2eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10140d422ce2eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10141d422ce2eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10142d422ce2eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10143d422ce2eSmrg emximp -o $lib $output_objdir/$libname.def' 10144d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10145d422ce2eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10146d422ce2eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10147d422ce2eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10148d422ce2eSmrg prefix_cmds="$SED"~ 10149d422ce2eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10150d422ce2eSmrg prefix_cmds="$prefix_cmds -e 1d"; 10151d422ce2eSmrg fi~ 10152d422ce2eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10153d422ce2eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10154d422ce2eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10155d422ce2eSmrg emximp -o $lib $output_objdir/$libname.def' 10156d422ce2eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10157d422ce2eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10158d422ce2eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10159d422ce2eSmrg ;; 10160fc5a983dSmrg 10161d422ce2eSmrg dgux*) 10162d422ce2eSmrg case $cc_basename in 10163d422ce2eSmrg ec++*) 10164d422ce2eSmrg # FIXME: insert proper C++ library support 10165d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10166d422ce2eSmrg ;; 10167d422ce2eSmrg ghcx*) 10168d422ce2eSmrg # Green Hills C++ Compiler 10169d422ce2eSmrg # FIXME: insert proper C++ library support 10170d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10171d422ce2eSmrg ;; 10172d422ce2eSmrg *) 10173d422ce2eSmrg # FIXME: insert proper C++ library support 10174d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10175d422ce2eSmrg ;; 10176d422ce2eSmrg esac 10177d422ce2eSmrg ;; 10178fc5a983dSmrg 10179d422ce2eSmrg freebsd2.*) 10180d422ce2eSmrg # C++ shared libraries reported to be fairly broken before 10181d422ce2eSmrg # switch to ELF 10182d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10183d422ce2eSmrg ;; 10184fc5a983dSmrg 10185d422ce2eSmrg freebsd-elf*) 10186d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10187d422ce2eSmrg ;; 101886086d97eSmrg 10189d422ce2eSmrg freebsd* | dragonfly* | midnightbsd*) 10190d422ce2eSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10191d422ce2eSmrg # conventions 10192d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10193d422ce2eSmrg ;; 101946086d97eSmrg 10195d422ce2eSmrg haiku*) 10196d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10197d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10198d422ce2eSmrg ;; 10199fc5a983dSmrg 10200d422ce2eSmrg hpux9*) 10201d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10202d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10203d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10204d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10205d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10206d422ce2eSmrg # but as the default 10207d422ce2eSmrg # location of the library. 102086086d97eSmrg 10209d422ce2eSmrg case $cc_basename in 10210d422ce2eSmrg CC*) 10211d422ce2eSmrg # FIXME: insert proper C++ library support 10212d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10213d422ce2eSmrg ;; 10214d422ce2eSmrg aCC*) 10215d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10216d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10217d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10218d422ce2eSmrg # linking a shared library. 10219d422ce2eSmrg # 10220d422ce2eSmrg # There doesn't appear to be a way to prevent this compiler from 10221d422ce2eSmrg # explicitly linking system object files so we need to strip them 10222d422ce2eSmrg # from the output so that they don't get included in the library 10223d422ce2eSmrg # dependencies. 10224d422ce2eSmrg 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"' 10225d422ce2eSmrg ;; 10226d422ce2eSmrg *) 10227d422ce2eSmrg if test yes = "$GXX"; then 10228d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10229d422ce2eSmrg else 10230d422ce2eSmrg # FIXME: insert proper C++ library support 10231d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10232d422ce2eSmrg fi 10233d422ce2eSmrg ;; 10234d422ce2eSmrg esac 10235d422ce2eSmrg ;; 102366086d97eSmrg 10237d422ce2eSmrg hpux10*|hpux11*) 10238d422ce2eSmrg if test no = "$with_gnu_ld"; then 10239d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10240d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 102416086d97eSmrg 10242d422ce2eSmrg case $host_cpu in 10243d422ce2eSmrg hppa*64*|ia64*) 10244d422ce2eSmrg ;; 10245d422ce2eSmrg *) 10246d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10247d422ce2eSmrg ;; 10248d422ce2eSmrg esac 10249d422ce2eSmrg fi 10250d422ce2eSmrg case $host_cpu in 10251d422ce2eSmrg hppa*64*|ia64*) 10252d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10253d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10254d422ce2eSmrg ;; 10255d422ce2eSmrg *) 10256d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10257d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10258d422ce2eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10259d422ce2eSmrg # but as the default 10260d422ce2eSmrg # location of the library. 10261d422ce2eSmrg ;; 10262d422ce2eSmrg esac 10263fc5a983dSmrg 10264d422ce2eSmrg case $cc_basename in 10265d422ce2eSmrg CC*) 10266d422ce2eSmrg # FIXME: insert proper C++ library support 10267d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10268d422ce2eSmrg ;; 10269d422ce2eSmrg aCC*) 10270d422ce2eSmrg case $host_cpu in 10271d422ce2eSmrg hppa*64*) 10272d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10273d422ce2eSmrg ;; 10274d422ce2eSmrg ia64*) 10275d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10276d422ce2eSmrg ;; 10277d422ce2eSmrg *) 10278d422ce2eSmrg _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' 10279d422ce2eSmrg ;; 10280d422ce2eSmrg esac 10281d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10282d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10283d422ce2eSmrg # linking a shared library. 10284d422ce2eSmrg # 10285d422ce2eSmrg # There doesn't appear to be a way to prevent this compiler from 10286d422ce2eSmrg # explicitly linking system object files so we need to strip them 10287d422ce2eSmrg # from the output so that they don't get included in the library 10288d422ce2eSmrg # dependencies. 10289d422ce2eSmrg 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"' 10290d422ce2eSmrg ;; 10291d422ce2eSmrg *) 10292d422ce2eSmrg if test yes = "$GXX"; then 10293d422ce2eSmrg if test no = "$with_gnu_ld"; then 10294d422ce2eSmrg case $host_cpu in 10295d422ce2eSmrg hppa*64*) 10296d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10297d422ce2eSmrg ;; 10298d422ce2eSmrg ia64*) 10299d422ce2eSmrg _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' 10300d422ce2eSmrg ;; 10301d422ce2eSmrg *) 10302d422ce2eSmrg _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' 10303d422ce2eSmrg ;; 10304d422ce2eSmrg esac 10305d422ce2eSmrg fi 10306d422ce2eSmrg else 10307d422ce2eSmrg # FIXME: insert proper C++ library support 10308d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10309d422ce2eSmrg fi 10310d422ce2eSmrg ;; 10311d422ce2eSmrg esac 10312d422ce2eSmrg ;; 10313fc5a983dSmrg 10314d422ce2eSmrg interix[[3-9]]*) 10315d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10316d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10317d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10318d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10319d422ce2eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10320d422ce2eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10321d422ce2eSmrg # default) and relocated if they conflict, which is a slow very memory 10322d422ce2eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 10323d422ce2eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10324d422ce2eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10325d422ce2eSmrg _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' 10326d422ce2eSmrg _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' 10327d422ce2eSmrg ;; 10328d422ce2eSmrg irix5* | irix6*) 10329d422ce2eSmrg case $cc_basename in 10330d422ce2eSmrg CC*) 10331d422ce2eSmrg # SGI C++ 10332d422ce2eSmrg _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' 10333fc5a983dSmrg 10334d422ce2eSmrg # Archives containing C++ object files must be created using 10335d422ce2eSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10336d422ce2eSmrg # necessary to make sure instantiated templates are included 10337d422ce2eSmrg # in the archive. 10338d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10339d422ce2eSmrg ;; 10340d422ce2eSmrg *) 10341d422ce2eSmrg if test yes = "$GXX"; then 10342d422ce2eSmrg if test no = "$with_gnu_ld"; then 10343d422ce2eSmrg _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' 10344d422ce2eSmrg else 10345d422ce2eSmrg _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' 10346d422ce2eSmrg fi 10347d422ce2eSmrg fi 10348d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10349d422ce2eSmrg ;; 10350d422ce2eSmrg esac 10351d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10352d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10353d422ce2eSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 10354d422ce2eSmrg ;; 10355fc5a983dSmrg 10356d422ce2eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10357d422ce2eSmrg case $cc_basename in 10358d422ce2eSmrg KCC*) 10359d422ce2eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10360fc5a983dSmrg 10361d422ce2eSmrg # KCC will only create a shared library if the output file 10362d422ce2eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10363d422ce2eSmrg # to its proper name (with version) after linking. 10364d422ce2eSmrg _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' 10365d422ce2eSmrg _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' 10366d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10367d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10368d422ce2eSmrg # linking a shared library. 10369d422ce2eSmrg # 10370d422ce2eSmrg # There doesn't appear to be a way to prevent this compiler from 10371d422ce2eSmrg # explicitly linking system object files so we need to strip them 10372d422ce2eSmrg # from the output so that they don't get included in the library 10373d422ce2eSmrg # dependencies. 10374d422ce2eSmrg 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"' 10375fc5a983dSmrg 10376d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10377d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10378fc5a983dSmrg 10379d422ce2eSmrg # Archives containing C++ object files must be created using 10380d422ce2eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10381d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10382d422ce2eSmrg ;; 10383d422ce2eSmrg icpc* | ecpc* ) 10384d422ce2eSmrg # Intel C++ 10385d422ce2eSmrg with_gnu_ld=yes 10386d422ce2eSmrg # version 8.0 and above of icpc choke on multiply defined symbols 10387d422ce2eSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10388d422ce2eSmrg # earlier do not add the objects themselves. 10389d422ce2eSmrg case `$CC -V 2>&1` in 10390d422ce2eSmrg *"Version 7."*) 10391d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10392d422ce2eSmrg _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' 10393d422ce2eSmrg ;; 10394d422ce2eSmrg *) # Version 8.0 or newer 10395d422ce2eSmrg tmp_idyn= 10396d422ce2eSmrg case $host_cpu in 10397d422ce2eSmrg ia64*) tmp_idyn=' -i_dynamic';; 10398d422ce2eSmrg esac 10399d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10400d422ce2eSmrg _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' 10401d422ce2eSmrg ;; 10402d422ce2eSmrg esac 10403d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10404d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10405d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10406d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10407d422ce2eSmrg ;; 10408d422ce2eSmrg pgCC* | pgcpp*) 10409d422ce2eSmrg # Portland Group C++ compiler 10410d422ce2eSmrg case `$CC -V` in 10411d422ce2eSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10412d422ce2eSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10413d422ce2eSmrg rm -rf $tpldir~ 10414d422ce2eSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10415d422ce2eSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10416d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10417d422ce2eSmrg rm -rf $tpldir~ 10418d422ce2eSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10419d422ce2eSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10420d422ce2eSmrg $RANLIB $oldlib' 10421d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10422d422ce2eSmrg rm -rf $tpldir~ 10423d422ce2eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10424d422ce2eSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10425d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10426d422ce2eSmrg rm -rf $tpldir~ 10427d422ce2eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10428d422ce2eSmrg $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' 10429d422ce2eSmrg ;; 10430d422ce2eSmrg *) # Version 6 and above use weak symbols 10431d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10432d422ce2eSmrg _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' 10433d422ce2eSmrg ;; 10434d422ce2eSmrg esac 10435fc5a983dSmrg 10436d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10437d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10438d422ce2eSmrg _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' 10439d422ce2eSmrg ;; 10440d422ce2eSmrg cxx*) 10441d422ce2eSmrg # Compaq C++ 10442d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10443d422ce2eSmrg _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' 10444fc5a983dSmrg 10445d422ce2eSmrg runpath_var=LD_RUN_PATH 10446d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10447d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10448fc5a983dSmrg 10449d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10450d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10451d422ce2eSmrg # linking a shared library. 10452d422ce2eSmrg # 10453d422ce2eSmrg # There doesn't appear to be a way to prevent this compiler from 10454d422ce2eSmrg # explicitly linking system object files so we need to strip them 10455d422ce2eSmrg # from the output so that they don't get included in the library 10456d422ce2eSmrg # dependencies. 10457d422ce2eSmrg 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' 10458d422ce2eSmrg ;; 10459d422ce2eSmrg xl* | mpixl* | bgxl*) 10460d422ce2eSmrg # IBM XL 8.0 on PPC, with GNU ld 10461d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10462d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10463d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10464d422ce2eSmrg if test yes = "$supports_anon_versioning"; then 10465d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10466d422ce2eSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10467d422ce2eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10468d422ce2eSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10469d422ce2eSmrg fi 10470d422ce2eSmrg ;; 10471d422ce2eSmrg *) 10472d422ce2eSmrg case `$CC -V 2>&1 | $SED 5q` in 10473d422ce2eSmrg *Sun\ C*) 10474d422ce2eSmrg # Sun C++ 5.9 10475d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10476d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10477d422ce2eSmrg _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' 10478d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10479d422ce2eSmrg _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' 10480d422ce2eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10481fc5a983dSmrg 10482d422ce2eSmrg # Not sure whether something based on 10483d422ce2eSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10484d422ce2eSmrg # would be better. 10485d422ce2eSmrg output_verbose_link_cmd='func_echo_all' 10486fc5a983dSmrg 10487d422ce2eSmrg # Archives containing C++ object files must be created using 10488d422ce2eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10489d422ce2eSmrg # necessary to make sure instantiated templates are included 10490d422ce2eSmrg # in the archive. 10491d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10492d422ce2eSmrg ;; 10493d422ce2eSmrg esac 10494d422ce2eSmrg ;; 10495d422ce2eSmrg esac 10496d422ce2eSmrg ;; 104976086d97eSmrg 10498d422ce2eSmrg lynxos*) 10499d422ce2eSmrg # FIXME: insert proper C++ library support 10500d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10501d422ce2eSmrg ;; 10502fc5a983dSmrg 10503d422ce2eSmrg m88k*) 10504d422ce2eSmrg # FIXME: insert proper C++ library support 10505d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10506d422ce2eSmrg ;; 10507fc5a983dSmrg 10508d422ce2eSmrg mvs*) 10509d422ce2eSmrg case $cc_basename in 10510d422ce2eSmrg cxx*) 10511d422ce2eSmrg # FIXME: insert proper C++ library support 10512d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10513d422ce2eSmrg ;; 10514d422ce2eSmrg *) 10515d422ce2eSmrg # FIXME: insert proper C++ library support 10516d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10517d422ce2eSmrg ;; 10518d422ce2eSmrg esac 10519d422ce2eSmrg ;; 10520fc5a983dSmrg 10521d422ce2eSmrg netbsd*) 10522d422ce2eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10523d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10524d422ce2eSmrg wlarc= 10525d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10526d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10527d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10528d422ce2eSmrg fi 10529d422ce2eSmrg # Workaround some broken pre-1.5 toolchains 10530d422ce2eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10531d422ce2eSmrg ;; 10532fc5a983dSmrg 10533d422ce2eSmrg *nto* | *qnx*) 10534d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10535d422ce2eSmrg ;; 10536fc5a983dSmrg 10537d422ce2eSmrg openbsd* | bitrig*) 10538d422ce2eSmrg if test -f /usr/libexec/ld.so; then 10539d422ce2eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10540d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10541d422ce2eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10542d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10543d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10544d422ce2eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10545d422ce2eSmrg _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' 10546d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10547d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10548d422ce2eSmrg fi 10549d422ce2eSmrg output_verbose_link_cmd=func_echo_all 10550d422ce2eSmrg else 10551d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10552d422ce2eSmrg fi 10553d422ce2eSmrg ;; 10554fc5a983dSmrg 10555d422ce2eSmrg osf3* | osf4* | osf5*) 10556d422ce2eSmrg case $cc_basename in 10557d422ce2eSmrg KCC*) 10558d422ce2eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10559fc5a983dSmrg 10560d422ce2eSmrg # KCC will only create a shared library if the output file 10561d422ce2eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10562d422ce2eSmrg # to its proper name (with version) after linking. 10563d422ce2eSmrg _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' 10564fc5a983dSmrg 10565d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10566d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1056771ba42d0Smrg 10568d422ce2eSmrg # Archives containing C++ object files must be created using 10569d422ce2eSmrg # the KAI C++ compiler. 10570d422ce2eSmrg case $host in 10571d422ce2eSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10572d422ce2eSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10573d422ce2eSmrg esac 10574d422ce2eSmrg ;; 10575d422ce2eSmrg RCC*) 10576d422ce2eSmrg # Rational C++ 2.4.1 10577d422ce2eSmrg # FIXME: insert proper C++ library support 10578d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10579d422ce2eSmrg ;; 10580d422ce2eSmrg cxx*) 10581d422ce2eSmrg case $host in 10582d422ce2eSmrg osf3*) 10583d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10584d422ce2eSmrg _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' 10585d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10586d422ce2eSmrg ;; 10587d422ce2eSmrg *) 10588d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10589d422ce2eSmrg _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' 10590d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10591d422ce2eSmrg echo "-hidden">> $lib.exp~ 10592d422ce2eSmrg $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~ 10593d422ce2eSmrg $RM $lib.exp' 10594d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10595d422ce2eSmrg ;; 10596d422ce2eSmrg esac 105976086d97eSmrg 10598d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105996086d97eSmrg 10600d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10601d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10602d422ce2eSmrg # linking a shared library. 10603d422ce2eSmrg # 10604d422ce2eSmrg # There doesn't appear to be a way to prevent this compiler from 10605d422ce2eSmrg # explicitly linking system object files so we need to strip them 10606d422ce2eSmrg # from the output so that they don't get included in the library 10607d422ce2eSmrg # dependencies. 10608d422ce2eSmrg 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"' 10609d422ce2eSmrg ;; 10610d422ce2eSmrg *) 10611d422ce2eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10612d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10613d422ce2eSmrg case $host in 10614d422ce2eSmrg osf3*) 10615d422ce2eSmrg _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' 10616d422ce2eSmrg ;; 10617d422ce2eSmrg *) 10618d422ce2eSmrg _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' 10619d422ce2eSmrg ;; 10620d422ce2eSmrg esac 1062171ba42d0Smrg 10622d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10623d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10624bd304fc0Smrg 10625d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10626d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10627d422ce2eSmrg # linking a shared library. 10628d422ce2eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10629bd304fc0Smrg 10630d422ce2eSmrg else 10631d422ce2eSmrg # FIXME: insert proper C++ library support 10632d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10633d422ce2eSmrg fi 10634d422ce2eSmrg ;; 10635d422ce2eSmrg esac 10636d422ce2eSmrg ;; 10637bd304fc0Smrg 10638d422ce2eSmrg psos*) 10639d422ce2eSmrg # FIXME: insert proper C++ library support 10640d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10641d422ce2eSmrg ;; 10642bd304fc0Smrg 10643d422ce2eSmrg sunos4*) 10644d422ce2eSmrg case $cc_basename in 10645d422ce2eSmrg CC*) 10646d422ce2eSmrg # Sun C++ 4.x 10647d422ce2eSmrg # FIXME: insert proper C++ library support 10648d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10649d422ce2eSmrg ;; 10650d422ce2eSmrg lcc*) 10651d422ce2eSmrg # Lucid 10652d422ce2eSmrg # FIXME: insert proper C++ library support 10653d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10654d422ce2eSmrg ;; 10655d422ce2eSmrg *) 10656d422ce2eSmrg # FIXME: insert proper C++ library support 10657d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10658d422ce2eSmrg ;; 10659d422ce2eSmrg esac 10660d422ce2eSmrg ;; 10661bd304fc0Smrg 10662d422ce2eSmrg solaris*) 10663d422ce2eSmrg case $cc_basename in 10664d422ce2eSmrg CC* | sunCC*) 10665d422ce2eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 10666d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10667d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10668d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10669d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10670d422ce2eSmrg $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' 10671bd304fc0Smrg 10672d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10673d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10674d422ce2eSmrg case $host_os in 10675d422ce2eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10676d422ce2eSmrg *) 10677d422ce2eSmrg # The compiler driver will combine and reorder linker options, 10678d422ce2eSmrg # but understands '-z linker_flag'. 10679d422ce2eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10680d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10681d422ce2eSmrg ;; 10682d422ce2eSmrg esac 10683d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1068471ba42d0Smrg 10685d422ce2eSmrg output_verbose_link_cmd='func_echo_all' 1068671ba42d0Smrg 10687d422ce2eSmrg # Archives containing C++ object files must be created using 10688d422ce2eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10689d422ce2eSmrg # necessary to make sure instantiated templates are included 10690d422ce2eSmrg # in the archive. 10691d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10692d422ce2eSmrg ;; 10693d422ce2eSmrg gcx*) 10694d422ce2eSmrg # Green Hills C++ Compiler 10695d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 1069671ba42d0Smrg 10697d422ce2eSmrg # The C++ compiler must be used to create the archive. 10698d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10699d422ce2eSmrg ;; 10700d422ce2eSmrg *) 10701d422ce2eSmrg # GNU C++ compiler with Solaris linker 10702d422ce2eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10703d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10704d422ce2eSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10705d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10706d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10707d422ce2eSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 107086257f37dSmrg 10709d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10710d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10711d422ce2eSmrg # linking a shared library. 10712d422ce2eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10713d422ce2eSmrg else 10714d422ce2eSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10715d422ce2eSmrg # platform. 10716d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10717d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10718d422ce2eSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 10719d422ce2eSmrg 10720d422ce2eSmrg # Commands to make compiler produce verbose output that lists 10721d422ce2eSmrg # what "hidden" libraries, object files and flags are used when 10722d422ce2eSmrg # linking a shared library. 10723d422ce2eSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10724d422ce2eSmrg fi 10725d422ce2eSmrg 10726d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10727d422ce2eSmrg case $host_os in 10728d422ce2eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10729d422ce2eSmrg *) 10730d422ce2eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10731d422ce2eSmrg ;; 10732d422ce2eSmrg esac 10733d422ce2eSmrg fi 10734d422ce2eSmrg ;; 10735d422ce2eSmrg esac 10736d422ce2eSmrg ;; 107376257f37dSmrg 10738d422ce2eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10739d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10740d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10741d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10742d422ce2eSmrg runpath_var='LD_RUN_PATH' 107436086d97eSmrg 10744d422ce2eSmrg case $cc_basename in 10745d422ce2eSmrg CC*) 10746d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10747d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10748d422ce2eSmrg ;; 10749d422ce2eSmrg *) 10750d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10751d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10752d422ce2eSmrg ;; 10753d422ce2eSmrg esac 10754d422ce2eSmrg ;; 107556086d97eSmrg 10756d422ce2eSmrg sysv5* | sco3.2v5* | sco5v6*) 10757d422ce2eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 10758d422ce2eSmrg # link with -lc, and that would cause any symbols used from libc to 10759d422ce2eSmrg # always be unresolved, which means just about no library would 10760d422ce2eSmrg # ever link correctly. If we're not using GNU ld we use -z text 10761d422ce2eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 10762d422ce2eSmrg # as -z defs. 10763d422ce2eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10764d422ce2eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10765d422ce2eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10766d422ce2eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10767d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10768d422ce2eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10769d422ce2eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10770d422ce2eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10771d422ce2eSmrg runpath_var='LD_RUN_PATH' 107726086d97eSmrg 10773d422ce2eSmrg case $cc_basename in 10774d422ce2eSmrg CC*) 10775d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10776d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10777d422ce2eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10778d422ce2eSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10779d422ce2eSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10780d422ce2eSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 10781d422ce2eSmrg ;; 10782d422ce2eSmrg *) 10783d422ce2eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10784d422ce2eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10785d422ce2eSmrg ;; 10786d422ce2eSmrg esac 10787d422ce2eSmrg ;; 107886086d97eSmrg 10789d422ce2eSmrg tandem*) 10790d422ce2eSmrg case $cc_basename in 10791d422ce2eSmrg NCC*) 10792d422ce2eSmrg # NonStop-UX NCC 3.20 10793d422ce2eSmrg # FIXME: insert proper C++ library support 10794d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10795d422ce2eSmrg ;; 10796d422ce2eSmrg *) 10797d422ce2eSmrg # FIXME: insert proper C++ library support 10798d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10799d422ce2eSmrg ;; 10800d422ce2eSmrg esac 10801d422ce2eSmrg ;; 108026086d97eSmrg 10803d422ce2eSmrg vxworks*) 10804d422ce2eSmrg # FIXME: insert proper C++ library support 10805d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10806d422ce2eSmrg ;; 108076086d97eSmrg 10808d422ce2eSmrg *) 10809d422ce2eSmrg # FIXME: insert proper C++ library support 10810d422ce2eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10811d422ce2eSmrg ;; 10812d422ce2eSmrg esac 108136086d97eSmrg 10814d422ce2eSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10815d422ce2eSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10816bd304fc0Smrg 10817d422ce2eSmrg _LT_TAGVAR(GCC, $1)=$GXX 10818d422ce2eSmrg _LT_TAGVAR(LD, $1)=$LD 10819d422ce2eSmrg 10820d422ce2eSmrg ## CAVEAT EMPTOR: 10821d422ce2eSmrg ## There is no encapsulation within the following macros, do not change 10822d422ce2eSmrg ## the running order or otherwise move them around unless you know exactly 10823d422ce2eSmrg ## what you are doing... 10824d422ce2eSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 10825d422ce2eSmrg _LT_COMPILER_PIC($1) 10826d422ce2eSmrg _LT_COMPILER_C_O($1) 10827d422ce2eSmrg _LT_COMPILER_FILE_LOCKS($1) 10828d422ce2eSmrg _LT_LINKER_SHLIBS($1) 10829d422ce2eSmrg _LT_SYS_DYNAMIC_LINKER($1) 10830d422ce2eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 108316086d97eSmrg 10832d422ce2eSmrg _LT_CONFIG($1) 10833d422ce2eSmrg fi # test -n "$compiler" 108346257f37dSmrg 10835d422ce2eSmrg CC=$lt_save_CC 10836d422ce2eSmrg CFLAGS=$lt_save_CFLAGS 10837d422ce2eSmrg LDCXX=$LD 10838d422ce2eSmrg LD=$lt_save_LD 10839d422ce2eSmrg GCC=$lt_save_GCC 10840d422ce2eSmrg with_gnu_ld=$lt_save_with_gnu_ld 10841d422ce2eSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 10842d422ce2eSmrg lt_cv_path_LD=$lt_save_path_LD 10843d422ce2eSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10844d422ce2eSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10845d422ce2eSmrgfi # test yes != "$_lt_caught_CXX_error" 108466257f37dSmrg 10847d422ce2eSmrgAC_LANG_POP 10848d422ce2eSmrg])# _LT_LANG_CXX_CONFIG 108496086d97eSmrg 108506086d97eSmrg 10851d422ce2eSmrg# _LT_FUNC_STRIPNAME_CNF 10852d422ce2eSmrg# ---------------------- 10853d422ce2eSmrg# func_stripname_cnf prefix suffix name 10854d422ce2eSmrg# strip PREFIX and SUFFIX off of NAME. 10855d422ce2eSmrg# PREFIX and SUFFIX must not contain globbing or regex special 10856d422ce2eSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10857d422ce2eSmrg# dot (in which case that matches only a dot). 108586086d97eSmrg# 10859d422ce2eSmrg# This function is identical to the (non-XSI) version of func_stripname, 10860d422ce2eSmrg# except this one can be used by m4 code that may be executed by configure, 10861d422ce2eSmrg# rather than the libtool script. 10862d422ce2eSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10863d422ce2eSmrgAC_REQUIRE([_LT_DECL_SED]) 10864d422ce2eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10865d422ce2eSmrgfunc_stripname_cnf () 10866d422ce2eSmrg{ 10867d422ce2eSmrg case @S|@2 in 10868d422ce2eSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10869d422ce2eSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10870d422ce2eSmrg esac 10871d422ce2eSmrg} # func_stripname_cnf 10872d422ce2eSmrg])# _LT_FUNC_STRIPNAME_CNF 108736086d97eSmrg 108746086d97eSmrg 10875d422ce2eSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10876d422ce2eSmrg# --------------------------------- 10877d422ce2eSmrg# Figure out "hidden" library dependencies from verbose 10878d422ce2eSmrg# compiler output when linking a shared library. 10879d422ce2eSmrg# Parse the compiler output and extract the necessary 10880d422ce2eSmrg# objects, libraries and library flags. 10881d422ce2eSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10882d422ce2eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10883d422ce2eSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10884d422ce2eSmrg# Dependencies to place before and after the object being linked: 10885d422ce2eSmrg_LT_TAGVAR(predep_objects, $1)= 10886d422ce2eSmrg_LT_TAGVAR(postdep_objects, $1)= 10887d422ce2eSmrg_LT_TAGVAR(predeps, $1)= 10888d422ce2eSmrg_LT_TAGVAR(postdeps, $1)= 10889d422ce2eSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10890d422ce2eSmrg 10891d422ce2eSmrgdnl we can't use the lt_simple_compile_test_code here, 10892d422ce2eSmrgdnl because it contains code intended for an executable, 10893d422ce2eSmrgdnl not a library. It's possible we should let each 10894d422ce2eSmrgdnl tag define a new lt_????_link_test_code variable, 10895d422ce2eSmrgdnl but it's only used here... 10896d422ce2eSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10897d422ce2eSmrgint a; 10898d422ce2eSmrgvoid foo (void) { a = 0; } 10899d422ce2eSmrg_LT_EOF 10900d422ce2eSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10901d422ce2eSmrgclass Foo 10902d422ce2eSmrg{ 10903d422ce2eSmrgpublic: 10904d422ce2eSmrg Foo (void) { a = 0; } 10905d422ce2eSmrgprivate: 10906d422ce2eSmrg int a; 10907d422ce2eSmrg}; 10908d422ce2eSmrg_LT_EOF 10909d422ce2eSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10910d422ce2eSmrg subroutine foo 10911d422ce2eSmrg implicit none 10912d422ce2eSmrg integer*4 a 10913d422ce2eSmrg a=0 10914d422ce2eSmrg return 10915d422ce2eSmrg end 10916d422ce2eSmrg_LT_EOF 10917d422ce2eSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10918d422ce2eSmrg subroutine foo 10919d422ce2eSmrg implicit none 10920d422ce2eSmrg integer a 10921d422ce2eSmrg a=0 10922d422ce2eSmrg return 10923d422ce2eSmrg end 10924d422ce2eSmrg_LT_EOF 10925d422ce2eSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10926d422ce2eSmrgpublic class foo { 10927d422ce2eSmrg private int a; 10928d422ce2eSmrg public void bar (void) { 10929d422ce2eSmrg a = 0; 10930d422ce2eSmrg } 10931d422ce2eSmrg}; 10932d422ce2eSmrg_LT_EOF 10933d422ce2eSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10934d422ce2eSmrgpackage foo 10935d422ce2eSmrgfunc foo() { 10936d422ce2eSmrg} 10937d422ce2eSmrg_LT_EOF 10938d422ce2eSmrg]) 1093971ba42d0Smrg 10940d422ce2eSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 10941d422ce2eSmrgcase "$CC $CFLAGS " in #( 10942d422ce2eSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10943d422ce2eSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10944d422ce2eSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10945d422ce2eSmrgesac 10946bd304fc0Smrg 10947d422ce2eSmrgdnl Parse the compiler output and extract the necessary 10948d422ce2eSmrgdnl objects, libraries and library flags. 10949d422ce2eSmrgif AC_TRY_EVAL(ac_compile); then 10950d422ce2eSmrg # Parse the compiler output and extract the necessary 10951d422ce2eSmrg # objects, libraries and library flags. 10952bd304fc0Smrg 10953d422ce2eSmrg # Sentinel used to keep track of whether or not we are before 10954d422ce2eSmrg # the conftest object file. 10955d422ce2eSmrg pre_test_object_deps_done=no 10956bd304fc0Smrg 10957d422ce2eSmrg for p in `eval "$output_verbose_link_cmd"`; do 10958d422ce2eSmrg case $prev$p in 10959bd304fc0Smrg 10960d422ce2eSmrg -L* | -R* | -l*) 10961d422ce2eSmrg # Some compilers place space between "-{L,R}" and the path. 10962d422ce2eSmrg # Remove the space. 10963d422ce2eSmrg if test x-L = "$p" || 10964d422ce2eSmrg test x-R = "$p"; then 10965d422ce2eSmrg prev=$p 10966d422ce2eSmrg continue 10967d422ce2eSmrg fi 10968bd304fc0Smrg 10969d422ce2eSmrg # Expand the sysroot to ease extracting the directories later. 10970d422ce2eSmrg if test -z "$prev"; then 10971d422ce2eSmrg case $p in 10972d422ce2eSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10973d422ce2eSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10974d422ce2eSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10975d422ce2eSmrg esac 10976d422ce2eSmrg fi 10977d422ce2eSmrg case $p in 10978d422ce2eSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10979d422ce2eSmrg esac 10980d422ce2eSmrg if test no = "$pre_test_object_deps_done"; then 10981d422ce2eSmrg case $prev in 10982d422ce2eSmrg -L | -R) 10983d422ce2eSmrg # Internal compiler library paths should come after those 10984d422ce2eSmrg # provided the user. The postdeps already come after the 10985d422ce2eSmrg # user supplied libs so there is no need to process them. 10986d422ce2eSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10987d422ce2eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10988d422ce2eSmrg else 10989d422ce2eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10990d422ce2eSmrg fi 10991d422ce2eSmrg ;; 10992d422ce2eSmrg # The "-l" case would never come before the object being 10993d422ce2eSmrg # linked, so don't bother handling this case. 10994d422ce2eSmrg esac 10995d422ce2eSmrg else 10996d422ce2eSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10997d422ce2eSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 10998d422ce2eSmrg else 10999d422ce2eSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11000d422ce2eSmrg fi 11001d422ce2eSmrg fi 11002d422ce2eSmrg prev= 11003d422ce2eSmrg ;; 11004bd304fc0Smrg 11005d422ce2eSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 11006d422ce2eSmrg *.$objext) 11007d422ce2eSmrg # This assumes that the test object file only shows up 11008d422ce2eSmrg # once in the compiler output. 11009d422ce2eSmrg if test "$p" = "conftest.$objext"; then 11010d422ce2eSmrg pre_test_object_deps_done=yes 11011d422ce2eSmrg continue 11012d422ce2eSmrg fi 11013bd304fc0Smrg 11014d422ce2eSmrg if test no = "$pre_test_object_deps_done"; then 11015d422ce2eSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11016d422ce2eSmrg _LT_TAGVAR(predep_objects, $1)=$p 11017d422ce2eSmrg else 11018d422ce2eSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11019d422ce2eSmrg fi 11020d422ce2eSmrg else 11021d422ce2eSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11022d422ce2eSmrg _LT_TAGVAR(postdep_objects, $1)=$p 11023d422ce2eSmrg else 11024d422ce2eSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11025d422ce2eSmrg fi 11026d422ce2eSmrg fi 11027d422ce2eSmrg ;; 11028bd304fc0Smrg 11029d422ce2eSmrg *) ;; # Ignore the rest. 11030bd304fc0Smrg 11031d422ce2eSmrg esac 11032d422ce2eSmrg done 11033d422ce2eSmrg 11034d422ce2eSmrg # Clean up. 11035d422ce2eSmrg rm -f a.out a.exe 11036bd304fc0Smrgelse 11037d422ce2eSmrg echo "libtool.m4: error: problem compiling $1 test program" 11038bd304fc0Smrgfi 11039bd304fc0Smrg 11040d422ce2eSmrg$RM -f confest.$objext 11041d422ce2eSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11042bd304fc0Smrg 11043d422ce2eSmrg# PORTME: override above test on systems where it is broken 11044d422ce2eSmrgm4_if([$1], [CXX], 11045d422ce2eSmrg[case $host_os in 11046d422ce2eSmrginterix[[3-9]]*) 11047d422ce2eSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11048d422ce2eSmrg # hack all around it, let's just trust "g++" to DTRT. 11049d422ce2eSmrg _LT_TAGVAR(predep_objects,$1)= 11050d422ce2eSmrg _LT_TAGVAR(postdep_objects,$1)= 11051d422ce2eSmrg _LT_TAGVAR(postdeps,$1)= 11052d422ce2eSmrg ;; 11053d422ce2eSmrgesac 11054d422ce2eSmrg]) 11055bd304fc0Smrg 11056d422ce2eSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 11057d422ce2eSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11058bd304fc0Smrgesac 11059d422ce2eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11060d422ce2eSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11061d422ce2eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11062d422ce2eSmrgfi 11063d422ce2eSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11064d422ce2eSmrg [The directories searched by this compiler when creating a shared library]) 11065d422ce2eSmrg_LT_TAGDECL([], [predep_objects], [1], 11066d422ce2eSmrg [Dependencies to place before and after the objects being linked to 11067d422ce2eSmrg create a shared library]) 11068d422ce2eSmrg_LT_TAGDECL([], [postdep_objects], [1]) 11069d422ce2eSmrg_LT_TAGDECL([], [predeps], [1]) 11070d422ce2eSmrg_LT_TAGDECL([], [postdeps], [1]) 11071d422ce2eSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11072d422ce2eSmrg [The library search path used internally by the compiler when linking 11073d422ce2eSmrg a shared library]) 11074d422ce2eSmrg])# _LT_SYS_HIDDEN_LIBDEPS 11075bd304fc0Smrg 11076d422ce2eSmrg 11077d422ce2eSmrg# _LT_LANG_F77_CONFIG([TAG]) 11078d422ce2eSmrg# -------------------------- 11079d422ce2eSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 11080d422ce2eSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11081d422ce2eSmrg# to write the compiler configuration to 'libtool'. 11082d422ce2eSmrgm4_defun([_LT_LANG_F77_CONFIG], 11083d422ce2eSmrg[AC_LANG_PUSH(Fortran 77) 11084d422ce2eSmrgif test -z "$F77" || test no = "$F77"; then 11085d422ce2eSmrg _lt_disable_F77=yes 11086bd304fc0Smrgfi 11087bd304fc0Smrg 11088d422ce2eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11089d422ce2eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11090d422ce2eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11091d422ce2eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11092d422ce2eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11093d422ce2eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11094d422ce2eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11095d422ce2eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11096d422ce2eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11097d422ce2eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11098d422ce2eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11099d422ce2eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11100d422ce2eSmrg_LT_TAGVAR(module_cmds, $1)= 11101d422ce2eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11102d422ce2eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11103d422ce2eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11104d422ce2eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11105d422ce2eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11106d422ce2eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11107d422ce2eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11108d422ce2eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11109bd304fc0Smrg 11110d422ce2eSmrg# Source file extension for f77 test sources. 11111d422ce2eSmrgac_ext=f 11112fc5a983dSmrg 11113d422ce2eSmrg# Object file extension for compiled f77 test sources. 11114d422ce2eSmrgobjext=o 11115d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 11116fc5a983dSmrg 11117d422ce2eSmrg# No sense in running all these tests if we already determined that 11118d422ce2eSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 11119d422ce2eSmrg# are currently assumed to apply to all compilers on this platform, 11120d422ce2eSmrg# and will be corrupted by setting them based on a non-working compiler. 11121d422ce2eSmrgif test yes != "$_lt_disable_F77"; then 11122d422ce2eSmrg # Code to be used in simple compile tests 11123d422ce2eSmrg lt_simple_compile_test_code="\ 11124d422ce2eSmrg subroutine t 11125d422ce2eSmrg return 11126d422ce2eSmrg end 11127d422ce2eSmrg" 11128d422ce2eSmrg 11129d422ce2eSmrg # Code to be used in simple link tests 11130d422ce2eSmrg lt_simple_link_test_code="\ 11131d422ce2eSmrg program t 11132d422ce2eSmrg end 11133d422ce2eSmrg" 11134d422ce2eSmrg 11135d422ce2eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11136d422ce2eSmrg _LT_TAG_COMPILER 11137d422ce2eSmrg 11138d422ce2eSmrg # save warnings/boilerplate of simple test code 11139d422ce2eSmrg _LT_COMPILER_BOILERPLATE 11140d422ce2eSmrg _LT_LINKER_BOILERPLATE 11141d422ce2eSmrg 11142d422ce2eSmrg # Allow CC to be a program name with arguments. 11143d422ce2eSmrg lt_save_CC=$CC 11144d422ce2eSmrg lt_save_GCC=$GCC 11145d422ce2eSmrg lt_save_CFLAGS=$CFLAGS 11146d422ce2eSmrg CC=${F77-"f77"} 11147d422ce2eSmrg CFLAGS=$FFLAGS 11148d422ce2eSmrg compiler=$CC 11149d422ce2eSmrg _LT_TAGVAR(compiler, $1)=$CC 11150d422ce2eSmrg _LT_CC_BASENAME([$compiler]) 11151d422ce2eSmrg GCC=$G77 11152d422ce2eSmrg if test -n "$compiler"; then 11153d422ce2eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11154d422ce2eSmrg AC_MSG_RESULT([$can_build_shared]) 11155fc5a983dSmrg 11156d422ce2eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11157d422ce2eSmrg test no = "$can_build_shared" && enable_shared=no 11158fc5a983dSmrg 11159d422ce2eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11160d422ce2eSmrg # are all built from PIC. 11161d422ce2eSmrg case $host_os in 11162d422ce2eSmrg aix3*) 11163d422ce2eSmrg test yes = "$enable_shared" && enable_static=no 11164d422ce2eSmrg if test -n "$RANLIB"; then 11165d422ce2eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11166d422ce2eSmrg postinstall_cmds='$RANLIB $lib' 11167d422ce2eSmrg fi 11168d422ce2eSmrg ;; 11169d422ce2eSmrg aix[[4-9]]*) 11170d422ce2eSmrg if test ia64 != "$host_cpu"; then 11171d422ce2eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11172d422ce2eSmrg yes,aix,yes) ;; # shared object as lib.so file only 11173d422ce2eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11174d422ce2eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11175d422ce2eSmrg esac 11176d422ce2eSmrg fi 11177d422ce2eSmrg ;; 11178d422ce2eSmrg esac 11179d422ce2eSmrg AC_MSG_RESULT([$enable_shared]) 11180fc5a983dSmrg 11181d422ce2eSmrg AC_MSG_CHECKING([whether to build static libraries]) 11182d422ce2eSmrg # Make sure either enable_shared or enable_static is yes. 11183d422ce2eSmrg test yes = "$enable_shared" || enable_static=yes 11184d422ce2eSmrg AC_MSG_RESULT([$enable_static]) 111856086d97eSmrg 11186d422ce2eSmrg _LT_TAGVAR(GCC, $1)=$G77 11187d422ce2eSmrg _LT_TAGVAR(LD, $1)=$LD 111886086d97eSmrg 11189d422ce2eSmrg ## CAVEAT EMPTOR: 11190d422ce2eSmrg ## There is no encapsulation within the following macros, do not change 11191d422ce2eSmrg ## the running order or otherwise move them around unless you know exactly 11192d422ce2eSmrg ## what you are doing... 11193d422ce2eSmrg _LT_COMPILER_PIC($1) 11194d422ce2eSmrg _LT_COMPILER_C_O($1) 11195d422ce2eSmrg _LT_COMPILER_FILE_LOCKS($1) 11196d422ce2eSmrg _LT_LINKER_SHLIBS($1) 11197d422ce2eSmrg _LT_SYS_DYNAMIC_LINKER($1) 11198d422ce2eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 111996086d97eSmrg 11200d422ce2eSmrg _LT_CONFIG($1) 11201d422ce2eSmrg fi # test -n "$compiler" 11202fc5a983dSmrg 11203d422ce2eSmrg GCC=$lt_save_GCC 11204d422ce2eSmrg CC=$lt_save_CC 11205d422ce2eSmrg CFLAGS=$lt_save_CFLAGS 11206d422ce2eSmrgfi # test yes != "$_lt_disable_F77" 11207fc5a983dSmrg 11208d422ce2eSmrgAC_LANG_POP 11209d422ce2eSmrg])# _LT_LANG_F77_CONFIG 11210fc5a983dSmrg 11211fc5a983dSmrg 11212d422ce2eSmrg# _LT_LANG_FC_CONFIG([TAG]) 11213d422ce2eSmrg# ------------------------- 11214d422ce2eSmrg# Ensure that the configuration variables for a Fortran compiler are 11215d422ce2eSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11216d422ce2eSmrg# to write the compiler configuration to 'libtool'. 11217d422ce2eSmrgm4_defun([_LT_LANG_FC_CONFIG], 11218d422ce2eSmrg[AC_LANG_PUSH(Fortran) 112196086d97eSmrg 11220d422ce2eSmrgif test -z "$FC" || test no = "$FC"; then 11221d422ce2eSmrg _lt_disable_FC=yes 11222fc5a983dSmrgfi 112236086d97eSmrg 11224d422ce2eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11225d422ce2eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11226d422ce2eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11227d422ce2eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11228d422ce2eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11229d422ce2eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11230d422ce2eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11231d422ce2eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11232d422ce2eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11233d422ce2eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11234d422ce2eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11235d422ce2eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11236d422ce2eSmrg_LT_TAGVAR(module_cmds, $1)= 11237d422ce2eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11238d422ce2eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11239d422ce2eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11240d422ce2eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11241d422ce2eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11242d422ce2eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11243d422ce2eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11244d422ce2eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11245fc5a983dSmrg 11246d422ce2eSmrg# Source file extension for fc test sources. 11247d422ce2eSmrgac_ext=${ac_fc_srcext-f} 11248fc5a983dSmrg 11249d422ce2eSmrg# Object file extension for compiled fc test sources. 11250d422ce2eSmrgobjext=o 11251d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 11252bd304fc0Smrg 11253d422ce2eSmrg# No sense in running all these tests if we already determined that 11254d422ce2eSmrg# the FC compiler isn't working. Some variables (like enable_shared) 11255d422ce2eSmrg# are currently assumed to apply to all compilers on this platform, 11256d422ce2eSmrg# and will be corrupted by setting them based on a non-working compiler. 11257d422ce2eSmrgif test yes != "$_lt_disable_FC"; then 11258d422ce2eSmrg # Code to be used in simple compile tests 11259d422ce2eSmrg lt_simple_compile_test_code="\ 11260d422ce2eSmrg subroutine t 11261d422ce2eSmrg return 11262d422ce2eSmrg end 11263d422ce2eSmrg" 11264bd304fc0Smrg 11265d422ce2eSmrg # Code to be used in simple link tests 11266d422ce2eSmrg lt_simple_link_test_code="\ 11267d422ce2eSmrg program t 11268d422ce2eSmrg end 11269d422ce2eSmrg" 11270d422ce2eSmrg 11271d422ce2eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11272d422ce2eSmrg _LT_TAG_COMPILER 11273d422ce2eSmrg 11274d422ce2eSmrg # save warnings/boilerplate of simple test code 11275d422ce2eSmrg _LT_COMPILER_BOILERPLATE 11276d422ce2eSmrg _LT_LINKER_BOILERPLATE 11277d422ce2eSmrg 11278d422ce2eSmrg # Allow CC to be a program name with arguments. 11279d422ce2eSmrg lt_save_CC=$CC 11280d422ce2eSmrg lt_save_GCC=$GCC 11281d422ce2eSmrg lt_save_CFLAGS=$CFLAGS 11282d422ce2eSmrg CC=${FC-"f95"} 11283d422ce2eSmrg CFLAGS=$FCFLAGS 11284d422ce2eSmrg compiler=$CC 11285d422ce2eSmrg GCC=$ac_cv_fc_compiler_gnu 11286bd304fc0Smrg 11287d422ce2eSmrg _LT_TAGVAR(compiler, $1)=$CC 11288d422ce2eSmrg _LT_CC_BASENAME([$compiler]) 11289bd304fc0Smrg 11290d422ce2eSmrg if test -n "$compiler"; then 11291d422ce2eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11292d422ce2eSmrg AC_MSG_RESULT([$can_build_shared]) 11293bd304fc0Smrg 11294d422ce2eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11295d422ce2eSmrg test no = "$can_build_shared" && enable_shared=no 11296bd304fc0Smrg 11297d422ce2eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11298d422ce2eSmrg # are all built from PIC. 11299d422ce2eSmrg case $host_os in 11300d422ce2eSmrg aix3*) 11301d422ce2eSmrg test yes = "$enable_shared" && enable_static=no 11302d422ce2eSmrg if test -n "$RANLIB"; then 11303d422ce2eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11304d422ce2eSmrg postinstall_cmds='$RANLIB $lib' 11305d422ce2eSmrg fi 11306d422ce2eSmrg ;; 11307d422ce2eSmrg aix[[4-9]]*) 11308d422ce2eSmrg if test ia64 != "$host_cpu"; then 11309d422ce2eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11310d422ce2eSmrg yes,aix,yes) ;; # shared object as lib.so file only 11311d422ce2eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11312d422ce2eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11313d422ce2eSmrg esac 11314bd304fc0Smrg fi 11315d422ce2eSmrg ;; 11316d422ce2eSmrg esac 11317d422ce2eSmrg AC_MSG_RESULT([$enable_shared]) 11318bd304fc0Smrg 11319d422ce2eSmrg AC_MSG_CHECKING([whether to build static libraries]) 11320d422ce2eSmrg # Make sure either enable_shared or enable_static is yes. 11321d422ce2eSmrg test yes = "$enable_shared" || enable_static=yes 11322d422ce2eSmrg AC_MSG_RESULT([$enable_static]) 11323bd304fc0Smrg 11324d422ce2eSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11325d422ce2eSmrg _LT_TAGVAR(LD, $1)=$LD 11326bd304fc0Smrg 11327d422ce2eSmrg ## CAVEAT EMPTOR: 11328d422ce2eSmrg ## There is no encapsulation within the following macros, do not change 11329d422ce2eSmrg ## the running order or otherwise move them around unless you know exactly 11330d422ce2eSmrg ## what you are doing... 11331d422ce2eSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 11332d422ce2eSmrg _LT_COMPILER_PIC($1) 11333d422ce2eSmrg _LT_COMPILER_C_O($1) 11334d422ce2eSmrg _LT_COMPILER_FILE_LOCKS($1) 11335d422ce2eSmrg _LT_LINKER_SHLIBS($1) 11336d422ce2eSmrg _LT_SYS_DYNAMIC_LINKER($1) 11337d422ce2eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11338bd304fc0Smrg 11339d422ce2eSmrg _LT_CONFIG($1) 11340d422ce2eSmrg fi # test -n "$compiler" 11341bd304fc0Smrg 11342d422ce2eSmrg GCC=$lt_save_GCC 11343d422ce2eSmrg CC=$lt_save_CC 11344d422ce2eSmrg CFLAGS=$lt_save_CFLAGS 11345d422ce2eSmrgfi # test yes != "$_lt_disable_FC" 11346bd304fc0Smrg 11347d422ce2eSmrgAC_LANG_POP 11348d422ce2eSmrg])# _LT_LANG_FC_CONFIG 11349bd304fc0Smrg 11350bd304fc0Smrg 11351d422ce2eSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 11352d422ce2eSmrg# -------------------------- 11353d422ce2eSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11354d422ce2eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11355d422ce2eSmrg# to write the compiler configuration to 'libtool'. 11356d422ce2eSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 11357d422ce2eSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11358d422ce2eSmrgAC_LANG_SAVE 11359bd304fc0Smrg 11360d422ce2eSmrg# Source file extension for Java test sources. 11361d422ce2eSmrgac_ext=java 11362bd304fc0Smrg 11363d422ce2eSmrg# Object file extension for compiled Java test sources. 11364d422ce2eSmrgobjext=o 11365d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 11366bd304fc0Smrg 11367d422ce2eSmrg# Code to be used in simple compile tests 11368d422ce2eSmrglt_simple_compile_test_code="class foo {}" 11369bd304fc0Smrg 11370d422ce2eSmrg# Code to be used in simple link tests 11371d422ce2eSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11372bd304fc0Smrg 11373d422ce2eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11374d422ce2eSmrg_LT_TAG_COMPILER 11375bd304fc0Smrg 11376d422ce2eSmrg# save warnings/boilerplate of simple test code 11377d422ce2eSmrg_LT_COMPILER_BOILERPLATE 11378d422ce2eSmrg_LT_LINKER_BOILERPLATE 11379bd304fc0Smrg 11380d422ce2eSmrg# Allow CC to be a program name with arguments. 11381d422ce2eSmrglt_save_CC=$CC 11382d422ce2eSmrglt_save_CFLAGS=$CFLAGS 11383d422ce2eSmrglt_save_GCC=$GCC 11384d422ce2eSmrgGCC=yes 11385d422ce2eSmrgCC=${GCJ-"gcj"} 11386d422ce2eSmrgCFLAGS=$GCJFLAGS 11387d422ce2eSmrgcompiler=$CC 11388d422ce2eSmrg_LT_TAGVAR(compiler, $1)=$CC 11389d422ce2eSmrg_LT_TAGVAR(LD, $1)=$LD 11390d422ce2eSmrg_LT_CC_BASENAME([$compiler]) 11391d422ce2eSmrg 11392d422ce2eSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11393d422ce2eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11394d422ce2eSmrg 11395d422ce2eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11396d422ce2eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11397d422ce2eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11398d422ce2eSmrg 11399d422ce2eSmrgif test -n "$compiler"; then 11400d422ce2eSmrg _LT_COMPILER_NO_RTTI($1) 11401d422ce2eSmrg _LT_COMPILER_PIC($1) 11402d422ce2eSmrg _LT_COMPILER_C_O($1) 11403d422ce2eSmrg _LT_COMPILER_FILE_LOCKS($1) 11404d422ce2eSmrg _LT_LINKER_SHLIBS($1) 11405d422ce2eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11406d422ce2eSmrg 11407d422ce2eSmrg _LT_CONFIG($1) 11408bd304fc0Smrgfi 11409bd304fc0Smrg 11410d422ce2eSmrgAC_LANG_RESTORE 11411bd304fc0Smrg 11412d422ce2eSmrgGCC=$lt_save_GCC 11413d422ce2eSmrgCC=$lt_save_CC 11414d422ce2eSmrgCFLAGS=$lt_save_CFLAGS 11415d422ce2eSmrg])# _LT_LANG_GCJ_CONFIG 1141671ba42d0Smrg 1141771ba42d0Smrg 11418d422ce2eSmrg# _LT_LANG_GO_CONFIG([TAG]) 11419d422ce2eSmrg# -------------------------- 11420d422ce2eSmrg# Ensure that the configuration variables for the GNU Go compiler 11421d422ce2eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11422d422ce2eSmrg# to write the compiler configuration to 'libtool'. 11423d422ce2eSmrgm4_defun([_LT_LANG_GO_CONFIG], 11424d422ce2eSmrg[AC_REQUIRE([LT_PROG_GO])dnl 11425d422ce2eSmrgAC_LANG_SAVE 11426bd304fc0Smrg 11427d422ce2eSmrg# Source file extension for Go test sources. 11428d422ce2eSmrgac_ext=go 11429bd304fc0Smrg 11430d422ce2eSmrg# Object file extension for compiled Go test sources. 11431d422ce2eSmrgobjext=o 11432d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 11433bd304fc0Smrg 11434d422ce2eSmrg# Code to be used in simple compile tests 11435d422ce2eSmrglt_simple_compile_test_code="package main; func main() { }" 11436bd304fc0Smrg 11437d422ce2eSmrg# Code to be used in simple link tests 11438d422ce2eSmrglt_simple_link_test_code='package main; func main() { }' 1143971ba42d0Smrg 11440d422ce2eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11441d422ce2eSmrg_LT_TAG_COMPILER 1144271ba42d0Smrg 11443d422ce2eSmrg# save warnings/boilerplate of simple test code 11444d422ce2eSmrg_LT_COMPILER_BOILERPLATE 11445d422ce2eSmrg_LT_LINKER_BOILERPLATE 11446fc5a983dSmrg 11447d422ce2eSmrg# Allow CC to be a program name with arguments. 11448d422ce2eSmrglt_save_CC=$CC 11449d422ce2eSmrglt_save_CFLAGS=$CFLAGS 11450d422ce2eSmrglt_save_GCC=$GCC 11451d422ce2eSmrgGCC=yes 11452d422ce2eSmrgCC=${GOC-"gccgo"} 11453d422ce2eSmrgCFLAGS=$GOFLAGS 11454d422ce2eSmrgcompiler=$CC 11455d422ce2eSmrg_LT_TAGVAR(compiler, $1)=$CC 11456d422ce2eSmrg_LT_TAGVAR(LD, $1)=$LD 11457d422ce2eSmrg_LT_CC_BASENAME([$compiler]) 114586257f37dSmrg 11459d422ce2eSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 11460d422ce2eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11461fc5a983dSmrg 11462d422ce2eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11463d422ce2eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11464d422ce2eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11465f3561b8bSmrg 11466d422ce2eSmrgif test -n "$compiler"; then 11467d422ce2eSmrg _LT_COMPILER_NO_RTTI($1) 11468d422ce2eSmrg _LT_COMPILER_PIC($1) 11469d422ce2eSmrg _LT_COMPILER_C_O($1) 11470d422ce2eSmrg _LT_COMPILER_FILE_LOCKS($1) 11471d422ce2eSmrg _LT_LINKER_SHLIBS($1) 11472d422ce2eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11473d422ce2eSmrg 11474d422ce2eSmrg _LT_CONFIG($1) 11475d422ce2eSmrgfi 11476d422ce2eSmrg 11477d422ce2eSmrgAC_LANG_RESTORE 11478d422ce2eSmrg 11479d422ce2eSmrgGCC=$lt_save_GCC 11480d422ce2eSmrgCC=$lt_save_CC 11481d422ce2eSmrgCFLAGS=$lt_save_CFLAGS 11482d422ce2eSmrg])# _LT_LANG_GO_CONFIG 11483d422ce2eSmrg 11484d422ce2eSmrg 11485d422ce2eSmrg# _LT_LANG_RC_CONFIG([TAG]) 11486d422ce2eSmrg# ------------------------- 11487d422ce2eSmrg# Ensure that the configuration variables for the Windows resource compiler 11488d422ce2eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11489d422ce2eSmrg# to write the compiler configuration to 'libtool'. 11490d422ce2eSmrgm4_defun([_LT_LANG_RC_CONFIG], 11491d422ce2eSmrg[AC_REQUIRE([LT_PROG_RC])dnl 11492d422ce2eSmrgAC_LANG_SAVE 11493d422ce2eSmrg 11494d422ce2eSmrg# Source file extension for RC test sources. 11495d422ce2eSmrgac_ext=rc 11496f3561b8bSmrg 11497d422ce2eSmrg# Object file extension for compiled RC test sources. 11498d422ce2eSmrgobjext=o 11499d422ce2eSmrg_LT_TAGVAR(objext, $1)=$objext 11500f3561b8bSmrg 11501d422ce2eSmrg# Code to be used in simple compile tests 11502d422ce2eSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11503f3561b8bSmrg 11504d422ce2eSmrg# Code to be used in simple link tests 11505d422ce2eSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11506fc5a983dSmrg 11507d422ce2eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11508d422ce2eSmrg_LT_TAG_COMPILER 11509fc5a983dSmrg 11510d422ce2eSmrg# save warnings/boilerplate of simple test code 11511d422ce2eSmrg_LT_COMPILER_BOILERPLATE 11512d422ce2eSmrg_LT_LINKER_BOILERPLATE 11513fc5a983dSmrg 11514d422ce2eSmrg# Allow CC to be a program name with arguments. 11515d422ce2eSmrglt_save_CC=$CC 11516d422ce2eSmrglt_save_CFLAGS=$CFLAGS 11517d422ce2eSmrglt_save_GCC=$GCC 11518d422ce2eSmrgGCC= 11519d422ce2eSmrgCC=${RC-"windres"} 11520d422ce2eSmrgCFLAGS= 11521d422ce2eSmrgcompiler=$CC 11522d422ce2eSmrg_LT_TAGVAR(compiler, $1)=$CC 11523d422ce2eSmrg_LT_CC_BASENAME([$compiler]) 11524d422ce2eSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11525fc5a983dSmrg 11526d422ce2eSmrgif test -n "$compiler"; then 11527d422ce2eSmrg : 11528d422ce2eSmrg _LT_CONFIG($1) 11529d422ce2eSmrgfi 11530fc5a983dSmrg 11531d422ce2eSmrgGCC=$lt_save_GCC 11532d422ce2eSmrgAC_LANG_RESTORE 11533d422ce2eSmrgCC=$lt_save_CC 11534d422ce2eSmrgCFLAGS=$lt_save_CFLAGS 11535d422ce2eSmrg])# _LT_LANG_RC_CONFIG 11536fc5a983dSmrg 11537fc5a983dSmrg 11538d422ce2eSmrg# LT_PROG_GCJ 11539d422ce2eSmrg# ----------- 11540d422ce2eSmrgAC_DEFUN([LT_PROG_GCJ], 11541d422ce2eSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11542d422ce2eSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11543d422ce2eSmrg [AC_CHECK_TOOL(GCJ, gcj,) 11544d422ce2eSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11545d422ce2eSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11546fc5a983dSmrg]) 11547fc5a983dSmrg 11548d422ce2eSmrg# Old name: 11549d422ce2eSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11550d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 11551d422ce2eSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11552fc5a983dSmrg 11553fc5a983dSmrg 11554d422ce2eSmrg# LT_PROG_GO 11555d422ce2eSmrg# ---------- 11556d422ce2eSmrgAC_DEFUN([LT_PROG_GO], 11557d422ce2eSmrg[AC_CHECK_TOOL(GOC, gccgo,) 11558d422ce2eSmrg]) 11559fc5a983dSmrg 11560fc5a983dSmrg 11561d422ce2eSmrg# LT_PROG_RC 11562d422ce2eSmrg# ---------- 11563d422ce2eSmrgAC_DEFUN([LT_PROG_RC], 11564d422ce2eSmrg[AC_CHECK_TOOL(RC, windres,) 11565d422ce2eSmrg]) 11566fc5a983dSmrg 11567d422ce2eSmrg# Old name: 11568d422ce2eSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11569d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 11570d422ce2eSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11571fc5a983dSmrg 11572fc5a983dSmrg 11573d422ce2eSmrg# _LT_DECL_EGREP 11574d422ce2eSmrg# -------------- 11575d422ce2eSmrg# If we don't have a new enough Autoconf to choose the best grep 11576d422ce2eSmrg# available, choose the one first in the user's PATH. 11577d422ce2eSmrgm4_defun([_LT_DECL_EGREP], 11578d422ce2eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11579d422ce2eSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11580d422ce2eSmrgtest -z "$GREP" && GREP=grep 11581d422ce2eSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11582d422ce2eSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11583d422ce2eSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11584d422ce2eSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11585d422ce2eSmrgAC_SUBST([GREP]) 11586d422ce2eSmrg]) 11587fc5a983dSmrg 11588fc5a983dSmrg 11589d422ce2eSmrg# _LT_DECL_OBJDUMP 11590d422ce2eSmrg# -------------- 11591d422ce2eSmrg# If we don't have a new enough Autoconf to choose the best objdump 11592d422ce2eSmrg# available, choose the one first in the user's PATH. 11593d422ce2eSmrgm4_defun([_LT_DECL_OBJDUMP], 11594d422ce2eSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11595d422ce2eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11596d422ce2eSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11597d422ce2eSmrgAC_SUBST([OBJDUMP]) 11598d422ce2eSmrg]) 11599fc5a983dSmrg 11600d422ce2eSmrg# _LT_DECL_DLLTOOL 11601d422ce2eSmrg# ---------------- 11602d422ce2eSmrg# Ensure DLLTOOL variable is set. 11603d422ce2eSmrgm4_defun([_LT_DECL_DLLTOOL], 11604d422ce2eSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11605d422ce2eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11606d422ce2eSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11607d422ce2eSmrgAC_SUBST([DLLTOOL]) 11608d422ce2eSmrg]) 1160971ba42d0Smrg 11610d422ce2eSmrg# _LT_DECL_FILECMD 11611d422ce2eSmrg# ---------------- 11612d422ce2eSmrg# Check for a file(cmd) program that can be used to detect file type and magic 11613d422ce2eSmrgm4_defun([_LT_DECL_FILECMD], 11614d422ce2eSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11615d422ce2eSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11616d422ce2eSmrg])# _LD_DECL_FILECMD 11617fc5a983dSmrg 11618d422ce2eSmrg# _LT_DECL_SED 11619d422ce2eSmrg# ------------ 11620d422ce2eSmrg# Check for a fully-functional sed program, that truncates 11621d422ce2eSmrg# as few characters as possible. Prefer GNU sed if found. 11622d422ce2eSmrgm4_defun([_LT_DECL_SED], 11623d422ce2eSmrg[AC_PROG_SED 11624d422ce2eSmrgtest -z "$SED" && SED=sed 11625d422ce2eSmrgXsed="$SED -e 1s/^X//" 11626d422ce2eSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11627d422ce2eSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11628d422ce2eSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11629d422ce2eSmrg])# _LT_DECL_SED 11630d422ce2eSmrg 11631d422ce2eSmrgm4_ifndef([AC_PROG_SED], [ 11632d422ce2eSmrg# NOTE: This macro has been submitted for inclusion into # 11633d422ce2eSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11634d422ce2eSmrg# a released version of Autoconf we should remove this # 11635d422ce2eSmrg# macro and use it instead. # 11636d422ce2eSmrg 11637d422ce2eSmrgm4_defun([AC_PROG_SED], 11638d422ce2eSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11639d422ce2eSmrgAC_CACHE_VAL(lt_cv_path_SED, 11640d422ce2eSmrg[# Loop through the user's path and test for sed and gsed. 11641d422ce2eSmrg# Then use that list of sed's as ones to test for truncation. 11642d422ce2eSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11643d422ce2eSmrgfor as_dir in $PATH 11644d422ce2eSmrgdo 11645d422ce2eSmrg IFS=$as_save_IFS 11646d422ce2eSmrg test -z "$as_dir" && as_dir=. 11647d422ce2eSmrg for lt_ac_prog in sed gsed; do 11648d422ce2eSmrg for ac_exec_ext in '' $ac_executable_extensions; do 11649d422ce2eSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11650d422ce2eSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11651fc5a983dSmrg fi 11652d422ce2eSmrg done 11653d422ce2eSmrg done 11654d422ce2eSmrgdone 11655d422ce2eSmrgIFS=$as_save_IFS 11656d422ce2eSmrglt_ac_max=0 11657d422ce2eSmrglt_ac_count=0 11658d422ce2eSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11659d422ce2eSmrg# along with /bin/sed that truncates output. 11660d422ce2eSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11661d422ce2eSmrg test ! -f "$lt_ac_sed" && continue 11662d422ce2eSmrg cat /dev/null > conftest.in 11663d422ce2eSmrg lt_ac_count=0 11664d422ce2eSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11665d422ce2eSmrg # Check for GNU sed and select it if it is found. 11666d422ce2eSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11667d422ce2eSmrg lt_cv_path_SED=$lt_ac_sed 11668d422ce2eSmrg break 11669d422ce2eSmrg fi 11670d422ce2eSmrg while true; do 11671d422ce2eSmrg cat conftest.in conftest.in >conftest.tmp 11672d422ce2eSmrg mv conftest.tmp conftest.in 11673d422ce2eSmrg cp conftest.in conftest.nl 11674d422ce2eSmrg echo >>conftest.nl 11675d422ce2eSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11676d422ce2eSmrg cmp -s conftest.out conftest.nl || break 11677d422ce2eSmrg # 10000 chars as input seems more than enough 11678d422ce2eSmrg test 10 -lt "$lt_ac_count" && break 11679d422ce2eSmrg lt_ac_count=`expr $lt_ac_count + 1` 11680d422ce2eSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11681d422ce2eSmrg lt_ac_max=$lt_ac_count 11682d422ce2eSmrg lt_cv_path_SED=$lt_ac_sed 11683fc5a983dSmrg fi 11684fc5a983dSmrg done 11685d422ce2eSmrgdone 11686d422ce2eSmrg]) 11687d422ce2eSmrgSED=$lt_cv_path_SED 11688d422ce2eSmrgAC_SUBST([SED]) 11689d422ce2eSmrgAC_MSG_RESULT([$SED]) 11690d422ce2eSmrg])#AC_PROG_SED 11691d422ce2eSmrg])#m4_ifndef 11692fc5a983dSmrg 11693d422ce2eSmrg# Old name: 11694d422ce2eSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11695d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 11696d422ce2eSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11697d422ce2eSmrg 11698d422ce2eSmrg 11699d422ce2eSmrg# _LT_CHECK_SHELL_FEATURES 11700d422ce2eSmrg# ------------------------ 11701d422ce2eSmrg# Find out whether the shell is Bourne or XSI compatible, 11702d422ce2eSmrg# or has some other useful features. 11703d422ce2eSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11704d422ce2eSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11705d422ce2eSmrg lt_unset=unset 11706fc5a983dSmrgelse 11707d422ce2eSmrg lt_unset=false 11708fc5a983dSmrgfi 11709d422ce2eSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11710d422ce2eSmrg 11711d422ce2eSmrg# test EBCDIC or ASCII 11712d422ce2eSmrgcase `echo X|tr X '\101'` in 11713d422ce2eSmrg A) # ASCII based system 11714d422ce2eSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11715d422ce2eSmrg lt_SP2NL='tr \040 \012' 11716d422ce2eSmrg lt_NL2SP='tr \015\012 \040\040' 11717d422ce2eSmrg ;; 11718d422ce2eSmrg *) # EBCDIC based system 11719d422ce2eSmrg lt_SP2NL='tr \100 \n' 11720d422ce2eSmrg lt_NL2SP='tr \r\n \100\100' 11721d422ce2eSmrg ;; 11722d422ce2eSmrgesac 11723d422ce2eSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11724d422ce2eSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11725d422ce2eSmrg])# _LT_CHECK_SHELL_FEATURES 11726d422ce2eSmrg 11727d422ce2eSmrg 11728d422ce2eSmrg# _LT_PATH_CONVERSION_FUNCTIONS 11729d422ce2eSmrg# ----------------------------- 11730d422ce2eSmrg# Determine what file name conversion functions should be used by 11731d422ce2eSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11732d422ce2eSmrg# for certain cross-compile configurations and native mingw. 11733d422ce2eSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11734d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11735d422ce2eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11736d422ce2eSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11737d422ce2eSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11738d422ce2eSmrg[case $host in 11739d422ce2eSmrg *-*-mingw* ) 11740d422ce2eSmrg case $build in 11741d422ce2eSmrg *-*-mingw* ) # actually msys 11742d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11743d422ce2eSmrg ;; 11744d422ce2eSmrg *-*-cygwin* ) 11745d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11746d422ce2eSmrg ;; 11747d422ce2eSmrg * ) # otherwise, assume *nix 11748d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11749d422ce2eSmrg ;; 11750d422ce2eSmrg esac 11751d422ce2eSmrg ;; 11752d422ce2eSmrg *-*-cygwin* ) 11753d422ce2eSmrg case $build in 11754d422ce2eSmrg *-*-mingw* ) # actually msys 11755d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11756d422ce2eSmrg ;; 11757d422ce2eSmrg *-*-cygwin* ) 11758d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11759d422ce2eSmrg ;; 11760d422ce2eSmrg * ) # otherwise, assume *nix 11761d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11762d422ce2eSmrg ;; 11763d422ce2eSmrg esac 11764d422ce2eSmrg ;; 11765d422ce2eSmrg * ) # unhandled hosts (and "normal" native builds) 11766d422ce2eSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11767d422ce2eSmrg ;; 11768d422ce2eSmrgesac 11769fc5a983dSmrg]) 11770d422ce2eSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11771d422ce2eSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11772d422ce2eSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11773d422ce2eSmrg [0], [convert $build file names to $host format])dnl 11774d422ce2eSmrg 11775d422ce2eSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11776d422ce2eSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11777d422ce2eSmrg[#assume ordinary cross tools, or native build. 11778d422ce2eSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 11779d422ce2eSmrgcase $host in 11780d422ce2eSmrg *-*-mingw* ) 11781d422ce2eSmrg case $build in 11782d422ce2eSmrg *-*-mingw* ) # actually msys 11783d422ce2eSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11784d422ce2eSmrg ;; 11785d422ce2eSmrg esac 11786d422ce2eSmrg ;; 11787d422ce2eSmrgesac 11788fc5a983dSmrg]) 11789d422ce2eSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11790d422ce2eSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11791d422ce2eSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11792d422ce2eSmrg [0], [convert $build files to toolchain format])dnl 11793d422ce2eSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11794d422ce2eSmrg 11795d422ce2eSmrg# Helper functions for option handling. -*- Autoconf -*- 11796d422ce2eSmrg# 11797d422ce2eSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11798d422ce2eSmrg# Software Foundation, Inc. 11799d422ce2eSmrg# Written by Gary V. Vaughan, 2004 11800d422ce2eSmrg# 11801d422ce2eSmrg# This file is free software; the Free Software Foundation gives 11802d422ce2eSmrg# unlimited permission to copy and/or distribute it, with or without 11803d422ce2eSmrg# modifications, as long as this notice is preserved. 11804fc5a983dSmrg 11805d422ce2eSmrg# serial 8 ltoptions.m4 11806fc5a983dSmrg 11807d422ce2eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 11808d422ce2eSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11809d422ce2eSmrg 11810d422ce2eSmrg 11811d422ce2eSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11812d422ce2eSmrg# ------------------------------------------ 11813d422ce2eSmrgm4_define([_LT_MANGLE_OPTION], 11814d422ce2eSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11815d422ce2eSmrg 11816d422ce2eSmrg 11817d422ce2eSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11818d422ce2eSmrg# --------------------------------------- 11819d422ce2eSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11820d422ce2eSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11821d422ce2eSmrg# saved as a flag. 11822d422ce2eSmrgm4_define([_LT_SET_OPTION], 11823d422ce2eSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11824d422ce2eSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11825d422ce2eSmrg _LT_MANGLE_DEFUN([$1], [$2]), 11826d422ce2eSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11827fc5a983dSmrg]) 11828fc5a983dSmrg 11829fc5a983dSmrg 11830d422ce2eSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11831d422ce2eSmrg# ------------------------------------------------------------ 11832d422ce2eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11833d422ce2eSmrgm4_define([_LT_IF_OPTION], 11834d422ce2eSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11835d422ce2eSmrg 11836d422ce2eSmrg 11837d422ce2eSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11838d422ce2eSmrg# ------------------------------------------------------- 11839d422ce2eSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11840d422ce2eSmrg# are set. 11841d422ce2eSmrgm4_define([_LT_UNLESS_OPTIONS], 11842d422ce2eSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11843d422ce2eSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11844d422ce2eSmrg [m4_define([$0_found])])])[]dnl 11845d422ce2eSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11846d422ce2eSmrg])[]dnl 11847fc5a983dSmrg]) 11848fc5a983dSmrg 11849fc5a983dSmrg 11850d422ce2eSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11851d422ce2eSmrg# ---------------------------------------- 11852d422ce2eSmrg# OPTION-LIST is a space-separated list of Libtool options associated 11853d422ce2eSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11854d422ce2eSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11855d422ce2eSmrg# the unknown option and exit. 11856d422ce2eSmrgm4_defun([_LT_SET_OPTIONS], 11857d422ce2eSmrg[# Set options 11858d422ce2eSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11859d422ce2eSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 11860fc5a983dSmrg 11861d422ce2eSmrgm4_if([$1],[LT_INIT],[ 11862d422ce2eSmrg dnl 11863d422ce2eSmrg dnl Simply set some default values (i.e off) if boolean options were not 11864d422ce2eSmrg dnl specified: 11865d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11866d422ce2eSmrg ]) 11867d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11868d422ce2eSmrg ]) 11869d422ce2eSmrg dnl 11870d422ce2eSmrg dnl If no reference was made to various pairs of opposing options, then 11871d422ce2eSmrg dnl we run the default mode handler for the pair. For example, if neither 11872d422ce2eSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11873d422ce2eSmrg dnl archives by default: 11874d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11875d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11876d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11877d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11878d422ce2eSmrg [_LT_ENABLE_FAST_INSTALL]) 11879d422ce2eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11880d422ce2eSmrg [_LT_WITH_AIX_SONAME([aix])]) 11881d422ce2eSmrg ]) 11882d422ce2eSmrg])# _LT_SET_OPTIONS 11883fc5a983dSmrg 11884fc5a983dSmrg 11885fc5a983dSmrg 11886d422ce2eSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11887d422ce2eSmrg# ----------------------------------------- 11888d422ce2eSmrgm4_define([_LT_MANGLE_DEFUN], 11889d422ce2eSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11890d422ce2eSmrg 11891d422ce2eSmrg 11892d422ce2eSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11893d422ce2eSmrg# ----------------------------------------------- 11894d422ce2eSmrgm4_define([LT_OPTION_DEFINE], 11895d422ce2eSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11896d422ce2eSmrg])# LT_OPTION_DEFINE 11897d422ce2eSmrg 11898d422ce2eSmrg 11899d422ce2eSmrg# dlopen 11900d422ce2eSmrg# ------ 11901d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11902fc5a983dSmrg]) 11903fc5a983dSmrg 11904d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11905d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11906d422ce2eSmrgAC_DIAGNOSE([obsolete], 11907d422ce2eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11908d422ce2eSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 11909d422ce2eSmrg]) 11910fc5a983dSmrg 11911d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 11912d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11913fc5a983dSmrg 11914fc5a983dSmrg 11915d422ce2eSmrg# win32-dll 11916d422ce2eSmrg# --------- 11917d422ce2eSmrg# Declare package support for building win32 dll's. 11918d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11919d422ce2eSmrg[enable_win32_dll=yes 11920d422ce2eSmrg 11921d422ce2eSmrgcase $host in 11922d422ce2eSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11923d422ce2eSmrg AC_CHECK_TOOL(AS, as, false) 11924d422ce2eSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11925d422ce2eSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11926d422ce2eSmrg ;; 11927d422ce2eSmrgesac 11928d422ce2eSmrg 11929d422ce2eSmrgtest -z "$AS" && AS=as 11930d422ce2eSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11931d422ce2eSmrg 11932d422ce2eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11933d422ce2eSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11934d422ce2eSmrg 11935d422ce2eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11936d422ce2eSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11937d422ce2eSmrg])# win32-dll 11938d422ce2eSmrg 11939d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11940d422ce2eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11941d422ce2eSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11942d422ce2eSmrgAC_DIAGNOSE([obsolete], 11943d422ce2eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11944d422ce2eSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 119456257f37dSmrg]) 119466257f37dSmrg 11947d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 11948d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11949d422ce2eSmrg 11950d422ce2eSmrg 11951d422ce2eSmrg# _LT_ENABLE_SHARED([DEFAULT]) 11952d422ce2eSmrg# ---------------------------- 11953d422ce2eSmrg# implement the --enable-shared flag, and supports the 'shared' and 11954d422ce2eSmrg# 'disable-shared' LT_INIT options. 11955d422ce2eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11956d422ce2eSmrgm4_define([_LT_ENABLE_SHARED], 11957d422ce2eSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11958d422ce2eSmrgAC_ARG_ENABLE([shared], 11959d422ce2eSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11960d422ce2eSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11961d422ce2eSmrg [p=${PACKAGE-default} 11962d422ce2eSmrg case $enableval in 11963d422ce2eSmrg yes) enable_shared=yes ;; 11964d422ce2eSmrg no) enable_shared=no ;; 11965d422ce2eSmrg *) 11966d422ce2eSmrg enable_shared=no 11967d422ce2eSmrg # Look at the argument we got. We use all the common list separators. 11968d422ce2eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11969d422ce2eSmrg for pkg in $enableval; do 11970d422ce2eSmrg IFS=$lt_save_ifs 11971d422ce2eSmrg if test "X$pkg" = "X$p"; then 11972d422ce2eSmrg enable_shared=yes 11973d422ce2eSmrg fi 11974d422ce2eSmrg done 11975d422ce2eSmrg IFS=$lt_save_ifs 11976d422ce2eSmrg ;; 11977d422ce2eSmrg esac], 11978d422ce2eSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11979fc5a983dSmrg 11980d422ce2eSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11981d422ce2eSmrg [Whether or not to build shared libraries]) 11982d422ce2eSmrg])# _LT_ENABLE_SHARED 11983fc5a983dSmrg 11984d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11985d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11986fc5a983dSmrg 11987d422ce2eSmrg# Old names: 11988d422ce2eSmrgAC_DEFUN([AC_ENABLE_SHARED], 11989d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11990d422ce2eSmrg]) 11991fc5a983dSmrg 11992d422ce2eSmrgAC_DEFUN([AC_DISABLE_SHARED], 11993d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11994fc5a983dSmrg]) 119956257f37dSmrg 11996d422ce2eSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11997d422ce2eSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 119986257f37dSmrg 11999d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 12000d422ce2eSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 12001d422ce2eSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 120026257f37dSmrg 120036257f37dSmrg 120046257f37dSmrg 12005d422ce2eSmrg# _LT_ENABLE_STATIC([DEFAULT]) 12006d422ce2eSmrg# ---------------------------- 12007d422ce2eSmrg# implement the --enable-static flag, and support the 'static' and 12008d422ce2eSmrg# 'disable-static' LT_INIT options. 12009d422ce2eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12010d422ce2eSmrgm4_define([_LT_ENABLE_STATIC], 12011d422ce2eSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12012d422ce2eSmrgAC_ARG_ENABLE([static], 12013d422ce2eSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12014d422ce2eSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12015d422ce2eSmrg [p=${PACKAGE-default} 12016d422ce2eSmrg case $enableval in 12017d422ce2eSmrg yes) enable_static=yes ;; 12018d422ce2eSmrg no) enable_static=no ;; 12019d422ce2eSmrg *) 12020d422ce2eSmrg enable_static=no 12021d422ce2eSmrg # Look at the argument we got. We use all the common list separators. 12022d422ce2eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12023d422ce2eSmrg for pkg in $enableval; do 12024d422ce2eSmrg IFS=$lt_save_ifs 12025d422ce2eSmrg if test "X$pkg" = "X$p"; then 12026d422ce2eSmrg enable_static=yes 12027d422ce2eSmrg fi 12028d422ce2eSmrg done 12029d422ce2eSmrg IFS=$lt_save_ifs 12030d422ce2eSmrg ;; 12031d422ce2eSmrg esac], 12032d422ce2eSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 120336257f37dSmrg 12034d422ce2eSmrg _LT_DECL([build_old_libs], [enable_static], [0], 12035d422ce2eSmrg [Whether or not to build static libraries]) 12036d422ce2eSmrg])# _LT_ENABLE_STATIC 120376257f37dSmrg 12038d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12039d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12040d422ce2eSmrg 12041d422ce2eSmrg# Old names: 12042d422ce2eSmrgAC_DEFUN([AC_ENABLE_STATIC], 12043d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12044fc5a983dSmrg]) 12045fc5a983dSmrg 12046d422ce2eSmrgAC_DEFUN([AC_DISABLE_STATIC], 12047d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 12048d422ce2eSmrg]) 1204971ba42d0Smrg 12050d422ce2eSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12051d422ce2eSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12052fc5a983dSmrg 12053d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 12054d422ce2eSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 12055d422ce2eSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 12056fc5a983dSmrg 12057fc5a983dSmrg 12058fc5a983dSmrg 12059d422ce2eSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12060d422ce2eSmrg# ---------------------------------- 12061d422ce2eSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 12062d422ce2eSmrg# and 'disable-fast-install' LT_INIT options. 12063d422ce2eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12064d422ce2eSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 12065d422ce2eSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12066d422ce2eSmrgAC_ARG_ENABLE([fast-install], 12067d422ce2eSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12068d422ce2eSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12069d422ce2eSmrg [p=${PACKAGE-default} 12070d422ce2eSmrg case $enableval in 12071d422ce2eSmrg yes) enable_fast_install=yes ;; 12072d422ce2eSmrg no) enable_fast_install=no ;; 12073d422ce2eSmrg *) 12074d422ce2eSmrg enable_fast_install=no 12075d422ce2eSmrg # Look at the argument we got. We use all the common list separators. 12076d422ce2eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12077d422ce2eSmrg for pkg in $enableval; do 12078d422ce2eSmrg IFS=$lt_save_ifs 12079d422ce2eSmrg if test "X$pkg" = "X$p"; then 12080d422ce2eSmrg enable_fast_install=yes 12081d422ce2eSmrg fi 12082d422ce2eSmrg done 12083d422ce2eSmrg IFS=$lt_save_ifs 12084d422ce2eSmrg ;; 12085d422ce2eSmrg esac], 12086d422ce2eSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12087fc5a983dSmrg 12088d422ce2eSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 12089d422ce2eSmrg [Whether or not to optimize for fast installation])dnl 12090d422ce2eSmrg])# _LT_ENABLE_FAST_INSTALL 12091fc5a983dSmrg 12092d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12093d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12094fc5a983dSmrg 12095d422ce2eSmrg# Old names: 12096d422ce2eSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12097d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12098d422ce2eSmrgAC_DIAGNOSE([obsolete], 12099d422ce2eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12100d422ce2eSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 12101d422ce2eSmrg]) 12102fc5a983dSmrg 12103d422ce2eSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12104d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12105d422ce2eSmrgAC_DIAGNOSE([obsolete], 12106d422ce2eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12107d422ce2eSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12108d422ce2eSmrg]) 12109fc5a983dSmrg 12110d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 12111d422ce2eSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12112d422ce2eSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12113fc5a983dSmrg 12114fc5a983dSmrg 12115d422ce2eSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12116d422ce2eSmrg# ---------------------------------- 12117d422ce2eSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12118d422ce2eSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12119d422ce2eSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12120d422ce2eSmrgm4_define([_LT_WITH_AIX_SONAME], 12121d422ce2eSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12122d422ce2eSmrgshared_archive_member_spec= 12123d422ce2eSmrgcase $host,$enable_shared in 12124d422ce2eSmrgpower*-*-aix[[5-9]]*,yes) 12125d422ce2eSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12126d422ce2eSmrg AC_ARG_WITH([aix-soname], 12127d422ce2eSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12128d422ce2eSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12129d422ce2eSmrg [case $withval in 12130d422ce2eSmrg aix|svr4|both) 12131d422ce2eSmrg ;; 12132d422ce2eSmrg *) 12133d422ce2eSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12134d422ce2eSmrg ;; 12135d422ce2eSmrg esac 12136d422ce2eSmrg lt_cv_with_aix_soname=$with_aix_soname], 12137d422ce2eSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12138d422ce2eSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12139d422ce2eSmrg with_aix_soname=$lt_cv_with_aix_soname]) 12140d422ce2eSmrg AC_MSG_RESULT([$with_aix_soname]) 12141d422ce2eSmrg if test aix != "$with_aix_soname"; then 12142d422ce2eSmrg # For the AIX way of multilib, we name the shared archive member 12143d422ce2eSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12144d422ce2eSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12145d422ce2eSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12146d422ce2eSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12147d422ce2eSmrg if test 64 = "${OBJECT_MODE-32}"; then 12148d422ce2eSmrg shared_archive_member_spec=shr_64 12149d422ce2eSmrg else 12150d422ce2eSmrg shared_archive_member_spec=shr 12151d422ce2eSmrg fi 12152d422ce2eSmrg fi 12153d422ce2eSmrg ;; 12154d422ce2eSmrg*) 12155d422ce2eSmrg with_aix_soname=aix 1215671ba42d0Smrg ;; 1215771ba42d0Smrgesac 12158fc5a983dSmrg 12159d422ce2eSmrg_LT_DECL([], [shared_archive_member_spec], [0], 12160d422ce2eSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12161d422ce2eSmrg])# _LT_WITH_AIX_SONAME 12162fc5a983dSmrg 12163d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12164d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12165d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12166fc5a983dSmrg 12167fc5a983dSmrg 12168d422ce2eSmrg# _LT_WITH_PIC([MODE]) 12169d422ce2eSmrg# -------------------- 12170d422ce2eSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12171d422ce2eSmrg# LT_INIT options. 12172d422ce2eSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12173d422ce2eSmrgm4_define([_LT_WITH_PIC], 12174d422ce2eSmrg[AC_ARG_WITH([pic], 12175d422ce2eSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12176d422ce2eSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12177d422ce2eSmrg [lt_p=${PACKAGE-default} 12178d422ce2eSmrg case $withval in 12179d422ce2eSmrg yes|no) pic_mode=$withval ;; 12180d422ce2eSmrg *) 12181d422ce2eSmrg pic_mode=default 12182d422ce2eSmrg # Look at the argument we got. We use all the common list separators. 12183d422ce2eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12184d422ce2eSmrg for lt_pkg in $withval; do 12185d422ce2eSmrg IFS=$lt_save_ifs 12186d422ce2eSmrg if test "X$lt_pkg" = "X$lt_p"; then 12187d422ce2eSmrg pic_mode=yes 12188d422ce2eSmrg fi 12189d422ce2eSmrg done 12190d422ce2eSmrg IFS=$lt_save_ifs 12191d422ce2eSmrg ;; 12192d422ce2eSmrg esac], 12193d422ce2eSmrg [pic_mode=m4_default([$1], [default])]) 12194fc5a983dSmrg 12195d422ce2eSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12196d422ce2eSmrg])# _LT_WITH_PIC 12197fc5a983dSmrg 12198d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12199d422ce2eSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12200fc5a983dSmrg 12201d422ce2eSmrg# Old name: 12202d422ce2eSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12203d422ce2eSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12204d422ce2eSmrgAC_DIAGNOSE([obsolete], 12205d422ce2eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12206d422ce2eSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 12207d422ce2eSmrg]) 12208fc5a983dSmrg 12209d422ce2eSmrgdnl aclocal-1.4 backwards compatibility: 12210d422ce2eSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12211fc5a983dSmrg 122126257f37dSmrg 12213d422ce2eSmrgm4_define([_LTDL_MODE], []) 12214d422ce2eSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12215d422ce2eSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12216d422ce2eSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12217d422ce2eSmrg [m4_define([_LTDL_MODE], [recursive])]) 12218d422ce2eSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12219d422ce2eSmrg [m4_define([_LTDL_MODE], [subproject])]) 122206257f37dSmrg 12221d422ce2eSmrgm4_define([_LTDL_TYPE], []) 12222d422ce2eSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12223d422ce2eSmrg [m4_define([_LTDL_TYPE], [installable])]) 12224d422ce2eSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12225d422ce2eSmrg [m4_define([_LTDL_TYPE], [convenience])]) 12226fc5a983dSmrg 12227d422ce2eSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12228fc5a983dSmrg# 12229d422ce2eSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12230d422ce2eSmrg# Foundation, Inc. 12231d422ce2eSmrg# Written by Gary V. Vaughan, 2004 12232d422ce2eSmrg# 12233d422ce2eSmrg# This file is free software; the Free Software Foundation gives 12234d422ce2eSmrg# unlimited permission to copy and/or distribute it, with or without 12235d422ce2eSmrg# modifications, as long as this notice is preserved. 12236fc5a983dSmrg 12237d422ce2eSmrg# serial 6 ltsugar.m4 122386257f37dSmrg 12239d422ce2eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12240d422ce2eSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 122416257f37dSmrg 12242fc5a983dSmrg 12243d422ce2eSmrg# lt_join(SEP, ARG1, [ARG2...]) 12244d422ce2eSmrg# ----------------------------- 12245d422ce2eSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12246d422ce2eSmrg# associated separator. 12247d422ce2eSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12248d422ce2eSmrg# versions in m4sugar had bugs. 12249d422ce2eSmrgm4_define([lt_join], 12250d422ce2eSmrg[m4_if([$#], [1], [], 12251d422ce2eSmrg [$#], [2], [[$2]], 12252d422ce2eSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12253d422ce2eSmrgm4_define([_lt_join], 12254d422ce2eSmrg[m4_if([$#$2], [2], [], 12255d422ce2eSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 1225671ba42d0Smrg 122576257f37dSmrg 12258d422ce2eSmrg# lt_car(LIST) 12259d422ce2eSmrg# lt_cdr(LIST) 12260d422ce2eSmrg# ------------ 12261d422ce2eSmrg# Manipulate m4 lists. 12262d422ce2eSmrg# These macros are necessary as long as will still need to support 12263d422ce2eSmrg# Autoconf-2.59, which quotes differently. 12264d422ce2eSmrgm4_define([lt_car], [[$1]]) 12265d422ce2eSmrgm4_define([lt_cdr], 12266d422ce2eSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12267d422ce2eSmrg [$#], 1, [], 12268d422ce2eSmrg [m4_dquote(m4_shift($@))])]) 12269d422ce2eSmrgm4_define([lt_unquote], $1) 12270d422ce2eSmrg 12271fc5a983dSmrg 12272d422ce2eSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12273d422ce2eSmrg# ------------------------------------------ 12274d422ce2eSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12275d422ce2eSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12276d422ce2eSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12277d422ce2eSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12278d422ce2eSmrg# than defined and empty). 1227971ba42d0Smrg# 12280d422ce2eSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12281d422ce2eSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12282d422ce2eSmrgm4_define([lt_append], 12283d422ce2eSmrg[m4_define([$1], 12284d422ce2eSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 1228571ba42d0Smrg 1228671ba42d0Smrg 12287fc5a983dSmrg 12288d422ce2eSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12289d422ce2eSmrg# ---------------------------------------------------------- 12290d422ce2eSmrg# Produce a SEP delimited list of all paired combinations of elements of 12291d422ce2eSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12292d422ce2eSmrg# has the form PREFIXmINFIXSUFFIXn. 12293d422ce2eSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12294d422ce2eSmrgm4_define([lt_combine], 12295d422ce2eSmrg[m4_if(m4_eval([$# > 3]), [1], 12296d422ce2eSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12297d422ce2eSmrg[[m4_foreach([_Lt_prefix], [$2], 12298d422ce2eSmrg [m4_foreach([_Lt_suffix], 12299d422ce2eSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12300d422ce2eSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12301d422ce2eSmrg 12302d422ce2eSmrg 12303d422ce2eSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12304d422ce2eSmrg# ----------------------------------------------------------------------- 12305d422ce2eSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12306d422ce2eSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12307d422ce2eSmrgm4_define([lt_if_append_uniq], 12308d422ce2eSmrg[m4_ifdef([$1], 12309d422ce2eSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12310d422ce2eSmrg [lt_append([$1], [$2], [$3])$4], 12311d422ce2eSmrg [$5])], 12312d422ce2eSmrg [lt_append([$1], [$2], [$3])$4])]) 12313d422ce2eSmrg 12314d422ce2eSmrg 12315d422ce2eSmrg# lt_dict_add(DICT, KEY, VALUE) 12316d422ce2eSmrg# ----------------------------- 12317d422ce2eSmrgm4_define([lt_dict_add], 12318d422ce2eSmrg[m4_define([$1($2)], [$3])]) 12319fc5a983dSmrg 12320fc5a983dSmrg 12321d422ce2eSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12322d422ce2eSmrg# -------------------------------------------- 12323d422ce2eSmrgm4_define([lt_dict_add_subkey], 12324d422ce2eSmrg[m4_define([$1($2:$3)], [$4])]) 12325fc5a983dSmrg 1232671ba42d0Smrg 12327d422ce2eSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12328d422ce2eSmrg# ---------------------------------- 12329d422ce2eSmrgm4_define([lt_dict_fetch], 12330d422ce2eSmrg[m4_ifval([$3], 12331d422ce2eSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12332d422ce2eSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12333fc5a983dSmrg 12334fc5a983dSmrg 12335d422ce2eSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12336d422ce2eSmrg# ----------------------------------------------------------------- 12337d422ce2eSmrgm4_define([lt_if_dict_fetch], 12338d422ce2eSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12339d422ce2eSmrg [$5], 12340d422ce2eSmrg [$6])]) 123416257f37dSmrg 12342fc5a983dSmrg 12343d422ce2eSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12344d422ce2eSmrg# -------------------------------------------------------------- 12345d422ce2eSmrgm4_define([lt_dict_filter], 12346d422ce2eSmrg[m4_if([$5], [], [], 12347d422ce2eSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12348d422ce2eSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12349d422ce2eSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12350d422ce2eSmrg]) 123516257f37dSmrg 12352d422ce2eSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12353d422ce2eSmrg# 12354d422ce2eSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12355d422ce2eSmrg# Inc. 12356d422ce2eSmrg# Written by Scott James Remnant, 2004 12357d422ce2eSmrg# 12358d422ce2eSmrg# This file is free software; the Free Software Foundation gives 12359d422ce2eSmrg# unlimited permission to copy and/or distribute it, with or without 12360d422ce2eSmrg# modifications, as long as this notice is preserved. 12361fc5a983dSmrg 12362d422ce2eSmrg# @configure_input@ 123636257f37dSmrg 12364d422ce2eSmrg# serial 4245 ltversion.m4 12365d422ce2eSmrg# This file is part of GNU Libtool 123666257f37dSmrg 12367d422ce2eSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12368d422ce2eSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 123696257f37dSmrg 12370d422ce2eSmrgAC_DEFUN([LTVERSION_VERSION], 12371d422ce2eSmrg[macro_version='2.4.7' 12372d422ce2eSmrgmacro_revision='2.4.7' 12373d422ce2eSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12374d422ce2eSmrg_LT_DECL(, macro_revision, 0) 12375d422ce2eSmrg]) 123766257f37dSmrg 12377d422ce2eSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12378d422ce2eSmrg# 12379d422ce2eSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12380d422ce2eSmrg# Software Foundation, Inc. 12381d422ce2eSmrg# Written by Scott James Remnant, 2004. 12382d422ce2eSmrg# 12383d422ce2eSmrg# This file is free software; the Free Software Foundation gives 12384d422ce2eSmrg# unlimited permission to copy and/or distribute it, with or without 12385d422ce2eSmrg# modifications, as long as this notice is preserved. 123866257f37dSmrg 12387d422ce2eSmrg# serial 5 lt~obsolete.m4 123886257f37dSmrg 12389d422ce2eSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 12390d422ce2eSmrg# 12391d422ce2eSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12392d422ce2eSmrg# which have later been changed to m4_define as they aren't part of the 12393d422ce2eSmrg# exported API, or moved to Autoconf or Automake where they belong. 12394d422ce2eSmrg# 12395d422ce2eSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12396d422ce2eSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12397d422ce2eSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 12398d422ce2eSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12399d422ce2eSmrg# and doesn't know about Autoconf macros at all.) 12400d422ce2eSmrg# 12401d422ce2eSmrg# So we provide this file, which has a silly filename so it's always 12402d422ce2eSmrg# included after everything else. This provides aclocal with the 12403d422ce2eSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12404d422ce2eSmrg# because those macros already exist, or will be overwritten later. 12405d422ce2eSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12406d422ce2eSmrg# 12407d422ce2eSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12408d422ce2eSmrg# Yes, that means every name once taken will need to remain here until 12409d422ce2eSmrg# we give up compatibility with versions before 1.7, at which point 12410d422ce2eSmrg# we need to keep only those names which we still refer to. 12411fc5a983dSmrg 12412d422ce2eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12413d422ce2eSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 124146257f37dSmrg 12415d422ce2eSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12416d422ce2eSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12417d422ce2eSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12418d422ce2eSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12419d422ce2eSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12420d422ce2eSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12421d422ce2eSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12422d422ce2eSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12423d422ce2eSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12424d422ce2eSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12425d422ce2eSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12426d422ce2eSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12427d422ce2eSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12428d422ce2eSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12429d422ce2eSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12430d422ce2eSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12431d422ce2eSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12432d422ce2eSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12433d422ce2eSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12434d422ce2eSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12435d422ce2eSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12436d422ce2eSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12437d422ce2eSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12438d422ce2eSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12439d422ce2eSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12440d422ce2eSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12441d422ce2eSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12442d422ce2eSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12443d422ce2eSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12444d422ce2eSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12445d422ce2eSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12446d422ce2eSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12447d422ce2eSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12448d422ce2eSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12449d422ce2eSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12450d422ce2eSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12451d422ce2eSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12452d422ce2eSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12453d422ce2eSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12454d422ce2eSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12455d422ce2eSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12456d422ce2eSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12457d422ce2eSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12458d422ce2eSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12459d422ce2eSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12460d422ce2eSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12461d422ce2eSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12462d422ce2eSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12463d422ce2eSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12464d422ce2eSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12465d422ce2eSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12466d422ce2eSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12467d422ce2eSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12468d422ce2eSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12469d422ce2eSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12470d422ce2eSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12471d422ce2eSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12472d422ce2eSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12473d422ce2eSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12474d422ce2eSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12475d422ce2eSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12476fc5a983dSmrg 12477