aclocal.m4 revision 1bedbe3f
11bedbe3fSmrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*- 21bedbe3fSmrg 31bedbe3fSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4ba6a1819Smrg 5ba6a1819Smrg# This file is free software; the Free Software Foundation 6ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 7ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 8ba6a1819Smrg 9ba6a1819Smrg# This program is distributed in the hope that it will be useful, 10ba6a1819Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ba6a1819Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ba6a1819Smrg# PARTICULAR PURPOSE. 13ba6a1819Smrg 141bedbe3fSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15549e21daSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16549e21daSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17549e21daSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18549e21daSmrg[m4_warning([this file was generated for autoconf 2.68. 19549e21daSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20549e21daSmrgIf you have problems, you may need to regenerate the build system entirely. 211bedbe3fSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ba6a1819Smrg 231bedbe3fSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24549e21daSmrg# 25549e21daSmrg# This file is free software; the Free Software Foundation 26549e21daSmrg# gives unlimited permission to copy and/or distribute it, 27549e21daSmrg# with or without modifications, as long as this notice is preserved. 282d8abe4fSmrg 29549e21daSmrg# AM_AUTOMAKE_VERSION(VERSION) 30549e21daSmrg# ---------------------------- 31549e21daSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32549e21daSmrg# generated from the m4 files accompanying Automake X.Y. 33549e21daSmrg# (This private macro should not be called outside this file.) 34549e21daSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 351bedbe3fSmrg[am__api_version='1.13' 36549e21daSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37549e21daSmrgdnl require some minimum version. Point them to the right macro. 381bedbe3fSmrgm4_if([$1], [1.13.2], [], 39549e21daSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40549e21daSmrg]) 41549e21daSmrg 42549e21daSmrg# _AM_AUTOCONF_VERSION(VERSION) 43549e21daSmrg# ----------------------------- 44549e21daSmrg# aclocal traces this macro to find the Autoconf version. 45549e21daSmrg# This is a private macro too. Using m4_define simplifies 46549e21daSmrg# the logic in aclocal, which can simply ignore this definition. 47549e21daSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48549e21daSmrg 49549e21daSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50549e21daSmrg# ------------------------------- 51549e21daSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52549e21daSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53549e21daSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 541bedbe3fSmrg[AM_AUTOMAKE_VERSION([1.13.2])dnl 55549e21daSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56549e21daSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57549e21daSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58549e21daSmrg 59549e21daSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60549e21daSmrg 611bedbe3fSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 622d8abe4fSmrg# 63549e21daSmrg# This file is free software; the Free Software Foundation 64549e21daSmrg# gives unlimited permission to copy and/or distribute it, 65549e21daSmrg# with or without modifications, as long as this notice is preserved. 66549e21daSmrg 67549e21daSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 681bedbe3fSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 691bedbe3fSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70549e21daSmrg# 71549e21daSmrg# Of course, Automake must honor this variable whenever it calls a 72549e21daSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73549e21daSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74549e21daSmrg# depending on how configure is run. This is pretty annoying, since 75549e21daSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76549e21daSmrg# source directory, any form will work fine, but in subdirectories a 77549e21daSmrg# relative path needs to be adjusted first. 782d8abe4fSmrg# 79549e21daSmrg# $ac_aux_dir/missing 80549e21daSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81549e21daSmrg# $top_srcdir/$ac_aux_dir/missing 82549e21daSmrg# fails if $ac_aux_dir is absolute, 83549e21daSmrg# fails when called from a subdirectory in a VPATH build with 84549e21daSmrg# a relative $ac_aux_dir 852d8abe4fSmrg# 86549e21daSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87549e21daSmrg# are both prefixed by $srcdir. In an in-source build this is usually 881bedbe3fSmrg# harmless because $srcdir is '.', but things will broke when you 89549e21daSmrg# start a VPATH build or use an absolute $srcdir. 902d8abe4fSmrg# 91549e21daSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92549e21daSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93549e21daSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94549e21daSmrg# and then we would define $MISSING as 95549e21daSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96549e21daSmrg# This will work as long as MISSING is not called from configure, because 97549e21daSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98549e21daSmrg# However there are other variables, like CC, which are often used in 99549e21daSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1002d8abe4fSmrg# 101549e21daSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102549e21daSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103549e21daSmrg# configured tree to be moved without reconfiguration. 1042d8abe4fSmrg 105549e21daSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106549e21daSmrg[dnl Rely on autoconf to set up CDPATH properly. 107549e21daSmrgAC_PREREQ([2.50])dnl 108549e21daSmrg# expand $ac_aux_dir to an absolute path 109549e21daSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 110549e21daSmrg]) 1112d8abe4fSmrg 112549e21daSmrg# AM_CONDITIONAL -*- Autoconf -*- 1132d8abe4fSmrg 1141bedbe3fSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1152d8abe4fSmrg# 116549e21daSmrg# This file is free software; the Free Software Foundation 117549e21daSmrg# gives unlimited permission to copy and/or distribute it, 118549e21daSmrg# with or without modifications, as long as this notice is preserved. 1192d8abe4fSmrg 120549e21daSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 121549e21daSmrg# ------------------------------------- 122549e21daSmrg# Define a conditional. 123549e21daSmrgAC_DEFUN([AM_CONDITIONAL], 1241bedbe3fSmrg[AC_PREREQ([2.52])dnl 1251bedbe3fSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1261bedbe3fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 127549e21daSmrgAC_SUBST([$1_TRUE])dnl 128549e21daSmrgAC_SUBST([$1_FALSE])dnl 129549e21daSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 130549e21daSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 131549e21daSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 132549e21daSmrgif $2; then 133549e21daSmrg $1_TRUE= 134549e21daSmrg $1_FALSE='#' 135549e21daSmrgelse 136549e21daSmrg $1_TRUE='#' 137549e21daSmrg $1_FALSE= 1382d8abe4fSmrgfi 139549e21daSmrgAC_CONFIG_COMMANDS_PRE( 140549e21daSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 141549e21daSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 142549e21daSmrgUsually this means the macro was only invoked conditionally.]]) 143549e21daSmrgfi])]) 1442d8abe4fSmrg 1451bedbe3fSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 146549e21daSmrg# 147549e21daSmrg# This file is free software; the Free Software Foundation 148549e21daSmrg# gives unlimited permission to copy and/or distribute it, 149549e21daSmrg# with or without modifications, as long as this notice is preserved. 1502d8abe4fSmrg 1512d8abe4fSmrg 1521bedbe3fSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 153549e21daSmrg# written in clear, in which case automake, when reading aclocal.m4, 154549e21daSmrg# will think it sees a *use*, and therefore will trigger all it's 155549e21daSmrg# C support machinery. Also note that it means that autoscan, seeing 156549e21daSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1572d8abe4fSmrg 1582d8abe4fSmrg 159549e21daSmrg# _AM_DEPENDENCIES(NAME) 160549e21daSmrg# ---------------------- 161549e21daSmrg# See how the compiler implements dependency checking. 1621bedbe3fSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 163549e21daSmrg# We try a few techniques and use that to set a single cache variable. 164549e21daSmrg# 165549e21daSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 166549e21daSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 167549e21daSmrg# dependency, and given that the user is not expected to run this macro, 168549e21daSmrg# just rely on AC_PROG_CC. 169549e21daSmrgAC_DEFUN([_AM_DEPENDENCIES], 170549e21daSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 171549e21daSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 172549e21daSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 173549e21daSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1742d8abe4fSmrg 1751bedbe3fSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1761bedbe3fSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1771bedbe3fSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1781bedbe3fSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1791bedbe3fSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1801bedbe3fSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1811bedbe3fSmrg [depcc="$$1" am_compiler_list=]) 1822d8abe4fSmrg 183549e21daSmrgAC_CACHE_CHECK([dependency style of $depcc], 184549e21daSmrg [am_cv_$1_dependencies_compiler_type], 185549e21daSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 186549e21daSmrg # We make a subdir and do the tests there. Otherwise we can end up 187549e21daSmrg # making bogus files that we don't know about and never remove. For 188549e21daSmrg # instance it was reported that on HP-UX the gcc test will end up 1891bedbe3fSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1901bedbe3fSmrg # in D". 1911bedbe3fSmrg rm -rf conftest.dir 192549e21daSmrg mkdir conftest.dir 193549e21daSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 194549e21daSmrg # using a relative directory. 195549e21daSmrg cp "$am_depcomp" conftest.dir 196549e21daSmrg cd conftest.dir 197549e21daSmrg # We will build objects and dependencies in a subdirectory because 198549e21daSmrg # it helps to detect inapplicable dependency modes. For instance 199549e21daSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 200549e21daSmrg # side effect of compilation, but ICC will put the dependencies in 201549e21daSmrg # the current directory while Tru64 will put them in the object 202549e21daSmrg # directory. 203549e21daSmrg mkdir sub 2042d8abe4fSmrg 205549e21daSmrg am_cv_$1_dependencies_compiler_type=none 206549e21daSmrg if test "$am_compiler_list" = ""; then 207549e21daSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208549e21daSmrg fi 209549e21daSmrg am__universal=false 210549e21daSmrg m4_case([$1], [CC], 211549e21daSmrg [case " $depcc " in #( 212549e21daSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 213549e21daSmrg esac], 214549e21daSmrg [CXX], 215549e21daSmrg [case " $depcc " in #( 216549e21daSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 217549e21daSmrg esac]) 2182d8abe4fSmrg 219549e21daSmrg for depmode in $am_compiler_list; do 220549e21daSmrg # Setup a source with many dependencies, because some compilers 221549e21daSmrg # like to wrap large dependency lists on column 80 (with \), and 222549e21daSmrg # we should not choose a depcomp mode which is confused by this. 223549e21daSmrg # 224549e21daSmrg # We need to recreate these files for each test, as the compiler may 225549e21daSmrg # overwrite some of them when testing with obscure command lines. 226549e21daSmrg # This happens at least with the AIX C compiler. 227549e21daSmrg : > sub/conftest.c 228549e21daSmrg for i in 1 2 3 4 5 6; do 229549e21daSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2301bedbe3fSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2311bedbe3fSmrg # Solaris 10 /bin/sh. 2321bedbe3fSmrg echo '/* dummy */' > sub/conftst$i.h 233549e21daSmrg done 234549e21daSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2352d8abe4fSmrg 2361bedbe3fSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 237549e21daSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2381bedbe3fSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2391bedbe3fSmrg # versions had trouble with output in subdirs. 240549e21daSmrg am__obj=sub/conftest.${OBJEXT-o} 241549e21daSmrg am__minus_obj="-o $am__obj" 242549e21daSmrg case $depmode in 243549e21daSmrg gcc) 244549e21daSmrg # This depmode causes a compiler race in universal mode. 245549e21daSmrg test "$am__universal" = false || continue 246549e21daSmrg ;; 247549e21daSmrg nosideeffect) 2481bedbe3fSmrg # After this tag, mechanisms are not by side-effect, so they'll 2491bedbe3fSmrg # only be used when explicitly requested. 250549e21daSmrg if test "x$enable_dependency_tracking" = xyes; then 251549e21daSmrg continue 252549e21daSmrg else 253549e21daSmrg break 254549e21daSmrg fi 255549e21daSmrg ;; 2561bedbe3fSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2571bedbe3fSmrg # This compiler won't grok '-c -o', but also, the minuso test has 258549e21daSmrg # not run yet. These depmodes are late enough in the game, and 259549e21daSmrg # so weak that their functioning should not be impacted. 260549e21daSmrg am__obj=conftest.${OBJEXT-o} 261549e21daSmrg am__minus_obj= 262549e21daSmrg ;; 263549e21daSmrg none) break ;; 264549e21daSmrg esac 265549e21daSmrg if depmode=$depmode \ 266549e21daSmrg source=sub/conftest.c object=$am__obj \ 267549e21daSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 268549e21daSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 269549e21daSmrg >/dev/null 2>conftest.err && 270549e21daSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 271549e21daSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 272549e21daSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 273549e21daSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 274549e21daSmrg # icc doesn't choke on unknown options, it will just issue warnings 275549e21daSmrg # or remarks (even with -Werror). So we grep stderr for any message 276549e21daSmrg # that says an option was ignored or not supported. 277549e21daSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 278549e21daSmrg # icc: Command line warning: ignoring option '-M'; no argument required 279549e21daSmrg # The diagnosis changed in icc 8.0: 280549e21daSmrg # icc: Command line remark: option '-MP' not supported 281549e21daSmrg if (grep 'ignoring option' conftest.err || 282549e21daSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 283549e21daSmrg am_cv_$1_dependencies_compiler_type=$depmode 284549e21daSmrg break 285549e21daSmrg fi 286549e21daSmrg fi 287549e21daSmrg done 2882d8abe4fSmrg 289549e21daSmrg cd .. 290549e21daSmrg rm -rf conftest.dir 2912d8abe4fSmrgelse 292549e21daSmrg am_cv_$1_dependencies_compiler_type=none 2932d8abe4fSmrgfi 294549e21daSmrg]) 295549e21daSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 296549e21daSmrgAM_CONDITIONAL([am__fastdep$1], [ 297549e21daSmrg test "x$enable_dependency_tracking" != xno \ 298549e21daSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 299549e21daSmrg]) 3002d8abe4fSmrg 3012d8abe4fSmrg 302549e21daSmrg# AM_SET_DEPDIR 303549e21daSmrg# ------------- 304549e21daSmrg# Choose a directory name for dependency files. 3051bedbe3fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 306549e21daSmrgAC_DEFUN([AM_SET_DEPDIR], 307549e21daSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 308549e21daSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 309549e21daSmrg]) 3102d8abe4fSmrg 3112d8abe4fSmrg 312549e21daSmrg# AM_DEP_TRACK 313549e21daSmrg# ------------ 314549e21daSmrgAC_DEFUN([AM_DEP_TRACK], 3151bedbe3fSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3161bedbe3fSmrgAS_HELP_STRING( 3171bedbe3fSmrg [--enable-dependency-tracking], 3181bedbe3fSmrg [do not reject slow dependency extractors]) 3191bedbe3fSmrgAS_HELP_STRING( 3201bedbe3fSmrg [--disable-dependency-tracking], 3211bedbe3fSmrg [speeds up one-time build])]) 322549e21daSmrgif test "x$enable_dependency_tracking" != xno; then 323549e21daSmrg am_depcomp="$ac_aux_dir/depcomp" 324549e21daSmrg AMDEPBACKSLASH='\' 3251bedbe3fSmrg am__nodep='_no' 3262d8abe4fSmrgfi 327549e21daSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 328549e21daSmrgAC_SUBST([AMDEPBACKSLASH])dnl 329549e21daSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3301bedbe3fSmrgAC_SUBST([am__nodep])dnl 3311bedbe3fSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 332549e21daSmrg]) 3332d8abe4fSmrg 334549e21daSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3352d8abe4fSmrg 3361bedbe3fSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 3372d8abe4fSmrg# 338549e21daSmrg# This file is free software; the Free Software Foundation 339549e21daSmrg# gives unlimited permission to copy and/or distribute it, 340549e21daSmrg# with or without modifications, as long as this notice is preserved. 3412d8abe4fSmrg 3422d8abe4fSmrg 343549e21daSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344549e21daSmrg# ------------------------------ 345549e21daSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 346549e21daSmrg[{ 3471bedbe3fSmrg # Older Autoconf quotes --file arguments for eval, but not when files 348549e21daSmrg # are listed without --file. Let's play safe and only enable the eval 349549e21daSmrg # if we detect the quoting. 350549e21daSmrg case $CONFIG_FILES in 351549e21daSmrg *\'*) eval set x "$CONFIG_FILES" ;; 352549e21daSmrg *) set x $CONFIG_FILES ;; 353549e21daSmrg esac 354549e21daSmrg shift 355549e21daSmrg for mf 356549e21daSmrg do 357549e21daSmrg # Strip MF so we end up with the name of the file. 358549e21daSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 359549e21daSmrg # Check whether this is an Automake generated Makefile or not. 3601bedbe3fSmrg # We used to match only the files named 'Makefile.in', but 361549e21daSmrg # some people rename them; so instead we look at the file content. 362549e21daSmrg # Grep'ing the first line is not enough: some people post-process 363549e21daSmrg # each Makefile.in and add a new line on top of each file to say so. 364549e21daSmrg # Grep'ing the whole file is not good either: AIX grep has a line 365549e21daSmrg # limit of 2048, but all sed's we know have understand at least 4000. 366549e21daSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 367549e21daSmrg dirpart=`AS_DIRNAME("$mf")` 368549e21daSmrg else 369549e21daSmrg continue 370549e21daSmrg fi 371549e21daSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3721bedbe3fSmrg # from the Makefile without running 'make'. 373549e21daSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 374549e21daSmrg test -z "$DEPDIR" && continue 375549e21daSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3761bedbe3fSmrg test -z "$am__include" && continue 377549e21daSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 378549e21daSmrg # Find all dependency output files, they are included files with 379549e21daSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 380549e21daSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 381549e21daSmrg # expansion. 382549e21daSmrg for file in `sed -n " 383549e21daSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3841bedbe3fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 385549e21daSmrg # Make sure the directory exists. 386549e21daSmrg test -f "$dirpart/$file" && continue 387549e21daSmrg fdir=`AS_DIRNAME(["$file"])` 388549e21daSmrg AS_MKDIR_P([$dirpart/$fdir]) 389549e21daSmrg # echo "creating $dirpart/$file" 390549e21daSmrg echo '# dummy' > "$dirpart/$file" 391549e21daSmrg done 392549e21daSmrg done 393549e21daSmrg} 394549e21daSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3952d8abe4fSmrg 3962d8abe4fSmrg 397549e21daSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 398549e21daSmrg# ----------------------------- 399549e21daSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 400549e21daSmrg# 401549e21daSmrg# This code is only required when automatic dependency tracking 4021bedbe3fSmrg# is enabled. FIXME. This creates each '.P' file that we will 403549e21daSmrg# need in order to bootstrap the dependency handling code. 404549e21daSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 405549e21daSmrg[AC_CONFIG_COMMANDS([depfiles], 406549e21daSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 407549e21daSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408549e21daSmrg]) 4092d8abe4fSmrg 410549e21daSmrg# Do all the work for Automake. -*- Autoconf -*- 4112d8abe4fSmrg 4121bedbe3fSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4132d8abe4fSmrg# 414549e21daSmrg# This file is free software; the Free Software Foundation 415549e21daSmrg# gives unlimited permission to copy and/or distribute it, 416549e21daSmrg# with or without modifications, as long as this notice is preserved. 4172d8abe4fSmrg 418549e21daSmrg# This macro actually does too much. Some checks are only needed if 419549e21daSmrg# your package does certain things. But this isn't really a big deal. 420549e21daSmrg 421549e21daSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 422549e21daSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 423549e21daSmrg# ----------------------------------------------- 424549e21daSmrg# The call with PACKAGE and VERSION arguments is the old style 425549e21daSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 426549e21daSmrg# and VERSION should now be passed to AC_INIT and removed from 427549e21daSmrg# the call to AM_INIT_AUTOMAKE. 428549e21daSmrg# We support both call styles for the transition. After 429549e21daSmrg# the next Automake release, Autoconf can make the AC_INIT 430549e21daSmrg# arguments mandatory, and then we can depend on a new Autoconf 431549e21daSmrg# release and drop the old call support. 432549e21daSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4331bedbe3fSmrg[AC_PREREQ([2.65])dnl 434549e21daSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 435549e21daSmrgdnl the ones we care about. 436549e21daSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 437549e21daSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 438549e21daSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 439549e21daSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 440549e21daSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 441549e21daSmrg # is not polluted with repeated "-I." 442549e21daSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 443549e21daSmrg # test to see if srcdir already configured 444549e21daSmrg if test -f $srcdir/config.status; then 445549e21daSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 446549e21daSmrg fi 4472d8abe4fSmrgfi 4482d8abe4fSmrg 449549e21daSmrg# test whether we have cygpath 450549e21daSmrgif test -z "$CYGPATH_W"; then 451549e21daSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 452549e21daSmrg CYGPATH_W='cygpath -w' 453549e21daSmrg else 454549e21daSmrg CYGPATH_W=echo 455549e21daSmrg fi 4562d8abe4fSmrgfi 457549e21daSmrgAC_SUBST([CYGPATH_W]) 4582d8abe4fSmrg 459549e21daSmrg# Define the identity of the package. 460549e21daSmrgdnl Distinguish between old-style and new-style calls. 461549e21daSmrgm4_ifval([$2], 4621bedbe3fSmrg[AC_DIAGNOSE([obsolete], 4631bedbe3fSmrg [$0: two- and three-arguments forms are deprecated.]) 4641bedbe3fSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465549e21daSmrg AC_SUBST([PACKAGE], [$1])dnl 466549e21daSmrg AC_SUBST([VERSION], [$2])], 467549e21daSmrg[_AM_SET_OPTIONS([$1])dnl 468549e21daSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4691bedbe3fSmrgm4_if( 4701bedbe3fSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4711bedbe3fSmrg [ok:ok],, 472549e21daSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 473549e21daSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 474549e21daSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4752d8abe4fSmrg 476549e21daSmrg_AM_IF_OPTION([no-define],, 4771bedbe3fSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4781bedbe3fSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4792d8abe4fSmrg 480549e21daSmrg# Some tools Automake needs. 481549e21daSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 482549e21daSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4831bedbe3fSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4841bedbe3fSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4851bedbe3fSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4861bedbe3fSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4871bedbe3fSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 488549e21daSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 489549e21daSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4901bedbe3fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4911bedbe3fSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4921bedbe3fSmrg# dies out for good. For more background, see: 4931bedbe3fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4941bedbe3fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4951bedbe3fSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 496549e21daSmrg# We need awk for the "check" target. The system "awk" is bad on 497549e21daSmrg# some platforms. 498549e21daSmrgAC_REQUIRE([AC_PROG_AWK])dnl 499549e21daSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 500549e21daSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 501549e21daSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 502549e21daSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 503549e21daSmrg [_AM_PROG_TAR([v7])])]) 504549e21daSmrg_AM_IF_OPTION([no-dependencies],, 505549e21daSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5061bedbe3fSmrg [_AM_DEPENDENCIES([CC])], 5071bedbe3fSmrg [m4_define([AC_PROG_CC], 5081bedbe3fSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 509549e21daSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5101bedbe3fSmrg [_AM_DEPENDENCIES([CXX])], 5111bedbe3fSmrg [m4_define([AC_PROG_CXX], 5121bedbe3fSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 513549e21daSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5141bedbe3fSmrg [_AM_DEPENDENCIES([OBJC])], 5151bedbe3fSmrg [m4_define([AC_PROG_OBJC], 5161bedbe3fSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5171bedbe3fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5181bedbe3fSmrg [_AM_DEPENDENCIES([OBJCXX])], 5191bedbe3fSmrg [m4_define([AC_PROG_OBJCXX], 5201bedbe3fSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 521549e21daSmrg]) 5221bedbe3fSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5231bedbe3fSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5241bedbe3fSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5251bedbe3fSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 526549e21daSmrgAC_CONFIG_COMMANDS_PRE(dnl 527549e21daSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 528549e21daSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529549e21daSmrg]) 5302d8abe4fSmrg 5311bedbe3fSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 532549e21daSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 533549e21daSmrgdnl mangled by Autoconf and run in a shell conditional statement. 534549e21daSmrgm4_define([_AC_COMPILER_EXEEXT], 535549e21daSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5362d8abe4fSmrg 5372d8abe4fSmrg 538549e21daSmrg# When config.status generates a header, we must update the stamp-h file. 539549e21daSmrg# This file resides in the same directory as the config header 540549e21daSmrg# that is generated. The stamp files are numbered to have different names. 541549e21daSmrg 542549e21daSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 543549e21daSmrg# loop where config.status creates the headers, so we can generate 544549e21daSmrg# our stamp files there. 545549e21daSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 546549e21daSmrg[# Compute $1's index in $config_headers. 547549e21daSmrg_am_arg=$1 548549e21daSmrg_am_stamp_count=1 549549e21daSmrgfor _am_header in $config_headers :; do 550549e21daSmrg case $_am_header in 551549e21daSmrg $_am_arg | $_am_arg:* ) 552549e21daSmrg break ;; 553549e21daSmrg * ) 554549e21daSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 555549e21daSmrg esac 556549e21daSmrgdone 557549e21daSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558549e21daSmrg 5591bedbe3fSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 5602d8abe4fSmrg# 561549e21daSmrg# This file is free software; the Free Software Foundation 562549e21daSmrg# gives unlimited permission to copy and/or distribute it, 563549e21daSmrg# with or without modifications, as long as this notice is preserved. 5642d8abe4fSmrg 565549e21daSmrg# AM_PROG_INSTALL_SH 566549e21daSmrg# ------------------ 567549e21daSmrg# Define $install_sh. 568549e21daSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 569549e21daSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 570549e21daSmrgif test x"${install_sh}" != xset; then 571549e21daSmrg case $am_aux_dir in 572549e21daSmrg *\ * | *\ *) 573549e21daSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 574549e21daSmrg *) 575549e21daSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 576549e21daSmrg esac 5772d8abe4fSmrgfi 5781bedbe3fSmrgAC_SUBST([install_sh])]) 5792d8abe4fSmrg 5801bedbe3fSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 5812d8abe4fSmrg# 582549e21daSmrg# This file is free software; the Free Software Foundation 583549e21daSmrg# gives unlimited permission to copy and/or distribute it, 584549e21daSmrg# with or without modifications, as long as this notice is preserved. 585549e21daSmrg 586549e21daSmrg# Check whether the underlying file-system supports filenames 587549e21daSmrg# with a leading dot. For instance MS-DOS doesn't. 588549e21daSmrgAC_DEFUN([AM_SET_LEADING_DOT], 589549e21daSmrg[rm -rf .tst 2>/dev/null 590549e21daSmrgmkdir .tst 2>/dev/null 591549e21daSmrgif test -d .tst; then 592549e21daSmrg am__leading_dot=. 5932d8abe4fSmrgelse 594549e21daSmrg am__leading_dot=_ 5952d8abe4fSmrgfi 596549e21daSmrgrmdir .tst 2>/dev/null 597549e21daSmrgAC_SUBST([am__leading_dot])]) 5982d8abe4fSmrg 599549e21daSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 600ba6a1819Smrg 6011bedbe3fSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 602ba6a1819Smrg# 603ba6a1819Smrg# This file is free software; the Free Software Foundation 604ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 605ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 606ba6a1819Smrg 607549e21daSmrg# AM_MAKE_INCLUDE() 608549e21daSmrg# ----------------- 609549e21daSmrg# Check to see how make treats includes. 610549e21daSmrgAC_DEFUN([AM_MAKE_INCLUDE], 611549e21daSmrg[am_make=${MAKE-make} 612549e21daSmrgcat > confinc << 'END' 613549e21daSmrgam__doit: 614549e21daSmrg @echo this is the am__doit target 615549e21daSmrg.PHONY: am__doit 616549e21daSmrgEND 617549e21daSmrg# If we don't find an include directive, just comment out the code. 618549e21daSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 619549e21daSmrgam__include="#" 620549e21daSmrgam__quote= 621549e21daSmrg_am_result=none 622549e21daSmrg# First try GNU make style include. 623549e21daSmrgecho "include confinc" > confmf 6241bedbe3fSmrg# Ignore all kinds of additional output from 'make'. 625549e21daSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 626549e21daSmrg*the\ am__doit\ target*) 627549e21daSmrg am__include=include 628549e21daSmrg am__quote= 629549e21daSmrg _am_result=GNU 630549e21daSmrg ;; 631549e21daSmrgesac 632549e21daSmrg# Now try BSD make style include. 633549e21daSmrgif test "$am__include" = "#"; then 634549e21daSmrg echo '.include "confinc"' > confmf 635549e21daSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 636549e21daSmrg *the\ am__doit\ target*) 637549e21daSmrg am__include=.include 638549e21daSmrg am__quote="\"" 639549e21daSmrg _am_result=BSD 640549e21daSmrg ;; 641549e21daSmrg esac 642549e21daSmrgfi 643549e21daSmrgAC_SUBST([am__include]) 644549e21daSmrgAC_SUBST([am__quote]) 645549e21daSmrgAC_MSG_RESULT([$_am_result]) 646549e21daSmrgrm -f confinc confmf 647ba6a1819Smrg]) 648ba6a1819Smrg 649549e21daSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 650ba6a1819Smrg 6511bedbe3fSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 652ba6a1819Smrg# 653ba6a1819Smrg# This file is free software; the Free Software Foundation 654ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 655ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 656ba6a1819Smrg 657549e21daSmrg# AM_MISSING_PROG(NAME, PROGRAM) 658549e21daSmrg# ------------------------------ 659549e21daSmrgAC_DEFUN([AM_MISSING_PROG], 660549e21daSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 661549e21daSmrg$1=${$1-"${am_missing_run}$2"} 662549e21daSmrgAC_SUBST($1)]) 663549e21daSmrg 664549e21daSmrg# AM_MISSING_HAS_RUN 665549e21daSmrg# ------------------ 6661bedbe3fSmrg# Define MISSING if not defined so far and test if it is modern enough. 6671bedbe3fSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 668549e21daSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 669549e21daSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 670549e21daSmrgAC_REQUIRE_AUX_FILE([missing])dnl 671549e21daSmrgif test x"${MISSING+set}" != xset; then 672549e21daSmrg case $am_aux_dir in 673549e21daSmrg *\ * | *\ *) 674549e21daSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 675549e21daSmrg *) 676549e21daSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 677549e21daSmrg esac 678549e21daSmrgfi 679549e21daSmrg# Use eval to expand $SHELL 6801bedbe3fSmrgif eval "$MISSING --is-lightweight"; then 6811bedbe3fSmrg am_missing_run="$MISSING " 682ba6a1819Smrgelse 683549e21daSmrg am_missing_run= 6841bedbe3fSmrg AC_MSG_WARN(['missing' script is too old or missing]) 685ba6a1819Smrgfi 686549e21daSmrg]) 687ba6a1819Smrg 688549e21daSmrg# Helper functions for option handling. -*- Autoconf -*- 689ba6a1819Smrg 6901bedbe3fSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 691ba6a1819Smrg# 692549e21daSmrg# This file is free software; the Free Software Foundation 693549e21daSmrg# gives unlimited permission to copy and/or distribute it, 694549e21daSmrg# with or without modifications, as long as this notice is preserved. 695ba6a1819Smrg 696549e21daSmrg# _AM_MANGLE_OPTION(NAME) 697549e21daSmrg# ----------------------- 698549e21daSmrgAC_DEFUN([_AM_MANGLE_OPTION], 699549e21daSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 700ba6a1819Smrg 701549e21daSmrg# _AM_SET_OPTION(NAME) 7021bedbe3fSmrg# -------------------- 703549e21daSmrg# Set option NAME. Presently that only means defining a flag for this option. 704549e21daSmrgAC_DEFUN([_AM_SET_OPTION], 7051bedbe3fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 706ba6a1819Smrg 707549e21daSmrg# _AM_SET_OPTIONS(OPTIONS) 7081bedbe3fSmrg# ------------------------ 709549e21daSmrg# OPTIONS is a space-separated list of Automake options. 710549e21daSmrgAC_DEFUN([_AM_SET_OPTIONS], 711549e21daSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 712ba6a1819Smrg 713549e21daSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 714549e21daSmrg# ------------------------------------------- 715549e21daSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 716549e21daSmrgAC_DEFUN([_AM_IF_OPTION], 717549e21daSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 718ba6a1819Smrg 719549e21daSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 720ba6a1819Smrg 7211bedbe3fSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 722ba6a1819Smrg# 723ba6a1819Smrg# This file is free software; the Free Software Foundation 724ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 725ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 726ba6a1819Smrg 727549e21daSmrg# AM_SANITY_CHECK 728549e21daSmrg# --------------- 729549e21daSmrgAC_DEFUN([AM_SANITY_CHECK], 730549e21daSmrg[AC_MSG_CHECKING([whether build environment is sane]) 731549e21daSmrg# Reject unsafe characters in $srcdir or the absolute working directory 732549e21daSmrg# name. Accept space and tab only in the latter. 733549e21daSmrgam_lf=' 734549e21daSmrg' 735549e21daSmrgcase `pwd` in 736549e21daSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 737549e21daSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 738549e21daSmrgesac 739549e21daSmrgcase $srcdir in 740549e21daSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 7411bedbe3fSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 742549e21daSmrgesac 743ba6a1819Smrg 7441bedbe3fSmrg# Do 'set' in a subshell so we don't clobber the current shell's 745549e21daSmrg# arguments. Must try -L first in case configure is actually a 746549e21daSmrg# symlink; some systems play weird games with the mod time of symlinks 747549e21daSmrg# (eg FreeBSD returns the mod time of the symlink's containing 748549e21daSmrg# directory). 749549e21daSmrgif ( 7501bedbe3fSmrg am_has_slept=no 7511bedbe3fSmrg for am_try in 1 2; do 7521bedbe3fSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 7531bedbe3fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 7541bedbe3fSmrg if test "$[*]" = "X"; then 7551bedbe3fSmrg # -L didn't work. 7561bedbe3fSmrg set X `ls -t "$srcdir/configure" conftest.file` 7571bedbe3fSmrg fi 7581bedbe3fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7591bedbe3fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 7601bedbe3fSmrg 7611bedbe3fSmrg # If neither matched, then we have a broken ls. This can happen 7621bedbe3fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7631bedbe3fSmrg # broken ls alias from the environment. This has actually 7641bedbe3fSmrg # happened. Such a system could not be considered "sane". 7651bedbe3fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7661bedbe3fSmrg alias in your environment]) 7671bedbe3fSmrg fi 7681bedbe3fSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 7691bedbe3fSmrg break 7701bedbe3fSmrg fi 7711bedbe3fSmrg # Just in case. 7721bedbe3fSmrg sleep 1 7731bedbe3fSmrg am_has_slept=yes 7741bedbe3fSmrg done 775549e21daSmrg test "$[2]" = conftest.file 776549e21daSmrg ) 777549e21daSmrgthen 778549e21daSmrg # Ok. 779549e21daSmrg : 780549e21daSmrgelse 781549e21daSmrg AC_MSG_ERROR([newly created file is older than distributed files! 782549e21daSmrgCheck your system clock]) 783549e21daSmrgfi 7841bedbe3fSmrgAC_MSG_RESULT([yes]) 7851bedbe3fSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 7861bedbe3fSmrg# generated files are strictly newer. 7871bedbe3fSmrgam_sleep_pid= 7881bedbe3fSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 7891bedbe3fSmrg ( sleep 1 ) & 7901bedbe3fSmrg am_sleep_pid=$! 7911bedbe3fSmrgfi 7921bedbe3fSmrgAC_CONFIG_COMMANDS_PRE( 7931bedbe3fSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 7941bedbe3fSmrg if test -n "$am_sleep_pid"; then 7951bedbe3fSmrg # Hide warnings about reused PIDs. 7961bedbe3fSmrg wait $am_sleep_pid 2>/dev/null 7971bedbe3fSmrg fi 7981bedbe3fSmrg AC_MSG_RESULT([done])]) 7991bedbe3fSmrgrm -f conftest.file 8001bedbe3fSmrg]) 801549e21daSmrg 8021bedbe3fSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 803ba6a1819Smrg# 804ba6a1819Smrg# This file is free software; the Free Software Foundation 805ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 806ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 807ba6a1819Smrg 808549e21daSmrg# AM_SILENT_RULES([DEFAULT]) 809549e21daSmrg# -------------------------- 810549e21daSmrg# Enable less verbose build rules; with the default set to DEFAULT 8111bedbe3fSmrg# ("yes" being less verbose, "no" or empty being verbose). 812549e21daSmrgAC_DEFUN([AM_SILENT_RULES], 8131bedbe3fSmrg[AC_ARG_ENABLE([silent-rules], [dnl 8141bedbe3fSmrgAS_HELP_STRING( 8151bedbe3fSmrg [--enable-silent-rules], 8161bedbe3fSmrg [less verbose build output (undo: "make V=1")]) 8171bedbe3fSmrgAS_HELP_STRING( 8181bedbe3fSmrg [--disable-silent-rules], 8191bedbe3fSmrg [verbose build output (undo: "make V=0")])dnl 8201bedbe3fSmrg]) 8211bedbe3fSmrgcase $enable_silent_rules in @%:@ ((( 8221bedbe3fSmrg yes) AM_DEFAULT_VERBOSITY=0;; 8231bedbe3fSmrg no) AM_DEFAULT_VERBOSITY=1;; 8241bedbe3fSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 825549e21daSmrgesac 8261bedbe3fSmrgdnl 8271bedbe3fSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 8281bedbe3fSmrgdnl do not support nested variable expansions. 8291bedbe3fSmrgdnl See automake bug#9928 and bug#10237. 8301bedbe3fSmrgam_make=${MAKE-make} 8311bedbe3fSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 8321bedbe3fSmrg [am_cv_make_support_nested_variables], 8331bedbe3fSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 8341bedbe3fSmrgBAR0=false 8351bedbe3fSmrgBAR1=true 8361bedbe3fSmrgV=1 8371bedbe3fSmrgam__doit: 8381bedbe3fSmrg @$(TRUE) 8391bedbe3fSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 8401bedbe3fSmrg am_cv_make_support_nested_variables=yes 8411bedbe3fSmrgelse 8421bedbe3fSmrg am_cv_make_support_nested_variables=no 8431bedbe3fSmrgfi]) 8441bedbe3fSmrgif test $am_cv_make_support_nested_variables = yes; then 8451bedbe3fSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 8461bedbe3fSmrg AM_V='$(V)' 8471bedbe3fSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 8481bedbe3fSmrgelse 8491bedbe3fSmrg AM_V=$AM_DEFAULT_VERBOSITY 8501bedbe3fSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 8511bedbe3fSmrgfi 8521bedbe3fSmrgAC_SUBST([AM_V])dnl 8531bedbe3fSmrgAM_SUBST_NOTMAKE([AM_V])dnl 8541bedbe3fSmrgAC_SUBST([AM_DEFAULT_V])dnl 8551bedbe3fSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 856549e21daSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 857549e21daSmrgAM_BACKSLASH='\' 858549e21daSmrgAC_SUBST([AM_BACKSLASH])dnl 859549e21daSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 860549e21daSmrg]) 861ba6a1819Smrg 8621bedbe3fSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 863ba6a1819Smrg# 864ba6a1819Smrg# This file is free software; the Free Software Foundation 865ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 866ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 867ba6a1819Smrg 868549e21daSmrg# AM_PROG_INSTALL_STRIP 869549e21daSmrg# --------------------- 8701bedbe3fSmrg# One issue with vendor 'install' (even GNU) is that you can't 871549e21daSmrg# specify the program used to strip binaries. This is especially 872549e21daSmrg# annoying in cross-compiling environments, where the build's strip 873549e21daSmrg# is unlikely to handle the host's binaries. 874549e21daSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 8751bedbe3fSmrg# always use install-sh in "make install-strip", and initialize 876549e21daSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 877549e21daSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 878549e21daSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8791bedbe3fSmrg# Installed binaries are usually stripped using 'strip' when the user 8801bedbe3fSmrg# run "make install-strip". However 'strip' might not be the right 881549e21daSmrg# tool to use in cross-compilation environments, therefore Automake 8821bedbe3fSmrg# will honor the 'STRIP' environment variable to overrule this program. 8831bedbe3fSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 884549e21daSmrgif test "$cross_compiling" != no; then 885549e21daSmrg AC_CHECK_TOOL([STRIP], [strip], :) 886ba6a1819Smrgfi 887549e21daSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 888549e21daSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 889ba6a1819Smrg 8901bedbe3fSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 891549e21daSmrg# 892549e21daSmrg# This file is free software; the Free Software Foundation 893549e21daSmrg# gives unlimited permission to copy and/or distribute it, 894549e21daSmrg# with or without modifications, as long as this notice is preserved. 895ba6a1819Smrg 896549e21daSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 897549e21daSmrg# --------------------------- 898549e21daSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 899549e21daSmrg# This macro is traced by Automake. 900549e21daSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 901ba6a1819Smrg 902549e21daSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9031bedbe3fSmrg# -------------------------- 904549e21daSmrg# Public sister of _AM_SUBST_NOTMAKE. 905549e21daSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 906ba6a1819Smrg 907549e21daSmrg# Check how to create a tarball. -*- Autoconf -*- 908ba6a1819Smrg 9091bedbe3fSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 910ba6a1819Smrg# 911ba6a1819Smrg# This file is free software; the Free Software Foundation 912ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 913ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 914ba6a1819Smrg 915549e21daSmrg# _AM_PROG_TAR(FORMAT) 916549e21daSmrg# -------------------- 917549e21daSmrg# Check how to create a tarball in format FORMAT. 9181bedbe3fSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 919ba6a1819Smrg# 920549e21daSmrg# Substitute a variable $(am__tar) that is a command 921549e21daSmrg# writing to stdout a FORMAT-tarball containing the directory 922549e21daSmrg# $tardir. 923549e21daSmrg# tardir=directory && $(am__tar) > result.tar 924549e21daSmrg# 925549e21daSmrg# Substitute a variable $(am__untar) that extract such 926549e21daSmrg# a tarball read from stdin. 927549e21daSmrg# $(am__untar) < result.tar 9281bedbe3fSmrg# 929549e21daSmrgAC_DEFUN([_AM_PROG_TAR], 9301bedbe3fSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 9311bedbe3fSmrg# in the wild :-( We should find a proper way to deprecate it ... 9321bedbe3fSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 9331bedbe3fSmrg 9341bedbe3fSmrg# We'll loop over all known methods to create a tar archive until one works. 935549e21daSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 936ba6a1819Smrg 9371bedbe3fSmrgm4_if([$1], [v7], 9381bedbe3fSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 9391bedbe3fSmrg 9401bedbe3fSmrg [m4_case([$1], 9411bedbe3fSmrg [ustar], 9421bedbe3fSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 9431bedbe3fSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 9441bedbe3fSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 9451bedbe3fSmrg # and bug#13588). 9461bedbe3fSmrg am_max_uid=2097151 # 2^21 - 1 9471bedbe3fSmrg am_max_gid=$am_max_uid 9481bedbe3fSmrg # The $UID and $GID variables are not portable, so we need to resort 9491bedbe3fSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 9501bedbe3fSmrg # below are definitely unexpected, so allow the users to see them 9511bedbe3fSmrg # (that is, avoid stderr redirection). 9521bedbe3fSmrg am_uid=`id -u || echo unknown` 9531bedbe3fSmrg am_gid=`id -g || echo unknown` 9541bedbe3fSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 9551bedbe3fSmrg if test $am_uid -le $am_max_uid; then 9561bedbe3fSmrg AC_MSG_RESULT([yes]) 9571bedbe3fSmrg else 9581bedbe3fSmrg AC_MSG_RESULT([no]) 9591bedbe3fSmrg _am_tools=none 9601bedbe3fSmrg fi 9611bedbe3fSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 9621bedbe3fSmrg if test $am_gid -le $am_max_gid; then 9631bedbe3fSmrg AC_MSG_RESULT([yes]) 9641bedbe3fSmrg else 9651bedbe3fSmrg AC_MSG_RESULT([no]) 9661bedbe3fSmrg _am_tools=none 9671bedbe3fSmrg fi], 9681bedbe3fSmrg 9691bedbe3fSmrg [pax], 9701bedbe3fSmrg [], 971ba6a1819Smrg 9721bedbe3fSmrg [m4_fatal([Unknown tar format])]) 9731bedbe3fSmrg 9741bedbe3fSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 9751bedbe3fSmrg 9761bedbe3fSmrg # Go ahead even if we have the value already cached. We do so because we 9771bedbe3fSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 9781bedbe3fSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 9791bedbe3fSmrg 9801bedbe3fSmrg for _am_tool in $_am_tools; do 9811bedbe3fSmrg case $_am_tool in 9821bedbe3fSmrg gnutar) 9831bedbe3fSmrg for _am_tar in tar gnutar gtar; do 9841bedbe3fSmrg AM_RUN_LOG([$_am_tar --version]) && break 9851bedbe3fSmrg done 9861bedbe3fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9871bedbe3fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9881bedbe3fSmrg am__untar="$_am_tar -xf -" 9891bedbe3fSmrg ;; 9901bedbe3fSmrg plaintar) 9911bedbe3fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9921bedbe3fSmrg # ustar tarball either. 9931bedbe3fSmrg (tar --version) >/dev/null 2>&1 && continue 9941bedbe3fSmrg am__tar='tar chf - "$$tardir"' 9951bedbe3fSmrg am__tar_='tar chf - "$tardir"' 9961bedbe3fSmrg am__untar='tar xf -' 9971bedbe3fSmrg ;; 9981bedbe3fSmrg pax) 9991bedbe3fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 10001bedbe3fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 10011bedbe3fSmrg am__untar='pax -r' 10021bedbe3fSmrg ;; 10031bedbe3fSmrg cpio) 10041bedbe3fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10051bedbe3fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10061bedbe3fSmrg am__untar='cpio -i -H $1 -d' 10071bedbe3fSmrg ;; 10081bedbe3fSmrg none) 10091bedbe3fSmrg am__tar=false 10101bedbe3fSmrg am__tar_=false 10111bedbe3fSmrg am__untar=false 10121bedbe3fSmrg ;; 10131bedbe3fSmrg esac 10141bedbe3fSmrg 10151bedbe3fSmrg # If the value was cached, stop now. We just wanted to have am__tar 10161bedbe3fSmrg # and am__untar set. 10171bedbe3fSmrg test -n "${am_cv_prog_tar_$1}" && break 10181bedbe3fSmrg 10191bedbe3fSmrg # tar/untar a dummy directory, and stop if the command works. 10201bedbe3fSmrg rm -rf conftest.dir 10211bedbe3fSmrg mkdir conftest.dir 10221bedbe3fSmrg echo GrepMe > conftest.dir/file 10231bedbe3fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10241bedbe3fSmrg rm -rf conftest.dir 10251bedbe3fSmrg if test -s conftest.tar; then 10261bedbe3fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10271bedbe3fSmrg AM_RUN_LOG([cat conftest.dir/file]) 10281bedbe3fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10291bedbe3fSmrg fi 10301bedbe3fSmrg done 1031549e21daSmrg rm -rf conftest.dir 1032ba6a1819Smrg 10331bedbe3fSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10341bedbe3fSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10351bedbe3fSmrg 1036549e21daSmrgAC_SUBST([am__tar]) 1037549e21daSmrgAC_SUBST([am__untar]) 1038549e21daSmrg]) # _AM_PROG_TAR 1039ba6a1819Smrg 10401bedbe3fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 10411bedbe3fSmrg# 10421bedbe3fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10431bedbe3fSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10441bedbe3fSmrg# Foundation, Inc. 10451bedbe3fSmrg# Written by Gordon Matzigkeit, 1996 10461bedbe3fSmrg# 10471bedbe3fSmrg# This file is free software; the Free Software Foundation gives 10481bedbe3fSmrg# unlimited permission to copy and/or distribute it, with or without 10491bedbe3fSmrg# modifications, as long as this notice is preserved. 1050ba6a1819Smrg 10511bedbe3fSmrgm4_define([_LT_COPYING], [dnl 10521bedbe3fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10531bedbe3fSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10541bedbe3fSmrg# Foundation, Inc. 10551bedbe3fSmrg# Written by Gordon Matzigkeit, 1996 1056549e21daSmrg# 10571bedbe3fSmrg# This file is part of GNU Libtool. 1058549e21daSmrg# 10591bedbe3fSmrg# GNU Libtool is free software; you can redistribute it and/or 10601bedbe3fSmrg# modify it under the terms of the GNU General Public License as 10611bedbe3fSmrg# published by the Free Software Foundation; either version 2 of 10621bedbe3fSmrg# the License, or (at your option) any later version. 1063549e21daSmrg# 10641bedbe3fSmrg# As a special exception to the GNU General Public License, 10651bedbe3fSmrg# if you distribute this file as part of a program or library that 10661bedbe3fSmrg# is built using GNU Libtool, you may include this file under the 10671bedbe3fSmrg# same distribution terms that you use for the rest of that program. 1068549e21daSmrg# 10691bedbe3fSmrg# GNU Libtool is distributed in the hope that it will be useful, 10701bedbe3fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 10711bedbe3fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10721bedbe3fSmrg# GNU General Public License for more details. 1073549e21daSmrg# 10741bedbe3fSmrg# You should have received a copy of the GNU General Public License 10751bedbe3fSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 10761bedbe3fSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 10771bedbe3fSmrg# obtained by writing to the Free Software Foundation, Inc., 10781bedbe3fSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 10791bedbe3fSmrg]) 1080ba6a1819Smrg 10811bedbe3fSmrg# serial 57 LT_INIT 1082ba6a1819Smrg 1083ba6a1819Smrg 10841bedbe3fSmrg# LT_PREREQ(VERSION) 10851bedbe3fSmrg# ------------------ 10861bedbe3fSmrg# Complain and exit if this libtool version is less that VERSION. 10871bedbe3fSmrgm4_defun([LT_PREREQ], 10881bedbe3fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 10891bedbe3fSmrg [m4_default([$3], 10901bedbe3fSmrg [m4_fatal([Libtool version $1 or higher is required], 10911bedbe3fSmrg 63)])], 10921bedbe3fSmrg [$2])]) 1093ba6a1819Smrg 1094ba6a1819Smrg 10951bedbe3fSmrg# _LT_CHECK_BUILDDIR 10961bedbe3fSmrg# ------------------ 10971bedbe3fSmrg# Complain if the absolute build directory name contains unusual characters 10981bedbe3fSmrgm4_defun([_LT_CHECK_BUILDDIR], 10991bedbe3fSmrg[case `pwd` in 11001bedbe3fSmrg *\ * | *\ *) 11011bedbe3fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 11021bedbe3fSmrgesac 11031bedbe3fSmrg]) 1104ba6a1819Smrg 1105ba6a1819Smrg 11061bedbe3fSmrg# LT_INIT([OPTIONS]) 11071bedbe3fSmrg# ------------------ 11081bedbe3fSmrgAC_DEFUN([LT_INIT], 11091bedbe3fSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 11101bedbe3fSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11111bedbe3fSmrgAC_BEFORE([$0], [LT_LANG])dnl 11121bedbe3fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 11131bedbe3fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 11141bedbe3fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 1115ba6a1819Smrg 11161bedbe3fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 11171bedbe3fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 11181bedbe3fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 11191bedbe3fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 11201bedbe3fSmrgdnl unless we require an AC_DEFUNed macro: 11211bedbe3fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 11221bedbe3fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 11231bedbe3fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 11241bedbe3fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 11251bedbe3fSmrgm4_require([_LT_PROG_LTMAIN])dnl 1126ba6a1819Smrg 11271bedbe3fSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128ba6a1819Smrg 11291bedbe3fSmrgdnl Parse OPTIONS 11301bedbe3fSmrg_LT_SET_OPTIONS([$0], [$1]) 1131ba6a1819Smrg 11321bedbe3fSmrg# This can be used to rebuild libtool when needed 11331bedbe3fSmrgLIBTOOL_DEPS="$ltmain" 1134ba6a1819Smrg 11351bedbe3fSmrg# Always use our own libtool. 11361bedbe3fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11371bedbe3fSmrgAC_SUBST(LIBTOOL)dnl 1138ba6a1819Smrg 11391bedbe3fSmrg_LT_SETUP 1140ba6a1819Smrg 11411bedbe3fSmrg# Only expand once: 11421bedbe3fSmrgm4_define([LT_INIT]) 11431bedbe3fSmrg])# LT_INIT 1144ba6a1819Smrg 11451bedbe3fSmrg# Old names: 11461bedbe3fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 11471bedbe3fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 11481bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 11491bedbe3fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 11501bedbe3fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151ba6a1819Smrg 1152ba6a1819Smrg 11531bedbe3fSmrg# _LT_CC_BASENAME(CC) 1154549e21daSmrg# ------------------- 11551bedbe3fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11561bedbe3fSmrgm4_defun([_LT_CC_BASENAME], 11571bedbe3fSmrg[for cc_temp in $1""; do 11581bedbe3fSmrg case $cc_temp in 11591bedbe3fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 11601bedbe3fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 11611bedbe3fSmrg \-*) ;; 11621bedbe3fSmrg *) break;; 11631bedbe3fSmrg esac 11641bedbe3fSmrgdone 11651bedbe3fSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 11661bedbe3fSmrg]) 1167ba6a1819Smrg 1168ba6a1819Smrg 11691bedbe3fSmrg# _LT_FILEUTILS_DEFAULTS 11701bedbe3fSmrg# ---------------------- 11711bedbe3fSmrg# It is okay to use these file commands and assume they have been set 11721bedbe3fSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 11731bedbe3fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 11741bedbe3fSmrg[: ${CP="cp -f"} 11751bedbe3fSmrg: ${MV="mv -f"} 11761bedbe3fSmrg: ${RM="rm -f"} 11771bedbe3fSmrg])# _LT_FILEUTILS_DEFAULTS 1178ba6a1819Smrg 1179ba6a1819Smrg 11801bedbe3fSmrg# _LT_SETUP 11811bedbe3fSmrg# --------- 11821bedbe3fSmrgm4_defun([_LT_SETUP], 11831bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11841bedbe3fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11851bedbe3fSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 11861bedbe3fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1187ba6a1819Smrg 11881bedbe3fSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 11891bedbe3fSmrgdnl 11901bedbe3fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 11911bedbe3fSmrg_LT_DECL([], [host], [0])dnl 11921bedbe3fSmrg_LT_DECL([], [host_os], [0])dnl 11931bedbe3fSmrgdnl 11941bedbe3fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 11951bedbe3fSmrg_LT_DECL([], [build], [0])dnl 11961bedbe3fSmrg_LT_DECL([], [build_os], [0])dnl 11971bedbe3fSmrgdnl 11981bedbe3fSmrgAC_REQUIRE([AC_PROG_CC])dnl 11991bedbe3fSmrgAC_REQUIRE([LT_PATH_LD])dnl 12001bedbe3fSmrgAC_REQUIRE([LT_PATH_NM])dnl 12011bedbe3fSmrgdnl 12021bedbe3fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 12031bedbe3fSmrgtest -z "$LN_S" && LN_S="ln -s" 12041bedbe3fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 12051bedbe3fSmrgdnl 12061bedbe3fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 12071bedbe3fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 12081bedbe3fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 12091bedbe3fSmrgdnl 12101bedbe3fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 12111bedbe3fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 12121bedbe3fSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 12131bedbe3fSmrgm4_require([_LT_CMD_RELOAD])dnl 12141bedbe3fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 12151bedbe3fSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 12161bedbe3fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 12171bedbe3fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 12181bedbe3fSmrgm4_require([_LT_WITH_SYSROOT])dnl 1219ba6a1819Smrg 12201bedbe3fSmrg_LT_CONFIG_LIBTOOL_INIT([ 12211bedbe3fSmrg# See if we are running on zsh, and set the options which allow our 12221bedbe3fSmrg# commands through without removal of \ escapes INIT. 12231bedbe3fSmrgif test -n "\${ZSH_VERSION+set}" ; then 12241bedbe3fSmrg setopt NO_GLOB_SUBST 12251bedbe3fSmrgfi 12261bedbe3fSmrg]) 12271bedbe3fSmrgif test -n "${ZSH_VERSION+set}" ; then 12281bedbe3fSmrg setopt NO_GLOB_SUBST 1229ba6a1819Smrgfi 1230ba6a1819Smrg 12311bedbe3fSmrg_LT_CHECK_OBJDIR 1232ba6a1819Smrg 12331bedbe3fSmrgm4_require([_LT_TAG_COMPILER])dnl 1234ba6a1819Smrg 12351bedbe3fSmrgcase $host_os in 12361bedbe3fSmrgaix3*) 12371bedbe3fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 12381bedbe3fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12391bedbe3fSmrg # vanish in a puff of smoke. 12401bedbe3fSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 12411bedbe3fSmrg COLLECT_NAMES= 12421bedbe3fSmrg export COLLECT_NAMES 12431bedbe3fSmrg fi 12441bedbe3fSmrg ;; 12451bedbe3fSmrgesac 1246ba6a1819Smrg 12471bedbe3fSmrg# Global variables: 12481bedbe3fSmrgofile=libtool 12491bedbe3fSmrgcan_build_shared=yes 1250ba6a1819Smrg 12511bedbe3fSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 12521bedbe3fSmrg# which needs '.lib'). 12531bedbe3fSmrglibext=a 1254ba6a1819Smrg 12551bedbe3fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1256ba6a1819Smrg 12571bedbe3fSmrgold_CC="$CC" 12581bedbe3fSmrgold_CFLAGS="$CFLAGS" 1259ba6a1819Smrg 12601bedbe3fSmrg# Set sane defaults for various variables 12611bedbe3fSmrgtest -z "$CC" && CC=cc 12621bedbe3fSmrgtest -z "$LTCC" && LTCC=$CC 12631bedbe3fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 12641bedbe3fSmrgtest -z "$LD" && LD=ld 12651bedbe3fSmrgtest -z "$ac_objext" && ac_objext=o 1266ba6a1819Smrg 12671bedbe3fSmrg_LT_CC_BASENAME([$compiler]) 1268ba6a1819Smrg 12691bedbe3fSmrg# Only perform the check for file, if the check method requires it 12701bedbe3fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 12711bedbe3fSmrgcase $deplibs_check_method in 12721bedbe3fSmrgfile_magic*) 12731bedbe3fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 12741bedbe3fSmrg _LT_PATH_MAGIC 12751bedbe3fSmrg fi 12761bedbe3fSmrg ;; 12771bedbe3fSmrgesac 1278ba6a1819Smrg 12791bedbe3fSmrg# Use C for the default configuration in the libtool script 12801bedbe3fSmrgLT_SUPPORTED_TAG([CC]) 12811bedbe3fSmrg_LT_LANG_C_CONFIG 12821bedbe3fSmrg_LT_LANG_DEFAULT_CONFIG 12831bedbe3fSmrg_LT_CONFIG_COMMANDS 12841bedbe3fSmrg])# _LT_SETUP 1285549e21daSmrg 1286549e21daSmrg 12871bedbe3fSmrg# _LT_PREPARE_SED_QUOTE_VARS 12881bedbe3fSmrg# -------------------------- 12891bedbe3fSmrg# Define a few sed substitution that help us do robust quoting. 12901bedbe3fSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 12911bedbe3fSmrg[# Backslashify metacharacters that are still active within 12921bedbe3fSmrg# double-quoted strings. 12931bedbe3fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1294549e21daSmrg 12951bedbe3fSmrg# Same as above, but do not quote variable references. 12961bedbe3fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1297549e21daSmrg 12981bedbe3fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 12991bedbe3fSmrg# double_quote_subst'ed string. 13001bedbe3fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1301ba6a1819Smrg 13021bedbe3fSmrg# Sed substitution to delay expansion of an escaped single quote. 13031bedbe3fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1304549e21daSmrg 13051bedbe3fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 13061bedbe3fSmrgno_glob_subst='s/\*/\\\*/g' 13071bedbe3fSmrg]) 1308549e21daSmrg 13091bedbe3fSmrg# _LT_PROG_LTMAIN 13101bedbe3fSmrg# --------------- 13111bedbe3fSmrg# Note that this code is called both from `configure', and `config.status' 13121bedbe3fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 13131bedbe3fSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 13141bedbe3fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 13151bedbe3fSmrgm4_defun([_LT_PROG_LTMAIN], 13161bedbe3fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 13171bedbe3fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 13181bedbe3fSmrgltmain="$ac_aux_dir/ltmain.sh" 13191bedbe3fSmrg])# _LT_PROG_LTMAIN 1320549e21daSmrg 1321ba6a1819Smrg 1322549e21daSmrg 13231bedbe3fSmrg# So that we can recreate a full libtool script including additional 13241bedbe3fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 13251bedbe3fSmrg# in macros and then make a single call at the end using the `libtool' 13261bedbe3fSmrg# label. 1327ba6a1819Smrg 1328549e21daSmrg 13291bedbe3fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 13301bedbe3fSmrg# ---------------------------------------- 13311bedbe3fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13321bedbe3fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 13331bedbe3fSmrg[m4_ifval([$1], 13341bedbe3fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 13351bedbe3fSmrg [$1 13361bedbe3fSmrg])])]) 1337549e21daSmrg 13381bedbe3fSmrg# Initialize. 13391bedbe3fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340ba6a1819Smrg 1341ba6a1819Smrg 13421bedbe3fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 13431bedbe3fSmrg# ------------------------------ 13441bedbe3fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13451bedbe3fSmrgm4_define([_LT_CONFIG_LIBTOOL], 13461bedbe3fSmrg[m4_ifval([$1], 13471bedbe3fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 13481bedbe3fSmrg [$1 13491bedbe3fSmrg])])]) 1350ba6a1819Smrg 13511bedbe3fSmrg# Initialize. 13521bedbe3fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353549e21daSmrg 1354ba6a1819Smrg 13551bedbe3fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 13561bedbe3fSmrg# ----------------------------------------------------- 13571bedbe3fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 13581bedbe3fSmrg[_LT_CONFIG_LIBTOOL([$1]) 13591bedbe3fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 13601bedbe3fSmrg]) 1361549e21daSmrg 1362ba6a1819Smrg 13631bedbe3fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 13641bedbe3fSmrg# ----------------------------- 13651bedbe3fSmrg# Add leading comment marks to the start of each line, and a trailing 13661bedbe3fSmrg# full-stop to the whole comment if one is not present already. 13671bedbe3fSmrgm4_define([_LT_FORMAT_COMMENT], 13681bedbe3fSmrg[m4_ifval([$1], [ 13691bedbe3fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 13701bedbe3fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 13711bedbe3fSmrg)]) 1372549e21daSmrg 1373549e21daSmrg 1374ba6a1819Smrg 1375ba6a1819Smrg 1376ba6a1819Smrg 13771bedbe3fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 13781bedbe3fSmrg# ------------------------------------------------------------------- 13791bedbe3fSmrg# CONFIGNAME is the name given to the value in the libtool script. 13801bedbe3fSmrg# VARNAME is the (base) name used in the configure script. 13811bedbe3fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 13821bedbe3fSmrg# VARNAME. Any other value will be used directly. 13831bedbe3fSmrgm4_define([_LT_DECL], 13841bedbe3fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 13851bedbe3fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 13861bedbe3fSmrg [m4_ifval([$1], [$1], [$2])]) 13871bedbe3fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 13881bedbe3fSmrg m4_ifval([$4], 13891bedbe3fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 13901bedbe3fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 13911bedbe3fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 13921bedbe3fSmrg]) 1393ba6a1819Smrg 1394ba6a1819Smrg 13951bedbe3fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 13961bedbe3fSmrg# -------------------------------------------------------- 13971bedbe3fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1398ba6a1819Smrg 1399549e21daSmrg 14001bedbe3fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 14011bedbe3fSmrg# ------------------------------------------------ 14021bedbe3fSmrgm4_define([lt_decl_tag_varnames], 14031bedbe3fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 1404549e21daSmrg 1405549e21daSmrg 14061bedbe3fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 14071bedbe3fSmrg# --------------------------------------------------------- 14081bedbe3fSmrgm4_define([_lt_decl_filter], 14091bedbe3fSmrg[m4_case([$#], 14101bedbe3fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 14111bedbe3fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 14121bedbe3fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 14131bedbe3fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 14141bedbe3fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 14151bedbe3fSmrg]) 1416ba6a1819Smrg 1417ba6a1819Smrg 14181bedbe3fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 14191bedbe3fSmrg# -------------------------------------------------- 14201bedbe3fSmrgm4_define([lt_decl_quote_varnames], 14211bedbe3fSmrg[_lt_decl_filter([value], [1], $@)]) 1422ba6a1819Smrg 1423ba6a1819Smrg 14241bedbe3fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 14251bedbe3fSmrg# --------------------------------------------------- 14261bedbe3fSmrgm4_define([lt_decl_dquote_varnames], 14271bedbe3fSmrg[_lt_decl_filter([value], [2], $@)]) 1428549e21daSmrg 1429549e21daSmrg 14301bedbe3fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 14311bedbe3fSmrg# --------------------------------------------------- 14321bedbe3fSmrgm4_define([lt_decl_varnames_tagged], 14331bedbe3fSmrg[m4_assert([$# <= 2])dnl 14341bedbe3fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 14351bedbe3fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 14361bedbe3fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 14371bedbe3fSmrgm4_define([_lt_decl_varnames_tagged], 14381bedbe3fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1439ba6a1819Smrg 1440ba6a1819Smrg 14411bedbe3fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 14421bedbe3fSmrg# ------------------------------------------------ 14431bedbe3fSmrgm4_define([lt_decl_all_varnames], 14441bedbe3fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 14451bedbe3fSmrg m4_if([$2], [], 14461bedbe3fSmrg m4_quote(lt_decl_varnames), 14471bedbe3fSmrg m4_quote(m4_shift($@))))[]dnl 14481bedbe3fSmrg]) 14491bedbe3fSmrgm4_define([_lt_decl_all_varnames], 14501bedbe3fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 14511bedbe3fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 14521bedbe3fSmrg]) 1453549e21daSmrg 1454549e21daSmrg 14551bedbe3fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 14561bedbe3fSmrg# ------------------------------------ 14571bedbe3fSmrg# Quote a variable value, and forward it to `config.status' so that its 14581bedbe3fSmrg# declaration there will have the same value as in `configure'. VARNAME 14591bedbe3fSmrg# must have a single quote delimited value for this to work. 14601bedbe3fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 14611bedbe3fSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462549e21daSmrg 1463549e21daSmrg 14641bedbe3fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 14651bedbe3fSmrg# ------------------------------ 14661bedbe3fSmrg# We delimit libtool config variables with single quotes, so when 14671bedbe3fSmrg# we write them to config.status, we have to be sure to quote all 14681bedbe3fSmrg# embedded single quotes properly. In configure, this macro expands 14691bedbe3fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1470549e21daSmrg# 14711bedbe3fSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 14721bedbe3fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 14731bedbe3fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 14741bedbe3fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475ba6a1819Smrg 1476ba6a1819Smrg 14771bedbe3fSmrg# _LT_LIBTOOL_TAGS 14782d8abe4fSmrg# ---------------- 14791bedbe3fSmrg# Output comment and list of tags supported by the script 14801bedbe3fSmrgm4_defun([_LT_LIBTOOL_TAGS], 14811bedbe3fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 14821bedbe3fSmrgavailable_tags="_LT_TAGS"dnl 14831bedbe3fSmrg]) 14842d8abe4fSmrg 1485ba6a1819Smrg 14861bedbe3fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 14871bedbe3fSmrg# ----------------------------------- 14881bedbe3fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 14891bedbe3fSmrg# expand to a commented shell variable setting: 14901bedbe3fSmrg# 14911bedbe3fSmrg# # Some comment about what VAR is for. 14921bedbe3fSmrg# visible_name=$lt_internal_name 14931bedbe3fSmrgm4_define([_LT_LIBTOOL_DECLARE], 14941bedbe3fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 14951bedbe3fSmrg [description])))[]dnl 14961bedbe3fSmrgm4_pushdef([_libtool_name], 14971bedbe3fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 14981bedbe3fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 14991bedbe3fSmrg [0], [_libtool_name=[$]$1], 15001bedbe3fSmrg [1], [_libtool_name=$lt_[]$1], 15011bedbe3fSmrg [2], [_libtool_name=$lt_[]$1], 15021bedbe3fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 15031bedbe3fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 15041bedbe3fSmrg]) 1505ba6a1819Smrg 1506ba6a1819Smrg 15071bedbe3fSmrg# _LT_LIBTOOL_CONFIG_VARS 15081bedbe3fSmrg# ----------------------- 15091bedbe3fSmrg# Produce commented declarations of non-tagged libtool config variables 15101bedbe3fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 15111bedbe3fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 15121bedbe3fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 15131bedbe3fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 15141bedbe3fSmrg[m4_foreach([_lt_var], 15151bedbe3fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 15161bedbe3fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1517ba6a1819Smrg 1518ba6a1819Smrg 15191bedbe3fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 1520ba6a1819Smrg# ------------------------- 15211bedbe3fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 15221bedbe3fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 15231bedbe3fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524ba6a1819Smrg 1525ba6a1819Smrg 15261bedbe3fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 15271bedbe3fSmrg# ------------------------------ 15281bedbe3fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529549e21daSmrg 1530549e21daSmrg 15311bedbe3fSmrg# _LT_CONFIG_COMMANDS 15321bedbe3fSmrg# ------------------- 15331bedbe3fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 15341bedbe3fSmrg# variables for single and double quote escaping we saved from calls 15351bedbe3fSmrg# to _LT_DECL, we can put quote escaped variables declarations 15361bedbe3fSmrg# into `config.status', and then the shell code to quote escape them in 15371bedbe3fSmrg# for loops in `config.status'. Finally, any additional code accumulated 15381bedbe3fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 15391bedbe3fSmrgm4_defun([_LT_CONFIG_COMMANDS], 15401bedbe3fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 15411bedbe3fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 15421bedbe3fSmrg dnl instead of duplicating it all over again into config.status, 15431bedbe3fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 15441bedbe3fSmrg dnl needs to know what name is stored there: 15451bedbe3fSmrg [AC_CONFIG_COMMANDS([libtool], 15461bedbe3fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 15471bedbe3fSmrg dnl If the libtool generation code is destined for config.status, 15481bedbe3fSmrg dnl expand the accumulated commands and init code now: 15491bedbe3fSmrg [AC_CONFIG_COMMANDS([libtool], 15501bedbe3fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 15511bedbe3fSmrg])#_LT_CONFIG_COMMANDS 1552549e21daSmrg 1553549e21daSmrg 15541bedbe3fSmrg# Initialize. 15551bedbe3fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 15561bedbe3fSmrg[ 1557549e21daSmrg 15581bedbe3fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 15591bedbe3fSmrg# if CDPATH is set. 15601bedbe3fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1561549e21daSmrg 15621bedbe3fSmrgsed_quote_subst='$sed_quote_subst' 15631bedbe3fSmrgdouble_quote_subst='$double_quote_subst' 15641bedbe3fSmrgdelay_variable_subst='$delay_variable_subst' 15651bedbe3fSmrg_LT_CONFIG_STATUS_DECLARATIONS 15661bedbe3fSmrgLTCC='$LTCC' 15671bedbe3fSmrgLTCFLAGS='$LTCFLAGS' 15681bedbe3fSmrgcompiler='$compiler_DEFAULT' 1569549e21daSmrg 15701bedbe3fSmrg# A function that is used when there is no print builtin or printf. 15711bedbe3fSmrgfunc_fallback_echo () 15721bedbe3fSmrg{ 15731bedbe3fSmrg eval 'cat <<_LTECHO_EOF 15741bedbe3fSmrg\$[]1 15751bedbe3fSmrg_LTECHO_EOF' 15761bedbe3fSmrg} 1577549e21daSmrg 15781bedbe3fSmrg# Quote evaled strings. 15791bedbe3fSmrgfor var in lt_decl_all_varnames([[ \ 15801bedbe3fSmrg]], lt_decl_quote_varnames); do 15811bedbe3fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15821bedbe3fSmrg *[[\\\\\\\`\\"\\\$]]*) 15831bedbe3fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 15841bedbe3fSmrg ;; 15851bedbe3fSmrg *) 15861bedbe3fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 15871bedbe3fSmrg ;; 15881bedbe3fSmrg esac 15891bedbe3fSmrgdone 1590549e21daSmrg 15911bedbe3fSmrg# Double-quote double-evaled strings. 15921bedbe3fSmrgfor var in lt_decl_all_varnames([[ \ 15931bedbe3fSmrg]], lt_decl_dquote_varnames); do 15941bedbe3fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15951bedbe3fSmrg *[[\\\\\\\`\\"\\\$]]*) 15961bedbe3fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 15971bedbe3fSmrg ;; 15981bedbe3fSmrg *) 15991bedbe3fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 16001bedbe3fSmrg ;; 16011bedbe3fSmrg esac 16021bedbe3fSmrgdone 1603549e21daSmrg 16041bedbe3fSmrg_LT_OUTPUT_LIBTOOL_INIT 16051bedbe3fSmrg]) 1606549e21daSmrg 16071bedbe3fSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 16081bedbe3fSmrg# ------------------------------------ 16091bedbe3fSmrg# Generate a child script FILE with all initialization necessary to 16101bedbe3fSmrg# reuse the environment learned by the parent script, and make the 16111bedbe3fSmrg# file executable. If COMMENT is supplied, it is inserted after the 16121bedbe3fSmrg# `#!' sequence but before initialization text begins. After this 16131bedbe3fSmrg# macro, additional text can be appended to FILE to form the body of 16141bedbe3fSmrg# the child script. The macro ends with non-zero status if the 16151bedbe3fSmrg# file could not be fully written (such as if the disk is full). 16161bedbe3fSmrgm4_ifdef([AS_INIT_GENERATED], 16171bedbe3fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 16181bedbe3fSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 16191bedbe3fSmrg[m4_require([AS_PREPARE])]dnl 16201bedbe3fSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 16211bedbe3fSmrg[lt_write_fail=0 16221bedbe3fSmrgcat >$1 <<_ASEOF || lt_write_fail=1 16231bedbe3fSmrg#! $SHELL 16241bedbe3fSmrg# Generated by $as_me. 16251bedbe3fSmrg$2 16261bedbe3fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 16271bedbe3fSmrgexport SHELL 16281bedbe3fSmrg_ASEOF 16291bedbe3fSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 16301bedbe3fSmrgAS_SHELL_SANITIZE 16311bedbe3fSmrg_AS_PREPARE 16321bedbe3fSmrgexec AS_MESSAGE_FD>&1 16331bedbe3fSmrg_ASEOF 16341bedbe3fSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 16351bedbe3fSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636549e21daSmrg 16371bedbe3fSmrg# LT_OUTPUT 16381bedbe3fSmrg# --------- 16391bedbe3fSmrg# This macro allows early generation of the libtool script (before 16401bedbe3fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 16411bedbe3fSmrg# tests. 16421bedbe3fSmrgAC_DEFUN([LT_OUTPUT], 16431bedbe3fSmrg[: ${CONFIG_LT=./config.lt} 16441bedbe3fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 16451bedbe3fSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 16461bedbe3fSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 1647549e21daSmrg 16481bedbe3fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 16491bedbe3fSmrglt_cl_silent=false 16501bedbe3fSmrgexec AS_MESSAGE_LOG_FD>>config.log 16511bedbe3fSmrg{ 16521bedbe3fSmrg echo 16531bedbe3fSmrg AS_BOX([Running $as_me.]) 16541bedbe3fSmrg} >&AS_MESSAGE_LOG_FD 1655549e21daSmrg 16561bedbe3fSmrglt_cl_help="\ 16571bedbe3fSmrg\`$as_me' creates a local libtool stub from the current configuration, 16581bedbe3fSmrgfor use in further configure time tests before the real libtool is 16591bedbe3fSmrggenerated. 1660549e21daSmrg 16611bedbe3fSmrgUsage: $[0] [[OPTIONS]] 1662549e21daSmrg 16631bedbe3fSmrg -h, --help print this help, then exit 16641bedbe3fSmrg -V, --version print version number, then exit 16651bedbe3fSmrg -q, --quiet do not print progress messages 16661bedbe3fSmrg -d, --debug don't remove temporary files 1667549e21daSmrg 16681bedbe3fSmrgReport bugs to <bug-libtool@gnu.org>." 1669549e21daSmrg 16701bedbe3fSmrglt_cl_version="\ 16711bedbe3fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 16721bedbe3fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 16731bedbe3fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1674549e21daSmrg 16751bedbe3fSmrgCopyright (C) 2011 Free Software Foundation, Inc. 16761bedbe3fSmrgThis config.lt script is free software; the Free Software Foundation 16771bedbe3fSmrggives unlimited permision to copy, distribute and modify it." 1678549e21daSmrg 16791bedbe3fSmrgwhile test $[#] != 0 16801bedbe3fSmrgdo 16811bedbe3fSmrg case $[1] in 16821bedbe3fSmrg --version | --v* | -V ) 16831bedbe3fSmrg echo "$lt_cl_version"; exit 0 ;; 16841bedbe3fSmrg --help | --h* | -h ) 16851bedbe3fSmrg echo "$lt_cl_help"; exit 0 ;; 16861bedbe3fSmrg --debug | --d* | -d ) 16871bedbe3fSmrg debug=: ;; 16881bedbe3fSmrg --quiet | --q* | --silent | --s* | -q ) 16891bedbe3fSmrg lt_cl_silent=: ;; 1690549e21daSmrg 16911bedbe3fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 16921bedbe3fSmrgTry \`$[0] --help' for more information.]) ;; 1693549e21daSmrg 16941bedbe3fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 16951bedbe3fSmrgTry \`$[0] --help' for more information.]) ;; 16961bedbe3fSmrg esac 16971bedbe3fSmrg shift 16981bedbe3fSmrgdone 1699549e21daSmrg 17001bedbe3fSmrgif $lt_cl_silent; then 17011bedbe3fSmrg exec AS_MESSAGE_FD>/dev/null 17021bedbe3fSmrgfi 17031bedbe3fSmrg_LTEOF 1704549e21daSmrg 17051bedbe3fSmrgcat >>"$CONFIG_LT" <<_LTEOF 17061bedbe3fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 17071bedbe3fSmrg_LTEOF 1708549e21daSmrg 17091bedbe3fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 17101bedbe3fSmrgAC_MSG_NOTICE([creating $ofile]) 17111bedbe3fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 17121bedbe3fSmrgAS_EXIT(0) 17131bedbe3fSmrg_LTEOF 17141bedbe3fSmrgchmod +x "$CONFIG_LT" 1715549e21daSmrg 17161bedbe3fSmrg# configure is writing to config.log, but config.lt does its own redirection, 17171bedbe3fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 17181bedbe3fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 17191bedbe3fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 17201bedbe3fSmrglt_cl_success=: 17211bedbe3fSmrgtest "$silent" = yes && 17221bedbe3fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 17231bedbe3fSmrgexec AS_MESSAGE_LOG_FD>/dev/null 17241bedbe3fSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 17251bedbe3fSmrgexec AS_MESSAGE_LOG_FD>>config.log 17261bedbe3fSmrg$lt_cl_success || AS_EXIT(1) 17271bedbe3fSmrg])# LT_OUTPUT 1728549e21daSmrg 1729549e21daSmrg 17301bedbe3fSmrg# _LT_CONFIG(TAG) 17311bedbe3fSmrg# --------------- 17321bedbe3fSmrg# If TAG is the built-in tag, create an initial libtool script with a 17331bedbe3fSmrg# default configuration from the untagged config vars. Otherwise add code 17341bedbe3fSmrg# to config.status for appending the configuration named by TAG from the 17351bedbe3fSmrg# matching tagged config vars. 17361bedbe3fSmrgm4_defun([_LT_CONFIG], 17371bedbe3fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 17381bedbe3fSmrg_LT_CONFIG_SAVE_COMMANDS([ 17391bedbe3fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 17401bedbe3fSmrg m4_if(_LT_TAG, [C], [ 17411bedbe3fSmrg # See if we are running on zsh, and set the options which allow our 17421bedbe3fSmrg # commands through without removal of \ escapes. 17431bedbe3fSmrg if test -n "${ZSH_VERSION+set}" ; then 17441bedbe3fSmrg setopt NO_GLOB_SUBST 17451bedbe3fSmrg fi 1746549e21daSmrg 17471bedbe3fSmrg cfgfile="${ofile}T" 17481bedbe3fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 17491bedbe3fSmrg $RM "$cfgfile" 1750549e21daSmrg 17511bedbe3fSmrg cat <<_LT_EOF >> "$cfgfile" 17521bedbe3fSmrg#! $SHELL 1753549e21daSmrg 17541bedbe3fSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 17551bedbe3fSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 17561bedbe3fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 17571bedbe3fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 17581bedbe3fSmrg# 17591bedbe3fSmrg_LT_COPYING 17601bedbe3fSmrg_LT_LIBTOOL_TAGS 1761ba6a1819Smrg 17621bedbe3fSmrg# ### BEGIN LIBTOOL CONFIG 17631bedbe3fSmrg_LT_LIBTOOL_CONFIG_VARS 17641bedbe3fSmrg_LT_LIBTOOL_TAG_VARS 17651bedbe3fSmrg# ### END LIBTOOL CONFIG 1766ba6a1819Smrg 17671bedbe3fSmrg_LT_EOF 1768ba6a1819Smrg 17691bedbe3fSmrg case $host_os in 17701bedbe3fSmrg aix3*) 17711bedbe3fSmrg cat <<\_LT_EOF >> "$cfgfile" 17721bedbe3fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 17731bedbe3fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 17741bedbe3fSmrg# vanish in a puff of smoke. 17751bedbe3fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 17761bedbe3fSmrg COLLECT_NAMES= 17771bedbe3fSmrg export COLLECT_NAMES 17781bedbe3fSmrgfi 17791bedbe3fSmrg_LT_EOF 17801bedbe3fSmrg ;; 1781549e21daSmrg esac 1782549e21daSmrg 17831bedbe3fSmrg _LT_PROG_LTMAIN 1784549e21daSmrg 17851bedbe3fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 17861bedbe3fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 17871bedbe3fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 17881bedbe3fSmrg # is reportedly fixed, but why not run on old versions too? 17891bedbe3fSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 17901bedbe3fSmrg || (rm -f "$cfgfile"; exit 1) 1791549e21daSmrg 17921bedbe3fSmrg _LT_PROG_REPLACE_SHELLFNS 1793ba6a1819Smrg 17941bedbe3fSmrg mv -f "$cfgfile" "$ofile" || 17951bedbe3fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 17961bedbe3fSmrg chmod +x "$ofile" 17971bedbe3fSmrg], 17981bedbe3fSmrg[cat <<_LT_EOF >> "$ofile" 1799549e21daSmrg 18001bedbe3fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 18011bedbe3fSmrgdnl in a comment (ie after a #). 18021bedbe3fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 18031bedbe3fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 18041bedbe3fSmrg# ### END LIBTOOL TAG CONFIG: $1 18051bedbe3fSmrg_LT_EOF 18061bedbe3fSmrg])dnl /m4_if 18071bedbe3fSmrg], 18081bedbe3fSmrg[m4_if([$1], [], [ 18091bedbe3fSmrg PACKAGE='$PACKAGE' 18101bedbe3fSmrg VERSION='$VERSION' 18111bedbe3fSmrg TIMESTAMP='$TIMESTAMP' 18121bedbe3fSmrg RM='$RM' 18131bedbe3fSmrg ofile='$ofile'], []) 18141bedbe3fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 18151bedbe3fSmrg])# _LT_CONFIG 1816ba6a1819Smrg 1817ba6a1819Smrg 18181bedbe3fSmrg# LT_SUPPORTED_TAG(TAG) 18191bedbe3fSmrg# --------------------- 18201bedbe3fSmrg# Trace this macro to discover what tags are supported by the libtool 18211bedbe3fSmrg# --tag option, using: 18221bedbe3fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 18231bedbe3fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1824ba6a1819Smrg 1825ba6a1819Smrg 18261bedbe3fSmrg# C support is built-in for now 18271bedbe3fSmrgm4_define([_LT_LANG_C_enabled], []) 18281bedbe3fSmrgm4_define([_LT_TAGS], []) 1829ba6a1819Smrg 1830ba6a1819Smrg 18311bedbe3fSmrg# LT_LANG(LANG) 18321bedbe3fSmrg# ------------- 18331bedbe3fSmrg# Enable libtool support for the given language if not already enabled. 18341bedbe3fSmrgAC_DEFUN([LT_LANG], 18351bedbe3fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 18361bedbe3fSmrgm4_case([$1], 18371bedbe3fSmrg [C], [_LT_LANG(C)], 18381bedbe3fSmrg [C++], [_LT_LANG(CXX)], 18391bedbe3fSmrg [Go], [_LT_LANG(GO)], 18401bedbe3fSmrg [Java], [_LT_LANG(GCJ)], 18411bedbe3fSmrg [Fortran 77], [_LT_LANG(F77)], 18421bedbe3fSmrg [Fortran], [_LT_LANG(FC)], 18431bedbe3fSmrg [Windows Resource], [_LT_LANG(RC)], 18441bedbe3fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 18451bedbe3fSmrg [_LT_LANG($1)], 18461bedbe3fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 18471bedbe3fSmrg])# LT_LANG 1848ba6a1819Smrg 1849ba6a1819Smrg 18501bedbe3fSmrg# _LT_LANG(LANGNAME) 18511bedbe3fSmrg# ------------------ 18521bedbe3fSmrgm4_defun([_LT_LANG], 18531bedbe3fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 18541bedbe3fSmrg [LT_SUPPORTED_TAG([$1])dnl 18551bedbe3fSmrg m4_append([_LT_TAGS], [$1 ])dnl 18561bedbe3fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 18571bedbe3fSmrg _LT_LANG_$1_CONFIG($1)])dnl 18581bedbe3fSmrg])# _LT_LANG 1859ba6a1819Smrg 1860ba6a1819Smrg 18611bedbe3fSmrgm4_ifndef([AC_PROG_GO], [ 18621bedbe3fSmrg# NOTE: This macro has been submitted for inclusion into # 18631bedbe3fSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 18641bedbe3fSmrg# a released version of Autoconf we should remove this # 18651bedbe3fSmrg# macro and use it instead. # 18661bedbe3fSmrgm4_defun([AC_PROG_GO], 18671bedbe3fSmrg[AC_LANG_PUSH(Go)dnl 18681bedbe3fSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 18691bedbe3fSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 18701bedbe3fSmrg_AC_ARG_VAR_LDFLAGS()dnl 18711bedbe3fSmrgAC_CHECK_TOOL(GOC, gccgo) 18721bedbe3fSmrgif test -z "$GOC"; then 18731bedbe3fSmrg if test -n "$ac_tool_prefix"; then 18741bedbe3fSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1875ba6a1819Smrg fi 18761bedbe3fSmrgfi 18771bedbe3fSmrgif test -z "$GOC"; then 18781bedbe3fSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 18791bedbe3fSmrgfi 18801bedbe3fSmrg])#m4_defun 18811bedbe3fSmrg])#m4_ifndef 1882ba6a1819Smrg 1883ba6a1819Smrg 18841bedbe3fSmrg# _LT_LANG_DEFAULT_CONFIG 18851bedbe3fSmrg# ----------------------- 18861bedbe3fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 18871bedbe3fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 18881bedbe3fSmrg [LT_LANG(CXX)], 18891bedbe3fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890ba6a1819Smrg 18911bedbe3fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 18921bedbe3fSmrg [LT_LANG(F77)], 18931bedbe3fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894ba6a1819Smrg 18951bedbe3fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 18961bedbe3fSmrg [LT_LANG(FC)], 18971bedbe3fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898ba6a1819Smrg 18991bedbe3fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 19001bedbe3fSmrgdnl pulling things in needlessly. 19011bedbe3fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 19021bedbe3fSmrg [LT_LANG(GCJ)], 19031bedbe3fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 19041bedbe3fSmrg [LT_LANG(GCJ)], 19051bedbe3fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 19061bedbe3fSmrg [LT_LANG(GCJ)], 19071bedbe3fSmrg [m4_ifdef([AC_PROG_GCJ], 19081bedbe3fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 19091bedbe3fSmrg m4_ifdef([A][M_PROG_GCJ], 19101bedbe3fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 19111bedbe3fSmrg m4_ifdef([LT_PROG_GCJ], 19121bedbe3fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913ba6a1819Smrg 19141bedbe3fSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 19151bedbe3fSmrg [LT_LANG(GO)], 19161bedbe3fSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1917ba6a1819Smrg 19181bedbe3fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 19191bedbe3fSmrg [LT_LANG(RC)], 19201bedbe3fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 19211bedbe3fSmrg])# _LT_LANG_DEFAULT_CONFIG 1922ba6a1819Smrg 19231bedbe3fSmrg# Obsolete macros: 19241bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 19251bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 19261bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 19271bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 19281bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 19291bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 19301bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 19311bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 19321bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 19331bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 19341bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935549e21daSmrg 1936549e21daSmrg 19371bedbe3fSmrg# _LT_TAG_COMPILER 19381bedbe3fSmrg# ---------------- 19391bedbe3fSmrgm4_defun([_LT_TAG_COMPILER], 19401bedbe3fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1941549e21daSmrg 19421bedbe3fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 19431bedbe3fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 19441bedbe3fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 19451bedbe3fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946549e21daSmrg 19471bedbe3fSmrg# If no C compiler was specified, use CC. 19481bedbe3fSmrgLTCC=${LTCC-"$CC"} 1949549e21daSmrg 19501bedbe3fSmrg# If no C compiler flags were specified, use CFLAGS. 19511bedbe3fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952549e21daSmrg 19531bedbe3fSmrg# Allow CC to be a program name with arguments. 19541bedbe3fSmrgcompiler=$CC 19551bedbe3fSmrg])# _LT_TAG_COMPILER 1956549e21daSmrg 1957549e21daSmrg 19581bedbe3fSmrg# _LT_COMPILER_BOILERPLATE 19591bedbe3fSmrg# ------------------------ 19601bedbe3fSmrg# Check for compiler boilerplate output or warnings with 19611bedbe3fSmrg# the simple compiler test code. 19621bedbe3fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 19631bedbe3fSmrg[m4_require([_LT_DECL_SED])dnl 19641bedbe3fSmrgac_outfile=conftest.$ac_objext 19651bedbe3fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 19661bedbe3fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19671bedbe3fSmrg_lt_compiler_boilerplate=`cat conftest.err` 19681bedbe3fSmrg$RM conftest* 19691bedbe3fSmrg])# _LT_COMPILER_BOILERPLATE 1970549e21daSmrg 1971549e21daSmrg 19721bedbe3fSmrg# _LT_LINKER_BOILERPLATE 19731bedbe3fSmrg# ---------------------- 19741bedbe3fSmrg# Check for linker boilerplate output or warnings with 19751bedbe3fSmrg# the simple link test code. 19761bedbe3fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 19771bedbe3fSmrg[m4_require([_LT_DECL_SED])dnl 19781bedbe3fSmrgac_outfile=conftest.$ac_objext 19791bedbe3fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 19801bedbe3fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19811bedbe3fSmrg_lt_linker_boilerplate=`cat conftest.err` 19821bedbe3fSmrg$RM -r conftest* 19831bedbe3fSmrg])# _LT_LINKER_BOILERPLATE 1984549e21daSmrg 19851bedbe3fSmrg# _LT_REQUIRED_DARWIN_CHECKS 19861bedbe3fSmrg# ------------------------- 19871bedbe3fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 19881bedbe3fSmrg case $host_os in 19891bedbe3fSmrg rhapsody* | darwin*) 19901bedbe3fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 19911bedbe3fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 19921bedbe3fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 19931bedbe3fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 19941bedbe3fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 19951bedbe3fSmrg _LT_DECL([], [DSYMUTIL], [1], 19961bedbe3fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 19971bedbe3fSmrg _LT_DECL([], [NMEDIT], [1], 19981bedbe3fSmrg [Tool to change global to local symbols on Mac OS X]) 19991bedbe3fSmrg _LT_DECL([], [LIPO], [1], 20001bedbe3fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 20011bedbe3fSmrg _LT_DECL([], [OTOOL], [1], 20021bedbe3fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 20031bedbe3fSmrg _LT_DECL([], [OTOOL64], [1], 20041bedbe3fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2005549e21daSmrg 20061bedbe3fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 20071bedbe3fSmrg [lt_cv_apple_cc_single_mod=no 20081bedbe3fSmrg if test -z "${LT_MULTI_MODULE}"; then 20091bedbe3fSmrg # By default we will add the -single_module flag. You can override 20101bedbe3fSmrg # by either setting the environment variable LT_MULTI_MODULE 20111bedbe3fSmrg # non-empty at configure time, or by adding -multi_module to the 20121bedbe3fSmrg # link flags. 20131bedbe3fSmrg rm -rf libconftest.dylib* 20141bedbe3fSmrg echo "int foo(void){return 1;}" > conftest.c 20151bedbe3fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20161bedbe3fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 20171bedbe3fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20181bedbe3fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 20191bedbe3fSmrg _lt_result=$? 20201bedbe3fSmrg # If there is a non-empty error log, and "single_module" 20211bedbe3fSmrg # appears in it, assume the flag caused a linker warning 20221bedbe3fSmrg if test -s conftest.err && $GREP single_module conftest.err; then 20231bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20241bedbe3fSmrg # Otherwise, if the output was created with a 0 exit code from 20251bedbe3fSmrg # the compiler, it worked. 20261bedbe3fSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 20271bedbe3fSmrg lt_cv_apple_cc_single_mod=yes 20281bedbe3fSmrg else 20291bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20301bedbe3fSmrg fi 20311bedbe3fSmrg rm -rf libconftest.dylib* 20321bedbe3fSmrg rm -f conftest.* 20331bedbe3fSmrg fi]) 2034549e21daSmrg 20351bedbe3fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 20361bedbe3fSmrg [lt_cv_ld_exported_symbols_list], 20371bedbe3fSmrg [lt_cv_ld_exported_symbols_list=no 20381bedbe3fSmrg save_LDFLAGS=$LDFLAGS 20391bedbe3fSmrg echo "_main" > conftest.sym 20401bedbe3fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 20411bedbe3fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 20421bedbe3fSmrg [lt_cv_ld_exported_symbols_list=yes], 20431bedbe3fSmrg [lt_cv_ld_exported_symbols_list=no]) 20441bedbe3fSmrg LDFLAGS="$save_LDFLAGS" 20451bedbe3fSmrg ]) 2046549e21daSmrg 20471bedbe3fSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 20481bedbe3fSmrg [lt_cv_ld_force_load=no 20491bedbe3fSmrg cat > conftest.c << _LT_EOF 20501bedbe3fSmrgint forced_loaded() { return 2;} 20511bedbe3fSmrg_LT_EOF 20521bedbe3fSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 20531bedbe3fSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 20541bedbe3fSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 20551bedbe3fSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 20561bedbe3fSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 20571bedbe3fSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 20581bedbe3fSmrg cat > conftest.c << _LT_EOF 20591bedbe3fSmrgint main() { return 0;} 20601bedbe3fSmrg_LT_EOF 20611bedbe3fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 20621bedbe3fSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 20631bedbe3fSmrg _lt_result=$? 20641bedbe3fSmrg if test -s conftest.err && $GREP force_load conftest.err; then 20651bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20661bedbe3fSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 20671bedbe3fSmrg lt_cv_ld_force_load=yes 20681bedbe3fSmrg else 20691bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20701bedbe3fSmrg fi 20711bedbe3fSmrg rm -f conftest.err libconftest.a conftest conftest.c 20721bedbe3fSmrg rm -rf conftest.dSYM 20731bedbe3fSmrg ]) 20741bedbe3fSmrg case $host_os in 20751bedbe3fSmrg rhapsody* | darwin1.[[012]]) 20761bedbe3fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 20771bedbe3fSmrg darwin1.*) 20781bedbe3fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20791bedbe3fSmrg darwin*) # darwin 5.x on 20801bedbe3fSmrg # if running on 10.5 or later, the deployment target defaults 20811bedbe3fSmrg # to the OS version, if on x86, and 10.4, the deployment 20821bedbe3fSmrg # target defaults to 10.4. Don't you love it? 20831bedbe3fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 20841bedbe3fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 20851bedbe3fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20861bedbe3fSmrg 10.[[012]]*) 20871bedbe3fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20881bedbe3fSmrg 10.*) 20891bedbe3fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20901bedbe3fSmrg esac 20911bedbe3fSmrg ;; 20921bedbe3fSmrg esac 20931bedbe3fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 20941bedbe3fSmrg _lt_dar_single_mod='$single_module' 20951bedbe3fSmrg fi 20961bedbe3fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 20971bedbe3fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 20981bedbe3fSmrg else 20991bedbe3fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 21001bedbe3fSmrg fi 21011bedbe3fSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 21021bedbe3fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 21031bedbe3fSmrg else 21041bedbe3fSmrg _lt_dsymutil= 21051bedbe3fSmrg fi 21061bedbe3fSmrg ;; 21071bedbe3fSmrg esac 2108549e21daSmrg]) 2109549e21daSmrg 2110549e21daSmrg 21111bedbe3fSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 21121bedbe3fSmrg# --------------------------------- 21131bedbe3fSmrg# Checks for linker and compiler features on darwin 21141bedbe3fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 21151bedbe3fSmrg[ 21161bedbe3fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 21171bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 21181bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 21191bedbe3fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 21201bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 21211bedbe3fSmrg if test "$lt_cv_ld_force_load" = "yes"; then 21221bedbe3fSmrg _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\"`' 21231bedbe3fSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 21241bedbe3fSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 21251bedbe3fSmrg else 21261bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 21271bedbe3fSmrg fi 21281bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 21291bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 21301bedbe3fSmrg case $cc_basename in 21311bedbe3fSmrg ifort*) _lt_dar_can_shared=yes ;; 21321bedbe3fSmrg *) _lt_dar_can_shared=$GCC ;; 21331bedbe3fSmrg esac 21341bedbe3fSmrg if test "$_lt_dar_can_shared" = "yes"; then 21351bedbe3fSmrg output_verbose_link_cmd=func_echo_all 21361bedbe3fSmrg _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}" 21371bedbe3fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 21381bedbe3fSmrg _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}" 21391bedbe3fSmrg _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}" 21401bedbe3fSmrg m4_if([$1], [CXX], 21411bedbe3fSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 21421bedbe3fSmrg _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}" 21431bedbe3fSmrg _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}" 21441bedbe3fSmrg fi 21451bedbe3fSmrg],[]) 21461bedbe3fSmrg else 21471bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 21481bedbe3fSmrg fi 21491bedbe3fSmrg]) 2150549e21daSmrg 21511bedbe3fSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 21521bedbe3fSmrg# ---------------------------------- 21531bedbe3fSmrg# Links a minimal program and checks the executable 21541bedbe3fSmrg# for the system default hardcoded library path. In most cases, 21551bedbe3fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 21561bedbe3fSmrg# the location of the communication and MPI libs are included too. 21571bedbe3fSmrg# If we don't find anything, use the default library path according 21581bedbe3fSmrg# to the aix ld manual. 21591bedbe3fSmrg# Store the results from the different compilers for each TAGNAME. 21601bedbe3fSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 21611bedbe3fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 21621bedbe3fSmrg[m4_require([_LT_DECL_SED])dnl 21631bedbe3fSmrgif test "${lt_cv_aix_libpath+set}" = set; then 21641bedbe3fSmrg aix_libpath=$lt_cv_aix_libpath 21651bedbe3fSmrgelse 21661bedbe3fSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 21671bedbe3fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 21681bedbe3fSmrg lt_aix_libpath_sed='[ 21691bedbe3fSmrg /Import File Strings/,/^$/ { 21701bedbe3fSmrg /^0/ { 21711bedbe3fSmrg s/^0 *\([^ ]*\) *$/\1/ 21721bedbe3fSmrg p 21731bedbe3fSmrg } 21741bedbe3fSmrg }]' 21751bedbe3fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21761bedbe3fSmrg # Check for a 64-bit object if we didn't find anything. 21771bedbe3fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21781bedbe3fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21791bedbe3fSmrg fi],[]) 21801bedbe3fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21811bedbe3fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 21821bedbe3fSmrg fi 21831bedbe3fSmrg ]) 21841bedbe3fSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 21851bedbe3fSmrgfi 21861bedbe3fSmrg])# _LT_SYS_MODULE_PATH_AIX 2187549e21daSmrg 2188549e21daSmrg 21891bedbe3fSmrg# _LT_SHELL_INIT(ARG) 21901bedbe3fSmrg# ------------------- 21911bedbe3fSmrgm4_define([_LT_SHELL_INIT], 21921bedbe3fSmrg[m4_divert_text([M4SH-INIT], [$1 21931bedbe3fSmrg])])# _LT_SHELL_INIT 2194549e21daSmrg 2195549e21daSmrg 2196549e21daSmrg 21971bedbe3fSmrg# _LT_PROG_ECHO_BACKSLASH 21981bedbe3fSmrg# ----------------------- 21991bedbe3fSmrg# Find how we can fake an echo command that does not interpret backslash. 22001bedbe3fSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 22011bedbe3fSmrg# of the generated configure script which will find a shell with a builtin 22021bedbe3fSmrg# printf (which we can use as an echo command). 22031bedbe3fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 22041bedbe3fSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22051bedbe3fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22061bedbe3fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2207549e21daSmrg 22081bedbe3fSmrgAC_MSG_CHECKING([how to print strings]) 22091bedbe3fSmrg# Test print first, because it will be a builtin if present. 22101bedbe3fSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 22111bedbe3fSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 22121bedbe3fSmrg ECHO='print -r --' 22131bedbe3fSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 22141bedbe3fSmrg ECHO='printf %s\n' 22151bedbe3fSmrgelse 22161bedbe3fSmrg # Use this function as a fallback that always works. 22171bedbe3fSmrg func_fallback_echo () 22181bedbe3fSmrg { 22191bedbe3fSmrg eval 'cat <<_LTECHO_EOF 22201bedbe3fSmrg$[]1 22211bedbe3fSmrg_LTECHO_EOF' 22221bedbe3fSmrg } 22231bedbe3fSmrg ECHO='func_fallback_echo' 22241bedbe3fSmrgfi 2225549e21daSmrg 22261bedbe3fSmrg# func_echo_all arg... 22271bedbe3fSmrg# Invoke $ECHO with all args, space-separated. 22281bedbe3fSmrgfunc_echo_all () 22291bedbe3fSmrg{ 22301bedbe3fSmrg $ECHO "$*" 22311bedbe3fSmrg} 2232549e21daSmrg 22331bedbe3fSmrgcase "$ECHO" in 22341bedbe3fSmrg printf*) AC_MSG_RESULT([printf]) ;; 22351bedbe3fSmrg print*) AC_MSG_RESULT([print -r]) ;; 22361bedbe3fSmrg *) AC_MSG_RESULT([cat]) ;; 22371bedbe3fSmrgesac 2238549e21daSmrg 22391bedbe3fSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 22401bedbe3fSmrg[_AS_DETECT_SUGGESTED([ 22411bedbe3fSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 22421bedbe3fSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22431bedbe3fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22441bedbe3fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 22451bedbe3fSmrg PATH=/empty FPATH=/empty; export PATH FPATH 22461bedbe3fSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 22471bedbe3fSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248549e21daSmrg 22491bedbe3fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 22501bedbe3fSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 22511bedbe3fSmrg])# _LT_PROG_ECHO_BACKSLASH 2252549e21daSmrg 2253549e21daSmrg 22541bedbe3fSmrg# _LT_WITH_SYSROOT 2255549e21daSmrg# ---------------- 22561bedbe3fSmrgAC_DEFUN([_LT_WITH_SYSROOT], 22571bedbe3fSmrg[AC_MSG_CHECKING([for sysroot]) 22581bedbe3fSmrgAC_ARG_WITH([sysroot], 22591bedbe3fSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 22601bedbe3fSmrg (or the compiler's sysroot if not specified).], 22611bedbe3fSmrg[], [with_sysroot=no]) 22621bedbe3fSmrg 22631bedbe3fSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 22641bedbe3fSmrgdnl in case the user passed a directory name. 22651bedbe3fSmrglt_sysroot= 22661bedbe3fSmrgcase ${with_sysroot} in #( 22671bedbe3fSmrg yes) 22681bedbe3fSmrg if test "$GCC" = yes; then 22691bedbe3fSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 22701bedbe3fSmrg fi 22711bedbe3fSmrg ;; #( 22721bedbe3fSmrg /*) 22731bedbe3fSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 22741bedbe3fSmrg ;; #( 22751bedbe3fSmrg no|'') 22761bedbe3fSmrg ;; #( 22771bedbe3fSmrg *) 22781bedbe3fSmrg AC_MSG_RESULT([${with_sysroot}]) 22791bedbe3fSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 22801bedbe3fSmrg ;; 22811bedbe3fSmrgesac 2282549e21daSmrg 22831bedbe3fSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 22841bedbe3fSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 22851bedbe3fSmrg[dependent libraries, and in which our libraries should be installed.])]) 2286549e21daSmrg 22871bedbe3fSmrg# _LT_ENABLE_LOCK 22881bedbe3fSmrg# --------------- 22891bedbe3fSmrgm4_defun([_LT_ENABLE_LOCK], 22901bedbe3fSmrg[AC_ARG_ENABLE([libtool-lock], 22911bedbe3fSmrg [AS_HELP_STRING([--disable-libtool-lock], 22921bedbe3fSmrg [avoid locking (might break parallel builds)])]) 22931bedbe3fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2294549e21daSmrg 22951bedbe3fSmrg# Some flags need to be propagated to the compiler or linker for good 22961bedbe3fSmrg# libtool support. 22971bedbe3fSmrgcase $host in 22981bedbe3fSmrgia64-*-hpux*) 22991bedbe3fSmrg # Find out which ABI we are using. 23001bedbe3fSmrg echo 'int i;' > conftest.$ac_ext 23011bedbe3fSmrg if AC_TRY_EVAL(ac_compile); then 23021bedbe3fSmrg case `/usr/bin/file conftest.$ac_objext` in 23031bedbe3fSmrg *ELF-32*) 23041bedbe3fSmrg HPUX_IA64_MODE="32" 23051bedbe3fSmrg ;; 23061bedbe3fSmrg *ELF-64*) 23071bedbe3fSmrg HPUX_IA64_MODE="64" 23081bedbe3fSmrg ;; 23091bedbe3fSmrg esac 23101bedbe3fSmrg fi 23111bedbe3fSmrg rm -rf conftest* 23121bedbe3fSmrg ;; 23131bedbe3fSmrg*-*-irix6*) 23141bedbe3fSmrg # Find out which ABI we are using. 23151bedbe3fSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 23161bedbe3fSmrg if AC_TRY_EVAL(ac_compile); then 23171bedbe3fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 23181bedbe3fSmrg case `/usr/bin/file conftest.$ac_objext` in 23191bedbe3fSmrg *32-bit*) 23201bedbe3fSmrg LD="${LD-ld} -melf32bsmip" 23211bedbe3fSmrg ;; 23221bedbe3fSmrg *N32*) 23231bedbe3fSmrg LD="${LD-ld} -melf32bmipn32" 23241bedbe3fSmrg ;; 23251bedbe3fSmrg *64-bit*) 23261bedbe3fSmrg LD="${LD-ld} -melf64bmip" 23271bedbe3fSmrg ;; 23281bedbe3fSmrg esac 23291bedbe3fSmrg else 23301bedbe3fSmrg case `/usr/bin/file conftest.$ac_objext` in 23311bedbe3fSmrg *32-bit*) 23321bedbe3fSmrg LD="${LD-ld} -32" 23331bedbe3fSmrg ;; 23341bedbe3fSmrg *N32*) 23351bedbe3fSmrg LD="${LD-ld} -n32" 23361bedbe3fSmrg ;; 23371bedbe3fSmrg *64-bit*) 23381bedbe3fSmrg LD="${LD-ld} -64" 23391bedbe3fSmrg ;; 23401bedbe3fSmrg esac 23411bedbe3fSmrg fi 23421bedbe3fSmrg fi 23431bedbe3fSmrg rm -rf conftest* 23441bedbe3fSmrg ;; 2345549e21daSmrg 23461bedbe3fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 23471bedbe3fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 23481bedbe3fSmrg # Find out which ABI we are using. 23491bedbe3fSmrg echo 'int i;' > conftest.$ac_ext 23501bedbe3fSmrg if AC_TRY_EVAL(ac_compile); then 23511bedbe3fSmrg case `/usr/bin/file conftest.o` in 23521bedbe3fSmrg *32-bit*) 23531bedbe3fSmrg case $host in 23541bedbe3fSmrg x86_64-*kfreebsd*-gnu) 23551bedbe3fSmrg LD="${LD-ld} -m elf_i386_fbsd" 23561bedbe3fSmrg ;; 23571bedbe3fSmrg x86_64-*linux*) 23581bedbe3fSmrg LD="${LD-ld} -m elf_i386" 23591bedbe3fSmrg ;; 23601bedbe3fSmrg ppc64-*linux*|powerpc64-*linux*) 23611bedbe3fSmrg LD="${LD-ld} -m elf32ppclinux" 23621bedbe3fSmrg ;; 23631bedbe3fSmrg s390x-*linux*) 23641bedbe3fSmrg LD="${LD-ld} -m elf_s390" 23651bedbe3fSmrg ;; 23661bedbe3fSmrg sparc64-*linux*) 23671bedbe3fSmrg LD="${LD-ld} -m elf32_sparc" 23681bedbe3fSmrg ;; 23691bedbe3fSmrg esac 23701bedbe3fSmrg ;; 23711bedbe3fSmrg *64-bit*) 23721bedbe3fSmrg case $host in 23731bedbe3fSmrg x86_64-*kfreebsd*-gnu) 23741bedbe3fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 23751bedbe3fSmrg ;; 23761bedbe3fSmrg x86_64-*linux*) 23771bedbe3fSmrg LD="${LD-ld} -m elf_x86_64" 23781bedbe3fSmrg ;; 23791bedbe3fSmrg ppc*-*linux*|powerpc*-*linux*) 23801bedbe3fSmrg LD="${LD-ld} -m elf64ppc" 23811bedbe3fSmrg ;; 23821bedbe3fSmrg s390*-*linux*|s390*-*tpf*) 23831bedbe3fSmrg LD="${LD-ld} -m elf64_s390" 23841bedbe3fSmrg ;; 23851bedbe3fSmrg sparc*-*linux*) 23861bedbe3fSmrg LD="${LD-ld} -m elf64_sparc" 23871bedbe3fSmrg ;; 23881bedbe3fSmrg esac 23891bedbe3fSmrg ;; 2390549e21daSmrg esac 23911bedbe3fSmrg fi 23921bedbe3fSmrg rm -rf conftest* 23931bedbe3fSmrg ;; 2394549e21daSmrg 23951bedbe3fSmrg*-*-sco3.2v5*) 23961bedbe3fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 23971bedbe3fSmrg SAVE_CFLAGS="$CFLAGS" 23981bedbe3fSmrg CFLAGS="$CFLAGS -belf" 23991bedbe3fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 24001bedbe3fSmrg [AC_LANG_PUSH(C) 24011bedbe3fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 24021bedbe3fSmrg AC_LANG_POP]) 24031bedbe3fSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 24041bedbe3fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 24051bedbe3fSmrg CFLAGS="$SAVE_CFLAGS" 24061bedbe3fSmrg fi 24071bedbe3fSmrg ;; 24081bedbe3fSmrg*-*solaris*) 24091bedbe3fSmrg # Find out which ABI we are using. 24101bedbe3fSmrg echo 'int i;' > conftest.$ac_ext 24111bedbe3fSmrg if AC_TRY_EVAL(ac_compile); then 24121bedbe3fSmrg case `/usr/bin/file conftest.o` in 24131bedbe3fSmrg *64-bit*) 24141bedbe3fSmrg case $lt_cv_prog_gnu_ld in 24151bedbe3fSmrg yes*) 24161bedbe3fSmrg case $host in 24171bedbe3fSmrg i?86-*-solaris*) 24181bedbe3fSmrg LD="${LD-ld} -m elf_x86_64" 24191bedbe3fSmrg ;; 24201bedbe3fSmrg sparc*-*-solaris*) 24211bedbe3fSmrg LD="${LD-ld} -m elf64_sparc" 24221bedbe3fSmrg ;; 24231bedbe3fSmrg esac 24241bedbe3fSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 24251bedbe3fSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 24261bedbe3fSmrg LD="${LD-ld}_sol2" 24271bedbe3fSmrg fi 24281bedbe3fSmrg ;; 24291bedbe3fSmrg *) 24301bedbe3fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 24311bedbe3fSmrg LD="${LD-ld} -64" 24321bedbe3fSmrg fi 24331bedbe3fSmrg ;; 24341bedbe3fSmrg esac 2435549e21daSmrg ;; 2436549e21daSmrg esac 24371bedbe3fSmrg fi 24381bedbe3fSmrg rm -rf conftest* 24391bedbe3fSmrg ;; 24401bedbe3fSmrgesac 2441549e21daSmrg 24421bedbe3fSmrgneed_locks="$enable_libtool_lock" 24431bedbe3fSmrg])# _LT_ENABLE_LOCK 2444549e21daSmrg 2445549e21daSmrg 24461bedbe3fSmrg# _LT_PROG_AR 24471bedbe3fSmrg# ----------- 24481bedbe3fSmrgm4_defun([_LT_PROG_AR], 24491bedbe3fSmrg[AC_CHECK_TOOLS(AR, [ar], false) 24501bedbe3fSmrg: ${AR=ar} 24511bedbe3fSmrg: ${AR_FLAGS=cru} 24521bedbe3fSmrg_LT_DECL([], [AR], [1], [The archiver]) 24531bedbe3fSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 24541bedbe3fSmrg 24551bedbe3fSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 24561bedbe3fSmrg [lt_cv_ar_at_file=no 24571bedbe3fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 24581bedbe3fSmrg [echo conftest.$ac_objext > conftest.lst 24591bedbe3fSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 24601bedbe3fSmrg AC_TRY_EVAL([lt_ar_try]) 24611bedbe3fSmrg if test "$ac_status" -eq 0; then 24621bedbe3fSmrg # Ensure the archiver fails upon bogus file names. 24631bedbe3fSmrg rm -f conftest.$ac_objext libconftest.a 24641bedbe3fSmrg AC_TRY_EVAL([lt_ar_try]) 24651bedbe3fSmrg if test "$ac_status" -ne 0; then 24661bedbe3fSmrg lt_cv_ar_at_file=@ 24671bedbe3fSmrg fi 24681bedbe3fSmrg fi 24691bedbe3fSmrg rm -f conftest.* libconftest.a 24701bedbe3fSmrg ]) 24711bedbe3fSmrg ]) 2472549e21daSmrg 24731bedbe3fSmrgif test "x$lt_cv_ar_at_file" = xno; then 24741bedbe3fSmrg archiver_list_spec= 24751bedbe3fSmrgelse 24761bedbe3fSmrg archiver_list_spec=$lt_cv_ar_at_file 24771bedbe3fSmrgfi 24781bedbe3fSmrg_LT_DECL([], [archiver_list_spec], [1], 24791bedbe3fSmrg [How to feed a file listing to the archiver]) 24801bedbe3fSmrg])# _LT_PROG_AR 2481549e21daSmrg 2482549e21daSmrg 24831bedbe3fSmrg# _LT_CMD_OLD_ARCHIVE 24841bedbe3fSmrg# ------------------- 24851bedbe3fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 24861bedbe3fSmrg[_LT_PROG_AR 2487549e21daSmrg 24881bedbe3fSmrgAC_CHECK_TOOL(STRIP, strip, :) 24891bedbe3fSmrgtest -z "$STRIP" && STRIP=: 24901bedbe3fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2491549e21daSmrg 24921bedbe3fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 24931bedbe3fSmrgtest -z "$RANLIB" && RANLIB=: 24941bedbe3fSmrg_LT_DECL([], [RANLIB], [1], 24951bedbe3fSmrg [Commands used to install an old-style archive]) 2496549e21daSmrg 24971bedbe3fSmrg# Determine commands to create old-style static archives. 24981bedbe3fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 24991bedbe3fSmrgold_postinstall_cmds='chmod 644 $oldlib' 25001bedbe3fSmrgold_postuninstall_cmds= 2501549e21daSmrg 25021bedbe3fSmrgif test -n "$RANLIB"; then 25031bedbe3fSmrg case $host_os in 25041bedbe3fSmrg openbsd*) 25051bedbe3fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 25061bedbe3fSmrg ;; 25071bedbe3fSmrg *) 25081bedbe3fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 25091bedbe3fSmrg ;; 2510549e21daSmrg esac 25111bedbe3fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2512549e21daSmrgfi 2513549e21daSmrg 25141bedbe3fSmrgcase $host_os in 25151bedbe3fSmrg darwin*) 25161bedbe3fSmrg lock_old_archive_extraction=yes ;; 25171bedbe3fSmrg *) 25181bedbe3fSmrg lock_old_archive_extraction=no ;; 25191bedbe3fSmrgesac 25201bedbe3fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 25211bedbe3fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 25221bedbe3fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 25231bedbe3fSmrg [Commands used to build an old-style archive]) 25241bedbe3fSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 25251bedbe3fSmrg [Whether to use a lock for old archive extraction]) 25261bedbe3fSmrg])# _LT_CMD_OLD_ARCHIVE 2527549e21daSmrg 2528549e21daSmrg 25291bedbe3fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25301bedbe3fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 25311bedbe3fSmrg# ---------------------------------------------------------------- 25321bedbe3fSmrg# Check whether the given compiler option works 25331bedbe3fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 2534549e21daSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25351bedbe3fSmrgm4_require([_LT_DECL_SED])dnl 25361bedbe3fSmrgAC_CACHE_CHECK([$1], [$2], 25371bedbe3fSmrg [$2=no 25381bedbe3fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 25391bedbe3fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 25401bedbe3fSmrg lt_compiler_flag="$3" 25411bedbe3fSmrg # Insert the option either (1) after the last *FLAGS variable, or 25421bedbe3fSmrg # (2) before a word containing "conftest.", or (3) at the end. 25431bedbe3fSmrg # Note that $ac_compile itself does not contain backslashes and begins 25441bedbe3fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 25451bedbe3fSmrg # The option is referenced via a variable to avoid confusing sed. 25461bedbe3fSmrg lt_compile=`echo "$ac_compile" | $SED \ 25471bedbe3fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 25481bedbe3fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 25491bedbe3fSmrg -e 's:$: $lt_compiler_flag:'` 25501bedbe3fSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 25511bedbe3fSmrg (eval "$lt_compile" 2>conftest.err) 25521bedbe3fSmrg ac_status=$? 25531bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 25541bedbe3fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 25551bedbe3fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 25561bedbe3fSmrg # The compiler can only warn and ignore the option if not recognized 25571bedbe3fSmrg # So say no if there are warnings other than the usual output. 25581bedbe3fSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 25591bedbe3fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25601bedbe3fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 25611bedbe3fSmrg $2=yes 25621bedbe3fSmrg fi 25631bedbe3fSmrg fi 25641bedbe3fSmrg $RM conftest* 25651bedbe3fSmrg]) 2566549e21daSmrg 25671bedbe3fSmrgif test x"[$]$2" = xyes; then 25681bedbe3fSmrg m4_if([$5], , :, [$5]) 25691bedbe3fSmrgelse 25701bedbe3fSmrg m4_if([$6], , :, [$6]) 25711bedbe3fSmrgfi 25721bedbe3fSmrg])# _LT_COMPILER_OPTION 2573549e21daSmrg 25741bedbe3fSmrg# Old name: 25751bedbe3fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 25761bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 25771bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578549e21daSmrg 2579549e21daSmrg 25801bedbe3fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25811bedbe3fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 25821bedbe3fSmrg# ---------------------------------------------------- 25831bedbe3fSmrg# Check whether the given linker option works 25841bedbe3fSmrgAC_DEFUN([_LT_LINKER_OPTION], 25851bedbe3fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25861bedbe3fSmrgm4_require([_LT_DECL_SED])dnl 25871bedbe3fSmrgAC_CACHE_CHECK([$1], [$2], 25881bedbe3fSmrg [$2=no 25891bedbe3fSmrg save_LDFLAGS="$LDFLAGS" 25901bedbe3fSmrg LDFLAGS="$LDFLAGS $3" 25911bedbe3fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 25921bedbe3fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 25931bedbe3fSmrg # The linker can only warn and ignore the option if not recognized 25941bedbe3fSmrg # So say no if there are warnings 25951bedbe3fSmrg if test -s conftest.err; then 25961bedbe3fSmrg # Append any errors to the config.log. 25971bedbe3fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 25981bedbe3fSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 25991bedbe3fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26001bedbe3fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 26011bedbe3fSmrg $2=yes 26021bedbe3fSmrg fi 26031bedbe3fSmrg else 26041bedbe3fSmrg $2=yes 26051bedbe3fSmrg fi 26061bedbe3fSmrg fi 26071bedbe3fSmrg $RM -r conftest* 26081bedbe3fSmrg LDFLAGS="$save_LDFLAGS" 26091bedbe3fSmrg]) 2610549e21daSmrg 26111bedbe3fSmrgif test x"[$]$2" = xyes; then 26121bedbe3fSmrg m4_if([$4], , :, [$4]) 26131bedbe3fSmrgelse 26141bedbe3fSmrg m4_if([$5], , :, [$5]) 2615549e21daSmrgfi 26161bedbe3fSmrg])# _LT_LINKER_OPTION 2617549e21daSmrg 26181bedbe3fSmrg# Old name: 26191bedbe3fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 26201bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 26211bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2622549e21daSmrg 2623549e21daSmrg 26241bedbe3fSmrg# LT_CMD_MAX_LEN 26251bedbe3fSmrg#--------------- 26261bedbe3fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 26271bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26281bedbe3fSmrg# find the maximum length of command line arguments 26291bedbe3fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 26301bedbe3fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 26311bedbe3fSmrg i=0 26321bedbe3fSmrg teststring="ABCD" 2633549e21daSmrg 26341bedbe3fSmrg case $build_os in 26351bedbe3fSmrg msdosdjgpp*) 26361bedbe3fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 26371bedbe3fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 26381bedbe3fSmrg # during glob expansion). Even if it were fixed, the result of this 26391bedbe3fSmrg # check would be larger than it should be. 26401bedbe3fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 26411bedbe3fSmrg ;; 2642549e21daSmrg 26431bedbe3fSmrg gnu*) 26441bedbe3fSmrg # Under GNU Hurd, this test is not required because there is 26451bedbe3fSmrg # no limit to the length of command line arguments. 26461bedbe3fSmrg # Libtool will interpret -1 as no limit whatsoever 26471bedbe3fSmrg lt_cv_sys_max_cmd_len=-1; 26481bedbe3fSmrg ;; 2649549e21daSmrg 26501bedbe3fSmrg cygwin* | mingw* | cegcc*) 26511bedbe3fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 26521bedbe3fSmrg # about 5 minutes as the teststring grows exponentially. 26531bedbe3fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 26541bedbe3fSmrg # you end up with a "frozen" computer, even though with patience 26551bedbe3fSmrg # the test eventually succeeds (with a max line length of 256k). 26561bedbe3fSmrg # Instead, let's just punt: use the minimum linelength reported by 26571bedbe3fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 26581bedbe3fSmrg lt_cv_sys_max_cmd_len=8192; 26591bedbe3fSmrg ;; 2660549e21daSmrg 26611bedbe3fSmrg mint*) 26621bedbe3fSmrg # On MiNT this can take a long time and run out of memory. 26631bedbe3fSmrg lt_cv_sys_max_cmd_len=8192; 26641bedbe3fSmrg ;; 2665549e21daSmrg 26661bedbe3fSmrg amigaos*) 26671bedbe3fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 26681bedbe3fSmrg # So we just punt and use a minimum line length of 8192. 26691bedbe3fSmrg lt_cv_sys_max_cmd_len=8192; 26701bedbe3fSmrg ;; 2671549e21daSmrg 26721bedbe3fSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 26731bedbe3fSmrg # This has been around since 386BSD, at least. Likely further. 26741bedbe3fSmrg if test -x /sbin/sysctl; then 26751bedbe3fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 26761bedbe3fSmrg elif test -x /usr/sbin/sysctl; then 26771bedbe3fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 26781bedbe3fSmrg else 26791bedbe3fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 26801bedbe3fSmrg fi 26811bedbe3fSmrg # And add a safety zone 26821bedbe3fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 26831bedbe3fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 26841bedbe3fSmrg ;; 2685549e21daSmrg 26861bedbe3fSmrg interix*) 26871bedbe3fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 26881bedbe3fSmrg lt_cv_sys_max_cmd_len=196608 26891bedbe3fSmrg ;; 2690549e21daSmrg 26911bedbe3fSmrg os2*) 26921bedbe3fSmrg # The test takes a long time on OS/2. 26931bedbe3fSmrg lt_cv_sys_max_cmd_len=8192 26941bedbe3fSmrg ;; 2695549e21daSmrg 26961bedbe3fSmrg osf*) 26971bedbe3fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 26981bedbe3fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 26991bedbe3fSmrg # nice to cause kernel panics so lets avoid the loop below. 27001bedbe3fSmrg # First set a reasonable default. 27011bedbe3fSmrg lt_cv_sys_max_cmd_len=16384 27021bedbe3fSmrg # 27031bedbe3fSmrg if test -x /sbin/sysconfig; then 27041bedbe3fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 27051bedbe3fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 27061bedbe3fSmrg esac 27071bedbe3fSmrg fi 27081bedbe3fSmrg ;; 27091bedbe3fSmrg sco3.2v5*) 27101bedbe3fSmrg lt_cv_sys_max_cmd_len=102400 27111bedbe3fSmrg ;; 27121bedbe3fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 27131bedbe3fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 27141bedbe3fSmrg if test -n "$kargmax"; then 27151bedbe3fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 27161bedbe3fSmrg else 27171bedbe3fSmrg lt_cv_sys_max_cmd_len=32768 27181bedbe3fSmrg fi 27191bedbe3fSmrg ;; 27201bedbe3fSmrg *) 27211bedbe3fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 27221bedbe3fSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 27231bedbe3fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27241bedbe3fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27251bedbe3fSmrg else 27261bedbe3fSmrg # Make teststring a little bigger before we do anything with it. 27271bedbe3fSmrg # a 1K string should be a reasonable start. 27281bedbe3fSmrg for i in 1 2 3 4 5 6 7 8 ; do 27291bedbe3fSmrg teststring=$teststring$teststring 27301bedbe3fSmrg done 27311bedbe3fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 27321bedbe3fSmrg # If test is not a shell built-in, we'll probably end up computing a 27331bedbe3fSmrg # maximum length that is only half of the actual maximum length, but 27341bedbe3fSmrg # we can't tell. 27351bedbe3fSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 27361bedbe3fSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 27371bedbe3fSmrg test $i != 17 # 1/2 MB should be enough 27381bedbe3fSmrg do 27391bedbe3fSmrg i=`expr $i + 1` 27401bedbe3fSmrg teststring=$teststring$teststring 27411bedbe3fSmrg done 27421bedbe3fSmrg # Only check the string length outside the loop. 27431bedbe3fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 27441bedbe3fSmrg teststring= 27451bedbe3fSmrg # Add a significant safety factor because C++ compilers can tack on 27461bedbe3fSmrg # massive amounts of additional arguments before passing them to the 27471bedbe3fSmrg # linker. It appears as though 1/2 is a usable value. 27481bedbe3fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 27491bedbe3fSmrg fi 27501bedbe3fSmrg ;; 27511bedbe3fSmrg esac 27521bedbe3fSmrg]) 27531bedbe3fSmrgif test -n $lt_cv_sys_max_cmd_len ; then 27541bedbe3fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 27551bedbe3fSmrgelse 27561bedbe3fSmrg AC_MSG_RESULT(none) 27571bedbe3fSmrgfi 27581bedbe3fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 27591bedbe3fSmrg_LT_DECL([], [max_cmd_len], [0], 27601bedbe3fSmrg [What is the maximum length of a command?]) 27611bedbe3fSmrg])# LT_CMD_MAX_LEN 2762549e21daSmrg 27631bedbe3fSmrg# Old name: 27641bedbe3fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 27651bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 27661bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2767549e21daSmrg 2768549e21daSmrg 27691bedbe3fSmrg# _LT_HEADER_DLFCN 27701bedbe3fSmrg# ---------------- 27711bedbe3fSmrgm4_defun([_LT_HEADER_DLFCN], 27721bedbe3fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 27731bedbe3fSmrg])# _LT_HEADER_DLFCN 2774549e21daSmrg 2775549e21daSmrg 27761bedbe3fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 27771bedbe3fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 27781bedbe3fSmrg# ---------------------------------------------------------------- 27791bedbe3fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 27801bedbe3fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 27811bedbe3fSmrgif test "$cross_compiling" = yes; then : 27821bedbe3fSmrg [$4] 27831bedbe3fSmrgelse 27841bedbe3fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 27851bedbe3fSmrg lt_status=$lt_dlunknown 27861bedbe3fSmrg cat > conftest.$ac_ext <<_LT_EOF 27871bedbe3fSmrg[#line $LINENO "configure" 27881bedbe3fSmrg#include "confdefs.h" 2789549e21daSmrg 27901bedbe3fSmrg#if HAVE_DLFCN_H 27911bedbe3fSmrg#include <dlfcn.h> 27921bedbe3fSmrg#endif 2793549e21daSmrg 27941bedbe3fSmrg#include <stdio.h> 2795549e21daSmrg 27961bedbe3fSmrg#ifdef RTLD_GLOBAL 27971bedbe3fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 27981bedbe3fSmrg#else 27991bedbe3fSmrg# ifdef DL_GLOBAL 28001bedbe3fSmrg# define LT_DLGLOBAL DL_GLOBAL 28011bedbe3fSmrg# else 28021bedbe3fSmrg# define LT_DLGLOBAL 0 28031bedbe3fSmrg# endif 28041bedbe3fSmrg#endif 2805549e21daSmrg 28061bedbe3fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 28071bedbe3fSmrg find out it does not work in some platform. */ 28081bedbe3fSmrg#ifndef LT_DLLAZY_OR_NOW 28091bedbe3fSmrg# ifdef RTLD_LAZY 28101bedbe3fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 28111bedbe3fSmrg# else 28121bedbe3fSmrg# ifdef DL_LAZY 28131bedbe3fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 28141bedbe3fSmrg# else 28151bedbe3fSmrg# ifdef RTLD_NOW 28161bedbe3fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 28171bedbe3fSmrg# else 28181bedbe3fSmrg# ifdef DL_NOW 28191bedbe3fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 28201bedbe3fSmrg# else 28211bedbe3fSmrg# define LT_DLLAZY_OR_NOW 0 28221bedbe3fSmrg# endif 28231bedbe3fSmrg# endif 28241bedbe3fSmrg# endif 28251bedbe3fSmrg# endif 28261bedbe3fSmrg#endif 2827549e21daSmrg 28281bedbe3fSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 28291bedbe3fSmrg correspondingly for the symbols needed. */ 28301bedbe3fSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 28311bedbe3fSmrgint fnord () __attribute__((visibility("default"))); 28321bedbe3fSmrg#endif 2833549e21daSmrg 28341bedbe3fSmrgint fnord () { return 42; } 28351bedbe3fSmrgint main () 28361bedbe3fSmrg{ 28371bedbe3fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 28381bedbe3fSmrg int status = $lt_dlunknown; 2839549e21daSmrg 28401bedbe3fSmrg if (self) 28411bedbe3fSmrg { 28421bedbe3fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 28431bedbe3fSmrg else 28441bedbe3fSmrg { 28451bedbe3fSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 28461bedbe3fSmrg else puts (dlerror ()); 28471bedbe3fSmrg } 28481bedbe3fSmrg /* dlclose (self); */ 28491bedbe3fSmrg } 28501bedbe3fSmrg else 28511bedbe3fSmrg puts (dlerror ()); 2852549e21daSmrg 28531bedbe3fSmrg return status; 28541bedbe3fSmrg}] 28551bedbe3fSmrg_LT_EOF 28561bedbe3fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 28571bedbe3fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 28581bedbe3fSmrg lt_status=$? 28591bedbe3fSmrg case x$lt_status in 28601bedbe3fSmrg x$lt_dlno_uscore) $1 ;; 28611bedbe3fSmrg x$lt_dlneed_uscore) $2 ;; 28621bedbe3fSmrg x$lt_dlunknown|x*) $3 ;; 28631bedbe3fSmrg esac 28641bedbe3fSmrg else : 28651bedbe3fSmrg # compilation failed 28661bedbe3fSmrg $3 28671bedbe3fSmrg fi 28681bedbe3fSmrgfi 28691bedbe3fSmrgrm -fr conftest* 28701bedbe3fSmrg])# _LT_TRY_DLOPEN_SELF 2871549e21daSmrg 2872549e21daSmrg 28731bedbe3fSmrg# LT_SYS_DLOPEN_SELF 28741bedbe3fSmrg# ------------------ 28751bedbe3fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 28761bedbe3fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 28771bedbe3fSmrgif test "x$enable_dlopen" != xyes; then 28781bedbe3fSmrg enable_dlopen=unknown 28791bedbe3fSmrg enable_dlopen_self=unknown 28801bedbe3fSmrg enable_dlopen_self_static=unknown 28811bedbe3fSmrgelse 28821bedbe3fSmrg lt_cv_dlopen=no 28831bedbe3fSmrg lt_cv_dlopen_libs= 2884549e21daSmrg 28851bedbe3fSmrg case $host_os in 28861bedbe3fSmrg beos*) 28871bedbe3fSmrg lt_cv_dlopen="load_add_on" 28881bedbe3fSmrg lt_cv_dlopen_libs= 28891bedbe3fSmrg lt_cv_dlopen_self=yes 28901bedbe3fSmrg ;; 2891ba6a1819Smrg 28921bedbe3fSmrg mingw* | pw32* | cegcc*) 28931bedbe3fSmrg lt_cv_dlopen="LoadLibrary" 28941bedbe3fSmrg lt_cv_dlopen_libs= 28951bedbe3fSmrg ;; 2896ba6a1819Smrg 28971bedbe3fSmrg cygwin*) 28981bedbe3fSmrg lt_cv_dlopen="dlopen" 28991bedbe3fSmrg lt_cv_dlopen_libs= 29001bedbe3fSmrg ;; 2901549e21daSmrg 29021bedbe3fSmrg darwin*) 29031bedbe3fSmrg # if libdl is installed we need to link against it 29041bedbe3fSmrg AC_CHECK_LIB([dl], [dlopen], 29051bedbe3fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 29061bedbe3fSmrg lt_cv_dlopen="dyld" 29071bedbe3fSmrg lt_cv_dlopen_libs= 29081bedbe3fSmrg lt_cv_dlopen_self=yes 2909549e21daSmrg ]) 2910549e21daSmrg ;; 29111bedbe3fSmrg 29121bedbe3fSmrg *) 29131bedbe3fSmrg AC_CHECK_FUNC([shl_load], 29141bedbe3fSmrg [lt_cv_dlopen="shl_load"], 29151bedbe3fSmrg [AC_CHECK_LIB([dld], [shl_load], 29161bedbe3fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 29171bedbe3fSmrg [AC_CHECK_FUNC([dlopen], 29181bedbe3fSmrg [lt_cv_dlopen="dlopen"], 29191bedbe3fSmrg [AC_CHECK_LIB([dl], [dlopen], 29201bedbe3fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 29211bedbe3fSmrg [AC_CHECK_LIB([svld], [dlopen], 29221bedbe3fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 29231bedbe3fSmrg [AC_CHECK_LIB([dld], [dld_link], 29241bedbe3fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 29251bedbe3fSmrg ]) 29261bedbe3fSmrg ]) 29271bedbe3fSmrg ]) 29281bedbe3fSmrg ]) 29291bedbe3fSmrg ]) 2930549e21daSmrg ;; 2931549e21daSmrg esac 2932ba6a1819Smrg 29331bedbe3fSmrg if test "x$lt_cv_dlopen" != xno; then 29341bedbe3fSmrg enable_dlopen=yes 2935549e21daSmrg else 29361bedbe3fSmrg enable_dlopen=no 2937549e21daSmrg fi 2938ba6a1819Smrg 29391bedbe3fSmrg case $lt_cv_dlopen in 29401bedbe3fSmrg dlopen) 29411bedbe3fSmrg save_CPPFLAGS="$CPPFLAGS" 29421bedbe3fSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2943ba6a1819Smrg 29441bedbe3fSmrg save_LDFLAGS="$LDFLAGS" 29451bedbe3fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2946ba6a1819Smrg 29471bedbe3fSmrg save_LIBS="$LIBS" 29481bedbe3fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2949ba6a1819Smrg 29501bedbe3fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 29511bedbe3fSmrg lt_cv_dlopen_self, [dnl 29521bedbe3fSmrg _LT_TRY_DLOPEN_SELF( 29531bedbe3fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 29541bedbe3fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 29551bedbe3fSmrg ]) 2956ba6a1819Smrg 29571bedbe3fSmrg if test "x$lt_cv_dlopen_self" = xyes; then 29581bedbe3fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 29591bedbe3fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 29601bedbe3fSmrg lt_cv_dlopen_self_static, [dnl 29611bedbe3fSmrg _LT_TRY_DLOPEN_SELF( 29621bedbe3fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 29631bedbe3fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 29641bedbe3fSmrg ]) 29651bedbe3fSmrg fi 2966549e21daSmrg 29671bedbe3fSmrg CPPFLAGS="$save_CPPFLAGS" 29681bedbe3fSmrg LDFLAGS="$save_LDFLAGS" 29691bedbe3fSmrg LIBS="$save_LIBS" 29701bedbe3fSmrg ;; 29711bedbe3fSmrg esac 29721bedbe3fSmrg 29731bedbe3fSmrg case $lt_cv_dlopen_self in 29741bedbe3fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 29751bedbe3fSmrg *) enable_dlopen_self=unknown ;; 29761bedbe3fSmrg esac 29771bedbe3fSmrg 29781bedbe3fSmrg case $lt_cv_dlopen_self_static in 29791bedbe3fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 29801bedbe3fSmrg *) enable_dlopen_self_static=unknown ;; 29811bedbe3fSmrg esac 2982ba6a1819Smrgfi 29831bedbe3fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 29841bedbe3fSmrg [Whether dlopen is supported]) 29851bedbe3fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 29861bedbe3fSmrg [Whether dlopen of programs is supported]) 29871bedbe3fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 29881bedbe3fSmrg [Whether dlopen of statically linked programs is supported]) 29891bedbe3fSmrg])# LT_SYS_DLOPEN_SELF 2990ba6a1819Smrg 29911bedbe3fSmrg# Old name: 29921bedbe3fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 29931bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 29941bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2995ba6a1819Smrg 2996ba6a1819Smrg 29971bedbe3fSmrg# _LT_COMPILER_C_O([TAGNAME]) 29981bedbe3fSmrg# --------------------------- 29991bedbe3fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 30001bedbe3fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 30011bedbe3fSmrgm4_defun([_LT_COMPILER_C_O], 30021bedbe3fSmrg[m4_require([_LT_DECL_SED])dnl 30031bedbe3fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30041bedbe3fSmrgm4_require([_LT_TAG_COMPILER])dnl 30051bedbe3fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 30061bedbe3fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 30071bedbe3fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 30081bedbe3fSmrg $RM -r conftest 2>/dev/null 30091bedbe3fSmrg mkdir conftest 30101bedbe3fSmrg cd conftest 30111bedbe3fSmrg mkdir out 30121bedbe3fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3013ba6a1819Smrg 30141bedbe3fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 30151bedbe3fSmrg # Insert the option either (1) after the last *FLAGS variable, or 30161bedbe3fSmrg # (2) before a word containing "conftest.", or (3) at the end. 30171bedbe3fSmrg # Note that $ac_compile itself does not contain backslashes and begins 30181bedbe3fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 30191bedbe3fSmrg lt_compile=`echo "$ac_compile" | $SED \ 30201bedbe3fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 30211bedbe3fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 30221bedbe3fSmrg -e 's:$: $lt_compiler_flag:'` 30231bedbe3fSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 30241bedbe3fSmrg (eval "$lt_compile" 2>out/conftest.err) 30251bedbe3fSmrg ac_status=$? 30261bedbe3fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 30271bedbe3fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 30281bedbe3fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 30291bedbe3fSmrg then 30301bedbe3fSmrg # The compiler can only warn and ignore the option if not recognized 30311bedbe3fSmrg # So say no if there are warnings 30321bedbe3fSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 30331bedbe3fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 30341bedbe3fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 30351bedbe3fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 30361bedbe3fSmrg fi 30371bedbe3fSmrg fi 30381bedbe3fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 30391bedbe3fSmrg $RM conftest* 30401bedbe3fSmrg # SGI C++ compiler will create directory out/ii_files/ for 30411bedbe3fSmrg # template instantiation 30421bedbe3fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 30431bedbe3fSmrg $RM out/* && rmdir out 30441bedbe3fSmrg cd .. 30451bedbe3fSmrg $RM -r conftest 30461bedbe3fSmrg $RM conftest* 30471bedbe3fSmrg]) 30481bedbe3fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 30491bedbe3fSmrg [Does compiler simultaneously support -c and -o options?]) 30501bedbe3fSmrg])# _LT_COMPILER_C_O 3051ba6a1819Smrg 3052ba6a1819Smrg 30531bedbe3fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 30541bedbe3fSmrg# ---------------------------------- 30551bedbe3fSmrg# Check to see if we can do hard links to lock some files if needed 30561bedbe3fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 30571bedbe3fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 30581bedbe3fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30591bedbe3fSmrg_LT_COMPILER_C_O([$1]) 3060ba6a1819Smrg 30611bedbe3fSmrghard_links="nottested" 30621bedbe3fSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 30631bedbe3fSmrg # do not overwrite the value of need_locks provided by the user 30641bedbe3fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 30651bedbe3fSmrg hard_links=yes 30661bedbe3fSmrg $RM conftest* 30671bedbe3fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30681bedbe3fSmrg touch conftest.a 30691bedbe3fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 30701bedbe3fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30711bedbe3fSmrg AC_MSG_RESULT([$hard_links]) 30721bedbe3fSmrg if test "$hard_links" = no; then 30731bedbe3fSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 30741bedbe3fSmrg need_locks=warn 3075ba6a1819Smrg fi 30761bedbe3fSmrgelse 30771bedbe3fSmrg need_locks=no 30781bedbe3fSmrgfi 30791bedbe3fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 30801bedbe3fSmrg])# _LT_COMPILER_FILE_LOCKS 3081ba6a1819Smrg 3082ba6a1819Smrg 30831bedbe3fSmrg# _LT_CHECK_OBJDIR 30841bedbe3fSmrg# ---------------- 30851bedbe3fSmrgm4_defun([_LT_CHECK_OBJDIR], 30861bedbe3fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 30871bedbe3fSmrg[rm -f .libs 2>/dev/null 30881bedbe3fSmrgmkdir .libs 2>/dev/null 30891bedbe3fSmrgif test -d .libs; then 30901bedbe3fSmrg lt_cv_objdir=.libs 30911bedbe3fSmrgelse 30921bedbe3fSmrg # MS-DOS does not allow filenames that begin with a dot. 30931bedbe3fSmrg lt_cv_objdir=_libs 30941bedbe3fSmrgfi 30951bedbe3fSmrgrmdir .libs 2>/dev/null]) 30961bedbe3fSmrgobjdir=$lt_cv_objdir 30971bedbe3fSmrg_LT_DECL([], [objdir], [0], 30981bedbe3fSmrg [The name of the directory that contains temporary libtool files])dnl 30991bedbe3fSmrgm4_pattern_allow([LT_OBJDIR])dnl 31001bedbe3fSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 31011bedbe3fSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 31021bedbe3fSmrg])# _LT_CHECK_OBJDIR 3103549e21daSmrg 3104549e21daSmrg 31051bedbe3fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 31061bedbe3fSmrg# -------------------------------------- 31071bedbe3fSmrg# Check hardcoding attributes. 31081bedbe3fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 31091bedbe3fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 31101bedbe3fSmrg_LT_TAGVAR(hardcode_action, $1)= 31111bedbe3fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 31121bedbe3fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 31131bedbe3fSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3114549e21daSmrg 31151bedbe3fSmrg # We can hardcode non-existent directories. 31161bedbe3fSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 31171bedbe3fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 31181bedbe3fSmrg # have to relink, otherwise we might link with an installed library 31191bedbe3fSmrg # when we should be linking with a yet-to-be-installed one 31201bedbe3fSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 31211bedbe3fSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 31221bedbe3fSmrg # Linking always hardcodes the temporary library directory. 31231bedbe3fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 31241bedbe3fSmrg else 31251bedbe3fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 31261bedbe3fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 31271bedbe3fSmrg fi 31281bedbe3fSmrgelse 31291bedbe3fSmrg # We cannot hardcode anything, or else we can only hardcode existing 31301bedbe3fSmrg # directories. 31311bedbe3fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 31321bedbe3fSmrgfi 31331bedbe3fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3134549e21daSmrg 31351bedbe3fSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 31361bedbe3fSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 31371bedbe3fSmrg # Fast installation is not supported 31381bedbe3fSmrg enable_fast_install=no 31391bedbe3fSmrgelif test "$shlibpath_overrides_runpath" = yes || 31401bedbe3fSmrg test "$enable_shared" = no; then 31411bedbe3fSmrg # Fast installation is not necessary 31421bedbe3fSmrg enable_fast_install=needless 31431bedbe3fSmrgfi 31441bedbe3fSmrg_LT_TAGDECL([], [hardcode_action], [0], 31451bedbe3fSmrg [How to hardcode a shared library path into an executable]) 31461bedbe3fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 3147549e21daSmrg 3148549e21daSmrg 31491bedbe3fSmrg# _LT_CMD_STRIPLIB 31501bedbe3fSmrg# ---------------- 31511bedbe3fSmrgm4_defun([_LT_CMD_STRIPLIB], 31521bedbe3fSmrg[m4_require([_LT_DECL_EGREP]) 31531bedbe3fSmrgstriplib= 31541bedbe3fSmrgold_striplib= 31551bedbe3fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 31561bedbe3fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 31571bedbe3fSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 31581bedbe3fSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 31591bedbe3fSmrg AC_MSG_RESULT([yes]) 31601bedbe3fSmrgelse 31611bedbe3fSmrg# FIXME - insert some real tests, host_os isn't really good enough 3162549e21daSmrg case $host_os in 31631bedbe3fSmrg darwin*) 31641bedbe3fSmrg if test -n "$STRIP" ; then 31651bedbe3fSmrg striplib="$STRIP -x" 31661bedbe3fSmrg old_striplib="$STRIP -S" 31671bedbe3fSmrg AC_MSG_RESULT([yes]) 31681bedbe3fSmrg else 31691bedbe3fSmrg AC_MSG_RESULT([no]) 31701bedbe3fSmrg fi 3171549e21daSmrg ;; 3172549e21daSmrg *) 31731bedbe3fSmrg AC_MSG_RESULT([no]) 3174549e21daSmrg ;; 3175549e21daSmrg esac 3176549e21daSmrgfi 31771bedbe3fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 31781bedbe3fSmrg_LT_DECL([], [striplib], [1]) 31791bedbe3fSmrg])# _LT_CMD_STRIPLIB 3180ba6a1819Smrg 3181ba6a1819Smrg 31821bedbe3fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 31831bedbe3fSmrg# ----------------------------- 31841bedbe3fSmrg# PORTME Fill in your ld.so characteristics 31851bedbe3fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 31861bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 31871bedbe3fSmrgm4_require([_LT_DECL_EGREP])dnl 31881bedbe3fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31891bedbe3fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 3190549e21daSmrgm4_require([_LT_DECL_SED])dnl 31911bedbe3fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 31921bedbe3fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 31931bedbe3fSmrgm4_if([$1], 31941bedbe3fSmrg [], [ 31951bedbe3fSmrgif test "$GCC" = yes; then 31961bedbe3fSmrg case $host_os in 31971bedbe3fSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 31981bedbe3fSmrg *) lt_awk_arg="/^libraries:/" ;; 31991bedbe3fSmrg esac 32001bedbe3fSmrg case $host_os in 32011bedbe3fSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 32021bedbe3fSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 32031bedbe3fSmrg esac 32041bedbe3fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 32051bedbe3fSmrg case $lt_search_path_spec in 32061bedbe3fSmrg *\;*) 32071bedbe3fSmrg # if the path contains ";" then we assume it to be the separator 32081bedbe3fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 32091bedbe3fSmrg # assumed that no part of a normal pathname contains ";" but that should 32101bedbe3fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 32111bedbe3fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 32121bedbe3fSmrg ;; 32131bedbe3fSmrg *) 32141bedbe3fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 32151bedbe3fSmrg ;; 32161bedbe3fSmrg esac 32171bedbe3fSmrg # Ok, now we have the path, separated by spaces, we can step through it 32181bedbe3fSmrg # and add multilib dir if necessary. 32191bedbe3fSmrg lt_tmp_lt_search_path_spec= 32201bedbe3fSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 32211bedbe3fSmrg for lt_sys_path in $lt_search_path_spec; do 32221bedbe3fSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 32231bedbe3fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 32241bedbe3fSmrg else 32251bedbe3fSmrg test -d "$lt_sys_path" && \ 32261bedbe3fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 32271bedbe3fSmrg fi 32281bedbe3fSmrg done 32291bedbe3fSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 32301bedbe3fSmrgBEGIN {RS=" "; FS="/|\n";} { 32311bedbe3fSmrg lt_foo=""; 32321bedbe3fSmrg lt_count=0; 32331bedbe3fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 32341bedbe3fSmrg if ($lt_i != "" && $lt_i != ".") { 32351bedbe3fSmrg if ($lt_i == "..") { 32361bedbe3fSmrg lt_count++; 32371bedbe3fSmrg } else { 32381bedbe3fSmrg if (lt_count == 0) { 32391bedbe3fSmrg lt_foo="/" $lt_i lt_foo; 32401bedbe3fSmrg } else { 32411bedbe3fSmrg lt_count--; 32421bedbe3fSmrg } 32431bedbe3fSmrg } 32441bedbe3fSmrg } 32451bedbe3fSmrg } 32461bedbe3fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 32471bedbe3fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 32481bedbe3fSmrg}'` 32491bedbe3fSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 32501bedbe3fSmrg # for these hosts. 32511bedbe3fSmrg case $host_os in 32521bedbe3fSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 32531bedbe3fSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 32541bedbe3fSmrg esac 32551bedbe3fSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3256ba6a1819Smrgelse 32571bedbe3fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 32581bedbe3fSmrgfi]) 32591bedbe3fSmrglibrary_names_spec= 32601bedbe3fSmrglibname_spec='lib$name' 32611bedbe3fSmrgsoname_spec= 32621bedbe3fSmrgshrext_cmds=".so" 32631bedbe3fSmrgpostinstall_cmds= 32641bedbe3fSmrgpostuninstall_cmds= 32651bedbe3fSmrgfinish_cmds= 32661bedbe3fSmrgfinish_eval= 32671bedbe3fSmrgshlibpath_var= 32681bedbe3fSmrgshlibpath_overrides_runpath=unknown 32691bedbe3fSmrgversion_type=none 32701bedbe3fSmrgdynamic_linker="$host_os ld.so" 32711bedbe3fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 32721bedbe3fSmrgneed_lib_prefix=unknown 32731bedbe3fSmrghardcode_into_libs=no 3274ba6a1819Smrg 32751bedbe3fSmrg# when you set need_version to no, make sure it does not cause -set_version 32761bedbe3fSmrg# flags to be left without arguments 32771bedbe3fSmrgneed_version=unknown 3278549e21daSmrg 32791bedbe3fSmrgcase $host_os in 32801bedbe3fSmrgaix3*) 32811bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 32821bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 32831bedbe3fSmrg shlibpath_var=LIBPATH 3284ba6a1819Smrg 32851bedbe3fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 32861bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 32871bedbe3fSmrg ;; 3288ba6a1819Smrg 32891bedbe3fSmrgaix[[4-9]]*) 32901bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 32911bedbe3fSmrg need_lib_prefix=no 32921bedbe3fSmrg need_version=no 32931bedbe3fSmrg hardcode_into_libs=yes 32941bedbe3fSmrg if test "$host_cpu" = ia64; then 32951bedbe3fSmrg # AIX 5 supports IA64 32961bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 32971bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 32981bedbe3fSmrg else 32991bedbe3fSmrg # With GCC up to 2.95.x, collect2 would create an import file 33001bedbe3fSmrg # for dependence libraries. The import file would start with 33011bedbe3fSmrg # the line `#! .'. This would cause the generated library to 33021bedbe3fSmrg # depend on `.', always an invalid library. This was fixed in 33031bedbe3fSmrg # development snapshots of GCC prior to 3.0. 33041bedbe3fSmrg case $host_os in 33051bedbe3fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 33061bedbe3fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 33071bedbe3fSmrg echo ' yes ' 33081bedbe3fSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 33091bedbe3fSmrg : 33101bedbe3fSmrg else 33111bedbe3fSmrg can_build_shared=no 33121bedbe3fSmrg fi 33131bedbe3fSmrg ;; 33141bedbe3fSmrg esac 33151bedbe3fSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 33161bedbe3fSmrg # soname into executable. Probably we can add versioning support to 33171bedbe3fSmrg # collect2, so additional links can be useful in future. 33181bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 33191bedbe3fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 33201bedbe3fSmrg # instead of lib<name>.a to let people know that these are not 33211bedbe3fSmrg # typical AIX shared libraries. 33221bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33231bedbe3fSmrg else 33241bedbe3fSmrg # We preserve .a as extension for shared libraries through AIX4.2 33251bedbe3fSmrg # and later when we are not doing run time linking. 33261bedbe3fSmrg library_names_spec='${libname}${release}.a $libname.a' 33271bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 33281bedbe3fSmrg fi 33291bedbe3fSmrg shlibpath_var=LIBPATH 33301bedbe3fSmrg fi 33311bedbe3fSmrg ;; 3332ba6a1819Smrg 33331bedbe3fSmrgamigaos*) 33341bedbe3fSmrg case $host_cpu in 33351bedbe3fSmrg powerpc) 33361bedbe3fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 33371bedbe3fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 33381bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33391bedbe3fSmrg ;; 33401bedbe3fSmrg m68k) 33411bedbe3fSmrg library_names_spec='$libname.ixlibrary $libname.a' 33421bedbe3fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 33431bedbe3fSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 33441bedbe3fSmrg ;; 33451bedbe3fSmrg esac 33461bedbe3fSmrg ;; 3347549e21daSmrg 33481bedbe3fSmrgbeos*) 33491bedbe3fSmrg library_names_spec='${libname}${shared_ext}' 33501bedbe3fSmrg dynamic_linker="$host_os ld.so" 33511bedbe3fSmrg shlibpath_var=LIBRARY_PATH 33521bedbe3fSmrg ;; 3353ba6a1819Smrg 33541bedbe3fSmrgbsdi[[45]]*) 33551bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 33561bedbe3fSmrg need_version=no 33571bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33581bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 33591bedbe3fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 33601bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 33611bedbe3fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 33621bedbe3fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 33631bedbe3fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 33641bedbe3fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 33651bedbe3fSmrg # libtool to hard-code these into programs 33661bedbe3fSmrg ;; 3367ba6a1819Smrg 33681bedbe3fSmrgcygwin* | mingw* | pw32* | cegcc*) 33691bedbe3fSmrg version_type=windows 33701bedbe3fSmrg shrext_cmds=".dll" 33711bedbe3fSmrg need_version=no 33721bedbe3fSmrg need_lib_prefix=no 3373ba6a1819Smrg 33741bedbe3fSmrg case $GCC,$cc_basename in 33751bedbe3fSmrg yes,*) 33761bedbe3fSmrg # gcc 33771bedbe3fSmrg library_names_spec='$libname.dll.a' 33781bedbe3fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 33791bedbe3fSmrg postinstall_cmds='base_file=`basename \${file}`~ 33801bedbe3fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 33811bedbe3fSmrg dldir=$destdir/`dirname \$dlpath`~ 33821bedbe3fSmrg test -d \$dldir || mkdir -p \$dldir~ 33831bedbe3fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 33841bedbe3fSmrg chmod a+x \$dldir/$dlname~ 33851bedbe3fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 33861bedbe3fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 33871bedbe3fSmrg fi' 33881bedbe3fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 33891bedbe3fSmrg dlpath=$dir/\$dldll~ 33901bedbe3fSmrg $RM \$dlpath' 33911bedbe3fSmrg shlibpath_overrides_runpath=yes 3392ba6a1819Smrg 33931bedbe3fSmrg case $host_os in 33941bedbe3fSmrg cygwin*) 33951bedbe3fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 33961bedbe3fSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33971bedbe3fSmrgm4_if([$1], [],[ 33981bedbe3fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 33991bedbe3fSmrg ;; 34001bedbe3fSmrg mingw* | cegcc*) 34011bedbe3fSmrg # MinGW DLLs use traditional 'lib' prefix 34021bedbe3fSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34031bedbe3fSmrg ;; 34041bedbe3fSmrg pw32*) 34051bedbe3fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 34061bedbe3fSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34071bedbe3fSmrg ;; 34081bedbe3fSmrg esac 34091bedbe3fSmrg dynamic_linker='Win32 ld.exe' 3410549e21daSmrg ;; 3411549e21daSmrg 34121bedbe3fSmrg *,cl*) 34131bedbe3fSmrg # Native MSVC 34141bedbe3fSmrg libname_spec='$name' 34151bedbe3fSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34161bedbe3fSmrg library_names_spec='${libname}.dll.lib' 34171bedbe3fSmrg 34181bedbe3fSmrg case $build_os in 34191bedbe3fSmrg mingw*) 34201bedbe3fSmrg sys_lib_search_path_spec= 34211bedbe3fSmrg lt_save_ifs=$IFS 34221bedbe3fSmrg IFS=';' 34231bedbe3fSmrg for lt_path in $LIB 34241bedbe3fSmrg do 34251bedbe3fSmrg IFS=$lt_save_ifs 34261bedbe3fSmrg # Let DOS variable expansion print the short 8.3 style file name. 34271bedbe3fSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 34281bedbe3fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 34291bedbe3fSmrg done 34301bedbe3fSmrg IFS=$lt_save_ifs 34311bedbe3fSmrg # Convert to MSYS style. 34321bedbe3fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 34331bedbe3fSmrg ;; 34341bedbe3fSmrg cygwin*) 34351bedbe3fSmrg # Convert to unix form, then to dos form, then back to unix form 34361bedbe3fSmrg # but this time dos style (no spaces!) so that the unix form looks 34371bedbe3fSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 34381bedbe3fSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 34391bedbe3fSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 34401bedbe3fSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34411bedbe3fSmrg ;; 34421bedbe3fSmrg *) 34431bedbe3fSmrg sys_lib_search_path_spec="$LIB" 34441bedbe3fSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 34451bedbe3fSmrg # It is most probably a Windows format PATH. 34461bedbe3fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 34471bedbe3fSmrg else 34481bedbe3fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34491bedbe3fSmrg fi 34501bedbe3fSmrg # FIXME: find the short name or the path components, as spaces are 34511bedbe3fSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 34521bedbe3fSmrg ;; 34531bedbe3fSmrg esac 3454ba6a1819Smrg 34551bedbe3fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34561bedbe3fSmrg postinstall_cmds='base_file=`basename \${file}`~ 34571bedbe3fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34581bedbe3fSmrg dldir=$destdir/`dirname \$dlpath`~ 34591bedbe3fSmrg test -d \$dldir || mkdir -p \$dldir~ 34601bedbe3fSmrg $install_prog $dir/$dlname \$dldir/$dlname' 34611bedbe3fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34621bedbe3fSmrg dlpath=$dir/\$dldll~ 34631bedbe3fSmrg $RM \$dlpath' 34641bedbe3fSmrg shlibpath_overrides_runpath=yes 34651bedbe3fSmrg dynamic_linker='Win32 link.exe' 3466ba6a1819Smrg ;; 3467ba6a1819Smrg 3468ba6a1819Smrg *) 34691bedbe3fSmrg # Assume MSVC wrapper 34701bedbe3fSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 34711bedbe3fSmrg dynamic_linker='Win32 ld.exe' 3472ba6a1819Smrg ;; 3473ba6a1819Smrg esac 34741bedbe3fSmrg # FIXME: first we should search . and the directory the executable is in 34751bedbe3fSmrg shlibpath_var=PATH 34761bedbe3fSmrg ;; 3477ba6a1819Smrg 34781bedbe3fSmrgdarwin* | rhapsody*) 34791bedbe3fSmrg dynamic_linker="$host_os dyld" 34801bedbe3fSmrg version_type=darwin 34811bedbe3fSmrg need_lib_prefix=no 34821bedbe3fSmrg need_version=no 34831bedbe3fSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 34841bedbe3fSmrg soname_spec='${libname}${release}${major}$shared_ext' 34851bedbe3fSmrg shlibpath_overrides_runpath=yes 34861bedbe3fSmrg shlibpath_var=DYLD_LIBRARY_PATH 34871bedbe3fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 34881bedbe3fSmrgm4_if([$1], [],[ 34891bedbe3fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 34901bedbe3fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 34911bedbe3fSmrg ;; 3492ba6a1819Smrg 34931bedbe3fSmrgdgux*) 34941bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 34951bedbe3fSmrg need_lib_prefix=no 34961bedbe3fSmrg need_version=no 34971bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 34981bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 34991bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 35001bedbe3fSmrg ;; 3501ba6a1819Smrg 35021bedbe3fSmrgfreebsd* | dragonfly*) 35031bedbe3fSmrg # DragonFly does not have aout. When/if they implement a new 35041bedbe3fSmrg # versioning mechanism, adjust this. 35051bedbe3fSmrg if test -x /usr/bin/objformat; then 35061bedbe3fSmrg objformat=`/usr/bin/objformat` 3507ba6a1819Smrg else 35081bedbe3fSmrg case $host_os in 35091bedbe3fSmrg freebsd[[23]].*) objformat=aout ;; 35101bedbe3fSmrg *) objformat=elf ;; 3511ba6a1819Smrg esac 3512ba6a1819Smrg fi 35131bedbe3fSmrg version_type=freebsd-$objformat 35141bedbe3fSmrg case $version_type in 35151bedbe3fSmrg freebsd-elf*) 35161bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 35171bedbe3fSmrg need_version=no 35181bedbe3fSmrg need_lib_prefix=no 35191bedbe3fSmrg ;; 35201bedbe3fSmrg freebsd-*) 35211bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 35221bedbe3fSmrg need_version=yes 35231bedbe3fSmrg ;; 35241bedbe3fSmrg esac 35251bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 3526ba6a1819Smrg case $host_os in 35271bedbe3fSmrg freebsd2.*) 35281bedbe3fSmrg shlibpath_overrides_runpath=yes 3529ba6a1819Smrg ;; 35301bedbe3fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 35311bedbe3fSmrg shlibpath_overrides_runpath=yes 35321bedbe3fSmrg hardcode_into_libs=yes 3533549e21daSmrg ;; 35341bedbe3fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 35351bedbe3fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 35361bedbe3fSmrg shlibpath_overrides_runpath=no 35371bedbe3fSmrg hardcode_into_libs=yes 3538549e21daSmrg ;; 35391bedbe3fSmrg *) # from 4.6 on, and DragonFly 35401bedbe3fSmrg shlibpath_overrides_runpath=yes 35411bedbe3fSmrg hardcode_into_libs=yes 35421bedbe3fSmrg ;; 35431bedbe3fSmrg esac 35441bedbe3fSmrg ;; 35451bedbe3fSmrg 35461bedbe3fSmrggnu*) 35471bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 35481bedbe3fSmrg need_lib_prefix=no 35491bedbe3fSmrg need_version=no 35501bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35511bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 35521bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 35531bedbe3fSmrg shlibpath_overrides_runpath=no 35541bedbe3fSmrg hardcode_into_libs=yes 35551bedbe3fSmrg ;; 35561bedbe3fSmrg 35571bedbe3fSmrghaiku*) 35581bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 35591bedbe3fSmrg need_lib_prefix=no 35601bedbe3fSmrg need_version=no 35611bedbe3fSmrg dynamic_linker="$host_os runtime_loader" 35621bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35631bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 35641bedbe3fSmrg shlibpath_var=LIBRARY_PATH 35651bedbe3fSmrg shlibpath_overrides_runpath=yes 35661bedbe3fSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 35671bedbe3fSmrg hardcode_into_libs=yes 35681bedbe3fSmrg ;; 35691bedbe3fSmrg 35701bedbe3fSmrghpux9* | hpux10* | hpux11*) 35711bedbe3fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 35721bedbe3fSmrg # link against other versions. 35731bedbe3fSmrg version_type=sunos 35741bedbe3fSmrg need_lib_prefix=no 35751bedbe3fSmrg need_version=no 35761bedbe3fSmrg case $host_cpu in 35771bedbe3fSmrg ia64*) 35781bedbe3fSmrg shrext_cmds='.so' 35791bedbe3fSmrg hardcode_into_libs=yes 35801bedbe3fSmrg dynamic_linker="$host_os dld.so" 35811bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 35821bedbe3fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35831bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35841bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 35851bedbe3fSmrg if test "X$HPUX_IA64_MODE" = X32; then 35861bedbe3fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 35871bedbe3fSmrg else 35881bedbe3fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 35891bedbe3fSmrg fi 35901bedbe3fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 35911bedbe3fSmrg ;; 35921bedbe3fSmrg hppa*64*) 35931bedbe3fSmrg shrext_cmds='.sl' 35941bedbe3fSmrg hardcode_into_libs=yes 35951bedbe3fSmrg dynamic_linker="$host_os dld.sl" 35961bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 35971bedbe3fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35981bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35991bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 36001bedbe3fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 36011bedbe3fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3602549e21daSmrg ;; 3603ba6a1819Smrg *) 36041bedbe3fSmrg shrext_cmds='.sl' 36051bedbe3fSmrg dynamic_linker="$host_os dld.sl" 36061bedbe3fSmrg shlibpath_var=SHLIB_PATH 36071bedbe3fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 36081bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36091bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3610ba6a1819Smrg ;; 3611ba6a1819Smrg esac 36121bedbe3fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 36131bedbe3fSmrg postinstall_cmds='chmod 555 $lib' 36141bedbe3fSmrg # or fails outright, so override atomically: 36151bedbe3fSmrg install_override_mode=555 36161bedbe3fSmrg ;; 3617ba6a1819Smrg 36181bedbe3fSmrginterix[[3-9]]*) 36191bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 36201bedbe3fSmrg need_lib_prefix=no 36211bedbe3fSmrg need_version=no 36221bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 36231bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 36241bedbe3fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 36251bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 36261bedbe3fSmrg shlibpath_overrides_runpath=no 36271bedbe3fSmrg hardcode_into_libs=yes 36281bedbe3fSmrg ;; 3629ba6a1819Smrg 36301bedbe3fSmrgirix5* | irix6* | nonstopux*) 36311bedbe3fSmrg case $host_os in 36321bedbe3fSmrg nonstopux*) version_type=nonstopux ;; 36331bedbe3fSmrg *) 36341bedbe3fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 36351bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 36361bedbe3fSmrg else 36371bedbe3fSmrg version_type=irix 36381bedbe3fSmrg fi ;; 36391bedbe3fSmrg esac 36401bedbe3fSmrg need_lib_prefix=no 36411bedbe3fSmrg need_version=no 36421bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 36431bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 36441bedbe3fSmrg case $host_os in 36451bedbe3fSmrg irix5* | nonstopux*) 36461bedbe3fSmrg libsuff= shlibsuff= 36471bedbe3fSmrg ;; 36481bedbe3fSmrg *) 36491bedbe3fSmrg case $LD in # libtool.m4 will add one of these switches to LD 36501bedbe3fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 36511bedbe3fSmrg libsuff= shlibsuff= libmagic=32-bit;; 36521bedbe3fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 36531bedbe3fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 36541bedbe3fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 36551bedbe3fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 36561bedbe3fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 36571bedbe3fSmrg esac 36581bedbe3fSmrg ;; 36591bedbe3fSmrg esac 36601bedbe3fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 36611bedbe3fSmrg shlibpath_overrides_runpath=no 36621bedbe3fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 36631bedbe3fSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 36641bedbe3fSmrg hardcode_into_libs=yes 36651bedbe3fSmrg ;; 3666ba6a1819Smrg 36671bedbe3fSmrg# No shared lib support for Linux oldld, aout, or coff. 36681bedbe3fSmrglinux*oldld* | linux*aout* | linux*coff*) 36691bedbe3fSmrg dynamic_linker=no 36701bedbe3fSmrg ;; 3671ba6a1819Smrg 36721bedbe3fSmrg# This must be glibc/ELF. 36731bedbe3fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 36741bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 36751bedbe3fSmrg need_lib_prefix=no 36761bedbe3fSmrg need_version=no 36771bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36781bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 36791bedbe3fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 36801bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 36811bedbe3fSmrg shlibpath_overrides_runpath=no 3682ba6a1819Smrg 36831bedbe3fSmrg # Some binutils ld are patched to set DT_RUNPATH 36841bedbe3fSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 36851bedbe3fSmrg [lt_cv_shlibpath_overrides_runpath=no 36861bedbe3fSmrg save_LDFLAGS=$LDFLAGS 36871bedbe3fSmrg save_libdir=$libdir 36881bedbe3fSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 36891bedbe3fSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 36901bedbe3fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 36911bedbe3fSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 36921bedbe3fSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 36931bedbe3fSmrg LDFLAGS=$save_LDFLAGS 36941bedbe3fSmrg libdir=$save_libdir 3695ba6a1819Smrg ]) 36961bedbe3fSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3697ba6a1819Smrg 36981bedbe3fSmrg # This implies no fast_install, which is unacceptable. 36991bedbe3fSmrg # Some rework will be needed to allow for fast_install 37001bedbe3fSmrg # before this can be enabled. 37011bedbe3fSmrg hardcode_into_libs=yes 3702ba6a1819Smrg 37031bedbe3fSmrg # Append ld.so.conf contents to the search path 37041bedbe3fSmrg if test -f /etc/ld.so.conf; then 37051bedbe3fSmrg 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' ' '` 37061bedbe3fSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 37071bedbe3fSmrg fi 3708ba6a1819Smrg 37091bedbe3fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 37101bedbe3fSmrg # powerpc, because MkLinux only supported shared libraries with the 37111bedbe3fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 37121bedbe3fSmrg # most powerpc-linux boxes support dynamic linking these days and 37131bedbe3fSmrg # people can always --disable-shared, the test was removed, and we 37141bedbe3fSmrg # assume the GNU/Linux dynamic linker is in use. 37151bedbe3fSmrg dynamic_linker='GNU/Linux ld.so' 37161bedbe3fSmrg ;; 3717ba6a1819Smrg 37181bedbe3fSmrgnetbsd*) 37191bedbe3fSmrg version_type=sunos 37201bedbe3fSmrg need_lib_prefix=no 37211bedbe3fSmrg need_version=no 37221bedbe3fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 37231bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37241bedbe3fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37251bedbe3fSmrg dynamic_linker='NetBSD (a.out) ld.so' 37261bedbe3fSmrg else 37271bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37281bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 37291bedbe3fSmrg dynamic_linker='NetBSD ld.elf_so' 37301bedbe3fSmrg fi 37311bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 37321bedbe3fSmrg shlibpath_overrides_runpath=yes 37331bedbe3fSmrg hardcode_into_libs=yes 37341bedbe3fSmrg ;; 3735ba6a1819Smrg 37361bedbe3fSmrgnewsos6) 37371bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 37381bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37391bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 37401bedbe3fSmrg shlibpath_overrides_runpath=yes 37411bedbe3fSmrg ;; 3742549e21daSmrg 37431bedbe3fSmrg*nto* | *qnx*) 37441bedbe3fSmrg version_type=qnx 37451bedbe3fSmrg need_lib_prefix=no 37461bedbe3fSmrg need_version=no 37471bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37481bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 37491bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 37501bedbe3fSmrg shlibpath_overrides_runpath=no 37511bedbe3fSmrg hardcode_into_libs=yes 37521bedbe3fSmrg dynamic_linker='ldqnx.so' 37531bedbe3fSmrg ;; 3754ba6a1819Smrg 37551bedbe3fSmrgopenbsd*) 37561bedbe3fSmrg version_type=sunos 37571bedbe3fSmrg sys_lib_dlsearch_path_spec="/usr/lib" 37581bedbe3fSmrg need_lib_prefix=no 37591bedbe3fSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 37601bedbe3fSmrg case $host_os in 37611bedbe3fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 37621bedbe3fSmrg *) need_version=no ;; 37631bedbe3fSmrg esac 37641bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37651bedbe3fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37661bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 37671bedbe3fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 37681bedbe3fSmrg case $host_os in 37691bedbe3fSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 37701bedbe3fSmrg shlibpath_overrides_runpath=no 37711bedbe3fSmrg ;; 37721bedbe3fSmrg *) 37731bedbe3fSmrg shlibpath_overrides_runpath=yes 37741bedbe3fSmrg ;; 37751bedbe3fSmrg esac 37761bedbe3fSmrg else 37771bedbe3fSmrg shlibpath_overrides_runpath=yes 37781bedbe3fSmrg fi 37791bedbe3fSmrg ;; 3780ba6a1819Smrg 37811bedbe3fSmrgos2*) 37821bedbe3fSmrg libname_spec='$name' 37831bedbe3fSmrg shrext_cmds=".dll" 37841bedbe3fSmrg need_lib_prefix=no 37851bedbe3fSmrg library_names_spec='$libname${shared_ext} $libname.a' 37861bedbe3fSmrg dynamic_linker='OS/2 ld.exe' 37871bedbe3fSmrg shlibpath_var=LIBPATH 37881bedbe3fSmrg ;; 3789ba6a1819Smrg 37901bedbe3fSmrgosf3* | osf4* | osf5*) 37911bedbe3fSmrg version_type=osf 37921bedbe3fSmrg need_lib_prefix=no 37931bedbe3fSmrg need_version=no 37941bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 37951bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37961bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 37971bedbe3fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 37981bedbe3fSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 37991bedbe3fSmrg ;; 3800ba6a1819Smrg 38011bedbe3fSmrgrdos*) 38021bedbe3fSmrg dynamic_linker=no 38031bedbe3fSmrg ;; 3804ba6a1819Smrg 38051bedbe3fSmrgsolaris*) 38061bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 38071bedbe3fSmrg need_lib_prefix=no 38081bedbe3fSmrg need_version=no 38091bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38101bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 38111bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 38121bedbe3fSmrg shlibpath_overrides_runpath=yes 38131bedbe3fSmrg hardcode_into_libs=yes 38141bedbe3fSmrg # ldd complains unless libraries are executable 38151bedbe3fSmrg postinstall_cmds='chmod +x $lib' 38161bedbe3fSmrg ;; 3817ba6a1819Smrg 38181bedbe3fSmrgsunos4*) 38191bedbe3fSmrg version_type=sunos 38201bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38211bedbe3fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 38221bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 38231bedbe3fSmrg shlibpath_overrides_runpath=yes 38241bedbe3fSmrg if test "$with_gnu_ld" = yes; then 38251bedbe3fSmrg need_lib_prefix=no 38261bedbe3fSmrg fi 38271bedbe3fSmrg need_version=yes 38281bedbe3fSmrg ;; 3829ba6a1819Smrg 38301bedbe3fSmrgsysv4 | sysv4.3*) 38311bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 38321bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38331bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 38341bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 38351bedbe3fSmrg case $host_vendor in 38361bedbe3fSmrg sni) 38371bedbe3fSmrg shlibpath_overrides_runpath=no 38381bedbe3fSmrg need_lib_prefix=no 38391bedbe3fSmrg runpath_var=LD_RUN_PATH 38401bedbe3fSmrg ;; 38411bedbe3fSmrg siemens) 38421bedbe3fSmrg need_lib_prefix=no 38431bedbe3fSmrg ;; 38441bedbe3fSmrg motorola) 38451bedbe3fSmrg need_lib_prefix=no 38461bedbe3fSmrg need_version=no 38471bedbe3fSmrg shlibpath_overrides_runpath=no 38481bedbe3fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 38491bedbe3fSmrg ;; 38501bedbe3fSmrg esac 38511bedbe3fSmrg ;; 3852ba6a1819Smrg 38531bedbe3fSmrgsysv4*MP*) 38541bedbe3fSmrg if test -d /usr/nec ;then 38551bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 38561bedbe3fSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 38571bedbe3fSmrg soname_spec='$libname${shared_ext}.$major' 38581bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 38591bedbe3fSmrg fi 38601bedbe3fSmrg ;; 3861ba6a1819Smrg 38621bedbe3fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 38631bedbe3fSmrg version_type=freebsd-elf 38641bedbe3fSmrg need_lib_prefix=no 38651bedbe3fSmrg need_version=no 38661bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 38671bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 38681bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 38691bedbe3fSmrg shlibpath_overrides_runpath=yes 38701bedbe3fSmrg hardcode_into_libs=yes 38711bedbe3fSmrg if test "$with_gnu_ld" = yes; then 38721bedbe3fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3873ba6a1819Smrg else 38741bedbe3fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 38751bedbe3fSmrg case $host_os in 38761bedbe3fSmrg sco3.2v5*) 38771bedbe3fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 38781bedbe3fSmrg ;; 38791bedbe3fSmrg esac 3880ba6a1819Smrg fi 38811bedbe3fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 38821bedbe3fSmrg ;; 3883ba6a1819Smrg 38841bedbe3fSmrgtpf*) 38851bedbe3fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 38861bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 38871bedbe3fSmrg need_lib_prefix=no 38881bedbe3fSmrg need_version=no 38891bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38901bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 38911bedbe3fSmrg shlibpath_overrides_runpath=no 38921bedbe3fSmrg hardcode_into_libs=yes 38931bedbe3fSmrg ;; 3894ba6a1819Smrg 38951bedbe3fSmrguts4*) 38961bedbe3fSmrg version_type=linux # correct to gnu/linux during the next big refactor 38971bedbe3fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38981bedbe3fSmrg soname_spec='${libname}${release}${shared_ext}$major' 38991bedbe3fSmrg shlibpath_var=LD_LIBRARY_PATH 39001bedbe3fSmrg ;; 3901ba6a1819Smrg 39021bedbe3fSmrg*) 39031bedbe3fSmrg dynamic_linker=no 39041bedbe3fSmrg ;; 39051bedbe3fSmrgesac 39061bedbe3fSmrgAC_MSG_RESULT([$dynamic_linker]) 39071bedbe3fSmrgtest "$dynamic_linker" = no && can_build_shared=no 39081bedbe3fSmrg 39091bedbe3fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 39101bedbe3fSmrgif test "$GCC" = yes; then 39111bedbe3fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 39121bedbe3fSmrgfi 39131bedbe3fSmrg 39141bedbe3fSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 39151bedbe3fSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 39161bedbe3fSmrgfi 39171bedbe3fSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 39181bedbe3fSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 39191bedbe3fSmrgfi 39201bedbe3fSmrg 39211bedbe3fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 39221bedbe3fSmrg [Variables whose values should be saved in libtool wrapper scripts and 39231bedbe3fSmrg restored at link time]) 39241bedbe3fSmrg_LT_DECL([], [need_lib_prefix], [0], 39251bedbe3fSmrg [Do we need the "lib" prefix for modules?]) 39261bedbe3fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 39271bedbe3fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 39281bedbe3fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 39291bedbe3fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 39301bedbe3fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 39311bedbe3fSmrg [Is shlibpath searched before the hard-coded library search path?]) 39321bedbe3fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 39331bedbe3fSmrg_LT_DECL([], [library_names_spec], [1], 39341bedbe3fSmrg [[List of archive names. First name is the real one, the rest are links. 39351bedbe3fSmrg The last name is the one that the linker finds with -lNAME]]) 39361bedbe3fSmrg_LT_DECL([], [soname_spec], [1], 39371bedbe3fSmrg [[The coded name of the library, if different from the real name]]) 39381bedbe3fSmrg_LT_DECL([], [install_override_mode], [1], 39391bedbe3fSmrg [Permission mode override for installation of shared libraries]) 39401bedbe3fSmrg_LT_DECL([], [postinstall_cmds], [2], 39411bedbe3fSmrg [Command to use after installation of a shared archive]) 39421bedbe3fSmrg_LT_DECL([], [postuninstall_cmds], [2], 39431bedbe3fSmrg [Command to use after uninstallation of a shared archive]) 39441bedbe3fSmrg_LT_DECL([], [finish_cmds], [2], 39451bedbe3fSmrg [Commands used to finish a libtool library installation in a directory]) 39461bedbe3fSmrg_LT_DECL([], [finish_eval], [1], 39471bedbe3fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 39481bedbe3fSmrg not shown]]) 39491bedbe3fSmrg_LT_DECL([], [hardcode_into_libs], [0], 39501bedbe3fSmrg [Whether we should hardcode library paths into libraries]) 39511bedbe3fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 39521bedbe3fSmrg [Compile-time system search path for libraries]) 39531bedbe3fSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 39541bedbe3fSmrg [Run-time system search path for libraries]) 39551bedbe3fSmrg])# _LT_SYS_DYNAMIC_LINKER 39561bedbe3fSmrg 39571bedbe3fSmrg 39581bedbe3fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 39591bedbe3fSmrg# -------------------------- 39601bedbe3fSmrg# find a file program which can recognize shared library 39611bedbe3fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 39621bedbe3fSmrg[m4_require([_LT_DECL_EGREP])dnl 39631bedbe3fSmrgAC_MSG_CHECKING([for $1]) 39641bedbe3fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 39651bedbe3fSmrg[case $MAGIC_CMD in 39661bedbe3fSmrg[[\\/*] | ?:[\\/]*]) 39671bedbe3fSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 39681bedbe3fSmrg ;; 39691bedbe3fSmrg*) 39701bedbe3fSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 39711bedbe3fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 39721bedbe3fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 39731bedbe3fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 39741bedbe3fSmrgdnl not every word. This closes a longstanding sh security hole. 39751bedbe3fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 39761bedbe3fSmrg for ac_dir in $ac_dummy; do 39771bedbe3fSmrg IFS="$lt_save_ifs" 39781bedbe3fSmrg test -z "$ac_dir" && ac_dir=. 39791bedbe3fSmrg if test -f $ac_dir/$1; then 39801bedbe3fSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 39811bedbe3fSmrg if test -n "$file_magic_test_file"; then 39821bedbe3fSmrg case $deplibs_check_method in 39831bedbe3fSmrg "file_magic "*) 39841bedbe3fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 39851bedbe3fSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 39861bedbe3fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 39871bedbe3fSmrg $EGREP "$file_magic_regex" > /dev/null; then 39881bedbe3fSmrg : 39891bedbe3fSmrg else 39901bedbe3fSmrg cat <<_LT_EOF 1>&2 39911bedbe3fSmrg 39921bedbe3fSmrg*** Warning: the command libtool uses to detect shared libraries, 39931bedbe3fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 39941bedbe3fSmrg*** The result is that libtool may fail to recognize shared libraries 39951bedbe3fSmrg*** as such. This will affect the creation of libtool libraries that 39961bedbe3fSmrg*** depend on shared libraries, but programs linked with such libtool 39971bedbe3fSmrg*** libraries will work regardless of this problem. Nevertheless, you 39981bedbe3fSmrg*** may want to report the problem to your system manager and/or to 39991bedbe3fSmrg*** bug-libtool@gnu.org 40001bedbe3fSmrg 40011bedbe3fSmrg_LT_EOF 40021bedbe3fSmrg fi ;; 40031bedbe3fSmrg esac 40041bedbe3fSmrg fi 40051bedbe3fSmrg break 4006549e21daSmrg fi 40071bedbe3fSmrg done 40081bedbe3fSmrg IFS="$lt_save_ifs" 40091bedbe3fSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 40101bedbe3fSmrg ;; 40111bedbe3fSmrgesac]) 40121bedbe3fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40131bedbe3fSmrgif test -n "$MAGIC_CMD"; then 40141bedbe3fSmrg AC_MSG_RESULT($MAGIC_CMD) 40151bedbe3fSmrgelse 40161bedbe3fSmrg AC_MSG_RESULT(no) 4017ba6a1819Smrgfi 40181bedbe3fSmrg_LT_DECL([], [MAGIC_CMD], [0], 40191bedbe3fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 40201bedbe3fSmrg])# _LT_PATH_TOOL_PREFIX 4021ba6a1819Smrg 40221bedbe3fSmrg# Old name: 40231bedbe3fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 40241bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 40251bedbe3fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4026ba6a1819Smrg 40271bedbe3fSmrg 40281bedbe3fSmrg# _LT_PATH_MAGIC 40291bedbe3fSmrg# -------------- 40301bedbe3fSmrg# find a file program which can recognize a shared library 40311bedbe3fSmrgm4_defun([_LT_PATH_MAGIC], 40321bedbe3fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 40331bedbe3fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 40341bedbe3fSmrg if test -n "$ac_tool_prefix"; then 40351bedbe3fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 40361bedbe3fSmrg else 40371bedbe3fSmrg MAGIC_CMD=: 40381bedbe3fSmrg fi 40391bedbe3fSmrgfi 40401bedbe3fSmrg])# _LT_PATH_MAGIC 40411bedbe3fSmrg 40421bedbe3fSmrg 40431bedbe3fSmrg# LT_PATH_LD 40441bedbe3fSmrg# ---------- 40451bedbe3fSmrg# find the pathname to the GNU or non-GNU linker 40461bedbe3fSmrgAC_DEFUN([LT_PATH_LD], 40471bedbe3fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 40481bedbe3fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 40491bedbe3fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4050549e21daSmrgm4_require([_LT_DECL_SED])dnl 40511bedbe3fSmrgm4_require([_LT_DECL_EGREP])dnl 40521bedbe3fSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 40531bedbe3fSmrg 40541bedbe3fSmrgAC_ARG_WITH([gnu-ld], 40551bedbe3fSmrg [AS_HELP_STRING([--with-gnu-ld], 40561bedbe3fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 40571bedbe3fSmrg [test "$withval" = no || with_gnu_ld=yes], 40581bedbe3fSmrg [with_gnu_ld=no])dnl 40591bedbe3fSmrg 40601bedbe3fSmrgac_prog=ld 4061549e21daSmrgif test "$GCC" = yes; then 40621bedbe3fSmrg # Check if gcc -print-prog-name=ld gives a path. 40631bedbe3fSmrg AC_MSG_CHECKING([for ld used by $CC]) 40641bedbe3fSmrg case $host in 40651bedbe3fSmrg *-*-mingw*) 40661bedbe3fSmrg # gcc leaves a trailing carriage return which upsets mingw 40671bedbe3fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 40681bedbe3fSmrg *) 40691bedbe3fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4070549e21daSmrg esac 40711bedbe3fSmrg case $ac_prog in 40721bedbe3fSmrg # Accept absolute paths. 40731bedbe3fSmrg [[\\/]]* | ?:[[\\/]]*) 40741bedbe3fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 40751bedbe3fSmrg # Canonicalize the pathname of ld 40761bedbe3fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 40771bedbe3fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 40781bedbe3fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 40791bedbe3fSmrg done 40801bedbe3fSmrg test -z "$LD" && LD="$ac_prog" 40811bedbe3fSmrg ;; 40821bedbe3fSmrg "") 40831bedbe3fSmrg # If it fails, then pretend we aren't using GCC. 40841bedbe3fSmrg ac_prog=ld 4085549e21daSmrg ;; 4086549e21daSmrg *) 40871bedbe3fSmrg # If it is relative, then search for the first ld in PATH. 40881bedbe3fSmrg with_gnu_ld=unknown 4089549e21daSmrg ;; 4090549e21daSmrg esac 40911bedbe3fSmrgelif test "$with_gnu_ld" = yes; then 40921bedbe3fSmrg AC_MSG_CHECKING([for GNU ld]) 40931bedbe3fSmrgelse 40941bedbe3fSmrg AC_MSG_CHECKING([for non-GNU ld]) 40951bedbe3fSmrgfi 40961bedbe3fSmrgAC_CACHE_VAL(lt_cv_path_LD, 40971bedbe3fSmrg[if test -z "$LD"; then 40981bedbe3fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40991bedbe3fSmrg for ac_dir in $PATH; do 41001bedbe3fSmrg IFS="$lt_save_ifs" 41011bedbe3fSmrg test -z "$ac_dir" && ac_dir=. 41021bedbe3fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 41031bedbe3fSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 41041bedbe3fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 41051bedbe3fSmrg # but apparently some variants of GNU ld only accept -v. 41061bedbe3fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 41071bedbe3fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 41081bedbe3fSmrg *GNU* | *'with BFD'*) 41091bedbe3fSmrg test "$with_gnu_ld" != no && break 41101bedbe3fSmrg ;; 41111bedbe3fSmrg *) 41121bedbe3fSmrg test "$with_gnu_ld" != yes && break 41131bedbe3fSmrg ;; 41141bedbe3fSmrg esac 4115549e21daSmrg fi 4116549e21daSmrg done 41171bedbe3fSmrg IFS="$lt_save_ifs" 4118549e21daSmrgelse 41191bedbe3fSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 4120549e21daSmrgfi]) 41211bedbe3fSmrgLD="$lt_cv_path_LD" 41221bedbe3fSmrgif test -n "$LD"; then 41231bedbe3fSmrg AC_MSG_RESULT($LD) 41241bedbe3fSmrgelse 41251bedbe3fSmrg AC_MSG_RESULT(no) 41261bedbe3fSmrgfi 41271bedbe3fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 41281bedbe3fSmrg_LT_PATH_LD_GNU 41291bedbe3fSmrgAC_SUBST([LD]) 4130ba6a1819Smrg 41311bedbe3fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 41321bedbe3fSmrg])# LT_PATH_LD 4133ba6a1819Smrg 41341bedbe3fSmrg# Old names: 41351bedbe3fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 41361bedbe3fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 41371bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 41381bedbe3fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 41391bedbe3fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 4140ba6a1819Smrg 4141ba6a1819Smrg 41421bedbe3fSmrg# _LT_PATH_LD_GNU 41431bedbe3fSmrg#- -------------- 41441bedbe3fSmrgm4_defun([_LT_PATH_LD_GNU], 41451bedbe3fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 41461bedbe3fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 41471bedbe3fSmrgcase `$LD -v 2>&1 </dev/null` in 41481bedbe3fSmrg*GNU* | *'with BFD'*) 41491bedbe3fSmrg lt_cv_prog_gnu_ld=yes 4150ba6a1819Smrg ;; 41511bedbe3fSmrg*) 41521bedbe3fSmrg lt_cv_prog_gnu_ld=no 41531bedbe3fSmrg ;; 41541bedbe3fSmrgesac]) 41551bedbe3fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 41561bedbe3fSmrg])# _LT_PATH_LD_GNU 4157ba6a1819Smrg 41581bedbe3fSmrg 41591bedbe3fSmrg# _LT_CMD_RELOAD 41601bedbe3fSmrg# -------------- 41611bedbe3fSmrg# find reload flag for linker 41621bedbe3fSmrg# -- PORTME Some linkers may need a different reload flag. 41631bedbe3fSmrgm4_defun([_LT_CMD_RELOAD], 41641bedbe3fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 41651bedbe3fSmrg lt_cv_ld_reload_flag, 41661bedbe3fSmrg [lt_cv_ld_reload_flag='-r']) 41671bedbe3fSmrgreload_flag=$lt_cv_ld_reload_flag 41681bedbe3fSmrgcase $reload_flag in 41691bedbe3fSmrg"" | " "*) ;; 41701bedbe3fSmrg*) reload_flag=" $reload_flag" ;; 41711bedbe3fSmrgesac 41721bedbe3fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 41731bedbe3fSmrgcase $host_os in 41741bedbe3fSmrg cygwin* | mingw* | pw32* | cegcc*) 41751bedbe3fSmrg if test "$GCC" != yes; then 41761bedbe3fSmrg reload_cmds=false 41771bedbe3fSmrg fi 4178549e21daSmrg ;; 41791bedbe3fSmrg darwin*) 41801bedbe3fSmrg if test "$GCC" = yes; then 41811bedbe3fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 41821bedbe3fSmrg else 41831bedbe3fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 41841bedbe3fSmrg fi 4185549e21daSmrg ;; 41861bedbe3fSmrgesac 41871bedbe3fSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 41881bedbe3fSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 41891bedbe3fSmrg])# _LT_CMD_RELOAD 41901bedbe3fSmrg 41911bedbe3fSmrg 41921bedbe3fSmrg# _LT_CHECK_MAGIC_METHOD 41931bedbe3fSmrg# ---------------------- 41941bedbe3fSmrg# how to check for library dependencies 41951bedbe3fSmrg# -- PORTME fill in with the dynamic library characteristics 41961bedbe3fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 41971bedbe3fSmrg[m4_require([_LT_DECL_EGREP]) 41981bedbe3fSmrgm4_require([_LT_DECL_OBJDUMP]) 41991bedbe3fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 42001bedbe3fSmrglt_cv_deplibs_check_method, 42011bedbe3fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 42021bedbe3fSmrglt_cv_file_magic_test_file= 42031bedbe3fSmrglt_cv_deplibs_check_method='unknown' 42041bedbe3fSmrg# Need to set the preceding variable on all platforms that support 42051bedbe3fSmrg# interlibrary dependencies. 42061bedbe3fSmrg# 'none' -- dependencies not supported. 42071bedbe3fSmrg# `unknown' -- same as none, but documents that we really don't know. 42081bedbe3fSmrg# 'pass_all' -- all dependencies passed with no checks. 42091bedbe3fSmrg# 'test_compile' -- check by making test program. 42101bedbe3fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 42111bedbe3fSmrg# which responds to the $file_magic_cmd with a given extended regex. 42121bedbe3fSmrg# If you have `file' or equivalent on your system and you're not sure 42131bedbe3fSmrg# whether `pass_all' will *always* work, you probably want this one. 42141bedbe3fSmrg 42151bedbe3fSmrgcase $host_os in 42161bedbe3fSmrgaix[[4-9]]*) 42171bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4218ba6a1819Smrg ;; 4219ba6a1819Smrg 4220ba6a1819Smrgbeos*) 42211bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4222ba6a1819Smrg ;; 4223ba6a1819Smrg 4224ba6a1819Smrgbsdi[[45]]*) 42251bedbe3fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 42261bedbe3fSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 42271bedbe3fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 4228ba6a1819Smrg ;; 4229ba6a1819Smrg 42301bedbe3fSmrgcygwin*) 42311bedbe3fSmrg # func_win32_libid is a shell function defined in ltmain.sh 42321bedbe3fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42331bedbe3fSmrg lt_cv_file_magic_cmd='func_win32_libid' 42341bedbe3fSmrg ;; 4235ba6a1819Smrg 42361bedbe3fSmrgmingw* | pw32*) 42371bedbe3fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 42381bedbe3fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 42391bedbe3fSmrg # unless we find 'file', for example because we are cross-compiling. 42401bedbe3fSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 42411bedbe3fSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 42421bedbe3fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42431bedbe3fSmrg lt_cv_file_magic_cmd='func_win32_libid' 42441bedbe3fSmrg else 42451bedbe3fSmrg # Keep this pattern in sync with the one in func_win32_libid. 42461bedbe3fSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 42471bedbe3fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 42481bedbe3fSmrg fi 4249ba6a1819Smrg ;; 4250ba6a1819Smrg 42511bedbe3fSmrgcegcc*) 42521bedbe3fSmrg # use the weaker test based on 'objdump'. See mingw*. 42531bedbe3fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 42541bedbe3fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4255ba6a1819Smrg ;; 4256ba6a1819Smrg 42571bedbe3fSmrgdarwin* | rhapsody*) 42581bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4259ba6a1819Smrg ;; 4260ba6a1819Smrg 4261ba6a1819Smrgfreebsd* | dragonfly*) 42621bedbe3fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 42631bedbe3fSmrg case $host_cpu in 42641bedbe3fSmrg i*86 ) 42651bedbe3fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 42661bedbe3fSmrg # Let's accept both of them until this is cleared up. 42671bedbe3fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 42681bedbe3fSmrg lt_cv_file_magic_cmd=/usr/bin/file 42691bedbe3fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 42701bedbe3fSmrg ;; 4271ba6a1819Smrg esac 42721bedbe3fSmrg else 42731bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4274ba6a1819Smrg fi 4275ba6a1819Smrg ;; 4276ba6a1819Smrg 4277ba6a1819Smrggnu*) 42781bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4279ba6a1819Smrg ;; 4280ba6a1819Smrg 4281549e21daSmrghaiku*) 42821bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4283549e21daSmrg ;; 4284549e21daSmrg 42851bedbe3fSmrghpux10.20* | hpux11*) 42861bedbe3fSmrg lt_cv_file_magic_cmd=/usr/bin/file 4287ba6a1819Smrg case $host_cpu in 4288ba6a1819Smrg ia64*) 42891bedbe3fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 42901bedbe3fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4291ba6a1819Smrg ;; 4292549e21daSmrg hppa*64*) 42931bedbe3fSmrg [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]'] 42941bedbe3fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4295549e21daSmrg ;; 4296549e21daSmrg *) 42971bedbe3fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 42981bedbe3fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4299ba6a1819Smrg ;; 4300ba6a1819Smrg esac 4301ba6a1819Smrg ;; 4302ba6a1819Smrg 4303549e21daSmrginterix[[3-9]]*) 43041bedbe3fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 43051bedbe3fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4306ba6a1819Smrg ;; 4307ba6a1819Smrg 4308ba6a1819Smrgirix5* | irix6* | nonstopux*) 43091bedbe3fSmrg case $LD in 43101bedbe3fSmrg *-32|*"-32 ") libmagic=32-bit;; 43111bedbe3fSmrg *-n32|*"-n32 ") libmagic=N32;; 43121bedbe3fSmrg *-64|*"-64 ") libmagic=64-bit;; 43131bedbe3fSmrg *) libmagic=never-match;; 4314ba6a1819Smrg esac 43151bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4316ba6a1819Smrg ;; 4317ba6a1819Smrg 43181bedbe3fSmrg# This must be glibc/ELF. 43191bedbe3fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 43201bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4321ba6a1819Smrg ;; 4322ba6a1819Smrg 43231bedbe3fSmrgnetbsd*) 43241bedbe3fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43251bedbe3fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 43261bedbe3fSmrg else 43271bedbe3fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 43281bedbe3fSmrg fi 43291bedbe3fSmrg ;; 4330549e21daSmrg 43311bedbe3fSmrgnewos6*) 43321bedbe3fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 43331bedbe3fSmrg lt_cv_file_magic_cmd=/usr/bin/file 43341bedbe3fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 4335ba6a1819Smrg ;; 4336ba6a1819Smrg 4337549e21daSmrg*nto* | *qnx*) 43381bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4339ba6a1819Smrg ;; 4340ba6a1819Smrg 4341ba6a1819Smrgopenbsd*) 4342549e21daSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 43431bedbe3fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4344ba6a1819Smrg else 43451bedbe3fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4346ba6a1819Smrg fi 4347ba6a1819Smrg ;; 4348ba6a1819Smrg 4349ba6a1819Smrgosf3* | osf4* | osf5*) 43501bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4351ba6a1819Smrg ;; 4352ba6a1819Smrg 4353549e21daSmrgrdos*) 43541bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4355549e21daSmrg ;; 4356549e21daSmrg 4357ba6a1819Smrgsolaris*) 43581bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4359ba6a1819Smrg ;; 4360ba6a1819Smrg 43611bedbe3fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 43621bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4363ba6a1819Smrg ;; 4364ba6a1819Smrg 4365ba6a1819Smrgsysv4 | sysv4.3*) 4366ba6a1819Smrg case $host_vendor in 43671bedbe3fSmrg motorola) 43681bedbe3fSmrg 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]]' 43691bedbe3fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 43701bedbe3fSmrg ;; 43711bedbe3fSmrg ncr) 43721bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 43731bedbe3fSmrg ;; 43741bedbe3fSmrg sequent) 43751bedbe3fSmrg lt_cv_file_magic_cmd='/bin/file' 43761bedbe3fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 43771bedbe3fSmrg ;; 43781bedbe3fSmrg sni) 43791bedbe3fSmrg lt_cv_file_magic_cmd='/bin/file' 43801bedbe3fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 43811bedbe3fSmrg lt_cv_file_magic_test_file=/lib/libc.so 43821bedbe3fSmrg ;; 43831bedbe3fSmrg siemens) 43841bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 43851bedbe3fSmrg ;; 43861bedbe3fSmrg pc) 43871bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 43881bedbe3fSmrg ;; 4389ba6a1819Smrg esac 4390ba6a1819Smrg ;; 4391ba6a1819Smrg 4392549e21daSmrgtpf*) 43931bedbe3fSmrg lt_cv_deplibs_check_method=pass_all 4394ba6a1819Smrg ;; 4395ba6a1819Smrgesac 43961bedbe3fSmrg]) 4397ba6a1819Smrg 43981bedbe3fSmrgfile_magic_glob= 43991bedbe3fSmrgwant_nocaseglob=no 44001bedbe3fSmrgif test "$build" = "$host"; then 44011bedbe3fSmrg case $host_os in 44021bedbe3fSmrg mingw* | pw32*) 44031bedbe3fSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 44041bedbe3fSmrg want_nocaseglob=yes 44051bedbe3fSmrg else 44061bedbe3fSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 44071bedbe3fSmrg fi 44081bedbe3fSmrg ;; 44091bedbe3fSmrg esac 4410ba6a1819Smrgfi 4411ba6a1819Smrg 44121bedbe3fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 44131bedbe3fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 44141bedbe3fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4415ba6a1819Smrg 44161bedbe3fSmrg_LT_DECL([], [deplibs_check_method], [1], 44171bedbe3fSmrg [Method to check whether dependent libraries are shared objects]) 44181bedbe3fSmrg_LT_DECL([], [file_magic_cmd], [1], 44191bedbe3fSmrg [Command to use when deplibs_check_method = "file_magic"]) 44201bedbe3fSmrg_LT_DECL([], [file_magic_glob], [1], 44211bedbe3fSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 44221bedbe3fSmrg_LT_DECL([], [want_nocaseglob], [1], 44231bedbe3fSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 44241bedbe3fSmrg])# _LT_CHECK_MAGIC_METHOD 4425ba6a1819Smrg 4426ba6a1819Smrg 44271bedbe3fSmrg# LT_PATH_NM 44281bedbe3fSmrg# ---------- 44291bedbe3fSmrg# find the pathname to a BSD- or MS-compatible name lister 44301bedbe3fSmrgAC_DEFUN([LT_PATH_NM], 44311bedbe3fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 44321bedbe3fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 44331bedbe3fSmrg[if test -n "$NM"; then 44341bedbe3fSmrg # Let the user override the test. 44351bedbe3fSmrg lt_cv_path_NM="$NM" 44361bedbe3fSmrgelse 44371bedbe3fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 44381bedbe3fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 44391bedbe3fSmrg lt_nm_to_check="$lt_nm_to_check nm" 44401bedbe3fSmrg fi 44411bedbe3fSmrg for lt_tmp_nm in $lt_nm_to_check; do 44421bedbe3fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 44431bedbe3fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 44441bedbe3fSmrg IFS="$lt_save_ifs" 44451bedbe3fSmrg test -z "$ac_dir" && ac_dir=. 44461bedbe3fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 44471bedbe3fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 44481bedbe3fSmrg # Check to see if the nm accepts a BSD-compat flag. 44491bedbe3fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 44501bedbe3fSmrg # nm: unknown option "B" ignored 44511bedbe3fSmrg # Tru64's nm complains that /dev/null is an invalid object file 44521bedbe3fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 44531bedbe3fSmrg */dev/null* | *'Invalid file or object type'*) 44541bedbe3fSmrg lt_cv_path_NM="$tmp_nm -B" 44551bedbe3fSmrg break 44561bedbe3fSmrg ;; 44571bedbe3fSmrg *) 44581bedbe3fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 44591bedbe3fSmrg */dev/null*) 44601bedbe3fSmrg lt_cv_path_NM="$tmp_nm -p" 44611bedbe3fSmrg break 44621bedbe3fSmrg ;; 44631bedbe3fSmrg *) 44641bedbe3fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 44651bedbe3fSmrg continue # so that we can try to find one that supports BSD flags 44661bedbe3fSmrg ;; 44671bedbe3fSmrg esac 44681bedbe3fSmrg ;; 4469ba6a1819Smrg esac 4470ba6a1819Smrg fi 44711bedbe3fSmrg done 44721bedbe3fSmrg IFS="$lt_save_ifs" 4473ba6a1819Smrg done 44741bedbe3fSmrg : ${lt_cv_path_NM=no} 44751bedbe3fSmrgfi]) 44761bedbe3fSmrgif test "$lt_cv_path_NM" != "no"; then 44771bedbe3fSmrg NM="$lt_cv_path_NM" 4478ba6a1819Smrgelse 44791bedbe3fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 44801bedbe3fSmrg if test -n "$DUMPBIN"; then : 44811bedbe3fSmrg # Let the user override the test. 4482ba6a1819Smrg else 44831bedbe3fSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 44841bedbe3fSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 44851bedbe3fSmrg *COFF*) 44861bedbe3fSmrg DUMPBIN="$DUMPBIN -symbols" 44871bedbe3fSmrg ;; 44881bedbe3fSmrg *) 44891bedbe3fSmrg DUMPBIN=: 44901bedbe3fSmrg ;; 44911bedbe3fSmrg esac 44921bedbe3fSmrg fi 44931bedbe3fSmrg AC_SUBST([DUMPBIN]) 44941bedbe3fSmrg if test "$DUMPBIN" != ":"; then 44951bedbe3fSmrg NM="$DUMPBIN" 4496ba6a1819Smrg fi 4497ba6a1819Smrgfi 44981bedbe3fSmrgtest -z "$NM" && NM=nm 44991bedbe3fSmrgAC_SUBST([NM]) 45001bedbe3fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4501ba6a1819Smrg 45021bedbe3fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 45031bedbe3fSmrg [lt_cv_nm_interface="BSD nm" 45041bedbe3fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 45051bedbe3fSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 45061bedbe3fSmrg (eval "$ac_compile" 2>conftest.err) 45071bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45081bedbe3fSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 45091bedbe3fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 45101bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45111bedbe3fSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 45121bedbe3fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 45131bedbe3fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 45141bedbe3fSmrg lt_cv_nm_interface="MS dumpbin" 45151bedbe3fSmrg fi 45161bedbe3fSmrg rm -f conftest*]) 45171bedbe3fSmrg])# LT_PATH_NM 4518ba6a1819Smrg 45191bedbe3fSmrg# Old names: 45201bedbe3fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 45211bedbe3fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 45221bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 45231bedbe3fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 45241bedbe3fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 4525549e21daSmrg 45261bedbe3fSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 45271bedbe3fSmrg# -------------------------------- 45281bedbe3fSmrg# how to determine the name of the shared library 45291bedbe3fSmrg# associated with a specific link library. 45301bedbe3fSmrg# -- PORTME fill in with the dynamic library characteristics 45311bedbe3fSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 45321bedbe3fSmrg[m4_require([_LT_DECL_EGREP]) 45331bedbe3fSmrgm4_require([_LT_DECL_OBJDUMP]) 45341bedbe3fSmrgm4_require([_LT_DECL_DLLTOOL]) 45351bedbe3fSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 45361bedbe3fSmrglt_cv_sharedlib_from_linklib_cmd, 45371bedbe3fSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4538549e21daSmrg 45391bedbe3fSmrgcase $host_os in 45401bedbe3fSmrgcygwin* | mingw* | pw32* | cegcc*) 45411bedbe3fSmrg # two different shell functions defined in ltmain.sh 45421bedbe3fSmrg # decide which to use based on capabilities of $DLLTOOL 45431bedbe3fSmrg case `$DLLTOOL --help 2>&1` in 45441bedbe3fSmrg *--identify-strict*) 45451bedbe3fSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4546ba6a1819Smrg ;; 4547ba6a1819Smrg *) 45481bedbe3fSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4549ba6a1819Smrg ;; 4550ba6a1819Smrg esac 45511bedbe3fSmrg ;; 45521bedbe3fSmrg*) 45531bedbe3fSmrg # fallback: assume linklib IS sharedlib 45541bedbe3fSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 45551bedbe3fSmrg ;; 45561bedbe3fSmrgesac 45571bedbe3fSmrg]) 45581bedbe3fSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 45591bedbe3fSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 45601bedbe3fSmrg 45611bedbe3fSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 45621bedbe3fSmrg [Command to associate shared and link libraries]) 45631bedbe3fSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 45641bedbe3fSmrg 45651bedbe3fSmrg 45661bedbe3fSmrg# _LT_PATH_MANIFEST_TOOL 45671bedbe3fSmrg# ---------------------- 45681bedbe3fSmrg# locate the manifest tool 45691bedbe3fSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 45701bedbe3fSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 45711bedbe3fSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 45721bedbe3fSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 45731bedbe3fSmrg [lt_cv_path_mainfest_tool=no 45741bedbe3fSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 45751bedbe3fSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 45761bedbe3fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45771bedbe3fSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 45781bedbe3fSmrg lt_cv_path_mainfest_tool=yes 45791bedbe3fSmrg fi 45801bedbe3fSmrg rm -f conftest*]) 45811bedbe3fSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 45821bedbe3fSmrg MANIFEST_TOOL=: 4583ba6a1819Smrgfi 45841bedbe3fSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 45851bedbe3fSmrg])# _LT_PATH_MANIFEST_TOOL 4586ba6a1819Smrg 4587549e21daSmrg 45881bedbe3fSmrg# LT_LIB_M 45891bedbe3fSmrg# -------- 45901bedbe3fSmrg# check for math library 45911bedbe3fSmrgAC_DEFUN([LT_LIB_M], 45921bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 45931bedbe3fSmrgLIBM= 45941bedbe3fSmrgcase $host in 45951bedbe3fSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 45961bedbe3fSmrg # These system don't have libm, or don't need it 45971bedbe3fSmrg ;; 45981bedbe3fSmrg*-ncr-sysv4.3*) 45991bedbe3fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 46001bedbe3fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4601ba6a1819Smrg ;; 4602ba6a1819Smrg*) 46031bedbe3fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4604ba6a1819Smrg ;; 46051bedbe3fSmrgesac 46061bedbe3fSmrgAC_SUBST([LIBM]) 46071bedbe3fSmrg])# LT_LIB_M 4608ba6a1819Smrg 46091bedbe3fSmrg# Old name: 46101bedbe3fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 46111bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 46121bedbe3fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4613ba6a1819Smrg 4614ba6a1819Smrg 46151bedbe3fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 46161bedbe3fSmrg# ------------------------------- 46171bedbe3fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 46181bedbe3fSmrg[m4_require([_LT_TAG_COMPILER])dnl 4619ba6a1819Smrg 46201bedbe3fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 46211bedbe3fSmrg 46221bedbe3fSmrgif test "$GCC" = yes; then 46231bedbe3fSmrg case $cc_basename in 46241bedbe3fSmrg nvcc*) 46251bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 46261bedbe3fSmrg *) 46271bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 46281bedbe3fSmrg esac 46291bedbe3fSmrg 46301bedbe3fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 46311bedbe3fSmrg lt_cv_prog_compiler_rtti_exceptions, 46321bedbe3fSmrg [-fno-rtti -fno-exceptions], [], 46331bedbe3fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 46341bedbe3fSmrgfi 46351bedbe3fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 46361bedbe3fSmrg [Compiler flag to turn off builtin functions]) 46371bedbe3fSmrg])# _LT_COMPILER_NO_RTTI 46381bedbe3fSmrg 46391bedbe3fSmrg 46401bedbe3fSmrg# _LT_CMD_GLOBAL_SYMBOLS 4641549e21daSmrg# ---------------------- 46421bedbe3fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 46431bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 46441bedbe3fSmrgAC_REQUIRE([AC_PROG_CC])dnl 46451bedbe3fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 46461bedbe3fSmrgAC_REQUIRE([LT_PATH_NM])dnl 46471bedbe3fSmrgAC_REQUIRE([LT_PATH_LD])dnl 46481bedbe3fSmrgm4_require([_LT_DECL_SED])dnl 46491bedbe3fSmrgm4_require([_LT_DECL_EGREP])dnl 46501bedbe3fSmrgm4_require([_LT_TAG_COMPILER])dnl 4651ba6a1819Smrg 46521bedbe3fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 46531bedbe3fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 46541bedbe3fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 46551bedbe3fSmrg[ 46561bedbe3fSmrg# These are sane defaults that work on at least a few old systems. 46571bedbe3fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4658ba6a1819Smrg 46591bedbe3fSmrg# Character class describing NM global symbol codes. 46601bedbe3fSmrgsymcode='[[BCDEGRST]]' 4661ba6a1819Smrg 46621bedbe3fSmrg# Regexp to match symbols that can be accessed directly from C. 46631bedbe3fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4664ba6a1819Smrg 46651bedbe3fSmrg# Define system-specific variables. 46661bedbe3fSmrgcase $host_os in 46671bedbe3fSmrgaix*) 46681bedbe3fSmrg symcode='[[BCDT]]' 4669ba6a1819Smrg ;; 46701bedbe3fSmrgcygwin* | mingw* | pw32* | cegcc*) 46711bedbe3fSmrg symcode='[[ABCDGISTW]]' 46721bedbe3fSmrg ;; 46731bedbe3fSmrghpux*) 46741bedbe3fSmrg if test "$host_cpu" = ia64; then 46751bedbe3fSmrg symcode='[[ABCDEGRST]]' 4676549e21daSmrg fi 4677549e21daSmrg ;; 46781bedbe3fSmrgirix* | nonstopux*) 46791bedbe3fSmrg symcode='[[BCDEGRST]]' 4680ba6a1819Smrg ;; 46811bedbe3fSmrgosf*) 46821bedbe3fSmrg symcode='[[BCDEGQRST]]' 4683ba6a1819Smrg ;; 46841bedbe3fSmrgsolaris*) 46851bedbe3fSmrg symcode='[[BDRT]]' 4686ba6a1819Smrg ;; 46871bedbe3fSmrgsco3.2v5*) 46881bedbe3fSmrg symcode='[[DT]]' 4689ba6a1819Smrg ;; 46901bedbe3fSmrgsysv4.2uw2*) 46911bedbe3fSmrg symcode='[[DT]]' 46921bedbe3fSmrg ;; 46931bedbe3fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 46941bedbe3fSmrg symcode='[[ABDT]]' 4695549e21daSmrg ;; 46961bedbe3fSmrgsysv4) 46971bedbe3fSmrg symcode='[[DFNSTU]]' 46981bedbe3fSmrg ;; 46991bedbe3fSmrgesac 4700549e21daSmrg 47011bedbe3fSmrg# If we're using GNU nm, then use its standard symbol codes. 47021bedbe3fSmrgcase `$NM -V 2>&1` in 47031bedbe3fSmrg*GNU* | *'with BFD'*) 47041bedbe3fSmrg symcode='[[ABCDGIRSTW]]' ;; 47051bedbe3fSmrgesac 4706ba6a1819Smrg 47071bedbe3fSmrg# Transform an extracted symbol line into a proper C declaration. 47081bedbe3fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 47091bedbe3fSmrg# so use this general approach. 47101bedbe3fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4711ba6a1819Smrg 47121bedbe3fSmrg# Transform an extracted symbol line into symbol name and symbol address 47131bedbe3fSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 47141bedbe3fSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 4715ba6a1819Smrg 47161bedbe3fSmrg# Handle CRLF in mingw tool chain 47171bedbe3fSmrgopt_cr= 47181bedbe3fSmrgcase $build_os in 47191bedbe3fSmrgmingw*) 47201bedbe3fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4721ba6a1819Smrg ;; 47221bedbe3fSmrgesac 4723ba6a1819Smrg 47241bedbe3fSmrg# Try without a prefix underscore, then with it. 47251bedbe3fSmrgfor ac_symprfx in "" "_"; do 47261bedbe3fSmrg 47271bedbe3fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 47281bedbe3fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 47291bedbe3fSmrg 47301bedbe3fSmrg # Write the raw and C identifiers. 47311bedbe3fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 47321bedbe3fSmrg # Fake it for dumpbin and say T for any non-static function 47331bedbe3fSmrg # and D for any global variable. 47341bedbe3fSmrg # Also find C++ and __fastcall symbols from MSVC++, 47351bedbe3fSmrg # which start with @ or ?. 47361bedbe3fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 47371bedbe3fSmrg" {last_section=section; section=\$ 3};"\ 47381bedbe3fSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 47391bedbe3fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 47401bedbe3fSmrg" \$ 0!~/External *\|/{next};"\ 47411bedbe3fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 47421bedbe3fSmrg" {if(hide[section]) next};"\ 47431bedbe3fSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 47441bedbe3fSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 47451bedbe3fSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 47461bedbe3fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 47471bedbe3fSmrg" ' prfx=^$ac_symprfx]" 4748ba6a1819Smrg else 47491bedbe3fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4750ba6a1819Smrg fi 47511bedbe3fSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4752ba6a1819Smrg 47531bedbe3fSmrg # Check to see that the pipe works correctly. 47541bedbe3fSmrg pipe_works=no 4755ba6a1819Smrg 47561bedbe3fSmrg rm -f conftest* 47571bedbe3fSmrg cat > conftest.$ac_ext <<_LT_EOF 47581bedbe3fSmrg#ifdef __cplusplus 47591bedbe3fSmrgextern "C" { 47601bedbe3fSmrg#endif 47611bedbe3fSmrgchar nm_test_var; 47621bedbe3fSmrgvoid nm_test_func(void); 47631bedbe3fSmrgvoid nm_test_func(void){} 47641bedbe3fSmrg#ifdef __cplusplus 47651bedbe3fSmrg} 47661bedbe3fSmrg#endif 47671bedbe3fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 47681bedbe3fSmrg_LT_EOF 4769ba6a1819Smrg 47701bedbe3fSmrg if AC_TRY_EVAL(ac_compile); then 47711bedbe3fSmrg # Now try to grab the symbols. 47721bedbe3fSmrg nlist=conftest.nm 47731bedbe3fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 47741bedbe3fSmrg # Try sorting and uniquifying the output. 47751bedbe3fSmrg if sort "$nlist" | uniq > "$nlist"T; then 47761bedbe3fSmrg mv -f "$nlist"T "$nlist" 47771bedbe3fSmrg else 47781bedbe3fSmrg rm -f "$nlist"T 47791bedbe3fSmrg fi 4780ba6a1819Smrg 47811bedbe3fSmrg # Make sure that we snagged all the symbols we need. 47821bedbe3fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 47831bedbe3fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 47841bedbe3fSmrg cat <<_LT_EOF > conftest.$ac_ext 47851bedbe3fSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 47861bedbe3fSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 47871bedbe3fSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 47881bedbe3fSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 47891bedbe3fSmrg# define LT@&t@_DLSYM_CONST 47901bedbe3fSmrg#elif defined(__osf__) 47911bedbe3fSmrg/* This system does not cope well with relocations in const data. */ 47921bedbe3fSmrg# define LT@&t@_DLSYM_CONST 47931bedbe3fSmrg#else 47941bedbe3fSmrg# define LT@&t@_DLSYM_CONST const 47951bedbe3fSmrg#endif 4796ba6a1819Smrg 47971bedbe3fSmrg#ifdef __cplusplus 47981bedbe3fSmrgextern "C" { 47991bedbe3fSmrg#endif 4800549e21daSmrg 48011bedbe3fSmrg_LT_EOF 48021bedbe3fSmrg # Now generate the symbol file. 48031bedbe3fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4804ba6a1819Smrg 48051bedbe3fSmrg cat <<_LT_EOF >> conftest.$ac_ext 4806549e21daSmrg 48071bedbe3fSmrg/* The mapping between symbol names and symbols. */ 48081bedbe3fSmrgLT@&t@_DLSYM_CONST struct { 48091bedbe3fSmrg const char *name; 48101bedbe3fSmrg void *address; 48111bedbe3fSmrg} 48121bedbe3fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 48131bedbe3fSmrg{ 48141bedbe3fSmrg { "@PROGRAM@", (void *) 0 }, 48151bedbe3fSmrg_LT_EOF 48161bedbe3fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 48171bedbe3fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 48181bedbe3fSmrg {0, (void *) 0} 48191bedbe3fSmrg}; 4820ba6a1819Smrg 48211bedbe3fSmrg/* This works around a problem in FreeBSD linker */ 48221bedbe3fSmrg#ifdef FREEBSD_WORKAROUND 48231bedbe3fSmrgstatic const void *lt_preloaded_setup() { 48241bedbe3fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 48251bedbe3fSmrg} 48261bedbe3fSmrg#endif 48271bedbe3fSmrg 48281bedbe3fSmrg#ifdef __cplusplus 48291bedbe3fSmrg} 48301bedbe3fSmrg#endif 48311bedbe3fSmrg_LT_EOF 48321bedbe3fSmrg # Now try linking the two files. 48331bedbe3fSmrg mv conftest.$ac_objext conftstm.$ac_objext 48341bedbe3fSmrg lt_globsym_save_LIBS=$LIBS 48351bedbe3fSmrg lt_globsym_save_CFLAGS=$CFLAGS 48361bedbe3fSmrg LIBS="conftstm.$ac_objext" 48371bedbe3fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 48381bedbe3fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 48391bedbe3fSmrg pipe_works=yes 48401bedbe3fSmrg fi 48411bedbe3fSmrg LIBS=$lt_globsym_save_LIBS 48421bedbe3fSmrg CFLAGS=$lt_globsym_save_CFLAGS 48431bedbe3fSmrg else 48441bedbe3fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 48451bedbe3fSmrg fi 48461bedbe3fSmrg else 48471bedbe3fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 48481bedbe3fSmrg fi 48491bedbe3fSmrg else 48501bedbe3fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 48511bedbe3fSmrg fi 48521bedbe3fSmrg else 48531bedbe3fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 48541bedbe3fSmrg cat conftest.$ac_ext >&5 48551bedbe3fSmrg fi 48561bedbe3fSmrg rm -rf conftest* conftst* 48571bedbe3fSmrg 48581bedbe3fSmrg # Do not use the global_symbol_pipe unless it works. 48591bedbe3fSmrg if test "$pipe_works" = yes; then 48601bedbe3fSmrg break 48611bedbe3fSmrg else 48621bedbe3fSmrg lt_cv_sys_global_symbol_pipe= 48631bedbe3fSmrg fi 48641bedbe3fSmrgdone 4865ba6a1819Smrg]) 48661bedbe3fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 48671bedbe3fSmrg lt_cv_sys_global_symbol_to_cdecl= 48681bedbe3fSmrgfi 48691bedbe3fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 48701bedbe3fSmrg AC_MSG_RESULT(failed) 48711bedbe3fSmrgelse 48721bedbe3fSmrg AC_MSG_RESULT(ok) 48731bedbe3fSmrgfi 4874549e21daSmrg 48751bedbe3fSmrg# Response file support. 48761bedbe3fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 48771bedbe3fSmrg nm_file_list_spec='@' 48781bedbe3fSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 48791bedbe3fSmrg nm_file_list_spec='@' 48801bedbe3fSmrgfi 4881ba6a1819Smrg 48821bedbe3fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 48831bedbe3fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 48841bedbe3fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 48851bedbe3fSmrg [Transform the output of nm in a proper C declaration]) 48861bedbe3fSmrg_LT_DECL([global_symbol_to_c_name_address], 48871bedbe3fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 48881bedbe3fSmrg [Transform the output of nm in a C name address pair]) 48891bedbe3fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 48901bedbe3fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 48911bedbe3fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 48921bedbe3fSmrg_LT_DECL([], [nm_file_list_spec], [1], 48931bedbe3fSmrg [Specify filename containing input files for $NM]) 48941bedbe3fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4895ba6a1819Smrg 4896ba6a1819Smrg 48971bedbe3fSmrg# _LT_COMPILER_PIC([TAGNAME]) 48981bedbe3fSmrg# --------------------------- 48991bedbe3fSmrgm4_defun([_LT_COMPILER_PIC], 4900549e21daSmrg[m4_require([_LT_TAG_COMPILER])dnl 49011bedbe3fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 49021bedbe3fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49031bedbe3fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4904ba6a1819Smrg 49051bedbe3fSmrgm4_if([$1], [CXX], [ 49061bedbe3fSmrg # C++ specific cases for pic, static, wl, etc. 49071bedbe3fSmrg if test "$GXX" = yes; then 49081bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49091bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4910ba6a1819Smrg 49111bedbe3fSmrg case $host_os in 49121bedbe3fSmrg aix*) 49131bedbe3fSmrg # All AIX code is PIC. 49141bedbe3fSmrg if test "$host_cpu" = ia64; then 49151bedbe3fSmrg # AIX 5 now supports IA64 processor 49161bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49171bedbe3fSmrg fi 49181bedbe3fSmrg ;; 4919ba6a1819Smrg 49201bedbe3fSmrg amigaos*) 49211bedbe3fSmrg case $host_cpu in 49221bedbe3fSmrg powerpc) 49231bedbe3fSmrg # see comment about AmigaOS4 .so support 49241bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49251bedbe3fSmrg ;; 49261bedbe3fSmrg m68k) 49271bedbe3fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 49281bedbe3fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 49291bedbe3fSmrg # like `-m68040'. 49301bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 49311bedbe3fSmrg ;; 49321bedbe3fSmrg esac 49331bedbe3fSmrg ;; 4934ba6a1819Smrg 4935549e21daSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4936549e21daSmrg # PIC is the default for these OSes. 4937549e21daSmrg ;; 4938549e21daSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4939549e21daSmrg # This hack is so that the source file can tell whether it is being 4940549e21daSmrg # built for inclusion in a dll (and should export symbols for example). 4941549e21daSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4942549e21daSmrg # (--disable-auto-import) libraries 4943549e21daSmrg m4_if([$1], [GCJ], [], 4944549e21daSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4945549e21daSmrg ;; 4946549e21daSmrg darwin* | rhapsody*) 4947549e21daSmrg # PIC is the default on this platform 4948549e21daSmrg # Common symbols not allowed in MH_DYLIB files 4949549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4950549e21daSmrg ;; 4951549e21daSmrg *djgpp*) 4952549e21daSmrg # DJGPP does not support shared libraries at all 4953549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4954549e21daSmrg ;; 4955549e21daSmrg haiku*) 4956549e21daSmrg # PIC is the default for Haiku. 4957549e21daSmrg # The "-static" flag exists, but is broken. 4958549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4959549e21daSmrg ;; 4960549e21daSmrg interix[[3-9]]*) 4961549e21daSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4962549e21daSmrg # Instead, we relocate shared libraries at runtime. 4963549e21daSmrg ;; 4964549e21daSmrg sysv4*MP*) 4965549e21daSmrg if test -d /usr/nec; then 4966549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4967549e21daSmrg fi 4968549e21daSmrg ;; 4969549e21daSmrg hpux*) 4970549e21daSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4971549e21daSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4972549e21daSmrg # sets the default TLS model and affects inlining. 4973549e21daSmrg case $host_cpu in 4974549e21daSmrg hppa*64*) 4975ba6a1819Smrg ;; 4976549e21daSmrg *) 4977549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4978549e21daSmrg ;; 4979549e21daSmrg esac 4980549e21daSmrg ;; 4981549e21daSmrg *qnx* | *nto*) 4982549e21daSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4983549e21daSmrg # it will coredump. 4984549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4985549e21daSmrg ;; 4986549e21daSmrg *) 4987549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4988549e21daSmrg ;; 4989549e21daSmrg esac 4990549e21daSmrg else 4991549e21daSmrg case $host_os in 4992549e21daSmrg aix[[4-9]]*) 4993549e21daSmrg # All AIX code is PIC. 4994549e21daSmrg if test "$host_cpu" = ia64; then 4995549e21daSmrg # AIX 5 now supports IA64 processor 4996549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4997549e21daSmrg else 4998549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4999549e21daSmrg fi 5000549e21daSmrg ;; 5001549e21daSmrg chorus*) 5002549e21daSmrg case $cc_basename in 5003549e21daSmrg cxch68*) 5004549e21daSmrg # Green Hills C++ Compiler 5005549e21daSmrg # _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" 5006ba6a1819Smrg ;; 5007ba6a1819Smrg esac 5008ba6a1819Smrg ;; 50091bedbe3fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50101bedbe3fSmrg # This hack is so that the source file can tell whether it is being 50111bedbe3fSmrg # built for inclusion in a dll (and should export symbols for example). 50121bedbe3fSmrg m4_if([$1], [GCJ], [], 50131bedbe3fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50141bedbe3fSmrg ;; 5015549e21daSmrg dgux*) 5016549e21daSmrg case $cc_basename in 5017549e21daSmrg ec++*) 5018549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5019549e21daSmrg ;; 5020549e21daSmrg ghcx*) 5021549e21daSmrg # Green Hills C++ Compiler 5022549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5023549e21daSmrg ;; 5024549e21daSmrg *) 5025549e21daSmrg ;; 5026549e21daSmrg esac 5027549e21daSmrg ;; 5028549e21daSmrg freebsd* | dragonfly*) 5029549e21daSmrg # FreeBSD uses GNU C++ 5030549e21daSmrg ;; 5031549e21daSmrg hpux9* | hpux10* | hpux11*) 5032549e21daSmrg case $cc_basename in 5033549e21daSmrg CC*) 5034549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5035549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5036549e21daSmrg if test "$host_cpu" != ia64; then 5037549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5038549e21daSmrg fi 5039549e21daSmrg ;; 5040549e21daSmrg aCC*) 5041549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5042549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5043ba6a1819Smrg case $host_cpu in 5044549e21daSmrg hppa*64*|ia64*) 5045549e21daSmrg # +Z the default 5046ba6a1819Smrg ;; 5047ba6a1819Smrg *) 5048549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5049ba6a1819Smrg ;; 5050ba6a1819Smrg esac 5051549e21daSmrg ;; 5052549e21daSmrg *) 5053549e21daSmrg ;; 5054549e21daSmrg esac 5055ba6a1819Smrg ;; 5056549e21daSmrg interix*) 5057549e21daSmrg # This is c89, which is MS Visual C++ (no shared libs) 5058549e21daSmrg # Anyone wants to do a port? 5059ba6a1819Smrg ;; 5060549e21daSmrg irix5* | irix6* | nonstopux*) 5061549e21daSmrg case $cc_basename in 5062549e21daSmrg CC*) 5063549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5064549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5065549e21daSmrg # CC pic flag -KPIC is the default. 5066549e21daSmrg ;; 5067549e21daSmrg *) 5068549e21daSmrg ;; 5069549e21daSmrg esac 5070ba6a1819Smrg ;; 5071549e21daSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5072549e21daSmrg case $cc_basename in 5073549e21daSmrg KCC*) 5074549e21daSmrg # KAI C++ Compiler 5075549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5076549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5077549e21daSmrg ;; 5078549e21daSmrg ecpc* ) 5079549e21daSmrg # old Intel C++ for x86_64 which still supported -KPIC. 5080549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5081549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5082549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5083549e21daSmrg ;; 5084549e21daSmrg icpc* ) 5085549e21daSmrg # Intel C++, used to be incompatible with GCC. 5086549e21daSmrg # ICC 10 doesn't accept -KPIC any more. 5087549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5088549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5089549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5090549e21daSmrg ;; 5091549e21daSmrg pgCC* | pgcpp*) 5092549e21daSmrg # Portland Group C++ compiler 5093549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5094549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5095549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5096549e21daSmrg ;; 5097549e21daSmrg cxx*) 5098549e21daSmrg # Compaq C++ 5099549e21daSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5100549e21daSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5101549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5102549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5103549e21daSmrg ;; 5104549e21daSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5105549e21daSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 5106549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5107549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5108549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5109549e21daSmrg ;; 5110549e21daSmrg *) 5111549e21daSmrg case `$CC -V 2>&1 | sed 5q` in 5112549e21daSmrg *Sun\ C*) 5113549e21daSmrg # Sun C++ 5.9 5114549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5115549e21daSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5116549e21daSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5117549e21daSmrg ;; 5118549e21daSmrg esac 5119549e21daSmrg ;; 5120549e21daSmrg esac 5121ba6a1819Smrg ;; 5122549e21daSmrg lynxos*) 5123549e21daSmrg ;; 5124549e21daSmrg m88k*) 5125549e21daSmrg ;; 5126549e21daSmrg mvs*) 5127549e21daSmrg case $cc_basename in 5128549e21daSmrg cxx*) 5129549e21daSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5130549e21daSmrg ;; 5131549e21daSmrg *) 5132549e21daSmrg ;; 5133ba6a1819Smrg esac 5134ba6a1819Smrg ;; 51351bedbe3fSmrg netbsd*) 51361bedbe3fSmrg ;; 51371bedbe3fSmrg *qnx* | *nto*) 51381bedbe3fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 51391bedbe3fSmrg # it will coredump. 51401bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 51411bedbe3fSmrg ;; 51421bedbe3fSmrg osf3* | osf4* | osf5*) 51431bedbe3fSmrg case $cc_basename in 51441bedbe3fSmrg KCC*) 51451bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51461bedbe3fSmrg ;; 51471bedbe3fSmrg RCC*) 51481bedbe3fSmrg # Rational C++ 2.4.1 51491bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51501bedbe3fSmrg ;; 51511bedbe3fSmrg cxx*) 51521bedbe3fSmrg # Digital/Compaq C++ 51531bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51541bedbe3fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51551bedbe3fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51561bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51571bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51581bedbe3fSmrg ;; 51591bedbe3fSmrg *) 51601bedbe3fSmrg ;; 51611bedbe3fSmrg esac 51621bedbe3fSmrg ;; 51631bedbe3fSmrg psos*) 51641bedbe3fSmrg ;; 51651bedbe3fSmrg solaris*) 51661bedbe3fSmrg case $cc_basename in 51671bedbe3fSmrg CC* | sunCC*) 51681bedbe3fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 51691bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51701bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51711bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51721bedbe3fSmrg ;; 51731bedbe3fSmrg gcx*) 51741bedbe3fSmrg # Green Hills C++ Compiler 51751bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 51761bedbe3fSmrg ;; 51771bedbe3fSmrg *) 51781bedbe3fSmrg ;; 51791bedbe3fSmrg esac 51801bedbe3fSmrg ;; 51811bedbe3fSmrg sunos4*) 51821bedbe3fSmrg case $cc_basename in 51831bedbe3fSmrg CC*) 51841bedbe3fSmrg # Sun C++ 4.x 51851bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51861bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51871bedbe3fSmrg ;; 51881bedbe3fSmrg lcc*) 51891bedbe3fSmrg # Lucid 51901bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51911bedbe3fSmrg ;; 51921bedbe3fSmrg *) 51931bedbe3fSmrg ;; 51941bedbe3fSmrg esac 51951bedbe3fSmrg ;; 51961bedbe3fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 51971bedbe3fSmrg case $cc_basename in 51981bedbe3fSmrg CC*) 51991bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52001bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52011bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52021bedbe3fSmrg ;; 52031bedbe3fSmrg esac 52041bedbe3fSmrg ;; 52051bedbe3fSmrg tandem*) 52061bedbe3fSmrg case $cc_basename in 52071bedbe3fSmrg NCC*) 52081bedbe3fSmrg # NonStop-UX NCC 3.20 52091bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52101bedbe3fSmrg ;; 52111bedbe3fSmrg *) 52121bedbe3fSmrg ;; 52131bedbe3fSmrg esac 52141bedbe3fSmrg ;; 52151bedbe3fSmrg vxworks*) 52161bedbe3fSmrg ;; 52171bedbe3fSmrg *) 52181bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52191bedbe3fSmrg ;; 52201bedbe3fSmrg esac 52211bedbe3fSmrg fi 52221bedbe3fSmrg], 52231bedbe3fSmrg[ 52241bedbe3fSmrg if test "$GCC" = yes; then 52251bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52261bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52271bedbe3fSmrg 52281bedbe3fSmrg case $host_os in 52291bedbe3fSmrg aix*) 52301bedbe3fSmrg # All AIX code is PIC. 52311bedbe3fSmrg if test "$host_cpu" = ia64; then 52321bedbe3fSmrg # AIX 5 now supports IA64 processor 52331bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52341bedbe3fSmrg fi 52351bedbe3fSmrg ;; 52361bedbe3fSmrg 52371bedbe3fSmrg amigaos*) 52381bedbe3fSmrg case $host_cpu in 52391bedbe3fSmrg powerpc) 52401bedbe3fSmrg # see comment about AmigaOS4 .so support 52411bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52421bedbe3fSmrg ;; 52431bedbe3fSmrg m68k) 52441bedbe3fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 52451bedbe3fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 52461bedbe3fSmrg # like `-m68040'. 52471bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 52481bedbe3fSmrg ;; 52491bedbe3fSmrg esac 52501bedbe3fSmrg ;; 52511bedbe3fSmrg 52521bedbe3fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 52531bedbe3fSmrg # PIC is the default for these OSes. 52541bedbe3fSmrg ;; 52551bedbe3fSmrg 52561bedbe3fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 52571bedbe3fSmrg # This hack is so that the source file can tell whether it is being 52581bedbe3fSmrg # built for inclusion in a dll (and should export symbols for example). 52591bedbe3fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 52601bedbe3fSmrg # (--disable-auto-import) libraries 52611bedbe3fSmrg m4_if([$1], [GCJ], [], 52621bedbe3fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 52631bedbe3fSmrg ;; 52641bedbe3fSmrg 52651bedbe3fSmrg darwin* | rhapsody*) 52661bedbe3fSmrg # PIC is the default on this platform 52671bedbe3fSmrg # Common symbols not allowed in MH_DYLIB files 52681bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 52691bedbe3fSmrg ;; 52701bedbe3fSmrg 52711bedbe3fSmrg haiku*) 52721bedbe3fSmrg # PIC is the default for Haiku. 52731bedbe3fSmrg # The "-static" flag exists, but is broken. 52741bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 52751bedbe3fSmrg ;; 52761bedbe3fSmrg 52771bedbe3fSmrg hpux*) 52781bedbe3fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 52791bedbe3fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 52801bedbe3fSmrg # sets the default TLS model and affects inlining. 52811bedbe3fSmrg case $host_cpu in 52821bedbe3fSmrg hppa*64*) 52831bedbe3fSmrg # +Z the default 52841bedbe3fSmrg ;; 52851bedbe3fSmrg *) 52861bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52871bedbe3fSmrg ;; 52881bedbe3fSmrg esac 52891bedbe3fSmrg ;; 52901bedbe3fSmrg 52911bedbe3fSmrg interix[[3-9]]*) 52921bedbe3fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 52931bedbe3fSmrg # Instead, we relocate shared libraries at runtime. 52941bedbe3fSmrg ;; 52951bedbe3fSmrg 52961bedbe3fSmrg msdosdjgpp*) 52971bedbe3fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 52981bedbe3fSmrg # on systems that don't support them. 52991bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53001bedbe3fSmrg enable_shared=no 53011bedbe3fSmrg ;; 53021bedbe3fSmrg 53031bedbe3fSmrg *nto* | *qnx*) 53041bedbe3fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 53051bedbe3fSmrg # it will coredump. 53061bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 53071bedbe3fSmrg ;; 53081bedbe3fSmrg 53091bedbe3fSmrg sysv4*MP*) 53101bedbe3fSmrg if test -d /usr/nec; then 53111bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53121bedbe3fSmrg fi 53131bedbe3fSmrg ;; 53141bedbe3fSmrg 53151bedbe3fSmrg *) 53161bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53171bedbe3fSmrg ;; 53181bedbe3fSmrg esac 53191bedbe3fSmrg 53201bedbe3fSmrg case $cc_basename in 53211bedbe3fSmrg nvcc*) # Cuda Compiler Driver 2.2 53221bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 53231bedbe3fSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 53241bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 53251bedbe3fSmrg fi 53261bedbe3fSmrg ;; 53271bedbe3fSmrg esac 53281bedbe3fSmrg else 53291bedbe3fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 53301bedbe3fSmrg case $host_os in 53311bedbe3fSmrg aix*) 53321bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53331bedbe3fSmrg if test "$host_cpu" = ia64; then 53341bedbe3fSmrg # AIX 5 now supports IA64 processor 53351bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53361bedbe3fSmrg else 53371bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53381bedbe3fSmrg fi 53391bedbe3fSmrg ;; 53401bedbe3fSmrg 53411bedbe3fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53421bedbe3fSmrg # This hack is so that the source file can tell whether it is being 53431bedbe3fSmrg # built for inclusion in a dll (and should export symbols for example). 53441bedbe3fSmrg m4_if([$1], [GCJ], [], 53451bedbe3fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53461bedbe3fSmrg ;; 53471bedbe3fSmrg 53481bedbe3fSmrg hpux9* | hpux10* | hpux11*) 53491bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53501bedbe3fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53511bedbe3fSmrg # not for PA HP-UX. 53521bedbe3fSmrg case $host_cpu in 53531bedbe3fSmrg hppa*64*|ia64*) 53541bedbe3fSmrg # +Z the default 53551bedbe3fSmrg ;; 53561bedbe3fSmrg *) 53571bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 53581bedbe3fSmrg ;; 53591bedbe3fSmrg esac 53601bedbe3fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 53611bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 53621bedbe3fSmrg ;; 53631bedbe3fSmrg 53641bedbe3fSmrg irix5* | irix6* | nonstopux*) 53651bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53661bedbe3fSmrg # PIC (with -KPIC) is the default. 53671bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 53681bedbe3fSmrg ;; 53691bedbe3fSmrg 53701bedbe3fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 53711bedbe3fSmrg case $cc_basename in 53721bedbe3fSmrg # old Intel for x86_64 which still supported -KPIC. 53731bedbe3fSmrg ecc*) 53741bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53751bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53761bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53771bedbe3fSmrg ;; 53781bedbe3fSmrg # icc used to be incompatible with GCC. 53791bedbe3fSmrg # ICC 10 doesn't accept -KPIC any more. 53801bedbe3fSmrg icc* | ifort*) 53811bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53821bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53831bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53841bedbe3fSmrg ;; 53851bedbe3fSmrg # Lahey Fortran 8.1. 53861bedbe3fSmrg lf95*) 53871bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53881bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 53891bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 53901bedbe3fSmrg ;; 53911bedbe3fSmrg nagfor*) 53921bedbe3fSmrg # NAG Fortran compiler 53931bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 53941bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 53951bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53961bedbe3fSmrg ;; 53971bedbe3fSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 53981bedbe3fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 53991bedbe3fSmrg # which looks to be a dead project) 54001bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54011bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54021bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54031bedbe3fSmrg ;; 54041bedbe3fSmrg ccc*) 54051bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54061bedbe3fSmrg # All Alpha code is PIC. 54071bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54081bedbe3fSmrg ;; 54091bedbe3fSmrg xl* | bgxl* | bgf* | mpixl*) 54101bedbe3fSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 54111bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54121bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 54131bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 54141bedbe3fSmrg ;; 54151bedbe3fSmrg *) 54161bedbe3fSmrg case `$CC -V 2>&1 | sed 5q` in 54171bedbe3fSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 54181bedbe3fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54191bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54201bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54211bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 54221bedbe3fSmrg ;; 54231bedbe3fSmrg *Sun\ F* | *Sun*Fortran*) 54241bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54251bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54261bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54271bedbe3fSmrg ;; 54281bedbe3fSmrg *Sun\ C*) 54291bedbe3fSmrg # Sun C 5.9 54301bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54311bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54321bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54331bedbe3fSmrg ;; 54341bedbe3fSmrg *Intel*\ [[CF]]*Compiler*) 54351bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54361bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54371bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54381bedbe3fSmrg ;; 54391bedbe3fSmrg *Portland\ Group*) 54401bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54411bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54421bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54431bedbe3fSmrg ;; 54441bedbe3fSmrg esac 54451bedbe3fSmrg ;; 54461bedbe3fSmrg esac 54471bedbe3fSmrg ;; 54481bedbe3fSmrg 54491bedbe3fSmrg newsos6) 54501bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54511bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54521bedbe3fSmrg ;; 54531bedbe3fSmrg 54541bedbe3fSmrg *nto* | *qnx*) 54551bedbe3fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54561bedbe3fSmrg # it will coredump. 54571bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54581bedbe3fSmrg ;; 54591bedbe3fSmrg 54601bedbe3fSmrg osf3* | osf4* | osf5*) 54611bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54621bedbe3fSmrg # All OSF/1 code is PIC. 54631bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54641bedbe3fSmrg ;; 54651bedbe3fSmrg 54661bedbe3fSmrg rdos*) 54671bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54681bedbe3fSmrg ;; 54691bedbe3fSmrg 54701bedbe3fSmrg solaris*) 54711bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54721bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54731bedbe3fSmrg case $cc_basename in 54741bedbe3fSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 54751bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54761bedbe3fSmrg *) 54771bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54781bedbe3fSmrg esac 54791bedbe3fSmrg ;; 54801bedbe3fSmrg 54811bedbe3fSmrg sunos4*) 54821bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54831bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54841bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54851bedbe3fSmrg ;; 54861bedbe3fSmrg 54871bedbe3fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 54881bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54891bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54901bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54911bedbe3fSmrg ;; 54921bedbe3fSmrg 54931bedbe3fSmrg sysv4*MP*) 54941bedbe3fSmrg if test -d /usr/nec ;then 54951bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 54961bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54971bedbe3fSmrg fi 54981bedbe3fSmrg ;; 54991bedbe3fSmrg 55001bedbe3fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55011bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55021bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55031bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55041bedbe3fSmrg ;; 55051bedbe3fSmrg 55061bedbe3fSmrg unicos*) 55071bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55081bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55091bedbe3fSmrg ;; 55101bedbe3fSmrg 55111bedbe3fSmrg uts4*) 55121bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55131bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55141bedbe3fSmrg ;; 55151bedbe3fSmrg 55161bedbe3fSmrg *) 55171bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55181bedbe3fSmrg ;; 55191bedbe3fSmrg esac 55201bedbe3fSmrg fi 55211bedbe3fSmrg]) 55221bedbe3fSmrgcase $host_os in 55231bedbe3fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 55241bedbe3fSmrg *djgpp*) 55251bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 55261bedbe3fSmrg ;; 55271bedbe3fSmrg *) 55281bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 55291bedbe3fSmrg ;; 55301bedbe3fSmrgesac 55311bedbe3fSmrg 55321bedbe3fSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 55331bedbe3fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 55341bedbe3fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 55351bedbe3fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 55361bedbe3fSmrg 55371bedbe3fSmrg# 55381bedbe3fSmrg# Check to make sure the PIC flag actually works. 55391bedbe3fSmrg# 55401bedbe3fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 55411bedbe3fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 55421bedbe3fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 55431bedbe3fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 55441bedbe3fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 55451bedbe3fSmrg "" | " "*) ;; 55461bedbe3fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55471bedbe3fSmrg esac], 55481bedbe3fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 55491bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55501bedbe3fSmrgfi 55511bedbe3fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 55521bedbe3fSmrg [Additional compiler flags for building library objects]) 55531bedbe3fSmrg 55541bedbe3fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 55551bedbe3fSmrg [How to pass a linker flag through the compiler]) 55561bedbe3fSmrg# 55571bedbe3fSmrg# Check to make sure the static flag actually works. 55581bedbe3fSmrg# 55591bedbe3fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 55601bedbe3fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55611bedbe3fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55621bedbe3fSmrg $lt_tmp_static_flag, 55631bedbe3fSmrg [], 55641bedbe3fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 55651bedbe3fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 55661bedbe3fSmrg [Compiler flag to prevent dynamic linking]) 55671bedbe3fSmrg])# _LT_COMPILER_PIC 55681bedbe3fSmrg 55691bedbe3fSmrg 55701bedbe3fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 55711bedbe3fSmrg# ---------------------------- 55721bedbe3fSmrg# See if the linker supports building shared libraries. 55731bedbe3fSmrgm4_defun([_LT_LINKER_SHLIBS], 55741bedbe3fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 55751bedbe3fSmrgAC_REQUIRE([LT_PATH_NM])dnl 55761bedbe3fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 55771bedbe3fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 55781bedbe3fSmrgm4_require([_LT_DECL_EGREP])dnl 55791bedbe3fSmrgm4_require([_LT_DECL_SED])dnl 55801bedbe3fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 55811bedbe3fSmrgm4_require([_LT_TAG_COMPILER])dnl 55821bedbe3fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55831bedbe3fSmrgm4_if([$1], [CXX], [ 55841bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55851bedbe3fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55861bedbe3fSmrg case $host_os in 55871bedbe3fSmrg aix[[4-9]]*) 55881bedbe3fSmrg # If we're using GNU nm, then we don't want the "-C" option. 55891bedbe3fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55901bedbe3fSmrg # Also, AIX nm treats weak defined symbols like other global defined 55911bedbe3fSmrg # symbols, whereas GNU nm marks them as "W". 55921bedbe3fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 55931bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 55941bedbe3fSmrg else 55951bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 55961bedbe3fSmrg fi 55971bedbe3fSmrg ;; 55981bedbe3fSmrg pw32*) 55991bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 56001bedbe3fSmrg ;; 56011bedbe3fSmrg cygwin* | mingw* | cegcc*) 56021bedbe3fSmrg case $cc_basename in 56031bedbe3fSmrg cl*) 56041bedbe3fSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56051bedbe3fSmrg ;; 56061bedbe3fSmrg *) 56071bedbe3fSmrg _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' 56081bedbe3fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 56091bedbe3fSmrg ;; 56101bedbe3fSmrg esac 56111bedbe3fSmrg ;; 56121bedbe3fSmrg *) 56131bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56141bedbe3fSmrg ;; 56151bedbe3fSmrg esac 56161bedbe3fSmrg], [ 56171bedbe3fSmrg runpath_var= 56181bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 56191bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 56201bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)= 56211bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 56221bedbe3fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 56231bedbe3fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56241bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 56251bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56261bedbe3fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 56271bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 56281bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 56291bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 56301bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 56311bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 56321bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56331bedbe3fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 56341bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 56351bedbe3fSmrg _LT_TAGVAR(module_cmds, $1)= 56361bedbe3fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 56371bedbe3fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 56381bedbe3fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56391bedbe3fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 56401bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 56411bedbe3fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 56421bedbe3fSmrg # included in the symbol list 56431bedbe3fSmrg _LT_TAGVAR(include_expsyms, $1)= 56441bedbe3fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 56451bedbe3fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56461bedbe3fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56471bedbe3fSmrg # as well as any symbol that contains `d'. 56481bedbe3fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56491bedbe3fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56501bedbe3fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 56511bedbe3fSmrg # the symbol is explicitly referenced. Since portable code cannot 56521bedbe3fSmrg # rely on this symbol name, it's probably fine to never include it in 56531bedbe3fSmrg # preloaded symbol tables. 56541bedbe3fSmrg # Exclude shared library initialization/finalization symbols. 56551bedbe3fSmrgdnl Note also adjust exclude_expsyms for C++ above. 56561bedbe3fSmrg extract_expsyms_cmds= 56571bedbe3fSmrg 56581bedbe3fSmrg case $host_os in 56591bedbe3fSmrg cygwin* | mingw* | pw32* | cegcc*) 56601bedbe3fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56611bedbe3fSmrg # When not using gcc, we currently assume that we are using 56621bedbe3fSmrg # Microsoft Visual C++. 56631bedbe3fSmrg if test "$GCC" != yes; then 56641bedbe3fSmrg with_gnu_ld=no 56651bedbe3fSmrg fi 56661bedbe3fSmrg ;; 56671bedbe3fSmrg interix*) 56681bedbe3fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56691bedbe3fSmrg with_gnu_ld=yes 56701bedbe3fSmrg ;; 56711bedbe3fSmrg openbsd*) 56721bedbe3fSmrg with_gnu_ld=no 56731bedbe3fSmrg ;; 56741bedbe3fSmrg esac 56751bedbe3fSmrg 56761bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 56771bedbe3fSmrg 56781bedbe3fSmrg # On some targets, GNU ld is compatible enough with the native linker 56791bedbe3fSmrg # that we're better off using the native interface for both. 56801bedbe3fSmrg lt_use_gnu_ld_interface=no 56811bedbe3fSmrg if test "$with_gnu_ld" = yes; then 56821bedbe3fSmrg case $host_os in 56831bedbe3fSmrg aix*) 56841bedbe3fSmrg # The AIX port of GNU ld has always aspired to compatibility 56851bedbe3fSmrg # with the native linker. However, as the warning in the GNU ld 56861bedbe3fSmrg # block says, versions before 2.19.5* couldn't really create working 56871bedbe3fSmrg # shared libraries, regardless of the interface used. 56881bedbe3fSmrg case `$LD -v 2>&1` in 56891bedbe3fSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 56901bedbe3fSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 56911bedbe3fSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 56921bedbe3fSmrg *) 56931bedbe3fSmrg lt_use_gnu_ld_interface=yes 56941bedbe3fSmrg ;; 56951bedbe3fSmrg esac 56961bedbe3fSmrg ;; 56971bedbe3fSmrg *) 56981bedbe3fSmrg lt_use_gnu_ld_interface=yes 5699549e21daSmrg ;; 57001bedbe3fSmrg esac 57011bedbe3fSmrg fi 57021bedbe3fSmrg 57031bedbe3fSmrg if test "$lt_use_gnu_ld_interface" = yes; then 57041bedbe3fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 57051bedbe3fSmrg wlarc='${wl}' 57061bedbe3fSmrg 57071bedbe3fSmrg # Set some defaults for GNU ld with shared library support. These 57081bedbe3fSmrg # are reset later if shared libraries are not supported. Putting them 57091bedbe3fSmrg # here allows them to be overridden if necessary. 57101bedbe3fSmrg runpath_var=LD_RUN_PATH 57111bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 57121bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 57131bedbe3fSmrg # ancient GNU ld didn't support --whole-archive et. al. 57141bedbe3fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 57151bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 57161bedbe3fSmrg else 57171bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57181bedbe3fSmrg fi 57191bedbe3fSmrg supports_anon_versioning=no 57201bedbe3fSmrg case `$LD -v 2>&1` in 57211bedbe3fSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 57221bedbe3fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 57231bedbe3fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 57241bedbe3fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 57251bedbe3fSmrg *\ 2.11.*) ;; # other 2.11 versions 57261bedbe3fSmrg *) supports_anon_versioning=yes ;; 57271bedbe3fSmrg esac 57281bedbe3fSmrg 57291bedbe3fSmrg # See if GNU ld supports shared libraries. 57301bedbe3fSmrg case $host_os in 57311bedbe3fSmrg aix[[3-9]]*) 57321bedbe3fSmrg # On AIX/PPC, the GNU linker is very broken 57331bedbe3fSmrg if test "$host_cpu" != ia64; then 57341bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57351bedbe3fSmrg cat <<_LT_EOF 1>&2 57361bedbe3fSmrg 57371bedbe3fSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 57381bedbe3fSmrg*** to be unable to reliably create shared libraries on AIX. 57391bedbe3fSmrg*** Therefore, libtool is disabling shared libraries support. If you 57401bedbe3fSmrg*** really care for shared libraries, you may want to install binutils 57411bedbe3fSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 57421bedbe3fSmrg*** You will then need to restart the configuration process. 57431bedbe3fSmrg 57441bedbe3fSmrg_LT_EOF 57451bedbe3fSmrg fi 57461bedbe3fSmrg ;; 57471bedbe3fSmrg 57481bedbe3fSmrg amigaos*) 57491bedbe3fSmrg case $host_cpu in 57501bedbe3fSmrg powerpc) 57511bedbe3fSmrg # see comment about AmigaOS4 .so support 57521bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57531bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5754ba6a1819Smrg ;; 57551bedbe3fSmrg m68k) 57561bedbe3fSmrg _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)' 57571bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57581bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57591bedbe3fSmrg ;; 57601bedbe3fSmrg esac 57611bedbe3fSmrg ;; 57621bedbe3fSmrg 57631bedbe3fSmrg beos*) 57641bedbe3fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 57651bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57661bedbe3fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57671bedbe3fSmrg # support --undefined. This deserves some investigation. FIXME 57681bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57691bedbe3fSmrg else 57701bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57711bedbe3fSmrg fi 57721bedbe3fSmrg ;; 57731bedbe3fSmrg 57741bedbe3fSmrg cygwin* | mingw* | pw32* | cegcc*) 57751bedbe3fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57761bedbe3fSmrg # as there is no search path for DLLs. 57771bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57781bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 57791bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57801bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 57811bedbe3fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57821bedbe3fSmrg _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' 57831bedbe3fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 57841bedbe3fSmrg 57851bedbe3fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 57861bedbe3fSmrg _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' 57871bedbe3fSmrg # If the export-symbols file already is a .def file (1st line 57881bedbe3fSmrg # is EXPORTS), use it as is; otherwise, prepend... 57891bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57901bedbe3fSmrg cp $export_symbols $output_objdir/$soname.def; 57911bedbe3fSmrg else 57921bedbe3fSmrg echo EXPORTS > $output_objdir/$soname.def; 57931bedbe3fSmrg cat $export_symbols >> $output_objdir/$soname.def; 57941bedbe3fSmrg fi~ 57951bedbe3fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57961bedbe3fSmrg else 57971bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57981bedbe3fSmrg fi 57991bedbe3fSmrg ;; 58001bedbe3fSmrg 58011bedbe3fSmrg haiku*) 58021bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58031bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58041bedbe3fSmrg ;; 58051bedbe3fSmrg 58061bedbe3fSmrg interix[[3-9]]*) 58071bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 58081bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58091bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58101bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58111bedbe3fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58121bedbe3fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58131bedbe3fSmrg # default) and relocated if they conflict, which is a slow very memory 58141bedbe3fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 58151bedbe3fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58161bedbe3fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58171bedbe3fSmrg _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' 58181bedbe3fSmrg _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' 58191bedbe3fSmrg ;; 58201bedbe3fSmrg 58211bedbe3fSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 58221bedbe3fSmrg tmp_diet=no 58231bedbe3fSmrg if test "$host_os" = linux-dietlibc; then 5824549e21daSmrg case $cc_basename in 58251bedbe3fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5826549e21daSmrg esac 58271bedbe3fSmrg fi 58281bedbe3fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 58291bedbe3fSmrg && test "$tmp_diet" = no 58301bedbe3fSmrg then 58311bedbe3fSmrg tmp_addflag=' $pic_flag' 58321bedbe3fSmrg tmp_sharedflag='-shared' 58331bedbe3fSmrg case $cc_basename,$host_cpu in 58341bedbe3fSmrg pgcc*) # Portland Group C compiler 58351bedbe3fSmrg _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' 58361bedbe3fSmrg tmp_addflag=' $pic_flag' 58371bedbe3fSmrg ;; 58381bedbe3fSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 58391bedbe3fSmrg # Portland Group f77 and f90 compilers 58401bedbe3fSmrg _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' 58411bedbe3fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 58421bedbe3fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 58431bedbe3fSmrg tmp_addflag=' -i_dynamic' ;; 58441bedbe3fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 58451bedbe3fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 58461bedbe3fSmrg ifc* | ifort*) # Intel Fortran compiler 58471bedbe3fSmrg tmp_addflag=' -nofor_main' ;; 58481bedbe3fSmrg lf95*) # Lahey Fortran 8.1 58491bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58501bedbe3fSmrg tmp_sharedflag='--shared' ;; 58511bedbe3fSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 58521bedbe3fSmrg tmp_sharedflag='-qmkshrobj' 58531bedbe3fSmrg tmp_addflag= ;; 58541bedbe3fSmrg nvcc*) # Cuda Compiler Driver 2.2 58551bedbe3fSmrg _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' 58561bedbe3fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58571bedbe3fSmrg ;; 5858549e21daSmrg esac 58591bedbe3fSmrg case `$CC -V 2>&1 | sed 5q` in 58601bedbe3fSmrg *Sun\ C*) # Sun C 5.9 58611bedbe3fSmrg _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' 58621bedbe3fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58631bedbe3fSmrg tmp_sharedflag='-G' ;; 58641bedbe3fSmrg *Sun\ F*) # Sun Fortran 8.3 58651bedbe3fSmrg tmp_sharedflag='-G' ;; 5866549e21daSmrg esac 58671bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58681bedbe3fSmrg 58691bedbe3fSmrg if test "x$supports_anon_versioning" = xyes; then 58701bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 58711bedbe3fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58721bedbe3fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58731bedbe3fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 58741bedbe3fSmrg fi 58751bedbe3fSmrg 5876549e21daSmrg case $cc_basename in 58771bedbe3fSmrg xlf* | bgf* | bgxlf* | mpixlf*) 58781bedbe3fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 58791bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 58801bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58811bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 58821bedbe3fSmrg if test "x$supports_anon_versioning" = xyes; then 58831bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 58841bedbe3fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58851bedbe3fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58861bedbe3fSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 58871bedbe3fSmrg fi 58881bedbe3fSmrg ;; 5889549e21daSmrg esac 58901bedbe3fSmrg else 58911bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58921bedbe3fSmrg fi 58931bedbe3fSmrg ;; 58941bedbe3fSmrg 58951bedbe3fSmrg netbsd*) 58961bedbe3fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58971bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58981bedbe3fSmrg wlarc= 58991bedbe3fSmrg else 59001bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59011bedbe3fSmrg _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' 59021bedbe3fSmrg fi 59031bedbe3fSmrg ;; 59041bedbe3fSmrg 59051bedbe3fSmrg solaris*) 59061bedbe3fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 59071bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59081bedbe3fSmrg cat <<_LT_EOF 1>&2 59091bedbe3fSmrg 59101bedbe3fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 59111bedbe3fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 59121bedbe3fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 59131bedbe3fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 59141bedbe3fSmrg*** your PATH or compiler configuration so that the native linker is 59151bedbe3fSmrg*** used, and then restart. 59161bedbe3fSmrg 59171bedbe3fSmrg_LT_EOF 59181bedbe3fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59191bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59201bedbe3fSmrg _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' 59211bedbe3fSmrg else 59221bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59231bedbe3fSmrg fi 59241bedbe3fSmrg ;; 59251bedbe3fSmrg 59261bedbe3fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 59271bedbe3fSmrg case `$LD -v 2>&1` in 59281bedbe3fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 59291bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59301bedbe3fSmrg cat <<_LT_EOF 1>&2 59311bedbe3fSmrg 59321bedbe3fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 59331bedbe3fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 59341bedbe3fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 59351bedbe3fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 59361bedbe3fSmrg*** your PATH or compiler configuration so that the native linker is 59371bedbe3fSmrg*** used, and then restart. 59381bedbe3fSmrg 59391bedbe3fSmrg_LT_EOF 5940ba6a1819Smrg ;; 59411bedbe3fSmrg *) 59421bedbe3fSmrg # For security reasons, it is highly recommended that you always 59431bedbe3fSmrg # use absolute paths for naming shared libraries, and exclude the 59441bedbe3fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 59451bedbe3fSmrg # requires that you compile everything twice, which is a pain. 59461bedbe3fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59471bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59481bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59491bedbe3fSmrg _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' 59501bedbe3fSmrg else 59511bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59521bedbe3fSmrg fi 5953ba6a1819Smrg ;; 59541bedbe3fSmrg esac 59551bedbe3fSmrg ;; 59561bedbe3fSmrg 59571bedbe3fSmrg sunos4*) 59581bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 59591bedbe3fSmrg wlarc= 59601bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59611bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59621bedbe3fSmrg ;; 59631bedbe3fSmrg 59641bedbe3fSmrg *) 59651bedbe3fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59661bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59671bedbe3fSmrg _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' 59681bedbe3fSmrg else 59691bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59701bedbe3fSmrg fi 59711bedbe3fSmrg ;; 5972ba6a1819Smrg esac 5973549e21daSmrg 59741bedbe3fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 59751bedbe3fSmrg runpath_var= 59761bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 59771bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 59781bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59791bedbe3fSmrg fi 59801bedbe3fSmrg else 59811bedbe3fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5982549e21daSmrg case $host_os in 59831bedbe3fSmrg aix3*) 59841bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 59851bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 59861bedbe3fSmrg _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' 59871bedbe3fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 59881bedbe3fSmrg # are no directories specified by -L. 59891bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59901bedbe3fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 59911bedbe3fSmrg # Neither direct hardcoding nor static linking is supported with a 59921bedbe3fSmrg # broken collect2. 59931bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 59941bedbe3fSmrg fi 59951bedbe3fSmrg ;; 59961bedbe3fSmrg 59971bedbe3fSmrg aix[[4-9]]*) 5998549e21daSmrg if test "$host_cpu" = ia64; then 59991bedbe3fSmrg # On IA64, the linker does run time linking by default, so we don't 60001bedbe3fSmrg # have to do anything special. 60011bedbe3fSmrg aix_use_runtimelinking=no 60021bedbe3fSmrg exp_sym_flag='-Bexport' 60031bedbe3fSmrg no_entry_flag="" 60041bedbe3fSmrg else 60051bedbe3fSmrg # If we're using GNU nm, then we don't want the "-C" option. 60061bedbe3fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 60071bedbe3fSmrg # Also, AIX nm treats weak defined symbols like other global 60081bedbe3fSmrg # defined symbols, whereas GNU nm marks them as "W". 60091bedbe3fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 60101bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 60111bedbe3fSmrg else 60121bedbe3fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 60131bedbe3fSmrg fi 60141bedbe3fSmrg aix_use_runtimelinking=no 60151bedbe3fSmrg 60161bedbe3fSmrg # Test if we are trying to use run time linking or normal 60171bedbe3fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60181bedbe3fSmrg # need to do runtime linking. 60191bedbe3fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60201bedbe3fSmrg for ld_flag in $LDFLAGS; do 60211bedbe3fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 60221bedbe3fSmrg aix_use_runtimelinking=yes 60231bedbe3fSmrg break 60241bedbe3fSmrg fi 60251bedbe3fSmrg done 60261bedbe3fSmrg ;; 60271bedbe3fSmrg esac 60281bedbe3fSmrg 60291bedbe3fSmrg exp_sym_flag='-bexport' 60301bedbe3fSmrg no_entry_flag='-bnoentry' 60311bedbe3fSmrg fi 60321bedbe3fSmrg 60331bedbe3fSmrg # When large executables or shared objects are built, AIX ld can 60341bedbe3fSmrg # have problems creating the table of contents. If linking a library 60351bedbe3fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60361bedbe3fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60371bedbe3fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60381bedbe3fSmrg 60391bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='' 60401bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60411bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60421bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60431bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60441bedbe3fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60451bedbe3fSmrg 60461bedbe3fSmrg if test "$GCC" = yes; then 60471bedbe3fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60481bedbe3fSmrg # We only want to do this on AIX 4.2 and lower, the check 60491bedbe3fSmrg # below for broken collect2 doesn't work under 4.3+ 60501bedbe3fSmrg collect2name=`${CC} -print-prog-name=collect2` 60511bedbe3fSmrg if test -f "$collect2name" && 60521bedbe3fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60531bedbe3fSmrg then 60541bedbe3fSmrg # We have reworked collect2 60551bedbe3fSmrg : 60561bedbe3fSmrg else 60571bedbe3fSmrg # We have old collect2 60581bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60591bedbe3fSmrg # It fails to find uninstalled libraries when the uninstalled 60601bedbe3fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60611bedbe3fSmrg # to unsupported forces relinking 60621bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60631bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60641bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60651bedbe3fSmrg fi 60661bedbe3fSmrg ;; 60671bedbe3fSmrg esac 60681bedbe3fSmrg shared_flag='-shared' 60691bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 60701bedbe3fSmrg shared_flag="$shared_flag "'${wl}-G' 60711bedbe3fSmrg fi 60721bedbe3fSmrg else 60731bedbe3fSmrg # not using gcc 60741bedbe3fSmrg if test "$host_cpu" = ia64; then 60751bedbe3fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60761bedbe3fSmrg # chokes on -Wl,-G. The following line is correct: 60771bedbe3fSmrg shared_flag='-G' 60781bedbe3fSmrg else 60791bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 60801bedbe3fSmrg shared_flag='${wl}-G' 60811bedbe3fSmrg else 60821bedbe3fSmrg shared_flag='${wl}-bM:SRE' 60831bedbe3fSmrg fi 60841bedbe3fSmrg fi 60851bedbe3fSmrg fi 60861bedbe3fSmrg 60871bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60881bedbe3fSmrg # It seems that -bexpall does not export symbols beginning with 60891bedbe3fSmrg # underscore (_), so it is better to generate a list of symbols to export. 60901bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60911bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 60921bedbe3fSmrg # Warning - without using the other runtime loading flags (-brtl), 60931bedbe3fSmrg # -berok will link without error, but may produce a broken library. 60941bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60951bedbe3fSmrg # Determine the default libpath from the value encoded in an 60961bedbe3fSmrg # empty executable. 60971bedbe3fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60981bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60991bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 61001bedbe3fSmrg else 61011bedbe3fSmrg if test "$host_cpu" = ia64; then 61021bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 61031bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61041bedbe3fSmrg _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" 61051bedbe3fSmrg else 61061bedbe3fSmrg # Determine the default libpath from the value encoded in an 61071bedbe3fSmrg # empty executable. 61081bedbe3fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 61091bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61101bedbe3fSmrg # Warning - without using the other run time loading flags, 61111bedbe3fSmrg # -berok will link without error, but may produce a broken library. 61121bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61131bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61141bedbe3fSmrg if test "$with_gnu_ld" = yes; then 61151bedbe3fSmrg # We only use this code for GNU lds that support --whole-archive. 61161bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61171bedbe3fSmrg else 61181bedbe3fSmrg # Exported symbols can be pulled into shared objects from archives 61191bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61201bedbe3fSmrg fi 61211bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61221bedbe3fSmrg # This is similar to how AIX traditionally builds its shared libraries. 61231bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 61241bedbe3fSmrg fi 6125549e21daSmrg fi 6126549e21daSmrg ;; 6127ba6a1819Smrg 6128549e21daSmrg amigaos*) 6129549e21daSmrg case $host_cpu in 6130549e21daSmrg powerpc) 6131549e21daSmrg # see comment about AmigaOS4 .so support 61321bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61331bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6134549e21daSmrg ;; 6135549e21daSmrg m68k) 61361bedbe3fSmrg _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)' 61371bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61381bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6139549e21daSmrg ;; 6140549e21daSmrg esac 6141549e21daSmrg ;; 6142ba6a1819Smrg 61431bedbe3fSmrg bsdi[[45]]*) 61441bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6145549e21daSmrg ;; 6146ba6a1819Smrg 61471bedbe3fSmrg cygwin* | mingw* | pw32* | cegcc*) 61481bedbe3fSmrg # When not using gcc, we currently assume that we are using 61491bedbe3fSmrg # Microsoft Visual C++. 61501bedbe3fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61511bedbe3fSmrg # no search path for DLLs. 61521bedbe3fSmrg case $cc_basename in 61531bedbe3fSmrg cl*) 61541bedbe3fSmrg # Native MSVC 61551bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61561bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61571bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 61581bedbe3fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 61591bedbe3fSmrg # Tell ltmain to make .lib files, not .a files. 61601bedbe3fSmrg libext=lib 61611bedbe3fSmrg # Tell ltmain to make .dll files, not .so files. 61621bedbe3fSmrg shrext_cmds=".dll" 61631bedbe3fSmrg # FIXME: Setting linknames here is a bad hack. 61641bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61651bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61661bedbe3fSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61671bedbe3fSmrg else 61681bedbe3fSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61691bedbe3fSmrg fi~ 61701bedbe3fSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61711bedbe3fSmrg linknames=' 61721bedbe3fSmrg # The linker will not automatically build a static lib if we build a DLL. 61731bedbe3fSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61741bedbe3fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61751bedbe3fSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 61761bedbe3fSmrg _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' 61771bedbe3fSmrg # Don't use ranlib 61781bedbe3fSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61791bedbe3fSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61801bedbe3fSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61811bedbe3fSmrg case $lt_outputfile in 61821bedbe3fSmrg *.exe|*.EXE) ;; 61831bedbe3fSmrg *) 61841bedbe3fSmrg lt_outputfile="$lt_outputfile.exe" 61851bedbe3fSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61861bedbe3fSmrg ;; 61871bedbe3fSmrg esac~ 61881bedbe3fSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61891bedbe3fSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61901bedbe3fSmrg $RM "$lt_outputfile.manifest"; 61911bedbe3fSmrg fi' 6192ba6a1819Smrg ;; 6193ba6a1819Smrg *) 61941bedbe3fSmrg # Assume MSVC wrapper 61951bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61961bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61971bedbe3fSmrg # Tell ltmain to make .lib files, not .a files. 61981bedbe3fSmrg libext=lib 61991bedbe3fSmrg # Tell ltmain to make .dll files, not .so files. 62001bedbe3fSmrg shrext_cmds=".dll" 62011bedbe3fSmrg # FIXME: Setting linknames here is a bad hack. 62021bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 62031bedbe3fSmrg # The linker will automatically build a .lib file if we build a DLL. 62041bedbe3fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62051bedbe3fSmrg # FIXME: Should let the user specify the lib program. 62061bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 62071bedbe3fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6208ba6a1819Smrg ;; 6209549e21daSmrg esac 6210549e21daSmrg ;; 6211ba6a1819Smrg 62121bedbe3fSmrg darwin* | rhapsody*) 62131bedbe3fSmrg _LT_DARWIN_LINKER_FEATURES($1) 6214549e21daSmrg ;; 6215ba6a1819Smrg 62161bedbe3fSmrg dgux*) 62171bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62181bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62191bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6220549e21daSmrg ;; 6221ba6a1819Smrg 62221bedbe3fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 62231bedbe3fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 62241bedbe3fSmrg # does not break anything, and helps significantly (at the cost of a little 62251bedbe3fSmrg # extra space). 62261bedbe3fSmrg freebsd2.2*) 62271bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 62281bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62291bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62301bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6231549e21daSmrg ;; 6232ba6a1819Smrg 62331bedbe3fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 62341bedbe3fSmrg freebsd2.*) 62351bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62361bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62371bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62381bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6239549e21daSmrg ;; 6240ba6a1819Smrg 62411bedbe3fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 62421bedbe3fSmrg freebsd* | dragonfly*) 62431bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62441bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62451bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62461bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6247549e21daSmrg ;; 6248ba6a1819Smrg 62491bedbe3fSmrg hpux9*) 62501bedbe3fSmrg if test "$GCC" = yes; then 62511bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6252549e21daSmrg else 62531bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6254549e21daSmrg fi 62551bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62561bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62571bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6258ba6a1819Smrg 62591bedbe3fSmrg # hardcode_minus_L: Not really in the search PATH, 62601bedbe3fSmrg # but as the default location of the library. 62611bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62621bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6263549e21daSmrg ;; 6264549e21daSmrg 62651bedbe3fSmrg hpux10*) 62661bedbe3fSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62671bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 62681bedbe3fSmrg else 62691bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 62701bedbe3fSmrg fi 62711bedbe3fSmrg if test "$with_gnu_ld" = no; then 62721bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62731bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62741bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62751bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 62761bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62771bedbe3fSmrg # hardcode_minus_L: Not really in the search PATH, 62781bedbe3fSmrg # but as the default location of the library. 62791bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62801bedbe3fSmrg fi 6281549e21daSmrg ;; 6282549e21daSmrg 62831bedbe3fSmrg hpux11*) 62841bedbe3fSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62851bedbe3fSmrg case $host_cpu in 62861bedbe3fSmrg hppa*64*) 62871bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 62881bedbe3fSmrg ;; 62891bedbe3fSmrg ia64*) 62901bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 62911bedbe3fSmrg ;; 62921bedbe3fSmrg *) 62931bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 62941bedbe3fSmrg ;; 62951bedbe3fSmrg esac 62961bedbe3fSmrg else 62971bedbe3fSmrg case $host_cpu in 62981bedbe3fSmrg hppa*64*) 62991bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63001bedbe3fSmrg ;; 63011bedbe3fSmrg ia64*) 63021bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 63031bedbe3fSmrg ;; 63041bedbe3fSmrg *) 63051bedbe3fSmrg m4_if($1, [], [ 63061bedbe3fSmrg # Older versions of the 11.00 compiler do not understand -b yet 63071bedbe3fSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 63081bedbe3fSmrg _LT_LINKER_OPTION([if $CC understands -b], 63091bedbe3fSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 63101bedbe3fSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 63111bedbe3fSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 63121bedbe3fSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 63131bedbe3fSmrg ;; 63141bedbe3fSmrg esac 63151bedbe3fSmrg fi 63161bedbe3fSmrg if test "$with_gnu_ld" = no; then 63171bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63181bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6319549e21daSmrg 63201bedbe3fSmrg case $host_cpu in 63211bedbe3fSmrg hppa*64*|ia64*) 63221bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63231bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6324549e21daSmrg ;; 63251bedbe3fSmrg *) 63261bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63271bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63281bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63291bedbe3fSmrg 63301bedbe3fSmrg # hardcode_minus_L: Not really in the search PATH, 63311bedbe3fSmrg # but as the default location of the library. 63321bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6333549e21daSmrg ;; 6334549e21daSmrg esac 63351bedbe3fSmrg fi 63361bedbe3fSmrg ;; 63371bedbe3fSmrg 63381bedbe3fSmrg irix5* | irix6* | nonstopux*) 63391bedbe3fSmrg if test "$GCC" = yes; then 63401bedbe3fSmrg _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' 63411bedbe3fSmrg # Try to use the -exported_symbol ld option, if it does not 63421bedbe3fSmrg # work, assume that -exports_file does not work either and 63431bedbe3fSmrg # implicitly export all symbols. 63441bedbe3fSmrg # This should be the same for all languages, so no per-tag cache variable. 63451bedbe3fSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 63461bedbe3fSmrg [lt_cv_irix_exported_symbol], 63471bedbe3fSmrg [save_LDFLAGS="$LDFLAGS" 63481bedbe3fSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 63491bedbe3fSmrg AC_LINK_IFELSE( 63501bedbe3fSmrg [AC_LANG_SOURCE( 63511bedbe3fSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 63521bedbe3fSmrg [C++], [[int foo (void) { return 0; }]], 63531bedbe3fSmrg [Fortran 77], [[ 63541bedbe3fSmrg subroutine foo 63551bedbe3fSmrg end]], 63561bedbe3fSmrg [Fortran], [[ 63571bedbe3fSmrg subroutine foo 63581bedbe3fSmrg end]])])], 63591bedbe3fSmrg [lt_cv_irix_exported_symbol=yes], 63601bedbe3fSmrg [lt_cv_irix_exported_symbol=no]) 63611bedbe3fSmrg LDFLAGS="$save_LDFLAGS"]) 63621bedbe3fSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 63631bedbe3fSmrg _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' 63641bedbe3fSmrg fi 63651bedbe3fSmrg else 63661bedbe3fSmrg _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' 63671bedbe3fSmrg _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' 63681bedbe3fSmrg fi 63691bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 63701bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63711bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63721bedbe3fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 63731bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63741bedbe3fSmrg ;; 63751bedbe3fSmrg 63761bedbe3fSmrg netbsd*) 63771bedbe3fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 63781bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 63791bedbe3fSmrg else 63801bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 63811bedbe3fSmrg fi 63821bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63831bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63841bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6385549e21daSmrg ;; 6386ba6a1819Smrg 6387549e21daSmrg newsos6) 63881bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63891bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63901bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63911bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63921bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6393549e21daSmrg ;; 6394ba6a1819Smrg 6395549e21daSmrg *nto* | *qnx*) 6396549e21daSmrg ;; 6397ba6a1819Smrg 63981bedbe3fSmrg openbsd*) 63991bedbe3fSmrg if test -f /usr/libexec/ld.so; then 64001bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 64011bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64021bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64031bedbe3fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 64041bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64051bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 64061bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64071bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64081bedbe3fSmrg else 64091bedbe3fSmrg case $host_os in 64101bedbe3fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 64111bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 64121bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64131bedbe3fSmrg ;; 64141bedbe3fSmrg *) 64151bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64161bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64171bedbe3fSmrg ;; 64181bedbe3fSmrg esac 64191bedbe3fSmrg fi 64201bedbe3fSmrg else 64211bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64221bedbe3fSmrg fi 6423549e21daSmrg ;; 6424ba6a1819Smrg 64251bedbe3fSmrg os2*) 64261bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64271bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64281bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 64291bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 64301bedbe3fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 64311bedbe3fSmrg ;; 64321bedbe3fSmrg 64331bedbe3fSmrg osf3*) 64341bedbe3fSmrg if test "$GCC" = yes; then 64351bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64361bedbe3fSmrg _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' 64371bedbe3fSmrg else 64381bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64391bedbe3fSmrg _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' 64401bedbe3fSmrg fi 64411bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64421bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64431bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64441bedbe3fSmrg ;; 64451bedbe3fSmrg 64461bedbe3fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 64471bedbe3fSmrg if test "$GCC" = yes; then 64481bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64491bedbe3fSmrg _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' 64501bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64511bedbe3fSmrg else 64521bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64531bedbe3fSmrg _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' 64541bedbe3fSmrg _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~ 64551bedbe3fSmrg $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' 64561bedbe3fSmrg 64571bedbe3fSmrg # Both c and cxx compiler support -rpath directly 64581bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64591bedbe3fSmrg fi 64601bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64611bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6462549e21daSmrg ;; 6463ba6a1819Smrg 6464549e21daSmrg solaris*) 64651bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 64661bedbe3fSmrg if test "$GCC" = yes; then 64671bedbe3fSmrg wlarc='${wl}' 64681bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64691bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64701bedbe3fSmrg $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' 64711bedbe3fSmrg else 64721bedbe3fSmrg case `$CC -V 2>&1` in 64731bedbe3fSmrg *"Compilers 5.0"*) 64741bedbe3fSmrg wlarc='' 64751bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 64761bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64771bedbe3fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 64781bedbe3fSmrg ;; 64791bedbe3fSmrg *) 64801bedbe3fSmrg wlarc='${wl}' 64811bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 64821bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64831bedbe3fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 64841bedbe3fSmrg ;; 64851bedbe3fSmrg esac 64861bedbe3fSmrg fi 64871bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64881bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64891bedbe3fSmrg case $host_os in 64901bedbe3fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6491549e21daSmrg *) 64921bedbe3fSmrg # The compiler driver will combine and reorder linker options, 64931bedbe3fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 64941bedbe3fSmrg # but is careful enough not to reorder. 64951bedbe3fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 64961bedbe3fSmrg if test "$GCC" = yes; then 64971bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 64981bedbe3fSmrg else 64991bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 65001bedbe3fSmrg fi 65011bedbe3fSmrg ;; 6502549e21daSmrg esac 65031bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6504549e21daSmrg ;; 6505ba6a1819Smrg 6506549e21daSmrg sunos4*) 65071bedbe3fSmrg if test "x$host_vendor" = xsequent; then 65081bedbe3fSmrg # Use $CC to link under sequent, because it throws in some extra .o 65091bedbe3fSmrg # files that make .init and .fini sections work. 65101bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 65111bedbe3fSmrg else 65121bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 65131bedbe3fSmrg fi 65141bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65151bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65161bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65171bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6518549e21daSmrg ;; 6519ba6a1819Smrg 65201bedbe3fSmrg sysv4) 65211bedbe3fSmrg case $host_vendor in 65221bedbe3fSmrg sni) 65231bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65241bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 65251bedbe3fSmrg ;; 65261bedbe3fSmrg siemens) 65271bedbe3fSmrg ## LD is ld it makes a PLAMLIB 65281bedbe3fSmrg ## CC just makes a GrossModule. 65291bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 65301bedbe3fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 65311bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65321bedbe3fSmrg ;; 65331bedbe3fSmrg motorola) 65341bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65351bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 65361bedbe3fSmrg ;; 65371bedbe3fSmrg esac 65381bedbe3fSmrg runpath_var='LD_RUN_PATH' 65391bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65401bedbe3fSmrg ;; 65411bedbe3fSmrg 65421bedbe3fSmrg sysv4.3*) 65431bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65441bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65451bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6546549e21daSmrg ;; 6547ba6a1819Smrg 6548549e21daSmrg sysv4*MP*) 65491bedbe3fSmrg if test -d /usr/nec; then 65501bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65511bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65521bedbe3fSmrg runpath_var=LD_RUN_PATH 65531bedbe3fSmrg hardcode_runpath_var=yes 65541bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6555549e21daSmrg fi 6556549e21daSmrg ;; 6557ba6a1819Smrg 65581bedbe3fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 65591bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 65601bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 65611bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65621bedbe3fSmrg runpath_var='LD_RUN_PATH' 65631bedbe3fSmrg 65641bedbe3fSmrg if test "$GCC" = yes; then 65651bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65661bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65671bedbe3fSmrg else 65681bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65691bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65701bedbe3fSmrg fi 6571549e21daSmrg ;; 6572ba6a1819Smrg 65731bedbe3fSmrg sysv5* | sco3.2v5* | sco5v6*) 65741bedbe3fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 65751bedbe3fSmrg # link with -lc, and that would cause any symbols used from libc to 65761bedbe3fSmrg # always be unresolved, which means just about no library would 65771bedbe3fSmrg # ever link correctly. If we're not using GNU ld we use -z text 65781bedbe3fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 65791bedbe3fSmrg # as -z defs. 65801bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 65811bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 65821bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 65831bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65841bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 65851bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65861bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65871bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 65881bedbe3fSmrg runpath_var='LD_RUN_PATH' 65891bedbe3fSmrg 65901bedbe3fSmrg if test "$GCC" = yes; then 65911bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65921bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65931bedbe3fSmrg else 65941bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65951bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65961bedbe3fSmrg fi 6597549e21daSmrg ;; 6598ba6a1819Smrg 6599549e21daSmrg uts4*) 66001bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66011bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66021bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6603549e21daSmrg ;; 6604ba6a1819Smrg 6605549e21daSmrg *) 66061bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6607549e21daSmrg ;; 6608ba6a1819Smrg esac 66091bedbe3fSmrg 66101bedbe3fSmrg if test x$host_vendor = xsni; then 66111bedbe3fSmrg case $host in 66121bedbe3fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 66131bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 66141bedbe3fSmrg ;; 66151bedbe3fSmrg esac 66161bedbe3fSmrg fi 6617549e21daSmrg fi 6618549e21daSmrg]) 66191bedbe3fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 66201bedbe3fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6621ba6a1819Smrg 66221bedbe3fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 66231bedbe3fSmrg 66241bedbe3fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 66251bedbe3fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 66261bedbe3fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 66271bedbe3fSmrg [The commands to extract the exported symbol list from a shared archive]) 6628ba6a1819Smrg 6629549e21daSmrg# 66301bedbe3fSmrg# Do we need to explicitly link libc? 6631549e21daSmrg# 66321bedbe3fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 66331bedbe3fSmrgx|xyes) 66341bedbe3fSmrg # Assume -lc should be added 66351bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6636ba6a1819Smrg 66371bedbe3fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 66381bedbe3fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 66391bedbe3fSmrg *'~'*) 66401bedbe3fSmrg # FIXME: we may have to deal with multi-command sequences. 66411bedbe3fSmrg ;; 66421bedbe3fSmrg '$CC '*) 66431bedbe3fSmrg # Test whether the compiler implicitly links with -lc since on some 66441bedbe3fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 66451bedbe3fSmrg # to ld, don't add -lc before -lgcc. 66461bedbe3fSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 66471bedbe3fSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 66481bedbe3fSmrg [$RM conftest* 66491bedbe3fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6650ba6a1819Smrg 66511bedbe3fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 66521bedbe3fSmrg soname=conftest 66531bedbe3fSmrg lib=conftest 66541bedbe3fSmrg libobjs=conftest.$ac_objext 66551bedbe3fSmrg deplibs= 66561bedbe3fSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 66571bedbe3fSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 66581bedbe3fSmrg compiler_flags=-v 66591bedbe3fSmrg linker_flags=-v 66601bedbe3fSmrg verstring= 66611bedbe3fSmrg output_objdir=. 66621bedbe3fSmrg libname=conftest 66631bedbe3fSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 66641bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 66651bedbe3fSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 66661bedbe3fSmrg then 66671bedbe3fSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66681bedbe3fSmrg else 66691bedbe3fSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66701bedbe3fSmrg fi 66711bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 66721bedbe3fSmrg else 66731bedbe3fSmrg cat conftest.err 1>&5 66741bedbe3fSmrg fi 66751bedbe3fSmrg $RM conftest* 66761bedbe3fSmrg ]) 66771bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 66781bedbe3fSmrg ;; 66791bedbe3fSmrg esac 66801bedbe3fSmrg fi 6681549e21daSmrg ;; 66821bedbe3fSmrgesac 66831bedbe3fSmrg 66841bedbe3fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 66851bedbe3fSmrg [Whether or not to add -lc for building shared libraries]) 66861bedbe3fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 66871bedbe3fSmrg [enable_shared_with_static_runtimes], [0], 66881bedbe3fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 66891bedbe3fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 66901bedbe3fSmrg [Compiler flag to allow reflexive dlopens]) 66911bedbe3fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 66921bedbe3fSmrg [Compiler flag to generate shared objects directly from archives]) 66931bedbe3fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 66941bedbe3fSmrg [Whether the compiler copes with passing no objects directly]) 66951bedbe3fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 66961bedbe3fSmrg [Create an old-style archive from a shared archive]) 66971bedbe3fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 66981bedbe3fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 66991bedbe3fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 67001bedbe3fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 67011bedbe3fSmrg_LT_TAGDECL([], [module_cmds], [2], 67021bedbe3fSmrg [Commands used to build a loadable module if different from building 67031bedbe3fSmrg a shared archive.]) 67041bedbe3fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 67051bedbe3fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 67061bedbe3fSmrg [Whether we are building with GNU ld or not]) 67071bedbe3fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 67081bedbe3fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 67091bedbe3fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 67101bedbe3fSmrg [Flag that enforces no undefined symbols]) 67111bedbe3fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 67121bedbe3fSmrg [Flag to hardcode $libdir into a binary during linking. 67131bedbe3fSmrg This must work even if $libdir does not exist]) 67141bedbe3fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 67151bedbe3fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 67161bedbe3fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 67171bedbe3fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67181bedbe3fSmrg DIR into the resulting binary]) 67191bedbe3fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 67201bedbe3fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67211bedbe3fSmrg DIR into the resulting binary and the resulting library dependency is 67221bedbe3fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 67231bedbe3fSmrg library is relocated]) 67241bedbe3fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 67251bedbe3fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 67261bedbe3fSmrg into the resulting binary]) 67271bedbe3fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 67281bedbe3fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 67291bedbe3fSmrg into the resulting binary]) 67301bedbe3fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 67311bedbe3fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 67321bedbe3fSmrg into the library and all subsequent libraries and executables linked 67331bedbe3fSmrg against it]) 67341bedbe3fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 67351bedbe3fSmrg [Set to yes if linker adds runtime paths of dependent libraries 67361bedbe3fSmrg to runtime path list]) 67371bedbe3fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 67381bedbe3fSmrg [Whether libtool must link a program against all its dependency libraries]) 67391bedbe3fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 67401bedbe3fSmrg [Set to "yes" if exported symbols are required]) 67411bedbe3fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 67421bedbe3fSmrg [The commands to list exported symbols]) 67431bedbe3fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 67441bedbe3fSmrg [Symbols that should not be listed in the preloaded symbols]) 67451bedbe3fSmrg_LT_TAGDECL([], [include_expsyms], [1], 67461bedbe3fSmrg [Symbols that must always be exported]) 67471bedbe3fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 67481bedbe3fSmrg [Commands necessary for linking programs (against libraries) with templates]) 67491bedbe3fSmrg_LT_TAGDECL([], [postlink_cmds], [2], 67501bedbe3fSmrg [Commands necessary for finishing linking programs]) 67511bedbe3fSmrg_LT_TAGDECL([], [file_list_spec], [1], 67521bedbe3fSmrg [Specify filename containing input files]) 67531bedbe3fSmrgdnl FIXME: Not yet implemented 67541bedbe3fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 67551bedbe3fSmrgdnl [Compiler flag to generate thread safe objects]) 67561bedbe3fSmrg])# _LT_LINKER_SHLIBS 67571bedbe3fSmrg 67581bedbe3fSmrg 67591bedbe3fSmrg# _LT_LANG_C_CONFIG([TAG]) 67601bedbe3fSmrg# ------------------------ 67611bedbe3fSmrg# Ensure that the configuration variables for a C compiler are suitably 67621bedbe3fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 67631bedbe3fSmrg# the compiler configuration to `libtool'. 67641bedbe3fSmrgm4_defun([_LT_LANG_C_CONFIG], 67651bedbe3fSmrg[m4_require([_LT_DECL_EGREP])dnl 67661bedbe3fSmrglt_save_CC="$CC" 67671bedbe3fSmrgAC_LANG_PUSH(C) 67681bedbe3fSmrg 67691bedbe3fSmrg# Source file extension for C test sources. 67701bedbe3fSmrgac_ext=c 67711bedbe3fSmrg 67721bedbe3fSmrg# Object file extension for compiled C test sources. 67731bedbe3fSmrgobjext=o 67741bedbe3fSmrg_LT_TAGVAR(objext, $1)=$objext 67751bedbe3fSmrg 67761bedbe3fSmrg# Code to be used in simple compile tests 67771bedbe3fSmrglt_simple_compile_test_code="int some_variable = 0;" 67781bedbe3fSmrg 67791bedbe3fSmrg# Code to be used in simple link tests 67801bedbe3fSmrglt_simple_link_test_code='int main(){return(0);}' 67811bedbe3fSmrg 67821bedbe3fSmrg_LT_TAG_COMPILER 67831bedbe3fSmrg# Save the default compiler, since it gets overwritten when the other 67841bedbe3fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 67851bedbe3fSmrgcompiler_DEFAULT=$CC 67861bedbe3fSmrg 67871bedbe3fSmrg# save warnings/boilerplate of simple test code 67881bedbe3fSmrg_LT_COMPILER_BOILERPLATE 67891bedbe3fSmrg_LT_LINKER_BOILERPLATE 67901bedbe3fSmrg 67911bedbe3fSmrgif test -n "$compiler"; then 67921bedbe3fSmrg _LT_COMPILER_NO_RTTI($1) 67931bedbe3fSmrg _LT_COMPILER_PIC($1) 67941bedbe3fSmrg _LT_COMPILER_C_O($1) 67951bedbe3fSmrg _LT_COMPILER_FILE_LOCKS($1) 67961bedbe3fSmrg _LT_LINKER_SHLIBS($1) 67971bedbe3fSmrg _LT_SYS_DYNAMIC_LINKER($1) 67981bedbe3fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 67991bedbe3fSmrg LT_SYS_DLOPEN_SELF 68001bedbe3fSmrg _LT_CMD_STRIPLIB 68011bedbe3fSmrg 68021bedbe3fSmrg # Report which library types will actually be built 68031bedbe3fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68041bedbe3fSmrg AC_MSG_RESULT([$can_build_shared]) 68051bedbe3fSmrg 68061bedbe3fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 68071bedbe3fSmrg test "$can_build_shared" = "no" && enable_shared=no 6808ba6a1819Smrg 68091bedbe3fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 68101bedbe3fSmrg # are all built from PIC. 6811549e21daSmrg case $host_os in 68121bedbe3fSmrg aix3*) 68131bedbe3fSmrg test "$enable_shared" = yes && enable_static=no 68141bedbe3fSmrg if test -n "$RANLIB"; then 68151bedbe3fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68161bedbe3fSmrg postinstall_cmds='$RANLIB $lib' 6817549e21daSmrg fi 6818549e21daSmrg ;; 68191bedbe3fSmrg 68201bedbe3fSmrg aix[[4-9]]*) 68211bedbe3fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68221bedbe3fSmrg test "$enable_shared" = yes && enable_static=no 68231bedbe3fSmrg fi 6824549e21daSmrg ;; 6825549e21daSmrg esac 68261bedbe3fSmrg AC_MSG_RESULT([$enable_shared]) 6827ba6a1819Smrg 68281bedbe3fSmrg AC_MSG_CHECKING([whether to build static libraries]) 68291bedbe3fSmrg # Make sure either enable_shared or enable_static is yes. 68301bedbe3fSmrg test "$enable_shared" = yes || enable_static=yes 68311bedbe3fSmrg AC_MSG_RESULT([$enable_static]) 6832ba6a1819Smrg 68331bedbe3fSmrg _LT_CONFIG($1) 68341bedbe3fSmrgfi 68351bedbe3fSmrgAC_LANG_POP 68361bedbe3fSmrgCC="$lt_save_CC" 68371bedbe3fSmrg])# _LT_LANG_C_CONFIG 6838ba6a1819Smrg 6839ba6a1819Smrg 68401bedbe3fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 68411bedbe3fSmrg# -------------------------- 68421bedbe3fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 68431bedbe3fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 68441bedbe3fSmrg# the compiler configuration to `libtool'. 68451bedbe3fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 68461bedbe3fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 68471bedbe3fSmrgm4_require([_LT_DECL_EGREP])dnl 68481bedbe3fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 68491bedbe3fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 68501bedbe3fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 68511bedbe3fSmrg (test "X$CXX" != "Xg++"))) ; then 68521bedbe3fSmrg AC_PROG_CXXCPP 68531bedbe3fSmrgelse 68541bedbe3fSmrg _lt_caught_CXX_error=yes 68551bedbe3fSmrgfi 68561bedbe3fSmrg 68571bedbe3fSmrgAC_LANG_PUSH(C++) 68581bedbe3fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 68591bedbe3fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 68601bedbe3fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 68611bedbe3fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 68621bedbe3fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 68631bedbe3fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 68641bedbe3fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 68651bedbe3fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 68661bedbe3fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 68671bedbe3fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 68681bedbe3fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 68691bedbe3fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 68701bedbe3fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 68711bedbe3fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 68721bedbe3fSmrg_LT_TAGVAR(module_cmds, $1)= 68731bedbe3fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 68741bedbe3fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 68751bedbe3fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 68761bedbe3fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 68771bedbe3fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 68781bedbe3fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 68791bedbe3fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 68801bedbe3fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 68811bedbe3fSmrg 68821bedbe3fSmrg# Source file extension for C++ test sources. 68831bedbe3fSmrgac_ext=cpp 68841bedbe3fSmrg 68851bedbe3fSmrg# Object file extension for compiled C++ test sources. 68861bedbe3fSmrgobjext=o 68871bedbe3fSmrg_LT_TAGVAR(objext, $1)=$objext 68881bedbe3fSmrg 68891bedbe3fSmrg# No sense in running all these tests if we already determined that 68901bedbe3fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 68911bedbe3fSmrg# are currently assumed to apply to all compilers on this platform, 68921bedbe3fSmrg# and will be corrupted by setting them based on a non-working compiler. 68931bedbe3fSmrgif test "$_lt_caught_CXX_error" != yes; then 68941bedbe3fSmrg # Code to be used in simple compile tests 68951bedbe3fSmrg lt_simple_compile_test_code="int some_variable = 0;" 68961bedbe3fSmrg 68971bedbe3fSmrg # Code to be used in simple link tests 68981bedbe3fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 68991bedbe3fSmrg 69001bedbe3fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 69011bedbe3fSmrg _LT_TAG_COMPILER 69021bedbe3fSmrg 69031bedbe3fSmrg # save warnings/boilerplate of simple test code 69041bedbe3fSmrg _LT_COMPILER_BOILERPLATE 69051bedbe3fSmrg _LT_LINKER_BOILERPLATE 69061bedbe3fSmrg 69071bedbe3fSmrg # Allow CC to be a program name with arguments. 69081bedbe3fSmrg lt_save_CC=$CC 69091bedbe3fSmrg lt_save_CFLAGS=$CFLAGS 69101bedbe3fSmrg lt_save_LD=$LD 69111bedbe3fSmrg lt_save_GCC=$GCC 69121bedbe3fSmrg GCC=$GXX 69131bedbe3fSmrg lt_save_with_gnu_ld=$with_gnu_ld 69141bedbe3fSmrg lt_save_path_LD=$lt_cv_path_LD 69151bedbe3fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 69161bedbe3fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 69171bedbe3fSmrg else 69181bedbe3fSmrg $as_unset lt_cv_prog_gnu_ld 69191bedbe3fSmrg fi 69201bedbe3fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 69211bedbe3fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 69221bedbe3fSmrg else 69231bedbe3fSmrg $as_unset lt_cv_path_LD 69241bedbe3fSmrg fi 69251bedbe3fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 69261bedbe3fSmrg CC=${CXX-"c++"} 69271bedbe3fSmrg CFLAGS=$CXXFLAGS 69281bedbe3fSmrg compiler=$CC 69291bedbe3fSmrg _LT_TAGVAR(compiler, $1)=$CC 69301bedbe3fSmrg _LT_CC_BASENAME([$compiler]) 69311bedbe3fSmrg 69321bedbe3fSmrg if test -n "$compiler"; then 69331bedbe3fSmrg # We don't want -fno-exception when compiling C++ code, so set the 69341bedbe3fSmrg # no_builtin_flag separately 69351bedbe3fSmrg if test "$GXX" = yes; then 69361bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6937549e21daSmrg else 69381bedbe3fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6939549e21daSmrg fi 6940ba6a1819Smrg 69411bedbe3fSmrg if test "$GXX" = yes; then 69421bedbe3fSmrg # Set up default GNU C++ configuration 6943ba6a1819Smrg 69441bedbe3fSmrg LT_PATH_LD 69451bedbe3fSmrg 69461bedbe3fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 69471bedbe3fSmrg # archiving commands below assume that GNU ld is being used. 69481bedbe3fSmrg if test "$with_gnu_ld" = yes; then 69491bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 69501bedbe3fSmrg _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' 69511bedbe3fSmrg 69521bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 69531bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 69541bedbe3fSmrg 69551bedbe3fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 69561bedbe3fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 69571bedbe3fSmrg # investigate it a little bit more. (MM) 69581bedbe3fSmrg wlarc='${wl}' 69591bedbe3fSmrg 69601bedbe3fSmrg # ancient GNU ld didn't support --whole-archive et. al. 69611bedbe3fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 69621bedbe3fSmrg $GREP 'no-whole-archive' > /dev/null; then 69631bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 69641bedbe3fSmrg else 69651bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 69661bedbe3fSmrg fi 69671bedbe3fSmrg else 69681bedbe3fSmrg with_gnu_ld=no 69691bedbe3fSmrg wlarc= 6970ba6a1819Smrg 69711bedbe3fSmrg # A generic and very simple default shared library creation 69721bedbe3fSmrg # command for GNU C++ for the case where it uses the native 69731bedbe3fSmrg # linker, instead of GNU ld. If possible, this setting should 69741bedbe3fSmrg # overridden to take advantage of the native linker features on 69751bedbe3fSmrg # the platform it is being used on. 69761bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6977549e21daSmrg fi 6978ba6a1819Smrg 69791bedbe3fSmrg # Commands to make compiler produce verbose output that lists 69801bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 69811bedbe3fSmrg # linking a shared library. 69821bedbe3fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 69831bedbe3fSmrg 69841bedbe3fSmrg else 69851bedbe3fSmrg GXX=no 69861bedbe3fSmrg with_gnu_ld=no 69871bedbe3fSmrg wlarc= 69881bedbe3fSmrg fi 69891bedbe3fSmrg 69901bedbe3fSmrg # PORTME: fill in a description of your system's C++ link characteristics 69911bedbe3fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 69921bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 69931bedbe3fSmrg case $host_os in 69941bedbe3fSmrg aix3*) 69951bedbe3fSmrg # FIXME: insert proper C++ library support 69961bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6997549e21daSmrg ;; 69981bedbe3fSmrg aix[[4-9]]*) 69991bedbe3fSmrg if test "$host_cpu" = ia64; then 70001bedbe3fSmrg # On IA64, the linker does run time linking by default, so we don't 70011bedbe3fSmrg # have to do anything special. 70021bedbe3fSmrg aix_use_runtimelinking=no 70031bedbe3fSmrg exp_sym_flag='-Bexport' 70041bedbe3fSmrg no_entry_flag="" 70051bedbe3fSmrg else 70061bedbe3fSmrg aix_use_runtimelinking=no 7007ba6a1819Smrg 70081bedbe3fSmrg # Test if we are trying to use run time linking or normal 70091bedbe3fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 70101bedbe3fSmrg # need to do runtime linking. 70111bedbe3fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 70121bedbe3fSmrg for ld_flag in $LDFLAGS; do 70131bedbe3fSmrg case $ld_flag in 70141bedbe3fSmrg *-brtl*) 70151bedbe3fSmrg aix_use_runtimelinking=yes 70161bedbe3fSmrg break 70171bedbe3fSmrg ;; 70181bedbe3fSmrg esac 70191bedbe3fSmrg done 70201bedbe3fSmrg ;; 70211bedbe3fSmrg esac 7022ba6a1819Smrg 70231bedbe3fSmrg exp_sym_flag='-bexport' 70241bedbe3fSmrg no_entry_flag='-bnoentry' 70251bedbe3fSmrg fi 7026549e21daSmrg 70271bedbe3fSmrg # When large executables or shared objects are built, AIX ld can 70281bedbe3fSmrg # have problems creating the table of contents. If linking a library 70291bedbe3fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 70301bedbe3fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 70311bedbe3fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7032ba6a1819Smrg 70331bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='' 70341bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 70351bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 70361bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 70371bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 70381bedbe3fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7039ba6a1819Smrg 70401bedbe3fSmrg if test "$GXX" = yes; then 70411bedbe3fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 70421bedbe3fSmrg # We only want to do this on AIX 4.2 and lower, the check 70431bedbe3fSmrg # below for broken collect2 doesn't work under 4.3+ 70441bedbe3fSmrg collect2name=`${CC} -print-prog-name=collect2` 70451bedbe3fSmrg if test -f "$collect2name" && 70461bedbe3fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 70471bedbe3fSmrg then 70481bedbe3fSmrg # We have reworked collect2 70491bedbe3fSmrg : 70501bedbe3fSmrg else 70511bedbe3fSmrg # We have old collect2 70521bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 70531bedbe3fSmrg # It fails to find uninstalled libraries when the uninstalled 70541bedbe3fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 70551bedbe3fSmrg # to unsupported forces relinking 70561bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 70571bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 70581bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 70591bedbe3fSmrg fi 70601bedbe3fSmrg esac 70611bedbe3fSmrg shared_flag='-shared' 70621bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 70631bedbe3fSmrg shared_flag="$shared_flag "'${wl}-G' 70641bedbe3fSmrg fi 70651bedbe3fSmrg else 70661bedbe3fSmrg # not using gcc 70671bedbe3fSmrg if test "$host_cpu" = ia64; then 70681bedbe3fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 70691bedbe3fSmrg # chokes on -Wl,-G. The following line is correct: 70701bedbe3fSmrg shared_flag='-G' 70711bedbe3fSmrg else 70721bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 70731bedbe3fSmrg shared_flag='${wl}-G' 70741bedbe3fSmrg else 70751bedbe3fSmrg shared_flag='${wl}-bM:SRE' 70761bedbe3fSmrg fi 70771bedbe3fSmrg fi 70781bedbe3fSmrg fi 7079ba6a1819Smrg 70801bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 70811bedbe3fSmrg # It seems that -bexpall does not export symbols beginning with 70821bedbe3fSmrg # underscore (_), so it is better to generate a list of symbols to 70831bedbe3fSmrg # export. 70841bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 70851bedbe3fSmrg if test "$aix_use_runtimelinking" = yes; then 70861bedbe3fSmrg # Warning - without using the other runtime loading flags (-brtl), 70871bedbe3fSmrg # -berok will link without error, but may produce a broken library. 70881bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 70891bedbe3fSmrg # Determine the default libpath from the value encoded in an empty 70901bedbe3fSmrg # executable. 70911bedbe3fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 70921bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7093ba6a1819Smrg 70941bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 70951bedbe3fSmrg else 70961bedbe3fSmrg if test "$host_cpu" = ia64; then 70971bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 70981bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 70991bedbe3fSmrg _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" 71001bedbe3fSmrg else 71011bedbe3fSmrg # Determine the default libpath from the value encoded in an 71021bedbe3fSmrg # empty executable. 71031bedbe3fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 71041bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71051bedbe3fSmrg # Warning - without using the other run time loading flags, 71061bedbe3fSmrg # -berok will link without error, but may produce a broken library. 71071bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 71081bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 71091bedbe3fSmrg if test "$with_gnu_ld" = yes; then 71101bedbe3fSmrg # We only use this code for GNU lds that support --whole-archive. 71111bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 71121bedbe3fSmrg else 71131bedbe3fSmrg # Exported symbols can be pulled into shared objects from archives 71141bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 71151bedbe3fSmrg fi 71161bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 71171bedbe3fSmrg # This is similar to how AIX traditionally builds its shared 71181bedbe3fSmrg # libraries. 71191bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 71201bedbe3fSmrg fi 7121549e21daSmrg fi 71221bedbe3fSmrg ;; 7123ba6a1819Smrg 71241bedbe3fSmrg beos*) 71251bedbe3fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 71261bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71271bedbe3fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 71281bedbe3fSmrg # support --undefined. This deserves some investigation. FIXME 71291bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 71301bedbe3fSmrg else 71311bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71321bedbe3fSmrg fi 71331bedbe3fSmrg ;; 71341bedbe3fSmrg 71351bedbe3fSmrg chorus*) 71361bedbe3fSmrg case $cc_basename in 71371bedbe3fSmrg *) 71381bedbe3fSmrg # FIXME: insert proper C++ library support 71391bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71401bedbe3fSmrg ;; 71411bedbe3fSmrg esac 71421bedbe3fSmrg ;; 71431bedbe3fSmrg 71441bedbe3fSmrg cygwin* | mingw* | pw32* | cegcc*) 71451bedbe3fSmrg case $GXX,$cc_basename in 71461bedbe3fSmrg ,cl* | no,cl*) 71471bedbe3fSmrg # Native MSVC 71481bedbe3fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 71491bedbe3fSmrg # no search path for DLLs. 71501bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 71511bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71521bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 71531bedbe3fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 71541bedbe3fSmrg # Tell ltmain to make .lib files, not .a files. 71551bedbe3fSmrg libext=lib 71561bedbe3fSmrg # Tell ltmain to make .dll files, not .so files. 71571bedbe3fSmrg shrext_cmds=".dll" 71581bedbe3fSmrg # FIXME: Setting linknames here is a bad hack. 71591bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 71601bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 71611bedbe3fSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 71621bedbe3fSmrg else 71631bedbe3fSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 71641bedbe3fSmrg fi~ 71651bedbe3fSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 71661bedbe3fSmrg linknames=' 71671bedbe3fSmrg # The linker will not automatically build a static lib if we build a DLL. 71681bedbe3fSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 71691bedbe3fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71701bedbe3fSmrg # Don't use ranlib 71711bedbe3fSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 71721bedbe3fSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 71731bedbe3fSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 71741bedbe3fSmrg case $lt_outputfile in 71751bedbe3fSmrg *.exe|*.EXE) ;; 71761bedbe3fSmrg *) 71771bedbe3fSmrg lt_outputfile="$lt_outputfile.exe" 71781bedbe3fSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 71791bedbe3fSmrg ;; 71801bedbe3fSmrg esac~ 71811bedbe3fSmrg func_to_tool_file "$lt_outputfile"~ 71821bedbe3fSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 71831bedbe3fSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 71841bedbe3fSmrg $RM "$lt_outputfile.manifest"; 71851bedbe3fSmrg fi' 71861bedbe3fSmrg ;; 71871bedbe3fSmrg *) 71881bedbe3fSmrg # g++ 71891bedbe3fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 71901bedbe3fSmrg # as there is no search path for DLLs. 71911bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71921bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 71931bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71941bedbe3fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 71951bedbe3fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71961bedbe3fSmrg 71971bedbe3fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 71981bedbe3fSmrg _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' 71991bedbe3fSmrg # If the export-symbols file already is a .def file (1st line 72001bedbe3fSmrg # is EXPORTS), use it as is; otherwise, prepend... 72011bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72021bedbe3fSmrg cp $export_symbols $output_objdir/$soname.def; 72031bedbe3fSmrg else 72041bedbe3fSmrg echo EXPORTS > $output_objdir/$soname.def; 72051bedbe3fSmrg cat $export_symbols >> $output_objdir/$soname.def; 72061bedbe3fSmrg fi~ 72071bedbe3fSmrg $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' 72081bedbe3fSmrg else 72091bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7210549e21daSmrg fi 7211549e21daSmrg ;; 7212549e21daSmrg esac 72131bedbe3fSmrg ;; 72141bedbe3fSmrg darwin* | rhapsody*) 72151bedbe3fSmrg _LT_DARWIN_LINKER_FEATURES($1) 72161bedbe3fSmrg ;; 72171bedbe3fSmrg 72181bedbe3fSmrg dgux*) 72191bedbe3fSmrg case $cc_basename in 72201bedbe3fSmrg ec++*) 72211bedbe3fSmrg # FIXME: insert proper C++ library support 72221bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72231bedbe3fSmrg ;; 72241bedbe3fSmrg ghcx*) 72251bedbe3fSmrg # Green Hills C++ Compiler 72261bedbe3fSmrg # FIXME: insert proper C++ library support 72271bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72281bedbe3fSmrg ;; 72291bedbe3fSmrg *) 72301bedbe3fSmrg # FIXME: insert proper C++ library support 72311bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72321bedbe3fSmrg ;; 72331bedbe3fSmrg esac 72341bedbe3fSmrg ;; 72351bedbe3fSmrg 72361bedbe3fSmrg freebsd2.*) 72371bedbe3fSmrg # C++ shared libraries reported to be fairly broken before 72381bedbe3fSmrg # switch to ELF 7239549e21daSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72401bedbe3fSmrg ;; 7241ba6a1819Smrg 72421bedbe3fSmrg freebsd-elf*) 72431bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 72441bedbe3fSmrg ;; 7245ba6a1819Smrg 72461bedbe3fSmrg freebsd* | dragonfly*) 72471bedbe3fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 72481bedbe3fSmrg # conventions 72491bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 72501bedbe3fSmrg ;; 7251ba6a1819Smrg 72521bedbe3fSmrg gnu*) 72531bedbe3fSmrg ;; 7254ba6a1819Smrg 72551bedbe3fSmrg haiku*) 72561bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72571bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72581bedbe3fSmrg ;; 7259ba6a1819Smrg 72601bedbe3fSmrg hpux9*) 72611bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 72621bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72631bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 72641bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 72651bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 72661bedbe3fSmrg # but as the default 72671bedbe3fSmrg # location of the library. 7268ba6a1819Smrg 72691bedbe3fSmrg case $cc_basename in 72701bedbe3fSmrg CC*) 72711bedbe3fSmrg # FIXME: insert proper C++ library support 72721bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72731bedbe3fSmrg ;; 72741bedbe3fSmrg aCC*) 72751bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 72761bedbe3fSmrg # Commands to make compiler produce verbose output that lists 72771bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 72781bedbe3fSmrg # linking a shared library. 72791bedbe3fSmrg # 72801bedbe3fSmrg # There doesn't appear to be a way to prevent this compiler from 72811bedbe3fSmrg # explicitly linking system object files so we need to strip them 72821bedbe3fSmrg # from the output so that they don't get included in the library 72831bedbe3fSmrg # dependencies. 72841bedbe3fSmrg 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"' 72851bedbe3fSmrg ;; 72861bedbe3fSmrg *) 72871bedbe3fSmrg if test "$GXX" = yes; then 72881bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 72891bedbe3fSmrg else 72901bedbe3fSmrg # FIXME: insert proper C++ library support 72911bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72921bedbe3fSmrg fi 72931bedbe3fSmrg ;; 72941bedbe3fSmrg esac 72951bedbe3fSmrg ;; 7296ba6a1819Smrg 72971bedbe3fSmrg hpux10*|hpux11*) 72981bedbe3fSmrg if test $with_gnu_ld = no; then 72991bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73001bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73011bedbe3fSmrg 73021bedbe3fSmrg case $host_cpu in 73031bedbe3fSmrg hppa*64*|ia64*) 73041bedbe3fSmrg ;; 73051bedbe3fSmrg *) 73061bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73071bedbe3fSmrg ;; 73081bedbe3fSmrg esac 73091bedbe3fSmrg fi 73101bedbe3fSmrg case $host_cpu in 73111bedbe3fSmrg hppa*64*|ia64*) 73121bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 73131bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73141bedbe3fSmrg ;; 73151bedbe3fSmrg *) 73161bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 73171bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 73181bedbe3fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73191bedbe3fSmrg # but as the default 73201bedbe3fSmrg # location of the library. 73211bedbe3fSmrg ;; 73221bedbe3fSmrg esac 73231bedbe3fSmrg 73241bedbe3fSmrg case $cc_basename in 73251bedbe3fSmrg CC*) 73261bedbe3fSmrg # FIXME: insert proper C++ library support 7327549e21daSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73281bedbe3fSmrg ;; 73291bedbe3fSmrg aCC*) 73301bedbe3fSmrg case $host_cpu in 73311bedbe3fSmrg hppa*64*) 73321bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73331bedbe3fSmrg ;; 73341bedbe3fSmrg ia64*) 73351bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73361bedbe3fSmrg ;; 73371bedbe3fSmrg *) 73381bedbe3fSmrg _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' 73391bedbe3fSmrg ;; 73401bedbe3fSmrg esac 73411bedbe3fSmrg # Commands to make compiler produce verbose output that lists 73421bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 73431bedbe3fSmrg # linking a shared library. 73441bedbe3fSmrg # 73451bedbe3fSmrg # There doesn't appear to be a way to prevent this compiler from 73461bedbe3fSmrg # explicitly linking system object files so we need to strip them 73471bedbe3fSmrg # from the output so that they don't get included in the library 73481bedbe3fSmrg # dependencies. 73491bedbe3fSmrg 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"' 73501bedbe3fSmrg ;; 73511bedbe3fSmrg *) 73521bedbe3fSmrg if test "$GXX" = yes; then 73531bedbe3fSmrg if test $with_gnu_ld = no; then 73541bedbe3fSmrg case $host_cpu in 73551bedbe3fSmrg hppa*64*) 73561bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73571bedbe3fSmrg ;; 73581bedbe3fSmrg ia64*) 73591bedbe3fSmrg _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' 73601bedbe3fSmrg ;; 73611bedbe3fSmrg *) 73621bedbe3fSmrg _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' 73631bedbe3fSmrg ;; 73641bedbe3fSmrg esac 73651bedbe3fSmrg fi 73661bedbe3fSmrg else 73671bedbe3fSmrg # FIXME: insert proper C++ library support 73681bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73691bedbe3fSmrg fi 73701bedbe3fSmrg ;; 73711bedbe3fSmrg esac 73721bedbe3fSmrg ;; 73731bedbe3fSmrg 73741bedbe3fSmrg interix[[3-9]]*) 73751bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 73761bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73771bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 73781bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73791bedbe3fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 73801bedbe3fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 73811bedbe3fSmrg # default) and relocated if they conflict, which is a slow very memory 73821bedbe3fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 73831bedbe3fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 73841bedbe3fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 73851bedbe3fSmrg _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' 73861bedbe3fSmrg _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' 7387549e21daSmrg ;; 73881bedbe3fSmrg irix5* | irix6*) 73891bedbe3fSmrg case $cc_basename in 73901bedbe3fSmrg CC*) 73911bedbe3fSmrg # SGI C++ 73921bedbe3fSmrg _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' 7393ba6a1819Smrg 73941bedbe3fSmrg # Archives containing C++ object files must be created using 73951bedbe3fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 73961bedbe3fSmrg # necessary to make sure instantiated templates are included 73971bedbe3fSmrg # in the archive. 73981bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 73991bedbe3fSmrg ;; 74001bedbe3fSmrg *) 74011bedbe3fSmrg if test "$GXX" = yes; then 74021bedbe3fSmrg if test "$with_gnu_ld" = no; then 74031bedbe3fSmrg _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' 74041bedbe3fSmrg else 74051bedbe3fSmrg _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' 74061bedbe3fSmrg fi 74071bedbe3fSmrg fi 74081bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 74091bedbe3fSmrg ;; 74101bedbe3fSmrg esac 74111bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74121bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74131bedbe3fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 74141bedbe3fSmrg ;; 7415ba6a1819Smrg 74161bedbe3fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 74171bedbe3fSmrg case $cc_basename in 74181bedbe3fSmrg KCC*) 74191bedbe3fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7420ba6a1819Smrg 74211bedbe3fSmrg # KCC will only create a shared library if the output file 74221bedbe3fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 74231bedbe3fSmrg # to its proper name (with version) after linking. 74241bedbe3fSmrg _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' 74251bedbe3fSmrg _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' 74261bedbe3fSmrg # Commands to make compiler produce verbose output that lists 74271bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 74281bedbe3fSmrg # linking a shared library. 74291bedbe3fSmrg # 74301bedbe3fSmrg # There doesn't appear to be a way to prevent this compiler from 74311bedbe3fSmrg # explicitly linking system object files so we need to strip them 74321bedbe3fSmrg # from the output so that they don't get included in the library 74331bedbe3fSmrg # dependencies. 74341bedbe3fSmrg 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"' 7435ba6a1819Smrg 74361bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74371bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7438ba6a1819Smrg 74391bedbe3fSmrg # Archives containing C++ object files must be created using 74401bedbe3fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 74411bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 74421bedbe3fSmrg ;; 74431bedbe3fSmrg icpc* | ecpc* ) 74441bedbe3fSmrg # Intel C++ 74451bedbe3fSmrg with_gnu_ld=yes 74461bedbe3fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 74471bedbe3fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 74481bedbe3fSmrg # earlier do not add the objects themselves. 74491bedbe3fSmrg case `$CC -V 2>&1` in 74501bedbe3fSmrg *"Version 7."*) 74511bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 74521bedbe3fSmrg _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' 74531bedbe3fSmrg ;; 74541bedbe3fSmrg *) # Version 8.0 or newer 74551bedbe3fSmrg tmp_idyn= 74561bedbe3fSmrg case $host_cpu in 74571bedbe3fSmrg ia64*) tmp_idyn=' -i_dynamic';; 74581bedbe3fSmrg esac 74591bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 74601bedbe3fSmrg _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' 74611bedbe3fSmrg ;; 74621bedbe3fSmrg esac 74631bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 74641bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74651bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74661bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 74671bedbe3fSmrg ;; 74681bedbe3fSmrg pgCC* | pgcpp*) 74691bedbe3fSmrg # Portland Group C++ compiler 74701bedbe3fSmrg case `$CC -V` in 74711bedbe3fSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 74721bedbe3fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 74731bedbe3fSmrg rm -rf $tpldir~ 74741bedbe3fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 74751bedbe3fSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 74761bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 74771bedbe3fSmrg rm -rf $tpldir~ 74781bedbe3fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 74791bedbe3fSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 74801bedbe3fSmrg $RANLIB $oldlib' 74811bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 74821bedbe3fSmrg rm -rf $tpldir~ 74831bedbe3fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74841bedbe3fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 74851bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 74861bedbe3fSmrg rm -rf $tpldir~ 74871bedbe3fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74881bedbe3fSmrg $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' 74891bedbe3fSmrg ;; 74901bedbe3fSmrg *) # Version 6 and above use weak symbols 74911bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 74921bedbe3fSmrg _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' 74931bedbe3fSmrg ;; 74941bedbe3fSmrg esac 7495ba6a1819Smrg 74961bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 74971bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74981bedbe3fSmrg _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' 74991bedbe3fSmrg ;; 75001bedbe3fSmrg cxx*) 75011bedbe3fSmrg # Compaq C++ 75021bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75031bedbe3fSmrg _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' 7504ba6a1819Smrg 75051bedbe3fSmrg runpath_var=LD_RUN_PATH 75061bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 75071bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7508ba6a1819Smrg 75091bedbe3fSmrg # Commands to make compiler produce verbose output that lists 75101bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 75111bedbe3fSmrg # linking a shared library. 75121bedbe3fSmrg # 75131bedbe3fSmrg # There doesn't appear to be a way to prevent this compiler from 75141bedbe3fSmrg # explicitly linking system object files so we need to strip them 75151bedbe3fSmrg # from the output so that they don't get included in the library 75161bedbe3fSmrg # dependencies. 75171bedbe3fSmrg 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' 75181bedbe3fSmrg ;; 75191bedbe3fSmrg xl* | mpixl* | bgxl*) 75201bedbe3fSmrg # IBM XL 8.0 on PPC, with GNU ld 75211bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75221bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75231bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75241bedbe3fSmrg if test "x$supports_anon_versioning" = xyes; then 75251bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 75261bedbe3fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75271bedbe3fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 75281bedbe3fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75291bedbe3fSmrg fi 75301bedbe3fSmrg ;; 75311bedbe3fSmrg *) 75321bedbe3fSmrg case `$CC -V 2>&1 | sed 5q` in 75331bedbe3fSmrg *Sun\ C*) 75341bedbe3fSmrg # Sun C++ 5.9 75351bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 75361bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 75371bedbe3fSmrg _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' 75381bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75391bedbe3fSmrg _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' 75401bedbe3fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7541ba6a1819Smrg 75421bedbe3fSmrg # Not sure whether something based on 75431bedbe3fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 75441bedbe3fSmrg # would be better. 75451bedbe3fSmrg output_verbose_link_cmd='func_echo_all' 75461bedbe3fSmrg 75471bedbe3fSmrg # Archives containing C++ object files must be created using 75481bedbe3fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 75491bedbe3fSmrg # necessary to make sure instantiated templates are included 75501bedbe3fSmrg # in the archive. 75511bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 75521bedbe3fSmrg ;; 75531bedbe3fSmrg esac 75541bedbe3fSmrg ;; 7555549e21daSmrg esac 75561bedbe3fSmrg ;; 7557ba6a1819Smrg 75581bedbe3fSmrg lynxos*) 75591bedbe3fSmrg # FIXME: insert proper C++ library support 75601bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75611bedbe3fSmrg ;; 7562ba6a1819Smrg 75631bedbe3fSmrg m88k*) 75641bedbe3fSmrg # FIXME: insert proper C++ library support 75651bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75661bedbe3fSmrg ;; 7567ba6a1819Smrg 75681bedbe3fSmrg mvs*) 75691bedbe3fSmrg case $cc_basename in 75701bedbe3fSmrg cxx*) 75711bedbe3fSmrg # FIXME: insert proper C++ library support 75721bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75731bedbe3fSmrg ;; 75741bedbe3fSmrg *) 75751bedbe3fSmrg # FIXME: insert proper C++ library support 75761bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75771bedbe3fSmrg ;; 75781bedbe3fSmrg esac 75791bedbe3fSmrg ;; 7580ba6a1819Smrg 75811bedbe3fSmrg netbsd*) 75821bedbe3fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 75831bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 75841bedbe3fSmrg wlarc= 75851bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75861bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 75871bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 75881bedbe3fSmrg fi 75891bedbe3fSmrg # Workaround some broken pre-1.5 toolchains 75901bedbe3fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 75911bedbe3fSmrg ;; 7592ba6a1819Smrg 75931bedbe3fSmrg *nto* | *qnx*) 75941bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 75951bedbe3fSmrg ;; 7596ba6a1819Smrg 75971bedbe3fSmrg openbsd2*) 75981bedbe3fSmrg # C++ shared libraries are fairly broken 75991bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76001bedbe3fSmrg ;; 7601ba6a1819Smrg 76021bedbe3fSmrg openbsd*) 76031bedbe3fSmrg if test -f /usr/libexec/ld.so; then 76041bedbe3fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 76051bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76061bedbe3fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 76071bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 76081bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76091bedbe3fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 76101bedbe3fSmrg _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' 76111bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 76121bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 76131bedbe3fSmrg fi 76141bedbe3fSmrg output_verbose_link_cmd=func_echo_all 76151bedbe3fSmrg else 76161bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76171bedbe3fSmrg fi 76181bedbe3fSmrg ;; 7619ba6a1819Smrg 76201bedbe3fSmrg osf3* | osf4* | osf5*) 76211bedbe3fSmrg case $cc_basename in 76221bedbe3fSmrg KCC*) 76231bedbe3fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7624ba6a1819Smrg 76251bedbe3fSmrg # KCC will only create a shared library if the output file 76261bedbe3fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 76271bedbe3fSmrg # to its proper name (with version) after linking. 76281bedbe3fSmrg _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' 7629ba6a1819Smrg 76301bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76311bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7632ba6a1819Smrg 76331bedbe3fSmrg # Archives containing C++ object files must be created using 76341bedbe3fSmrg # the KAI C++ compiler. 76351bedbe3fSmrg case $host in 76361bedbe3fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 76371bedbe3fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 76381bedbe3fSmrg esac 76391bedbe3fSmrg ;; 76401bedbe3fSmrg RCC*) 76411bedbe3fSmrg # Rational C++ 2.4.1 76421bedbe3fSmrg # FIXME: insert proper C++ library support 76431bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76441bedbe3fSmrg ;; 76451bedbe3fSmrg cxx*) 76461bedbe3fSmrg case $host in 76471bedbe3fSmrg osf3*) 76481bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76491bedbe3fSmrg _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' 76501bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76511bedbe3fSmrg ;; 76521bedbe3fSmrg *) 76531bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 76541bedbe3fSmrg _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' 76551bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 76561bedbe3fSmrg echo "-hidden">> $lib.exp~ 76571bedbe3fSmrg $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~ 76581bedbe3fSmrg $RM $lib.exp' 76591bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76601bedbe3fSmrg ;; 76611bedbe3fSmrg esac 7662ba6a1819Smrg 76631bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7664ba6a1819Smrg 76651bedbe3fSmrg # Commands to make compiler produce verbose output that lists 76661bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 76671bedbe3fSmrg # linking a shared library. 76681bedbe3fSmrg # 76691bedbe3fSmrg # There doesn't appear to be a way to prevent this compiler from 76701bedbe3fSmrg # explicitly linking system object files so we need to strip them 76711bedbe3fSmrg # from the output so that they don't get included in the library 76721bedbe3fSmrg # dependencies. 76731bedbe3fSmrg 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"' 76741bedbe3fSmrg ;; 76751bedbe3fSmrg *) 76761bedbe3fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 76771bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76781bedbe3fSmrg case $host in 76791bedbe3fSmrg osf3*) 76801bedbe3fSmrg _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' 76811bedbe3fSmrg ;; 76821bedbe3fSmrg *) 76831bedbe3fSmrg _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' 76841bedbe3fSmrg ;; 76851bedbe3fSmrg esac 7686ba6a1819Smrg 76871bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76881bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7689ba6a1819Smrg 76901bedbe3fSmrg # Commands to make compiler produce verbose output that lists 76911bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 76921bedbe3fSmrg # linking a shared library. 76931bedbe3fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7694ba6a1819Smrg 76951bedbe3fSmrg else 76961bedbe3fSmrg # FIXME: insert proper C++ library support 76971bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76981bedbe3fSmrg fi 76991bedbe3fSmrg ;; 77001bedbe3fSmrg esac 77011bedbe3fSmrg ;; 7702ba6a1819Smrg 77031bedbe3fSmrg psos*) 77041bedbe3fSmrg # FIXME: insert proper C++ library support 77051bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77061bedbe3fSmrg ;; 7707ba6a1819Smrg 77081bedbe3fSmrg sunos4*) 77091bedbe3fSmrg case $cc_basename in 77101bedbe3fSmrg CC*) 77111bedbe3fSmrg # Sun C++ 4.x 77121bedbe3fSmrg # FIXME: insert proper C++ library support 77131bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77141bedbe3fSmrg ;; 77151bedbe3fSmrg lcc*) 77161bedbe3fSmrg # Lucid 77171bedbe3fSmrg # FIXME: insert proper C++ library support 77181bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77191bedbe3fSmrg ;; 77201bedbe3fSmrg *) 77211bedbe3fSmrg # FIXME: insert proper C++ library support 77221bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77231bedbe3fSmrg ;; 77241bedbe3fSmrg esac 77251bedbe3fSmrg ;; 7726ba6a1819Smrg 77271bedbe3fSmrg solaris*) 77281bedbe3fSmrg case $cc_basename in 77291bedbe3fSmrg CC* | sunCC*) 77301bedbe3fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 77311bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 77321bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 77331bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 77341bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77351bedbe3fSmrg $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' 7736ba6a1819Smrg 77371bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 77381bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77391bedbe3fSmrg case $host_os in 77401bedbe3fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 77411bedbe3fSmrg *) 77421bedbe3fSmrg # The compiler driver will combine and reorder linker options, 77431bedbe3fSmrg # but understands `-z linker_flag'. 77441bedbe3fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 77451bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 77461bedbe3fSmrg ;; 77471bedbe3fSmrg esac 77481bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7749ba6a1819Smrg 77501bedbe3fSmrg output_verbose_link_cmd='func_echo_all' 7751ba6a1819Smrg 77521bedbe3fSmrg # Archives containing C++ object files must be created using 77531bedbe3fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 77541bedbe3fSmrg # necessary to make sure instantiated templates are included 77551bedbe3fSmrg # in the archive. 77561bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 77571bedbe3fSmrg ;; 77581bedbe3fSmrg gcx*) 77591bedbe3fSmrg # Green Hills C++ Compiler 77601bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7761ba6a1819Smrg 77621bedbe3fSmrg # The C++ compiler must be used to create the archive. 77631bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 77641bedbe3fSmrg ;; 77651bedbe3fSmrg *) 77661bedbe3fSmrg # GNU C++ compiler with Solaris linker 77671bedbe3fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77681bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 77691bedbe3fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 77701bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 77711bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77721bedbe3fSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7773ba6a1819Smrg 77741bedbe3fSmrg # Commands to make compiler produce verbose output that lists 77751bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 77761bedbe3fSmrg # linking a shared library. 77771bedbe3fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77781bedbe3fSmrg else 77791bedbe3fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 77801bedbe3fSmrg # platform. 77811bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 77821bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77831bedbe3fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7784ba6a1819Smrg 77851bedbe3fSmrg # Commands to make compiler produce verbose output that lists 77861bedbe3fSmrg # what "hidden" libraries, object files and flags are used when 77871bedbe3fSmrg # linking a shared library. 77881bedbe3fSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77891bedbe3fSmrg fi 77901bedbe3fSmrg 77911bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 77921bedbe3fSmrg case $host_os in 77931bedbe3fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 77941bedbe3fSmrg *) 77951bedbe3fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 77961bedbe3fSmrg ;; 77971bedbe3fSmrg esac 77981bedbe3fSmrg fi 77991bedbe3fSmrg ;; 78001bedbe3fSmrg esac 78011bedbe3fSmrg ;; 78021bedbe3fSmrg 78031bedbe3fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 78041bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78051bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78061bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78071bedbe3fSmrg runpath_var='LD_RUN_PATH' 7808ba6a1819Smrg 78091bedbe3fSmrg case $cc_basename in 78101bedbe3fSmrg CC*) 78111bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78121bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7813549e21daSmrg ;; 7814549e21daSmrg *) 78151bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78161bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7817549e21daSmrg ;; 7818549e21daSmrg esac 7819549e21daSmrg ;; 7820ba6a1819Smrg 78211bedbe3fSmrg sysv5* | sco3.2v5* | sco5v6*) 78221bedbe3fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 78231bedbe3fSmrg # link with -lc, and that would cause any symbols used from libc to 78241bedbe3fSmrg # always be unresolved, which means just about no library would 78251bedbe3fSmrg # ever link correctly. If we're not using GNU ld we use -z text 78261bedbe3fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 78271bedbe3fSmrg # as -z defs. 78281bedbe3fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78291bedbe3fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 78301bedbe3fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78311bedbe3fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78321bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 78331bedbe3fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 78341bedbe3fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78351bedbe3fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 78361bedbe3fSmrg runpath_var='LD_RUN_PATH' 78371bedbe3fSmrg 78381bedbe3fSmrg case $cc_basename in 78391bedbe3fSmrg CC*) 78401bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78411bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78421bedbe3fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 78431bedbe3fSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 78441bedbe3fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 78451bedbe3fSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 78461bedbe3fSmrg ;; 78471bedbe3fSmrg *) 78481bedbe3fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78491bedbe3fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78501bedbe3fSmrg ;; 78511bedbe3fSmrg esac 7852549e21daSmrg ;; 7853ba6a1819Smrg 78541bedbe3fSmrg tandem*) 78551bedbe3fSmrg case $cc_basename in 78561bedbe3fSmrg NCC*) 78571bedbe3fSmrg # NonStop-UX NCC 3.20 78581bedbe3fSmrg # FIXME: insert proper C++ library support 78591bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78601bedbe3fSmrg ;; 78611bedbe3fSmrg *) 78621bedbe3fSmrg # FIXME: insert proper C++ library support 78631bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78641bedbe3fSmrg ;; 78651bedbe3fSmrg esac 7866549e21daSmrg ;; 7867ba6a1819Smrg 78681bedbe3fSmrg vxworks*) 78691bedbe3fSmrg # FIXME: insert proper C++ library support 78701bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78711bedbe3fSmrg ;; 7872ba6a1819Smrg 78731bedbe3fSmrg *) 78741bedbe3fSmrg # FIXME: insert proper C++ library support 78751bedbe3fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78761bedbe3fSmrg ;; 78771bedbe3fSmrg esac 7878ba6a1819Smrg 78791bedbe3fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 78801bedbe3fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7881ba6a1819Smrg 78821bedbe3fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 78831bedbe3fSmrg _LT_TAGVAR(LD, $1)="$LD" 78841bedbe3fSmrg 78851bedbe3fSmrg ## CAVEAT EMPTOR: 78861bedbe3fSmrg ## There is no encapsulation within the following macros, do not change 78871bedbe3fSmrg ## the running order or otherwise move them around unless you know exactly 78881bedbe3fSmrg ## what you are doing... 78891bedbe3fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 78901bedbe3fSmrg _LT_COMPILER_PIC($1) 78911bedbe3fSmrg _LT_COMPILER_C_O($1) 78921bedbe3fSmrg _LT_COMPILER_FILE_LOCKS($1) 78931bedbe3fSmrg _LT_LINKER_SHLIBS($1) 78941bedbe3fSmrg _LT_SYS_DYNAMIC_LINKER($1) 78951bedbe3fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 78961bedbe3fSmrg 78971bedbe3fSmrg _LT_CONFIG($1) 78981bedbe3fSmrg fi # test -n "$compiler" 78991bedbe3fSmrg 79001bedbe3fSmrg CC=$lt_save_CC 79011bedbe3fSmrg CFLAGS=$lt_save_CFLAGS 79021bedbe3fSmrg LDCXX=$LD 79031bedbe3fSmrg LD=$lt_save_LD 79041bedbe3fSmrg GCC=$lt_save_GCC 79051bedbe3fSmrg with_gnu_ld=$lt_save_with_gnu_ld 79061bedbe3fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 79071bedbe3fSmrg lt_cv_path_LD=$lt_save_path_LD 79081bedbe3fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 79091bedbe3fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 79101bedbe3fSmrgfi # test "$_lt_caught_CXX_error" != yes 79111bedbe3fSmrg 79121bedbe3fSmrgAC_LANG_POP 79131bedbe3fSmrg])# _LT_LANG_CXX_CONFIG 79141bedbe3fSmrg 79151bedbe3fSmrg 79161bedbe3fSmrg# _LT_FUNC_STRIPNAME_CNF 79171bedbe3fSmrg# ---------------------- 79181bedbe3fSmrg# func_stripname_cnf prefix suffix name 79191bedbe3fSmrg# strip PREFIX and SUFFIX off of NAME. 79201bedbe3fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 79211bedbe3fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 79221bedbe3fSmrg# dot (in which case that matches only a dot). 79231bedbe3fSmrg# 79241bedbe3fSmrg# This function is identical to the (non-XSI) version of func_stripname, 79251bedbe3fSmrg# except this one can be used by m4 code that may be executed by configure, 79261bedbe3fSmrg# rather than the libtool script. 79271bedbe3fSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 79281bedbe3fSmrgAC_REQUIRE([_LT_DECL_SED]) 79291bedbe3fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 79301bedbe3fSmrgfunc_stripname_cnf () 79311bedbe3fSmrg{ 79321bedbe3fSmrg case ${2} in 79331bedbe3fSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 79341bedbe3fSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 79351bedbe3fSmrg esac 79361bedbe3fSmrg} # func_stripname_cnf 79371bedbe3fSmrg])# _LT_FUNC_STRIPNAME_CNF 79381bedbe3fSmrg 79391bedbe3fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 79401bedbe3fSmrg# --------------------------------- 79411bedbe3fSmrg# Figure out "hidden" library dependencies from verbose 79421bedbe3fSmrg# compiler output when linking a shared library. 79431bedbe3fSmrg# Parse the compiler output and extract the necessary 79441bedbe3fSmrg# objects, libraries and library flags. 79451bedbe3fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 79461bedbe3fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 79471bedbe3fSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 79481bedbe3fSmrg# Dependencies to place before and after the object being linked: 79491bedbe3fSmrg_LT_TAGVAR(predep_objects, $1)= 79501bedbe3fSmrg_LT_TAGVAR(postdep_objects, $1)= 79511bedbe3fSmrg_LT_TAGVAR(predeps, $1)= 79521bedbe3fSmrg_LT_TAGVAR(postdeps, $1)= 79531bedbe3fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 79541bedbe3fSmrg 79551bedbe3fSmrgdnl we can't use the lt_simple_compile_test_code here, 79561bedbe3fSmrgdnl because it contains code intended for an executable, 79571bedbe3fSmrgdnl not a library. It's possible we should let each 79581bedbe3fSmrgdnl tag define a new lt_????_link_test_code variable, 79591bedbe3fSmrgdnl but it's only used here... 79601bedbe3fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 79611bedbe3fSmrgint a; 79621bedbe3fSmrgvoid foo (void) { a = 0; } 79631bedbe3fSmrg_LT_EOF 79641bedbe3fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 79651bedbe3fSmrgclass Foo 79661bedbe3fSmrg{ 79671bedbe3fSmrgpublic: 79681bedbe3fSmrg Foo (void) { a = 0; } 79691bedbe3fSmrgprivate: 79701bedbe3fSmrg int a; 79711bedbe3fSmrg}; 79721bedbe3fSmrg_LT_EOF 79731bedbe3fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 79741bedbe3fSmrg subroutine foo 79751bedbe3fSmrg implicit none 79761bedbe3fSmrg integer*4 a 79771bedbe3fSmrg a=0 79781bedbe3fSmrg return 79791bedbe3fSmrg end 79801bedbe3fSmrg_LT_EOF 79811bedbe3fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 79821bedbe3fSmrg subroutine foo 79831bedbe3fSmrg implicit none 79841bedbe3fSmrg integer a 79851bedbe3fSmrg a=0 79861bedbe3fSmrg return 79871bedbe3fSmrg end 79881bedbe3fSmrg_LT_EOF 79891bedbe3fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 79901bedbe3fSmrgpublic class foo { 79911bedbe3fSmrg private int a; 79921bedbe3fSmrg public void bar (void) { 79931bedbe3fSmrg a = 0; 79941bedbe3fSmrg } 79951bedbe3fSmrg}; 79961bedbe3fSmrg_LT_EOF 79971bedbe3fSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 79981bedbe3fSmrgpackage foo 79991bedbe3fSmrgfunc foo() { 80001bedbe3fSmrg} 80011bedbe3fSmrg_LT_EOF 80021bedbe3fSmrg]) 8003ba6a1819Smrg 80041bedbe3fSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 80051bedbe3fSmrgcase "$CC $CFLAGS " in #( 80061bedbe3fSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 80071bedbe3fSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 80081bedbe3fSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 80091bedbe3fSmrgesac 8010ba6a1819Smrg 80111bedbe3fSmrgdnl Parse the compiler output and extract the necessary 80121bedbe3fSmrgdnl objects, libraries and library flags. 80131bedbe3fSmrgif AC_TRY_EVAL(ac_compile); then 80141bedbe3fSmrg # Parse the compiler output and extract the necessary 80151bedbe3fSmrg # objects, libraries and library flags. 8016ba6a1819Smrg 80171bedbe3fSmrg # Sentinel used to keep track of whether or not we are before 80181bedbe3fSmrg # the conftest object file. 80191bedbe3fSmrg pre_test_object_deps_done=no 8020ba6a1819Smrg 80211bedbe3fSmrg for p in `eval "$output_verbose_link_cmd"`; do 80221bedbe3fSmrg case ${prev}${p} in 8023ba6a1819Smrg 80241bedbe3fSmrg -L* | -R* | -l*) 80251bedbe3fSmrg # Some compilers place space between "-{L,R}" and the path. 80261bedbe3fSmrg # Remove the space. 80271bedbe3fSmrg if test $p = "-L" || 80281bedbe3fSmrg test $p = "-R"; then 80291bedbe3fSmrg prev=$p 80301bedbe3fSmrg continue 80311bedbe3fSmrg fi 8032ba6a1819Smrg 80331bedbe3fSmrg # Expand the sysroot to ease extracting the directories later. 80341bedbe3fSmrg if test -z "$prev"; then 80351bedbe3fSmrg case $p in 80361bedbe3fSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 80371bedbe3fSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 80381bedbe3fSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 80391bedbe3fSmrg esac 80401bedbe3fSmrg fi 80411bedbe3fSmrg case $p in 80421bedbe3fSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 80431bedbe3fSmrg esac 80441bedbe3fSmrg if test "$pre_test_object_deps_done" = no; then 80451bedbe3fSmrg case ${prev} in 80461bedbe3fSmrg -L | -R) 80471bedbe3fSmrg # Internal compiler library paths should come after those 80481bedbe3fSmrg # provided the user. The postdeps already come after the 80491bedbe3fSmrg # user supplied libs so there is no need to process them. 80501bedbe3fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 80511bedbe3fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 80521bedbe3fSmrg else 80531bedbe3fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 80541bedbe3fSmrg fi 80551bedbe3fSmrg ;; 80561bedbe3fSmrg # The "-l" case would never come before the object being 80571bedbe3fSmrg # linked, so don't bother handling this case. 80581bedbe3fSmrg esac 80591bedbe3fSmrg else 80601bedbe3fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 80611bedbe3fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 80621bedbe3fSmrg else 80631bedbe3fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 80641bedbe3fSmrg fi 80651bedbe3fSmrg fi 80661bedbe3fSmrg prev= 80671bedbe3fSmrg ;; 8068ba6a1819Smrg 80691bedbe3fSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 80701bedbe3fSmrg *.$objext) 80711bedbe3fSmrg # This assumes that the test object file only shows up 80721bedbe3fSmrg # once in the compiler output. 80731bedbe3fSmrg if test "$p" = "conftest.$objext"; then 80741bedbe3fSmrg pre_test_object_deps_done=yes 80751bedbe3fSmrg continue 80761bedbe3fSmrg fi 8077ba6a1819Smrg 80781bedbe3fSmrg if test "$pre_test_object_deps_done" = no; then 80791bedbe3fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 80801bedbe3fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 80811bedbe3fSmrg else 80821bedbe3fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 80831bedbe3fSmrg fi 80841bedbe3fSmrg else 80851bedbe3fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 80861bedbe3fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 80871bedbe3fSmrg else 80881bedbe3fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 80891bedbe3fSmrg fi 80901bedbe3fSmrg fi 80911bedbe3fSmrg ;; 8092ba6a1819Smrg 80931bedbe3fSmrg *) ;; # Ignore the rest. 8094549e21daSmrg 8095549e21daSmrg esac 80961bedbe3fSmrg done 80971bedbe3fSmrg 80981bedbe3fSmrg # Clean up. 80991bedbe3fSmrg rm -f a.out a.exe 81001bedbe3fSmrgelse 81011bedbe3fSmrg echo "libtool.m4: error: problem compiling $1 test program" 81021bedbe3fSmrgfi 81031bedbe3fSmrg 81041bedbe3fSmrg$RM -f confest.$objext 81051bedbe3fSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 81061bedbe3fSmrg 81071bedbe3fSmrg# PORTME: override above test on systems where it is broken 81081bedbe3fSmrgm4_if([$1], [CXX], 81091bedbe3fSmrg[case $host_os in 81101bedbe3fSmrginterix[[3-9]]*) 81111bedbe3fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 81121bedbe3fSmrg # hack all around it, let's just trust "g++" to DTRT. 81131bedbe3fSmrg _LT_TAGVAR(predep_objects,$1)= 81141bedbe3fSmrg _LT_TAGVAR(postdep_objects,$1)= 81151bedbe3fSmrg _LT_TAGVAR(postdeps,$1)= 8116549e21daSmrg ;; 8117ba6a1819Smrg 81181bedbe3fSmrglinux*) 81191bedbe3fSmrg case `$CC -V 2>&1 | sed 5q` in 81201bedbe3fSmrg *Sun\ C*) 81211bedbe3fSmrg # Sun C++ 5.9 8122549e21daSmrg 81231bedbe3fSmrg # The more standards-conforming stlport4 library is 81241bedbe3fSmrg # incompatible with the Cstd library. Avoid specifying 81251bedbe3fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 81261bedbe3fSmrg # -library=stlport4 depends on it. 81271bedbe3fSmrg case " $CXX $CXXFLAGS " in 81281bedbe3fSmrg *" -library=stlport4 "*) 81291bedbe3fSmrg solaris_use_stlport4=yes 81301bedbe3fSmrg ;; 81311bedbe3fSmrg esac 8132549e21daSmrg 81331bedbe3fSmrg if test "$solaris_use_stlport4" != yes; then 81341bedbe3fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81351bedbe3fSmrg fi 81361bedbe3fSmrg ;; 81371bedbe3fSmrg esac 81381bedbe3fSmrg ;; 8139ba6a1819Smrg 81401bedbe3fSmrgsolaris*) 81411bedbe3fSmrg case $cc_basename in 81421bedbe3fSmrg CC* | sunCC*) 81431bedbe3fSmrg # The more standards-conforming stlport4 library is 81441bedbe3fSmrg # incompatible with the Cstd library. Avoid specifying 81451bedbe3fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 81461bedbe3fSmrg # -library=stlport4 depends on it. 81471bedbe3fSmrg case " $CXX $CXXFLAGS " in 81481bedbe3fSmrg *" -library=stlport4 "*) 81491bedbe3fSmrg solaris_use_stlport4=yes 81501bedbe3fSmrg ;; 81511bedbe3fSmrg esac 8152ba6a1819Smrg 81531bedbe3fSmrg # Adding this requires a known-good setup of shared libraries for 81541bedbe3fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 81551bedbe3fSmrg # archive will be linked into the output, leading to subtle bugs. 81561bedbe3fSmrg if test "$solaris_use_stlport4" != yes; then 81571bedbe3fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81581bedbe3fSmrg fi 81591bedbe3fSmrg ;; 81601bedbe3fSmrg esac 81611bedbe3fSmrg ;; 81621bedbe3fSmrgesac 81631bedbe3fSmrg]) 81641bedbe3fSmrg 81651bedbe3fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 81661bedbe3fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 81671bedbe3fSmrgesac 81681bedbe3fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 81691bedbe3fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 81701bedbe3fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 81711bedbe3fSmrgfi 81721bedbe3fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 81731bedbe3fSmrg [The directories searched by this compiler when creating a shared library]) 81741bedbe3fSmrg_LT_TAGDECL([], [predep_objects], [1], 81751bedbe3fSmrg [Dependencies to place before and after the objects being linked to 81761bedbe3fSmrg create a shared library]) 81771bedbe3fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 81781bedbe3fSmrg_LT_TAGDECL([], [predeps], [1]) 81791bedbe3fSmrg_LT_TAGDECL([], [postdeps], [1]) 81801bedbe3fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 81811bedbe3fSmrg [The library search path used internally by the compiler when linking 81821bedbe3fSmrg a shared library]) 81831bedbe3fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 81841bedbe3fSmrg 81851bedbe3fSmrg 81861bedbe3fSmrg# _LT_LANG_F77_CONFIG([TAG]) 81871bedbe3fSmrg# -------------------------- 81881bedbe3fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 81891bedbe3fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 81901bedbe3fSmrg# to write the compiler configuration to `libtool'. 81911bedbe3fSmrgm4_defun([_LT_LANG_F77_CONFIG], 81921bedbe3fSmrg[AC_LANG_PUSH(Fortran 77) 81931bedbe3fSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 81941bedbe3fSmrg _lt_disable_F77=yes 81951bedbe3fSmrgfi 81961bedbe3fSmrg 81971bedbe3fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 81981bedbe3fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 81991bedbe3fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 82001bedbe3fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 82011bedbe3fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 82021bedbe3fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 82031bedbe3fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 82041bedbe3fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 82051bedbe3fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 82061bedbe3fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 82071bedbe3fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 82081bedbe3fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 82091bedbe3fSmrg_LT_TAGVAR(module_cmds, $1)= 82101bedbe3fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 82111bedbe3fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 82121bedbe3fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 82131bedbe3fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 82141bedbe3fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 82151bedbe3fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 82161bedbe3fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 82171bedbe3fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 82181bedbe3fSmrg 82191bedbe3fSmrg# Source file extension for f77 test sources. 82201bedbe3fSmrgac_ext=f 82211bedbe3fSmrg 82221bedbe3fSmrg# Object file extension for compiled f77 test sources. 8223549e21daSmrgobjext=o 8224549e21daSmrg_LT_TAGVAR(objext, $1)=$objext 8225ba6a1819Smrg 82261bedbe3fSmrg# No sense in running all these tests if we already determined that 82271bedbe3fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 82281bedbe3fSmrg# are currently assumed to apply to all compilers on this platform, 82291bedbe3fSmrg# and will be corrupted by setting them based on a non-working compiler. 82301bedbe3fSmrgif test "$_lt_disable_F77" != yes; then 82311bedbe3fSmrg # Code to be used in simple compile tests 82321bedbe3fSmrg lt_simple_compile_test_code="\ 82331bedbe3fSmrg subroutine t 82341bedbe3fSmrg return 82351bedbe3fSmrg end 82361bedbe3fSmrg" 8237ba6a1819Smrg 82381bedbe3fSmrg # Code to be used in simple link tests 82391bedbe3fSmrg lt_simple_link_test_code="\ 82401bedbe3fSmrg program t 82411bedbe3fSmrg end 82421bedbe3fSmrg" 8243ba6a1819Smrg 82441bedbe3fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 82451bedbe3fSmrg _LT_TAG_COMPILER 8246ba6a1819Smrg 82471bedbe3fSmrg # save warnings/boilerplate of simple test code 82481bedbe3fSmrg _LT_COMPILER_BOILERPLATE 82491bedbe3fSmrg _LT_LINKER_BOILERPLATE 8250ba6a1819Smrg 82511bedbe3fSmrg # Allow CC to be a program name with arguments. 82521bedbe3fSmrg lt_save_CC="$CC" 82531bedbe3fSmrg lt_save_GCC=$GCC 82541bedbe3fSmrg lt_save_CFLAGS=$CFLAGS 82551bedbe3fSmrg CC=${F77-"f77"} 82561bedbe3fSmrg CFLAGS=$FFLAGS 82571bedbe3fSmrg compiler=$CC 82581bedbe3fSmrg _LT_TAGVAR(compiler, $1)=$CC 82591bedbe3fSmrg _LT_CC_BASENAME([$compiler]) 82601bedbe3fSmrg GCC=$G77 82611bedbe3fSmrg if test -n "$compiler"; then 82621bedbe3fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 82631bedbe3fSmrg AC_MSG_RESULT([$can_build_shared]) 8264549e21daSmrg 82651bedbe3fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 82661bedbe3fSmrg test "$can_build_shared" = "no" && enable_shared=no 8267549e21daSmrg 82681bedbe3fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 82691bedbe3fSmrg # are all built from PIC. 82701bedbe3fSmrg case $host_os in 82711bedbe3fSmrg aix3*) 82721bedbe3fSmrg test "$enable_shared" = yes && enable_static=no 82731bedbe3fSmrg if test -n "$RANLIB"; then 82741bedbe3fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 82751bedbe3fSmrg postinstall_cmds='$RANLIB $lib' 82761bedbe3fSmrg fi 82771bedbe3fSmrg ;; 82781bedbe3fSmrg aix[[4-9]]*) 82791bedbe3fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 82801bedbe3fSmrg test "$enable_shared" = yes && enable_static=no 82811bedbe3fSmrg fi 82821bedbe3fSmrg ;; 82831bedbe3fSmrg esac 82841bedbe3fSmrg AC_MSG_RESULT([$enable_shared]) 8285549e21daSmrg 82861bedbe3fSmrg AC_MSG_CHECKING([whether to build static libraries]) 82871bedbe3fSmrg # Make sure either enable_shared or enable_static is yes. 82881bedbe3fSmrg test "$enable_shared" = yes || enable_static=yes 82891bedbe3fSmrg AC_MSG_RESULT([$enable_static]) 8290ba6a1819Smrg 82911bedbe3fSmrg _LT_TAGVAR(GCC, $1)="$G77" 82921bedbe3fSmrg _LT_TAGVAR(LD, $1)="$LD" 8293ba6a1819Smrg 82941bedbe3fSmrg ## CAVEAT EMPTOR: 82951bedbe3fSmrg ## There is no encapsulation within the following macros, do not change 82961bedbe3fSmrg ## the running order or otherwise move them around unless you know exactly 82971bedbe3fSmrg ## what you are doing... 82981bedbe3fSmrg _LT_COMPILER_PIC($1) 82991bedbe3fSmrg _LT_COMPILER_C_O($1) 83001bedbe3fSmrg _LT_COMPILER_FILE_LOCKS($1) 83011bedbe3fSmrg _LT_LINKER_SHLIBS($1) 83021bedbe3fSmrg _LT_SYS_DYNAMIC_LINKER($1) 83031bedbe3fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 83041bedbe3fSmrg 83051bedbe3fSmrg _LT_CONFIG($1) 83061bedbe3fSmrg fi # test -n "$compiler" 83071bedbe3fSmrg 83081bedbe3fSmrg GCC=$lt_save_GCC 83091bedbe3fSmrg CC="$lt_save_CC" 83101bedbe3fSmrg CFLAGS="$lt_save_CFLAGS" 83111bedbe3fSmrgfi # test "$_lt_disable_F77" != yes 8312ba6a1819Smrg 8313549e21daSmrgAC_LANG_POP 83141bedbe3fSmrg])# _LT_LANG_F77_CONFIG 8315ba6a1819Smrg 8316ba6a1819Smrg 83171bedbe3fSmrg# _LT_LANG_FC_CONFIG([TAG]) 83181bedbe3fSmrg# ------------------------- 83191bedbe3fSmrg# Ensure that the configuration variables for a Fortran compiler are 83201bedbe3fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83211bedbe3fSmrg# to write the compiler configuration to `libtool'. 83221bedbe3fSmrgm4_defun([_LT_LANG_FC_CONFIG], 83231bedbe3fSmrg[AC_LANG_PUSH(Fortran) 83241bedbe3fSmrg 83251bedbe3fSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 83261bedbe3fSmrg _lt_disable_FC=yes 8327549e21daSmrgfi 8328ba6a1819Smrg 8329549e21daSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8330549e21daSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8331549e21daSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8332549e21daSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8333549e21daSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8334549e21daSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8335549e21daSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8336549e21daSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8337549e21daSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8338549e21daSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8339549e21daSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8340549e21daSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8341549e21daSmrg_LT_TAGVAR(module_cmds, $1)= 8342549e21daSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8343549e21daSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8344549e21daSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8345549e21daSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8346549e21daSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8347549e21daSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8348549e21daSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8349549e21daSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8350ba6a1819Smrg 83511bedbe3fSmrg# Source file extension for fc test sources. 83521bedbe3fSmrgac_ext=${ac_fc_srcext-f} 8353ba6a1819Smrg 83541bedbe3fSmrg# Object file extension for compiled fc test sources. 8355549e21daSmrgobjext=o 8356549e21daSmrg_LT_TAGVAR(objext, $1)=$objext 8357549e21daSmrg 8358549e21daSmrg# No sense in running all these tests if we already determined that 83591bedbe3fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 8360549e21daSmrg# are currently assumed to apply to all compilers on this platform, 8361549e21daSmrg# and will be corrupted by setting them based on a non-working compiler. 83621bedbe3fSmrgif test "$_lt_disable_FC" != yes; then 8363549e21daSmrg # Code to be used in simple compile tests 83641bedbe3fSmrg lt_simple_compile_test_code="\ 83651bedbe3fSmrg subroutine t 83661bedbe3fSmrg return 83671bedbe3fSmrg end 83681bedbe3fSmrg" 8369549e21daSmrg 8370549e21daSmrg # Code to be used in simple link tests 83711bedbe3fSmrg lt_simple_link_test_code="\ 83721bedbe3fSmrg program t 83731bedbe3fSmrg end 83741bedbe3fSmrg" 8375549e21daSmrg 8376549e21daSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8377549e21daSmrg _LT_TAG_COMPILER 8378549e21daSmrg 8379549e21daSmrg # save warnings/boilerplate of simple test code 8380549e21daSmrg _LT_COMPILER_BOILERPLATE 8381549e21daSmrg _LT_LINKER_BOILERPLATE 8382549e21daSmrg 8383549e21daSmrg # Allow CC to be a program name with arguments. 83841bedbe3fSmrg lt_save_CC="$CC" 8385549e21daSmrg lt_save_GCC=$GCC 83861bedbe3fSmrg lt_save_CFLAGS=$CFLAGS 83871bedbe3fSmrg CC=${FC-"f95"} 83881bedbe3fSmrg CFLAGS=$FCFLAGS 8389549e21daSmrg compiler=$CC 83901bedbe3fSmrg GCC=$ac_cv_fc_compiler_gnu 83911bedbe3fSmrg 8392549e21daSmrg _LT_TAGVAR(compiler, $1)=$CC 8393549e21daSmrg _LT_CC_BASENAME([$compiler]) 8394ba6a1819Smrg 8395549e21daSmrg if test -n "$compiler"; then 83961bedbe3fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83971bedbe3fSmrg AC_MSG_RESULT([$can_build_shared]) 8398ba6a1819Smrg 83991bedbe3fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 84001bedbe3fSmrg test "$can_build_shared" = "no" && enable_shared=no 8401ba6a1819Smrg 84021bedbe3fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 84031bedbe3fSmrg # are all built from PIC. 84041bedbe3fSmrg case $host_os in 84051bedbe3fSmrg aix3*) 84061bedbe3fSmrg test "$enable_shared" = yes && enable_static=no 84071bedbe3fSmrg if test -n "$RANLIB"; then 84081bedbe3fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 84091bedbe3fSmrg postinstall_cmds='$RANLIB $lib' 84101bedbe3fSmrg fi 84111bedbe3fSmrg ;; 84121bedbe3fSmrg aix[[4-9]]*) 84131bedbe3fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 84141bedbe3fSmrg test "$enable_shared" = yes && enable_static=no 84151bedbe3fSmrg fi 84161bedbe3fSmrg ;; 84171bedbe3fSmrg esac 84181bedbe3fSmrg AC_MSG_RESULT([$enable_shared]) 8419ba6a1819Smrg 84201bedbe3fSmrg AC_MSG_CHECKING([whether to build static libraries]) 84211bedbe3fSmrg # Make sure either enable_shared or enable_static is yes. 84221bedbe3fSmrg test "$enable_shared" = yes || enable_static=yes 84231bedbe3fSmrg AC_MSG_RESULT([$enable_static]) 8424ba6a1819Smrg 84251bedbe3fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 84261bedbe3fSmrg _LT_TAGVAR(LD, $1)="$LD" 8427ba6a1819Smrg 84281bedbe3fSmrg ## CAVEAT EMPTOR: 84291bedbe3fSmrg ## There is no encapsulation within the following macros, do not change 84301bedbe3fSmrg ## the running order or otherwise move them around unless you know exactly 84311bedbe3fSmrg ## what you are doing... 84321bedbe3fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 84331bedbe3fSmrg _LT_COMPILER_PIC($1) 84341bedbe3fSmrg _LT_COMPILER_C_O($1) 84351bedbe3fSmrg _LT_COMPILER_FILE_LOCKS($1) 84361bedbe3fSmrg _LT_LINKER_SHLIBS($1) 84371bedbe3fSmrg _LT_SYS_DYNAMIC_LINKER($1) 84381bedbe3fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8439549e21daSmrg 84401bedbe3fSmrg _LT_CONFIG($1) 84411bedbe3fSmrg fi # test -n "$compiler" 8442ba6a1819Smrg 84431bedbe3fSmrg GCC=$lt_save_GCC 84441bedbe3fSmrg CC=$lt_save_CC 84451bedbe3fSmrg CFLAGS=$lt_save_CFLAGS 84461bedbe3fSmrgfi # test "$_lt_disable_FC" != yes 8447ba6a1819Smrg 84481bedbe3fSmrgAC_LANG_POP 84491bedbe3fSmrg])# _LT_LANG_FC_CONFIG 8450ba6a1819Smrg 8451549e21daSmrg 84521bedbe3fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 84531bedbe3fSmrg# -------------------------- 84541bedbe3fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 84551bedbe3fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 84561bedbe3fSmrg# to write the compiler configuration to `libtool'. 84571bedbe3fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 84581bedbe3fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 84591bedbe3fSmrgAC_LANG_SAVE 8460ba6a1819Smrg 84611bedbe3fSmrg# Source file extension for Java test sources. 84621bedbe3fSmrgac_ext=java 8463ba6a1819Smrg 84641bedbe3fSmrg# Object file extension for compiled Java test sources. 84651bedbe3fSmrgobjext=o 84661bedbe3fSmrg_LT_TAGVAR(objext, $1)=$objext 8467549e21daSmrg 84681bedbe3fSmrg# Code to be used in simple compile tests 84691bedbe3fSmrglt_simple_compile_test_code="class foo {}" 8470549e21daSmrg 84711bedbe3fSmrg# Code to be used in simple link tests 84721bedbe3fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8473ba6a1819Smrg 84741bedbe3fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 84751bedbe3fSmrg_LT_TAG_COMPILER 8476549e21daSmrg 84771bedbe3fSmrg# save warnings/boilerplate of simple test code 84781bedbe3fSmrg_LT_COMPILER_BOILERPLATE 84791bedbe3fSmrg_LT_LINKER_BOILERPLATE 8480ba6a1819Smrg 84811bedbe3fSmrg# Allow CC to be a program name with arguments. 84821bedbe3fSmrglt_save_CC=$CC 84831bedbe3fSmrglt_save_CFLAGS=$CFLAGS 84841bedbe3fSmrglt_save_GCC=$GCC 84851bedbe3fSmrgGCC=yes 84861bedbe3fSmrgCC=${GCJ-"gcj"} 84871bedbe3fSmrgCFLAGS=$GCJFLAGS 84881bedbe3fSmrgcompiler=$CC 84891bedbe3fSmrg_LT_TAGVAR(compiler, $1)=$CC 84901bedbe3fSmrg_LT_TAGVAR(LD, $1)="$LD" 84911bedbe3fSmrg_LT_CC_BASENAME([$compiler]) 8492ba6a1819Smrg 84931bedbe3fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 84941bedbe3fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8495ba6a1819Smrg 84961bedbe3fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84971bedbe3fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84981bedbe3fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8499ba6a1819Smrg 85001bedbe3fSmrgif test -n "$compiler"; then 85011bedbe3fSmrg _LT_COMPILER_NO_RTTI($1) 85021bedbe3fSmrg _LT_COMPILER_PIC($1) 85031bedbe3fSmrg _LT_COMPILER_C_O($1) 85041bedbe3fSmrg _LT_COMPILER_FILE_LOCKS($1) 85051bedbe3fSmrg _LT_LINKER_SHLIBS($1) 85061bedbe3fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8507ba6a1819Smrg 85081bedbe3fSmrg _LT_CONFIG($1) 85091bedbe3fSmrgfi 8510ba6a1819Smrg 85111bedbe3fSmrgAC_LANG_RESTORE 8512ba6a1819Smrg 85131bedbe3fSmrgGCC=$lt_save_GCC 85141bedbe3fSmrgCC=$lt_save_CC 85151bedbe3fSmrgCFLAGS=$lt_save_CFLAGS 85161bedbe3fSmrg])# _LT_LANG_GCJ_CONFIG 8517ba6a1819Smrg 8518ba6a1819Smrg 85191bedbe3fSmrg# _LT_LANG_GO_CONFIG([TAG]) 85201bedbe3fSmrg# -------------------------- 85211bedbe3fSmrg# Ensure that the configuration variables for the GNU Go compiler 85221bedbe3fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85231bedbe3fSmrg# to write the compiler configuration to `libtool'. 85241bedbe3fSmrgm4_defun([_LT_LANG_GO_CONFIG], 85251bedbe3fSmrg[AC_REQUIRE([LT_PROG_GO])dnl 85261bedbe3fSmrgAC_LANG_SAVE 8527ba6a1819Smrg 85281bedbe3fSmrg# Source file extension for Go test sources. 85291bedbe3fSmrgac_ext=go 8530549e21daSmrg 85311bedbe3fSmrg# Object file extension for compiled Go test sources. 85321bedbe3fSmrgobjext=o 85331bedbe3fSmrg_LT_TAGVAR(objext, $1)=$objext 8534ba6a1819Smrg 85351bedbe3fSmrg# Code to be used in simple compile tests 85361bedbe3fSmrglt_simple_compile_test_code="package main; func main() { }" 8537549e21daSmrg 85381bedbe3fSmrg# Code to be used in simple link tests 85391bedbe3fSmrglt_simple_link_test_code='package main; func main() { }' 8540ba6a1819Smrg 85411bedbe3fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85421bedbe3fSmrg_LT_TAG_COMPILER 8543ba6a1819Smrg 85441bedbe3fSmrg# save warnings/boilerplate of simple test code 85451bedbe3fSmrg_LT_COMPILER_BOILERPLATE 85461bedbe3fSmrg_LT_LINKER_BOILERPLATE 8547549e21daSmrg 85481bedbe3fSmrg# Allow CC to be a program name with arguments. 85491bedbe3fSmrglt_save_CC=$CC 85501bedbe3fSmrglt_save_CFLAGS=$CFLAGS 85511bedbe3fSmrglt_save_GCC=$GCC 85521bedbe3fSmrgGCC=yes 85531bedbe3fSmrgCC=${GOC-"gccgo"} 85541bedbe3fSmrgCFLAGS=$GOFLAGS 85551bedbe3fSmrgcompiler=$CC 85561bedbe3fSmrg_LT_TAGVAR(compiler, $1)=$CC 85571bedbe3fSmrg_LT_TAGVAR(LD, $1)="$LD" 85581bedbe3fSmrg_LT_CC_BASENAME([$compiler]) 8559ba6a1819Smrg 85601bedbe3fSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 85611bedbe3fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8562ba6a1819Smrg 85631bedbe3fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 85641bedbe3fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 85651bedbe3fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8566549e21daSmrg 85671bedbe3fSmrgif test -n "$compiler"; then 85681bedbe3fSmrg _LT_COMPILER_NO_RTTI($1) 85691bedbe3fSmrg _LT_COMPILER_PIC($1) 85701bedbe3fSmrg _LT_COMPILER_C_O($1) 85711bedbe3fSmrg _LT_COMPILER_FILE_LOCKS($1) 85721bedbe3fSmrg _LT_LINKER_SHLIBS($1) 85731bedbe3fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8574549e21daSmrg 85751bedbe3fSmrg _LT_CONFIG($1) 85761bedbe3fSmrgfi 8577ba6a1819Smrg 85781bedbe3fSmrgAC_LANG_RESTORE 8579ba6a1819Smrg 85801bedbe3fSmrgGCC=$lt_save_GCC 85811bedbe3fSmrgCC=$lt_save_CC 85821bedbe3fSmrgCFLAGS=$lt_save_CFLAGS 85831bedbe3fSmrg])# _LT_LANG_GO_CONFIG 8584ba6a1819Smrg 8585549e21daSmrg 85861bedbe3fSmrg# _LT_LANG_RC_CONFIG([TAG]) 85871bedbe3fSmrg# ------------------------- 85881bedbe3fSmrg# Ensure that the configuration variables for the Windows resource compiler 85891bedbe3fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85901bedbe3fSmrg# to write the compiler configuration to `libtool'. 85911bedbe3fSmrgm4_defun([_LT_LANG_RC_CONFIG], 85921bedbe3fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 85931bedbe3fSmrgAC_LANG_SAVE 8594549e21daSmrg 85951bedbe3fSmrg# Source file extension for RC test sources. 85961bedbe3fSmrgac_ext=rc 8597ba6a1819Smrg 85981bedbe3fSmrg# Object file extension for compiled RC test sources. 85991bedbe3fSmrgobjext=o 86001bedbe3fSmrg_LT_TAGVAR(objext, $1)=$objext 8601ba6a1819Smrg 86021bedbe3fSmrg# Code to be used in simple compile tests 86031bedbe3fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8604ba6a1819Smrg 86051bedbe3fSmrg# Code to be used in simple link tests 86061bedbe3fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 8607ba6a1819Smrg 86081bedbe3fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86091bedbe3fSmrg_LT_TAG_COMPILER 8610ba6a1819Smrg 86111bedbe3fSmrg# save warnings/boilerplate of simple test code 86121bedbe3fSmrg_LT_COMPILER_BOILERPLATE 86131bedbe3fSmrg_LT_LINKER_BOILERPLATE 8614ba6a1819Smrg 86151bedbe3fSmrg# Allow CC to be a program name with arguments. 86161bedbe3fSmrglt_save_CC="$CC" 86171bedbe3fSmrglt_save_CFLAGS=$CFLAGS 86181bedbe3fSmrglt_save_GCC=$GCC 86191bedbe3fSmrgGCC= 86201bedbe3fSmrgCC=${RC-"windres"} 86211bedbe3fSmrgCFLAGS= 86221bedbe3fSmrgcompiler=$CC 86231bedbe3fSmrg_LT_TAGVAR(compiler, $1)=$CC 86241bedbe3fSmrg_LT_CC_BASENAME([$compiler]) 86251bedbe3fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 86261bedbe3fSmrg 86271bedbe3fSmrgif test -n "$compiler"; then 86281bedbe3fSmrg : 86291bedbe3fSmrg _LT_CONFIG($1) 86301bedbe3fSmrgfi 86311bedbe3fSmrg 86321bedbe3fSmrgGCC=$lt_save_GCC 86331bedbe3fSmrgAC_LANG_RESTORE 86341bedbe3fSmrgCC=$lt_save_CC 86351bedbe3fSmrgCFLAGS=$lt_save_CFLAGS 86361bedbe3fSmrg])# _LT_LANG_RC_CONFIG 86371bedbe3fSmrg 86381bedbe3fSmrg 86391bedbe3fSmrg# LT_PROG_GCJ 86401bedbe3fSmrg# ----------- 86411bedbe3fSmrgAC_DEFUN([LT_PROG_GCJ], 86421bedbe3fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 86431bedbe3fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 86441bedbe3fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 86451bedbe3fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 86461bedbe3fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 86471bedbe3fSmrg]) 8648ba6a1819Smrg 86491bedbe3fSmrg# Old name: 86501bedbe3fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 86511bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 86521bedbe3fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8653ba6a1819Smrg 8654549e21daSmrg 86551bedbe3fSmrg# LT_PROG_GO 86561bedbe3fSmrg# ---------- 86571bedbe3fSmrgAC_DEFUN([LT_PROG_GO], 86581bedbe3fSmrg[AC_CHECK_TOOL(GOC, gccgo,) 86591bedbe3fSmrg]) 8660549e21daSmrg 8661549e21daSmrg 86621bedbe3fSmrg# LT_PROG_RC 86631bedbe3fSmrg# ---------- 86641bedbe3fSmrgAC_DEFUN([LT_PROG_RC], 86651bedbe3fSmrg[AC_CHECK_TOOL(RC, windres,) 86661bedbe3fSmrg]) 8667ba6a1819Smrg 86681bedbe3fSmrg# Old name: 86691bedbe3fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 86701bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 86711bedbe3fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8672ba6a1819Smrg 8673549e21daSmrg 86741bedbe3fSmrg# _LT_DECL_EGREP 86751bedbe3fSmrg# -------------- 86761bedbe3fSmrg# If we don't have a new enough Autoconf to choose the best grep 86771bedbe3fSmrg# available, choose the one first in the user's PATH. 86781bedbe3fSmrgm4_defun([_LT_DECL_EGREP], 86791bedbe3fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 86801bedbe3fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 86811bedbe3fSmrgtest -z "$GREP" && GREP=grep 86821bedbe3fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 86831bedbe3fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 86841bedbe3fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 86851bedbe3fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 86861bedbe3fSmrgAC_SUBST([GREP]) 86871bedbe3fSmrg]) 8688549e21daSmrg 8689549e21daSmrg 86901bedbe3fSmrg# _LT_DECL_OBJDUMP 86911bedbe3fSmrg# -------------- 86921bedbe3fSmrg# If we don't have a new enough Autoconf to choose the best objdump 86931bedbe3fSmrg# available, choose the one first in the user's PATH. 86941bedbe3fSmrgm4_defun([_LT_DECL_OBJDUMP], 86951bedbe3fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 86961bedbe3fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 86971bedbe3fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 86981bedbe3fSmrgAC_SUBST([OBJDUMP]) 86991bedbe3fSmrg]) 8700ba6a1819Smrg 87011bedbe3fSmrg# _LT_DECL_DLLTOOL 87021bedbe3fSmrg# ---------------- 87031bedbe3fSmrg# Ensure DLLTOOL variable is set. 87041bedbe3fSmrgm4_defun([_LT_DECL_DLLTOOL], 87051bedbe3fSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 87061bedbe3fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 87071bedbe3fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 87081bedbe3fSmrgAC_SUBST([DLLTOOL]) 87091bedbe3fSmrg]) 8710ba6a1819Smrg 87111bedbe3fSmrg# _LT_DECL_SED 87121bedbe3fSmrg# ------------ 87131bedbe3fSmrg# Check for a fully-functional sed program, that truncates 87141bedbe3fSmrg# as few characters as possible. Prefer GNU sed if found. 87151bedbe3fSmrgm4_defun([_LT_DECL_SED], 87161bedbe3fSmrg[AC_PROG_SED 87171bedbe3fSmrgtest -z "$SED" && SED=sed 87181bedbe3fSmrgXsed="$SED -e 1s/^X//" 87191bedbe3fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 87201bedbe3fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 87211bedbe3fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 87221bedbe3fSmrg])# _LT_DECL_SED 8723ba6a1819Smrg 87241bedbe3fSmrgm4_ifndef([AC_PROG_SED], [ 87251bedbe3fSmrg# NOTE: This macro has been submitted for inclusion into # 87261bedbe3fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 87271bedbe3fSmrg# a released version of Autoconf we should remove this # 87281bedbe3fSmrg# macro and use it instead. # 8729549e21daSmrg 87301bedbe3fSmrgm4_defun([AC_PROG_SED], 87311bedbe3fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 87321bedbe3fSmrgAC_CACHE_VAL(lt_cv_path_SED, 87331bedbe3fSmrg[# Loop through the user's path and test for sed and gsed. 87341bedbe3fSmrg# Then use that list of sed's as ones to test for truncation. 87351bedbe3fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 87361bedbe3fSmrgfor as_dir in $PATH 87371bedbe3fSmrgdo 87381bedbe3fSmrg IFS=$as_save_IFS 87391bedbe3fSmrg test -z "$as_dir" && as_dir=. 87401bedbe3fSmrg for lt_ac_prog in sed gsed; do 87411bedbe3fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 87421bedbe3fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 87431bedbe3fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 87441bedbe3fSmrg fi 87451bedbe3fSmrg done 87461bedbe3fSmrg done 87471bedbe3fSmrgdone 87481bedbe3fSmrgIFS=$as_save_IFS 87491bedbe3fSmrglt_ac_max=0 87501bedbe3fSmrglt_ac_count=0 87511bedbe3fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 87521bedbe3fSmrg# along with /bin/sed that truncates output. 87531bedbe3fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 87541bedbe3fSmrg test ! -f $lt_ac_sed && continue 87551bedbe3fSmrg cat /dev/null > conftest.in 87561bedbe3fSmrg lt_ac_count=0 87571bedbe3fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 87581bedbe3fSmrg # Check for GNU sed and select it if it is found. 87591bedbe3fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 87601bedbe3fSmrg lt_cv_path_SED=$lt_ac_sed 87611bedbe3fSmrg break 87621bedbe3fSmrg fi 87631bedbe3fSmrg while true; do 87641bedbe3fSmrg cat conftest.in conftest.in >conftest.tmp 87651bedbe3fSmrg mv conftest.tmp conftest.in 87661bedbe3fSmrg cp conftest.in conftest.nl 87671bedbe3fSmrg echo >>conftest.nl 87681bedbe3fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 87691bedbe3fSmrg cmp -s conftest.out conftest.nl || break 87701bedbe3fSmrg # 10000 chars as input seems more than enough 87711bedbe3fSmrg test $lt_ac_count -gt 10 && break 87721bedbe3fSmrg lt_ac_count=`expr $lt_ac_count + 1` 87731bedbe3fSmrg if test $lt_ac_count -gt $lt_ac_max; then 87741bedbe3fSmrg lt_ac_max=$lt_ac_count 87751bedbe3fSmrg lt_cv_path_SED=$lt_ac_sed 87761bedbe3fSmrg fi 87771bedbe3fSmrg done 87781bedbe3fSmrgdone 87791bedbe3fSmrg]) 87801bedbe3fSmrgSED=$lt_cv_path_SED 87811bedbe3fSmrgAC_SUBST([SED]) 87821bedbe3fSmrgAC_MSG_RESULT([$SED]) 87831bedbe3fSmrg])#AC_PROG_SED 87841bedbe3fSmrg])#m4_ifndef 8785ba6a1819Smrg 87861bedbe3fSmrg# Old name: 87871bedbe3fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 87881bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 87891bedbe3fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8790ba6a1819Smrg 8791ba6a1819Smrg 87921bedbe3fSmrg# _LT_CHECK_SHELL_FEATURES 87931bedbe3fSmrg# ------------------------ 87941bedbe3fSmrg# Find out whether the shell is Bourne or XSI compatible, 87951bedbe3fSmrg# or has some other useful features. 87961bedbe3fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 87971bedbe3fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 87981bedbe3fSmrg# Try some XSI features 87991bedbe3fSmrgxsi_shell=no 88001bedbe3fSmrg( _lt_dummy="a/b/c" 88011bedbe3fSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 88021bedbe3fSmrg = c,a/b,b/c, \ 88031bedbe3fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 88041bedbe3fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 88051bedbe3fSmrg && xsi_shell=yes 88061bedbe3fSmrgAC_MSG_RESULT([$xsi_shell]) 88071bedbe3fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8808549e21daSmrg 88091bedbe3fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 88101bedbe3fSmrglt_shell_append=no 88111bedbe3fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 88121bedbe3fSmrg >/dev/null 2>&1 \ 88131bedbe3fSmrg && lt_shell_append=yes 88141bedbe3fSmrgAC_MSG_RESULT([$lt_shell_append]) 88151bedbe3fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8816549e21daSmrg 88171bedbe3fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 88181bedbe3fSmrg lt_unset=unset 88191bedbe3fSmrgelse 88201bedbe3fSmrg lt_unset=false 88211bedbe3fSmrgfi 88221bedbe3fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8823549e21daSmrg 88241bedbe3fSmrg# test EBCDIC or ASCII 88251bedbe3fSmrgcase `echo X|tr X '\101'` in 88261bedbe3fSmrg A) # ASCII based system 88271bedbe3fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 88281bedbe3fSmrg lt_SP2NL='tr \040 \012' 88291bedbe3fSmrg lt_NL2SP='tr \015\012 \040\040' 88301bedbe3fSmrg ;; 88311bedbe3fSmrg *) # EBCDIC based system 88321bedbe3fSmrg lt_SP2NL='tr \100 \n' 88331bedbe3fSmrg lt_NL2SP='tr \r\n \100\100' 88341bedbe3fSmrg ;; 88351bedbe3fSmrgesac 88361bedbe3fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 88371bedbe3fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 88381bedbe3fSmrg])# _LT_CHECK_SHELL_FEATURES 8839ba6a1819Smrg 8840ba6a1819Smrg 88411bedbe3fSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 88421bedbe3fSmrg# ------------------------------------------------------ 88431bedbe3fSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 88441bedbe3fSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 88451bedbe3fSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 88461bedbe3fSmrg[dnl { 88471bedbe3fSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 88481bedbe3fSmrg$1 ()\ 88491bedbe3fSmrg{\ 88501bedbe3fSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 88511bedbe3fSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 88521bedbe3fSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 88531bedbe3fSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 88541bedbe3fSmrgtest 0 -eq $? || _lt_function_replace_fail=: 88551bedbe3fSmrg]) 8856ba6a1819Smrg 8857ba6a1819Smrg 88581bedbe3fSmrg# _LT_PROG_REPLACE_SHELLFNS 88591bedbe3fSmrg# ------------------------- 88601bedbe3fSmrg# Replace existing portable implementations of several shell functions with 88611bedbe3fSmrg# equivalent extended shell implementations where those features are available.. 88621bedbe3fSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 88631bedbe3fSmrg[if test x"$xsi_shell" = xyes; then 88641bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 88651bedbe3fSmrg case ${1} in 88661bedbe3fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88671bedbe3fSmrg * ) func_dirname_result="${3}" ;; 88681bedbe3fSmrg esac]) 88691bedbe3fSmrg 88701bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 88711bedbe3fSmrg func_basename_result="${1##*/}"]) 88721bedbe3fSmrg 88731bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 88741bedbe3fSmrg case ${1} in 88751bedbe3fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88761bedbe3fSmrg * ) func_dirname_result="${3}" ;; 88771bedbe3fSmrg esac 88781bedbe3fSmrg func_basename_result="${1##*/}"]) 8879ba6a1819Smrg 88801bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 88811bedbe3fSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 88821bedbe3fSmrg # positional parameters, so assign one to ordinary parameter first. 88831bedbe3fSmrg func_stripname_result=${3} 88841bedbe3fSmrg func_stripname_result=${func_stripname_result#"${1}"} 88851bedbe3fSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 8886ba6a1819Smrg 88871bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 88881bedbe3fSmrg func_split_long_opt_name=${1%%=*} 88891bedbe3fSmrg func_split_long_opt_arg=${1#*=}]) 8890ba6a1819Smrg 88911bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 88921bedbe3fSmrg func_split_short_opt_arg=${1#??} 88931bedbe3fSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8894ba6a1819Smrg 88951bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 88961bedbe3fSmrg case ${1} in 88971bedbe3fSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 88981bedbe3fSmrg *) func_lo2o_result=${1} ;; 88991bedbe3fSmrg esac]) 8900549e21daSmrg 89011bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8902549e21daSmrg 89031bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8904549e21daSmrg 89051bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 89061bedbe3fSmrgfi 8907549e21daSmrg 89081bedbe3fSmrgif test x"$lt_shell_append" = xyes; then 89091bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8910ba6a1819Smrg 89111bedbe3fSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 89121bedbe3fSmrg func_quote_for_eval "${2}" 89131bedbe3fSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 89141bedbe3fSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8915ba6a1819Smrg 89161bedbe3fSmrg # Save a `func_append' function call where possible by direct use of '+=' 89171bedbe3fSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 89181bedbe3fSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89191bedbe3fSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89201bedbe3fSmrg test 0 -eq $? || _lt_function_replace_fail=: 89211bedbe3fSmrgelse 89221bedbe3fSmrg # Save a `func_append' function call even when '+=' is not available 89231bedbe3fSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 89241bedbe3fSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89251bedbe3fSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89261bedbe3fSmrg test 0 -eq $? || _lt_function_replace_fail=: 89271bedbe3fSmrgfi 8928ba6a1819Smrg 89291bedbe3fSmrgif test x"$_lt_function_replace_fail" = x":"; then 89301bedbe3fSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 89311bedbe3fSmrgfi 89321bedbe3fSmrg]) 8933ba6a1819Smrg 89341bedbe3fSmrg# _LT_PATH_CONVERSION_FUNCTIONS 89351bedbe3fSmrg# ----------------------------- 89361bedbe3fSmrg# Determine which file name conversion functions should be used by 89371bedbe3fSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 89381bedbe3fSmrg# for certain cross-compile configurations and native mingw. 89391bedbe3fSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 89401bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 89411bedbe3fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 89421bedbe3fSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 89431bedbe3fSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 89441bedbe3fSmrg[case $host in 89451bedbe3fSmrg *-*-mingw* ) 89461bedbe3fSmrg case $build in 89471bedbe3fSmrg *-*-mingw* ) # actually msys 89481bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 89491bedbe3fSmrg ;; 89501bedbe3fSmrg *-*-cygwin* ) 89511bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 89521bedbe3fSmrg ;; 89531bedbe3fSmrg * ) # otherwise, assume *nix 89541bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 89551bedbe3fSmrg ;; 89561bedbe3fSmrg esac 89571bedbe3fSmrg ;; 89581bedbe3fSmrg *-*-cygwin* ) 89591bedbe3fSmrg case $build in 89601bedbe3fSmrg *-*-mingw* ) # actually msys 89611bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 89621bedbe3fSmrg ;; 89631bedbe3fSmrg *-*-cygwin* ) 89641bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89651bedbe3fSmrg ;; 89661bedbe3fSmrg * ) # otherwise, assume *nix 89671bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 89681bedbe3fSmrg ;; 89691bedbe3fSmrg esac 89701bedbe3fSmrg ;; 89711bedbe3fSmrg * ) # unhandled hosts (and "normal" native builds) 89721bedbe3fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89731bedbe3fSmrg ;; 89741bedbe3fSmrgesac 8975549e21daSmrg]) 89761bedbe3fSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 89771bedbe3fSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 89781bedbe3fSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 89791bedbe3fSmrg [0], [convert $build file names to $host format])dnl 89801bedbe3fSmrg 89811bedbe3fSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 89821bedbe3fSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 89831bedbe3fSmrg[#assume ordinary cross tools, or native build. 89841bedbe3fSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 89851bedbe3fSmrgcase $host in 89861bedbe3fSmrg *-*-mingw* ) 89871bedbe3fSmrg case $build in 89881bedbe3fSmrg *-*-mingw* ) # actually msys 89891bedbe3fSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 89901bedbe3fSmrg ;; 89911bedbe3fSmrg esac 89921bedbe3fSmrg ;; 89931bedbe3fSmrgesac 89941bedbe3fSmrg]) 89951bedbe3fSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 89961bedbe3fSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 89971bedbe3fSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 89981bedbe3fSmrg [0], [convert $build files to toolchain format])dnl 89991bedbe3fSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 9000ba6a1819Smrg 90011bedbe3fSmrg# Helper functions for option handling. -*- Autoconf -*- 90021bedbe3fSmrg# 90031bedbe3fSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 90041bedbe3fSmrg# Inc. 90051bedbe3fSmrg# Written by Gary V. Vaughan, 2004 90061bedbe3fSmrg# 90071bedbe3fSmrg# This file is free software; the Free Software Foundation gives 90081bedbe3fSmrg# unlimited permission to copy and/or distribute it, with or without 90091bedbe3fSmrg# modifications, as long as this notice is preserved. 9010ba6a1819Smrg 90111bedbe3fSmrg# serial 7 ltoptions.m4 9012ba6a1819Smrg 90131bedbe3fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 90141bedbe3fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9015ba6a1819Smrg 9016ba6a1819Smrg 90171bedbe3fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 90181bedbe3fSmrg# ------------------------------------------ 90191bedbe3fSmrgm4_define([_LT_MANGLE_OPTION], 90201bedbe3fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9021ba6a1819Smrg 9022ba6a1819Smrg 90231bedbe3fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 90241bedbe3fSmrg# --------------------------------------- 90251bedbe3fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 90261bedbe3fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 90271bedbe3fSmrg# saved as a flag. 90281bedbe3fSmrgm4_define([_LT_SET_OPTION], 90291bedbe3fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 90301bedbe3fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 90311bedbe3fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 90321bedbe3fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 90331bedbe3fSmrg]) 9034ba6a1819Smrg 9035ba6a1819Smrg 90361bedbe3fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 90371bedbe3fSmrg# ------------------------------------------------------------ 90381bedbe3fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 90391bedbe3fSmrgm4_define([_LT_IF_OPTION], 90401bedbe3fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9041ba6a1819Smrg 9042ba6a1819Smrg 90431bedbe3fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 90441bedbe3fSmrg# ------------------------------------------------------- 90451bedbe3fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 90461bedbe3fSmrg# are set. 90471bedbe3fSmrgm4_define([_LT_UNLESS_OPTIONS], 90481bedbe3fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90491bedbe3fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 90501bedbe3fSmrg [m4_define([$0_found])])])[]dnl 90511bedbe3fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 90521bedbe3fSmrg])[]dnl 90531bedbe3fSmrg]) 9054549e21daSmrg 9055549e21daSmrg 90561bedbe3fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 90571bedbe3fSmrg# ---------------------------------------- 90581bedbe3fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 90591bedbe3fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 90601bedbe3fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 90611bedbe3fSmrg# the unknown option and exit. 90621bedbe3fSmrgm4_defun([_LT_SET_OPTIONS], 90631bedbe3fSmrg[# Set options 90641bedbe3fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90651bedbe3fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 9066549e21daSmrg 90671bedbe3fSmrgm4_if([$1],[LT_INIT],[ 90681bedbe3fSmrg dnl 90691bedbe3fSmrg dnl Simply set some default values (i.e off) if boolean options were not 90701bedbe3fSmrg dnl specified: 90711bedbe3fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 90721bedbe3fSmrg ]) 90731bedbe3fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 90741bedbe3fSmrg ]) 90751bedbe3fSmrg dnl 90761bedbe3fSmrg dnl If no reference was made to various pairs of opposing options, then 90771bedbe3fSmrg dnl we run the default mode handler for the pair. For example, if neither 90781bedbe3fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 90791bedbe3fSmrg dnl archives by default: 90801bedbe3fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 90811bedbe3fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 90821bedbe3fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 90831bedbe3fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 90841bedbe3fSmrg [_LT_ENABLE_FAST_INSTALL]) 90851bedbe3fSmrg ]) 90861bedbe3fSmrg])# _LT_SET_OPTIONS 9087ba6a1819Smrg 9088549e21daSmrg 90891bedbe3fSmrg 90901bedbe3fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 90911bedbe3fSmrg# ----------------------------------------- 90921bedbe3fSmrgm4_define([_LT_MANGLE_DEFUN], 90931bedbe3fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 90941bedbe3fSmrg 90951bedbe3fSmrg 90961bedbe3fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 90971bedbe3fSmrg# ----------------------------------------------- 90981bedbe3fSmrgm4_define([LT_OPTION_DEFINE], 90991bedbe3fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 91001bedbe3fSmrg])# LT_OPTION_DEFINE 91011bedbe3fSmrg 91021bedbe3fSmrg 91031bedbe3fSmrg# dlopen 91041bedbe3fSmrg# ------ 91051bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9106ba6a1819Smrg]) 9107549e21daSmrg 91081bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 91091bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 91101bedbe3fSmrgAC_DIAGNOSE([obsolete], 91111bedbe3fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91121bedbe3fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 91131bedbe3fSmrg]) 91141bedbe3fSmrg 91151bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 91161bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 91171bedbe3fSmrg 91181bedbe3fSmrg 91191bedbe3fSmrg# win32-dll 91201bedbe3fSmrg# --------- 91211bedbe3fSmrg# Declare package support for building win32 dll's. 91221bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 91231bedbe3fSmrg[enable_win32_dll=yes 9124549e21daSmrg 91251bedbe3fSmrgcase $host in 91261bedbe3fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 91271bedbe3fSmrg AC_CHECK_TOOL(AS, as, false) 91281bedbe3fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 91291bedbe3fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 91301bedbe3fSmrg ;; 91311bedbe3fSmrgesac 9132549e21daSmrg 91331bedbe3fSmrgtest -z "$AS" && AS=as 91341bedbe3fSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9135ba6a1819Smrg 91361bedbe3fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 91371bedbe3fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9138ba6a1819Smrg 91391bedbe3fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 91401bedbe3fSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 91411bedbe3fSmrg])# win32-dll 9142ba6a1819Smrg 91431bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 91441bedbe3fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 91451bedbe3fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 91461bedbe3fSmrgAC_DIAGNOSE([obsolete], 91471bedbe3fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91481bedbe3fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 91491bedbe3fSmrg]) 9150549e21daSmrg 91511bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 91521bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9153549e21daSmrg 9154549e21daSmrg 91551bedbe3fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 91561bedbe3fSmrg# ---------------------------- 91571bedbe3fSmrg# implement the --enable-shared flag, and supports the `shared' and 91581bedbe3fSmrg# `disable-shared' LT_INIT options. 91591bedbe3fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 91601bedbe3fSmrgm4_define([_LT_ENABLE_SHARED], 91611bedbe3fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 91621bedbe3fSmrgAC_ARG_ENABLE([shared], 91631bedbe3fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 91641bedbe3fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 91651bedbe3fSmrg [p=${PACKAGE-default} 91661bedbe3fSmrg case $enableval in 91671bedbe3fSmrg yes) enable_shared=yes ;; 91681bedbe3fSmrg no) enable_shared=no ;; 91691bedbe3fSmrg *) 91701bedbe3fSmrg enable_shared=no 91711bedbe3fSmrg # Look at the argument we got. We use all the common list separators. 91721bedbe3fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 91731bedbe3fSmrg for pkg in $enableval; do 91741bedbe3fSmrg IFS="$lt_save_ifs" 91751bedbe3fSmrg if test "X$pkg" = "X$p"; then 91761bedbe3fSmrg enable_shared=yes 91771bedbe3fSmrg fi 91781bedbe3fSmrg done 91791bedbe3fSmrg IFS="$lt_save_ifs" 91801bedbe3fSmrg ;; 91811bedbe3fSmrg esac], 91821bedbe3fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9183549e21daSmrg 91841bedbe3fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 91851bedbe3fSmrg [Whether or not to build shared libraries]) 91861bedbe3fSmrg])# _LT_ENABLE_SHARED 9187549e21daSmrg 91881bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 91891bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9190ba6a1819Smrg 91911bedbe3fSmrg# Old names: 91921bedbe3fSmrgAC_DEFUN([AC_ENABLE_SHARED], 91931bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 91941bedbe3fSmrg]) 9195549e21daSmrg 91961bedbe3fSmrgAC_DEFUN([AC_DISABLE_SHARED], 91971bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 91981bedbe3fSmrg]) 9199549e21daSmrg 92001bedbe3fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 92011bedbe3fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9202549e21daSmrg 92031bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 92041bedbe3fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 92051bedbe3fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9206549e21daSmrg 9207549e21daSmrg 9208549e21daSmrg 92091bedbe3fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 92101bedbe3fSmrg# ---------------------------- 92111bedbe3fSmrg# implement the --enable-static flag, and support the `static' and 92121bedbe3fSmrg# `disable-static' LT_INIT options. 92131bedbe3fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92141bedbe3fSmrgm4_define([_LT_ENABLE_STATIC], 92151bedbe3fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 92161bedbe3fSmrgAC_ARG_ENABLE([static], 92171bedbe3fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 92181bedbe3fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 92191bedbe3fSmrg [p=${PACKAGE-default} 92201bedbe3fSmrg case $enableval in 92211bedbe3fSmrg yes) enable_static=yes ;; 92221bedbe3fSmrg no) enable_static=no ;; 92231bedbe3fSmrg *) 92241bedbe3fSmrg enable_static=no 92251bedbe3fSmrg # Look at the argument we got. We use all the common list separators. 92261bedbe3fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92271bedbe3fSmrg for pkg in $enableval; do 92281bedbe3fSmrg IFS="$lt_save_ifs" 92291bedbe3fSmrg if test "X$pkg" = "X$p"; then 92301bedbe3fSmrg enable_static=yes 92311bedbe3fSmrg fi 92321bedbe3fSmrg done 92331bedbe3fSmrg IFS="$lt_save_ifs" 92341bedbe3fSmrg ;; 92351bedbe3fSmrg esac], 92361bedbe3fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9237549e21daSmrg 92381bedbe3fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 92391bedbe3fSmrg [Whether or not to build static libraries]) 92401bedbe3fSmrg])# _LT_ENABLE_STATIC 9241549e21daSmrg 92421bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 92431bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9244549e21daSmrg 92451bedbe3fSmrg# Old names: 92461bedbe3fSmrgAC_DEFUN([AC_ENABLE_STATIC], 92471bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 92481bedbe3fSmrg]) 9249549e21daSmrg 92501bedbe3fSmrgAC_DEFUN([AC_DISABLE_STATIC], 92511bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 92521bedbe3fSmrg]) 9253549e21daSmrg 92541bedbe3fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 92551bedbe3fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9256549e21daSmrg 92571bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 92581bedbe3fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 92591bedbe3fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9260549e21daSmrg 9261549e21daSmrg 9262549e21daSmrg 92631bedbe3fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 92641bedbe3fSmrg# ---------------------------------- 92651bedbe3fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 92661bedbe3fSmrg# and `disable-fast-install' LT_INIT options. 92671bedbe3fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92681bedbe3fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 92691bedbe3fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 92701bedbe3fSmrgAC_ARG_ENABLE([fast-install], 92711bedbe3fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 92721bedbe3fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 92731bedbe3fSmrg [p=${PACKAGE-default} 92741bedbe3fSmrg case $enableval in 92751bedbe3fSmrg yes) enable_fast_install=yes ;; 92761bedbe3fSmrg no) enable_fast_install=no ;; 92771bedbe3fSmrg *) 92781bedbe3fSmrg enable_fast_install=no 92791bedbe3fSmrg # Look at the argument we got. We use all the common list separators. 92801bedbe3fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92811bedbe3fSmrg for pkg in $enableval; do 92821bedbe3fSmrg IFS="$lt_save_ifs" 92831bedbe3fSmrg if test "X$pkg" = "X$p"; then 92841bedbe3fSmrg enable_fast_install=yes 92851bedbe3fSmrg fi 92861bedbe3fSmrg done 92871bedbe3fSmrg IFS="$lt_save_ifs" 92881bedbe3fSmrg ;; 92891bedbe3fSmrg esac], 92901bedbe3fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9291549e21daSmrg 92921bedbe3fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 92931bedbe3fSmrg [Whether or not to optimize for fast installation])dnl 92941bedbe3fSmrg])# _LT_ENABLE_FAST_INSTALL 9295549e21daSmrg 92961bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 92971bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9298549e21daSmrg 92991bedbe3fSmrg# Old names: 93001bedbe3fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 93011bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 93021bedbe3fSmrgAC_DIAGNOSE([obsolete], 93031bedbe3fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93041bedbe3fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 93051bedbe3fSmrg]) 9306549e21daSmrg 93071bedbe3fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 93081bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 93091bedbe3fSmrgAC_DIAGNOSE([obsolete], 93101bedbe3fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93111bedbe3fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 93121bedbe3fSmrg]) 9313549e21daSmrg 93141bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 93151bedbe3fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 93161bedbe3fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9317549e21daSmrg 9318549e21daSmrg 93191bedbe3fSmrg# _LT_WITH_PIC([MODE]) 93201bedbe3fSmrg# -------------------- 93211bedbe3fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 93221bedbe3fSmrg# LT_INIT options. 93231bedbe3fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 93241bedbe3fSmrgm4_define([_LT_WITH_PIC], 93251bedbe3fSmrg[AC_ARG_WITH([pic], 93261bedbe3fSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 93271bedbe3fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 93281bedbe3fSmrg [lt_p=${PACKAGE-default} 93291bedbe3fSmrg case $withval in 93301bedbe3fSmrg yes|no) pic_mode=$withval ;; 93311bedbe3fSmrg *) 93321bedbe3fSmrg pic_mode=default 93331bedbe3fSmrg # Look at the argument we got. We use all the common list separators. 93341bedbe3fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93351bedbe3fSmrg for lt_pkg in $withval; do 93361bedbe3fSmrg IFS="$lt_save_ifs" 93371bedbe3fSmrg if test "X$lt_pkg" = "X$lt_p"; then 93381bedbe3fSmrg pic_mode=yes 9339ba6a1819Smrg fi 93401bedbe3fSmrg done 93411bedbe3fSmrg IFS="$lt_save_ifs" 93421bedbe3fSmrg ;; 93431bedbe3fSmrg esac], 93441bedbe3fSmrg [pic_mode=default]) 9345549e21daSmrg 93461bedbe3fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9347549e21daSmrg 93481bedbe3fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 93491bedbe3fSmrg])# _LT_WITH_PIC 9350549e21daSmrg 93511bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 93521bedbe3fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9353549e21daSmrg 93541bedbe3fSmrg# Old name: 93551bedbe3fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 93561bedbe3fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 93571bedbe3fSmrgAC_DIAGNOSE([obsolete], 93581bedbe3fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 93591bedbe3fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 93601bedbe3fSmrg]) 9361549e21daSmrg 93621bedbe3fSmrgdnl aclocal-1.4 backwards compatibility: 93631bedbe3fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9364ba6a1819Smrg 9365ba6a1819Smrg 93661bedbe3fSmrgm4_define([_LTDL_MODE], []) 93671bedbe3fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 93681bedbe3fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 93691bedbe3fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 93701bedbe3fSmrg [m4_define([_LTDL_MODE], [recursive])]) 93711bedbe3fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 93721bedbe3fSmrg [m4_define([_LTDL_MODE], [subproject])]) 9373ba6a1819Smrg 93741bedbe3fSmrgm4_define([_LTDL_TYPE], []) 93751bedbe3fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 93761bedbe3fSmrg [m4_define([_LTDL_TYPE], [installable])]) 93771bedbe3fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 93781bedbe3fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 9379ba6a1819Smrg 93801bedbe3fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 93811bedbe3fSmrg# 93821bedbe3fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 93831bedbe3fSmrg# Written by Gary V. Vaughan, 2004 93841bedbe3fSmrg# 93851bedbe3fSmrg# This file is free software; the Free Software Foundation gives 93861bedbe3fSmrg# unlimited permission to copy and/or distribute it, with or without 93871bedbe3fSmrg# modifications, as long as this notice is preserved. 9388ba6a1819Smrg 93891bedbe3fSmrg# serial 6 ltsugar.m4 9390ba6a1819Smrg 93911bedbe3fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 93921bedbe3fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9393ba6a1819Smrg 9394ba6a1819Smrg 93951bedbe3fSmrg# lt_join(SEP, ARG1, [ARG2...]) 93961bedbe3fSmrg# ----------------------------- 93971bedbe3fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 93981bedbe3fSmrg# associated separator. 93991bedbe3fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 94001bedbe3fSmrg# versions in m4sugar had bugs. 94011bedbe3fSmrgm4_define([lt_join], 94021bedbe3fSmrg[m4_if([$#], [1], [], 94031bedbe3fSmrg [$#], [2], [[$2]], 94041bedbe3fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 94051bedbe3fSmrgm4_define([_lt_join], 94061bedbe3fSmrg[m4_if([$#$2], [2], [], 94071bedbe3fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9408ba6a1819Smrg 9409ba6a1819Smrg 94101bedbe3fSmrg# lt_car(LIST) 94111bedbe3fSmrg# lt_cdr(LIST) 94121bedbe3fSmrg# ------------ 94131bedbe3fSmrg# Manipulate m4 lists. 94141bedbe3fSmrg# These macros are necessary as long as will still need to support 94151bedbe3fSmrg# Autoconf-2.59 which quotes differently. 94161bedbe3fSmrgm4_define([lt_car], [[$1]]) 94171bedbe3fSmrgm4_define([lt_cdr], 94181bedbe3fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 94191bedbe3fSmrg [$#], 1, [], 94201bedbe3fSmrg [m4_dquote(m4_shift($@))])]) 94211bedbe3fSmrgm4_define([lt_unquote], $1) 94221bedbe3fSmrg 94231bedbe3fSmrg 94241bedbe3fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 94251bedbe3fSmrg# ------------------------------------------ 94261bedbe3fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 94271bedbe3fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 94281bedbe3fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 94291bedbe3fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 94301bedbe3fSmrg# than defined and empty). 94311bedbe3fSmrg# 94321bedbe3fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 94331bedbe3fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 94341bedbe3fSmrgm4_define([lt_append], 94351bedbe3fSmrg[m4_define([$1], 94361bedbe3fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9437ba6a1819Smrg 9438ba6a1819Smrg 9439ba6a1819Smrg 94401bedbe3fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 94411bedbe3fSmrg# ---------------------------------------------------------- 94421bedbe3fSmrg# Produce a SEP delimited list of all paired combinations of elements of 94431bedbe3fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 94441bedbe3fSmrg# has the form PREFIXmINFIXSUFFIXn. 94451bedbe3fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 94461bedbe3fSmrgm4_define([lt_combine], 94471bedbe3fSmrg[m4_if(m4_eval([$# > 3]), [1], 94481bedbe3fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 94491bedbe3fSmrg[[m4_foreach([_Lt_prefix], [$2], 94501bedbe3fSmrg [m4_foreach([_Lt_suffix], 94511bedbe3fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 94521bedbe3fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9453ba6a1819Smrg 9454ba6a1819Smrg 94551bedbe3fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 94561bedbe3fSmrg# ----------------------------------------------------------------------- 94571bedbe3fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 94581bedbe3fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 94591bedbe3fSmrgm4_define([lt_if_append_uniq], 94601bedbe3fSmrg[m4_ifdef([$1], 94611bedbe3fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 94621bedbe3fSmrg [lt_append([$1], [$2], [$3])$4], 94631bedbe3fSmrg [$5])], 94641bedbe3fSmrg [lt_append([$1], [$2], [$3])$4])]) 9465ba6a1819Smrg 9466ba6a1819Smrg 94671bedbe3fSmrg# lt_dict_add(DICT, KEY, VALUE) 94681bedbe3fSmrg# ----------------------------- 94691bedbe3fSmrgm4_define([lt_dict_add], 94701bedbe3fSmrg[m4_define([$1($2)], [$3])]) 9471ba6a1819Smrg 9472ba6a1819Smrg 94731bedbe3fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 94741bedbe3fSmrg# -------------------------------------------- 94751bedbe3fSmrgm4_define([lt_dict_add_subkey], 94761bedbe3fSmrg[m4_define([$1($2:$3)], [$4])]) 9477ba6a1819Smrg 9478ba6a1819Smrg 94791bedbe3fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 94801bedbe3fSmrg# ---------------------------------- 94811bedbe3fSmrgm4_define([lt_dict_fetch], 94821bedbe3fSmrg[m4_ifval([$3], 94831bedbe3fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 94841bedbe3fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9485ba6a1819Smrg 9486ba6a1819Smrg 94871bedbe3fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 94881bedbe3fSmrg# ----------------------------------------------------------------- 94891bedbe3fSmrgm4_define([lt_if_dict_fetch], 94901bedbe3fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 94911bedbe3fSmrg [$5], 94921bedbe3fSmrg [$6])]) 9493ba6a1819Smrg 9494ba6a1819Smrg 94951bedbe3fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 94961bedbe3fSmrg# -------------------------------------------------------------- 94971bedbe3fSmrgm4_define([lt_dict_filter], 94981bedbe3fSmrg[m4_if([$5], [], [], 94991bedbe3fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 95001bedbe3fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 95011bedbe3fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 95021bedbe3fSmrg]) 9503549e21daSmrg 95041bedbe3fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 95051bedbe3fSmrg# 95061bedbe3fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 95071bedbe3fSmrg# Written by Scott James Remnant, 2004 95081bedbe3fSmrg# 95091bedbe3fSmrg# This file is free software; the Free Software Foundation gives 95101bedbe3fSmrg# unlimited permission to copy and/or distribute it, with or without 95111bedbe3fSmrg# modifications, as long as this notice is preserved. 9512ba6a1819Smrg 95131bedbe3fSmrg# @configure_input@ 9514549e21daSmrg 95151bedbe3fSmrg# serial 3337 ltversion.m4 95161bedbe3fSmrg# This file is part of GNU Libtool 9517549e21daSmrg 95181bedbe3fSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 95191bedbe3fSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 95201bedbe3fSmrg 95211bedbe3fSmrgAC_DEFUN([LTVERSION_VERSION], 95221bedbe3fSmrg[macro_version='2.4.2' 95231bedbe3fSmrgmacro_revision='1.3337' 95241bedbe3fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 95251bedbe3fSmrg_LT_DECL(, macro_revision, 0) 9526549e21daSmrg]) 9527549e21daSmrg 95281bedbe3fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 95291bedbe3fSmrg# 95301bedbe3fSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 95311bedbe3fSmrg# Written by Scott James Remnant, 2004. 95321bedbe3fSmrg# 95331bedbe3fSmrg# This file is free software; the Free Software Foundation gives 95341bedbe3fSmrg# unlimited permission to copy and/or distribute it, with or without 95351bedbe3fSmrg# modifications, as long as this notice is preserved. 9536549e21daSmrg 95371bedbe3fSmrg# serial 5 lt~obsolete.m4 9538549e21daSmrg 95391bedbe3fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 95401bedbe3fSmrg# 95411bedbe3fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 95421bedbe3fSmrg# which have later been changed to m4_define as they aren't part of the 95431bedbe3fSmrg# exported API, or moved to Autoconf or Automake where they belong. 95441bedbe3fSmrg# 95451bedbe3fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 95461bedbe3fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 95471bedbe3fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 95481bedbe3fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 95491bedbe3fSmrg# and doesn't know about Autoconf macros at all.) 95501bedbe3fSmrg# 95511bedbe3fSmrg# So we provide this file, which has a silly filename so it's always 95521bedbe3fSmrg# included after everything else. This provides aclocal with the 95531bedbe3fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 95541bedbe3fSmrg# because those macros already exist, or will be overwritten later. 95551bedbe3fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 95561bedbe3fSmrg# 95571bedbe3fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 95581bedbe3fSmrg# Yes, that means every name once taken will need to remain here until 95591bedbe3fSmrg# we give up compatibility with versions before 1.7, at which point 95601bedbe3fSmrg# we need to keep only those names which we still refer to. 9561549e21daSmrg 95621bedbe3fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 95631bedbe3fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 95641bedbe3fSmrg 95651bedbe3fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 95661bedbe3fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 95671bedbe3fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 95681bedbe3fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 95691bedbe3fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 95701bedbe3fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 95711bedbe3fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 95721bedbe3fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 95731bedbe3fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 95741bedbe3fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 95751bedbe3fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 95761bedbe3fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 95771bedbe3fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 95781bedbe3fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 95791bedbe3fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 95801bedbe3fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 95811bedbe3fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 95821bedbe3fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 95831bedbe3fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 95841bedbe3fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 95851bedbe3fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 95861bedbe3fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 95871bedbe3fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 95881bedbe3fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 95891bedbe3fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 95901bedbe3fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 95911bedbe3fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 95921bedbe3fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 95931bedbe3fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 95941bedbe3fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 95951bedbe3fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 95961bedbe3fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 95971bedbe3fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 95981bedbe3fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 95991bedbe3fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 96001bedbe3fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 96011bedbe3fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 96021bedbe3fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 96031bedbe3fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 96041bedbe3fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 96051bedbe3fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 96061bedbe3fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 96071bedbe3fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 96081bedbe3fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 96091bedbe3fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 96101bedbe3fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 96111bedbe3fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 96121bedbe3fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 96131bedbe3fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 96141bedbe3fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 96151bedbe3fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 96161bedbe3fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 96171bedbe3fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 96181bedbe3fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 96191bedbe3fSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 96201bedbe3fSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 96211bedbe3fSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 96221bedbe3fSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 96231bedbe3fSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 96241bedbe3fSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 96251bedbe3fSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 96261bedbe3fSmrg 96271bedbe3fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 96281bedbe3fSmrg# 96291bedbe3fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 96301bedbe3fSmrg# 96311bedbe3fSmrg# This program is free software; you can redistribute it and/or modify 96321bedbe3fSmrg# it under the terms of the GNU General Public License as published by 96331bedbe3fSmrg# the Free Software Foundation; either version 2 of the License, or 96341bedbe3fSmrg# (at your option) any later version. 96351bedbe3fSmrg# 96361bedbe3fSmrg# This program is distributed in the hope that it will be useful, but 96371bedbe3fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 96381bedbe3fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 96391bedbe3fSmrg# General Public License for more details. 96401bedbe3fSmrg# 96411bedbe3fSmrg# You should have received a copy of the GNU General Public License 96421bedbe3fSmrg# along with this program; if not, write to the Free Software 96431bedbe3fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 96441bedbe3fSmrg# 96451bedbe3fSmrg# As a special exception to the GNU General Public License, if you 96461bedbe3fSmrg# distribute this file as part of a program that contains a 96471bedbe3fSmrg# configuration script generated by Autoconf, you may include it under 96481bedbe3fSmrg# the same distribution terms that you use for the rest of that program. 9649549e21daSmrg 96501bedbe3fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 96511bedbe3fSmrg# ---------------------------------- 96521bedbe3fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 96531bedbe3fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 96541bedbe3fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 96551bedbe3fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 96561bedbe3fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 96571bedbe3fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 96581bedbe3fSmrgfi 96591bedbe3fSmrgif test -n "$PKG_CONFIG"; then 96601bedbe3fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 96611bedbe3fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 96621bedbe3fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 96631bedbe3fSmrg AC_MSG_RESULT([yes]) 96641bedbe3fSmrg else 96651bedbe3fSmrg AC_MSG_RESULT([no]) 96661bedbe3fSmrg PKG_CONFIG="" 96671bedbe3fSmrg fi 96681bedbe3fSmrg 96691bedbe3fSmrgfi[]dnl 96701bedbe3fSmrg])# PKG_PROG_PKG_CONFIG 9671549e21daSmrg 96721bedbe3fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 96731bedbe3fSmrg# 96741bedbe3fSmrg# Check to see whether a particular set of modules exists. Similar 96751bedbe3fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 96761bedbe3fSmrg# 96771bedbe3fSmrg# 96781bedbe3fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 96791bedbe3fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 96801bedbe3fSmrg# PKG_CHECK_EXISTS manually 96811bedbe3fSmrg# -------------------------------------------------------------- 96821bedbe3fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 96831bedbe3fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 96841bedbe3fSmrgif test -n "$PKG_CONFIG" && \ 96851bedbe3fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 96861bedbe3fSmrg m4_ifval([$2], [$2], [:]) 96871bedbe3fSmrgm4_ifvaln([$3], [else 96881bedbe3fSmrg $3])dnl 96891bedbe3fSmrgfi]) 9690549e21daSmrg 9691549e21daSmrg 96921bedbe3fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 96931bedbe3fSmrg# --------------------------------------------- 96941bedbe3fSmrgm4_define([_PKG_CONFIG], 96951bedbe3fSmrg[if test -n "$$1"; then 96961bedbe3fSmrg pkg_cv_[]$1="$$1" 96971bedbe3fSmrg elif test -n "$PKG_CONFIG"; then 96981bedbe3fSmrg PKG_CHECK_EXISTS([$3], 96991bedbe3fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 97001bedbe3fSmrg [pkg_failed=yes]) 97011bedbe3fSmrg else 97021bedbe3fSmrg pkg_failed=untried 97031bedbe3fSmrgfi[]dnl 97041bedbe3fSmrg])# _PKG_CONFIG 9705549e21daSmrg 97061bedbe3fSmrg# _PKG_SHORT_ERRORS_SUPPORTED 97071bedbe3fSmrg# ----------------------------- 97081bedbe3fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 97091bedbe3fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 97101bedbe3fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 97111bedbe3fSmrg _pkg_short_errors_supported=yes 97121bedbe3fSmrgelse 97131bedbe3fSmrg _pkg_short_errors_supported=no 97141bedbe3fSmrgfi[]dnl 97151bedbe3fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9716549e21daSmrg 9717549e21daSmrg 97181bedbe3fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 97191bedbe3fSmrg# [ACTION-IF-NOT-FOUND]) 97201bedbe3fSmrg# 97211bedbe3fSmrg# 97221bedbe3fSmrg# Note that if there is a possibility the first call to 97231bedbe3fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 97241bedbe3fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 97251bedbe3fSmrg# 97261bedbe3fSmrg# 97271bedbe3fSmrg# -------------------------------------------------------------- 97281bedbe3fSmrgAC_DEFUN([PKG_CHECK_MODULES], 97291bedbe3fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97301bedbe3fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 97311bedbe3fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9732549e21daSmrg 97331bedbe3fSmrgpkg_failed=no 97341bedbe3fSmrgAC_MSG_CHECKING([for $1]) 9735ba6a1819Smrg 97361bedbe3fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 97371bedbe3fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9738ba6a1819Smrg 97391bedbe3fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 97401bedbe3fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 97411bedbe3fSmrgSee the pkg-config man page for more details.]) 9742549e21daSmrg 97431bedbe3fSmrgif test $pkg_failed = yes; then 97441bedbe3fSmrg _PKG_SHORT_ERRORS_SUPPORTED 97451bedbe3fSmrg if test $_pkg_short_errors_supported = yes; then 97461bedbe3fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 97471bedbe3fSmrg else 97481bedbe3fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 97491bedbe3fSmrg fi 97501bedbe3fSmrg # Put the nasty error message in config.log where it belongs 97511bedbe3fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9752549e21daSmrg 97531bedbe3fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 97541bedbe3fSmrg[Package requirements ($2) were not met: 9755549e21daSmrg 97561bedbe3fSmrg$$1_PKG_ERRORS 9757549e21daSmrg 97581bedbe3fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 97591bedbe3fSmrginstalled software in a non-standard prefix. 9760549e21daSmrg 97611bedbe3fSmrg_PKG_TEXT 97621bedbe3fSmrg])], 97631bedbe3fSmrg [AC_MSG_RESULT([no]) 97641bedbe3fSmrg $4]) 97651bedbe3fSmrgelif test $pkg_failed = untried; then 97661bedbe3fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 97671bedbe3fSmrg[The pkg-config script could not be found or is too old. Make sure it 97681bedbe3fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 97691bedbe3fSmrgpath to pkg-config. 9770549e21daSmrg 97711bedbe3fSmrg_PKG_TEXT 9772549e21daSmrg 97731bedbe3fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 97741bedbe3fSmrg [$4]) 97751bedbe3fSmrgelse 97761bedbe3fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 97771bedbe3fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 97781bedbe3fSmrg AC_MSG_RESULT([yes]) 97791bedbe3fSmrg ifelse([$3], , :, [$3]) 97801bedbe3fSmrgfi[]dnl 97811bedbe3fSmrg])# PKG_CHECK_MODULES 9782549e21daSmrg 97831bedbe3fSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 97841bedbe3fSmrgdnl 97851bedbe3fSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 97861bedbe3fSmrgdnl 97871bedbe3fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 97881bedbe3fSmrgdnl copy of this software and associated documentation files (the "Software"), 97891bedbe3fSmrgdnl to deal in the Software without restriction, including without limitation 97901bedbe3fSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 97911bedbe3fSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 97921bedbe3fSmrgdnl Software is furnished to do so, subject to the following conditions: 97931bedbe3fSmrgdnl 97941bedbe3fSmrgdnl The above copyright notice and this permission notice (including the next 97951bedbe3fSmrgdnl paragraph) shall be included in all copies or substantial portions of the 97961bedbe3fSmrgdnl Software. 97971bedbe3fSmrgdnl 97981bedbe3fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 97991bedbe3fSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 98001bedbe3fSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 98011bedbe3fSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98021bedbe3fSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 98031bedbe3fSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 98041bedbe3fSmrgdnl DEALINGS IN THE SOFTWARE. 9805ba6a1819Smrg 98061bedbe3fSmrg# XORG_MACROS_VERSION(required-version) 98071bedbe3fSmrg# ------------------------------------- 98081bedbe3fSmrg# Minimum version: 1.1.0 98091bedbe3fSmrg# 98101bedbe3fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 98111bedbe3fSmrg# your configure.ac with the minimum required version, such as: 98121bedbe3fSmrg# XORG_MACROS_VERSION(1.1) 98131bedbe3fSmrg# 98141bedbe3fSmrg# To ensure that this macro is defined, also add: 98151bedbe3fSmrg# m4_ifndef([XORG_MACROS_VERSION], 98161bedbe3fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 98171bedbe3fSmrg# 98181bedbe3fSmrg# 98191bedbe3fSmrg# See the "minimum version" comment for each macro you use to see what 98201bedbe3fSmrg# version you require. 98211bedbe3fSmrgm4_defun([XORG_MACROS_VERSION],[ 98221bedbe3fSmrgm4_define([vers_have], [1.17]) 98231bedbe3fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 98241bedbe3fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 98251bedbe3fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 98261bedbe3fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 98271bedbe3fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 98281bedbe3fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 98291bedbe3fSmrgm4_undefine([vers_have]) 98301bedbe3fSmrgm4_undefine([maj_have]) 98311bedbe3fSmrgm4_undefine([maj_needed]) 98321bedbe3fSmrg]) # XORG_MACROS_VERSION 9833ba6a1819Smrg 98341bedbe3fSmrg# XORG_PROG_RAWCPP() 98351bedbe3fSmrg# ------------------ 98361bedbe3fSmrg# Minimum version: 1.0.0 98371bedbe3fSmrg# 98381bedbe3fSmrg# Find cpp program and necessary flags for use in pre-processing text files 98391bedbe3fSmrg# such as man pages and config files 98401bedbe3fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 98411bedbe3fSmrgAC_REQUIRE([AC_PROG_CPP]) 98421bedbe3fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 98431bedbe3fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9844ba6a1819Smrg 98451bedbe3fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 98461bedbe3fSmrg# which is not the best choice for supporting other OS'es, but covers most 98471bedbe3fSmrg# of the ones we need for now. 98481bedbe3fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 98491bedbe3fSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 98501bedbe3fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98511bedbe3fSmrg AC_MSG_RESULT([no]) 98521bedbe3fSmrgelse 98531bedbe3fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98541bedbe3fSmrg RAWCPPFLAGS=-undef 98551bedbe3fSmrg AC_MSG_RESULT([yes]) 98561bedbe3fSmrg # under Cygwin unix is still defined even with -undef 98571bedbe3fSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98581bedbe3fSmrg RAWCPPFLAGS="-undef -ansi" 98591bedbe3fSmrg AC_MSG_RESULT([yes, with -ansi]) 98601bedbe3fSmrg else 98611bedbe3fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 98621bedbe3fSmrg fi 98631bedbe3fSmrgfi 98641bedbe3fSmrgrm -f conftest.$ac_ext 9865ba6a1819Smrg 98661bedbe3fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 98671bedbe3fSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 98681bedbe3fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 98691bedbe3fSmrg AC_MSG_RESULT([no]) 98701bedbe3fSmrgelse 98711bedbe3fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 98721bedbe3fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 98731bedbe3fSmrg AC_MSG_RESULT([yes]) 98741bedbe3fSmrg else 98751bedbe3fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 98761bedbe3fSmrg fi 98771bedbe3fSmrgfi 98781bedbe3fSmrgrm -f conftest.$ac_ext 98791bedbe3fSmrgAC_SUBST(RAWCPPFLAGS) 98801bedbe3fSmrg]) # XORG_PROG_RAWCPP 9881ba6a1819Smrg 98821bedbe3fSmrg# XORG_MANPAGE_SECTIONS() 98831bedbe3fSmrg# ----------------------- 98841bedbe3fSmrg# Minimum version: 1.0.0 98851bedbe3fSmrg# 98861bedbe3fSmrg# Determine which sections man pages go in for the different man page types 98871bedbe3fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 98881bedbe3fSmrg# Not sure if there's any better way than just hardcoding by OS name. 98891bedbe3fSmrg# Override default settings by setting environment variables 98901bedbe3fSmrg# Added MAN_SUBSTS in version 1.8 98911bedbe3fSmrg# Added AC_PROG_SED in version 1.8 9892ba6a1819Smrg 98931bedbe3fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 98941bedbe3fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 98951bedbe3fSmrgAC_REQUIRE([AC_PROG_SED]) 9896ba6a1819Smrg 98971bedbe3fSmrgif test x$APP_MAN_SUFFIX = x ; then 98981bedbe3fSmrg APP_MAN_SUFFIX=1 98991bedbe3fSmrgfi 99001bedbe3fSmrgif test x$APP_MAN_DIR = x ; then 99011bedbe3fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 99021bedbe3fSmrgfi 9903ba6a1819Smrg 99041bedbe3fSmrgif test x$LIB_MAN_SUFFIX = x ; then 99051bedbe3fSmrg LIB_MAN_SUFFIX=3 99061bedbe3fSmrgfi 99071bedbe3fSmrgif test x$LIB_MAN_DIR = x ; then 99081bedbe3fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 99091bedbe3fSmrgfi 9910ba6a1819Smrg 99111bedbe3fSmrgif test x$FILE_MAN_SUFFIX = x ; then 99121bedbe3fSmrg case $host_os in 99131bedbe3fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 99141bedbe3fSmrg *) FILE_MAN_SUFFIX=5 ;; 99151bedbe3fSmrg esac 99161bedbe3fSmrgfi 99171bedbe3fSmrgif test x$FILE_MAN_DIR = x ; then 99181bedbe3fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 99191bedbe3fSmrgfi 9920ba6a1819Smrg 99211bedbe3fSmrgif test x$MISC_MAN_SUFFIX = x ; then 99221bedbe3fSmrg case $host_os in 99231bedbe3fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 99241bedbe3fSmrg *) MISC_MAN_SUFFIX=7 ;; 99251bedbe3fSmrg esac 99261bedbe3fSmrgfi 99271bedbe3fSmrgif test x$MISC_MAN_DIR = x ; then 99281bedbe3fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 99291bedbe3fSmrgfi 9930549e21daSmrg 99311bedbe3fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 99321bedbe3fSmrg case $host_os in 99331bedbe3fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 99341bedbe3fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 99351bedbe3fSmrg esac 99361bedbe3fSmrgfi 99371bedbe3fSmrgif test x$DRIVER_MAN_DIR = x ; then 99381bedbe3fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 99391bedbe3fSmrgfi 9940ba6a1819Smrg 99411bedbe3fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 99421bedbe3fSmrg case $host_os in 99431bedbe3fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 99441bedbe3fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 99451bedbe3fSmrg esac 99461bedbe3fSmrgfi 99471bedbe3fSmrgif test x$ADMIN_MAN_DIR = x ; then 99481bedbe3fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 99491bedbe3fSmrgfi 9950ba6a1819Smrg 9951ba6a1819Smrg 99521bedbe3fSmrgAC_SUBST([APP_MAN_SUFFIX]) 99531bedbe3fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 99541bedbe3fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 99551bedbe3fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 99561bedbe3fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 99571bedbe3fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 99581bedbe3fSmrgAC_SUBST([APP_MAN_DIR]) 99591bedbe3fSmrgAC_SUBST([LIB_MAN_DIR]) 99601bedbe3fSmrgAC_SUBST([FILE_MAN_DIR]) 99611bedbe3fSmrgAC_SUBST([MISC_MAN_DIR]) 99621bedbe3fSmrgAC_SUBST([DRIVER_MAN_DIR]) 99631bedbe3fSmrgAC_SUBST([ADMIN_MAN_DIR]) 9964ba6a1819Smrg 99651bedbe3fSmrgXORG_MAN_PAGE="X Version 11" 99661bedbe3fSmrgAC_SUBST([XORG_MAN_PAGE]) 99671bedbe3fSmrgMAN_SUBSTS="\ 99681bedbe3fSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 99691bedbe3fSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 99701bedbe3fSmrg -e 's|__xservername__|Xorg|g' \ 99711bedbe3fSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 99721bedbe3fSmrg -e 's|__projectroot__|\$(prefix)|g' \ 99731bedbe3fSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 99741bedbe3fSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 99751bedbe3fSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 99761bedbe3fSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 99771bedbe3fSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 99781bedbe3fSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 99791bedbe3fSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 99801bedbe3fSmrgAC_SUBST([MAN_SUBSTS]) 9981ba6a1819Smrg 99821bedbe3fSmrg]) # XORG_MANPAGE_SECTIONS 9983ba6a1819Smrg 99841bedbe3fSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 99851bedbe3fSmrg# ------------------------ 99861bedbe3fSmrg# Minimum version: 1.7.0 99871bedbe3fSmrg# 99881bedbe3fSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 99891bedbe3fSmrg# provided by xorg-sgml-doctools, if installed. 99901bedbe3fSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 99911bedbe3fSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 99921bedbe3fSmrgXORG_SGML_PATH= 99931bedbe3fSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 99941bedbe3fSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 99951bedbe3fSmrg [m4_ifval([$1],[:], 99961bedbe3fSmrg [if test x"$cross_compiling" != x"yes" ; then 99971bedbe3fSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 99981bedbe3fSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 99991bedbe3fSmrg fi]) 100001bedbe3fSmrg ]) 10001ba6a1819Smrg 100021bedbe3fSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 100031bedbe3fSmrg# the path and the name of the doc stylesheet 100041bedbe3fSmrgif test "x$XORG_SGML_PATH" != "x" ; then 100051bedbe3fSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 100061bedbe3fSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 100071bedbe3fSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 100081bedbe3fSmrgelse 100091bedbe3fSmrg AC_MSG_RESULT([no]) 100101bedbe3fSmrgfi 10011549e21daSmrg 100121bedbe3fSmrgAC_SUBST(XORG_SGML_PATH) 100131bedbe3fSmrgAC_SUBST(STYLESHEET_SRCDIR) 100141bedbe3fSmrgAC_SUBST(XSL_STYLESHEET) 100151bedbe3fSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 100161bedbe3fSmrg]) # XORG_CHECK_SGML_DOCTOOLS 10017ba6a1819Smrg 100181bedbe3fSmrg# XORG_CHECK_LINUXDOC 100191bedbe3fSmrg# ------------------- 100201bedbe3fSmrg# Minimum version: 1.0.0 100211bedbe3fSmrg# 100221bedbe3fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 100231bedbe3fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 100241bedbe3fSmrg# Whether or not the necessary tools and files are found can be checked 100251bedbe3fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 100261bedbe3fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 100271bedbe3fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 100281bedbe3fSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10029ba6a1819Smrg 100301bedbe3fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10031ba6a1819Smrg 100321bedbe3fSmrgAC_MSG_CHECKING([whether to build documentation]) 10033ba6a1819Smrg 100341bedbe3fSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 100351bedbe3fSmrg BUILDDOC=yes 100361bedbe3fSmrgelse 100371bedbe3fSmrg BUILDDOC=no 100381bedbe3fSmrgfi 10039ba6a1819Smrg 100401bedbe3fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10041ba6a1819Smrg 100421bedbe3fSmrgAC_MSG_RESULT([$BUILDDOC]) 10043ba6a1819Smrg 100441bedbe3fSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10045ba6a1819Smrg 100461bedbe3fSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 100471bedbe3fSmrg BUILDPDFDOC=yes 100481bedbe3fSmrgelse 100491bedbe3fSmrg BUILDPDFDOC=no 100501bedbe3fSmrgfi 10051549e21daSmrg 100521bedbe3fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10053ba6a1819Smrg 100541bedbe3fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10055ba6a1819Smrg 100561bedbe3fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 100571bedbe3fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 100581bedbe3fSmrgMAKE_PDF="$PS2PDF" 100591bedbe3fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10060ba6a1819Smrg 100611bedbe3fSmrgAC_SUBST(MAKE_TEXT) 100621bedbe3fSmrgAC_SUBST(MAKE_PS) 100631bedbe3fSmrgAC_SUBST(MAKE_PDF) 100641bedbe3fSmrgAC_SUBST(MAKE_HTML) 100651bedbe3fSmrg]) # XORG_CHECK_LINUXDOC 10066549e21daSmrg 100671bedbe3fSmrg# XORG_CHECK_DOCBOOK 100681bedbe3fSmrg# ------------------- 100691bedbe3fSmrg# Minimum version: 1.0.0 100701bedbe3fSmrg# 100711bedbe3fSmrg# Checks for the ability to build output formats from SGML DocBook source. 100721bedbe3fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 100731bedbe3fSmrg# indicates whether the necessary tools and files are found and, if set, 100741bedbe3fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 100751bedbe3fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 100761bedbe3fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10077549e21daSmrg 100781bedbe3fSmrgBUILDTXTDOC=no 100791bedbe3fSmrgBUILDPDFDOC=no 100801bedbe3fSmrgBUILDPSDOC=no 100811bedbe3fSmrgBUILDHTMLDOC=no 10082ba6a1819Smrg 100831bedbe3fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 100841bedbe3fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 100851bedbe3fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 100861bedbe3fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10087ba6a1819Smrg 100881bedbe3fSmrgAC_MSG_CHECKING([whether to build text documentation]) 100891bedbe3fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 100901bedbe3fSmrg test x$BUILD_TXTDOC != xno; then 100911bedbe3fSmrg BUILDTXTDOC=yes 100921bedbe3fSmrgfi 100931bedbe3fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 100941bedbe3fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10095549e21daSmrg 100961bedbe3fSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 100971bedbe3fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 100981bedbe3fSmrg test x$BUILD_PDFDOC != xno; then 100991bedbe3fSmrg BUILDPDFDOC=yes 101001bedbe3fSmrgfi 101011bedbe3fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101021bedbe3fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10103ba6a1819Smrg 101041bedbe3fSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 101051bedbe3fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 101061bedbe3fSmrg test x$BUILD_PSDOC != xno; then 101071bedbe3fSmrg BUILDPSDOC=yes 101081bedbe3fSmrgfi 101091bedbe3fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 101101bedbe3fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 10111ba6a1819Smrg 101121bedbe3fSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 101131bedbe3fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 101141bedbe3fSmrg test x$BUILD_HTMLDOC != xno; then 101151bedbe3fSmrg BUILDHTMLDOC=yes 101161bedbe3fSmrgfi 101171bedbe3fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 101181bedbe3fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10119ba6a1819Smrg 101201bedbe3fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 101211bedbe3fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 101221bedbe3fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 101231bedbe3fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10124ba6a1819Smrg 101251bedbe3fSmrgAC_SUBST(MAKE_TEXT) 101261bedbe3fSmrgAC_SUBST(MAKE_PS) 101271bedbe3fSmrgAC_SUBST(MAKE_PDF) 101281bedbe3fSmrgAC_SUBST(MAKE_HTML) 101291bedbe3fSmrg]) # XORG_CHECK_DOCBOOK 10130ba6a1819Smrg 101311bedbe3fSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 101321bedbe3fSmrg# ---------------- 101331bedbe3fSmrg# Minimum version: 1.5.0 101341bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 101351bedbe3fSmrg# 101361bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 101371bedbe3fSmrg# not at the appropriate level. This macro enables a module to test for the 101381bedbe3fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 101391bedbe3fSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 101401bedbe3fSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 101411bedbe3fSmrg# --with-xmlto assumes 'auto'. 101421bedbe3fSmrg# 101431bedbe3fSmrg# Interface to module: 101441bedbe3fSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 101451bedbe3fSmrg# XMLTO: returns the path of the xmlto program found 101461bedbe3fSmrg# returns the path set by the user in the environment 101471bedbe3fSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 101481bedbe3fSmrg# 'no' user instructs the module not to use xmlto 101491bedbe3fSmrg# 101501bedbe3fSmrg# Added in version 1.10.0 101511bedbe3fSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 101521bedbe3fSmrg# xmlto for text output requires either lynx, links, or w3m browsers 101531bedbe3fSmrg# 101541bedbe3fSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 101551bedbe3fSmrg# 101561bedbe3fSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 101571bedbe3fSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 101581bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 101591bedbe3fSmrgAC_ARG_WITH(xmlto, 101601bedbe3fSmrg AS_HELP_STRING([--with-xmlto], 101611bedbe3fSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 101621bedbe3fSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 101631bedbe3fSmrgm4_undefine([_defopt]) 10164ba6a1819Smrg 101651bedbe3fSmrgif test "x$use_xmlto" = x"auto"; then 101661bedbe3fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 101671bedbe3fSmrg if test "x$XMLTO" = "x"; then 101681bedbe3fSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 101691bedbe3fSmrg have_xmlto=no 101701bedbe3fSmrg else 101711bedbe3fSmrg have_xmlto=yes 101721bedbe3fSmrg fi 101731bedbe3fSmrgelif test "x$use_xmlto" = x"yes" ; then 101741bedbe3fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 101751bedbe3fSmrg if test "x$XMLTO" = "x"; then 101761bedbe3fSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 101771bedbe3fSmrg fi 101781bedbe3fSmrg have_xmlto=yes 101791bedbe3fSmrgelif test "x$use_xmlto" = x"no" ; then 101801bedbe3fSmrg if test "x$XMLTO" != "x"; then 101811bedbe3fSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 101821bedbe3fSmrg fi 101831bedbe3fSmrg have_xmlto=no 101841bedbe3fSmrgelse 101851bedbe3fSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 101861bedbe3fSmrgfi 10187ba6a1819Smrg 101881bedbe3fSmrg# Test for a minimum version of xmlto, if provided. 101891bedbe3fSmrgm4_ifval([$1], 101901bedbe3fSmrg[if test "$have_xmlto" = yes; then 101911bedbe3fSmrg # scrape the xmlto version 101921bedbe3fSmrg AC_MSG_CHECKING([the xmlto version]) 101931bedbe3fSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 101941bedbe3fSmrg AC_MSG_RESULT([$xmlto_version]) 101951bedbe3fSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 101961bedbe3fSmrg [if test "x$use_xmlto" = xauto; then 101971bedbe3fSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 101981bedbe3fSmrg have_xmlto=no 101991bedbe3fSmrg else 102001bedbe3fSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 102011bedbe3fSmrg fi]) 102021bedbe3fSmrgfi]) 10203ba6a1819Smrg 102041bedbe3fSmrg# Test for the ability of xmlto to generate a text target 102051bedbe3fSmrghave_xmlto_text=no 102061bedbe3fSmrgcat > conftest.xml << "EOF" 102071bedbe3fSmrgEOF 102081bedbe3fSmrgAS_IF([test "$have_xmlto" = yes], 102091bedbe3fSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 102101bedbe3fSmrg [have_xmlto_text=yes], 102111bedbe3fSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 102121bedbe3fSmrgrm -f conftest.xml 102131bedbe3fSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 102141bedbe3fSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 102151bedbe3fSmrg]) # XORG_WITH_XMLTO 10216ba6a1819Smrg 102171bedbe3fSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 102181bedbe3fSmrg# -------------------------------------------- 102191bedbe3fSmrg# Minimum version: 1.12.0 102201bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.12.0 102211bedbe3fSmrg# 102221bedbe3fSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 102231bedbe3fSmrg# XML-based language used for the transformation of XML documents. 102241bedbe3fSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 102251bedbe3fSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 102261bedbe3fSmrg# The XSLT processor is often used as a standalone tool for transformations. 102271bedbe3fSmrg# It should not be assumed that this tool is used only to work with documnetation. 102281bedbe3fSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 102291bedbe3fSmrg# 102301bedbe3fSmrg# Interface to module: 102311bedbe3fSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 102321bedbe3fSmrg# XSLTPROC: returns the path of the xsltproc program found 102331bedbe3fSmrg# returns the path set by the user in the environment 102341bedbe3fSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 102351bedbe3fSmrg# 'no' user instructs the module not to use xsltproc 102361bedbe3fSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 102371bedbe3fSmrg# 102381bedbe3fSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 102391bedbe3fSmrg# 102401bedbe3fSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 102411bedbe3fSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 102421bedbe3fSmrg# Preserves the interface, should it be implemented later 102431bedbe3fSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 102441bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 102451bedbe3fSmrgAC_ARG_WITH(xsltproc, 102461bedbe3fSmrg AS_HELP_STRING([--with-xsltproc], 102471bedbe3fSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 102481bedbe3fSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 102491bedbe3fSmrgm4_undefine([_defopt]) 102501bedbe3fSmrg 102511bedbe3fSmrgif test "x$use_xsltproc" = x"auto"; then 102521bedbe3fSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102531bedbe3fSmrg if test "x$XSLTPROC" = "x"; then 102541bedbe3fSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 102551bedbe3fSmrg have_xsltproc=no 102561bedbe3fSmrg else 102571bedbe3fSmrg have_xsltproc=yes 102581bedbe3fSmrg fi 102591bedbe3fSmrgelif test "x$use_xsltproc" = x"yes" ; then 102601bedbe3fSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102611bedbe3fSmrg if test "x$XSLTPROC" = "x"; then 102621bedbe3fSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 102631bedbe3fSmrg fi 102641bedbe3fSmrg have_xsltproc=yes 102651bedbe3fSmrgelif test "x$use_xsltproc" = x"no" ; then 102661bedbe3fSmrg if test "x$XSLTPROC" != "x"; then 102671bedbe3fSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 102681bedbe3fSmrg fi 102691bedbe3fSmrg have_xsltproc=no 102701bedbe3fSmrgelse 102711bedbe3fSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 102721bedbe3fSmrgfi 10273ba6a1819Smrg 102741bedbe3fSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 102751bedbe3fSmrg]) # XORG_WITH_XSLTPROC 10276ba6a1819Smrg 102771bedbe3fSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 102781bedbe3fSmrg# ---------------------------------------- 102791bedbe3fSmrg# Minimum version: 1.15.0 102801bedbe3fSmrg# 102811bedbe3fSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 102821bedbe3fSmrg# scanning arbitrary text files, extracting information from those text files, 102831bedbe3fSmrg# and printing reports based on that information. 102841bedbe3fSmrg# 102851bedbe3fSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 102861bedbe3fSmrg# 102871bedbe3fSmrg# Interface to module: 102881bedbe3fSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 102891bedbe3fSmrg# PERL: returns the path of the perl program found 102901bedbe3fSmrg# returns the path set by the user in the environment 102911bedbe3fSmrg# --with-perl: 'yes' user instructs the module to use perl 102921bedbe3fSmrg# 'no' user instructs the module not to use perl 102931bedbe3fSmrg# have_perl: returns yes if perl found in PATH or no 102941bedbe3fSmrg# 102951bedbe3fSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 102961bedbe3fSmrg# 102971bedbe3fSmrgAC_DEFUN([XORG_WITH_PERL],[ 102981bedbe3fSmrgAC_ARG_VAR([PERL], [Path to perl command]) 102991bedbe3fSmrg# Preserves the interface, should it be implemented later 103001bedbe3fSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 103011bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 103021bedbe3fSmrgAC_ARG_WITH(perl, 103031bedbe3fSmrg AS_HELP_STRING([--with-perl], 103041bedbe3fSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 103051bedbe3fSmrg [use_perl=$withval], [use_perl=]_defopt) 103061bedbe3fSmrgm4_undefine([_defopt]) 103071bedbe3fSmrg 103081bedbe3fSmrgif test "x$use_perl" = x"auto"; then 103091bedbe3fSmrg AC_PATH_PROG([PERL], [perl]) 103101bedbe3fSmrg if test "x$PERL" = "x"; then 103111bedbe3fSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 103121bedbe3fSmrg have_perl=no 103131bedbe3fSmrg else 103141bedbe3fSmrg have_perl=yes 103151bedbe3fSmrg fi 103161bedbe3fSmrgelif test "x$use_perl" = x"yes" ; then 103171bedbe3fSmrg AC_PATH_PROG([PERL], [perl]) 103181bedbe3fSmrg if test "x$PERL" = "x"; then 103191bedbe3fSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 103201bedbe3fSmrg fi 103211bedbe3fSmrg have_perl=yes 103221bedbe3fSmrgelif test "x$use_perl" = x"no" ; then 103231bedbe3fSmrg if test "x$PERL" != "x"; then 103241bedbe3fSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 103251bedbe3fSmrg fi 103261bedbe3fSmrg have_perl=no 103271bedbe3fSmrgelse 103281bedbe3fSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 103291bedbe3fSmrgfi 10330ba6a1819Smrg 103311bedbe3fSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 103321bedbe3fSmrg]) # XORG_WITH_PERL 10333ba6a1819Smrg 103341bedbe3fSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 103351bedbe3fSmrg# ---------------- 103361bedbe3fSmrg# Minimum version: 1.5.0 103371bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 103381bedbe3fSmrg# 103391bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 103401bedbe3fSmrg# not at the appropriate level. This macro enables a module to test for the 103411bedbe3fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 103421bedbe3fSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 103431bedbe3fSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 103441bedbe3fSmrg# --with-asciidoc assumes 'auto'. 103451bedbe3fSmrg# 103461bedbe3fSmrg# Interface to module: 103471bedbe3fSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 103481bedbe3fSmrg# ASCIIDOC: returns the path of the asciidoc program found 103491bedbe3fSmrg# returns the path set by the user in the environment 103501bedbe3fSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 103511bedbe3fSmrg# 'no' user instructs the module not to use asciidoc 103521bedbe3fSmrg# 103531bedbe3fSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 103541bedbe3fSmrg# 103551bedbe3fSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 103561bedbe3fSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 103571bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 103581bedbe3fSmrgAC_ARG_WITH(asciidoc, 103591bedbe3fSmrg AS_HELP_STRING([--with-asciidoc], 103601bedbe3fSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 103611bedbe3fSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 103621bedbe3fSmrgm4_undefine([_defopt]) 10363ba6a1819Smrg 103641bedbe3fSmrgif test "x$use_asciidoc" = x"auto"; then 103651bedbe3fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 103661bedbe3fSmrg if test "x$ASCIIDOC" = "x"; then 103671bedbe3fSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 103681bedbe3fSmrg have_asciidoc=no 103691bedbe3fSmrg else 103701bedbe3fSmrg have_asciidoc=yes 103711bedbe3fSmrg fi 103721bedbe3fSmrgelif test "x$use_asciidoc" = x"yes" ; then 103731bedbe3fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 103741bedbe3fSmrg if test "x$ASCIIDOC" = "x"; then 103751bedbe3fSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 103761bedbe3fSmrg fi 103771bedbe3fSmrg have_asciidoc=yes 103781bedbe3fSmrgelif test "x$use_asciidoc" = x"no" ; then 103791bedbe3fSmrg if test "x$ASCIIDOC" != "x"; then 103801bedbe3fSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 103811bedbe3fSmrg fi 103821bedbe3fSmrg have_asciidoc=no 103831bedbe3fSmrgelse 103841bedbe3fSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 103851bedbe3fSmrgfi 103861bedbe3fSmrgm4_ifval([$1], 103871bedbe3fSmrg[if test "$have_asciidoc" = yes; then 103881bedbe3fSmrg # scrape the asciidoc version 103891bedbe3fSmrg AC_MSG_CHECKING([the asciidoc version]) 103901bedbe3fSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 103911bedbe3fSmrg AC_MSG_RESULT([$asciidoc_version]) 103921bedbe3fSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 103931bedbe3fSmrg [if test "x$use_asciidoc" = xauto; then 103941bedbe3fSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 103951bedbe3fSmrg have_asciidoc=no 103961bedbe3fSmrg else 103971bedbe3fSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 103981bedbe3fSmrg fi]) 103991bedbe3fSmrgfi]) 104001bedbe3fSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 104011bedbe3fSmrg]) # XORG_WITH_ASCIIDOC 10402ba6a1819Smrg 104031bedbe3fSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 104041bedbe3fSmrg# -------------------------------- 104051bedbe3fSmrg# Minimum version: 1.5.0 104061bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104071bedbe3fSmrg# 104081bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 104091bedbe3fSmrg# not at the appropriate level. This macro enables a module to test for the 104101bedbe3fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104111bedbe3fSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 104121bedbe3fSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 104131bedbe3fSmrg# --with-doxygen assumes 'auto'. 104141bedbe3fSmrg# 104151bedbe3fSmrg# Interface to module: 104161bedbe3fSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 104171bedbe3fSmrg# DOXYGEN: returns the path of the doxygen program found 104181bedbe3fSmrg# returns the path set by the user in the environment 104191bedbe3fSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 104201bedbe3fSmrg# 'no' user instructs the module not to use doxygen 104211bedbe3fSmrg# 104221bedbe3fSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 104231bedbe3fSmrg# 104241bedbe3fSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 104251bedbe3fSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 104261bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 104271bedbe3fSmrgAC_ARG_WITH(doxygen, 104281bedbe3fSmrg AS_HELP_STRING([--with-doxygen], 104291bedbe3fSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 104301bedbe3fSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 104311bedbe3fSmrgm4_undefine([_defopt]) 10432ba6a1819Smrg 104331bedbe3fSmrgif test "x$use_doxygen" = x"auto"; then 104341bedbe3fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 104351bedbe3fSmrg if test "x$DOXYGEN" = "x"; then 104361bedbe3fSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 104371bedbe3fSmrg have_doxygen=no 104381bedbe3fSmrg else 104391bedbe3fSmrg have_doxygen=yes 104401bedbe3fSmrg fi 104411bedbe3fSmrgelif test "x$use_doxygen" = x"yes" ; then 104421bedbe3fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 104431bedbe3fSmrg if test "x$DOXYGEN" = "x"; then 104441bedbe3fSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 104451bedbe3fSmrg fi 104461bedbe3fSmrg have_doxygen=yes 104471bedbe3fSmrgelif test "x$use_doxygen" = x"no" ; then 104481bedbe3fSmrg if test "x$DOXYGEN" != "x"; then 104491bedbe3fSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 104501bedbe3fSmrg fi 104511bedbe3fSmrg have_doxygen=no 104521bedbe3fSmrgelse 104531bedbe3fSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 104541bedbe3fSmrgfi 104551bedbe3fSmrgm4_ifval([$1], 104561bedbe3fSmrg[if test "$have_doxygen" = yes; then 104571bedbe3fSmrg # scrape the doxygen version 104581bedbe3fSmrg AC_MSG_CHECKING([the doxygen version]) 104591bedbe3fSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 104601bedbe3fSmrg AC_MSG_RESULT([$doxygen_version]) 104611bedbe3fSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 104621bedbe3fSmrg [if test "x$use_doxygen" = xauto; then 104631bedbe3fSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 104641bedbe3fSmrg have_doxygen=no 104651bedbe3fSmrg else 104661bedbe3fSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 104671bedbe3fSmrg fi]) 104681bedbe3fSmrgfi]) 104691bedbe3fSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 104701bedbe3fSmrg]) # XORG_WITH_DOXYGEN 10471ba6a1819Smrg 104721bedbe3fSmrg# XORG_WITH_GROFF([DEFAULT]) 104731bedbe3fSmrg# ---------------- 104741bedbe3fSmrg# Minimum version: 1.6.0 104751bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104761bedbe3fSmrg# 104771bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 104781bedbe3fSmrg# not at the appropriate level. This macro enables a module to test for the 104791bedbe3fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104801bedbe3fSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 104811bedbe3fSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 104821bedbe3fSmrg# --with-groff assumes 'auto'. 104831bedbe3fSmrg# 104841bedbe3fSmrg# Interface to module: 104851bedbe3fSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 104861bedbe3fSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 104871bedbe3fSmrg# HAVE_GROFF_MS: the -ms macros package 104881bedbe3fSmrg# GROFF: returns the path of the groff program found 104891bedbe3fSmrg# returns the path set by the user in the environment 104901bedbe3fSmrg# --with-groff: 'yes' user instructs the module to use groff 104911bedbe3fSmrg# 'no' user instructs the module not to use groff 104921bedbe3fSmrg# 104931bedbe3fSmrg# Added in version 1.9.0: 104941bedbe3fSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 104951bedbe3fSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 104961bedbe3fSmrg# psselect from the psutils package. 104971bedbe3fSmrg# the ghostcript package. Refer to the grohtml man pages 104981bedbe3fSmrg# 104991bedbe3fSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 105001bedbe3fSmrg# 105011bedbe3fSmrg# OS and distros often splits groff in a basic and full package, the former 105021bedbe3fSmrg# having the groff program and the later having devices, fonts and macros 105031bedbe3fSmrg# Checking for the groff executable is not enough. 105041bedbe3fSmrg# 105051bedbe3fSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 105061bedbe3fSmrg# unset HAVE_GROFF or GROFF env variables. 105071bedbe3fSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 105081bedbe3fSmrg# 105091bedbe3fSmrgAC_DEFUN([XORG_WITH_GROFF],[ 105101bedbe3fSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 105111bedbe3fSmrgm4_define([_defopt], m4_default([$1], [auto])) 105121bedbe3fSmrgAC_ARG_WITH(groff, 105131bedbe3fSmrg AS_HELP_STRING([--with-groff], 105141bedbe3fSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 105151bedbe3fSmrg [use_groff=$withval], [use_groff=]_defopt) 105161bedbe3fSmrgm4_undefine([_defopt]) 10517ba6a1819Smrg 105181bedbe3fSmrgif test "x$use_groff" = x"auto"; then 105191bedbe3fSmrg AC_PATH_PROG([GROFF], [groff]) 105201bedbe3fSmrg if test "x$GROFF" = "x"; then 105211bedbe3fSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 105221bedbe3fSmrg have_groff=no 105231bedbe3fSmrg else 105241bedbe3fSmrg have_groff=yes 105251bedbe3fSmrg fi 105261bedbe3fSmrgelif test "x$use_groff" = x"yes" ; then 105271bedbe3fSmrg AC_PATH_PROG([GROFF], [groff]) 105281bedbe3fSmrg if test "x$GROFF" = "x"; then 105291bedbe3fSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 105301bedbe3fSmrg fi 105311bedbe3fSmrg have_groff=yes 105321bedbe3fSmrgelif test "x$use_groff" = x"no" ; then 105331bedbe3fSmrg if test "x$GROFF" != "x"; then 105341bedbe3fSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 105351bedbe3fSmrg fi 105361bedbe3fSmrg have_groff=no 105371bedbe3fSmrgelse 105381bedbe3fSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 105391bedbe3fSmrgfi 10540ba6a1819Smrg 105411bedbe3fSmrg# We have groff, test for the presence of the macro packages 105421bedbe3fSmrgif test "x$have_groff" = x"yes"; then 105431bedbe3fSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 105441bedbe3fSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 105451bedbe3fSmrg groff_ms_works=yes 105461bedbe3fSmrg else 105471bedbe3fSmrg groff_ms_works=no 105481bedbe3fSmrg fi 105491bedbe3fSmrg AC_MSG_RESULT([$groff_ms_works]) 105501bedbe3fSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 105511bedbe3fSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 105521bedbe3fSmrg groff_mm_works=yes 105531bedbe3fSmrg else 105541bedbe3fSmrg groff_mm_works=no 105551bedbe3fSmrg fi 105561bedbe3fSmrg AC_MSG_RESULT([$groff_mm_works]) 105571bedbe3fSmrgfi 10558ba6a1819Smrg 105591bedbe3fSmrg# We have groff, test for HTML dependencies, one command per package 105601bedbe3fSmrgif test "x$have_groff" = x"yes"; then 105611bedbe3fSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 105621bedbe3fSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 105631bedbe3fSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 105641bedbe3fSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 105651bedbe3fSmrg have_groff_html=yes 105661bedbe3fSmrg else 105671bedbe3fSmrg have_groff_html=no 105681bedbe3fSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 105691bedbe3fSmrg fi 105701bedbe3fSmrgfi 10571ba6a1819Smrg 105721bedbe3fSmrg# Set Automake conditionals for Makefiles 105731bedbe3fSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 105741bedbe3fSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 105751bedbe3fSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 105761bedbe3fSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 105771bedbe3fSmrg]) # XORG_WITH_GROFF 10578ba6a1819Smrg 105791bedbe3fSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 105801bedbe3fSmrg# --------------------------------------- 105811bedbe3fSmrg# Minimum version: 1.6.0 105821bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 105831bedbe3fSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 105841bedbe3fSmrg# 105851bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 105861bedbe3fSmrg# not at the appropriate level. This macro enables a module to test for the 105871bedbe3fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 105881bedbe3fSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 105891bedbe3fSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 105901bedbe3fSmrg# --with-fop assumes 'auto'. 105911bedbe3fSmrg# 105921bedbe3fSmrg# Interface to module: 105931bedbe3fSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 105941bedbe3fSmrg# FOP: returns the path of the fop program found 105951bedbe3fSmrg# returns the path set by the user in the environment 105961bedbe3fSmrg# --with-fop: 'yes' user instructs the module to use fop 105971bedbe3fSmrg# 'no' user instructs the module not to use fop 105981bedbe3fSmrg# 105991bedbe3fSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 106001bedbe3fSmrg# 106011bedbe3fSmrgAC_DEFUN([XORG_WITH_FOP],[ 106021bedbe3fSmrgAC_ARG_VAR([FOP], [Path to fop command]) 106031bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 106041bedbe3fSmrgAC_ARG_WITH(fop, 106051bedbe3fSmrg AS_HELP_STRING([--with-fop], 106061bedbe3fSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 106071bedbe3fSmrg [use_fop=$withval], [use_fop=]_defopt) 106081bedbe3fSmrgm4_undefine([_defopt]) 10609ba6a1819Smrg 106101bedbe3fSmrgif test "x$use_fop" = x"auto"; then 106111bedbe3fSmrg AC_PATH_PROG([FOP], [fop]) 106121bedbe3fSmrg if test "x$FOP" = "x"; then 106131bedbe3fSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 106141bedbe3fSmrg have_fop=no 106151bedbe3fSmrg else 106161bedbe3fSmrg have_fop=yes 106171bedbe3fSmrg fi 106181bedbe3fSmrgelif test "x$use_fop" = x"yes" ; then 106191bedbe3fSmrg AC_PATH_PROG([FOP], [fop]) 106201bedbe3fSmrg if test "x$FOP" = "x"; then 106211bedbe3fSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 106221bedbe3fSmrg fi 106231bedbe3fSmrg have_fop=yes 106241bedbe3fSmrgelif test "x$use_fop" = x"no" ; then 106251bedbe3fSmrg if test "x$FOP" != "x"; then 106261bedbe3fSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 106271bedbe3fSmrg fi 106281bedbe3fSmrg have_fop=no 106291bedbe3fSmrgelse 106301bedbe3fSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 106311bedbe3fSmrgfi 10632ba6a1819Smrg 106331bedbe3fSmrg# Test for a minimum version of fop, if provided. 106341bedbe3fSmrgm4_ifval([$1], 106351bedbe3fSmrg[if test "$have_fop" = yes; then 106361bedbe3fSmrg # scrape the fop version 106371bedbe3fSmrg AC_MSG_CHECKING([for fop minimum version]) 106381bedbe3fSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 106391bedbe3fSmrg AC_MSG_RESULT([$fop_version]) 106401bedbe3fSmrg AS_VERSION_COMPARE([$fop_version], [$1], 106411bedbe3fSmrg [if test "x$use_fop" = xauto; then 106421bedbe3fSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 106431bedbe3fSmrg have_fop=no 106441bedbe3fSmrg else 106451bedbe3fSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 106461bedbe3fSmrg fi]) 106471bedbe3fSmrgfi]) 106481bedbe3fSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 106491bedbe3fSmrg]) # XORG_WITH_FOP 10650ba6a1819Smrg 106511bedbe3fSmrg# XORG_WITH_PS2PDF([DEFAULT]) 106521bedbe3fSmrg# ---------------- 106531bedbe3fSmrg# Minimum version: 1.6.0 106541bedbe3fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 106551bedbe3fSmrg# 106561bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 106571bedbe3fSmrg# not at the appropriate level. This macro enables a module to test for the 106581bedbe3fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 106591bedbe3fSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 106601bedbe3fSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 106611bedbe3fSmrg# --with-ps2pdf assumes 'auto'. 106621bedbe3fSmrg# 106631bedbe3fSmrg# Interface to module: 106641bedbe3fSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 106651bedbe3fSmrg# PS2PDF: returns the path of the ps2pdf program found 106661bedbe3fSmrg# returns the path set by the user in the environment 106671bedbe3fSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 106681bedbe3fSmrg# 'no' user instructs the module not to use ps2pdf 106691bedbe3fSmrg# 106701bedbe3fSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 106711bedbe3fSmrg# 106721bedbe3fSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 106731bedbe3fSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 106741bedbe3fSmrgm4_define([_defopt], m4_default([$1], [auto])) 106751bedbe3fSmrgAC_ARG_WITH(ps2pdf, 106761bedbe3fSmrg AS_HELP_STRING([--with-ps2pdf], 106771bedbe3fSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 106781bedbe3fSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 106791bedbe3fSmrgm4_undefine([_defopt]) 10680ba6a1819Smrg 106811bedbe3fSmrgif test "x$use_ps2pdf" = x"auto"; then 106821bedbe3fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 106831bedbe3fSmrg if test "x$PS2PDF" = "x"; then 106841bedbe3fSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 106851bedbe3fSmrg have_ps2pdf=no 106861bedbe3fSmrg else 106871bedbe3fSmrg have_ps2pdf=yes 106881bedbe3fSmrg fi 106891bedbe3fSmrgelif test "x$use_ps2pdf" = x"yes" ; then 106901bedbe3fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 106911bedbe3fSmrg if test "x$PS2PDF" = "x"; then 106921bedbe3fSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 106931bedbe3fSmrg fi 106941bedbe3fSmrg have_ps2pdf=yes 106951bedbe3fSmrgelif test "x$use_ps2pdf" = x"no" ; then 106961bedbe3fSmrg if test "x$PS2PDF" != "x"; then 106971bedbe3fSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 106981bedbe3fSmrg fi 106991bedbe3fSmrg have_ps2pdf=no 107001bedbe3fSmrgelse 107011bedbe3fSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 107021bedbe3fSmrgfi 107031bedbe3fSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 107041bedbe3fSmrg]) # XORG_WITH_PS2PDF 10705ba6a1819Smrg 107061bedbe3fSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 107071bedbe3fSmrg# ---------------- 107081bedbe3fSmrg# Minimum version: 1.6.0 107091bedbe3fSmrg# 107101bedbe3fSmrg# Documentation tools are not always available on all platforms and sometimes 107111bedbe3fSmrg# not at the appropriate level. This macro enables a builder to skip all 107121bedbe3fSmrg# documentation targets except traditional man pages. 107131bedbe3fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107141bedbe3fSmrg# maximum flexibilty in controlling documentation building. 107151bedbe3fSmrg# Refer to: 107161bedbe3fSmrg# XORG_WITH_XMLTO --with-xmlto 107171bedbe3fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 107181bedbe3fSmrg# XORG_WITH_DOXYGEN --with-doxygen 107191bedbe3fSmrg# XORG_WITH_FOP --with-fop 107201bedbe3fSmrg# XORG_WITH_GROFF --with-groff 107211bedbe3fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 107221bedbe3fSmrg# 107231bedbe3fSmrg# Interface to module: 107241bedbe3fSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 107251bedbe3fSmrg# --enable-docs: 'yes' user instructs the module to generate docs 107261bedbe3fSmrg# 'no' user instructs the module not to generate docs 107271bedbe3fSmrg# parm1: specify the default value, yes or no. 107281bedbe3fSmrg# 107291bedbe3fSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 107301bedbe3fSmrgm4_define([docs_default], m4_default([$1], [yes])) 107311bedbe3fSmrgAC_ARG_ENABLE(docs, 107321bedbe3fSmrg AS_HELP_STRING([--enable-docs], 107331bedbe3fSmrg [Enable building the documentation (default: ]docs_default[)]), 107341bedbe3fSmrg [build_docs=$enableval], [build_docs=]docs_default) 107351bedbe3fSmrgm4_undefine([docs_default]) 107361bedbe3fSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 107371bedbe3fSmrgAC_MSG_CHECKING([whether to build documentation]) 107381bedbe3fSmrgAC_MSG_RESULT([$build_docs]) 107391bedbe3fSmrg]) # XORG_ENABLE_DOCS 10740ba6a1819Smrg 107411bedbe3fSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 107421bedbe3fSmrg# ---------------- 107431bedbe3fSmrg# Minimum version: 1.6.0 107441bedbe3fSmrg# 107451bedbe3fSmrg# This macro enables a builder to skip all developer documentation. 107461bedbe3fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107471bedbe3fSmrg# maximum flexibilty in controlling documentation building. 107481bedbe3fSmrg# Refer to: 107491bedbe3fSmrg# XORG_WITH_XMLTO --with-xmlto 107501bedbe3fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 107511bedbe3fSmrg# XORG_WITH_DOXYGEN --with-doxygen 107521bedbe3fSmrg# XORG_WITH_FOP --with-fop 107531bedbe3fSmrg# XORG_WITH_GROFF --with-groff 107541bedbe3fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 107551bedbe3fSmrg# 107561bedbe3fSmrg# Interface to module: 107571bedbe3fSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 107581bedbe3fSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 107591bedbe3fSmrg# 'no' user instructs the module not to generate developer docs 107601bedbe3fSmrg# parm1: specify the default value, yes or no. 107611bedbe3fSmrg# 107621bedbe3fSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 107631bedbe3fSmrgm4_define([devel_default], m4_default([$1], [yes])) 107641bedbe3fSmrgAC_ARG_ENABLE(devel-docs, 107651bedbe3fSmrg AS_HELP_STRING([--enable-devel-docs], 107661bedbe3fSmrg [Enable building the developer documentation (default: ]devel_default[)]), 107671bedbe3fSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 107681bedbe3fSmrgm4_undefine([devel_default]) 107691bedbe3fSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 107701bedbe3fSmrgAC_MSG_CHECKING([whether to build developer documentation]) 107711bedbe3fSmrgAC_MSG_RESULT([$build_devel_docs]) 107721bedbe3fSmrg]) # XORG_ENABLE_DEVEL_DOCS 10773549e21daSmrg 107741bedbe3fSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 107751bedbe3fSmrg# ---------------- 107761bedbe3fSmrg# Minimum version: 1.6.0 107771bedbe3fSmrg# 107781bedbe3fSmrg# This macro enables a builder to skip all functional specification targets. 107791bedbe3fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107801bedbe3fSmrg# maximum flexibilty in controlling documentation building. 107811bedbe3fSmrg# Refer to: 107821bedbe3fSmrg# XORG_WITH_XMLTO --with-xmlto 107831bedbe3fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 107841bedbe3fSmrg# XORG_WITH_DOXYGEN --with-doxygen 107851bedbe3fSmrg# XORG_WITH_FOP --with-fop 107861bedbe3fSmrg# XORG_WITH_GROFF --with-groff 107871bedbe3fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 107881bedbe3fSmrg# 107891bedbe3fSmrg# Interface to module: 107901bedbe3fSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 107911bedbe3fSmrg# --enable-specs: 'yes' user instructs the module to generate specs 107921bedbe3fSmrg# 'no' user instructs the module not to generate specs 107931bedbe3fSmrg# parm1: specify the default value, yes or no. 107941bedbe3fSmrg# 107951bedbe3fSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 107961bedbe3fSmrgm4_define([spec_default], m4_default([$1], [yes])) 107971bedbe3fSmrgAC_ARG_ENABLE(specs, 107981bedbe3fSmrg AS_HELP_STRING([--enable-specs], 107991bedbe3fSmrg [Enable building the specs (default: ]spec_default[)]), 108001bedbe3fSmrg [build_specs=$enableval], [build_specs=]spec_default) 108011bedbe3fSmrgm4_undefine([spec_default]) 108021bedbe3fSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 108031bedbe3fSmrgAC_MSG_CHECKING([whether to build functional specifications]) 108041bedbe3fSmrgAC_MSG_RESULT([$build_specs]) 108051bedbe3fSmrg]) # XORG_ENABLE_SPECS 10806ba6a1819Smrg 108071bedbe3fSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 108081bedbe3fSmrg# ---------------------------------------------- 108091bedbe3fSmrg# Minimum version: 1.13.0 108101bedbe3fSmrg# 108111bedbe3fSmrg# This macro enables a builder to enable/disable unit testing 108121bedbe3fSmrg# It makes no assumption about the test cases implementation 108131bedbe3fSmrg# Test cases may or may not use Automake "Support for test suites" 108141bedbe3fSmrg# They may or may not use the software utility library GLib 108151bedbe3fSmrg# 108161bedbe3fSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 108171bedbe3fSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 108181bedbe3fSmrg# The variable enable_unit_tests is used by other macros in this file. 108191bedbe3fSmrg# 108201bedbe3fSmrg# Interface to module: 108211bedbe3fSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 108221bedbe3fSmrg# enable_unit_tests: used in configure.ac for additional configuration 108231bedbe3fSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 108241bedbe3fSmrg# 'no' user instructs the module not to build tests 108251bedbe3fSmrg# parm1: specify the default value, yes or no. 108261bedbe3fSmrg# 108271bedbe3fSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 108281bedbe3fSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 108291bedbe3fSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 108301bedbe3fSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108311bedbe3fSmrgm4_define([_defopt], m4_default([$1], [auto])) 108321bedbe3fSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 108331bedbe3fSmrg [Enable building unit test cases (default: ]_defopt[)]), 108341bedbe3fSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 108351bedbe3fSmrgm4_undefine([_defopt]) 108361bedbe3fSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 108371bedbe3fSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108381bedbe3fSmrgAC_MSG_RESULT([$enable_unit_tests]) 108391bedbe3fSmrg]) # XORG_ENABLE_UNIT_TESTS 108401bedbe3fSmrg 108411bedbe3fSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 108421bedbe3fSmrg# ------------------------------------------------------ 108431bedbe3fSmrg# Minimum version: 1.17.0 108441bedbe3fSmrg# 108451bedbe3fSmrg# This macro enables a builder to enable/disable integration testing 108461bedbe3fSmrg# It makes no assumption about the test cases' implementation 108471bedbe3fSmrg# Test cases may or may not use Automake "Support for test suites" 108481bedbe3fSmrg# 108491bedbe3fSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 108501bedbe3fSmrg# usually requires less dependencies and may be built and run under less 108511bedbe3fSmrg# stringent environments than integration tests. 108521bedbe3fSmrg# 108531bedbe3fSmrg# Interface to module: 108541bedbe3fSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 108551bedbe3fSmrg# enable_integration_tests: used in configure.ac for additional configuration 108561bedbe3fSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 108571bedbe3fSmrg# 'no' user instructs the module not to build tests 108581bedbe3fSmrg# parm1: specify the default value, yes or no. 108591bedbe3fSmrg# 108601bedbe3fSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 108611bedbe3fSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108621bedbe3fSmrgm4_define([_defopt], m4_default([$1], [auto])) 108631bedbe3fSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 108641bedbe3fSmrg [Enable building integration test cases (default: ]_defopt[)]), 108651bedbe3fSmrg [enable_integration_tests=$enableval], 108661bedbe3fSmrg [enable_integration_tests=]_defopt) 108671bedbe3fSmrgm4_undefine([_defopt]) 108681bedbe3fSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 108691bedbe3fSmrg [test "x$enable_integration_tests" != xno]) 108701bedbe3fSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108711bedbe3fSmrgAC_MSG_RESULT([$enable_integration_tests]) 108721bedbe3fSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 108731bedbe3fSmrg 108741bedbe3fSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 108751bedbe3fSmrg# ---------------------------------------- 108761bedbe3fSmrg# Minimum version: 1.13.0 108771bedbe3fSmrg# 108781bedbe3fSmrg# GLib is a library which provides advanced data structures and functions. 108791bedbe3fSmrg# This macro enables a module to test for the presence of Glib. 108801bedbe3fSmrg# 108811bedbe3fSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 108821bedbe3fSmrg# Otherwise the value of $enable_unit_tests is blank. 108831bedbe3fSmrg# 108841bedbe3fSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 108851bedbe3fSmrg# test support usually requires less dependencies and may be built and run under 108861bedbe3fSmrg# less stringent environments than integration tests. 108871bedbe3fSmrg# 108881bedbe3fSmrg# Interface to module: 108891bedbe3fSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 108901bedbe3fSmrg# with_glib: used in configure.ac to know if GLib has been found 108911bedbe3fSmrg# --with-glib: 'yes' user instructs the module to use glib 108921bedbe3fSmrg# 'no' user instructs the module not to use glib 108931bedbe3fSmrg# 108941bedbe3fSmrgAC_DEFUN([XORG_WITH_GLIB],[ 108951bedbe3fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 108961bedbe3fSmrgm4_define([_defopt], m4_default([$2], [auto])) 108971bedbe3fSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 108981bedbe3fSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 108991bedbe3fSmrg [with_glib=$withval], [with_glib=]_defopt) 109001bedbe3fSmrgm4_undefine([_defopt]) 109011bedbe3fSmrg 109021bedbe3fSmrghave_glib=no 109031bedbe3fSmrg# Do not probe GLib if user explicitly disabled unit testing 109041bedbe3fSmrgif test "x$enable_unit_tests" != x"no"; then 109051bedbe3fSmrg # Do not probe GLib if user explicitly disabled it 109061bedbe3fSmrg if test "x$with_glib" != x"no"; then 109071bedbe3fSmrg m4_ifval( 109081bedbe3fSmrg [$1], 109091bedbe3fSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 109101bedbe3fSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 109111bedbe3fSmrg ) 109121bedbe3fSmrg fi 109131bedbe3fSmrgfi 10914ba6a1819Smrg 109151bedbe3fSmrg# Not having GLib when unit testing has been explicitly requested is an error 109161bedbe3fSmrgif test "x$enable_unit_tests" = x"yes"; then 109171bedbe3fSmrg if test "x$have_glib" = x"no"; then 109181bedbe3fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109191bedbe3fSmrg fi 109201bedbe3fSmrgfi 10921ba6a1819Smrg 109221bedbe3fSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 109231bedbe3fSmrgif test "x$enable_unit_tests" = x"no"; then 109241bedbe3fSmrg if test "x$with_glib" = x"yes"; then 109251bedbe3fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109261bedbe3fSmrg fi 109271bedbe3fSmrgfi 10928ba6a1819Smrg 109291bedbe3fSmrg# Not having GLib when it has been explicitly requested is an error 109301bedbe3fSmrgif test "x$with_glib" = x"yes"; then 109311bedbe3fSmrg if test "x$have_glib" = x"no"; then 109321bedbe3fSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 109331bedbe3fSmrg fi 109341bedbe3fSmrgfi 10935549e21daSmrg 109361bedbe3fSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 109371bedbe3fSmrg]) # XORG_WITH_GLIB 10938ba6a1819Smrg 109391bedbe3fSmrg# XORG_LD_WRAP([required|optional]) 109401bedbe3fSmrg# --------------------------------- 109411bedbe3fSmrg# Minimum version: 1.13.0 109421bedbe3fSmrg# 109431bedbe3fSmrg# Check if linker supports -wrap, passed via compiler flags 109441bedbe3fSmrg# 109451bedbe3fSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 109461bedbe3fSmrg# Otherwise the value of $enable_unit_tests is blank. 109471bedbe3fSmrg# 109481bedbe3fSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 109491bedbe3fSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 109501bedbe3fSmrg# available, an argument of "optional" allows use when some unit tests require 109511bedbe3fSmrg# ld -wrap and others do not. 109521bedbe3fSmrg# 109531bedbe3fSmrgAC_DEFUN([XORG_LD_WRAP],[ 109541bedbe3fSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 109551bedbe3fSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 109561bedbe3fSmrg void __wrap_exit(int status) { return; }], 109571bedbe3fSmrg [exit(0);])]) 109581bedbe3fSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 109591bedbe3fSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 109601bedbe3fSmrg if test "x$have_ld_wrap" = x"no"; then 109611bedbe3fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 109621bedbe3fSmrg fi 109631bedbe3fSmrgfi 109641bedbe3fSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 109651bedbe3fSmrg# 109661bedbe3fSmrg]) # XORG_LD_WRAP 10967ba6a1819Smrg 109681bedbe3fSmrg# XORG_CHECK_LINKER_FLAGS 109691bedbe3fSmrg# ----------------------- 109701bedbe3fSmrg# SYNOPSIS 109711bedbe3fSmrg# 109721bedbe3fSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 109731bedbe3fSmrg# 109741bedbe3fSmrg# DESCRIPTION 109751bedbe3fSmrg# 109761bedbe3fSmrg# Check whether the given linker FLAGS work with the current language's 109771bedbe3fSmrg# linker, or whether they give an error. 109781bedbe3fSmrg# 109791bedbe3fSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 109801bedbe3fSmrg# success/failure. 109811bedbe3fSmrg# 109821bedbe3fSmrg# PROGRAM-SOURCE is the program source to link with, if needed 109831bedbe3fSmrg# 109841bedbe3fSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 109851bedbe3fSmrg# 109861bedbe3fSmrg# LICENSE 109871bedbe3fSmrg# 109881bedbe3fSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 109891bedbe3fSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 109901bedbe3fSmrg# Copyright (c) 2009 Matteo Frigo 109911bedbe3fSmrg# 109921bedbe3fSmrg# This program is free software: you can redistribute it and/or modify it 109931bedbe3fSmrg# under the terms of the GNU General Public License as published by the 109941bedbe3fSmrg# Free Software Foundation, either version 3 of the License, or (at your 109951bedbe3fSmrg# option) any later version. 109961bedbe3fSmrg# 109971bedbe3fSmrg# This program is distributed in the hope that it will be useful, but 109981bedbe3fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 109991bedbe3fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 110001bedbe3fSmrg# Public License for more details. 110011bedbe3fSmrg# 110021bedbe3fSmrg# You should have received a copy of the GNU General Public License along 110031bedbe3fSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 110041bedbe3fSmrg# 110051bedbe3fSmrg# As a special exception, the respective Autoconf Macro's copyright owner 110061bedbe3fSmrg# gives unlimited permission to copy, distribute and modify the configure 110071bedbe3fSmrg# scripts that are the output of Autoconf when processing the Macro. You 110081bedbe3fSmrg# need not follow the terms of the GNU General Public License when using 110091bedbe3fSmrg# or distributing such scripts, even though portions of the text of the 110101bedbe3fSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 110111bedbe3fSmrg# all other use of the material that constitutes the Autoconf Macro. 110121bedbe3fSmrg# 110131bedbe3fSmrg# This special exception to the GPL applies to versions of the Autoconf 110141bedbe3fSmrg# Macro released by the Autoconf Archive. When you make and distribute a 110151bedbe3fSmrg# modified version of the Autoconf Macro, you may extend this special 110161bedbe3fSmrg# exception to the GPL to apply to your modified version as well.# 110171bedbe3fSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 110181bedbe3fSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 110191bedbe3fSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 110201bedbe3fSmrgAS_LITERAL_IF([$1], 110211bedbe3fSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 110221bedbe3fSmrg ax_save_FLAGS=$LDFLAGS 110231bedbe3fSmrg LDFLAGS="$1" 110241bedbe3fSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 110251bedbe3fSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110261bedbe3fSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110271bedbe3fSmrg LDFLAGS=$ax_save_FLAGS])], 110281bedbe3fSmrg [ax_save_FLAGS=$LDFLAGS 110291bedbe3fSmrg LDFLAGS="$1" 110301bedbe3fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 110311bedbe3fSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110321bedbe3fSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110331bedbe3fSmrg LDFLAGS=$ax_save_FLAGS]) 110341bedbe3fSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 110351bedbe3fSmrgAC_MSG_RESULT($xorg_check_linker_flags) 110361bedbe3fSmrgif test "x$xorg_check_linker_flags" = xyes; then 110371bedbe3fSmrg m4_default([$2], :) 110381bedbe3fSmrgelse 110391bedbe3fSmrg m4_default([$3], :) 110401bedbe3fSmrgfi 110411bedbe3fSmrg]) # XORG_CHECK_LINKER_FLAGS 11042549e21daSmrg 110431bedbe3fSmrg# XORG_MEMORY_CHECK_FLAGS 110441bedbe3fSmrg# ----------------------- 110451bedbe3fSmrg# Minimum version: 1.16.0 110461bedbe3fSmrg# 110471bedbe3fSmrg# This macro attempts to find appropriate memory checking functionality 110481bedbe3fSmrg# for various platforms which unit testing code may use to catch various 110491bedbe3fSmrg# forms of memory allocation and access errors in testing. 110501bedbe3fSmrg# 110511bedbe3fSmrg# Interface to module: 110521bedbe3fSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 110531bedbe3fSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 110541bedbe3fSmrg# 110551bedbe3fSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 110561bedbe3fSmrg# 110571bedbe3fSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11058549e21daSmrg 110591bedbe3fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 110601bedbe3fSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 110611bedbe3fSmrg [Environment variables to enable memory checking in tests]) 11062549e21daSmrg 110631bedbe3fSmrg# Check for different types of support on different platforms 110641bedbe3fSmrgcase $host_os in 110651bedbe3fSmrg solaris*) 110661bedbe3fSmrg AC_CHECK_LIB([umem], [umem_alloc], 110671bedbe3fSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 110681bedbe3fSmrg ;; 110691bedbe3fSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 110701bedbe3fSmrg # both directly and inverted, so should not be 0 or 255. 110711bedbe3fSmrg malloc_debug_env='MALLOC_PERTURB_=15' 110721bedbe3fSmrg ;; 110731bedbe3fSmrg darwin*) 110741bedbe3fSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 110751bedbe3fSmrg ;; 110761bedbe3fSmrg *bsd*) 110771bedbe3fSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 110781bedbe3fSmrg ;; 110791bedbe3fSmrgesac 11080549e21daSmrg 110811bedbe3fSmrg# User supplied flags override default flags 110821bedbe3fSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 110831bedbe3fSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 110841bedbe3fSmrgfi 11085ba6a1819Smrg 110861bedbe3fSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 110871bedbe3fSmrg]) # XORG_WITH_LINT 11088ba6a1819Smrg 110891bedbe3fSmrg# XORG_CHECK_MALLOC_ZERO 110901bedbe3fSmrg# ---------------------- 110911bedbe3fSmrg# Minimum version: 1.0.0 110921bedbe3fSmrg# 110931bedbe3fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 110941bedbe3fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 110951bedbe3fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 110961bedbe3fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 110971bedbe3fSmrgAC_ARG_ENABLE(malloc0returnsnull, 110981bedbe3fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 110991bedbe3fSmrg [malloc(0) returns NULL (default: auto)]), 111001bedbe3fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 111011bedbe3fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11102ba6a1819Smrg 111031bedbe3fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 111041bedbe3fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 111051bedbe3fSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 111061bedbe3fSmrg#include <stdlib.h> 111071bedbe3fSmrg],[ 111081bedbe3fSmrg char *m0, *r0, *c0, *p; 111091bedbe3fSmrg m0 = malloc(0); 111101bedbe3fSmrg p = malloc(10); 111111bedbe3fSmrg r0 = realloc(p,0); 111121bedbe3fSmrg c0 = calloc(0,10); 111131bedbe3fSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 111141bedbe3fSmrg])], 111151bedbe3fSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 111161bedbe3fSmrg [MALLOC_ZERO_RETURNS_NULL=no], 111171bedbe3fSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 111181bedbe3fSmrgfi 111191bedbe3fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11120ba6a1819Smrg 111211bedbe3fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 111221bedbe3fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 111231bedbe3fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 111241bedbe3fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 111251bedbe3fSmrgelse 111261bedbe3fSmrg MALLOC_ZERO_CFLAGS="" 111271bedbe3fSmrg XMALLOC_ZERO_CFLAGS="" 111281bedbe3fSmrg XTMALLOC_ZERO_CFLAGS="" 111291bedbe3fSmrgfi 11130ba6a1819Smrg 111311bedbe3fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 111321bedbe3fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 111331bedbe3fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 111341bedbe3fSmrg]) # XORG_CHECK_MALLOC_ZERO 11135ba6a1819Smrg 111361bedbe3fSmrg# XORG_WITH_LINT() 111371bedbe3fSmrg# ---------------- 111381bedbe3fSmrg# Minimum version: 1.1.0 111391bedbe3fSmrg# 111401bedbe3fSmrg# This macro enables the use of a tool that flags some suspicious and 111411bedbe3fSmrg# non-portable constructs (likely to be bugs) in C language source code. 111421bedbe3fSmrg# It will attempt to locate the tool and use appropriate options. 111431bedbe3fSmrg# There are various lint type tools on different platforms. 111441bedbe3fSmrg# 111451bedbe3fSmrg# Interface to module: 111461bedbe3fSmrg# LINT: returns the path to the tool found on the platform 111471bedbe3fSmrg# or the value set to LINT on the configure cmd line 111481bedbe3fSmrg# also an Automake conditional 111491bedbe3fSmrg# LINT_FLAGS: an Automake variable with appropriate flags 111501bedbe3fSmrg# 111511bedbe3fSmrg# --with-lint: 'yes' user instructs the module to use lint 111521bedbe3fSmrg# 'no' user instructs the module not to use lint (default) 111531bedbe3fSmrg# 111541bedbe3fSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 111551bedbe3fSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 111561bedbe3fSmrg# 111571bedbe3fSmrgAC_DEFUN([XORG_WITH_LINT],[ 11158ba6a1819Smrg 111591bedbe3fSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 111601bedbe3fSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 111611bedbe3fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 111621bedbe3fSmrg [Use a lint-style source code checker (default: disabled)])], 111631bedbe3fSmrg [use_lint=$withval], [use_lint=no]) 11164ba6a1819Smrg 111651bedbe3fSmrg# Obtain platform specific info like program name and options 111661bedbe3fSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 111671bedbe3fSmrgcase $host_os in 111681bedbe3fSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 111691bedbe3fSmrg lint_name=splint 111701bedbe3fSmrg lint_options="-badflag" 111711bedbe3fSmrg ;; 111721bedbe3fSmrg *freebsd* | *netbsd*) 111731bedbe3fSmrg lint_name=lint 111741bedbe3fSmrg lint_options="-u -b" 111751bedbe3fSmrg ;; 111761bedbe3fSmrg *solaris*) 111771bedbe3fSmrg lint_name=lint 111781bedbe3fSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 111791bedbe3fSmrg ;; 111801bedbe3fSmrgesac 11181ba6a1819Smrg 111821bedbe3fSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 111831bedbe3fSmrgif test "x$use_lint" = x"yes" ; then 111841bedbe3fSmrg AC_PATH_PROG([LINT], [$lint_name]) 111851bedbe3fSmrg if test "x$LINT" = "x"; then 111861bedbe3fSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 111871bedbe3fSmrg fi 111881bedbe3fSmrgelif test "x$use_lint" = x"no" ; then 111891bedbe3fSmrg if test "x$LINT" != "x"; then 111901bedbe3fSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 111911bedbe3fSmrg fi 111921bedbe3fSmrgelse 111931bedbe3fSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 111941bedbe3fSmrgfi 11195ba6a1819Smrg 111961bedbe3fSmrg# User supplied flags override default flags 111971bedbe3fSmrgif test "x$LINT_FLAGS" != "x"; then 111981bedbe3fSmrg lint_options=$LINT_FLAGS 111991bedbe3fSmrgfi 11200ba6a1819Smrg 112011bedbe3fSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 112021bedbe3fSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11203549e21daSmrg 112041bedbe3fSmrg]) # XORG_WITH_LINT 11205549e21daSmrg 112061bedbe3fSmrg# XORG_LINT_LIBRARY(LIBNAME) 112071bedbe3fSmrg# -------------------------- 112081bedbe3fSmrg# Minimum version: 1.1.0 11209ba6a1819Smrg# 112101bedbe3fSmrg# Sets up flags for building lint libraries for checking programs that call 112111bedbe3fSmrg# functions in the library. 11212ba6a1819Smrg# 112131bedbe3fSmrg# Interface to module: 112141bedbe3fSmrg# LINTLIB - Automake variable with the name of lint library file to make 112151bedbe3fSmrg# MAKE_LINT_LIB - Automake conditional 112161bedbe3fSmrg# 112171bedbe3fSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 112181bedbe3fSmrg# - 'no' user instructs the module not to create a lint library (default) 11219549e21daSmrg 112201bedbe3fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 112211bedbe3fSmrgAC_REQUIRE([XORG_WITH_LINT]) 112221bedbe3fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 112231bedbe3fSmrg [Create lint library (default: disabled)])], 112241bedbe3fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11225549e21daSmrg 112261bedbe3fSmrgif test "x$make_lint_lib" = x"yes" ; then 112271bedbe3fSmrg LINTLIB=llib-l$1.ln 112281bedbe3fSmrg if test "x$LINT" = "x"; then 112291bedbe3fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 112301bedbe3fSmrg fi 112311bedbe3fSmrgelif test "x$make_lint_lib" != x"no" ; then 112321bedbe3fSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 112331bedbe3fSmrgfi 11234549e21daSmrg 112351bedbe3fSmrgAC_SUBST(LINTLIB) 112361bedbe3fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11237549e21daSmrg 112381bedbe3fSmrg]) # XORG_LINT_LIBRARY 11239549e21daSmrg 112401bedbe3fSmrg# XORG_COMPILER_BRAND 112411bedbe3fSmrg# ------------------- 112421bedbe3fSmrg# Minimum version: 1.14.0 112431bedbe3fSmrg# 112441bedbe3fSmrg# Checks for various brands of compilers and sets flags as appropriate: 112451bedbe3fSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 112461bedbe3fSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 112471bedbe3fSmrg# clang compiler - sets CLANGCC to "yes" 112481bedbe3fSmrg# Intel compiler - sets INTELCC to "yes" 112491bedbe3fSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 112501bedbe3fSmrg# 112511bedbe3fSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 112521bedbe3fSmrgAC_LANG_CASE( 112531bedbe3fSmrg [C], [ 112541bedbe3fSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112551bedbe3fSmrg ], 112561bedbe3fSmrg [C++], [ 112571bedbe3fSmrg AC_REQUIRE([AC_PROG_CXX]) 112581bedbe3fSmrg ] 112591bedbe3fSmrg) 112601bedbe3fSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 112611bedbe3fSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 112621bedbe3fSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 112631bedbe3fSmrg]) # XORG_COMPILER_BRAND 11264549e21daSmrg 112651bedbe3fSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 112661bedbe3fSmrg# --------------- 112671bedbe3fSmrg# Minimum version: 1.16.0 112681bedbe3fSmrg# 112691bedbe3fSmrg# Test if the compiler works when passed the given flag as a command line argument. 112701bedbe3fSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 112711bedbe3fSmrg# next flag in the list until there are no more options. 112721bedbe3fSmrg# 112731bedbe3fSmrg# Note that this does not guarantee that the compiler supports the flag as some 112741bedbe3fSmrg# compilers will simply ignore arguments that they do not understand, but we do 112751bedbe3fSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 112761bedbe3fSmrg# -Werror=unused-command-line-argument 112771bedbe3fSmrg# 112781bedbe3fSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 112791bedbe3fSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112801bedbe3fSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112811bedbe3fSmrg 112821bedbe3fSmrgAC_LANG_COMPILER_REQUIRE 112831bedbe3fSmrg 112841bedbe3fSmrgAC_LANG_CASE( 112851bedbe3fSmrg [C], [ 112861bedbe3fSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112871bedbe3fSmrg define([PREFIX], [C]) 112881bedbe3fSmrg define([CACHE_PREFIX], [cc]) 112891bedbe3fSmrg define([COMPILER], [$CC]) 112901bedbe3fSmrg ], 112911bedbe3fSmrg [C++], [ 112921bedbe3fSmrg define([PREFIX], [CXX]) 112931bedbe3fSmrg define([CACHE_PREFIX], [cxx]) 112941bedbe3fSmrg define([COMPILER], [$CXX]) 112951bedbe3fSmrg ] 112961bedbe3fSmrg) 11297549e21daSmrg 112981bedbe3fSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 112991bedbe3fSmrg 113001bedbe3fSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 113011bedbe3fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113021bedbe3fSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 113031bedbe3fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 113041bedbe3fSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113051bedbe3fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 113061bedbe3fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 113071bedbe3fSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 113081bedbe3fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113091bedbe3fSmrgfi 11310549e21daSmrg 113111bedbe3fSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 113121bedbe3fSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 113131bedbe3fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113141bedbe3fSmrg fi 113151bedbe3fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113161bedbe3fSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 113171bedbe3fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 113181bedbe3fSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113191bedbe3fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 113201bedbe3fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 113211bedbe3fSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 113221bedbe3fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113231bedbe3fSmrgfi 11324549e21daSmrg 113251bedbe3fSmrgfound="no" 113261bedbe3fSmrgm4_foreach([flag], m4_cdr($@), [ 113271bedbe3fSmrg if test $found = "no" ; then 113281bedbe3fSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 113291bedbe3fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113301bedbe3fSmrg fi 113311bedbe3fSmrg 113321bedbe3fSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 113331bedbe3fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113341bedbe3fSmrg fi 113351bedbe3fSmrg 113361bedbe3fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 113371bedbe3fSmrg 113381bedbe3fSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 113391bedbe3fSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 113401bedbe3fSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 113411bedbe3fSmrg AC_CACHE_VAL($cacheid, 113421bedbe3fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 113431bedbe3fSmrg [eval $cacheid=yes], 113441bedbe3fSmrg [eval $cacheid=no])]) 113451bedbe3fSmrg 113461bedbe3fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113471bedbe3fSmrg 113481bedbe3fSmrg eval supported=\$$cacheid 113491bedbe3fSmrg AC_MSG_RESULT([$supported]) 113501bedbe3fSmrg if test "$supported" = "yes" ; then 113511bedbe3fSmrg $1="$$1 ]flag[" 113521bedbe3fSmrg found="yes" 113531bedbe3fSmrg fi 113541bedbe3fSmrg fi 113551bedbe3fSmrg]) 113561bedbe3fSmrg]) # XORG_TESTSET_CFLAG 11357549e21daSmrg 113581bedbe3fSmrg# XORG_COMPILER_FLAGS 113591bedbe3fSmrg# --------------- 113601bedbe3fSmrg# Minimum version: 1.16.0 113611bedbe3fSmrg# 113621bedbe3fSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 113631bedbe3fSmrg# arguments supported by the selected compiler which do NOT alter the generated 113641bedbe3fSmrg# code. These arguments will cause the compiler to print various warnings 113651bedbe3fSmrg# during compilation AND turn a conservative set of warnings into errors. 113661bedbe3fSmrg# 113671bedbe3fSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 113681bedbe3fSmrg# future versions of util-macros as options are added to new compilers. 113691bedbe3fSmrg# 113701bedbe3fSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 113711bedbe3fSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 113721bedbe3fSmrg 113731bedbe3fSmrgAC_ARG_ENABLE(selective-werror, 113741bedbe3fSmrg AS_HELP_STRING([--disable-selective-werror], 113751bedbe3fSmrg [Turn off selective compiler errors. (default: enabled)]), 113761bedbe3fSmrg [SELECTIVE_WERROR=$enableval], 113771bedbe3fSmrg [SELECTIVE_WERROR=yes]) 113781bedbe3fSmrg 113791bedbe3fSmrgAC_LANG_CASE( 113801bedbe3fSmrg [C], [ 113811bedbe3fSmrg define([PREFIX], [C]) 113821bedbe3fSmrg ], 113831bedbe3fSmrg [C++], [ 113841bedbe3fSmrg define([PREFIX], [CXX]) 113851bedbe3fSmrg ] 113861bedbe3fSmrg) 113871bedbe3fSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 113881bedbe3fSmrgif test "x$SUNCC" = "xyes"; then 113891bedbe3fSmrg [BASE_]PREFIX[FLAGS]="-v" 113901bedbe3fSmrgelse 113911bedbe3fSmrg [BASE_]PREFIX[FLAGS]="" 113921bedbe3fSmrgfi 11393549e21daSmrg 113941bedbe3fSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 113951bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 113961bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 113971bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 113981bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 113991bedbe3fSmrg 114001bedbe3fSmrgAC_LANG_CASE( 114011bedbe3fSmrg [C], [ 114021bedbe3fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 114031bedbe3fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 114041bedbe3fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 114051bedbe3fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 114061bedbe3fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 114071bedbe3fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 114081bedbe3fSmrg ] 114091bedbe3fSmrg) 11410549e21daSmrg 114111bedbe3fSmrg# This chunk adds additional warnings that could catch undesired effects. 114121bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 114131bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 114141bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 114151bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 114161bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 114171bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 114181bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 114191bedbe3fSmrg 114201bedbe3fSmrg# These are currently disabled because they are noisy. They will be enabled 114211bedbe3fSmrg# in the future once the codebase is sufficiently modernized to silence 114221bedbe3fSmrg# them. For now, I don't want them to drown out the other warnings. 114231bedbe3fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 114241bedbe3fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 114251bedbe3fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 114261bedbe3fSmrg 114271bedbe3fSmrg# Turn some warnings into errors, so we don't accidently get successful builds 114281bedbe3fSmrg# when there are problems that should be fixed. 114291bedbe3fSmrg 114301bedbe3fSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 114311bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 114321bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 114331bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 114341bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 114351bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 114361bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 114371bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 114381bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 114391bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 114401bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 114411bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 114421bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 114431bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 114441bedbe3fSmrgelse 114451bedbe3fSmrgAC_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]) 114461bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 114471bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 114481bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 114491bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 114501bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 114511bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 114521bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 114531bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 114541bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 114551bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 114561bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 114571bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 114581bedbe3fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 114591bedbe3fSmrgfi 11460549e21daSmrg 114611bedbe3fSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 114621bedbe3fSmrg]) # XORG_COMPILER_FLAGS 11463549e21daSmrg 114641bedbe3fSmrg# XORG_CWARNFLAGS 114651bedbe3fSmrg# --------------- 114661bedbe3fSmrg# Minimum version: 1.2.0 114671bedbe3fSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 114681bedbe3fSmrg# 114691bedbe3fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 114701bedbe3fSmrg# 114711bedbe3fSmrg# This function is deprecated because it defines -fno-strict-aliasing 114721bedbe3fSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 114731bedbe3fSmrg# is needed, then it should be added explicitly in the module when 114741bedbe3fSmrg# it is updated to use BASE_CFLAGS. 114751bedbe3fSmrg# 114761bedbe3fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 114771bedbe3fSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 114781bedbe3fSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 114791bedbe3fSmrgAC_LANG_CASE( 114801bedbe3fSmrg [C], [ 114811bedbe3fSmrg CWARNFLAGS="$BASE_CFLAGS" 114821bedbe3fSmrg if test "x$GCC" = xyes ; then 114831bedbe3fSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 114841bedbe3fSmrg fi 114851bedbe3fSmrg AC_SUBST(CWARNFLAGS) 114861bedbe3fSmrg ] 114871bedbe3fSmrg) 114881bedbe3fSmrg]) # XORG_CWARNFLAGS 11489549e21daSmrg 114901bedbe3fSmrg# XORG_STRICT_OPTION 114911bedbe3fSmrg# ----------------------- 114921bedbe3fSmrg# Minimum version: 1.3.0 114931bedbe3fSmrg# 114941bedbe3fSmrg# Add configure option to enable strict compilation flags, such as treating 114951bedbe3fSmrg# warnings as fatal errors. 114961bedbe3fSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 114971bedbe3fSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 114981bedbe3fSmrg# 114991bedbe3fSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 115001bedbe3fSmrg# when strict compilation is unconditionally desired. 115011bedbe3fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 115021bedbe3fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 115031bedbe3fSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11504ba6a1819Smrg 115051bedbe3fSmrgAC_ARG_ENABLE(strict-compilation, 115061bedbe3fSmrg AS_HELP_STRING([--enable-strict-compilation], 115071bedbe3fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 115081bedbe3fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11509549e21daSmrg 115101bedbe3fSmrgAC_LANG_CASE( 115111bedbe3fSmrg [C], [ 115121bedbe3fSmrg define([PREFIX], [C]) 115131bedbe3fSmrg ], 115141bedbe3fSmrg [C++], [ 115151bedbe3fSmrg define([PREFIX], [CXX]) 115161bedbe3fSmrg ] 115171bedbe3fSmrg) 11518549e21daSmrg 115191bedbe3fSmrg[STRICT_]PREFIX[FLAGS]="" 115201bedbe3fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 115211bedbe3fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11522549e21daSmrg 115231bedbe3fSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 115241bedbe3fSmrg# activate it with -Werror, so we add it here explicitly. 115251bedbe3fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11526ba6a1819Smrg 115271bedbe3fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 115281bedbe3fSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 115291bedbe3fSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 115301bedbe3fSmrgfi 115311bedbe3fSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 115321bedbe3fSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115331bedbe3fSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 115341bedbe3fSmrg]) # XORG_STRICT_OPTION 11535ba6a1819Smrg 115361bedbe3fSmrg# XORG_DEFAULT_OPTIONS 115371bedbe3fSmrg# -------------------- 115381bedbe3fSmrg# Minimum version: 1.3.0 115391bedbe3fSmrg# 115401bedbe3fSmrg# Defines default options for X.Org modules. 115411bedbe3fSmrg# 115421bedbe3fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 115431bedbe3fSmrgAC_REQUIRE([AC_PROG_INSTALL]) 115441bedbe3fSmrgXORG_COMPILER_FLAGS 115451bedbe3fSmrgXORG_CWARNFLAGS 115461bedbe3fSmrgXORG_STRICT_OPTION 115471bedbe3fSmrgXORG_RELEASE_VERSION 115481bedbe3fSmrgXORG_CHANGELOG 115491bedbe3fSmrgXORG_INSTALL 115501bedbe3fSmrgXORG_MANPAGE_SECTIONS 115511bedbe3fSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 115521bedbe3fSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 115531bedbe3fSmrg]) # XORG_DEFAULT_OPTIONS 11554ba6a1819Smrg 115551bedbe3fSmrg# XORG_INSTALL() 115561bedbe3fSmrg# ---------------- 115571bedbe3fSmrg# Minimum version: 1.4.0 115581bedbe3fSmrg# 115591bedbe3fSmrg# Defines the variable INSTALL_CMD as the command to copy 115601bedbe3fSmrg# INSTALL from $prefix/share/util-macros. 115611bedbe3fSmrg# 115621bedbe3fSmrgAC_DEFUN([XORG_INSTALL], [ 115631bedbe3fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 115641bedbe3fSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 115651bedbe3fSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 115661bedbe3fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 115671bedbe3fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 115681bedbe3fSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 115691bedbe3fSmrgAC_SUBST([INSTALL_CMD]) 115701bedbe3fSmrg]) # XORG_INSTALL 115711bedbe3fSmrgdnl Copyright 2005 Red Hat, Inc 115721bedbe3fSmrgdnl 115731bedbe3fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 115741bedbe3fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 115751bedbe3fSmrgdnl the above copyright notice appear in all copies and that both that 115761bedbe3fSmrgdnl copyright notice and this permission notice appear in supporting 115771bedbe3fSmrgdnl documentation. 115781bedbe3fSmrgdnl 115791bedbe3fSmrgdnl The above copyright notice and this permission notice shall be included 115801bedbe3fSmrgdnl in all copies or substantial portions of the Software. 115811bedbe3fSmrgdnl 115821bedbe3fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 115831bedbe3fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 115841bedbe3fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 115851bedbe3fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 115861bedbe3fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 115871bedbe3fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 115881bedbe3fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 115891bedbe3fSmrgdnl 115901bedbe3fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 115911bedbe3fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 115921bedbe3fSmrgdnl other dealings in this Software without prior written authorization 115931bedbe3fSmrgdnl from the copyright holders. 115941bedbe3fSmrgdnl 11595ba6a1819Smrg 115961bedbe3fSmrg# XORG_RELEASE_VERSION 115971bedbe3fSmrg# -------------------- 115981bedbe3fSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 115991bedbe3fSmrg 116001bedbe3fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 116011bedbe3fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 116021bedbe3fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 116031bedbe3fSmrg [Major version of this package]) 116041bedbe3fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 116051bedbe3fSmrg if test "x$PVM" = "x"; then 116061bedbe3fSmrg PVM="0" 116071bedbe3fSmrg fi 116081bedbe3fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 116091bedbe3fSmrg [$PVM], 116101bedbe3fSmrg [Minor version of this package]) 116111bedbe3fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 116121bedbe3fSmrg if test "x$PVP" = "x"; then 116131bedbe3fSmrg PVP="0" 116141bedbe3fSmrg fi 116151bedbe3fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 116161bedbe3fSmrg [$PVP], 116171bedbe3fSmrg [Patch version of this package]) 11618549e21daSmrg]) 11619549e21daSmrg 116201bedbe3fSmrg# XORG_CHANGELOG() 116211bedbe3fSmrg# ---------------- 116221bedbe3fSmrg# Minimum version: 1.2.0 11623ba6a1819Smrg# 116241bedbe3fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 116251bedbe3fSmrg# ChangeLog from git. 11626ba6a1819Smrg# 116271bedbe3fSmrg# 116281bedbe3fSmrgAC_DEFUN([XORG_CHANGELOG], [ 116291bedbe3fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 116301bedbe3fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 116311bedbe3fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 116321bedbe3fSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 116331bedbe3fSmrgAC_SUBST([CHANGELOG_CMD]) 116341bedbe3fSmrg]) # XORG_CHANGELOG 11635ba6a1819Smrg 116361bedbe3fSmrgdnl 116371bedbe3fSmrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 116381bedbe3fSmrgdnl 116391bedbe3fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 116401bedbe3fSmrgdnl copy of this software and associated documentation files (the "Software"), 116411bedbe3fSmrgdnl to deal in the Software without restriction, including without limitation 116421bedbe3fSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 116431bedbe3fSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 116441bedbe3fSmrgdnl Software is furnished to do so, subject to the following conditions: 116451bedbe3fSmrgdnl 116461bedbe3fSmrgdnl The above copyright notice and this permission notice (including the next 116471bedbe3fSmrgdnl paragraph) shall be included in all copies or substantial portions of the 116481bedbe3fSmrgdnl Software. 116491bedbe3fSmrgdnl 116501bedbe3fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 116511bedbe3fSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 116521bedbe3fSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 116531bedbe3fSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 116541bedbe3fSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 116551bedbe3fSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 116561bedbe3fSmrgdnl DEALINGS IN THE SOFTWARE. 116571bedbe3fSmrgdnl 11658ba6a1819Smrg 116591bedbe3fSmrg# XTRANS_TCP_FLAGS() 116601bedbe3fSmrg# ------------------ 116611bedbe3fSmrg# Find needed libraries for TCP sockets, and check for IPv6 support 116621bedbe3fSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 116631bedbe3fSmrg # SVR4 hides these in libraries other than libc 116641bedbe3fSmrg AC_SEARCH_LIBS(socket, [socket]) 116651bedbe3fSmrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 116661bedbe3fSmrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 116671bedbe3fSmrg AC_HAVE_LIBRARY([ws2_32]) 116681bedbe3fSmrg fi 11669ba6a1819Smrg 116701bedbe3fSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 116711bedbe3fSmrg AC_ARG_ENABLE(ipv6, 116721bedbe3fSmrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 116731bedbe3fSmrg [IPV6CONN=$enableval], 116741bedbe3fSmrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 116751bedbe3fSmrg AC_MSG_CHECKING([if IPv6 support should be built]) 116761bedbe3fSmrg if test "$IPV6CONN" = "yes"; then 116771bedbe3fSmrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 116781bedbe3fSmrg fi 116791bedbe3fSmrg AC_MSG_RESULT($IPV6CONN) 11680ba6a1819Smrg 116811bedbe3fSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in 116821bedbe3fSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 116831bedbe3fSmrg AC_DEFINE([BSD44SOCKETS],1, 116841bedbe3fSmrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 116851bedbe3fSmrg#include <sys/types.h> 116861bedbe3fSmrg#include <sys/socket.h> 116871bedbe3fSmrg#include <netinet/in.h> 116881bedbe3fSmrg ]) 11689ba6a1819Smrg 116901bedbe3fSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 116911bedbe3fSmrg AC_CHECK_TYPES([socklen_t], [], [], [ 116921bedbe3fSmrgAC_INCLUDES_DEFAULT 116931bedbe3fSmrg#include <sys/socket.h>]) 11694ba6a1819Smrg 116951bedbe3fSmrg]) # XTRANS_TCP_FLAGS 11696ba6a1819Smrg 116971bedbe3fSmrg# XTRANS_CONNECTION_FLAGS() 116981bedbe3fSmrg# ------------------------- 116991bedbe3fSmrg# Standard checks for which Xtrans transports to use by the Xorg packages 117001bedbe3fSmrg# that use Xtrans functions 117011bedbe3fSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 117021bedbe3fSmrg AC_REQUIRE([AC_CANONICAL_HOST]) 117031bedbe3fSmrg AC_REQUIRE([AC_TYPE_SIGNAL]) 117041bedbe3fSmrg [case $host_os in 117051bedbe3fSmrg mingw*) unixdef="no" ;; 117061bedbe3fSmrg *) unixdef="yes" ;; 117071bedbe3fSmrg esac] 117081bedbe3fSmrg AC_ARG_ENABLE(unix-transport, 117091bedbe3fSmrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 117101bedbe3fSmrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 117111bedbe3fSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 117121bedbe3fSmrg if test "$UNIXCONN" = "yes"; then 117131bedbe3fSmrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 117141bedbe3fSmrg fi 117151bedbe3fSmrg AC_MSG_RESULT($UNIXCONN) 117161bedbe3fSmrg AC_ARG_ENABLE(tcp-transport, 117171bedbe3fSmrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 117181bedbe3fSmrg [TCPCONN=$enableval], [TCPCONN=yes]) 117191bedbe3fSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 117201bedbe3fSmrg AC_MSG_RESULT($TCPCONN) 117211bedbe3fSmrg if test "$TCPCONN" = "yes"; then 117221bedbe3fSmrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 117231bedbe3fSmrg XTRANS_TCP_FLAGS 117241bedbe3fSmrg fi 117251bedbe3fSmrg [case $host_os in 117261bedbe3fSmrg solaris*|sco*|sysv4*) localdef="yes" ;; 117271bedbe3fSmrg *) localdef="no" ;; 117281bedbe3fSmrg esac] 117291bedbe3fSmrg AC_ARG_ENABLE(local-transport, 117301bedbe3fSmrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 117311bedbe3fSmrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 117321bedbe3fSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 117331bedbe3fSmrg AC_MSG_RESULT($LOCALCONN) 117341bedbe3fSmrg if test "$LOCALCONN" = "yes"; then 117351bedbe3fSmrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 117361bedbe3fSmrg fi 11737549e21daSmrg 117381bedbe3fSmrg]) # XTRANS_CONNECTION_FLAGS 117391bedbe3fSmrg 117401bedbe3fSmrg 117411bedbe3fSmrg# XTRANS_SECURE_RPC_FLAGS() 117421bedbe3fSmrg# ------------------------- 117431bedbe3fSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 117441bedbe3fSmrg# so that any necessary networking libraries are already found 117451bedbe3fSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 117461bedbe3fSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 117471bedbe3fSmrg AC_ARG_ENABLE(secure-rpc, 117481bedbe3fSmrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 117491bedbe3fSmrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 117501bedbe3fSmrg 117511bedbe3fSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 117521bedbe3fSmrg FOUND_SECURE_RPC="no" 117531bedbe3fSmrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 117541bedbe3fSmrg [FOUND_SECURE_RPC="yes"]) 117551bedbe3fSmrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 117561bedbe3fSmrg if test "x$SECURE_RPC" = "xyes" ; then 117571bedbe3fSmrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 117581bedbe3fSmrg fi 117591bedbe3fSmrg SECURE_RPC="no" 117601bedbe3fSmrg else 117611bedbe3fSmrg dnl FreeBSD keeps getsecretkey in librpcsvc 117621bedbe3fSmrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 117631bedbe3fSmrg SECURE_RPC="yes" 117641bedbe3fSmrg fi 117651bedbe3fSmrg fi 117661bedbe3fSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 117671bedbe3fSmrg if test "x$SECURE_RPC" = "xyes" ; then 117681bedbe3fSmrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 117691bedbe3fSmrg fi 117701bedbe3fSmrg AC_MSG_RESULT($SECURE_RPC) 117711bedbe3fSmrg]) # XTRANS_SECURE_RPC_FLAGS 11772549e21daSmrg 11773ba6a1819Smrg 11774