aclocal.m4 revision 555991fd
1555991fdSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2126a8a12Smrg 3126a8a12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4d656433aSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5126a8a12Smrg# This file is free software; the Free Software Foundation 6126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7126a8a12Smrg# with or without modifications, as long as this notice is preserved. 8126a8a12Smrg 9126a8a12Smrg# This program is distributed in the hope that it will be useful, 10126a8a12Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11126a8a12Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12126a8a12Smrg# PARTICULAR PURPOSE. 13126a8a12Smrg 14d656433aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15d656433aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16555991fdSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17555991fdSmrg[m4_warning([this file was generated for autoconf 2.68. 18d656433aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19d656433aSmrgIf you have problems, you may need to regenerate the build system entirely. 20d656433aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21126a8a12Smrg 22555991fdSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23d656433aSmrg# 24555991fdSmrg# This file is free software; the Free Software Foundation 25555991fdSmrg# gives unlimited permission to copy and/or distribute it, 26555991fdSmrg# with or without modifications, as long as this notice is preserved. 27555991fdSmrg 28555991fdSmrg# AM_AUTOMAKE_VERSION(VERSION) 29555991fdSmrg# ---------------------------- 30555991fdSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31555991fdSmrg# generated from the m4 files accompanying Automake X.Y. 32555991fdSmrg# (This private macro should not be called outside this file.) 33555991fdSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34555991fdSmrg[am__api_version='1.11' 35555991fdSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36555991fdSmrgdnl require some minimum version. Point them to the right macro. 37555991fdSmrgm4_if([$1], [1.11.1], [], 38555991fdSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39555991fdSmrg]) 40555991fdSmrg 41555991fdSmrg# _AM_AUTOCONF_VERSION(VERSION) 42555991fdSmrg# ----------------------------- 43555991fdSmrg# aclocal traces this macro to find the Autoconf version. 44555991fdSmrg# This is a private macro too. Using m4_define simplifies 45555991fdSmrg# the logic in aclocal, which can simply ignore this definition. 46555991fdSmrgm4_define([_AM_AUTOCONF_VERSION], []) 47555991fdSmrg 48555991fdSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49555991fdSmrg# ------------------------------- 50555991fdSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51555991fdSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52555991fdSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53555991fdSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 54555991fdSmrgm4_ifndef([AC_AUTOCONF_VERSION], 55555991fdSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56555991fdSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57555991fdSmrg 58555991fdSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59555991fdSmrg 60555991fdSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61d656433aSmrg# 62555991fdSmrg# This file is free software; the Free Software Foundation 63555991fdSmrg# gives unlimited permission to copy and/or distribute it, 64555991fdSmrg# with or without modifications, as long as this notice is preserved. 65d656433aSmrg 66555991fdSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67555991fdSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68555991fdSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69d656433aSmrg# 70555991fdSmrg# Of course, Automake must honor this variable whenever it calls a 71555991fdSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 72555991fdSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73555991fdSmrg# depending on how configure is run. This is pretty annoying, since 74555991fdSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75555991fdSmrg# source directory, any form will work fine, but in subdirectories a 76555991fdSmrg# relative path needs to be adjusted first. 77d656433aSmrg# 78555991fdSmrg# $ac_aux_dir/missing 79555991fdSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 80555991fdSmrg# $top_srcdir/$ac_aux_dir/missing 81555991fdSmrg# fails if $ac_aux_dir is absolute, 82555991fdSmrg# fails when called from a subdirectory in a VPATH build with 83555991fdSmrg# a relative $ac_aux_dir 84d656433aSmrg# 85555991fdSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86555991fdSmrg# are both prefixed by $srcdir. In an in-source build this is usually 87555991fdSmrg# harmless because $srcdir is `.', but things will broke when you 88555991fdSmrg# start a VPATH build or use an absolute $srcdir. 89d656433aSmrg# 90555991fdSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91555991fdSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92555991fdSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93555991fdSmrg# and then we would define $MISSING as 94555991fdSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 95555991fdSmrg# This will work as long as MISSING is not called from configure, because 96555991fdSmrg# unfortunately $(top_srcdir) has no meaning in configure. 97555991fdSmrg# However there are other variables, like CC, which are often used in 98555991fdSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99d656433aSmrg# 100555991fdSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 101555991fdSmrg# absolute PATH. The drawback is that using absolute paths prevent a 102555991fdSmrg# configured tree to be moved without reconfiguration. 103126a8a12Smrg 104555991fdSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105555991fdSmrg[dnl Rely on autoconf to set up CDPATH properly. 106555991fdSmrgAC_PREREQ([2.50])dnl 107555991fdSmrg# expand $ac_aux_dir to an absolute path 108555991fdSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109d656433aSmrg]) 110d656433aSmrg 111555991fdSmrg# AM_CONDITIONAL -*- Autoconf -*- 112d656433aSmrg 113555991fdSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114555991fdSmrg# Free Software Foundation, Inc. 115555991fdSmrg# 116555991fdSmrg# This file is free software; the Free Software Foundation 117555991fdSmrg# gives unlimited permission to copy and/or distribute it, 118555991fdSmrg# with or without modifications, as long as this notice is preserved. 119126a8a12Smrg 120555991fdSmrg# serial 9 121126a8a12Smrg 122555991fdSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123555991fdSmrg# ------------------------------------- 124555991fdSmrg# Define a conditional. 125555991fdSmrgAC_DEFUN([AM_CONDITIONAL], 126555991fdSmrg[AC_PREREQ(2.52)dnl 127555991fdSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128555991fdSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129555991fdSmrgAC_SUBST([$1_TRUE])dnl 130555991fdSmrgAC_SUBST([$1_FALSE])dnl 131555991fdSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132555991fdSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133555991fdSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134555991fdSmrgif $2; then 135555991fdSmrg $1_TRUE= 136555991fdSmrg $1_FALSE='#' 137555991fdSmrgelse 138555991fdSmrg $1_TRUE='#' 139555991fdSmrg $1_FALSE= 140555991fdSmrgfi 141555991fdSmrgAC_CONFIG_COMMANDS_PRE( 142555991fdSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143555991fdSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 144555991fdSmrgUsually this means the macro was only invoked conditionally.]]) 145555991fdSmrgfi])]) 146126a8a12Smrg 147555991fdSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148555991fdSmrg# Free Software Foundation, Inc. 149555991fdSmrg# 150555991fdSmrg# This file is free software; the Free Software Foundation 151555991fdSmrg# gives unlimited permission to copy and/or distribute it, 152555991fdSmrg# with or without modifications, as long as this notice is preserved. 153d656433aSmrg 154555991fdSmrg# serial 10 155d656433aSmrg 156555991fdSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157555991fdSmrg# written in clear, in which case automake, when reading aclocal.m4, 158555991fdSmrg# will think it sees a *use*, and therefore will trigger all it's 159555991fdSmrg# C support machinery. Also note that it means that autoscan, seeing 160555991fdSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161d656433aSmrg 162d656433aSmrg 163555991fdSmrg# _AM_DEPENDENCIES(NAME) 164d656433aSmrg# ---------------------- 165555991fdSmrg# See how the compiler implements dependency checking. 166555991fdSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167555991fdSmrg# We try a few techniques and use that to set a single cache variable. 168555991fdSmrg# 169555991fdSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170555991fdSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171555991fdSmrg# dependency, and given that the user is not expected to run this macro, 172555991fdSmrg# just rely on AC_PROG_CC. 173555991fdSmrgAC_DEFUN([_AM_DEPENDENCIES], 174555991fdSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175555991fdSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176555991fdSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177555991fdSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178d656433aSmrg 179555991fdSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180555991fdSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181555991fdSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182555991fdSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183555991fdSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184555991fdSmrg [depcc="$$1" am_compiler_list=]) 185d656433aSmrg 186555991fdSmrgAC_CACHE_CHECK([dependency style of $depcc], 187555991fdSmrg [am_cv_$1_dependencies_compiler_type], 188555991fdSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189555991fdSmrg # We make a subdir and do the tests there. Otherwise we can end up 190555991fdSmrg # making bogus files that we don't know about and never remove. For 191555991fdSmrg # instance it was reported that on HP-UX the gcc test will end up 192555991fdSmrg # making a dummy file named `D' -- because `-MD' means `put the output 193555991fdSmrg # in D'. 194555991fdSmrg mkdir conftest.dir 195555991fdSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 196555991fdSmrg # using a relative directory. 197555991fdSmrg cp "$am_depcomp" conftest.dir 198555991fdSmrg cd conftest.dir 199555991fdSmrg # We will build objects and dependencies in a subdirectory because 200555991fdSmrg # it helps to detect inapplicable dependency modes. For instance 201555991fdSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 202555991fdSmrg # side effect of compilation, but ICC will put the dependencies in 203555991fdSmrg # the current directory while Tru64 will put them in the object 204555991fdSmrg # directory. 205555991fdSmrg mkdir sub 206126a8a12Smrg 207555991fdSmrg am_cv_$1_dependencies_compiler_type=none 208555991fdSmrg if test "$am_compiler_list" = ""; then 209555991fdSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210126a8a12Smrg fi 211555991fdSmrg am__universal=false 212555991fdSmrg m4_case([$1], [CC], 213555991fdSmrg [case " $depcc " in #( 214555991fdSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 215555991fdSmrg esac], 216555991fdSmrg [CXX], 217555991fdSmrg [case " $depcc " in #( 218555991fdSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 219555991fdSmrg esac]) 220126a8a12Smrg 221555991fdSmrg for depmode in $am_compiler_list; do 222555991fdSmrg # Setup a source with many dependencies, because some compilers 223555991fdSmrg # like to wrap large dependency lists on column 80 (with \), and 224555991fdSmrg # we should not choose a depcomp mode which is confused by this. 225555991fdSmrg # 226555991fdSmrg # We need to recreate these files for each test, as the compiler may 227555991fdSmrg # overwrite some of them when testing with obscure command lines. 228555991fdSmrg # This happens at least with the AIX C compiler. 229555991fdSmrg : > sub/conftest.c 230555991fdSmrg for i in 1 2 3 4 5 6; do 231555991fdSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232555991fdSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233555991fdSmrg # Solaris 8's {/usr,}/bin/sh. 234555991fdSmrg touch sub/conftst$i.h 235555991fdSmrg done 236555991fdSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237126a8a12Smrg 238555991fdSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 239555991fdSmrg # mode. It turns out that the SunPro C++ compiler does not properly 240555991fdSmrg # handle `-M -o', and we need to detect this. Also, some Intel 241555991fdSmrg # versions had trouble with output in subdirs 242555991fdSmrg am__obj=sub/conftest.${OBJEXT-o} 243555991fdSmrg am__minus_obj="-o $am__obj" 244555991fdSmrg case $depmode in 245555991fdSmrg gcc) 246555991fdSmrg # This depmode causes a compiler race in universal mode. 247555991fdSmrg test "$am__universal" = false || continue 248555991fdSmrg ;; 249555991fdSmrg nosideeffect) 250555991fdSmrg # after this tag, mechanisms are not by side-effect, so they'll 251555991fdSmrg # only be used when explicitly requested 252555991fdSmrg if test "x$enable_dependency_tracking" = xyes; then 253555991fdSmrg continue 254555991fdSmrg else 255555991fdSmrg break 256555991fdSmrg fi 257555991fdSmrg ;; 258555991fdSmrg msvisualcpp | msvcmsys) 259555991fdSmrg # This compiler won't grok `-c -o', but also, the minuso test has 260555991fdSmrg # not run yet. These depmodes are late enough in the game, and 261555991fdSmrg # so weak that their functioning should not be impacted. 262555991fdSmrg am__obj=conftest.${OBJEXT-o} 263555991fdSmrg am__minus_obj= 264555991fdSmrg ;; 265555991fdSmrg none) break ;; 266555991fdSmrg esac 267555991fdSmrg if depmode=$depmode \ 268555991fdSmrg source=sub/conftest.c object=$am__obj \ 269555991fdSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270555991fdSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271555991fdSmrg >/dev/null 2>conftest.err && 272555991fdSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273555991fdSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274555991fdSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275555991fdSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276555991fdSmrg # icc doesn't choke on unknown options, it will just issue warnings 277555991fdSmrg # or remarks (even with -Werror). So we grep stderr for any message 278555991fdSmrg # that says an option was ignored or not supported. 279555991fdSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280555991fdSmrg # icc: Command line warning: ignoring option '-M'; no argument required 281555991fdSmrg # The diagnosis changed in icc 8.0: 282555991fdSmrg # icc: Command line remark: option '-MP' not supported 283555991fdSmrg if (grep 'ignoring option' conftest.err || 284555991fdSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285555991fdSmrg am_cv_$1_dependencies_compiler_type=$depmode 286555991fdSmrg break 287555991fdSmrg fi 288555991fdSmrg fi 289555991fdSmrg done 290126a8a12Smrg 291555991fdSmrg cd .. 292555991fdSmrg rm -rf conftest.dir 293555991fdSmrgelse 294555991fdSmrg am_cv_$1_dependencies_compiler_type=none 295555991fdSmrgfi 296555991fdSmrg]) 297555991fdSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298555991fdSmrgAM_CONDITIONAL([am__fastdep$1], [ 299555991fdSmrg test "x$enable_dependency_tracking" != xno \ 300555991fdSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301555991fdSmrg]) 302126a8a12Smrg 303126a8a12Smrg 304555991fdSmrg# AM_SET_DEPDIR 305555991fdSmrg# ------------- 306555991fdSmrg# Choose a directory name for dependency files. 307555991fdSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308555991fdSmrgAC_DEFUN([AM_SET_DEPDIR], 309555991fdSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310555991fdSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311555991fdSmrg]) 312126a8a12Smrg 313126a8a12Smrg 314555991fdSmrg# AM_DEP_TRACK 315555991fdSmrg# ------------ 316555991fdSmrgAC_DEFUN([AM_DEP_TRACK], 317555991fdSmrg[AC_ARG_ENABLE(dependency-tracking, 318555991fdSmrg[ --disable-dependency-tracking speeds up one-time build 319555991fdSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320555991fdSmrgif test "x$enable_dependency_tracking" != xno; then 321555991fdSmrg am_depcomp="$ac_aux_dir/depcomp" 322555991fdSmrg AMDEPBACKSLASH='\' 323555991fdSmrgfi 324555991fdSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325555991fdSmrgAC_SUBST([AMDEPBACKSLASH])dnl 326555991fdSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327555991fdSmrg]) 328126a8a12Smrg 329555991fdSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330126a8a12Smrg 331555991fdSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332555991fdSmrg# Free Software Foundation, Inc. 333555991fdSmrg# 334555991fdSmrg# This file is free software; the Free Software Foundation 335555991fdSmrg# gives unlimited permission to copy and/or distribute it, 336555991fdSmrg# with or without modifications, as long as this notice is preserved. 337126a8a12Smrg 338555991fdSmrg#serial 5 339126a8a12Smrg 340555991fdSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341d656433aSmrg# ------------------------------ 342555991fdSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343555991fdSmrg[{ 344555991fdSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 345555991fdSmrg # are listed without --file. Let's play safe and only enable the eval 346555991fdSmrg # if we detect the quoting. 347555991fdSmrg case $CONFIG_FILES in 348555991fdSmrg *\'*) eval set x "$CONFIG_FILES" ;; 349555991fdSmrg *) set x $CONFIG_FILES ;; 350555991fdSmrg esac 351555991fdSmrg shift 352555991fdSmrg for mf 353555991fdSmrg do 354555991fdSmrg # Strip MF so we end up with the name of the file. 355555991fdSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 356555991fdSmrg # Check whether this is an Automake generated Makefile or not. 357555991fdSmrg # We used to match only the files named `Makefile.in', but 358555991fdSmrg # some people rename them; so instead we look at the file content. 359555991fdSmrg # Grep'ing the first line is not enough: some people post-process 360555991fdSmrg # each Makefile.in and add a new line on top of each file to say so. 361555991fdSmrg # Grep'ing the whole file is not good either: AIX grep has a line 362555991fdSmrg # limit of 2048, but all sed's we know have understand at least 4000. 363555991fdSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364555991fdSmrg dirpart=`AS_DIRNAME("$mf")` 365555991fdSmrg else 366555991fdSmrg continue 367555991fdSmrg fi 368555991fdSmrg # Extract the definition of DEPDIR, am__include, and am__quote 369555991fdSmrg # from the Makefile without running `make'. 370555991fdSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371555991fdSmrg test -z "$DEPDIR" && continue 372555991fdSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 373555991fdSmrg test -z "am__include" && continue 374555991fdSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375555991fdSmrg # When using ansi2knr, U may be empty or an underscore; expand it 376555991fdSmrg U=`sed -n 's/^U = //p' < "$mf"` 377555991fdSmrg # Find all dependency output files, they are included files with 378555991fdSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379555991fdSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 380555991fdSmrg # expansion. 381555991fdSmrg for file in `sed -n " 382555991fdSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383555991fdSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384555991fdSmrg # Make sure the directory exists. 385555991fdSmrg test -f "$dirpart/$file" && continue 386555991fdSmrg fdir=`AS_DIRNAME(["$file"])` 387555991fdSmrg AS_MKDIR_P([$dirpart/$fdir]) 388555991fdSmrg # echo "creating $dirpart/$file" 389555991fdSmrg echo '# dummy' > "$dirpart/$file" 390555991fdSmrg done 391555991fdSmrg done 392555991fdSmrg} 393555991fdSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394d656433aSmrg 395d656433aSmrg 396555991fdSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397555991fdSmrg# ----------------------------- 398555991fdSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399555991fdSmrg# 400555991fdSmrg# This code is only required when automatic dependency tracking 401555991fdSmrg# is enabled. FIXME. This creates each `.P' file that we will 402555991fdSmrg# need in order to bootstrap the dependency handling code. 403555991fdSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404555991fdSmrg[AC_CONFIG_COMMANDS([depfiles], 405555991fdSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406555991fdSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407126a8a12Smrg]) 408126a8a12Smrg 409555991fdSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410555991fdSmrg# Free Software Foundation, Inc. 411555991fdSmrg# 412555991fdSmrg# This file is free software; the Free Software Foundation 413555991fdSmrg# gives unlimited permission to copy and/or distribute it, 414555991fdSmrg# with or without modifications, as long as this notice is preserved. 415126a8a12Smrg 416555991fdSmrg# serial 8 417d656433aSmrg 418555991fdSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419555991fdSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420d656433aSmrg 421555991fdSmrg# Do all the work for Automake. -*- Autoconf -*- 422d656433aSmrg 423555991fdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424555991fdSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425555991fdSmrg# 426555991fdSmrg# This file is free software; the Free Software Foundation 427555991fdSmrg# gives unlimited permission to copy and/or distribute it, 428555991fdSmrg# with or without modifications, as long as this notice is preserved. 429d656433aSmrg 430555991fdSmrg# serial 16 431126a8a12Smrg 432555991fdSmrg# This macro actually does too much. Some checks are only needed if 433555991fdSmrg# your package does certain things. But this isn't really a big deal. 434126a8a12Smrg 435555991fdSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436555991fdSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 437555991fdSmrg# ----------------------------------------------- 438555991fdSmrg# The call with PACKAGE and VERSION arguments is the old style 439555991fdSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 440555991fdSmrg# and VERSION should now be passed to AC_INIT and removed from 441555991fdSmrg# the call to AM_INIT_AUTOMAKE. 442555991fdSmrg# We support both call styles for the transition. After 443555991fdSmrg# the next Automake release, Autoconf can make the AC_INIT 444555991fdSmrg# arguments mandatory, and then we can depend on a new Autoconf 445555991fdSmrg# release and drop the old call support. 446555991fdSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 447555991fdSmrg[AC_PREREQ([2.62])dnl 448555991fdSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 449555991fdSmrgdnl the ones we care about. 450555991fdSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451555991fdSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452555991fdSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 453555991fdSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 454555991fdSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 455555991fdSmrg # is not polluted with repeated "-I." 456555991fdSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 457555991fdSmrg # test to see if srcdir already configured 458555991fdSmrg if test -f $srcdir/config.status; then 459555991fdSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 460555991fdSmrg fi 461555991fdSmrgfi 462126a8a12Smrg 463555991fdSmrg# test whether we have cygpath 464555991fdSmrgif test -z "$CYGPATH_W"; then 465555991fdSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 466555991fdSmrg CYGPATH_W='cygpath -w' 467555991fdSmrg else 468555991fdSmrg CYGPATH_W=echo 469555991fdSmrg fi 470555991fdSmrgfi 471555991fdSmrgAC_SUBST([CYGPATH_W]) 472126a8a12Smrg 473555991fdSmrg# Define the identity of the package. 474555991fdSmrgdnl Distinguish between old-style and new-style calls. 475555991fdSmrgm4_ifval([$2], 476555991fdSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477555991fdSmrg AC_SUBST([PACKAGE], [$1])dnl 478555991fdSmrg AC_SUBST([VERSION], [$2])], 479555991fdSmrg[_AM_SET_OPTIONS([$1])dnl 480555991fdSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 481555991fdSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 482555991fdSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483555991fdSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484555991fdSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485126a8a12Smrg 486555991fdSmrg_AM_IF_OPTION([no-define],, 487555991fdSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488555991fdSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489126a8a12Smrg 490555991fdSmrg# Some tools Automake needs. 491555991fdSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 492555991fdSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 493555991fdSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494555991fdSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 495555991fdSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496555991fdSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 497555991fdSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 498555991fdSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499555991fdSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500555991fdSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 501555991fdSmrg# We need awk for the "check" target. The system "awk" is bad on 502555991fdSmrg# some platforms. 503555991fdSmrgAC_REQUIRE([AC_PROG_AWK])dnl 504555991fdSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505555991fdSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506555991fdSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507555991fdSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508555991fdSmrg [_AM_PROG_TAR([v7])])]) 509555991fdSmrg_AM_IF_OPTION([no-dependencies],, 510555991fdSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511555991fdSmrg [_AM_DEPENDENCIES(CC)], 512555991fdSmrg [define([AC_PROG_CC], 513555991fdSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515555991fdSmrg [_AM_DEPENDENCIES(CXX)], 516555991fdSmrg [define([AC_PROG_CXX], 517555991fdSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 518555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519555991fdSmrg [_AM_DEPENDENCIES(OBJC)], 520555991fdSmrg [define([AC_PROG_OBJC], 521555991fdSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522555991fdSmrg]) 523555991fdSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524555991fdSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525555991fdSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526555991fdSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527555991fdSmrgAC_CONFIG_COMMANDS_PRE(dnl 528555991fdSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 529555991fdSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530d656433aSmrg]) 531126a8a12Smrg 532555991fdSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533555991fdSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534555991fdSmrgdnl mangled by Autoconf and run in a shell conditional statement. 535555991fdSmrgm4_define([_AC_COMPILER_EXEEXT], 536555991fdSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537126a8a12Smrg 538126a8a12Smrg 539555991fdSmrg# When config.status generates a header, we must update the stamp-h file. 540555991fdSmrg# This file resides in the same directory as the config header 541555991fdSmrg# that is generated. The stamp files are numbered to have different names. 542126a8a12Smrg 543555991fdSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544555991fdSmrg# loop where config.status creates the headers, so we can generate 545555991fdSmrg# our stamp files there. 546555991fdSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547555991fdSmrg[# Compute $1's index in $config_headers. 548555991fdSmrg_am_arg=$1 549555991fdSmrg_am_stamp_count=1 550555991fdSmrgfor _am_header in $config_headers :; do 551555991fdSmrg case $_am_header in 552555991fdSmrg $_am_arg | $_am_arg:* ) 553555991fdSmrg break ;; 554555991fdSmrg * ) 555555991fdSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556555991fdSmrg esac 557555991fdSmrgdone 558555991fdSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559126a8a12Smrg 560555991fdSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561555991fdSmrg# 562555991fdSmrg# This file is free software; the Free Software Foundation 563555991fdSmrg# gives unlimited permission to copy and/or distribute it, 564555991fdSmrg# with or without modifications, as long as this notice is preserved. 565126a8a12Smrg 566555991fdSmrg# AM_PROG_INSTALL_SH 567555991fdSmrg# ------------------ 568555991fdSmrg# Define $install_sh. 569555991fdSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 570555991fdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571555991fdSmrgif test x"${install_sh}" != xset; then 572555991fdSmrg case $am_aux_dir in 573555991fdSmrg *\ * | *\ *) 574555991fdSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575555991fdSmrg *) 576555991fdSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 577555991fdSmrg esac 578555991fdSmrgfi 579555991fdSmrgAC_SUBST(install_sh)]) 580126a8a12Smrg 581555991fdSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582555991fdSmrg# 583555991fdSmrg# This file is free software; the Free Software Foundation 584555991fdSmrg# gives unlimited permission to copy and/or distribute it, 585555991fdSmrg# with or without modifications, as long as this notice is preserved. 586126a8a12Smrg 587555991fdSmrg# serial 2 588126a8a12Smrg 589555991fdSmrg# Check whether the underlying file-system supports filenames 590555991fdSmrg# with a leading dot. For instance MS-DOS doesn't. 591555991fdSmrgAC_DEFUN([AM_SET_LEADING_DOT], 592555991fdSmrg[rm -rf .tst 2>/dev/null 593555991fdSmrgmkdir .tst 2>/dev/null 594555991fdSmrgif test -d .tst; then 595555991fdSmrg am__leading_dot=. 596555991fdSmrgelse 597555991fdSmrg am__leading_dot=_ 598555991fdSmrgfi 599555991fdSmrgrmdir .tst 2>/dev/null 600555991fdSmrgAC_SUBST([am__leading_dot])]) 601126a8a12Smrg 602555991fdSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603555991fdSmrg# From Jim Meyering 604126a8a12Smrg 605555991fdSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606555991fdSmrg# Free Software Foundation, Inc. 607d656433aSmrg# 608555991fdSmrg# This file is free software; the Free Software Foundation 609555991fdSmrg# gives unlimited permission to copy and/or distribute it, 610555991fdSmrg# with or without modifications, as long as this notice is preserved. 611126a8a12Smrg 612555991fdSmrg# serial 5 613126a8a12Smrg 614555991fdSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615555991fdSmrg# ---------------------------------- 616555991fdSmrg# Control maintainer-specific portions of Makefiles. 617555991fdSmrg# Default is to disable them, unless `enable' is passed literally. 618555991fdSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 619555991fdSmrg# can override the default with the --enable/--disable switch. 620555991fdSmrgAC_DEFUN([AM_MAINTAINER_MODE], 621555991fdSmrg[m4_case(m4_default([$1], [disable]), 622555991fdSmrg [enable], [m4_define([am_maintainer_other], [disable])], 623555991fdSmrg [disable], [m4_define([am_maintainer_other], [enable])], 624555991fdSmrg [m4_define([am_maintainer_other], [enable]) 625555991fdSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626555991fdSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627555991fdSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628555991fdSmrg AC_ARG_ENABLE([maintainer-mode], 629555991fdSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630555991fdSmrg (and sometimes confusing) to the casual installer], 631555991fdSmrg [USE_MAINTAINER_MODE=$enableval], 632555991fdSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633555991fdSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634555991fdSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635555991fdSmrg MAINT=$MAINTAINER_MODE_TRUE 636555991fdSmrg AC_SUBST([MAINT])dnl 637555991fdSmrg] 638555991fdSmrg) 639d656433aSmrg 640555991fdSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641126a8a12Smrg 642555991fdSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643555991fdSmrg 644555991fdSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645d656433aSmrg# 646555991fdSmrg# This file is free software; the Free Software Foundation 647555991fdSmrg# gives unlimited permission to copy and/or distribute it, 648555991fdSmrg# with or without modifications, as long as this notice is preserved. 649126a8a12Smrg 650555991fdSmrg# serial 4 651126a8a12Smrg 652555991fdSmrg# AM_MAKE_INCLUDE() 653555991fdSmrg# ----------------- 654555991fdSmrg# Check to see how make treats includes. 655555991fdSmrgAC_DEFUN([AM_MAKE_INCLUDE], 656555991fdSmrg[am_make=${MAKE-make} 657555991fdSmrgcat > confinc << 'END' 658555991fdSmrgam__doit: 659555991fdSmrg @echo this is the am__doit target 660555991fdSmrg.PHONY: am__doit 661555991fdSmrgEND 662555991fdSmrg# If we don't find an include directive, just comment out the code. 663555991fdSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 664555991fdSmrgam__include="#" 665555991fdSmrgam__quote= 666555991fdSmrg_am_result=none 667555991fdSmrg# First try GNU make style include. 668555991fdSmrgecho "include confinc" > confmf 669555991fdSmrg# Ignore all kinds of additional output from `make'. 670555991fdSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 671555991fdSmrg*the\ am__doit\ target*) 672555991fdSmrg am__include=include 673555991fdSmrg am__quote= 674555991fdSmrg _am_result=GNU 675555991fdSmrg ;; 676555991fdSmrgesac 677555991fdSmrg# Now try BSD make style include. 678555991fdSmrgif test "$am__include" = "#"; then 679555991fdSmrg echo '.include "confinc"' > confmf 680555991fdSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 681555991fdSmrg *the\ am__doit\ target*) 682555991fdSmrg am__include=.include 683555991fdSmrg am__quote="\"" 684555991fdSmrg _am_result=BSD 685555991fdSmrg ;; 686555991fdSmrg esac 687555991fdSmrgfi 688555991fdSmrgAC_SUBST([am__include]) 689555991fdSmrgAC_SUBST([am__quote]) 690555991fdSmrgAC_MSG_RESULT([$_am_result]) 691555991fdSmrgrm -f confinc confmf 692555991fdSmrg]) 693d656433aSmrg 694555991fdSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695d656433aSmrg 696555991fdSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 697555991fdSmrg# Free Software Foundation, Inc. 698555991fdSmrg# 699555991fdSmrg# This file is free software; the Free Software Foundation 700555991fdSmrg# gives unlimited permission to copy and/or distribute it, 701555991fdSmrg# with or without modifications, as long as this notice is preserved. 702d656433aSmrg 703555991fdSmrg# serial 6 704d656433aSmrg 705555991fdSmrg# AM_MISSING_PROG(NAME, PROGRAM) 706d656433aSmrg# ------------------------------ 707555991fdSmrgAC_DEFUN([AM_MISSING_PROG], 708555991fdSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 709555991fdSmrg$1=${$1-"${am_missing_run}$2"} 710555991fdSmrgAC_SUBST($1)]) 711d656433aSmrg 712d656433aSmrg 713555991fdSmrg# AM_MISSING_HAS_RUN 714555991fdSmrg# ------------------ 715555991fdSmrg# Define MISSING if not defined so far and test if it supports --run. 716555991fdSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 717555991fdSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 718555991fdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719555991fdSmrgAC_REQUIRE_AUX_FILE([missing])dnl 720555991fdSmrgif test x"${MISSING+set}" != xset; then 721555991fdSmrg case $am_aux_dir in 722555991fdSmrg *\ * | *\ *) 723555991fdSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724555991fdSmrg *) 725555991fdSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726555991fdSmrg esac 727555991fdSmrgfi 728555991fdSmrg# Use eval to expand $SHELL 729555991fdSmrgif eval "$MISSING --run true"; then 730555991fdSmrg am_missing_run="$MISSING --run " 731555991fdSmrgelse 732555991fdSmrg am_missing_run= 733555991fdSmrg AC_MSG_WARN([`missing' script is too old or missing]) 734555991fdSmrgfi 735555991fdSmrg]) 736d656433aSmrg 737555991fdSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738555991fdSmrg# 739555991fdSmrg# This file is free software; the Free Software Foundation 740555991fdSmrg# gives unlimited permission to copy and/or distribute it, 741555991fdSmrg# with or without modifications, as long as this notice is preserved. 742126a8a12Smrg 743555991fdSmrg# AM_PROG_MKDIR_P 744555991fdSmrg# --------------- 745555991fdSmrg# Check for `mkdir -p'. 746555991fdSmrgAC_DEFUN([AM_PROG_MKDIR_P], 747555991fdSmrg[AC_PREREQ([2.60])dnl 748555991fdSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 749555991fdSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 750555991fdSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 751555991fdSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 752555991fdSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 753555991fdSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 754555991fdSmrgdnl adjustment using top_builddir (which is defined more often than 755555991fdSmrgdnl MKDIR_P). 756555991fdSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 757555991fdSmrgcase $mkdir_p in 758555991fdSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 759555991fdSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760d656433aSmrgesac 761d656433aSmrg]) 762126a8a12Smrg 763555991fdSmrg# Helper functions for option handling. -*- Autoconf -*- 764126a8a12Smrg 765555991fdSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766555991fdSmrg# 767555991fdSmrg# This file is free software; the Free Software Foundation 768555991fdSmrg# gives unlimited permission to copy and/or distribute it, 769555991fdSmrg# with or without modifications, as long as this notice is preserved. 770d656433aSmrg 771555991fdSmrg# serial 4 772d656433aSmrg 773555991fdSmrg# _AM_MANGLE_OPTION(NAME) 774555991fdSmrg# ----------------------- 775555991fdSmrgAC_DEFUN([_AM_MANGLE_OPTION], 776555991fdSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777126a8a12Smrg 778555991fdSmrg# _AM_SET_OPTION(NAME) 779555991fdSmrg# ------------------------------ 780555991fdSmrg# Set option NAME. Presently that only means defining a flag for this option. 781555991fdSmrgAC_DEFUN([_AM_SET_OPTION], 782555991fdSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783126a8a12Smrg 784555991fdSmrg# _AM_SET_OPTIONS(OPTIONS) 785555991fdSmrg# ---------------------------------- 786555991fdSmrg# OPTIONS is a space-separated list of Automake options. 787555991fdSmrgAC_DEFUN([_AM_SET_OPTIONS], 788555991fdSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789126a8a12Smrg 790555991fdSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 791555991fdSmrg# ------------------------------------------- 792555991fdSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 793555991fdSmrgAC_DEFUN([_AM_IF_OPTION], 794555991fdSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 795126a8a12Smrg 796555991fdSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 797126a8a12Smrg 798555991fdSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 799555991fdSmrg# Free Software Foundation, Inc. 800555991fdSmrg# 801555991fdSmrg# This file is free software; the Free Software Foundation 802555991fdSmrg# gives unlimited permission to copy and/or distribute it, 803555991fdSmrg# with or without modifications, as long as this notice is preserved. 804126a8a12Smrg 805555991fdSmrg# serial 5 806126a8a12Smrg 807555991fdSmrg# AM_SANITY_CHECK 808555991fdSmrg# --------------- 809555991fdSmrgAC_DEFUN([AM_SANITY_CHECK], 810555991fdSmrg[AC_MSG_CHECKING([whether build environment is sane]) 811555991fdSmrg# Just in case 812555991fdSmrgsleep 1 813555991fdSmrgecho timestamp > conftest.file 814555991fdSmrg# Reject unsafe characters in $srcdir or the absolute working directory 815555991fdSmrg# name. Accept space and tab only in the latter. 816555991fdSmrgam_lf=' 817555991fdSmrg' 818555991fdSmrgcase `pwd` in 819555991fdSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 820555991fdSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 821555991fdSmrgesac 822555991fdSmrgcase $srcdir in 823555991fdSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 824555991fdSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 825555991fdSmrgesac 826d656433aSmrg 827555991fdSmrg# Do `set' in a subshell so we don't clobber the current shell's 828555991fdSmrg# arguments. Must try -L first in case configure is actually a 829555991fdSmrg# symlink; some systems play weird games with the mod time of symlinks 830555991fdSmrg# (eg FreeBSD returns the mod time of the symlink's containing 831555991fdSmrg# directory). 832555991fdSmrgif ( 833555991fdSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 834555991fdSmrg if test "$[*]" = "X"; then 835555991fdSmrg # -L didn't work. 836555991fdSmrg set X `ls -t "$srcdir/configure" conftest.file` 837555991fdSmrg fi 838555991fdSmrg rm -f conftest.file 839555991fdSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 840555991fdSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 841d656433aSmrg 842555991fdSmrg # If neither matched, then we have a broken ls. This can happen 843555991fdSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 844555991fdSmrg # broken ls alias from the environment. This has actually 845555991fdSmrg # happened. Such a system could not be considered "sane". 846555991fdSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 847555991fdSmrgalias in your environment]) 848555991fdSmrg fi 849126a8a12Smrg 850555991fdSmrg test "$[2]" = conftest.file 851555991fdSmrg ) 852555991fdSmrgthen 853555991fdSmrg # Ok. 854555991fdSmrg : 855555991fdSmrgelse 856555991fdSmrg AC_MSG_ERROR([newly created file is older than distributed files! 857555991fdSmrgCheck your system clock]) 858d656433aSmrgfi 859555991fdSmrgAC_MSG_RESULT(yes)]) 860d656433aSmrg 861555991fdSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 862555991fdSmrg# 863555991fdSmrg# This file is free software; the Free Software Foundation 864555991fdSmrg# gives unlimited permission to copy and/or distribute it, 865555991fdSmrg# with or without modifications, as long as this notice is preserved. 866d656433aSmrg 867555991fdSmrg# serial 1 868d656433aSmrg 869555991fdSmrg# AM_SILENT_RULES([DEFAULT]) 870555991fdSmrg# -------------------------- 871555991fdSmrg# Enable less verbose build rules; with the default set to DEFAULT 872555991fdSmrg# (`yes' being less verbose, `no' or empty being verbose). 873555991fdSmrgAC_DEFUN([AM_SILENT_RULES], 874555991fdSmrg[AC_ARG_ENABLE([silent-rules], 875555991fdSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 876555991fdSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 877555991fdSmrgcase $enable_silent_rules in 878555991fdSmrgyes) AM_DEFAULT_VERBOSITY=0;; 879555991fdSmrgno) AM_DEFAULT_VERBOSITY=1;; 880555991fdSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 881555991fdSmrgesac 882555991fdSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 883555991fdSmrgAM_BACKSLASH='\' 884555991fdSmrgAC_SUBST([AM_BACKSLASH])dnl 885555991fdSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 886555991fdSmrg]) 887126a8a12Smrg 888555991fdSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889555991fdSmrg# 890555991fdSmrg# This file is free software; the Free Software Foundation 891555991fdSmrg# gives unlimited permission to copy and/or distribute it, 892555991fdSmrg# with or without modifications, as long as this notice is preserved. 893126a8a12Smrg 894555991fdSmrg# AM_PROG_INSTALL_STRIP 895555991fdSmrg# --------------------- 896555991fdSmrg# One issue with vendor `install' (even GNU) is that you can't 897555991fdSmrg# specify the program used to strip binaries. This is especially 898555991fdSmrg# annoying in cross-compiling environments, where the build's strip 899555991fdSmrg# is unlikely to handle the host's binaries. 900555991fdSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 901555991fdSmrg# always use install-sh in `make install-strip', and initialize 902555991fdSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 903555991fdSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 904555991fdSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 905555991fdSmrg# Installed binaries are usually stripped using `strip' when the user 906555991fdSmrg# run `make install-strip'. However `strip' might not be the right 907555991fdSmrg# tool to use in cross-compilation environments, therefore Automake 908555991fdSmrg# will honor the `STRIP' environment variable to overrule this program. 909555991fdSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 910555991fdSmrgif test "$cross_compiling" != no; then 911555991fdSmrg AC_CHECK_TOOL([STRIP], [strip], :) 912555991fdSmrgfi 913555991fdSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 914555991fdSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915126a8a12Smrg 916555991fdSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 917d656433aSmrg# 918555991fdSmrg# This file is free software; the Free Software Foundation 919555991fdSmrg# gives unlimited permission to copy and/or distribute it, 920555991fdSmrg# with or without modifications, as long as this notice is preserved. 921126a8a12Smrg 922555991fdSmrg# serial 2 923126a8a12Smrg 924555991fdSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 925555991fdSmrg# --------------------------- 926555991fdSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 927555991fdSmrg# This macro is traced by Automake. 928555991fdSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929126a8a12Smrg 930555991fdSmrg# AM_SUBST_NOTMAKE(VARIABLE) 931555991fdSmrg# --------------------------- 932555991fdSmrg# Public sister of _AM_SUBST_NOTMAKE. 933555991fdSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934126a8a12Smrg 935555991fdSmrg# Check how to create a tarball. -*- Autoconf -*- 936126a8a12Smrg 937555991fdSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 938555991fdSmrg# 939555991fdSmrg# This file is free software; the Free Software Foundation 940555991fdSmrg# gives unlimited permission to copy and/or distribute it, 941555991fdSmrg# with or without modifications, as long as this notice is preserved. 942126a8a12Smrg 943555991fdSmrg# serial 2 944126a8a12Smrg 945555991fdSmrg# _AM_PROG_TAR(FORMAT) 946555991fdSmrg# -------------------- 947555991fdSmrg# Check how to create a tarball in format FORMAT. 948555991fdSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 949555991fdSmrg# 950555991fdSmrg# Substitute a variable $(am__tar) that is a command 951555991fdSmrg# writing to stdout a FORMAT-tarball containing the directory 952555991fdSmrg# $tardir. 953555991fdSmrg# tardir=directory && $(am__tar) > result.tar 954555991fdSmrg# 955555991fdSmrg# Substitute a variable $(am__untar) that extract such 956555991fdSmrg# a tarball read from stdin. 957555991fdSmrg# $(am__untar) < result.tar 958555991fdSmrgAC_DEFUN([_AM_PROG_TAR], 959555991fdSmrg[# Always define AMTAR for backward compatibility. 960555991fdSmrgAM_MISSING_PROG([AMTAR], [tar]) 961555991fdSmrgm4_if([$1], [v7], 962555991fdSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 963555991fdSmrg [m4_case([$1], [ustar],, [pax],, 964555991fdSmrg [m4_fatal([Unknown tar format])]) 965555991fdSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 966555991fdSmrg# Loop over all known methods to create a tar archive until one works. 967555991fdSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 968555991fdSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 969555991fdSmrg# Do not fold the above two line into one, because Tru64 sh and 970555991fdSmrg# Solaris sh will not grok spaces in the rhs of `-'. 971555991fdSmrgfor _am_tool in $_am_tools 972555991fdSmrgdo 973555991fdSmrg case $_am_tool in 974555991fdSmrg gnutar) 975555991fdSmrg for _am_tar in tar gnutar gtar; 976555991fdSmrg do 977555991fdSmrg AM_RUN_LOG([$_am_tar --version]) && break 978555991fdSmrg done 979555991fdSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 980555991fdSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 981555991fdSmrg am__untar="$_am_tar -xf -" 982555991fdSmrg ;; 983555991fdSmrg plaintar) 984555991fdSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 985555991fdSmrg # ustar tarball either. 986555991fdSmrg (tar --version) >/dev/null 2>&1 && continue 987555991fdSmrg am__tar='tar chf - "$$tardir"' 988555991fdSmrg am__tar_='tar chf - "$tardir"' 989555991fdSmrg am__untar='tar xf -' 990555991fdSmrg ;; 991555991fdSmrg pax) 992555991fdSmrg am__tar='pax -L -x $1 -w "$$tardir"' 993555991fdSmrg am__tar_='pax -L -x $1 -w "$tardir"' 994555991fdSmrg am__untar='pax -r' 995555991fdSmrg ;; 996555991fdSmrg cpio) 997555991fdSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 998555991fdSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 999555991fdSmrg am__untar='cpio -i -H $1 -d' 1000555991fdSmrg ;; 1001555991fdSmrg none) 1002555991fdSmrg am__tar=false 1003555991fdSmrg am__tar_=false 1004555991fdSmrg am__untar=false 1005555991fdSmrg ;; 1006555991fdSmrg esac 1007126a8a12Smrg 1008555991fdSmrg # If the value was cached, stop now. We just wanted to have am__tar 1009555991fdSmrg # and am__untar set. 1010555991fdSmrg test -n "${am_cv_prog_tar_$1}" && break 1011126a8a12Smrg 1012555991fdSmrg # tar/untar a dummy directory, and stop if the command works 1013555991fdSmrg rm -rf conftest.dir 1014555991fdSmrg mkdir conftest.dir 1015555991fdSmrg echo GrepMe > conftest.dir/file 1016555991fdSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1017555991fdSmrg rm -rf conftest.dir 1018555991fdSmrg if test -s conftest.tar; then 1019555991fdSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1020555991fdSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1021555991fdSmrg fi 1022555991fdSmrgdone 1023555991fdSmrgrm -rf conftest.dir 1024126a8a12Smrg 1025555991fdSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1026555991fdSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1027555991fdSmrgAC_SUBST([am__tar]) 1028555991fdSmrgAC_SUBST([am__untar]) 1029555991fdSmrg]) # _AM_PROG_TAR 1030126a8a12Smrg 1031555991fdSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032555991fdSmrgdnl 1033555991fdSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1034555991fdSmrgdnl 1035555991fdSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036555991fdSmrgdnl copy of this software and associated documentation files (the "Software"), 1037555991fdSmrgdnl to deal in the Software without restriction, including without limitation 1038555991fdSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039555991fdSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040555991fdSmrgdnl Software is furnished to do so, subject to the following conditions: 1041555991fdSmrgdnl 1042555991fdSmrgdnl The above copyright notice and this permission notice (including the next 1043555991fdSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1044555991fdSmrgdnl Software. 1045555991fdSmrgdnl 1046555991fdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047555991fdSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048555991fdSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049555991fdSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050555991fdSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051555991fdSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052555991fdSmrgdnl DEALINGS IN THE SOFTWARE. 1053126a8a12Smrg 1054555991fdSmrg# XORG_MACROS_VERSION(required-version) 1055555991fdSmrg# ------------------------------------- 1056555991fdSmrg# Minimum version: 1.1.0 1057555991fdSmrg# 1058555991fdSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1059555991fdSmrg# your configure.ac with the minimum required version, such as: 1060555991fdSmrg# XORG_MACROS_VERSION(1.1) 1061555991fdSmrg# 1062555991fdSmrg# To ensure that this macro is defined, also add: 1063555991fdSmrg# m4_ifndef([XORG_MACROS_VERSION], 1064555991fdSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1065555991fdSmrg# 1066555991fdSmrg# 1067555991fdSmrg# See the "minimum version" comment for each macro you use to see what 1068555991fdSmrg# version you require. 1069555991fdSmrgm4_defun([XORG_MACROS_VERSION],[ 1070555991fdSmrgm4_define([vers_have], [1.10.1]) 1071555991fdSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1072555991fdSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1073555991fdSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1074555991fdSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1075555991fdSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1076555991fdSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1077555991fdSmrgm4_undefine([vers_have]) 1078555991fdSmrgm4_undefine([maj_have]) 1079555991fdSmrgm4_undefine([maj_needed]) 1080555991fdSmrg]) # XORG_MACROS_VERSION 1081126a8a12Smrg 1082555991fdSmrg# XORG_PROG_RAWCPP() 1083555991fdSmrg# ------------------ 1084555991fdSmrg# Minimum version: 1.0.0 1085555991fdSmrg# 1086555991fdSmrg# Find cpp program and necessary flags for use in pre-processing text files 1087555991fdSmrg# such as man pages and config files 1088555991fdSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1089555991fdSmrgAC_REQUIRE([AC_PROG_CPP]) 1090555991fdSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1091555991fdSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1092126a8a12Smrg 1093555991fdSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1094555991fdSmrg# which is not the best choice for supporting other OS'es, but covers most 1095555991fdSmrg# of the ones we need for now. 1096555991fdSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1097555991fdSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1098555991fdSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099555991fdSmrg AC_MSG_RESULT([no]) 1100555991fdSmrgelse 1101555991fdSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1102555991fdSmrg RAWCPPFLAGS=-undef 1103555991fdSmrg AC_MSG_RESULT([yes]) 1104555991fdSmrg # under Cygwin unix is still defined even with -undef 1105555991fdSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1106555991fdSmrg RAWCPPFLAGS="-undef -ansi" 1107555991fdSmrg AC_MSG_RESULT([yes, with -ansi]) 1108555991fdSmrg else 1109555991fdSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1110555991fdSmrg fi 1111555991fdSmrgfi 1112555991fdSmrgrm -f conftest.$ac_ext 1113d656433aSmrg 1114555991fdSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1115555991fdSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1116555991fdSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1117555991fdSmrg AC_MSG_RESULT([no]) 1118555991fdSmrgelse 1119555991fdSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1120555991fdSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1121555991fdSmrg AC_MSG_RESULT([yes]) 1122555991fdSmrg else 1123555991fdSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1124555991fdSmrg fi 1125555991fdSmrgfi 1126555991fdSmrgrm -f conftest.$ac_ext 1127555991fdSmrgAC_SUBST(RAWCPPFLAGS) 1128555991fdSmrg]) # XORG_PROG_RAWCPP 1129d656433aSmrg 1130555991fdSmrg# XORG_MANPAGE_SECTIONS() 1131555991fdSmrg# ----------------------- 1132555991fdSmrg# Minimum version: 1.0.0 1133555991fdSmrg# 1134555991fdSmrg# Determine which sections man pages go in for the different man page types 1135555991fdSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1136555991fdSmrg# Not sure if there's any better way than just hardcoding by OS name. 1137555991fdSmrg# Override default settings by setting environment variables 1138555991fdSmrg# Added MAN_SUBSTS in version 1.8 1139555991fdSmrg# Added AC_PROG_SED in version 1.8 1140126a8a12Smrg 1141555991fdSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1142555991fdSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1143555991fdSmrgAC_REQUIRE([AC_PROG_SED]) 1144126a8a12Smrg 1145555991fdSmrgif test x$APP_MAN_SUFFIX = x ; then 1146555991fdSmrg APP_MAN_SUFFIX=1 1147555991fdSmrgfi 1148555991fdSmrgif test x$APP_MAN_DIR = x ; then 1149555991fdSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1150555991fdSmrgfi 1151d656433aSmrg 1152555991fdSmrgif test x$LIB_MAN_SUFFIX = x ; then 1153555991fdSmrg LIB_MAN_SUFFIX=3 1154555991fdSmrgfi 1155555991fdSmrgif test x$LIB_MAN_DIR = x ; then 1156555991fdSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1157555991fdSmrgfi 1158d656433aSmrg 1159555991fdSmrgif test x$FILE_MAN_SUFFIX = x ; then 1160555991fdSmrg case $host_os in 1161555991fdSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1162555991fdSmrg *) FILE_MAN_SUFFIX=5 ;; 1163555991fdSmrg esac 1164555991fdSmrgfi 1165555991fdSmrgif test x$FILE_MAN_DIR = x ; then 1166555991fdSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1167555991fdSmrgfi 1168d656433aSmrg 1169555991fdSmrgif test x$MISC_MAN_SUFFIX = x ; then 1170555991fdSmrg case $host_os in 1171555991fdSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1172555991fdSmrg *) MISC_MAN_SUFFIX=7 ;; 1173555991fdSmrg esac 1174555991fdSmrgfi 1175555991fdSmrgif test x$MISC_MAN_DIR = x ; then 1176555991fdSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1177555991fdSmrgfi 1178d656433aSmrg 1179555991fdSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1180555991fdSmrg case $host_os in 1181555991fdSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1182555991fdSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1183555991fdSmrg esac 1184555991fdSmrgfi 1185555991fdSmrgif test x$DRIVER_MAN_DIR = x ; then 1186555991fdSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1187555991fdSmrgfi 1188d656433aSmrg 1189555991fdSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1190555991fdSmrg case $host_os in 1191555991fdSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1192555991fdSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1193555991fdSmrg esac 1194555991fdSmrgfi 1195555991fdSmrgif test x$ADMIN_MAN_DIR = x ; then 1196555991fdSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1197555991fdSmrgfi 1198d656433aSmrg 1199d656433aSmrg 1200555991fdSmrgAC_SUBST([APP_MAN_SUFFIX]) 1201555991fdSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1202555991fdSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1203555991fdSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1204555991fdSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1205555991fdSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1206555991fdSmrgAC_SUBST([APP_MAN_DIR]) 1207555991fdSmrgAC_SUBST([LIB_MAN_DIR]) 1208555991fdSmrgAC_SUBST([FILE_MAN_DIR]) 1209555991fdSmrgAC_SUBST([MISC_MAN_DIR]) 1210555991fdSmrgAC_SUBST([DRIVER_MAN_DIR]) 1211555991fdSmrgAC_SUBST([ADMIN_MAN_DIR]) 1212126a8a12Smrg 1213555991fdSmrgXORG_MAN_PAGE="X Version 11" 1214555991fdSmrgAC_SUBST([XORG_MAN_PAGE]) 1215555991fdSmrgMAN_SUBSTS="\ 1216555991fdSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1217555991fdSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1218555991fdSmrg -e 's|__xservername__|Xorg|g' \ 1219555991fdSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1220555991fdSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1221555991fdSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1222555991fdSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1223555991fdSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1224555991fdSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1225555991fdSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1226555991fdSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1227555991fdSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1228555991fdSmrgAC_SUBST([MAN_SUBSTS]) 1229126a8a12Smrg 1230555991fdSmrg]) # XORG_MANPAGE_SECTIONS 1231126a8a12Smrg 1232555991fdSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1233555991fdSmrg# ------------------------ 1234555991fdSmrg# Minimum version: 1.7.0 1235555991fdSmrg# 1236555991fdSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1237555991fdSmrg# provided by xorg-sgml-doctools, if installed. 1238555991fdSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1239555991fdSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1240555991fdSmrgXORG_SGML_PATH= 1241555991fdSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1242555991fdSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1243555991fdSmrg [m4_ifval([$1],[:], 1244555991fdSmrg [if test x"$cross_compiling" != x"yes" ; then 1245555991fdSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1246555991fdSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1247555991fdSmrg fi]) 1248555991fdSmrg ]) 1249126a8a12Smrg 1250555991fdSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1251555991fdSmrg# the path and the name of the doc stylesheet 1252555991fdSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1253555991fdSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1254555991fdSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1255555991fdSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1256555991fdSmrgelse 1257555991fdSmrg AC_MSG_RESULT([no]) 1258555991fdSmrgfi 1259126a8a12Smrg 1260555991fdSmrgAC_SUBST(XORG_SGML_PATH) 1261555991fdSmrgAC_SUBST(STYLESHEET_SRCDIR) 1262555991fdSmrgAC_SUBST(XSL_STYLESHEET) 1263555991fdSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1264555991fdSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1265126a8a12Smrg 1266555991fdSmrg# XORG_CHECK_LINUXDOC 1267555991fdSmrg# ------------------- 1268555991fdSmrg# Minimum version: 1.0.0 1269555991fdSmrg# 1270555991fdSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1271555991fdSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1272555991fdSmrg# Whether or not the necessary tools and files are found can be checked 1273555991fdSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1274555991fdSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1275555991fdSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1276555991fdSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1277126a8a12Smrg 1278555991fdSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1279126a8a12Smrg 1280555991fdSmrgAC_MSG_CHECKING([whether to build documentation]) 1281126a8a12Smrg 1282555991fdSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1283555991fdSmrg BUILDDOC=yes 1284555991fdSmrgelse 1285555991fdSmrg BUILDDOC=no 1286555991fdSmrgfi 1287d656433aSmrg 1288555991fdSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1289126a8a12Smrg 1290555991fdSmrgAC_MSG_RESULT([$BUILDDOC]) 1291126a8a12Smrg 1292555991fdSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1293126a8a12Smrg 1294555991fdSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1295555991fdSmrg BUILDPDFDOC=yes 1296555991fdSmrgelse 1297555991fdSmrg BUILDPDFDOC=no 1298555991fdSmrgfi 1299555991fdSmrg 1300555991fdSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1301126a8a12Smrg 1302555991fdSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1303126a8a12Smrg 1304555991fdSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1305555991fdSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1306555991fdSmrgMAKE_PDF="$PS2PDF" 1307555991fdSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1308555991fdSmrg 1309555991fdSmrgAC_SUBST(MAKE_TEXT) 1310555991fdSmrgAC_SUBST(MAKE_PS) 1311555991fdSmrgAC_SUBST(MAKE_PDF) 1312555991fdSmrgAC_SUBST(MAKE_HTML) 1313555991fdSmrg]) # XORG_CHECK_LINUXDOC 1314555991fdSmrg 1315555991fdSmrg# XORG_CHECK_DOCBOOK 1316d656433aSmrg# ------------------- 1317555991fdSmrg# Minimum version: 1.0.0 1318555991fdSmrg# 1319555991fdSmrg# Checks for the ability to build output formats from SGML DocBook source. 1320555991fdSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1321555991fdSmrg# indicates whether the necessary tools and files are found and, if set, 1322555991fdSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1323555991fdSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1324555991fdSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1325126a8a12Smrg 1326555991fdSmrgBUILDTXTDOC=no 1327555991fdSmrgBUILDPDFDOC=no 1328555991fdSmrgBUILDPSDOC=no 1329555991fdSmrgBUILDHTMLDOC=no 1330126a8a12Smrg 1331555991fdSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1332555991fdSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1333555991fdSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1334555991fdSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1335d656433aSmrg 1336555991fdSmrgAC_MSG_CHECKING([whether to build text documentation]) 1337555991fdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1338555991fdSmrg test x$BUILD_TXTDOC != xno; then 1339555991fdSmrg BUILDTXTDOC=yes 1340126a8a12Smrgfi 1341555991fdSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1342555991fdSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1343126a8a12Smrg 1344555991fdSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1345555991fdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1346555991fdSmrg test x$BUILD_PDFDOC != xno; then 1347555991fdSmrg BUILDPDFDOC=yes 1348126a8a12Smrgfi 1349555991fdSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1350555991fdSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1351126a8a12Smrg 1352555991fdSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1353555991fdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1354555991fdSmrg test x$BUILD_PSDOC != xno; then 1355555991fdSmrg BUILDPSDOC=yes 1356555991fdSmrgfi 1357555991fdSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1358555991fdSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1359126a8a12Smrg 1360555991fdSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1361555991fdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1362555991fdSmrg test x$BUILD_HTMLDOC != xno; then 1363555991fdSmrg BUILDHTMLDOC=yes 1364555991fdSmrgfi 1365555991fdSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1366555991fdSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1367126a8a12Smrg 1368555991fdSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1369555991fdSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1370555991fdSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1371555991fdSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1372126a8a12Smrg 1373555991fdSmrgAC_SUBST(MAKE_TEXT) 1374555991fdSmrgAC_SUBST(MAKE_PS) 1375555991fdSmrgAC_SUBST(MAKE_PDF) 1376555991fdSmrgAC_SUBST(MAKE_HTML) 1377555991fdSmrg]) # XORG_CHECK_DOCBOOK 1378126a8a12Smrg 1379555991fdSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 1380555991fdSmrg# ---------------- 1381555991fdSmrg# Minimum version: 1.5.0 1382555991fdSmrg# 1383555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1384555991fdSmrg# not at the appropriate level. This macro enables a module to test for the 1385555991fdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1386555991fdSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1387555991fdSmrg# as whether or not to use the xmlto package. 1388555991fdSmrg# 1389555991fdSmrg# Interface to module: 1390555991fdSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1391555991fdSmrg# XMLTO: returns the path of the xmlto program found 1392555991fdSmrg# returns the path set by the user in the environment 1393555991fdSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1394555991fdSmrg# 'no' user instructs the module not to use xmlto 1395555991fdSmrg# 1396555991fdSmrg# Added in version 1.10.0 1397555991fdSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1398555991fdSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1399555991fdSmrg# 1400555991fdSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1401555991fdSmrg# 1402555991fdSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1403555991fdSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1404555991fdSmrgAC_ARG_WITH(xmlto, 1405555991fdSmrg AS_HELP_STRING([--with-xmlto], 1406555991fdSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1407555991fdSmrg [use_xmlto=$withval], [use_xmlto=auto]) 1408555991fdSmrg 1409555991fdSmrgif test "x$use_xmlto" = x"auto"; then 1410555991fdSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1411555991fdSmrg if test "x$XMLTO" = "x"; then 1412555991fdSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1413555991fdSmrg have_xmlto=no 1414555991fdSmrg else 1415555991fdSmrg have_xmlto=yes 1416555991fdSmrg fi 1417555991fdSmrgelif test "x$use_xmlto" = x"yes" ; then 1418555991fdSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1419555991fdSmrg if test "x$XMLTO" = "x"; then 1420555991fdSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1421555991fdSmrg fi 1422555991fdSmrg have_xmlto=yes 1423555991fdSmrgelif test "x$use_xmlto" = x"no" ; then 1424555991fdSmrg if test "x$XMLTO" != "x"; then 1425555991fdSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1426555991fdSmrg fi 1427555991fdSmrg have_xmlto=no 1428555991fdSmrgelse 1429555991fdSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1430555991fdSmrgfi 1431126a8a12Smrg 1432555991fdSmrg# Test for a minimum version of xmlto, if provided. 1433555991fdSmrgm4_ifval([$1], 1434555991fdSmrg[if test "$have_xmlto" = yes; then 1435555991fdSmrg # scrape the xmlto version 1436555991fdSmrg AC_MSG_CHECKING([the xmlto version]) 1437555991fdSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1438555991fdSmrg AC_MSG_RESULT([$xmlto_version]) 1439555991fdSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1440555991fdSmrg [if test "x$use_xmlto" = xauto; then 1441555991fdSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1442555991fdSmrg have_xmlto=no 1443555991fdSmrg else 1444555991fdSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1445555991fdSmrg fi]) 1446555991fdSmrgfi]) 1447126a8a12Smrg 1448555991fdSmrg# Test for the ability of xmlto to generate a text target 1449555991fdSmrghave_xmlto_text=no 1450555991fdSmrgcat > conftest.xml << "EOF" 1451555991fdSmrgEOF 1452555991fdSmrgAS_IF([test "$have_xmlto" = yes], 1453555991fdSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1454555991fdSmrg [have_xmlto_text=yes], 1455555991fdSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1456555991fdSmrgrm -f conftest.xml 1457555991fdSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1458555991fdSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1459555991fdSmrg]) # XORG_WITH_XMLTO 1460555991fdSmrg 1461555991fdSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1462555991fdSmrg# ---------------- 1463555991fdSmrg# Minimum version: 1.5.0 1464555991fdSmrg# 1465555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1466555991fdSmrg# not at the appropriate level. This macro enables a module to test for the 1467555991fdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1468555991fdSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1469555991fdSmrg# as whether or not to use the asciidoc package. 1470555991fdSmrg# 1471555991fdSmrg# Interface to module: 1472555991fdSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1473555991fdSmrg# ASCIIDOC: returns the path of the asciidoc program found 1474555991fdSmrg# returns the path set by the user in the environment 1475555991fdSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1476555991fdSmrg# 'no' user instructs the module not to use asciidoc 1477555991fdSmrg# 1478555991fdSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1479555991fdSmrg# 1480555991fdSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1481555991fdSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1482555991fdSmrgAC_ARG_WITH(asciidoc, 1483555991fdSmrg AS_HELP_STRING([--with-asciidoc], 1484555991fdSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1485555991fdSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1486555991fdSmrg 1487555991fdSmrgif test "x$use_asciidoc" = x"auto"; then 1488555991fdSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1489555991fdSmrg if test "x$ASCIIDOC" = "x"; then 1490555991fdSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1491555991fdSmrg have_asciidoc=no 1492555991fdSmrg else 1493555991fdSmrg have_asciidoc=yes 1494555991fdSmrg fi 1495555991fdSmrgelif test "x$use_asciidoc" = x"yes" ; then 1496555991fdSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1497555991fdSmrg if test "x$ASCIIDOC" = "x"; then 1498555991fdSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1499555991fdSmrg fi 1500555991fdSmrg have_asciidoc=yes 1501555991fdSmrgelif test "x$use_asciidoc" = x"no" ; then 1502555991fdSmrg if test "x$ASCIIDOC" != "x"; then 1503555991fdSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1504555991fdSmrg fi 1505555991fdSmrg have_asciidoc=no 1506555991fdSmrgelse 1507555991fdSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1508126a8a12Smrgfi 1509555991fdSmrgm4_ifval([$1], 1510555991fdSmrg[if test "$have_asciidoc" = yes; then 1511555991fdSmrg # scrape the asciidoc version 1512555991fdSmrg AC_MSG_CHECKING([the asciidoc version]) 1513555991fdSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1514555991fdSmrg AC_MSG_RESULT([$asciidoc_version]) 1515555991fdSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1516555991fdSmrg [if test "x$use_asciidoc" = xauto; then 1517555991fdSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1518555991fdSmrg have_asciidoc=no 1519555991fdSmrg else 1520555991fdSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1521555991fdSmrg fi]) 1522555991fdSmrgfi]) 1523555991fdSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1524555991fdSmrg]) # XORG_WITH_ASCIIDOC 1525126a8a12Smrg 1526555991fdSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1527555991fdSmrg# -------------------------------- 1528555991fdSmrg# Minimum version: 1.5.0 1529555991fdSmrg# 1530555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1531555991fdSmrg# not at the appropriate level. This macro enables a module to test for the 1532555991fdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1533555991fdSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1534555991fdSmrg# as whether or not to use the doxygen package. 1535555991fdSmrg# 1536555991fdSmrg# Interface to module: 1537555991fdSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1538555991fdSmrg# DOXYGEN: returns the path of the doxygen program found 1539555991fdSmrg# returns the path set by the user in the environment 1540555991fdSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1541555991fdSmrg# 'no' user instructs the module not to use doxygen 1542555991fdSmrg# 1543555991fdSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1544555991fdSmrg# 1545555991fdSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1546555991fdSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1547555991fdSmrgAC_ARG_WITH(doxygen, 1548555991fdSmrg AS_HELP_STRING([--with-doxygen], 1549555991fdSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1550555991fdSmrg [use_doxygen=$withval], [use_doxygen=auto]) 1551555991fdSmrg 1552555991fdSmrgif test "x$use_doxygen" = x"auto"; then 1553555991fdSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1554555991fdSmrg if test "x$DOXYGEN" = "x"; then 1555555991fdSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1556555991fdSmrg have_doxygen=no 1557555991fdSmrg else 1558555991fdSmrg have_doxygen=yes 1559555991fdSmrg fi 1560555991fdSmrgelif test "x$use_doxygen" = x"yes" ; then 1561555991fdSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1562555991fdSmrg if test "x$DOXYGEN" = "x"; then 1563555991fdSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1564555991fdSmrg fi 1565555991fdSmrg have_doxygen=yes 1566555991fdSmrgelif test "x$use_doxygen" = x"no" ; then 1567555991fdSmrg if test "x$DOXYGEN" != "x"; then 1568555991fdSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1569555991fdSmrg fi 1570555991fdSmrg have_doxygen=no 1571555991fdSmrgelse 1572555991fdSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1573d656433aSmrgfi 1574555991fdSmrgm4_ifval([$1], 1575555991fdSmrg[if test "$have_doxygen" = yes; then 1576555991fdSmrg # scrape the doxygen version 1577555991fdSmrg AC_MSG_CHECKING([the doxygen version]) 1578555991fdSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1579555991fdSmrg AC_MSG_RESULT([$doxygen_version]) 1580555991fdSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1581555991fdSmrg [if test "x$use_doxygen" = xauto; then 1582555991fdSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1583555991fdSmrg have_doxygen=no 1584555991fdSmrg else 1585555991fdSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1586555991fdSmrg fi]) 1587555991fdSmrgfi]) 1588555991fdSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1589555991fdSmrg]) # XORG_WITH_DOXYGEN 1590126a8a12Smrg 1591555991fdSmrg# XORG_WITH_GROFF 1592555991fdSmrg# ---------------- 1593555991fdSmrg# Minimum version: 1.6.0 1594555991fdSmrg# 1595555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1596555991fdSmrg# not at the appropriate level. This macro enables a module to test for the 1597555991fdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1598555991fdSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 1599555991fdSmrg# as whether or not to use the groff package. 1600555991fdSmrg# 1601555991fdSmrg# Interface to module: 1602555991fdSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1603555991fdSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1604555991fdSmrg# HAVE_GROFF_MS: the -ms macros package 1605555991fdSmrg# GROFF: returns the path of the groff program found 1606555991fdSmrg# returns the path set by the user in the environment 1607555991fdSmrg# --with-groff: 'yes' user instructs the module to use groff 1608555991fdSmrg# 'no' user instructs the module not to use groff 1609555991fdSmrg# 1610555991fdSmrg# Added in version 1.9.0: 1611555991fdSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1612555991fdSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1613555991fdSmrg# psselect from the psutils package. 1614555991fdSmrg# the ghostcript package. Refer to the grohtml man pages 1615555991fdSmrg# 1616555991fdSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1617555991fdSmrg# 1618555991fdSmrg# OS and distros often splits groff in a basic and full package, the former 1619555991fdSmrg# having the groff program and the later having devices, fonts and macros 1620555991fdSmrg# Checking for the groff executable is not enough. 1621555991fdSmrg# 1622555991fdSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 1623555991fdSmrg# unset HAVE_GROFF or GROFF env variables. 1624555991fdSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1625555991fdSmrg# 1626555991fdSmrgAC_DEFUN([XORG_WITH_GROFF],[ 1627555991fdSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1628555991fdSmrgAC_ARG_WITH(groff, 1629555991fdSmrg AS_HELP_STRING([--with-groff], 1630555991fdSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 1631555991fdSmrg [use_groff=$withval], [use_groff=auto]) 1632555991fdSmrg 1633555991fdSmrgif test "x$use_groff" = x"auto"; then 1634555991fdSmrg AC_PATH_PROG([GROFF], [groff]) 1635555991fdSmrg if test "x$GROFF" = "x"; then 1636555991fdSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1637555991fdSmrg have_groff=no 1638555991fdSmrg else 1639555991fdSmrg have_groff=yes 1640555991fdSmrg fi 1641555991fdSmrgelif test "x$use_groff" = x"yes" ; then 1642555991fdSmrg AC_PATH_PROG([GROFF], [groff]) 1643555991fdSmrg if test "x$GROFF" = "x"; then 1644555991fdSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1645555991fdSmrg fi 1646555991fdSmrg have_groff=yes 1647555991fdSmrgelif test "x$use_groff" = x"no" ; then 1648555991fdSmrg if test "x$GROFF" != "x"; then 1649555991fdSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1650555991fdSmrg fi 1651555991fdSmrg have_groff=no 1652555991fdSmrgelse 1653555991fdSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1654555991fdSmrgfi 1655d656433aSmrg 1656555991fdSmrg# We have groff, test for the presence of the macro packages 1657555991fdSmrgif test "x$have_groff" = x"yes"; then 1658555991fdSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1659555991fdSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1660555991fdSmrg groff_ms_works=yes 1661126a8a12Smrg else 1662555991fdSmrg groff_ms_works=no 1663126a8a12Smrg fi 1664555991fdSmrg AC_MSG_RESULT([$groff_ms_works]) 1665555991fdSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1666555991fdSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1667555991fdSmrg groff_mm_works=yes 1668555991fdSmrg else 1669555991fdSmrg groff_mm_works=no 1670555991fdSmrg fi 1671555991fdSmrg AC_MSG_RESULT([$groff_mm_works]) 1672555991fdSmrgfi 1673126a8a12Smrg 1674555991fdSmrg# We have groff, test for HTML dependencies, one command per package 1675555991fdSmrgif test "x$have_groff" = x"yes"; then 1676555991fdSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1677555991fdSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1678555991fdSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1679555991fdSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1680555991fdSmrg have_groff_html=yes 1681555991fdSmrg else 1682555991fdSmrg have_groff_html=no 1683555991fdSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1684555991fdSmrg fi 1685555991fdSmrgfi 1686126a8a12Smrg 1687555991fdSmrg# Set Automake conditionals for Makefiles 1688555991fdSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1689555991fdSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1690555991fdSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1691555991fdSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1692555991fdSmrg]) # XORG_WITH_GROFF 1693126a8a12Smrg 1694555991fdSmrg# XORG_WITH_FOP 1695555991fdSmrg# ---------------- 1696555991fdSmrg# Minimum version: 1.6.0 1697555991fdSmrg# 1698555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1699555991fdSmrg# not at the appropriate level. This macro enables a module to test for the 1700555991fdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1701555991fdSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 1702555991fdSmrg# as whether or not to use the fop package. 1703555991fdSmrg# 1704555991fdSmrg# Interface to module: 1705555991fdSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1706555991fdSmrg# FOP: returns the path of the fop program found 1707555991fdSmrg# returns the path set by the user in the environment 1708555991fdSmrg# --with-fop: 'yes' user instructs the module to use fop 1709555991fdSmrg# 'no' user instructs the module not to use fop 1710555991fdSmrg# 1711555991fdSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1712555991fdSmrg# 1713555991fdSmrgAC_DEFUN([XORG_WITH_FOP],[ 1714555991fdSmrgAC_ARG_VAR([FOP], [Path to fop command]) 1715555991fdSmrgAC_ARG_WITH(fop, 1716555991fdSmrg AS_HELP_STRING([--with-fop], 1717555991fdSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 1718555991fdSmrg [use_fop=$withval], [use_fop=auto]) 1719555991fdSmrg 1720555991fdSmrgif test "x$use_fop" = x"auto"; then 1721555991fdSmrg AC_PATH_PROG([FOP], [fop]) 1722555991fdSmrg if test "x$FOP" = "x"; then 1723555991fdSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1724555991fdSmrg have_fop=no 1725555991fdSmrg else 1726555991fdSmrg have_fop=yes 1727555991fdSmrg fi 1728555991fdSmrgelif test "x$use_fop" = x"yes" ; then 1729555991fdSmrg AC_PATH_PROG([FOP], [fop]) 1730555991fdSmrg if test "x$FOP" = "x"; then 1731555991fdSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1732555991fdSmrg fi 1733555991fdSmrg have_fop=yes 1734555991fdSmrgelif test "x$use_fop" = x"no" ; then 1735555991fdSmrg if test "x$FOP" != "x"; then 1736555991fdSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1737555991fdSmrg fi 1738555991fdSmrg have_fop=no 1739555991fdSmrgelse 1740555991fdSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1741555991fdSmrgfi 1742555991fdSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1743555991fdSmrg]) # XORG_WITH_FOP 1744126a8a12Smrg 1745555991fdSmrg# XORG_WITH_PS2PDF 1746555991fdSmrg# ---------------- 1747555991fdSmrg# Minimum version: 1.6.0 1748555991fdSmrg# 1749555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1750555991fdSmrg# not at the appropriate level. This macro enables a module to test for the 1751555991fdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1752555991fdSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1753555991fdSmrg# as whether or not to use the ps2pdf package. 1754555991fdSmrg# 1755555991fdSmrg# Interface to module: 1756555991fdSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1757555991fdSmrg# PS2PDF: returns the path of the ps2pdf program found 1758555991fdSmrg# returns the path set by the user in the environment 1759555991fdSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1760555991fdSmrg# 'no' user instructs the module not to use ps2pdf 1761555991fdSmrg# 1762555991fdSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1763555991fdSmrg# 1764555991fdSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1765555991fdSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1766555991fdSmrgAC_ARG_WITH(ps2pdf, 1767555991fdSmrg AS_HELP_STRING([--with-ps2pdf], 1768555991fdSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1769555991fdSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 1770555991fdSmrg 1771555991fdSmrgif test "x$use_ps2pdf" = x"auto"; then 1772555991fdSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1773555991fdSmrg if test "x$PS2PDF" = "x"; then 1774555991fdSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1775555991fdSmrg have_ps2pdf=no 1776555991fdSmrg else 1777555991fdSmrg have_ps2pdf=yes 1778555991fdSmrg fi 1779555991fdSmrgelif test "x$use_ps2pdf" = x"yes" ; then 1780555991fdSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1781555991fdSmrg if test "x$PS2PDF" = "x"; then 1782555991fdSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1783555991fdSmrg fi 1784555991fdSmrg have_ps2pdf=yes 1785555991fdSmrgelif test "x$use_ps2pdf" = x"no" ; then 1786555991fdSmrg if test "x$PS2PDF" != "x"; then 1787555991fdSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1788555991fdSmrg fi 1789555991fdSmrg have_ps2pdf=no 1790555991fdSmrgelse 1791555991fdSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1792555991fdSmrgfi 1793555991fdSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1794555991fdSmrg]) # XORG_WITH_PS2PDF 1795126a8a12Smrg 1796555991fdSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1797555991fdSmrg# ---------------- 1798555991fdSmrg# Minimum version: 1.6.0 1799555991fdSmrg# 1800555991fdSmrg# Documentation tools are not always available on all platforms and sometimes 1801555991fdSmrg# not at the appropriate level. This macro enables a builder to skip all 1802555991fdSmrg# documentation targets except traditional man pages. 1803555991fdSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1804555991fdSmrg# maximum flexibilty in controlling documentation building. 1805555991fdSmrg# Refer to: 1806555991fdSmrg# XORG_WITH_XMLTO --with-xmlto 1807555991fdSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1808555991fdSmrg# XORG_WITH_DOXYGEN --with-doxygen 1809555991fdSmrg# XORG_WITH_FOP --with-fop 1810555991fdSmrg# XORG_WITH_GROFF --with-groff 1811555991fdSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1812555991fdSmrg# 1813555991fdSmrg# Interface to module: 1814555991fdSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1815555991fdSmrg# --enable-docs: 'yes' user instructs the module to generate docs 1816555991fdSmrg# 'no' user instructs the module not to generate docs 1817555991fdSmrg# parm1: specify the default value, yes or no. 1818555991fdSmrg# 1819555991fdSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1820555991fdSmrgdefault=$1 1821555991fdSmrgif test "x$default" = x ; then 1822555991fdSmrg default="yes" 1823555991fdSmrgfi 1824555991fdSmrgAC_ARG_ENABLE(docs, 1825555991fdSmrg AS_HELP_STRING([--enable-docs], 1826555991fdSmrg [Enable building the documentation (default: yes)]), 1827555991fdSmrg [build_docs=$enableval], [build_docs=$default]) 1828555991fdSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1829555991fdSmrgAC_MSG_CHECKING([whether to build documentation]) 1830555991fdSmrgAC_MSG_RESULT([$build_docs]) 1831555991fdSmrg]) # XORG_ENABLE_DOCS 1832555991fdSmrg 1833555991fdSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1834555991fdSmrg# ---------------- 1835555991fdSmrg# Minimum version: 1.6.0 1836555991fdSmrg# 1837555991fdSmrg# This macro enables a builder to skip all developer documentation. 1838555991fdSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1839555991fdSmrg# maximum flexibilty in controlling documentation building. 1840555991fdSmrg# Refer to: 1841555991fdSmrg# XORG_WITH_XMLTO --with-xmlto 1842555991fdSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1843555991fdSmrg# XORG_WITH_DOXYGEN --with-doxygen 1844555991fdSmrg# XORG_WITH_FOP --with-fop 1845555991fdSmrg# XORG_WITH_GROFF --with-groff 1846555991fdSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1847555991fdSmrg# 1848555991fdSmrg# Interface to module: 1849555991fdSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1850555991fdSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1851555991fdSmrg# 'no' user instructs the module not to generate developer docs 1852555991fdSmrg# parm1: specify the default value, yes or no. 1853555991fdSmrg# 1854555991fdSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1855555991fdSmrgdevel_default=$1 1856555991fdSmrgif test "x$devel_default" = x ; then 1857555991fdSmrg devel_default="yes" 1858555991fdSmrgfi 1859555991fdSmrgAC_ARG_ENABLE(devel-docs, 1860555991fdSmrg AS_HELP_STRING([--enable-devel-docs], 1861555991fdSmrg [Enable building the developer documentation (default: yes)]), 1862555991fdSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1863555991fdSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1864555991fdSmrgAC_MSG_CHECKING([whether to build developer documentation]) 1865555991fdSmrgAC_MSG_RESULT([$build_devel_docs]) 1866555991fdSmrg]) # XORG_ENABLE_DEVEL_DOCS 1867555991fdSmrg 1868555991fdSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 1869555991fdSmrg# ---------------- 1870555991fdSmrg# Minimum version: 1.6.0 1871555991fdSmrg# 1872555991fdSmrg# This macro enables a builder to skip all functional specification targets. 1873555991fdSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1874555991fdSmrg# maximum flexibilty in controlling documentation building. 1875555991fdSmrg# Refer to: 1876555991fdSmrg# XORG_WITH_XMLTO --with-xmlto 1877555991fdSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1878555991fdSmrg# XORG_WITH_DOXYGEN --with-doxygen 1879555991fdSmrg# XORG_WITH_FOP --with-fop 1880555991fdSmrg# XORG_WITH_GROFF --with-groff 1881555991fdSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1882555991fdSmrg# 1883555991fdSmrg# Interface to module: 1884555991fdSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1885555991fdSmrg# --enable-specs: 'yes' user instructs the module to generate specs 1886555991fdSmrg# 'no' user instructs the module not to generate specs 1887555991fdSmrg# parm1: specify the default value, yes or no. 1888555991fdSmrg# 1889555991fdSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1890555991fdSmrgspec_default=$1 1891555991fdSmrgif test "x$spec_default" = x ; then 1892555991fdSmrg spec_default="yes" 1893555991fdSmrgfi 1894555991fdSmrgAC_ARG_ENABLE(specs, 1895555991fdSmrg AS_HELP_STRING([--enable-specs], 1896555991fdSmrg [Enable building the specs (default: yes)]), 1897555991fdSmrg [build_specs=$enableval], [build_specs=$spec_default]) 1898555991fdSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1899555991fdSmrgAC_MSG_CHECKING([whether to build functional specifications]) 1900555991fdSmrgAC_MSG_RESULT([$build_specs]) 1901555991fdSmrg]) # XORG_ENABLE_SPECS 1902d656433aSmrg 1903555991fdSmrg# XORG_CHECK_MALLOC_ZERO 1904555991fdSmrg# ---------------------- 1905555991fdSmrg# Minimum version: 1.0.0 1906555991fdSmrg# 1907555991fdSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1908555991fdSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1909555991fdSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1910555991fdSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1911555991fdSmrgAC_ARG_ENABLE(malloc0returnsnull, 1912555991fdSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1913555991fdSmrg [malloc(0) returns NULL (default: auto)]), 1914555991fdSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1915555991fdSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1916d656433aSmrg 1917555991fdSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1918555991fdSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1919555991fdSmrg AC_RUN_IFELSE([ 1920555991fdSmrgchar *malloc(); 1921555991fdSmrgchar *realloc(); 1922555991fdSmrgchar *calloc(); 1923555991fdSmrgmain() { 1924555991fdSmrg char *m0, *r0, *c0, *p; 1925555991fdSmrg m0 = malloc(0); 1926555991fdSmrg p = malloc(10); 1927555991fdSmrg r0 = realloc(p,0); 1928555991fdSmrg c0 = calloc(0); 1929555991fdSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1930555991fdSmrg}], 1931555991fdSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1932555991fdSmrg [MALLOC_ZERO_RETURNS_NULL=no], 1933555991fdSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1934555991fdSmrgfi 1935555991fdSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1936d656433aSmrg 1937555991fdSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1938555991fdSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1939555991fdSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1940555991fdSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1941555991fdSmrgelse 1942555991fdSmrg MALLOC_ZERO_CFLAGS="" 1943555991fdSmrg XMALLOC_ZERO_CFLAGS="" 1944555991fdSmrg XTMALLOC_ZERO_CFLAGS="" 1945d656433aSmrgfi 1946126a8a12Smrg 1947555991fdSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1948555991fdSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1949555991fdSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1950555991fdSmrg]) # XORG_CHECK_MALLOC_ZERO 1951126a8a12Smrg 1952555991fdSmrg# XORG_WITH_LINT() 1953555991fdSmrg# ---------------- 1954555991fdSmrg# Minimum version: 1.1.0 1955555991fdSmrg# 1956555991fdSmrg# This macro enables the use of a tool that flags some suspicious and 1957555991fdSmrg# non-portable constructs (likely to be bugs) in C language source code. 1958555991fdSmrg# It will attempt to locate the tool and use appropriate options. 1959555991fdSmrg# There are various lint type tools on different platforms. 1960555991fdSmrg# 1961555991fdSmrg# Interface to module: 1962555991fdSmrg# LINT: returns the path to the tool found on the platform 1963555991fdSmrg# or the value set to LINT on the configure cmd line 1964555991fdSmrg# also an Automake conditional 1965555991fdSmrg# LINT_FLAGS: an Automake variable with appropriate flags 1966555991fdSmrg# 1967555991fdSmrg# --with-lint: 'yes' user instructs the module to use lint 1968555991fdSmrg# 'no' user instructs the module not to use lint (default) 1969555991fdSmrg# 1970555991fdSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1971555991fdSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1972555991fdSmrg# 1973555991fdSmrgAC_DEFUN([XORG_WITH_LINT],[ 1974126a8a12Smrg 1975555991fdSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1976555991fdSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1977555991fdSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1978555991fdSmrg [Use a lint-style source code checker (default: disabled)])], 1979555991fdSmrg [use_lint=$withval], [use_lint=no]) 1980126a8a12Smrg 1981555991fdSmrg# Obtain platform specific info like program name and options 1982555991fdSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1983555991fdSmrgcase $host_os in 1984555991fdSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1985555991fdSmrg lint_name=splint 1986555991fdSmrg lint_options="-badflag" 1987555991fdSmrg ;; 1988555991fdSmrg *freebsd* | *netbsd*) 1989555991fdSmrg lint_name=lint 1990555991fdSmrg lint_options="-u -b" 1991555991fdSmrg ;; 1992555991fdSmrg *solaris*) 1993555991fdSmrg lint_name=lint 1994555991fdSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1995555991fdSmrg ;; 1996555991fdSmrgesac 1997d656433aSmrg 1998555991fdSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1999555991fdSmrgif test "x$use_lint" = x"yes" ; then 2000555991fdSmrg AC_PATH_PROG([LINT], [$lint_name]) 2001555991fdSmrg if test "x$LINT" = "x"; then 2002555991fdSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2003555991fdSmrg fi 2004555991fdSmrgelif test "x$use_lint" = x"no" ; then 2005555991fdSmrg if test "x$LINT" != "x"; then 2006555991fdSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2007d656433aSmrg fi 2008d656433aSmrgelse 2009555991fdSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2010d656433aSmrgfi 2011d656433aSmrg 2012555991fdSmrg# User supplied flags override default flags 2013555991fdSmrgif test "x$LINT_FLAGS" != "x"; then 2014555991fdSmrg lint_options=$LINT_FLAGS 2015555991fdSmrgfi 2016d656433aSmrg 2017555991fdSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2018555991fdSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2019d656433aSmrg 2020555991fdSmrg]) # XORG_WITH_LINT 2021d656433aSmrg 2022555991fdSmrg# XORG_LINT_LIBRARY(LIBNAME) 2023555991fdSmrg# -------------------------- 2024555991fdSmrg# Minimum version: 1.1.0 2025555991fdSmrg# 2026555991fdSmrg# Sets up flags for building lint libraries for checking programs that call 2027555991fdSmrg# functions in the library. 2028555991fdSmrg# 2029555991fdSmrg# Interface to module: 2030555991fdSmrg# LINTLIB - Automake variable with the name of lint library file to make 2031555991fdSmrg# MAKE_LINT_LIB - Automake conditional 2032555991fdSmrg# 2033555991fdSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2034555991fdSmrg# - 'no' user instructs the module not to create a lint library (default) 2035d656433aSmrg 2036555991fdSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2037555991fdSmrgAC_REQUIRE([XORG_WITH_LINT]) 2038555991fdSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2039555991fdSmrg [Create lint library (default: disabled)])], 2040555991fdSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2041126a8a12Smrg 2042555991fdSmrgif test "x$make_lint_lib" = x"yes" ; then 2043555991fdSmrg LINTLIB=llib-l$1.ln 2044555991fdSmrg if test "x$LINT" = "x"; then 2045555991fdSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2046555991fdSmrg fi 2047555991fdSmrgelif test "x$make_lint_lib" != x"no" ; then 2048555991fdSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2049555991fdSmrgfi 2050126a8a12Smrg 2051555991fdSmrgAC_SUBST(LINTLIB) 2052555991fdSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2053126a8a12Smrg 2054555991fdSmrg]) # XORG_LINT_LIBRARY 2055126a8a12Smrg 2056555991fdSmrg# XORG_CWARNFLAGS 2057555991fdSmrg# --------------- 2058555991fdSmrg# Minimum version: 1.2.0 2059555991fdSmrg# 2060555991fdSmrg# Defines CWARNFLAGS to enable C compiler warnings. 2061555991fdSmrg# 2062555991fdSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2063555991fdSmrgAC_REQUIRE([AC_PROG_CC_C99]) 2064555991fdSmrgif test "x$GCC" = xyes ; then 2065555991fdSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 2066555991fdSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2067555991fdSmrg-Wbad-function-cast -Wformat=2" 2068555991fdSmrg case `$CC -dumpversion` in 2069555991fdSmrg 3.4.* | 4.*) 2070555991fdSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 2071555991fdSmrg ;; 2072555991fdSmrg esac 2073d656433aSmrgelse 2074555991fdSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2075555991fdSmrg if test "x$SUNCC" = "xyes"; then 2076555991fdSmrg CWARNFLAGS="-v" 2077555991fdSmrg fi 2078d656433aSmrgfi 2079555991fdSmrgAC_SUBST(CWARNFLAGS) 2080555991fdSmrg]) # XORG_CWARNFLAGS 2081126a8a12Smrg 2082555991fdSmrg# XORG_STRICT_OPTION 2083555991fdSmrg# ----------------------- 2084555991fdSmrg# Minimum version: 1.3.0 2085555991fdSmrg# 2086555991fdSmrg# Add configure option to enable strict compilation 2087555991fdSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2088555991fdSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 2089555991fdSmrgAC_REQUIRE([AC_PROG_CC_C99]) 2090555991fdSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2091555991fdSmrg 2092555991fdSmrgAC_ARG_ENABLE(strict-compilation, 2093555991fdSmrg AS_HELP_STRING([--enable-strict-compilation], 2094555991fdSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2095555991fdSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2096555991fdSmrgif test "x$STRICT_COMPILE" = "xyes"; then 2097555991fdSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2098555991fdSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2099555991fdSmrg if test "x$GCC" = xyes ; then 2100555991fdSmrg STRICT_CFLAGS="-pedantic -Werror" 2101555991fdSmrg elif test "x$SUNCC" = "xyes"; then 2102555991fdSmrg STRICT_CFLAGS="-errwarn" 2103555991fdSmrg elif test "x$INTELCC" = "xyes"; then 2104555991fdSmrg STRICT_CFLAGS="-Werror" 2105555991fdSmrg fi 2106555991fdSmrgfi 2107555991fdSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2108555991fdSmrgAC_SUBST([CWARNFLAGS]) 2109555991fdSmrg]) # XORG_STRICT_OPTION 2110126a8a12Smrg 2111555991fdSmrg# XORG_DEFAULT_OPTIONS 2112555991fdSmrg# -------------------- 2113555991fdSmrg# Minimum version: 1.3.0 2114555991fdSmrg# 2115555991fdSmrg# Defines default options for X.Org modules. 2116555991fdSmrg# 2117555991fdSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2118555991fdSmrgAC_REQUIRE([AC_PROG_INSTALL]) 2119555991fdSmrgXORG_CWARNFLAGS 2120555991fdSmrgXORG_STRICT_OPTION 2121555991fdSmrgXORG_RELEASE_VERSION 2122555991fdSmrgXORG_CHANGELOG 2123555991fdSmrgXORG_INSTALL 2124555991fdSmrgXORG_MANPAGE_SECTIONS 2125555991fdSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2126555991fdSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2127555991fdSmrg]) # XORG_DEFAULT_OPTIONS 2128555991fdSmrg 2129555991fdSmrg# XORG_INSTALL() 2130d656433aSmrg# ---------------- 2131555991fdSmrg# Minimum version: 1.4.0 2132555991fdSmrg# 2133555991fdSmrg# Defines the variable INSTALL_CMD as the command to copy 2134555991fdSmrg# INSTALL from $prefix/share/util-macros. 2135555991fdSmrg# 2136555991fdSmrgAC_DEFUN([XORG_INSTALL], [ 2137555991fdSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2138555991fdSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2139555991fdSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2140555991fdSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2141555991fdSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2142555991fdSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2143555991fdSmrgAC_SUBST([INSTALL_CMD]) 2144555991fdSmrg]) # XORG_INSTALL 2145555991fdSmrgdnl Copyright 2005 Red Hat, Inc 2146555991fdSmrgdnl 2147555991fdSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2148555991fdSmrgdnl documentation for any purpose is hereby granted without fee, provided that 2149555991fdSmrgdnl the above copyright notice appear in all copies and that both that 2150555991fdSmrgdnl copyright notice and this permission notice appear in supporting 2151555991fdSmrgdnl documentation. 2152555991fdSmrgdnl 2153555991fdSmrgdnl The above copyright notice and this permission notice shall be included 2154555991fdSmrgdnl in all copies or substantial portions of the Software. 2155555991fdSmrgdnl 2156555991fdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2157555991fdSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2158555991fdSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2159555991fdSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2160555991fdSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2161555991fdSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2162555991fdSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 2163555991fdSmrgdnl 2164555991fdSmrgdnl Except as contained in this notice, the name of the copyright holders shall 2165555991fdSmrgdnl not be used in advertising or otherwise to promote the sale, use or 2166555991fdSmrgdnl other dealings in this Software without prior written authorization 2167555991fdSmrgdnl from the copyright holders. 2168555991fdSmrgdnl 2169126a8a12Smrg 2170555991fdSmrg# XORG_RELEASE_VERSION 2171555991fdSmrg# -------------------- 2172555991fdSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2173555991fdSmrg 2174555991fdSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2175555991fdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2176555991fdSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2177555991fdSmrg [Major version of this package]) 2178555991fdSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2179555991fdSmrg if test "x$PVM" = "x"; then 2180555991fdSmrg PVM="0" 2181555991fdSmrg fi 2182555991fdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2183555991fdSmrg [$PVM], 2184555991fdSmrg [Minor version of this package]) 2185555991fdSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2186555991fdSmrg if test "x$PVP" = "x"; then 2187555991fdSmrg PVP="0" 2188555991fdSmrg fi 2189555991fdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2190555991fdSmrg [$PVP], 2191555991fdSmrg [Patch version of this package]) 2192555991fdSmrg]) 2193126a8a12Smrg 2194555991fdSmrg# XORG_CHANGELOG() 2195555991fdSmrg# ---------------- 2196555991fdSmrg# Minimum version: 1.2.0 2197555991fdSmrg# 2198555991fdSmrg# Defines the variable CHANGELOG_CMD as the command to generate 2199555991fdSmrg# ChangeLog from git. 2200555991fdSmrg# 2201555991fdSmrg# 2202555991fdSmrgAC_DEFUN([XORG_CHANGELOG], [ 2203555991fdSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2204555991fdSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2205555991fdSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2206555991fdSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 2207555991fdSmrgAC_SUBST([CHANGELOG_CMD]) 2208555991fdSmrg]) # XORG_CHANGELOG 2209126a8a12Smrg 2210555991fdSmrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 2211555991fdSmrgdnl 2212555991fdSmrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2213555991fdSmrgdnl 2214555991fdSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 2215555991fdSmrgdnl copy of this software and associated documentation files (the "Software"), 2216555991fdSmrgdnl to deal in the Software without restriction, including without limitation 2217555991fdSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 2218555991fdSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 2219555991fdSmrgdnl Software is furnished to do so, subject to the following conditions: 2220555991fdSmrgdnl 2221555991fdSmrgdnl The above copyright notice and this permission notice (including the next 2222555991fdSmrgdnl paragraph) shall be included in all copies or substantial portions of the 2223555991fdSmrgdnl Software. 2224555991fdSmrgdnl 2225555991fdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2226555991fdSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2227555991fdSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2228555991fdSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2229555991fdSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2230555991fdSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2231555991fdSmrgdnl DEALINGS IN THE SOFTWARE. 2232555991fdSmrgdnl 2233126a8a12Smrg 2234555991fdSmrg# XTRANS_TCP_FLAGS() 2235555991fdSmrg# ------------------ 2236555991fdSmrg# Find needed libraries for TCP sockets, and check for IPv6 support 2237555991fdSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 2238555991fdSmrg # SVR4 hides these in libraries other than libc 2239555991fdSmrg AC_SEARCH_LIBS(socket, [socket]) 2240555991fdSmrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 2241555991fdSmrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 2242555991fdSmrg AC_HAVE_LIBRARY([ws2_32]) 2243555991fdSmrg fi 2244126a8a12Smrg 2245555991fdSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 2246555991fdSmrg AC_ARG_ENABLE(ipv6, 2247555991fdSmrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 2248555991fdSmrg [IPV6CONN=$enableval], 2249555991fdSmrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 2250555991fdSmrg AC_MSG_CHECKING([if IPv6 support should be built]) 2251555991fdSmrg if test "$IPV6CONN" = "yes"; then 2252555991fdSmrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 2253555991fdSmrg fi 2254555991fdSmrg AC_MSG_RESULT($IPV6CONN) 2255126a8a12Smrg 2256555991fdSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in 2257555991fdSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 2258555991fdSmrg AC_DEFINE([BSD44SOCKETS],1, 2259555991fdSmrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 2260555991fdSmrg#include <sys/types.h> 2261555991fdSmrg#include <sys/socket.h> 2262555991fdSmrg#include <netinet/in.h> 2263555991fdSmrg ]) 2264d656433aSmrg 2265555991fdSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 2266555991fdSmrg AC_CHECK_TYPES([socklen_t], [], [], [ 2267555991fdSmrgAC_INCLUDES_DEFAULT 2268555991fdSmrg#include <sys/socket.h>]) 2269555991fdSmrg 2270555991fdSmrg]) # XTRANS_TCP_FLAGS 2271d656433aSmrg 2272555991fdSmrg# XTRANS_CONNECTION_FLAGS() 2273555991fdSmrg# ------------------------- 2274555991fdSmrg# Standard checks for which Xtrans transports to use by the Xorg packages 2275555991fdSmrg# that use Xtrans functions 2276555991fdSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 2277555991fdSmrg AC_REQUIRE([AC_CANONICAL_HOST]) 2278555991fdSmrg AC_REQUIRE([AC_TYPE_SIGNAL]) 2279555991fdSmrg [case $host_os in 2280555991fdSmrg mingw*) unixdef="no" ;; 2281555991fdSmrg *) unixdef="yes" ;; 2282555991fdSmrg esac] 2283555991fdSmrg AC_ARG_ENABLE(unix-transport, 2284555991fdSmrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 2285555991fdSmrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 2286555991fdSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 2287555991fdSmrg if test "$UNIXCONN" = "yes"; then 2288555991fdSmrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 2289555991fdSmrg fi 2290555991fdSmrg AC_MSG_RESULT($UNIXCONN) 2291555991fdSmrg AC_ARG_ENABLE(tcp-transport, 2292555991fdSmrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 2293555991fdSmrg [TCPCONN=$enableval], [TCPCONN=yes]) 2294555991fdSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 2295555991fdSmrg AC_MSG_RESULT($TCPCONN) 2296555991fdSmrg if test "$TCPCONN" = "yes"; then 2297555991fdSmrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 2298555991fdSmrg XTRANS_TCP_FLAGS 2299555991fdSmrg fi 2300555991fdSmrg [case $host_os in 2301555991fdSmrg solaris*|sco*|sysv4*) localdef="yes" ;; 2302555991fdSmrg *) localdef="no" ;; 2303555991fdSmrg esac] 2304555991fdSmrg AC_ARG_ENABLE(local-transport, 2305555991fdSmrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 2306555991fdSmrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 2307555991fdSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 2308555991fdSmrg AC_MSG_RESULT($LOCALCONN) 2309555991fdSmrg if test "$LOCALCONN" = "yes"; then 2310555991fdSmrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 2311555991fdSmrg fi 2312555991fdSmrg 2313555991fdSmrg]) # XTRANS_CONNECTION_FLAGS 2314d656433aSmrg 2315126a8a12Smrg 2316555991fdSmrg# XTRANS_SECURE_RPC_FLAGS() 2317555991fdSmrg# ------------------------- 2318555991fdSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 2319555991fdSmrg# so that any necessary networking libraries are already found 2320555991fdSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 2321555991fdSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 2322555991fdSmrg AC_ARG_ENABLE(secure-rpc, 2323555991fdSmrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 2324555991fdSmrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 2325126a8a12Smrg 2326555991fdSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 2327555991fdSmrg FOUND_SECURE_RPC="no" 2328555991fdSmrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 2329555991fdSmrg [FOUND_SECURE_RPC="yes"]) 2330555991fdSmrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 2331555991fdSmrg if test "x$SECURE_RPC" = "xyes" ; then 2332555991fdSmrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 2333555991fdSmrg fi 2334555991fdSmrg SECURE_RPC="no" 2335555991fdSmrg else 2336555991fdSmrg dnl FreeBSD keeps getsecretkey in librpcsvc 2337555991fdSmrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 2338555991fdSmrg SECURE_RPC="yes" 2339555991fdSmrg fi 2340555991fdSmrg fi 2341555991fdSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 2342555991fdSmrg if test "x$SECURE_RPC" = "xyes" ; then 2343555991fdSmrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 2344555991fdSmrg fi 2345555991fdSmrg AC_MSG_RESULT($SECURE_RPC) 2346555991fdSmrg]) # XTRANS_SECURE_RPC_FLAGS 2347126a8a12Smrg 2348126a8a12Smrg 2349555991fdSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2350555991fdSmrg# 2351555991fdSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2352555991fdSmrg# 2353555991fdSmrg# This program is free software; you can redistribute it and/or modify 2354555991fdSmrg# it under the terms of the GNU General Public License as published by 2355555991fdSmrg# the Free Software Foundation; either version 2 of the License, or 2356555991fdSmrg# (at your option) any later version. 2357555991fdSmrg# 2358555991fdSmrg# This program is distributed in the hope that it will be useful, but 2359555991fdSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2360555991fdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2361555991fdSmrg# General Public License for more details. 2362555991fdSmrg# 2363555991fdSmrg# You should have received a copy of the GNU General Public License 2364555991fdSmrg# along with this program; if not, write to the Free Software 2365555991fdSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2366555991fdSmrg# 2367555991fdSmrg# As a special exception to the GNU General Public License, if you 2368555991fdSmrg# distribute this file as part of a program that contains a 2369555991fdSmrg# configuration script generated by Autoconf, you may include it under 2370555991fdSmrg# the same distribution terms that you use for the rest of that program. 2371126a8a12Smrg 2372555991fdSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2373555991fdSmrg# ---------------------------------- 2374555991fdSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2375555991fdSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2376555991fdSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2377555991fdSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2378555991fdSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2379555991fdSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2380555991fdSmrgfi 2381555991fdSmrgif test -n "$PKG_CONFIG"; then 2382555991fdSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 2383555991fdSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2384555991fdSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2385555991fdSmrg AC_MSG_RESULT([yes]) 2386555991fdSmrg else 2387555991fdSmrg AC_MSG_RESULT([no]) 2388555991fdSmrg PKG_CONFIG="" 2389555991fdSmrg fi 2390555991fdSmrg 2391555991fdSmrgfi[]dnl 2392555991fdSmrg])# PKG_PROG_PKG_CONFIG 2393126a8a12Smrg 2394555991fdSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2395555991fdSmrg# 2396555991fdSmrg# Check to see whether a particular set of modules exists. Similar 2397555991fdSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2398555991fdSmrg# 2399555991fdSmrg# 2400555991fdSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2401555991fdSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 2402555991fdSmrg# PKG_CHECK_EXISTS manually 2403555991fdSmrg# -------------------------------------------------------------- 2404555991fdSmrgAC_DEFUN([PKG_CHECK_EXISTS], 2405555991fdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2406555991fdSmrgif test -n "$PKG_CONFIG" && \ 2407555991fdSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2408555991fdSmrg m4_ifval([$2], [$2], [:]) 2409555991fdSmrgm4_ifvaln([$3], [else 2410555991fdSmrg $3])dnl 2411555991fdSmrgfi]) 2412d656433aSmrg 2413126a8a12Smrg 2414555991fdSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2415555991fdSmrg# --------------------------------------------- 2416555991fdSmrgm4_define([_PKG_CONFIG], 2417555991fdSmrg[if test -n "$$1"; then 2418555991fdSmrg pkg_cv_[]$1="$$1" 2419555991fdSmrg elif test -n "$PKG_CONFIG"; then 2420555991fdSmrg PKG_CHECK_EXISTS([$3], 2421555991fdSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2422555991fdSmrg [pkg_failed=yes]) 2423555991fdSmrg else 2424555991fdSmrg pkg_failed=untried 2425555991fdSmrgfi[]dnl 2426555991fdSmrg])# _PKG_CONFIG 2427126a8a12Smrg 2428555991fdSmrg# _PKG_SHORT_ERRORS_SUPPORTED 2429555991fdSmrg# ----------------------------- 2430555991fdSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2431555991fdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2432555991fdSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2433555991fdSmrg _pkg_short_errors_supported=yes 2434555991fdSmrgelse 2435555991fdSmrg _pkg_short_errors_supported=no 2436555991fdSmrgfi[]dnl 2437555991fdSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 2438126a8a12Smrg 2439126a8a12Smrg 2440555991fdSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2441555991fdSmrg# [ACTION-IF-NOT-FOUND]) 2442555991fdSmrg# 2443555991fdSmrg# 2444555991fdSmrg# Note that if there is a possibility the first call to 2445555991fdSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2446555991fdSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2447555991fdSmrg# 2448555991fdSmrg# 2449555991fdSmrg# -------------------------------------------------------------- 2450555991fdSmrgAC_DEFUN([PKG_CHECK_MODULES], 2451555991fdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2452555991fdSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2453555991fdSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2454126a8a12Smrg 2455555991fdSmrgpkg_failed=no 2456555991fdSmrgAC_MSG_CHECKING([for $1]) 2457126a8a12Smrg 2458555991fdSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2459555991fdSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2460126a8a12Smrg 2461555991fdSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2462555991fdSmrgand $1[]_LIBS to avoid the need to call pkg-config. 2463555991fdSmrgSee the pkg-config man page for more details.]) 2464126a8a12Smrg 2465555991fdSmrgif test $pkg_failed = yes; then 2466555991fdSmrg _PKG_SHORT_ERRORS_SUPPORTED 2467555991fdSmrg if test $_pkg_short_errors_supported = yes; then 2468555991fdSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2469555991fdSmrg else 2470555991fdSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2471555991fdSmrg fi 2472555991fdSmrg # Put the nasty error message in config.log where it belongs 2473555991fdSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2474126a8a12Smrg 2475555991fdSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 2476555991fdSmrg[Package requirements ($2) were not met: 2477126a8a12Smrg 2478555991fdSmrg$$1_PKG_ERRORS 2479126a8a12Smrg 2480555991fdSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2481555991fdSmrginstalled software in a non-standard prefix. 2482126a8a12Smrg 2483555991fdSmrg_PKG_TEXT 2484555991fdSmrg])], 2485555991fdSmrg [AC_MSG_RESULT([no]) 2486555991fdSmrg $4]) 2487555991fdSmrgelif test $pkg_failed = untried; then 2488555991fdSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2489555991fdSmrg[The pkg-config script could not be found or is too old. Make sure it 2490555991fdSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 2491555991fdSmrgpath to pkg-config. 2492555991fdSmrg 2493555991fdSmrg_PKG_TEXT 2494555991fdSmrg 2495555991fdSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2496555991fdSmrg [$4]) 2497555991fdSmrgelse 2498555991fdSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2499555991fdSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2500555991fdSmrg AC_MSG_RESULT([yes]) 2501555991fdSmrg ifelse([$3], , :, [$3]) 2502555991fdSmrgfi[]dnl 2503555991fdSmrg])# PKG_CHECK_MODULES 2504555991fdSmrg 2505555991fdSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2506555991fdSmrg# 2507555991fdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2508555991fdSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2509555991fdSmrg# Inc. 2510555991fdSmrg# Written by Gordon Matzigkeit, 1996 2511555991fdSmrg# 2512555991fdSmrg# This file is free software; the Free Software Foundation gives 2513555991fdSmrg# unlimited permission to copy and/or distribute it, with or without 2514555991fdSmrg# modifications, as long as this notice is preserved. 2515555991fdSmrg 2516555991fdSmrgm4_define([_LT_COPYING], [dnl 2517555991fdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2518555991fdSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2519555991fdSmrg# Inc. 2520555991fdSmrg# Written by Gordon Matzigkeit, 1996 2521555991fdSmrg# 2522555991fdSmrg# This file is part of GNU Libtool. 2523555991fdSmrg# 2524555991fdSmrg# GNU Libtool is free software; you can redistribute it and/or 2525555991fdSmrg# modify it under the terms of the GNU General Public License as 2526555991fdSmrg# published by the Free Software Foundation; either version 2 of 2527555991fdSmrg# the License, or (at your option) any later version. 2528555991fdSmrg# 2529555991fdSmrg# As a special exception to the GNU General Public License, 2530555991fdSmrg# if you distribute this file as part of a program or library that 2531555991fdSmrg# is built using GNU Libtool, you may include this file under the 2532555991fdSmrg# same distribution terms that you use for the rest of that program. 2533555991fdSmrg# 2534555991fdSmrg# GNU Libtool is distributed in the hope that it will be useful, 2535555991fdSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2536555991fdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2537555991fdSmrg# GNU General Public License for more details. 2538555991fdSmrg# 2539555991fdSmrg# You should have received a copy of the GNU General Public License 2540555991fdSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 2541555991fdSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2542555991fdSmrg# obtained by writing to the Free Software Foundation, Inc., 2543555991fdSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2544d656433aSmrg]) 2545126a8a12Smrg 2546555991fdSmrg# serial 57 LT_INIT 2547126a8a12Smrg 2548126a8a12Smrg 2549555991fdSmrg# LT_PREREQ(VERSION) 2550555991fdSmrg# ------------------ 2551555991fdSmrg# Complain and exit if this libtool version is less that VERSION. 2552555991fdSmrgm4_defun([LT_PREREQ], 2553555991fdSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2554555991fdSmrg [m4_default([$3], 2555555991fdSmrg [m4_fatal([Libtool version $1 or higher is required], 2556555991fdSmrg 63)])], 2557555991fdSmrg [$2])]) 2558126a8a12Smrg 2559126a8a12Smrg 2560555991fdSmrg# _LT_CHECK_BUILDDIR 2561555991fdSmrg# ------------------ 2562555991fdSmrg# Complain if the absolute build directory name contains unusual characters 2563555991fdSmrgm4_defun([_LT_CHECK_BUILDDIR], 2564555991fdSmrg[case `pwd` in 2565555991fdSmrg *\ * | *\ *) 2566555991fdSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2567555991fdSmrgesac 2568555991fdSmrg]) 2569126a8a12Smrg 2570126a8a12Smrg 2571555991fdSmrg# LT_INIT([OPTIONS]) 2572555991fdSmrg# ------------------ 2573555991fdSmrgAC_DEFUN([LT_INIT], 2574555991fdSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2575555991fdSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2576555991fdSmrgAC_BEFORE([$0], [LT_LANG])dnl 2577555991fdSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2578555991fdSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2579555991fdSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 2580126a8a12Smrg 2581555991fdSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2582555991fdSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2583555991fdSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2584555991fdSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2585555991fdSmrgdnl unless we require an AC_DEFUNed macro: 2586555991fdSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2587555991fdSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2588555991fdSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2589555991fdSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2590555991fdSmrgm4_require([_LT_PROG_LTMAIN])dnl 2591126a8a12Smrg 2592555991fdSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2593126a8a12Smrg 2594555991fdSmrgdnl Parse OPTIONS 2595555991fdSmrg_LT_SET_OPTIONS([$0], [$1]) 2596126a8a12Smrg 2597555991fdSmrg# This can be used to rebuild libtool when needed 2598555991fdSmrgLIBTOOL_DEPS="$ltmain" 2599126a8a12Smrg 2600555991fdSmrg# Always use our own libtool. 2601555991fdSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2602555991fdSmrgAC_SUBST(LIBTOOL)dnl 2603126a8a12Smrg 2604555991fdSmrg_LT_SETUP 2605555991fdSmrg 2606555991fdSmrg# Only expand once: 2607555991fdSmrgm4_define([LT_INIT]) 2608555991fdSmrg])# LT_INIT 2609555991fdSmrg 2610555991fdSmrg# Old names: 2611555991fdSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2612555991fdSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2613555991fdSmrgdnl aclocal-1.4 backwards compatibility: 2614555991fdSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2615555991fdSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2616555991fdSmrg 2617555991fdSmrg 2618555991fdSmrg# _LT_CC_BASENAME(CC) 2619555991fdSmrg# ------------------- 2620555991fdSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2621555991fdSmrgm4_defun([_LT_CC_BASENAME], 2622555991fdSmrg[for cc_temp in $1""; do 2623555991fdSmrg case $cc_temp in 2624555991fdSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2625555991fdSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2626555991fdSmrg \-*) ;; 2627555991fdSmrg *) break;; 2628d656433aSmrg esac 2629555991fdSmrgdone 2630555991fdSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 2631555991fdSmrg]) 2632126a8a12Smrg 2633126a8a12Smrg 2634555991fdSmrg# _LT_FILEUTILS_DEFAULTS 2635555991fdSmrg# ---------------------- 2636555991fdSmrg# It is okay to use these file commands and assume they have been set 2637555991fdSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2638555991fdSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2639555991fdSmrg[: ${CP="cp -f"} 2640555991fdSmrg: ${MV="mv -f"} 2641555991fdSmrg: ${RM="rm -f"} 2642555991fdSmrg])# _LT_FILEUTILS_DEFAULTS 2643126a8a12Smrg 2644126a8a12Smrg 2645555991fdSmrg# _LT_SETUP 2646555991fdSmrg# --------- 2647555991fdSmrgm4_defun([_LT_SETUP], 2648555991fdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2649555991fdSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2650555991fdSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 2651555991fdSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2652555991fdSmrg 2653555991fdSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2654555991fdSmrg_LT_DECL([], [host], [0])dnl 2655555991fdSmrg_LT_DECL([], [host_os], [0])dnl 2656555991fdSmrgdnl 2657555991fdSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2658555991fdSmrg_LT_DECL([], [build], [0])dnl 2659555991fdSmrg_LT_DECL([], [build_os], [0])dnl 2660555991fdSmrgdnl 2661555991fdSmrgAC_REQUIRE([AC_PROG_CC])dnl 2662555991fdSmrgAC_REQUIRE([LT_PATH_LD])dnl 2663555991fdSmrgAC_REQUIRE([LT_PATH_NM])dnl 2664555991fdSmrgdnl 2665555991fdSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2666555991fdSmrgtest -z "$LN_S" && LN_S="ln -s" 2667555991fdSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2668555991fdSmrgdnl 2669555991fdSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2670555991fdSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2671555991fdSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2672555991fdSmrgdnl 2673555991fdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2674555991fdSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2675555991fdSmrgm4_require([_LT_CMD_RELOAD])dnl 2676555991fdSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2677555991fdSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2678555991fdSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2679555991fdSmrg 2680555991fdSmrg_LT_CONFIG_LIBTOOL_INIT([ 2681555991fdSmrg# See if we are running on zsh, and set the options which allow our 2682555991fdSmrg# commands through without removal of \ escapes INIT. 2683555991fdSmrgif test -n "\${ZSH_VERSION+set}" ; then 2684555991fdSmrg setopt NO_GLOB_SUBST 2685555991fdSmrgfi 2686555991fdSmrg]) 2687555991fdSmrgif test -n "${ZSH_VERSION+set}" ; then 2688555991fdSmrg setopt NO_GLOB_SUBST 2689555991fdSmrgfi 2690555991fdSmrg 2691555991fdSmrg_LT_CHECK_OBJDIR 2692555991fdSmrg 2693555991fdSmrgm4_require([_LT_TAG_COMPILER])dnl 2694555991fdSmrg 2695555991fdSmrgcase $host_os in 2696555991fdSmrgaix3*) 2697555991fdSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2698555991fdSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2699555991fdSmrg # vanish in a puff of smoke. 2700555991fdSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 2701555991fdSmrg COLLECT_NAMES= 2702555991fdSmrg export COLLECT_NAMES 2703d656433aSmrg fi 2704d656433aSmrg ;; 2705555991fdSmrgesac 2706126a8a12Smrg 2707555991fdSmrg# Global variables: 2708555991fdSmrgofile=libtool 2709555991fdSmrgcan_build_shared=yes 2710126a8a12Smrg 2711555991fdSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 2712555991fdSmrg# which needs '.lib'). 2713555991fdSmrglibext=a 2714126a8a12Smrg 2715555991fdSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2716126a8a12Smrg 2717555991fdSmrgold_CC="$CC" 2718555991fdSmrgold_CFLAGS="$CFLAGS" 2719126a8a12Smrg 2720555991fdSmrg# Set sane defaults for various variables 2721555991fdSmrgtest -z "$CC" && CC=cc 2722555991fdSmrgtest -z "$LTCC" && LTCC=$CC 2723555991fdSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2724555991fdSmrgtest -z "$LD" && LD=ld 2725555991fdSmrgtest -z "$ac_objext" && ac_objext=o 2726d656433aSmrg 2727555991fdSmrg_LT_CC_BASENAME([$compiler]) 2728d656433aSmrg 2729555991fdSmrg# Only perform the check for file, if the check method requires it 2730555991fdSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2731555991fdSmrgcase $deplibs_check_method in 2732555991fdSmrgfile_magic*) 2733555991fdSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2734555991fdSmrg _LT_PATH_MAGIC 2735555991fdSmrg fi 2736126a8a12Smrg ;; 2737555991fdSmrgesac 2738126a8a12Smrg 2739555991fdSmrg# Use C for the default configuration in the libtool script 2740555991fdSmrgLT_SUPPORTED_TAG([CC]) 2741555991fdSmrg_LT_LANG_C_CONFIG 2742555991fdSmrg_LT_LANG_DEFAULT_CONFIG 2743555991fdSmrg_LT_CONFIG_COMMANDS 2744555991fdSmrg])# _LT_SETUP 2745126a8a12Smrg 2746126a8a12Smrg 2747555991fdSmrg# _LT_PREPARE_SED_QUOTE_VARS 2748555991fdSmrg# -------------------------- 2749555991fdSmrg# Define a few sed substitution that help us do robust quoting. 2750555991fdSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2751555991fdSmrg[# Backslashify metacharacters that are still active within 2752555991fdSmrg# double-quoted strings. 2753555991fdSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2754126a8a12Smrg 2755555991fdSmrg# Same as above, but do not quote variable references. 2756555991fdSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2757d656433aSmrg 2758555991fdSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2759555991fdSmrg# double_quote_subst'ed string. 2760555991fdSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2761126a8a12Smrg 2762555991fdSmrg# Sed substitution to delay expansion of an escaped single quote. 2763555991fdSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2764126a8a12Smrg 2765555991fdSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2766555991fdSmrgno_glob_subst='s/\*/\\\*/g' 2767555991fdSmrg]) 2768126a8a12Smrg 2769555991fdSmrg# _LT_PROG_LTMAIN 2770555991fdSmrg# --------------- 2771555991fdSmrg# Note that this code is called both from `configure', and `config.status' 2772555991fdSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2773555991fdSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2774555991fdSmrg# so we pass a copy along to make sure it has a sensible value anyway. 2775555991fdSmrgm4_defun([_LT_PROG_LTMAIN], 2776555991fdSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2777555991fdSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2778555991fdSmrgltmain="$ac_aux_dir/ltmain.sh" 2779555991fdSmrg])# _LT_PROG_LTMAIN 2780126a8a12Smrg 2781d656433aSmrg 2782126a8a12Smrg 2783555991fdSmrg# So that we can recreate a full libtool script including additional 2784555991fdSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2785555991fdSmrg# in macros and then make a single call at the end using the `libtool' 2786555991fdSmrg# label. 2787d656433aSmrg 2788d656433aSmrg 2789555991fdSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2790555991fdSmrg# ---------------------------------------- 2791555991fdSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2792555991fdSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2793555991fdSmrg[m4_ifval([$1], 2794555991fdSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2795555991fdSmrg [$1 2796555991fdSmrg])])]) 2797d656433aSmrg 2798555991fdSmrg# Initialize. 2799555991fdSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2800126a8a12Smrg 2801126a8a12Smrg 2802555991fdSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2803555991fdSmrg# ------------------------------ 2804555991fdSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2805555991fdSmrgm4_define([_LT_CONFIG_LIBTOOL], 2806555991fdSmrg[m4_ifval([$1], 2807555991fdSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2808555991fdSmrg [$1 2809555991fdSmrg])])]) 2810126a8a12Smrg 2811555991fdSmrg# Initialize. 2812555991fdSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2813126a8a12Smrg 2814126a8a12Smrg 2815555991fdSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2816555991fdSmrg# ----------------------------------------------------- 2817555991fdSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2818555991fdSmrg[_LT_CONFIG_LIBTOOL([$1]) 2819555991fdSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2820555991fdSmrg]) 2821d656433aSmrg 2822d656433aSmrg 2823555991fdSmrg# _LT_FORMAT_COMMENT([COMMENT]) 2824555991fdSmrg# ----------------------------- 2825555991fdSmrg# Add leading comment marks to the start of each line, and a trailing 2826555991fdSmrg# full-stop to the whole comment if one is not present already. 2827555991fdSmrgm4_define([_LT_FORMAT_COMMENT], 2828555991fdSmrg[m4_ifval([$1], [ 2829555991fdSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2830555991fdSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2831555991fdSmrg)]) 2832126a8a12Smrg 2833d656433aSmrg 2834126a8a12Smrg 2835126a8a12Smrg 2836126a8a12Smrg 2837555991fdSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2838555991fdSmrg# ------------------------------------------------------------------- 2839555991fdSmrg# CONFIGNAME is the name given to the value in the libtool script. 2840555991fdSmrg# VARNAME is the (base) name used in the configure script. 2841555991fdSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2842555991fdSmrg# VARNAME. Any other value will be used directly. 2843555991fdSmrgm4_define([_LT_DECL], 2844555991fdSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2845555991fdSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2846555991fdSmrg [m4_ifval([$1], [$1], [$2])]) 2847555991fdSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2848555991fdSmrg m4_ifval([$4], 2849555991fdSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2850555991fdSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 2851555991fdSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 2852555991fdSmrg]) 2853126a8a12Smrg 2854d656433aSmrg 2855555991fdSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2856555991fdSmrg# -------------------------------------------------------- 2857555991fdSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2858d656433aSmrg 2859126a8a12Smrg 2860555991fdSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2861555991fdSmrg# ------------------------------------------------ 2862555991fdSmrgm4_define([lt_decl_tag_varnames], 2863555991fdSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 2864126a8a12Smrg 2865126a8a12Smrg 2866555991fdSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2867555991fdSmrg# --------------------------------------------------------- 2868555991fdSmrgm4_define([_lt_decl_filter], 2869555991fdSmrg[m4_case([$#], 2870555991fdSmrg [0], [m4_fatal([$0: too few arguments: $#])], 2871555991fdSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 2872555991fdSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2873555991fdSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2874555991fdSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2875555991fdSmrg]) 2876d656433aSmrg 2877d656433aSmrg 2878555991fdSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2879555991fdSmrg# -------------------------------------------------- 2880555991fdSmrgm4_define([lt_decl_quote_varnames], 2881555991fdSmrg[_lt_decl_filter([value], [1], $@)]) 2882126a8a12Smrg 2883126a8a12Smrg 2884555991fdSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2885555991fdSmrg# --------------------------------------------------- 2886555991fdSmrgm4_define([lt_decl_dquote_varnames], 2887555991fdSmrg[_lt_decl_filter([value], [2], $@)]) 2888126a8a12Smrg 2889126a8a12Smrg 2890555991fdSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2891555991fdSmrg# --------------------------------------------------- 2892555991fdSmrgm4_define([lt_decl_varnames_tagged], 2893555991fdSmrg[m4_assert([$# <= 2])dnl 2894555991fdSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 2895555991fdSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2896555991fdSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2897555991fdSmrgm4_define([_lt_decl_varnames_tagged], 2898555991fdSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2899126a8a12Smrg 2900126a8a12Smrg 2901555991fdSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2902555991fdSmrg# ------------------------------------------------ 2903555991fdSmrgm4_define([lt_decl_all_varnames], 2904555991fdSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 2905555991fdSmrg m4_if([$2], [], 2906555991fdSmrg m4_quote(lt_decl_varnames), 2907555991fdSmrg m4_quote(m4_shift($@))))[]dnl 2908555991fdSmrg]) 2909555991fdSmrgm4_define([_lt_decl_all_varnames], 2910555991fdSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 2911555991fdSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2912555991fdSmrg]) 2913126a8a12Smrg 2914126a8a12Smrg 2915555991fdSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2916555991fdSmrg# ------------------------------------ 2917555991fdSmrg# Quote a variable value, and forward it to `config.status' so that its 2918555991fdSmrg# declaration there will have the same value as in `configure'. VARNAME 2919555991fdSmrg# must have a single quote delimited value for this to work. 2920555991fdSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 2921555991fdSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 2922126a8a12Smrg 2923126a8a12Smrg 2924555991fdSmrg# _LT_CONFIG_STATUS_DECLARATIONS 2925555991fdSmrg# ------------------------------ 2926555991fdSmrg# We delimit libtool config variables with single quotes, so when 2927555991fdSmrg# we write them to config.status, we have to be sure to quote all 2928555991fdSmrg# embedded single quotes properly. In configure, this macro expands 2929555991fdSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2930555991fdSmrg# 2931555991fdSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 2932555991fdSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2933555991fdSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2934555991fdSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2935126a8a12Smrg 2936126a8a12Smrg 2937555991fdSmrg# _LT_LIBTOOL_TAGS 2938555991fdSmrg# ---------------- 2939555991fdSmrg# Output comment and list of tags supported by the script 2940555991fdSmrgm4_defun([_LT_LIBTOOL_TAGS], 2941555991fdSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2942555991fdSmrgavailable_tags="_LT_TAGS"dnl 2943555991fdSmrg]) 2944126a8a12Smrg 2945126a8a12Smrg 2946555991fdSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2947555991fdSmrg# ----------------------------------- 2948555991fdSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 2949555991fdSmrg# expand to a commented shell variable setting: 2950555991fdSmrg# 2951555991fdSmrg# # Some comment about what VAR is for. 2952555991fdSmrg# visible_name=$lt_internal_name 2953555991fdSmrgm4_define([_LT_LIBTOOL_DECLARE], 2954555991fdSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2955555991fdSmrg [description])))[]dnl 2956555991fdSmrgm4_pushdef([_libtool_name], 2957555991fdSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2958555991fdSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2959555991fdSmrg [0], [_libtool_name=[$]$1], 2960555991fdSmrg [1], [_libtool_name=$lt_[]$1], 2961555991fdSmrg [2], [_libtool_name=$lt_[]$1], 2962555991fdSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2963555991fdSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2964555991fdSmrg]) 2965126a8a12Smrg 2966126a8a12Smrg 2967555991fdSmrg# _LT_LIBTOOL_CONFIG_VARS 2968555991fdSmrg# ----------------------- 2969555991fdSmrg# Produce commented declarations of non-tagged libtool config variables 2970555991fdSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2971555991fdSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2972555991fdSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 2973555991fdSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 2974555991fdSmrg[m4_foreach([_lt_var], 2975555991fdSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2976555991fdSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2977126a8a12Smrg 2978126a8a12Smrg 2979555991fdSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 2980555991fdSmrg# ------------------------- 2981555991fdSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 2982555991fdSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2983555991fdSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2984126a8a12Smrg 2985126a8a12Smrg 2986555991fdSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 2987555991fdSmrg# ------------------------------ 2988555991fdSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2989126a8a12Smrg 2990126a8a12Smrg 2991555991fdSmrg# _LT_CONFIG_COMMANDS 2992555991fdSmrg# ------------------- 2993555991fdSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 2994555991fdSmrg# variables for single and double quote escaping we saved from calls 2995555991fdSmrg# to _LT_DECL, we can put quote escaped variables declarations 2996555991fdSmrg# into `config.status', and then the shell code to quote escape them in 2997555991fdSmrg# for loops in `config.status'. Finally, any additional code accumulated 2998555991fdSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 2999555991fdSmrgm4_defun([_LT_CONFIG_COMMANDS], 3000555991fdSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3001555991fdSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3002555991fdSmrg dnl instead of duplicating it all over again into config.status, 3003555991fdSmrg dnl then we will have config.status run $CONFIG_LT later, so it 3004555991fdSmrg dnl needs to know what name is stored there: 3005555991fdSmrg [AC_CONFIG_COMMANDS([libtool], 3006555991fdSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3007555991fdSmrg dnl If the libtool generation code is destined for config.status, 3008555991fdSmrg dnl expand the accumulated commands and init code now: 3009555991fdSmrg [AC_CONFIG_COMMANDS([libtool], 3010555991fdSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3011555991fdSmrg])#_LT_CONFIG_COMMANDS 3012126a8a12Smrg 3013126a8a12Smrg 3014555991fdSmrg# Initialize. 3015555991fdSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3016555991fdSmrg[ 3017126a8a12Smrg 3018555991fdSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3019555991fdSmrg# if CDPATH is set. 3020555991fdSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3021555991fdSmrg 3022555991fdSmrgsed_quote_subst='$sed_quote_subst' 3023555991fdSmrgdouble_quote_subst='$double_quote_subst' 3024555991fdSmrgdelay_variable_subst='$delay_variable_subst' 3025555991fdSmrg_LT_CONFIG_STATUS_DECLARATIONS 3026555991fdSmrgLTCC='$LTCC' 3027555991fdSmrgLTCFLAGS='$LTCFLAGS' 3028555991fdSmrgcompiler='$compiler_DEFAULT' 3029555991fdSmrg 3030555991fdSmrg# A function that is used when there is no print builtin or printf. 3031555991fdSmrgfunc_fallback_echo () 3032555991fdSmrg{ 3033555991fdSmrg eval 'cat <<_LTECHO_EOF 3034555991fdSmrg\$[]1 3035555991fdSmrg_LTECHO_EOF' 3036555991fdSmrg} 3037555991fdSmrg 3038555991fdSmrg# Quote evaled strings. 3039555991fdSmrgfor var in lt_decl_all_varnames([[ \ 3040555991fdSmrg]], lt_decl_quote_varnames); do 3041555991fdSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3042555991fdSmrg *[[\\\\\\\`\\"\\\$]]*) 3043555991fdSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 3044555991fdSmrg ;; 3045555991fdSmrg *) 3046555991fdSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3047d656433aSmrg ;; 3048d656433aSmrg esac 3049555991fdSmrgdone 3050126a8a12Smrg 3051555991fdSmrg# Double-quote double-evaled strings. 3052555991fdSmrgfor var in lt_decl_all_varnames([[ \ 3053555991fdSmrg]], lt_decl_dquote_varnames); do 3054555991fdSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3055555991fdSmrg *[[\\\\\\\`\\"\\\$]]*) 3056555991fdSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 3057555991fdSmrg ;; 3058555991fdSmrg *) 3059555991fdSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3060555991fdSmrg ;; 3061555991fdSmrg esac 3062555991fdSmrgdone 3063126a8a12Smrg 3064555991fdSmrg_LT_OUTPUT_LIBTOOL_INIT 3065555991fdSmrg]) 3066126a8a12Smrg 3067555991fdSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3068555991fdSmrg# ------------------------------------ 3069555991fdSmrg# Generate a child script FILE with all initialization necessary to 3070555991fdSmrg# reuse the environment learned by the parent script, and make the 3071555991fdSmrg# file executable. If COMMENT is supplied, it is inserted after the 3072555991fdSmrg# `#!' sequence but before initialization text begins. After this 3073555991fdSmrg# macro, additional text can be appended to FILE to form the body of 3074555991fdSmrg# the child script. The macro ends with non-zero status if the 3075555991fdSmrg# file could not be fully written (such as if the disk is full). 3076555991fdSmrgm4_ifdef([AS_INIT_GENERATED], 3077555991fdSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3078555991fdSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 3079555991fdSmrg[m4_require([AS_PREPARE])]dnl 3080555991fdSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3081555991fdSmrg[lt_write_fail=0 3082555991fdSmrgcat >$1 <<_ASEOF || lt_write_fail=1 3083555991fdSmrg#! $SHELL 3084555991fdSmrg# Generated by $as_me. 3085555991fdSmrg$2 3086555991fdSmrgSHELL=\${CONFIG_SHELL-$SHELL} 3087555991fdSmrgexport SHELL 3088555991fdSmrg_ASEOF 3089555991fdSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3090555991fdSmrgAS_SHELL_SANITIZE 3091555991fdSmrg_AS_PREPARE 3092555991fdSmrgexec AS_MESSAGE_FD>&1 3093555991fdSmrg_ASEOF 3094555991fdSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 3095555991fdSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3096126a8a12Smrg 3097555991fdSmrg# LT_OUTPUT 3098555991fdSmrg# --------- 3099555991fdSmrg# This macro allows early generation of the libtool script (before 3100555991fdSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 3101555991fdSmrg# tests. 3102555991fdSmrgAC_DEFUN([LT_OUTPUT], 3103555991fdSmrg[: ${CONFIG_LT=./config.lt} 3104555991fdSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3105555991fdSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3106555991fdSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 3107126a8a12Smrg 3108555991fdSmrgcat >>"$CONFIG_LT" <<\_LTEOF 3109555991fdSmrglt_cl_silent=false 3110555991fdSmrgexec AS_MESSAGE_LOG_FD>>config.log 3111555991fdSmrg{ 3112555991fdSmrg echo 3113555991fdSmrg AS_BOX([Running $as_me.]) 3114555991fdSmrg} >&AS_MESSAGE_LOG_FD 3115126a8a12Smrg 3116555991fdSmrglt_cl_help="\ 3117555991fdSmrg\`$as_me' creates a local libtool stub from the current configuration, 3118555991fdSmrgfor use in further configure time tests before the real libtool is 3119555991fdSmrggenerated. 3120126a8a12Smrg 3121555991fdSmrgUsage: $[0] [[OPTIONS]] 3122126a8a12Smrg 3123555991fdSmrg -h, --help print this help, then exit 3124555991fdSmrg -V, --version print version number, then exit 3125555991fdSmrg -q, --quiet do not print progress messages 3126555991fdSmrg -d, --debug don't remove temporary files 3127126a8a12Smrg 3128555991fdSmrgReport bugs to <bug-libtool@gnu.org>." 3129126a8a12Smrg 3130555991fdSmrglt_cl_version="\ 3131555991fdSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3132555991fdSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3133555991fdSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3134126a8a12Smrg 3135555991fdSmrgCopyright (C) 2010 Free Software Foundation, Inc. 3136555991fdSmrgThis config.lt script is free software; the Free Software Foundation 3137555991fdSmrggives unlimited permision to copy, distribute and modify it." 3138126a8a12Smrg 3139555991fdSmrgwhile test $[#] != 0 3140555991fdSmrgdo 3141555991fdSmrg case $[1] in 3142555991fdSmrg --version | --v* | -V ) 3143555991fdSmrg echo "$lt_cl_version"; exit 0 ;; 3144555991fdSmrg --help | --h* | -h ) 3145555991fdSmrg echo "$lt_cl_help"; exit 0 ;; 3146555991fdSmrg --debug | --d* | -d ) 3147555991fdSmrg debug=: ;; 3148555991fdSmrg --quiet | --q* | --silent | --s* | -q ) 3149555991fdSmrg lt_cl_silent=: ;; 3150126a8a12Smrg 3151555991fdSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 3152555991fdSmrgTry \`$[0] --help' for more information.]) ;; 3153126a8a12Smrg 3154555991fdSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 3155555991fdSmrgTry \`$[0] --help' for more information.]) ;; 3156d656433aSmrg esac 3157555991fdSmrg shift 3158555991fdSmrgdone 3159126a8a12Smrg 3160555991fdSmrgif $lt_cl_silent; then 3161555991fdSmrg exec AS_MESSAGE_FD>/dev/null 3162555991fdSmrgfi 3163555991fdSmrg_LTEOF 3164126a8a12Smrg 3165555991fdSmrgcat >>"$CONFIG_LT" <<_LTEOF 3166555991fdSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 3167555991fdSmrg_LTEOF 3168126a8a12Smrg 3169555991fdSmrgcat >>"$CONFIG_LT" <<\_LTEOF 3170555991fdSmrgAC_MSG_NOTICE([creating $ofile]) 3171555991fdSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 3172555991fdSmrgAS_EXIT(0) 3173555991fdSmrg_LTEOF 3174555991fdSmrgchmod +x "$CONFIG_LT" 3175126a8a12Smrg 3176555991fdSmrg# configure is writing to config.log, but config.lt does its own redirection, 3177555991fdSmrg# appending to config.log, which fails on DOS, as config.log is still kept 3178555991fdSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 3179555991fdSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 3180555991fdSmrglt_cl_success=: 3181555991fdSmrgtest "$silent" = yes && 3182555991fdSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 3183555991fdSmrgexec AS_MESSAGE_LOG_FD>/dev/null 3184555991fdSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 3185555991fdSmrgexec AS_MESSAGE_LOG_FD>>config.log 3186555991fdSmrg$lt_cl_success || AS_EXIT(1) 3187555991fdSmrg])# LT_OUTPUT 3188d656433aSmrg 3189126a8a12Smrg 3190555991fdSmrg# _LT_CONFIG(TAG) 3191555991fdSmrg# --------------- 3192555991fdSmrg# If TAG is the built-in tag, create an initial libtool script with a 3193555991fdSmrg# default configuration from the untagged config vars. Otherwise add code 3194555991fdSmrg# to config.status for appending the configuration named by TAG from the 3195555991fdSmrg# matching tagged config vars. 3196555991fdSmrgm4_defun([_LT_CONFIG], 3197555991fdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3198555991fdSmrg_LT_CONFIG_SAVE_COMMANDS([ 3199555991fdSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 3200555991fdSmrg m4_if(_LT_TAG, [C], [ 3201555991fdSmrg # See if we are running on zsh, and set the options which allow our 3202555991fdSmrg # commands through without removal of \ escapes. 3203555991fdSmrg if test -n "${ZSH_VERSION+set}" ; then 3204555991fdSmrg setopt NO_GLOB_SUBST 3205555991fdSmrg fi 3206126a8a12Smrg 3207555991fdSmrg cfgfile="${ofile}T" 3208555991fdSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 3209555991fdSmrg $RM "$cfgfile" 3210126a8a12Smrg 3211555991fdSmrg cat <<_LT_EOF >> "$cfgfile" 3212555991fdSmrg#! $SHELL 3213126a8a12Smrg 3214555991fdSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3215555991fdSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3216555991fdSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3217555991fdSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3218555991fdSmrg# 3219555991fdSmrg_LT_COPYING 3220555991fdSmrg_LT_LIBTOOL_TAGS 3221126a8a12Smrg 3222555991fdSmrg# ### BEGIN LIBTOOL CONFIG 3223555991fdSmrg_LT_LIBTOOL_CONFIG_VARS 3224555991fdSmrg_LT_LIBTOOL_TAG_VARS 3225555991fdSmrg# ### END LIBTOOL CONFIG 3226126a8a12Smrg 3227555991fdSmrg_LT_EOF 3228126a8a12Smrg 3229555991fdSmrg case $host_os in 3230555991fdSmrg aix3*) 3231555991fdSmrg cat <<\_LT_EOF >> "$cfgfile" 3232555991fdSmrg# AIX sometimes has problems with the GCC collect2 program. For some 3233555991fdSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 3234555991fdSmrg# vanish in a puff of smoke. 3235555991fdSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 3236555991fdSmrg COLLECT_NAMES= 3237555991fdSmrg export COLLECT_NAMES 3238555991fdSmrgfi 3239555991fdSmrg_LT_EOF 3240555991fdSmrg ;; 3241555991fdSmrg esac 3242126a8a12Smrg 3243555991fdSmrg _LT_PROG_LTMAIN 3244126a8a12Smrg 3245555991fdSmrg # We use sed instead of cat because bash on DJGPP gets confused if 3246555991fdSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3247555991fdSmrg # text mode, it properly converts lines to CR/LF. This bash problem 3248555991fdSmrg # is reportedly fixed, but why not run on old versions too? 3249555991fdSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3250555991fdSmrg || (rm -f "$cfgfile"; exit 1) 3251126a8a12Smrg 3252555991fdSmrg _LT_PROG_XSI_SHELLFNS 3253126a8a12Smrg 3254555991fdSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3255555991fdSmrg || (rm -f "$cfgfile"; exit 1) 3256126a8a12Smrg 3257555991fdSmrg mv -f "$cfgfile" "$ofile" || 3258555991fdSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3259555991fdSmrg chmod +x "$ofile" 3260555991fdSmrg], 3261555991fdSmrg[cat <<_LT_EOF >> "$ofile" 3262126a8a12Smrg 3263555991fdSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3264555991fdSmrgdnl in a comment (ie after a #). 3265555991fdSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3266555991fdSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3267555991fdSmrg# ### END LIBTOOL TAG CONFIG: $1 3268555991fdSmrg_LT_EOF 3269555991fdSmrg])dnl /m4_if 3270555991fdSmrg], 3271555991fdSmrg[m4_if([$1], [], [ 3272555991fdSmrg PACKAGE='$PACKAGE' 3273555991fdSmrg VERSION='$VERSION' 3274555991fdSmrg TIMESTAMP='$TIMESTAMP' 3275555991fdSmrg RM='$RM' 3276555991fdSmrg ofile='$ofile'], []) 3277555991fdSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3278555991fdSmrg])# _LT_CONFIG 3279126a8a12Smrg 3280126a8a12Smrg 3281555991fdSmrg# LT_SUPPORTED_TAG(TAG) 3282555991fdSmrg# --------------------- 3283555991fdSmrg# Trace this macro to discover what tags are supported by the libtool 3284555991fdSmrg# --tag option, using: 3285555991fdSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3286555991fdSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3287126a8a12Smrg 3288126a8a12Smrg 3289555991fdSmrg# C support is built-in for now 3290555991fdSmrgm4_define([_LT_LANG_C_enabled], []) 3291555991fdSmrgm4_define([_LT_TAGS], []) 3292126a8a12Smrg 3293126a8a12Smrg 3294555991fdSmrg# LT_LANG(LANG) 3295555991fdSmrg# ------------- 3296555991fdSmrg# Enable libtool support for the given language if not already enabled. 3297555991fdSmrgAC_DEFUN([LT_LANG], 3298555991fdSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3299555991fdSmrgm4_case([$1], 3300555991fdSmrg [C], [_LT_LANG(C)], 3301555991fdSmrg [C++], [_LT_LANG(CXX)], 3302555991fdSmrg [Java], [_LT_LANG(GCJ)], 3303555991fdSmrg [Fortran 77], [_LT_LANG(F77)], 3304555991fdSmrg [Fortran], [_LT_LANG(FC)], 3305555991fdSmrg [Windows Resource], [_LT_LANG(RC)], 3306555991fdSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3307555991fdSmrg [_LT_LANG($1)], 3308555991fdSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3309555991fdSmrg])# LT_LANG 3310126a8a12Smrg 3311126a8a12Smrg 3312555991fdSmrg# _LT_LANG(LANGNAME) 3313555991fdSmrg# ------------------ 3314555991fdSmrgm4_defun([_LT_LANG], 3315555991fdSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3316555991fdSmrg [LT_SUPPORTED_TAG([$1])dnl 3317555991fdSmrg m4_append([_LT_TAGS], [$1 ])dnl 3318555991fdSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3319555991fdSmrg _LT_LANG_$1_CONFIG($1)])dnl 3320555991fdSmrg])# _LT_LANG 3321126a8a12Smrg 3322126a8a12Smrg 3323555991fdSmrg# _LT_LANG_DEFAULT_CONFIG 3324555991fdSmrg# ----------------------- 3325555991fdSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3326555991fdSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3327555991fdSmrg [LT_LANG(CXX)], 3328555991fdSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3329126a8a12Smrg 3330555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3331555991fdSmrg [LT_LANG(F77)], 3332555991fdSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3333126a8a12Smrg 3334555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3335555991fdSmrg [LT_LANG(FC)], 3336555991fdSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3337126a8a12Smrg 3338555991fdSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3339555991fdSmrgdnl pulling things in needlessly. 3340555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3341555991fdSmrg [LT_LANG(GCJ)], 3342555991fdSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3343555991fdSmrg [LT_LANG(GCJ)], 3344555991fdSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3345555991fdSmrg [LT_LANG(GCJ)], 3346555991fdSmrg [m4_ifdef([AC_PROG_GCJ], 3347555991fdSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3348555991fdSmrg m4_ifdef([A][M_PROG_GCJ], 3349555991fdSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3350555991fdSmrg m4_ifdef([LT_PROG_GCJ], 3351555991fdSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3352126a8a12Smrg 3353555991fdSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3354555991fdSmrg [LT_LANG(RC)], 3355555991fdSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3356555991fdSmrg])# _LT_LANG_DEFAULT_CONFIG 3357126a8a12Smrg 3358555991fdSmrg# Obsolete macros: 3359555991fdSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3360555991fdSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3361555991fdSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3362555991fdSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3363555991fdSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3364555991fdSmrgdnl aclocal-1.4 backwards compatibility: 3365555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3366555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3367555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3368555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3369555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 3370126a8a12Smrg 3371126a8a12Smrg 3372555991fdSmrg# _LT_TAG_COMPILER 3373555991fdSmrg# ---------------- 3374555991fdSmrgm4_defun([_LT_TAG_COMPILER], 3375555991fdSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3376126a8a12Smrg 3377555991fdSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3378555991fdSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3379555991fdSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3380555991fdSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3381555991fdSmrg 3382555991fdSmrg# If no C compiler was specified, use CC. 3383555991fdSmrgLTCC=${LTCC-"$CC"} 3384555991fdSmrg 3385555991fdSmrg# If no C compiler flags were specified, use CFLAGS. 3386555991fdSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3387555991fdSmrg 3388555991fdSmrg# Allow CC to be a program name with arguments. 3389555991fdSmrgcompiler=$CC 3390555991fdSmrg])# _LT_TAG_COMPILER 3391555991fdSmrg 3392555991fdSmrg 3393555991fdSmrg# _LT_COMPILER_BOILERPLATE 3394555991fdSmrg# ------------------------ 3395555991fdSmrg# Check for compiler boilerplate output or warnings with 3396555991fdSmrg# the simple compiler test code. 3397555991fdSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 3398555991fdSmrg[m4_require([_LT_DECL_SED])dnl 3399555991fdSmrgac_outfile=conftest.$ac_objext 3400555991fdSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3401555991fdSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3402555991fdSmrg_lt_compiler_boilerplate=`cat conftest.err` 3403555991fdSmrg$RM conftest* 3404555991fdSmrg])# _LT_COMPILER_BOILERPLATE 3405555991fdSmrg 3406555991fdSmrg 3407555991fdSmrg# _LT_LINKER_BOILERPLATE 3408555991fdSmrg# ---------------------- 3409555991fdSmrg# Check for linker boilerplate output or warnings with 3410555991fdSmrg# the simple link test code. 3411555991fdSmrgm4_defun([_LT_LINKER_BOILERPLATE], 3412555991fdSmrg[m4_require([_LT_DECL_SED])dnl 3413555991fdSmrgac_outfile=conftest.$ac_objext 3414555991fdSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3415555991fdSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3416555991fdSmrg_lt_linker_boilerplate=`cat conftest.err` 3417555991fdSmrg$RM -r conftest* 3418555991fdSmrg])# _LT_LINKER_BOILERPLATE 3419555991fdSmrg 3420555991fdSmrg# _LT_REQUIRED_DARWIN_CHECKS 3421555991fdSmrg# ------------------------- 3422555991fdSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3423555991fdSmrg case $host_os in 3424555991fdSmrg rhapsody* | darwin*) 3425555991fdSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3426555991fdSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3427555991fdSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3428555991fdSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3429555991fdSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3430555991fdSmrg _LT_DECL([], [DSYMUTIL], [1], 3431555991fdSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3432555991fdSmrg _LT_DECL([], [NMEDIT], [1], 3433555991fdSmrg [Tool to change global to local symbols on Mac OS X]) 3434555991fdSmrg _LT_DECL([], [LIPO], [1], 3435555991fdSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 3436555991fdSmrg _LT_DECL([], [OTOOL], [1], 3437555991fdSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3438555991fdSmrg _LT_DECL([], [OTOOL64], [1], 3439555991fdSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3440555991fdSmrg 3441555991fdSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3442555991fdSmrg [lt_cv_apple_cc_single_mod=no 3443555991fdSmrg if test -z "${LT_MULTI_MODULE}"; then 3444555991fdSmrg # By default we will add the -single_module flag. You can override 3445555991fdSmrg # by either setting the environment variable LT_MULTI_MODULE 3446555991fdSmrg # non-empty at configure time, or by adding -multi_module to the 3447555991fdSmrg # link flags. 3448555991fdSmrg rm -rf libconftest.dylib* 3449555991fdSmrg echo "int foo(void){return 1;}" > conftest.c 3450555991fdSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3451555991fdSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3452555991fdSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3453555991fdSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3454555991fdSmrg _lt_result=$? 3455555991fdSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3456555991fdSmrg lt_cv_apple_cc_single_mod=yes 3457d656433aSmrg else 3458555991fdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3459d656433aSmrg fi 3460555991fdSmrg rm -rf libconftest.dylib* 3461555991fdSmrg rm -f conftest.* 3462555991fdSmrg fi]) 3463555991fdSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3464555991fdSmrg [lt_cv_ld_exported_symbols_list], 3465555991fdSmrg [lt_cv_ld_exported_symbols_list=no 3466555991fdSmrg save_LDFLAGS=$LDFLAGS 3467555991fdSmrg echo "_main" > conftest.sym 3468555991fdSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3469555991fdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3470555991fdSmrg [lt_cv_ld_exported_symbols_list=yes], 3471555991fdSmrg [lt_cv_ld_exported_symbols_list=no]) 3472555991fdSmrg LDFLAGS="$save_LDFLAGS" 3473555991fdSmrg ]) 3474555991fdSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3475555991fdSmrg [lt_cv_ld_force_load=no 3476555991fdSmrg cat > conftest.c << _LT_EOF 3477555991fdSmrgint forced_loaded() { return 2;} 3478555991fdSmrg_LT_EOF 3479555991fdSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3480555991fdSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3481555991fdSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3482555991fdSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3483555991fdSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3484555991fdSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3485555991fdSmrg cat > conftest.c << _LT_EOF 3486555991fdSmrgint main() { return 0;} 3487555991fdSmrg_LT_EOF 3488555991fdSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3489555991fdSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3490555991fdSmrg _lt_result=$? 3491555991fdSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 3492555991fdSmrg lt_cv_ld_force_load=yes 3493d656433aSmrg else 3494555991fdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3495d656433aSmrg fi 3496555991fdSmrg rm -f conftest.err libconftest.a conftest conftest.c 3497555991fdSmrg rm -rf conftest.dSYM 3498555991fdSmrg ]) 3499555991fdSmrg case $host_os in 3500555991fdSmrg rhapsody* | darwin1.[[012]]) 3501555991fdSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3502555991fdSmrg darwin1.*) 3503555991fdSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3504555991fdSmrg darwin*) # darwin 5.x on 3505555991fdSmrg # if running on 10.5 or later, the deployment target defaults 3506555991fdSmrg # to the OS version, if on x86, and 10.4, the deployment 3507555991fdSmrg # target defaults to 10.4. Don't you love it? 3508555991fdSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3509555991fdSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3510555991fdSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3511555991fdSmrg 10.[[012]]*) 3512555991fdSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3513555991fdSmrg 10.*) 3514555991fdSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3515555991fdSmrg esac 3516555991fdSmrg ;; 3517555991fdSmrg esac 3518555991fdSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3519555991fdSmrg _lt_dar_single_mod='$single_module' 3520555991fdSmrg fi 3521555991fdSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3522555991fdSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3523d656433aSmrg else 3524555991fdSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3525d656433aSmrg fi 3526555991fdSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 3527555991fdSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 3528555991fdSmrg else 3529555991fdSmrg _lt_dsymutil= 3530555991fdSmrg fi 3531555991fdSmrg ;; 3532555991fdSmrg esac 3533d656433aSmrg]) 3534126a8a12Smrg 3535126a8a12Smrg 3536555991fdSmrg# _LT_DARWIN_LINKER_FEATURES 3537555991fdSmrg# -------------------------- 3538555991fdSmrg# Checks for linker and compiler features on darwin 3539555991fdSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3540555991fdSmrg[ 3541555991fdSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3542555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3543555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 3544555991fdSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3545555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3546555991fdSmrg if test "$lt_cv_ld_force_load" = "yes"; then 3547555991fdSmrg _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\"`' 3548555991fdSmrg else 3549555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3550555991fdSmrg fi 3551555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3552555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3553555991fdSmrg case $cc_basename in 3554555991fdSmrg ifort*) _lt_dar_can_shared=yes ;; 3555555991fdSmrg *) _lt_dar_can_shared=$GCC ;; 3556555991fdSmrg esac 3557555991fdSmrg if test "$_lt_dar_can_shared" = "yes"; then 3558555991fdSmrg output_verbose_link_cmd=func_echo_all 3559555991fdSmrg _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}" 3560555991fdSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3561555991fdSmrg _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}" 3562555991fdSmrg _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}" 3563555991fdSmrg m4_if([$1], [CXX], 3564555991fdSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3565555991fdSmrg _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}" 3566555991fdSmrg _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}" 3567555991fdSmrg fi 3568555991fdSmrg],[]) 3569555991fdSmrg else 3570555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 3571555991fdSmrg fi 3572555991fdSmrg]) 3573126a8a12Smrg 3574555991fdSmrg# _LT_SYS_MODULE_PATH_AIX 3575555991fdSmrg# ----------------------- 3576555991fdSmrg# Links a minimal program and checks the executable 3577555991fdSmrg# for the system default hardcoded library path. In most cases, 3578555991fdSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 3579555991fdSmrg# the location of the communication and MPI libs are included too. 3580555991fdSmrg# If we don't find anything, use the default library path according 3581555991fdSmrg# to the aix ld manual. 3582555991fdSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3583555991fdSmrg[m4_require([_LT_DECL_SED])dnl 3584555991fdSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3585555991fdSmrglt_aix_libpath_sed=' 3586555991fdSmrg /Import File Strings/,/^$/ { 3587555991fdSmrg /^0/ { 3588555991fdSmrg s/^0 *\(.*\)$/\1/ 3589555991fdSmrg p 3590555991fdSmrg } 3591555991fdSmrg }' 3592555991fdSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3593555991fdSmrg# Check for a 64-bit object if we didn't find anything. 3594555991fdSmrgif test -z "$aix_libpath"; then 3595555991fdSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3596555991fdSmrgfi],[]) 3597555991fdSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3598555991fdSmrg])# _LT_SYS_MODULE_PATH_AIX 3599126a8a12Smrg 3600126a8a12Smrg 3601555991fdSmrg# _LT_SHELL_INIT(ARG) 3602555991fdSmrg# ------------------- 3603555991fdSmrgm4_define([_LT_SHELL_INIT], 3604555991fdSmrg[m4_divert_text([M4SH-INIT], [$1 3605555991fdSmrg])])# _LT_SHELL_INIT 3606126a8a12Smrg 3607555991fdSmrg 3608555991fdSmrg 3609555991fdSmrg# _LT_PROG_ECHO_BACKSLASH 3610555991fdSmrg# ----------------------- 3611555991fdSmrg# Find how we can fake an echo command that does not interpret backslash. 3612555991fdSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 3613555991fdSmrg# of the generated configure script which will find a shell with a builtin 3614555991fdSmrg# printf (which we can use as an echo command). 3615555991fdSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3616555991fdSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3617555991fdSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3618555991fdSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3619555991fdSmrg 3620555991fdSmrgAC_MSG_CHECKING([how to print strings]) 3621555991fdSmrg# Test print first, because it will be a builtin if present. 3622555991fdSmrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 3623555991fdSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 3624555991fdSmrg ECHO='print -r --' 3625555991fdSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 3626555991fdSmrg ECHO='printf %s\n' 3627555991fdSmrgelse 3628555991fdSmrg # Use this function as a fallback that always works. 3629555991fdSmrg func_fallback_echo () 3630555991fdSmrg { 3631555991fdSmrg eval 'cat <<_LTECHO_EOF 3632555991fdSmrg$[]1 3633555991fdSmrg_LTECHO_EOF' 3634555991fdSmrg } 3635555991fdSmrg ECHO='func_fallback_echo' 3636555991fdSmrgfi 3637555991fdSmrg 3638555991fdSmrg# func_echo_all arg... 3639555991fdSmrg# Invoke $ECHO with all args, space-separated. 3640555991fdSmrgfunc_echo_all () 3641555991fdSmrg{ 3642555991fdSmrg $ECHO "$*" 3643555991fdSmrg} 3644555991fdSmrg 3645555991fdSmrgcase "$ECHO" in 3646555991fdSmrg printf*) AC_MSG_RESULT([printf]) ;; 3647555991fdSmrg print*) AC_MSG_RESULT([print -r]) ;; 3648555991fdSmrg *) AC_MSG_RESULT([cat]) ;; 3649555991fdSmrgesac 3650555991fdSmrg 3651555991fdSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 3652555991fdSmrg[_AS_DETECT_SUGGESTED([ 3653555991fdSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 3654555991fdSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3655555991fdSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3656555991fdSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3657555991fdSmrg PATH=/empty FPATH=/empty; export PATH FPATH 3658555991fdSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 3659555991fdSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 3660555991fdSmrg 3661555991fdSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3662555991fdSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 3663555991fdSmrg])# _LT_PROG_ECHO_BACKSLASH 3664555991fdSmrg 3665555991fdSmrg 3666555991fdSmrg# _LT_ENABLE_LOCK 3667555991fdSmrg# --------------- 3668555991fdSmrgm4_defun([_LT_ENABLE_LOCK], 3669555991fdSmrg[AC_ARG_ENABLE([libtool-lock], 3670555991fdSmrg [AS_HELP_STRING([--disable-libtool-lock], 3671555991fdSmrg [avoid locking (might break parallel builds)])]) 3672555991fdSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 3673555991fdSmrg 3674555991fdSmrg# Some flags need to be propagated to the compiler or linker for good 3675555991fdSmrg# libtool support. 3676555991fdSmrgcase $host in 3677555991fdSmrgia64-*-hpux*) 3678555991fdSmrg # Find out which ABI we are using. 3679555991fdSmrg echo 'int i;' > conftest.$ac_ext 3680555991fdSmrg if AC_TRY_EVAL(ac_compile); then 3681555991fdSmrg case `/usr/bin/file conftest.$ac_objext` in 3682555991fdSmrg *ELF-32*) 3683555991fdSmrg HPUX_IA64_MODE="32" 3684d656433aSmrg ;; 3685555991fdSmrg *ELF-64*) 3686555991fdSmrg HPUX_IA64_MODE="64" 3687d656433aSmrg ;; 3688d656433aSmrg esac 3689555991fdSmrg fi 3690555991fdSmrg rm -rf conftest* 3691555991fdSmrg ;; 3692555991fdSmrg*-*-irix6*) 3693555991fdSmrg # Find out which ABI we are using. 3694555991fdSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 3695555991fdSmrg if AC_TRY_EVAL(ac_compile); then 3696555991fdSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 3697555991fdSmrg case `/usr/bin/file conftest.$ac_objext` in 3698555991fdSmrg *32-bit*) 3699555991fdSmrg LD="${LD-ld} -melf32bsmip" 3700d656433aSmrg ;; 3701555991fdSmrg *N32*) 3702555991fdSmrg LD="${LD-ld} -melf32bmipn32" 3703555991fdSmrg ;; 3704555991fdSmrg *64-bit*) 3705555991fdSmrg LD="${LD-ld} -melf64bmip" 3706d656433aSmrg ;; 3707555991fdSmrg esac 3708555991fdSmrg else 3709555991fdSmrg case `/usr/bin/file conftest.$ac_objext` in 3710555991fdSmrg *32-bit*) 3711555991fdSmrg LD="${LD-ld} -32" 3712555991fdSmrg ;; 3713555991fdSmrg *N32*) 3714555991fdSmrg LD="${LD-ld} -n32" 3715555991fdSmrg ;; 3716555991fdSmrg *64-bit*) 3717555991fdSmrg LD="${LD-ld} -64" 3718555991fdSmrg ;; 3719555991fdSmrg esac 3720555991fdSmrg fi 3721555991fdSmrg fi 3722555991fdSmrg rm -rf conftest* 3723555991fdSmrg ;; 3724555991fdSmrg 3725555991fdSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3726555991fdSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3727555991fdSmrg # Find out which ABI we are using. 3728555991fdSmrg echo 'int i;' > conftest.$ac_ext 3729555991fdSmrg if AC_TRY_EVAL(ac_compile); then 3730555991fdSmrg case `/usr/bin/file conftest.o` in 3731555991fdSmrg *32-bit*) 3732555991fdSmrg case $host in 3733555991fdSmrg x86_64-*kfreebsd*-gnu) 3734555991fdSmrg LD="${LD-ld} -m elf_i386_fbsd" 3735d656433aSmrg ;; 3736555991fdSmrg x86_64-*linux*) 3737555991fdSmrg LD="${LD-ld} -m elf_i386" 3738d656433aSmrg ;; 3739555991fdSmrg ppc64-*linux*|powerpc64-*linux*) 3740555991fdSmrg LD="${LD-ld} -m elf32ppclinux" 3741555991fdSmrg ;; 3742555991fdSmrg s390x-*linux*) 3743555991fdSmrg LD="${LD-ld} -m elf_s390" 3744555991fdSmrg ;; 3745555991fdSmrg sparc64-*linux*) 3746555991fdSmrg LD="${LD-ld} -m elf32_sparc" 3747d656433aSmrg ;; 3748d656433aSmrg esac 3749d656433aSmrg ;; 3750555991fdSmrg *64-bit*) 3751555991fdSmrg case $host in 3752555991fdSmrg x86_64-*kfreebsd*-gnu) 3753555991fdSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 3754d656433aSmrg ;; 3755555991fdSmrg x86_64-*linux*) 3756555991fdSmrg LD="${LD-ld} -m elf_x86_64" 3757d656433aSmrg ;; 3758555991fdSmrg ppc*-*linux*|powerpc*-*linux*) 3759555991fdSmrg LD="${LD-ld} -m elf64ppc" 3760d656433aSmrg ;; 3761555991fdSmrg s390*-*linux*|s390*-*tpf*) 3762555991fdSmrg LD="${LD-ld} -m elf64_s390" 3763d656433aSmrg ;; 3764555991fdSmrg sparc*-*linux*) 3765555991fdSmrg LD="${LD-ld} -m elf64_sparc" 3766d656433aSmrg ;; 3767d656433aSmrg esac 3768d656433aSmrg ;; 3769555991fdSmrg esac 3770555991fdSmrg fi 3771555991fdSmrg rm -rf conftest* 3772555991fdSmrg ;; 3773555991fdSmrg 3774555991fdSmrg*-*-sco3.2v5*) 3775555991fdSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3776555991fdSmrg SAVE_CFLAGS="$CFLAGS" 3777555991fdSmrg CFLAGS="$CFLAGS -belf" 3778555991fdSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3779555991fdSmrg [AC_LANG_PUSH(C) 3780555991fdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3781555991fdSmrg AC_LANG_POP]) 3782555991fdSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 3783555991fdSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3784555991fdSmrg CFLAGS="$SAVE_CFLAGS" 3785555991fdSmrg fi 3786555991fdSmrg ;; 3787555991fdSmrgsparc*-*solaris*) 3788555991fdSmrg # Find out which ABI we are using. 3789555991fdSmrg echo 'int i;' > conftest.$ac_ext 3790555991fdSmrg if AC_TRY_EVAL(ac_compile); then 3791555991fdSmrg case `/usr/bin/file conftest.o` in 3792555991fdSmrg *64-bit*) 3793555991fdSmrg case $lt_cv_prog_gnu_ld in 3794555991fdSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 3795d656433aSmrg *) 3796555991fdSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3797555991fdSmrg LD="${LD-ld} -64" 3798555991fdSmrg fi 3799d656433aSmrg ;; 3800555991fdSmrg esac 3801555991fdSmrg ;; 3802d656433aSmrg esac 3803126a8a12Smrg fi 3804555991fdSmrg rm -rf conftest* 3805555991fdSmrg ;; 3806555991fdSmrgesac 3807126a8a12Smrg 3808555991fdSmrgneed_locks="$enable_libtool_lock" 3809555991fdSmrg])# _LT_ENABLE_LOCK 3810126a8a12Smrg 3811126a8a12Smrg 3812555991fdSmrg# _LT_CMD_OLD_ARCHIVE 3813555991fdSmrg# ------------------- 3814555991fdSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 3815555991fdSmrg[AC_CHECK_TOOL(AR, ar, false) 3816555991fdSmrgtest -z "$AR" && AR=ar 3817555991fdSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 3818555991fdSmrg_LT_DECL([], [AR], [1], [The archiver]) 3819555991fdSmrg_LT_DECL([], [AR_FLAGS], [1]) 3820126a8a12Smrg 3821555991fdSmrgAC_CHECK_TOOL(STRIP, strip, :) 3822555991fdSmrgtest -z "$STRIP" && STRIP=: 3823555991fdSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3824126a8a12Smrg 3825555991fdSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 3826555991fdSmrgtest -z "$RANLIB" && RANLIB=: 3827555991fdSmrg_LT_DECL([], [RANLIB], [1], 3828555991fdSmrg [Commands used to install an old-style archive]) 3829126a8a12Smrg 3830555991fdSmrg# Determine commands to create old-style static archives. 3831555991fdSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3832555991fdSmrgold_postinstall_cmds='chmod 644 $oldlib' 3833555991fdSmrgold_postuninstall_cmds= 3834126a8a12Smrg 3835555991fdSmrgif test -n "$RANLIB"; then 3836555991fdSmrg case $host_os in 3837555991fdSmrg openbsd*) 3838555991fdSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3839555991fdSmrg ;; 3840555991fdSmrg *) 3841555991fdSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3842555991fdSmrg ;; 3843555991fdSmrg esac 3844555991fdSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3845555991fdSmrgfi 3846126a8a12Smrg 3847555991fdSmrgcase $host_os in 3848555991fdSmrg darwin*) 3849555991fdSmrg lock_old_archive_extraction=yes ;; 3850555991fdSmrg *) 3851555991fdSmrg lock_old_archive_extraction=no ;; 3852555991fdSmrgesac 3853555991fdSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 3854555991fdSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 3855555991fdSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 3856555991fdSmrg [Commands used to build an old-style archive]) 3857555991fdSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 3858555991fdSmrg [Whether to use a lock for old archive extraction]) 3859555991fdSmrg])# _LT_CMD_OLD_ARCHIVE 3860126a8a12Smrg 3861126a8a12Smrg 3862555991fdSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3863555991fdSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 3864555991fdSmrg# ---------------------------------------------------------------- 3865555991fdSmrg# Check whether the given compiler option works 3866555991fdSmrgAC_DEFUN([_LT_COMPILER_OPTION], 3867555991fdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3868555991fdSmrgm4_require([_LT_DECL_SED])dnl 3869555991fdSmrgAC_CACHE_CHECK([$1], [$2], 3870555991fdSmrg [$2=no 3871555991fdSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 3872555991fdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3873555991fdSmrg lt_compiler_flag="$3" 3874555991fdSmrg # Insert the option either (1) after the last *FLAGS variable, or 3875555991fdSmrg # (2) before a word containing "conftest.", or (3) at the end. 3876555991fdSmrg # Note that $ac_compile itself does not contain backslashes and begins 3877555991fdSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3878555991fdSmrg # The option is referenced via a variable to avoid confusing sed. 3879555991fdSmrg lt_compile=`echo "$ac_compile" | $SED \ 3880555991fdSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3881555991fdSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3882555991fdSmrg -e 's:$: $lt_compiler_flag:'` 3883555991fdSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3884555991fdSmrg (eval "$lt_compile" 2>conftest.err) 3885555991fdSmrg ac_status=$? 3886555991fdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3887555991fdSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3888555991fdSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 3889555991fdSmrg # The compiler can only warn and ignore the option if not recognized 3890555991fdSmrg # So say no if there are warnings other than the usual output. 3891555991fdSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 3892555991fdSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3893555991fdSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 3894555991fdSmrg $2=yes 3895555991fdSmrg fi 3896555991fdSmrg fi 3897555991fdSmrg $RM conftest* 3898555991fdSmrg]) 3899126a8a12Smrg 3900555991fdSmrgif test x"[$]$2" = xyes; then 3901555991fdSmrg m4_if([$5], , :, [$5]) 3902555991fdSmrgelse 3903555991fdSmrg m4_if([$6], , :, [$6]) 3904555991fdSmrgfi 3905555991fdSmrg])# _LT_COMPILER_OPTION 3906126a8a12Smrg 3907555991fdSmrg# Old name: 3908555991fdSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3909555991fdSmrgdnl aclocal-1.4 backwards compatibility: 3910555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 3911126a8a12Smrg 3912126a8a12Smrg 3913555991fdSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3914555991fdSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 3915555991fdSmrg# ---------------------------------------------------- 3916555991fdSmrg# Check whether the given linker option works 3917555991fdSmrgAC_DEFUN([_LT_LINKER_OPTION], 3918555991fdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3919555991fdSmrgm4_require([_LT_DECL_SED])dnl 3920555991fdSmrgAC_CACHE_CHECK([$1], [$2], 3921555991fdSmrg [$2=no 3922555991fdSmrg save_LDFLAGS="$LDFLAGS" 3923555991fdSmrg LDFLAGS="$LDFLAGS $3" 3924555991fdSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 3925555991fdSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 3926555991fdSmrg # The linker can only warn and ignore the option if not recognized 3927555991fdSmrg # So say no if there are warnings 3928555991fdSmrg if test -s conftest.err; then 3929555991fdSmrg # Append any errors to the config.log. 3930555991fdSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 3931555991fdSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 3932555991fdSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3933555991fdSmrg if diff conftest.exp conftest.er2 >/dev/null; then 3934555991fdSmrg $2=yes 3935555991fdSmrg fi 3936555991fdSmrg else 3937555991fdSmrg $2=yes 3938555991fdSmrg fi 3939555991fdSmrg fi 3940555991fdSmrg $RM -r conftest* 3941555991fdSmrg LDFLAGS="$save_LDFLAGS" 3942555991fdSmrg]) 3943126a8a12Smrg 3944555991fdSmrgif test x"[$]$2" = xyes; then 3945555991fdSmrg m4_if([$4], , :, [$4]) 3946555991fdSmrgelse 3947555991fdSmrg m4_if([$5], , :, [$5]) 3948555991fdSmrgfi 3949555991fdSmrg])# _LT_LINKER_OPTION 3950126a8a12Smrg 3951555991fdSmrg# Old name: 3952555991fdSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3953555991fdSmrgdnl aclocal-1.4 backwards compatibility: 3954555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 3955126a8a12Smrg 3956126a8a12Smrg 3957555991fdSmrg# LT_CMD_MAX_LEN 3958555991fdSmrg#--------------- 3959555991fdSmrgAC_DEFUN([LT_CMD_MAX_LEN], 3960555991fdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3961555991fdSmrg# find the maximum length of command line arguments 3962555991fdSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 3963555991fdSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 3964555991fdSmrg i=0 3965555991fdSmrg teststring="ABCD" 3966126a8a12Smrg 3967555991fdSmrg case $build_os in 3968555991fdSmrg msdosdjgpp*) 3969555991fdSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 3970555991fdSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 3971555991fdSmrg # during glob expansion). Even if it were fixed, the result of this 3972555991fdSmrg # check would be larger than it should be. 3973555991fdSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 3974555991fdSmrg ;; 3975126a8a12Smrg 3976555991fdSmrg gnu*) 3977555991fdSmrg # Under GNU Hurd, this test is not required because there is 3978555991fdSmrg # no limit to the length of command line arguments. 3979555991fdSmrg # Libtool will interpret -1 as no limit whatsoever 3980555991fdSmrg lt_cv_sys_max_cmd_len=-1; 3981555991fdSmrg ;; 3982126a8a12Smrg 3983555991fdSmrg cygwin* | mingw* | cegcc*) 3984555991fdSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 3985555991fdSmrg # about 5 minutes as the teststring grows exponentially. 3986555991fdSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 3987555991fdSmrg # you end up with a "frozen" computer, even though with patience 3988555991fdSmrg # the test eventually succeeds (with a max line length of 256k). 3989555991fdSmrg # Instead, let's just punt: use the minimum linelength reported by 3990555991fdSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 3991555991fdSmrg lt_cv_sys_max_cmd_len=8192; 3992555991fdSmrg ;; 3993126a8a12Smrg 3994555991fdSmrg mint*) 3995555991fdSmrg # On MiNT this can take a long time and run out of memory. 3996555991fdSmrg lt_cv_sys_max_cmd_len=8192; 3997555991fdSmrg ;; 3998126a8a12Smrg 3999555991fdSmrg amigaos*) 4000555991fdSmrg # On AmigaOS with pdksh, this test takes hours, literally. 4001555991fdSmrg # So we just punt and use a minimum line length of 8192. 4002555991fdSmrg lt_cv_sys_max_cmd_len=8192; 4003555991fdSmrg ;; 4004126a8a12Smrg 4005555991fdSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 4006555991fdSmrg # This has been around since 386BSD, at least. Likely further. 4007555991fdSmrg if test -x /sbin/sysctl; then 4008555991fdSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 4009555991fdSmrg elif test -x /usr/sbin/sysctl; then 4010555991fdSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 4011555991fdSmrg else 4012555991fdSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 4013555991fdSmrg fi 4014555991fdSmrg # And add a safety zone 4015555991fdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4016555991fdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4017555991fdSmrg ;; 4018126a8a12Smrg 4019555991fdSmrg interix*) 4020555991fdSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 4021555991fdSmrg lt_cv_sys_max_cmd_len=196608 4022555991fdSmrg ;; 4023d656433aSmrg 4024555991fdSmrg osf*) 4025555991fdSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 4026555991fdSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 4027555991fdSmrg # nice to cause kernel panics so lets avoid the loop below. 4028555991fdSmrg # First set a reasonable default. 4029555991fdSmrg lt_cv_sys_max_cmd_len=16384 4030555991fdSmrg # 4031555991fdSmrg if test -x /sbin/sysconfig; then 4032555991fdSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 4033555991fdSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 4034555991fdSmrg esac 4035555991fdSmrg fi 4036126a8a12Smrg ;; 4037555991fdSmrg sco3.2v5*) 4038555991fdSmrg lt_cv_sys_max_cmd_len=102400 4039d656433aSmrg ;; 4040555991fdSmrg sysv5* | sco5v6* | sysv4.2uw2*) 4041555991fdSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 4042555991fdSmrg if test -n "$kargmax"; then 4043555991fdSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 4044d656433aSmrg else 4045555991fdSmrg lt_cv_sys_max_cmd_len=32768 4046d656433aSmrg fi 4047d656433aSmrg ;; 4048d656433aSmrg *) 4049555991fdSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 4050555991fdSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 4051555991fdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4052555991fdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4053555991fdSmrg else 4054555991fdSmrg # Make teststring a little bigger before we do anything with it. 4055555991fdSmrg # a 1K string should be a reasonable start. 4056555991fdSmrg for i in 1 2 3 4 5 6 7 8 ; do 4057555991fdSmrg teststring=$teststring$teststring 4058555991fdSmrg done 4059555991fdSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 4060555991fdSmrg # If test is not a shell built-in, we'll probably end up computing a 4061555991fdSmrg # maximum length that is only half of the actual maximum length, but 4062555991fdSmrg # we can't tell. 4063555991fdSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 4064555991fdSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 4065555991fdSmrg test $i != 17 # 1/2 MB should be enough 4066555991fdSmrg do 4067555991fdSmrg i=`expr $i + 1` 4068555991fdSmrg teststring=$teststring$teststring 4069555991fdSmrg done 4070555991fdSmrg # Only check the string length outside the loop. 4071555991fdSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 4072555991fdSmrg teststring= 4073555991fdSmrg # Add a significant safety factor because C++ compilers can tack on 4074555991fdSmrg # massive amounts of additional arguments before passing them to the 4075555991fdSmrg # linker. It appears as though 1/2 is a usable value. 4076555991fdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 4077555991fdSmrg fi 4078555991fdSmrg ;; 4079d656433aSmrg esac 4080555991fdSmrg]) 4081555991fdSmrgif test -n $lt_cv_sys_max_cmd_len ; then 4082555991fdSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 4083555991fdSmrgelse 4084555991fdSmrg AC_MSG_RESULT(none) 4085555991fdSmrgfi 4086555991fdSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4087555991fdSmrg_LT_DECL([], [max_cmd_len], [0], 4088555991fdSmrg [What is the maximum length of a command?]) 4089555991fdSmrg])# LT_CMD_MAX_LEN 4090126a8a12Smrg 4091555991fdSmrg# Old name: 4092555991fdSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 4093555991fdSmrgdnl aclocal-1.4 backwards compatibility: 4094555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 4095126a8a12Smrg 4096126a8a12Smrg 4097555991fdSmrg# _LT_HEADER_DLFCN 4098555991fdSmrg# ---------------- 4099555991fdSmrgm4_defun([_LT_HEADER_DLFCN], 4100555991fdSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 4101555991fdSmrg])# _LT_HEADER_DLFCN 4102126a8a12Smrg 4103126a8a12Smrg 4104555991fdSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4105555991fdSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4106555991fdSmrg# ---------------------------------------------------------------- 4107555991fdSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 4108555991fdSmrg[m4_require([_LT_HEADER_DLFCN])dnl 4109555991fdSmrgif test "$cross_compiling" = yes; then : 4110555991fdSmrg [$4] 4111555991fdSmrgelse 4112555991fdSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 4113555991fdSmrg lt_status=$lt_dlunknown 4114555991fdSmrg cat > conftest.$ac_ext <<_LT_EOF 4115555991fdSmrg[#line $LINENO "configure" 4116555991fdSmrg#include "confdefs.h" 4117126a8a12Smrg 4118555991fdSmrg#if HAVE_DLFCN_H 4119555991fdSmrg#include <dlfcn.h> 4120555991fdSmrg#endif 4121126a8a12Smrg 4122555991fdSmrg#include <stdio.h> 4123126a8a12Smrg 4124555991fdSmrg#ifdef RTLD_GLOBAL 4125555991fdSmrg# define LT_DLGLOBAL RTLD_GLOBAL 4126555991fdSmrg#else 4127555991fdSmrg# ifdef DL_GLOBAL 4128555991fdSmrg# define LT_DLGLOBAL DL_GLOBAL 4129555991fdSmrg# else 4130555991fdSmrg# define LT_DLGLOBAL 0 4131555991fdSmrg# endif 4132555991fdSmrg#endif 4133126a8a12Smrg 4134555991fdSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 4135555991fdSmrg find out it does not work in some platform. */ 4136555991fdSmrg#ifndef LT_DLLAZY_OR_NOW 4137555991fdSmrg# ifdef RTLD_LAZY 4138555991fdSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 4139555991fdSmrg# else 4140555991fdSmrg# ifdef DL_LAZY 4141555991fdSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 4142555991fdSmrg# else 4143555991fdSmrg# ifdef RTLD_NOW 4144555991fdSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 4145555991fdSmrg# else 4146555991fdSmrg# ifdef DL_NOW 4147555991fdSmrg# define LT_DLLAZY_OR_NOW DL_NOW 4148555991fdSmrg# else 4149555991fdSmrg# define LT_DLLAZY_OR_NOW 0 4150555991fdSmrg# endif 4151555991fdSmrg# endif 4152555991fdSmrg# endif 4153555991fdSmrg# endif 4154555991fdSmrg#endif 4155d656433aSmrg 4156555991fdSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 4157555991fdSmrg correspondingly for the symbols needed. */ 4158555991fdSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4159555991fdSmrgvoid fnord () __attribute__((visibility("default"))); 4160555991fdSmrg#endif 4161555991fdSmrg 4162555991fdSmrgvoid fnord () { int i=42; } 4163555991fdSmrgint main () 4164555991fdSmrg{ 4165555991fdSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4166555991fdSmrg int status = $lt_dlunknown; 4167555991fdSmrg 4168555991fdSmrg if (self) 4169555991fdSmrg { 4170555991fdSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4171d656433aSmrg else 4172555991fdSmrg { 4173555991fdSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4174555991fdSmrg else puts (dlerror ()); 4175555991fdSmrg } 4176555991fdSmrg /* dlclose (self); */ 4177555991fdSmrg } 4178555991fdSmrg else 4179555991fdSmrg puts (dlerror ()); 4180126a8a12Smrg 4181555991fdSmrg return status; 4182555991fdSmrg}] 4183555991fdSmrg_LT_EOF 4184555991fdSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 4185555991fdSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4186555991fdSmrg lt_status=$? 4187555991fdSmrg case x$lt_status in 4188555991fdSmrg x$lt_dlno_uscore) $1 ;; 4189555991fdSmrg x$lt_dlneed_uscore) $2 ;; 4190555991fdSmrg x$lt_dlunknown|x*) $3 ;; 4191555991fdSmrg esac 4192555991fdSmrg else : 4193555991fdSmrg # compilation failed 4194555991fdSmrg $3 4195555991fdSmrg fi 4196555991fdSmrgfi 4197555991fdSmrgrm -fr conftest* 4198555991fdSmrg])# _LT_TRY_DLOPEN_SELF 4199126a8a12Smrg 4200126a8a12Smrg 4201555991fdSmrg# LT_SYS_DLOPEN_SELF 4202555991fdSmrg# ------------------ 4203555991fdSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4204555991fdSmrg[m4_require([_LT_HEADER_DLFCN])dnl 4205555991fdSmrgif test "x$enable_dlopen" != xyes; then 4206555991fdSmrg enable_dlopen=unknown 4207555991fdSmrg enable_dlopen_self=unknown 4208555991fdSmrg enable_dlopen_self_static=unknown 4209555991fdSmrgelse 4210555991fdSmrg lt_cv_dlopen=no 4211555991fdSmrg lt_cv_dlopen_libs= 4212126a8a12Smrg 4213555991fdSmrg case $host_os in 4214555991fdSmrg beos*) 4215555991fdSmrg lt_cv_dlopen="load_add_on" 4216555991fdSmrg lt_cv_dlopen_libs= 4217555991fdSmrg lt_cv_dlopen_self=yes 4218555991fdSmrg ;; 4219126a8a12Smrg 4220555991fdSmrg mingw* | pw32* | cegcc*) 4221555991fdSmrg lt_cv_dlopen="LoadLibrary" 4222555991fdSmrg lt_cv_dlopen_libs= 4223555991fdSmrg ;; 4224126a8a12Smrg 4225555991fdSmrg cygwin*) 4226555991fdSmrg lt_cv_dlopen="dlopen" 4227555991fdSmrg lt_cv_dlopen_libs= 4228555991fdSmrg ;; 4229126a8a12Smrg 4230555991fdSmrg darwin*) 4231555991fdSmrg # if libdl is installed we need to link against it 4232555991fdSmrg AC_CHECK_LIB([dl], [dlopen], 4233555991fdSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4234555991fdSmrg lt_cv_dlopen="dyld" 4235555991fdSmrg lt_cv_dlopen_libs= 4236555991fdSmrg lt_cv_dlopen_self=yes 4237555991fdSmrg ]) 4238555991fdSmrg ;; 4239126a8a12Smrg 4240555991fdSmrg *) 4241555991fdSmrg AC_CHECK_FUNC([shl_load], 4242555991fdSmrg [lt_cv_dlopen="shl_load"], 4243555991fdSmrg [AC_CHECK_LIB([dld], [shl_load], 4244555991fdSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4245555991fdSmrg [AC_CHECK_FUNC([dlopen], 4246555991fdSmrg [lt_cv_dlopen="dlopen"], 4247555991fdSmrg [AC_CHECK_LIB([dl], [dlopen], 4248555991fdSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4249555991fdSmrg [AC_CHECK_LIB([svld], [dlopen], 4250555991fdSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4251555991fdSmrg [AC_CHECK_LIB([dld], [dld_link], 4252555991fdSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4253555991fdSmrg ]) 4254555991fdSmrg ]) 4255555991fdSmrg ]) 4256555991fdSmrg ]) 4257555991fdSmrg ]) 4258555991fdSmrg ;; 4259555991fdSmrg esac 4260126a8a12Smrg 4261555991fdSmrg if test "x$lt_cv_dlopen" != xno; then 4262555991fdSmrg enable_dlopen=yes 4263555991fdSmrg else 4264555991fdSmrg enable_dlopen=no 4265555991fdSmrg fi 4266126a8a12Smrg 4267555991fdSmrg case $lt_cv_dlopen in 4268555991fdSmrg dlopen) 4269555991fdSmrg save_CPPFLAGS="$CPPFLAGS" 4270555991fdSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4271126a8a12Smrg 4272555991fdSmrg save_LDFLAGS="$LDFLAGS" 4273555991fdSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4274126a8a12Smrg 4275555991fdSmrg save_LIBS="$LIBS" 4276555991fdSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 4277126a8a12Smrg 4278555991fdSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 4279555991fdSmrg lt_cv_dlopen_self, [dnl 4280555991fdSmrg _LT_TRY_DLOPEN_SELF( 4281555991fdSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4282555991fdSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4283555991fdSmrg ]) 4284126a8a12Smrg 4285555991fdSmrg if test "x$lt_cv_dlopen_self" = xyes; then 4286555991fdSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4287555991fdSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4288555991fdSmrg lt_cv_dlopen_self_static, [dnl 4289555991fdSmrg _LT_TRY_DLOPEN_SELF( 4290555991fdSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4291555991fdSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4292555991fdSmrg ]) 4293d656433aSmrg fi 4294126a8a12Smrg 4295555991fdSmrg CPPFLAGS="$save_CPPFLAGS" 4296555991fdSmrg LDFLAGS="$save_LDFLAGS" 4297555991fdSmrg LIBS="$save_LIBS" 4298555991fdSmrg ;; 4299555991fdSmrg esac 4300126a8a12Smrg 4301555991fdSmrg case $lt_cv_dlopen_self in 4302555991fdSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4303555991fdSmrg *) enable_dlopen_self=unknown ;; 4304555991fdSmrg esac 4305126a8a12Smrg 4306555991fdSmrg case $lt_cv_dlopen_self_static in 4307555991fdSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4308555991fdSmrg *) enable_dlopen_self_static=unknown ;; 4309555991fdSmrg esac 4310555991fdSmrgfi 4311555991fdSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4312555991fdSmrg [Whether dlopen is supported]) 4313555991fdSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4314555991fdSmrg [Whether dlopen of programs is supported]) 4315555991fdSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4316555991fdSmrg [Whether dlopen of statically linked programs is supported]) 4317555991fdSmrg])# LT_SYS_DLOPEN_SELF 4318126a8a12Smrg 4319555991fdSmrg# Old name: 4320555991fdSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4321555991fdSmrgdnl aclocal-1.4 backwards compatibility: 4322555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4323126a8a12Smrg 4324126a8a12Smrg 4325555991fdSmrg# _LT_COMPILER_C_O([TAGNAME]) 4326555991fdSmrg# --------------------------- 4327555991fdSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 4328555991fdSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4329555991fdSmrgm4_defun([_LT_COMPILER_C_O], 4330555991fdSmrg[m4_require([_LT_DECL_SED])dnl 4331555991fdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4332555991fdSmrgm4_require([_LT_TAG_COMPILER])dnl 4333555991fdSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4334555991fdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4335555991fdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4336555991fdSmrg $RM -r conftest 2>/dev/null 4337555991fdSmrg mkdir conftest 4338555991fdSmrg cd conftest 4339555991fdSmrg mkdir out 4340555991fdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4341126a8a12Smrg 4342555991fdSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 4343555991fdSmrg # Insert the option either (1) after the last *FLAGS variable, or 4344555991fdSmrg # (2) before a word containing "conftest.", or (3) at the end. 4345555991fdSmrg # Note that $ac_compile itself does not contain backslashes and begins 4346555991fdSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4347555991fdSmrg lt_compile=`echo "$ac_compile" | $SED \ 4348555991fdSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4349555991fdSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4350555991fdSmrg -e 's:$: $lt_compiler_flag:'` 4351555991fdSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4352555991fdSmrg (eval "$lt_compile" 2>out/conftest.err) 4353555991fdSmrg ac_status=$? 4354555991fdSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 4355555991fdSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4356555991fdSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 4357555991fdSmrg then 4358555991fdSmrg # The compiler can only warn and ignore the option if not recognized 4359555991fdSmrg # So say no if there are warnings 4360555991fdSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 4361555991fdSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4362555991fdSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4363555991fdSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4364555991fdSmrg fi 4365555991fdSmrg fi 4366555991fdSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4367555991fdSmrg $RM conftest* 4368555991fdSmrg # SGI C++ compiler will create directory out/ii_files/ for 4369555991fdSmrg # template instantiation 4370555991fdSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4371555991fdSmrg $RM out/* && rmdir out 4372555991fdSmrg cd .. 4373555991fdSmrg $RM -r conftest 4374555991fdSmrg $RM conftest* 4375555991fdSmrg]) 4376555991fdSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4377555991fdSmrg [Does compiler simultaneously support -c and -o options?]) 4378555991fdSmrg])# _LT_COMPILER_C_O 4379126a8a12Smrg 4380126a8a12Smrg 4381555991fdSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4382555991fdSmrg# ---------------------------------- 4383555991fdSmrg# Check to see if we can do hard links to lock some files if needed 4384555991fdSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4385555991fdSmrg[m4_require([_LT_ENABLE_LOCK])dnl 4386555991fdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4387555991fdSmrg_LT_COMPILER_C_O([$1]) 4388126a8a12Smrg 4389555991fdSmrghard_links="nottested" 4390555991fdSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4391555991fdSmrg # do not overwrite the value of need_locks provided by the user 4392555991fdSmrg AC_MSG_CHECKING([if we can lock with hard links]) 4393555991fdSmrg hard_links=yes 4394555991fdSmrg $RM conftest* 4395555991fdSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4396555991fdSmrg touch conftest.a 4397555991fdSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 4398555991fdSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4399555991fdSmrg AC_MSG_RESULT([$hard_links]) 4400555991fdSmrg if test "$hard_links" = no; then 4401555991fdSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4402555991fdSmrg need_locks=warn 4403555991fdSmrg fi 4404555991fdSmrgelse 4405555991fdSmrg need_locks=no 4406555991fdSmrgfi 4407555991fdSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4408555991fdSmrg])# _LT_COMPILER_FILE_LOCKS 4409126a8a12Smrg 4410126a8a12Smrg 4411555991fdSmrg# _LT_CHECK_OBJDIR 4412555991fdSmrg# ---------------- 4413555991fdSmrgm4_defun([_LT_CHECK_OBJDIR], 4414555991fdSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4415555991fdSmrg[rm -f .libs 2>/dev/null 4416555991fdSmrgmkdir .libs 2>/dev/null 4417555991fdSmrgif test -d .libs; then 4418555991fdSmrg lt_cv_objdir=.libs 4419555991fdSmrgelse 4420555991fdSmrg # MS-DOS does not allow filenames that begin with a dot. 4421555991fdSmrg lt_cv_objdir=_libs 4422555991fdSmrgfi 4423555991fdSmrgrmdir .libs 2>/dev/null]) 4424555991fdSmrgobjdir=$lt_cv_objdir 4425555991fdSmrg_LT_DECL([], [objdir], [0], 4426555991fdSmrg [The name of the directory that contains temporary libtool files])dnl 4427555991fdSmrgm4_pattern_allow([LT_OBJDIR])dnl 4428555991fdSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4429555991fdSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4430555991fdSmrg])# _LT_CHECK_OBJDIR 4431126a8a12Smrg 4432126a8a12Smrg 4433555991fdSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4434555991fdSmrg# -------------------------------------- 4435555991fdSmrg# Check hardcoding attributes. 4436555991fdSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4437555991fdSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4438555991fdSmrg_LT_TAGVAR(hardcode_action, $1)= 4439555991fdSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4440555991fdSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4441555991fdSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4442126a8a12Smrg 4443555991fdSmrg # We can hardcode non-existent directories. 4444555991fdSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4445555991fdSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 4446555991fdSmrg # have to relink, otherwise we might link with an installed library 4447555991fdSmrg # when we should be linking with a yet-to-be-installed one 4448555991fdSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4449555991fdSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4450555991fdSmrg # Linking always hardcodes the temporary library directory. 4451555991fdSmrg _LT_TAGVAR(hardcode_action, $1)=relink 4452555991fdSmrg else 4453555991fdSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4454555991fdSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 4455555991fdSmrg fi 4456555991fdSmrgelse 4457555991fdSmrg # We cannot hardcode anything, or else we can only hardcode existing 4458555991fdSmrg # directories. 4459555991fdSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 4460555991fdSmrgfi 4461555991fdSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4462126a8a12Smrg 4463555991fdSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4464555991fdSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4465555991fdSmrg # Fast installation is not supported 4466555991fdSmrg enable_fast_install=no 4467555991fdSmrgelif test "$shlibpath_overrides_runpath" = yes || 4468555991fdSmrg test "$enable_shared" = no; then 4469555991fdSmrg # Fast installation is not necessary 4470555991fdSmrg enable_fast_install=needless 4471555991fdSmrgfi 4472555991fdSmrg_LT_TAGDECL([], [hardcode_action], [0], 4473555991fdSmrg [How to hardcode a shared library path into an executable]) 4474555991fdSmrg])# _LT_LINKER_HARDCODE_LIBPATH 4475126a8a12Smrg 4476126a8a12Smrg 4477555991fdSmrg# _LT_CMD_STRIPLIB 4478555991fdSmrg# ---------------- 4479555991fdSmrgm4_defun([_LT_CMD_STRIPLIB], 4480555991fdSmrg[m4_require([_LT_DECL_EGREP]) 4481555991fdSmrgstriplib= 4482555991fdSmrgold_striplib= 4483555991fdSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4484555991fdSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4485555991fdSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4486555991fdSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4487555991fdSmrg AC_MSG_RESULT([yes]) 4488555991fdSmrgelse 4489555991fdSmrg# FIXME - insert some real tests, host_os isn't really good enough 4490555991fdSmrg case $host_os in 4491555991fdSmrg darwin*) 4492555991fdSmrg if test -n "$STRIP" ; then 4493555991fdSmrg striplib="$STRIP -x" 4494555991fdSmrg old_striplib="$STRIP -S" 4495555991fdSmrg AC_MSG_RESULT([yes]) 4496555991fdSmrg else 4497555991fdSmrg AC_MSG_RESULT([no]) 4498555991fdSmrg fi 4499555991fdSmrg ;; 4500555991fdSmrg *) 4501555991fdSmrg AC_MSG_RESULT([no]) 4502555991fdSmrg ;; 4503555991fdSmrg esac 4504555991fdSmrgfi 4505555991fdSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4506555991fdSmrg_LT_DECL([], [striplib], [1]) 4507555991fdSmrg])# _LT_CMD_STRIPLIB 4508555991fdSmrg 4509555991fdSmrg 4510555991fdSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 4511555991fdSmrg# ----------------------------- 4512555991fdSmrg# PORTME Fill in your ld.so characteristics 4513555991fdSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4514555991fdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4515555991fdSmrgm4_require([_LT_DECL_EGREP])dnl 4516555991fdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4517555991fdSmrgm4_require([_LT_DECL_OBJDUMP])dnl 4518555991fdSmrgm4_require([_LT_DECL_SED])dnl 4519555991fdSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 4520555991fdSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4521555991fdSmrgm4_if([$1], 4522555991fdSmrg [], [ 4523555991fdSmrgif test "$GCC" = yes; then 4524555991fdSmrg case $host_os in 4525555991fdSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4526555991fdSmrg *) lt_awk_arg="/^libraries:/" ;; 4527555991fdSmrg esac 4528555991fdSmrg case $host_os in 4529555991fdSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 4530555991fdSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 4531555991fdSmrg esac 4532555991fdSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4533555991fdSmrg case $lt_search_path_spec in 4534555991fdSmrg *\;*) 4535555991fdSmrg # if the path contains ";" then we assume it to be the separator 4536555991fdSmrg # otherwise default to the standard path separator (i.e. ":") - it is 4537555991fdSmrg # assumed that no part of a normal pathname contains ";" but that should 4538555991fdSmrg # okay in the real world where ";" in dirpaths is itself problematic. 4539555991fdSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4540555991fdSmrg ;; 4541555991fdSmrg *) 4542555991fdSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4543555991fdSmrg ;; 4544555991fdSmrg esac 4545555991fdSmrg # Ok, now we have the path, separated by spaces, we can step through it 4546555991fdSmrg # and add multilib dir if necessary. 4547555991fdSmrg lt_tmp_lt_search_path_spec= 4548555991fdSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4549555991fdSmrg for lt_sys_path in $lt_search_path_spec; do 4550555991fdSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4551555991fdSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4552555991fdSmrg else 4553555991fdSmrg test -d "$lt_sys_path" && \ 4554555991fdSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4555555991fdSmrg fi 4556555991fdSmrg done 4557555991fdSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 4558555991fdSmrgBEGIN {RS=" "; FS="/|\n";} { 4559555991fdSmrg lt_foo=""; 4560555991fdSmrg lt_count=0; 4561555991fdSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 4562555991fdSmrg if ($lt_i != "" && $lt_i != ".") { 4563555991fdSmrg if ($lt_i == "..") { 4564555991fdSmrg lt_count++; 4565555991fdSmrg } else { 4566555991fdSmrg if (lt_count == 0) { 4567555991fdSmrg lt_foo="/" $lt_i lt_foo; 4568555991fdSmrg } else { 4569555991fdSmrg lt_count--; 4570555991fdSmrg } 4571555991fdSmrg } 4572555991fdSmrg } 4573555991fdSmrg } 4574555991fdSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4575555991fdSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4576555991fdSmrg}'` 4577555991fdSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 4578555991fdSmrg # for these hosts. 4579555991fdSmrg case $host_os in 4580555991fdSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4581555991fdSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 4582555991fdSmrg esac 4583555991fdSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 4584555991fdSmrgelse 4585555991fdSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4586555991fdSmrgfi]) 4587555991fdSmrglibrary_names_spec= 4588555991fdSmrglibname_spec='lib$name' 4589555991fdSmrgsoname_spec= 4590555991fdSmrgshrext_cmds=".so" 4591555991fdSmrgpostinstall_cmds= 4592555991fdSmrgpostuninstall_cmds= 4593555991fdSmrgfinish_cmds= 4594555991fdSmrgfinish_eval= 4595555991fdSmrgshlibpath_var= 4596555991fdSmrgshlibpath_overrides_runpath=unknown 4597555991fdSmrgversion_type=none 4598555991fdSmrgdynamic_linker="$host_os ld.so" 4599555991fdSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 4600555991fdSmrgneed_lib_prefix=unknown 4601555991fdSmrghardcode_into_libs=no 4602555991fdSmrg 4603555991fdSmrg# when you set need_version to no, make sure it does not cause -set_version 4604555991fdSmrg# flags to be left without arguments 4605555991fdSmrgneed_version=unknown 4606555991fdSmrg 4607555991fdSmrgcase $host_os in 4608555991fdSmrgaix3*) 4609555991fdSmrg version_type=linux 4610555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 4611555991fdSmrg shlibpath_var=LIBPATH 4612555991fdSmrg 4613555991fdSmrg # AIX 3 has no versioning support, so we append a major version to the name. 4614555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4615555991fdSmrg ;; 4616555991fdSmrg 4617555991fdSmrgaix[[4-9]]*) 4618555991fdSmrg version_type=linux 4619555991fdSmrg need_lib_prefix=no 4620555991fdSmrg need_version=no 4621555991fdSmrg hardcode_into_libs=yes 4622555991fdSmrg if test "$host_cpu" = ia64; then 4623555991fdSmrg # AIX 5 supports IA64 4624555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 4625555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4626555991fdSmrg else 4627555991fdSmrg # With GCC up to 2.95.x, collect2 would create an import file 4628555991fdSmrg # for dependence libraries. The import file would start with 4629555991fdSmrg # the line `#! .'. This would cause the generated library to 4630555991fdSmrg # depend on `.', always an invalid library. This was fixed in 4631555991fdSmrg # development snapshots of GCC prior to 3.0. 4632555991fdSmrg case $host_os in 4633555991fdSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 4634555991fdSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4635555991fdSmrg echo ' yes ' 4636555991fdSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 4637555991fdSmrg : 4638d656433aSmrg else 4639555991fdSmrg can_build_shared=no 4640d656433aSmrg fi 4641d656433aSmrg ;; 4642555991fdSmrg esac 4643555991fdSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 4644555991fdSmrg # soname into executable. Probably we can add versioning support to 4645555991fdSmrg # collect2, so additional links can be useful in future. 4646555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 4647555991fdSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4648555991fdSmrg # instead of lib<name>.a to let people know that these are not 4649555991fdSmrg # typical AIX shared libraries. 4650555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4651555991fdSmrg else 4652555991fdSmrg # We preserve .a as extension for shared libraries through AIX4.2 4653555991fdSmrg # and later when we are not doing run time linking. 4654555991fdSmrg library_names_spec='${libname}${release}.a $libname.a' 4655555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4656555991fdSmrg fi 4657555991fdSmrg shlibpath_var=LIBPATH 4658555991fdSmrg fi 4659555991fdSmrg ;; 4660555991fdSmrg 4661555991fdSmrgamigaos*) 4662555991fdSmrg case $host_cpu in 4663555991fdSmrg powerpc) 4664555991fdSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4665555991fdSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4666555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4667555991fdSmrg ;; 4668555991fdSmrg m68k) 4669555991fdSmrg library_names_spec='$libname.ixlibrary $libname.a' 4670555991fdSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4671555991fdSmrg 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' 4672555991fdSmrg ;; 4673555991fdSmrg esac 4674555991fdSmrg ;; 4675555991fdSmrg 4676555991fdSmrgbeos*) 4677555991fdSmrg library_names_spec='${libname}${shared_ext}' 4678555991fdSmrg dynamic_linker="$host_os ld.so" 4679555991fdSmrg shlibpath_var=LIBRARY_PATH 4680555991fdSmrg ;; 4681555991fdSmrg 4682555991fdSmrgbsdi[[45]]*) 4683555991fdSmrg version_type=linux 4684555991fdSmrg need_version=no 4685555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4686555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4687555991fdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4688555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4689555991fdSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4690555991fdSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4691555991fdSmrg # the default ld.so.conf also contains /usr/contrib/lib and 4692555991fdSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4693555991fdSmrg # libtool to hard-code these into programs 4694555991fdSmrg ;; 4695555991fdSmrg 4696555991fdSmrgcygwin* | mingw* | pw32* | cegcc*) 4697555991fdSmrg version_type=windows 4698555991fdSmrg shrext_cmds=".dll" 4699555991fdSmrg need_version=no 4700555991fdSmrg need_lib_prefix=no 4701555991fdSmrg 4702555991fdSmrg case $GCC,$host_os in 4703555991fdSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 4704555991fdSmrg library_names_spec='$libname.dll.a' 4705555991fdSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 4706555991fdSmrg postinstall_cmds='base_file=`basename \${file}`~ 4707555991fdSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 4708555991fdSmrg dldir=$destdir/`dirname \$dlpath`~ 4709555991fdSmrg test -d \$dldir || mkdir -p \$dldir~ 4710555991fdSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 4711555991fdSmrg chmod a+x \$dldir/$dlname~ 4712555991fdSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4713555991fdSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4714555991fdSmrg fi' 4715555991fdSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4716555991fdSmrg dlpath=$dir/\$dldll~ 4717555991fdSmrg $RM \$dlpath' 4718555991fdSmrg shlibpath_overrides_runpath=yes 4719555991fdSmrg 4720555991fdSmrg case $host_os in 4721555991fdSmrg cygwin*) 4722555991fdSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4723555991fdSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4724555991fdSmrgm4_if([$1], [],[ 4725555991fdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 4726555991fdSmrg ;; 4727555991fdSmrg mingw* | cegcc*) 4728555991fdSmrg # MinGW DLLs use traditional 'lib' prefix 4729555991fdSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4730555991fdSmrg ;; 4731555991fdSmrg pw32*) 4732555991fdSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 4733555991fdSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4734555991fdSmrg ;; 4735555991fdSmrg esac 4736555991fdSmrg ;; 4737555991fdSmrg 4738555991fdSmrg *) 4739555991fdSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 4740555991fdSmrg ;; 4741555991fdSmrg esac 4742555991fdSmrg dynamic_linker='Win32 ld.exe' 4743555991fdSmrg # FIXME: first we should search . and the directory the executable is in 4744555991fdSmrg shlibpath_var=PATH 4745555991fdSmrg ;; 4746555991fdSmrg 4747555991fdSmrgdarwin* | rhapsody*) 4748555991fdSmrg dynamic_linker="$host_os dyld" 4749555991fdSmrg version_type=darwin 4750555991fdSmrg need_lib_prefix=no 4751555991fdSmrg need_version=no 4752555991fdSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 4753555991fdSmrg soname_spec='${libname}${release}${major}$shared_ext' 4754555991fdSmrg shlibpath_overrides_runpath=yes 4755555991fdSmrg shlibpath_var=DYLD_LIBRARY_PATH 4756555991fdSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4757555991fdSmrgm4_if([$1], [],[ 4758555991fdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 4759555991fdSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 4760555991fdSmrg ;; 4761555991fdSmrg 4762555991fdSmrgdgux*) 4763555991fdSmrg version_type=linux 4764555991fdSmrg need_lib_prefix=no 4765555991fdSmrg need_version=no 4766555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 4767555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4768555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4769555991fdSmrg ;; 4770555991fdSmrg 4771555991fdSmrgfreebsd1*) 4772555991fdSmrg dynamic_linker=no 4773555991fdSmrg ;; 4774555991fdSmrg 4775555991fdSmrgfreebsd* | dragonfly*) 4776555991fdSmrg # DragonFly does not have aout. When/if they implement a new 4777555991fdSmrg # versioning mechanism, adjust this. 4778555991fdSmrg if test -x /usr/bin/objformat; then 4779555991fdSmrg objformat=`/usr/bin/objformat` 4780555991fdSmrg else 4781555991fdSmrg case $host_os in 4782555991fdSmrg freebsd[[123]]*) objformat=aout ;; 4783555991fdSmrg *) objformat=elf ;; 4784555991fdSmrg esac 4785555991fdSmrg fi 4786555991fdSmrg version_type=freebsd-$objformat 4787555991fdSmrg case $version_type in 4788555991fdSmrg freebsd-elf*) 4789555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4790555991fdSmrg need_version=no 4791555991fdSmrg need_lib_prefix=no 4792555991fdSmrg ;; 4793555991fdSmrg freebsd-*) 4794555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 4795555991fdSmrg need_version=yes 4796555991fdSmrg ;; 4797555991fdSmrg esac 4798555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4799555991fdSmrg case $host_os in 4800555991fdSmrg freebsd2*) 4801555991fdSmrg shlibpath_overrides_runpath=yes 4802555991fdSmrg ;; 4803555991fdSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 4804555991fdSmrg shlibpath_overrides_runpath=yes 4805555991fdSmrg hardcode_into_libs=yes 4806555991fdSmrg ;; 4807555991fdSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 4808555991fdSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 4809555991fdSmrg shlibpath_overrides_runpath=no 4810555991fdSmrg hardcode_into_libs=yes 4811555991fdSmrg ;; 4812555991fdSmrg *) # from 4.6 on, and DragonFly 4813555991fdSmrg shlibpath_overrides_runpath=yes 4814555991fdSmrg hardcode_into_libs=yes 4815555991fdSmrg ;; 4816555991fdSmrg esac 4817555991fdSmrg ;; 4818555991fdSmrg 4819555991fdSmrggnu*) 4820555991fdSmrg version_type=linux 4821555991fdSmrg need_lib_prefix=no 4822555991fdSmrg need_version=no 4823555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4824555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4825555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4826555991fdSmrg hardcode_into_libs=yes 4827555991fdSmrg ;; 4828555991fdSmrg 4829555991fdSmrghaiku*) 4830555991fdSmrg version_type=linux 4831555991fdSmrg need_lib_prefix=no 4832555991fdSmrg need_version=no 4833555991fdSmrg dynamic_linker="$host_os runtime_loader" 4834555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4835555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4836555991fdSmrg shlibpath_var=LIBRARY_PATH 4837555991fdSmrg shlibpath_overrides_runpath=yes 4838555991fdSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 4839555991fdSmrg hardcode_into_libs=yes 4840555991fdSmrg ;; 4841555991fdSmrg 4842555991fdSmrghpux9* | hpux10* | hpux11*) 4843555991fdSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 4844555991fdSmrg # link against other versions. 4845555991fdSmrg version_type=sunos 4846555991fdSmrg need_lib_prefix=no 4847555991fdSmrg need_version=no 4848555991fdSmrg case $host_cpu in 4849555991fdSmrg ia64*) 4850555991fdSmrg shrext_cmds='.so' 4851555991fdSmrg hardcode_into_libs=yes 4852555991fdSmrg dynamic_linker="$host_os dld.so" 4853555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4854555991fdSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4855555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4856555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4857555991fdSmrg if test "X$HPUX_IA64_MODE" = X32; then 4858555991fdSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 4859555991fdSmrg else 4860555991fdSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 4861555991fdSmrg fi 4862555991fdSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4863555991fdSmrg ;; 4864555991fdSmrg hppa*64*) 4865555991fdSmrg shrext_cmds='.sl' 4866555991fdSmrg hardcode_into_libs=yes 4867555991fdSmrg dynamic_linker="$host_os dld.sl" 4868555991fdSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4869555991fdSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4870555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4871555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4872555991fdSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4873555991fdSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4874555991fdSmrg ;; 4875555991fdSmrg *) 4876555991fdSmrg shrext_cmds='.sl' 4877555991fdSmrg dynamic_linker="$host_os dld.sl" 4878555991fdSmrg shlibpath_var=SHLIB_PATH 4879555991fdSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 4880555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4881555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4882555991fdSmrg ;; 4883555991fdSmrg esac 4884555991fdSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 4885555991fdSmrg postinstall_cmds='chmod 555 $lib' 4886555991fdSmrg # or fails outright, so override atomically: 4887555991fdSmrg install_override_mode=555 4888555991fdSmrg ;; 4889555991fdSmrg 4890555991fdSmrginterix[[3-9]]*) 4891555991fdSmrg version_type=linux 4892555991fdSmrg need_lib_prefix=no 4893555991fdSmrg need_version=no 4894555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4895555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4896555991fdSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 4897555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4898555991fdSmrg shlibpath_overrides_runpath=no 4899555991fdSmrg hardcode_into_libs=yes 4900555991fdSmrg ;; 4901555991fdSmrg 4902555991fdSmrgirix5* | irix6* | nonstopux*) 4903555991fdSmrg case $host_os in 4904555991fdSmrg nonstopux*) version_type=nonstopux ;; 4905555991fdSmrg *) 4906555991fdSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 4907555991fdSmrg version_type=linux 4908555991fdSmrg else 4909555991fdSmrg version_type=irix 4910555991fdSmrg fi ;; 4911555991fdSmrg esac 4912555991fdSmrg need_lib_prefix=no 4913555991fdSmrg need_version=no 4914555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4915555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 4916555991fdSmrg case $host_os in 4917555991fdSmrg irix5* | nonstopux*) 4918555991fdSmrg libsuff= shlibsuff= 4919555991fdSmrg ;; 4920555991fdSmrg *) 4921555991fdSmrg case $LD in # libtool.m4 will add one of these switches to LD 4922555991fdSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 4923555991fdSmrg libsuff= shlibsuff= libmagic=32-bit;; 4924555991fdSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 4925555991fdSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 4926555991fdSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 4927555991fdSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 4928555991fdSmrg *) libsuff= shlibsuff= libmagic=never-match;; 4929555991fdSmrg esac 4930555991fdSmrg ;; 4931555991fdSmrg esac 4932555991fdSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 4933555991fdSmrg shlibpath_overrides_runpath=no 4934555991fdSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 4935555991fdSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 4936555991fdSmrg hardcode_into_libs=yes 4937555991fdSmrg ;; 4938555991fdSmrg 4939555991fdSmrg# No shared lib support for Linux oldld, aout, or coff. 4940555991fdSmrglinux*oldld* | linux*aout* | linux*coff*) 4941555991fdSmrg dynamic_linker=no 4942555991fdSmrg ;; 4943555991fdSmrg 4944555991fdSmrg# This must be Linux ELF. 4945555991fdSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 4946555991fdSmrg version_type=linux 4947555991fdSmrg need_lib_prefix=no 4948555991fdSmrg need_version=no 4949555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4950555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4951555991fdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 4952555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4953555991fdSmrg shlibpath_overrides_runpath=no 4954126a8a12Smrg 4955555991fdSmrg # Some binutils ld are patched to set DT_RUNPATH 4956555991fdSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 4957555991fdSmrg [lt_cv_shlibpath_overrides_runpath=no 4958555991fdSmrg save_LDFLAGS=$LDFLAGS 4959555991fdSmrg save_libdir=$libdir 4960555991fdSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4961555991fdSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4962555991fdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4963555991fdSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4964555991fdSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 4965555991fdSmrg LDFLAGS=$save_LDFLAGS 4966555991fdSmrg libdir=$save_libdir 4967555991fdSmrg ]) 4968555991fdSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 4969126a8a12Smrg 4970555991fdSmrg # This implies no fast_install, which is unacceptable. 4971555991fdSmrg # Some rework will be needed to allow for fast_install 4972555991fdSmrg # before this can be enabled. 4973555991fdSmrg hardcode_into_libs=yes 4974126a8a12Smrg 4975555991fdSmrg # Append ld.so.conf contents to the search path 4976555991fdSmrg if test -f /etc/ld.so.conf; then 4977555991fdSmrg 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' ' '` 4978555991fdSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 4979555991fdSmrg fi 4980126a8a12Smrg 4981555991fdSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 4982555991fdSmrg # powerpc, because MkLinux only supported shared libraries with the 4983555991fdSmrg # GNU dynamic linker. Since this was broken with cross compilers, 4984555991fdSmrg # most powerpc-linux boxes support dynamic linking these days and 4985555991fdSmrg # people can always --disable-shared, the test was removed, and we 4986555991fdSmrg # assume the GNU/Linux dynamic linker is in use. 4987555991fdSmrg dynamic_linker='GNU/Linux ld.so' 4988555991fdSmrg ;; 4989126a8a12Smrg 4990555991fdSmrgnetbsd*) 4991555991fdSmrg version_type=sunos 4992555991fdSmrg need_lib_prefix=no 4993555991fdSmrg need_version=no 4994555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4995555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4996555991fdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4997555991fdSmrg dynamic_linker='NetBSD (a.out) ld.so' 4998555991fdSmrg else 4999555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 5000555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5001555991fdSmrg dynamic_linker='NetBSD ld.elf_so' 5002555991fdSmrg fi 5003555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5004555991fdSmrg shlibpath_overrides_runpath=yes 5005555991fdSmrg hardcode_into_libs=yes 5006555991fdSmrg ;; 5007126a8a12Smrg 5008555991fdSmrgnewsos6) 5009555991fdSmrg version_type=linux 5010555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5011555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5012555991fdSmrg shlibpath_overrides_runpath=yes 5013555991fdSmrg ;; 5014126a8a12Smrg 5015555991fdSmrg*nto* | *qnx*) 5016555991fdSmrg version_type=qnx 5017555991fdSmrg need_lib_prefix=no 5018555991fdSmrg need_version=no 5019555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5020555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5021555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5022555991fdSmrg shlibpath_overrides_runpath=no 5023555991fdSmrg hardcode_into_libs=yes 5024555991fdSmrg dynamic_linker='ldqnx.so' 5025555991fdSmrg ;; 5026126a8a12Smrg 5027555991fdSmrgopenbsd*) 5028555991fdSmrg version_type=sunos 5029555991fdSmrg sys_lib_dlsearch_path_spec="/usr/lib" 5030555991fdSmrg need_lib_prefix=no 5031555991fdSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 5032555991fdSmrg case $host_os in 5033555991fdSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 5034555991fdSmrg *) need_version=no ;; 5035555991fdSmrg esac 5036555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5037555991fdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5038555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5039555991fdSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5040555991fdSmrg case $host_os in 5041555991fdSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 5042555991fdSmrg shlibpath_overrides_runpath=no 5043555991fdSmrg ;; 5044555991fdSmrg *) 5045555991fdSmrg shlibpath_overrides_runpath=yes 5046555991fdSmrg ;; 5047555991fdSmrg esac 5048555991fdSmrg else 5049555991fdSmrg shlibpath_overrides_runpath=yes 5050555991fdSmrg fi 5051555991fdSmrg ;; 5052126a8a12Smrg 5053555991fdSmrgos2*) 5054555991fdSmrg libname_spec='$name' 5055555991fdSmrg shrext_cmds=".dll" 5056555991fdSmrg need_lib_prefix=no 5057555991fdSmrg library_names_spec='$libname${shared_ext} $libname.a' 5058555991fdSmrg dynamic_linker='OS/2 ld.exe' 5059555991fdSmrg shlibpath_var=LIBPATH 5060555991fdSmrg ;; 5061126a8a12Smrg 5062555991fdSmrgosf3* | osf4* | osf5*) 5063555991fdSmrg version_type=osf 5064555991fdSmrg need_lib_prefix=no 5065555991fdSmrg need_version=no 5066555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5067555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5068555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5069555991fdSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 5070555991fdSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 5071555991fdSmrg ;; 5072555991fdSmrg 5073555991fdSmrgrdos*) 5074555991fdSmrg dynamic_linker=no 5075555991fdSmrg ;; 5076555991fdSmrg 5077555991fdSmrgsolaris*) 5078555991fdSmrg version_type=linux 5079555991fdSmrg need_lib_prefix=no 5080555991fdSmrg need_version=no 5081555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5082555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5083555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5084555991fdSmrg shlibpath_overrides_runpath=yes 5085555991fdSmrg hardcode_into_libs=yes 5086555991fdSmrg # ldd complains unless libraries are executable 5087555991fdSmrg postinstall_cmds='chmod +x $lib' 5088555991fdSmrg ;; 5089555991fdSmrg 5090555991fdSmrgsunos4*) 5091555991fdSmrg version_type=sunos 5092555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5093555991fdSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 5094555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5095555991fdSmrg shlibpath_overrides_runpath=yes 5096555991fdSmrg if test "$with_gnu_ld" = yes; then 5097555991fdSmrg need_lib_prefix=no 5098555991fdSmrg fi 5099555991fdSmrg need_version=yes 5100555991fdSmrg ;; 5101555991fdSmrg 5102555991fdSmrgsysv4 | sysv4.3*) 5103555991fdSmrg version_type=linux 5104555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5105555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5106555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5107555991fdSmrg case $host_vendor in 5108555991fdSmrg sni) 5109555991fdSmrg shlibpath_overrides_runpath=no 5110555991fdSmrg need_lib_prefix=no 5111555991fdSmrg runpath_var=LD_RUN_PATH 5112d656433aSmrg ;; 5113555991fdSmrg siemens) 5114555991fdSmrg need_lib_prefix=no 5115d656433aSmrg ;; 5116555991fdSmrg motorola) 5117555991fdSmrg need_lib_prefix=no 5118555991fdSmrg need_version=no 5119555991fdSmrg shlibpath_overrides_runpath=no 5120555991fdSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 5121d656433aSmrg ;; 5122555991fdSmrg esac 5123555991fdSmrg ;; 5124126a8a12Smrg 5125555991fdSmrgsysv4*MP*) 5126555991fdSmrg if test -d /usr/nec ;then 5127555991fdSmrg version_type=linux 5128555991fdSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 5129555991fdSmrg soname_spec='$libname${shared_ext}.$major' 5130555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5131555991fdSmrg fi 5132555991fdSmrg ;; 5133126a8a12Smrg 5134555991fdSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5135555991fdSmrg version_type=freebsd-elf 5136555991fdSmrg need_lib_prefix=no 5137555991fdSmrg need_version=no 5138555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5139555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5140555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5141555991fdSmrg shlibpath_overrides_runpath=yes 5142555991fdSmrg hardcode_into_libs=yes 5143555991fdSmrg if test "$with_gnu_ld" = yes; then 5144555991fdSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 5145555991fdSmrg else 5146555991fdSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 5147555991fdSmrg case $host_os in 5148555991fdSmrg sco3.2v5*) 5149555991fdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 5150d656433aSmrg ;; 5151555991fdSmrg esac 5152555991fdSmrg fi 5153555991fdSmrg sys_lib_dlsearch_path_spec='/usr/lib' 5154555991fdSmrg ;; 5155126a8a12Smrg 5156555991fdSmrgtpf*) 5157555991fdSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5158555991fdSmrg version_type=linux 5159555991fdSmrg need_lib_prefix=no 5160555991fdSmrg need_version=no 5161555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5162555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5163555991fdSmrg shlibpath_overrides_runpath=no 5164555991fdSmrg hardcode_into_libs=yes 5165555991fdSmrg ;; 5166126a8a12Smrg 5167555991fdSmrguts4*) 5168555991fdSmrg version_type=linux 5169555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5170555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 5171555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 5172555991fdSmrg ;; 5173126a8a12Smrg 5174555991fdSmrg*) 5175555991fdSmrg dynamic_linker=no 5176555991fdSmrg ;; 5177555991fdSmrgesac 5178555991fdSmrgAC_MSG_RESULT([$dynamic_linker]) 5179555991fdSmrgtest "$dynamic_linker" = no && can_build_shared=no 5180126a8a12Smrg 5181555991fdSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5182555991fdSmrgif test "$GCC" = yes; then 5183555991fdSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5184555991fdSmrgfi 5185126a8a12Smrg 5186555991fdSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5187555991fdSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5188555991fdSmrgfi 5189555991fdSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5190555991fdSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5191555991fdSmrgfi 5192555991fdSmrg 5193555991fdSmrg_LT_DECL([], [variables_saved_for_relink], [1], 5194555991fdSmrg [Variables whose values should be saved in libtool wrapper scripts and 5195555991fdSmrg restored at link time]) 5196555991fdSmrg_LT_DECL([], [need_lib_prefix], [0], 5197555991fdSmrg [Do we need the "lib" prefix for modules?]) 5198555991fdSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5199555991fdSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 5200555991fdSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5201555991fdSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5202555991fdSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 5203555991fdSmrg [Is shlibpath searched before the hard-coded library search path?]) 5204555991fdSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5205555991fdSmrg_LT_DECL([], [library_names_spec], [1], 5206555991fdSmrg [[List of archive names. First name is the real one, the rest are links. 5207555991fdSmrg The last name is the one that the linker finds with -lNAME]]) 5208555991fdSmrg_LT_DECL([], [soname_spec], [1], 5209555991fdSmrg [[The coded name of the library, if different from the real name]]) 5210555991fdSmrg_LT_DECL([], [install_override_mode], [1], 5211555991fdSmrg [Permission mode override for installation of shared libraries]) 5212555991fdSmrg_LT_DECL([], [postinstall_cmds], [2], 5213555991fdSmrg [Command to use after installation of a shared archive]) 5214555991fdSmrg_LT_DECL([], [postuninstall_cmds], [2], 5215555991fdSmrg [Command to use after uninstallation of a shared archive]) 5216555991fdSmrg_LT_DECL([], [finish_cmds], [2], 5217555991fdSmrg [Commands used to finish a libtool library installation in a directory]) 5218555991fdSmrg_LT_DECL([], [finish_eval], [1], 5219555991fdSmrg [[As "finish_cmds", except a single script fragment to be evaled but 5220555991fdSmrg not shown]]) 5221555991fdSmrg_LT_DECL([], [hardcode_into_libs], [0], 5222555991fdSmrg [Whether we should hardcode library paths into libraries]) 5223555991fdSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5224555991fdSmrg [Compile-time system search path for libraries]) 5225555991fdSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5226555991fdSmrg [Run-time system search path for libraries]) 5227555991fdSmrg])# _LT_SYS_DYNAMIC_LINKER 5228555991fdSmrg 5229555991fdSmrg 5230555991fdSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 5231555991fdSmrg# -------------------------- 5232555991fdSmrg# find a file program which can recognize shared library 5233555991fdSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5234555991fdSmrg[m4_require([_LT_DECL_EGREP])dnl 5235555991fdSmrgAC_MSG_CHECKING([for $1]) 5236555991fdSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5237555991fdSmrg[case $MAGIC_CMD in 5238555991fdSmrg[[\\/*] | ?:[\\/]*]) 5239555991fdSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5240555991fdSmrg ;; 5241555991fdSmrg*) 5242555991fdSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5243555991fdSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5244555991fdSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5245555991fdSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5246555991fdSmrgdnl not every word. This closes a longstanding sh security hole. 5247555991fdSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5248555991fdSmrg for ac_dir in $ac_dummy; do 5249555991fdSmrg IFS="$lt_save_ifs" 5250555991fdSmrg test -z "$ac_dir" && ac_dir=. 5251555991fdSmrg if test -f $ac_dir/$1; then 5252555991fdSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5253555991fdSmrg if test -n "$file_magic_test_file"; then 5254555991fdSmrg case $deplibs_check_method in 5255555991fdSmrg "file_magic "*) 5256555991fdSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5257555991fdSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5258555991fdSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5259555991fdSmrg $EGREP "$file_magic_regex" > /dev/null; then 5260555991fdSmrg : 5261555991fdSmrg else 5262555991fdSmrg cat <<_LT_EOF 1>&2 5263126a8a12Smrg 5264555991fdSmrg*** Warning: the command libtool uses to detect shared libraries, 5265555991fdSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 5266555991fdSmrg*** The result is that libtool may fail to recognize shared libraries 5267555991fdSmrg*** as such. This will affect the creation of libtool libraries that 5268555991fdSmrg*** depend on shared libraries, but programs linked with such libtool 5269555991fdSmrg*** libraries will work regardless of this problem. Nevertheless, you 5270555991fdSmrg*** may want to report the problem to your system manager and/or to 5271555991fdSmrg*** bug-libtool@gnu.org 5272555991fdSmrg 5273555991fdSmrg_LT_EOF 5274555991fdSmrg fi ;; 5275555991fdSmrg esac 5276d656433aSmrg fi 5277555991fdSmrg break 5278555991fdSmrg fi 5279555991fdSmrg done 5280555991fdSmrg IFS="$lt_save_ifs" 5281555991fdSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 5282555991fdSmrg ;; 5283555991fdSmrgesac]) 5284555991fdSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5285555991fdSmrgif test -n "$MAGIC_CMD"; then 5286555991fdSmrg AC_MSG_RESULT($MAGIC_CMD) 5287555991fdSmrgelse 5288555991fdSmrg AC_MSG_RESULT(no) 5289555991fdSmrgfi 5290555991fdSmrg_LT_DECL([], [MAGIC_CMD], [0], 5291555991fdSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5292555991fdSmrg])# _LT_PATH_TOOL_PREFIX 5293126a8a12Smrg 5294555991fdSmrg# Old name: 5295555991fdSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5296555991fdSmrgdnl aclocal-1.4 backwards compatibility: 5297555991fdSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5298126a8a12Smrg 5299126a8a12Smrg 5300555991fdSmrg# _LT_PATH_MAGIC 5301555991fdSmrg# -------------- 5302555991fdSmrg# find a file program which can recognize a shared library 5303555991fdSmrgm4_defun([_LT_PATH_MAGIC], 5304555991fdSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5305555991fdSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 5306555991fdSmrg if test -n "$ac_tool_prefix"; then 5307555991fdSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5308555991fdSmrg else 5309555991fdSmrg MAGIC_CMD=: 5310d656433aSmrg fi 5311555991fdSmrgfi 5312555991fdSmrg])# _LT_PATH_MAGIC 5313126a8a12Smrg 5314126a8a12Smrg 5315555991fdSmrg# LT_PATH_LD 5316555991fdSmrg# ---------- 5317555991fdSmrg# find the pathname to the GNU or non-GNU linker 5318555991fdSmrgAC_DEFUN([LT_PATH_LD], 5319555991fdSmrg[AC_REQUIRE([AC_PROG_CC])dnl 5320555991fdSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 5321555991fdSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5322555991fdSmrgm4_require([_LT_DECL_SED])dnl 5323555991fdSmrgm4_require([_LT_DECL_EGREP])dnl 5324555991fdSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5325126a8a12Smrg 5326555991fdSmrgAC_ARG_WITH([gnu-ld], 5327555991fdSmrg [AS_HELP_STRING([--with-gnu-ld], 5328555991fdSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5329555991fdSmrg [test "$withval" = no || with_gnu_ld=yes], 5330555991fdSmrg [with_gnu_ld=no])dnl 5331126a8a12Smrg 5332555991fdSmrgac_prog=ld 5333555991fdSmrgif test "$GCC" = yes; then 5334555991fdSmrg # Check if gcc -print-prog-name=ld gives a path. 5335555991fdSmrg AC_MSG_CHECKING([for ld used by $CC]) 5336555991fdSmrg case $host in 5337555991fdSmrg *-*-mingw*) 5338555991fdSmrg # gcc leaves a trailing carriage return which upsets mingw 5339555991fdSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5340555991fdSmrg *) 5341555991fdSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5342555991fdSmrg esac 5343555991fdSmrg case $ac_prog in 5344555991fdSmrg # Accept absolute paths. 5345555991fdSmrg [[\\/]]* | ?:[[\\/]]*) 5346555991fdSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 5347555991fdSmrg # Canonicalize the pathname of ld 5348555991fdSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5349555991fdSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5350555991fdSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5351555991fdSmrg done 5352555991fdSmrg test -z "$LD" && LD="$ac_prog" 5353d656433aSmrg ;; 5354555991fdSmrg "") 5355555991fdSmrg # If it fails, then pretend we aren't using GCC. 5356555991fdSmrg ac_prog=ld 5357555991fdSmrg ;; 5358555991fdSmrg *) 5359555991fdSmrg # If it is relative, then search for the first ld in PATH. 5360555991fdSmrg with_gnu_ld=unknown 5361555991fdSmrg ;; 5362555991fdSmrg esac 5363555991fdSmrgelif test "$with_gnu_ld" = yes; then 5364555991fdSmrg AC_MSG_CHECKING([for GNU ld]) 5365555991fdSmrgelse 5366555991fdSmrg AC_MSG_CHECKING([for non-GNU ld]) 5367555991fdSmrgfi 5368555991fdSmrgAC_CACHE_VAL(lt_cv_path_LD, 5369555991fdSmrg[if test -z "$LD"; then 5370555991fdSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5371555991fdSmrg for ac_dir in $PATH; do 5372555991fdSmrg IFS="$lt_save_ifs" 5373555991fdSmrg test -z "$ac_dir" && ac_dir=. 5374555991fdSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5375555991fdSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 5376555991fdSmrg # Check to see if the program is GNU ld. I'd rather use --version, 5377555991fdSmrg # but apparently some variants of GNU ld only accept -v. 5378555991fdSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 5379555991fdSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5380555991fdSmrg *GNU* | *'with BFD'*) 5381555991fdSmrg test "$with_gnu_ld" != no && break 5382555991fdSmrg ;; 5383555991fdSmrg *) 5384555991fdSmrg test "$with_gnu_ld" != yes && break 5385555991fdSmrg ;; 5386555991fdSmrg esac 5387555991fdSmrg fi 5388555991fdSmrg done 5389555991fdSmrg IFS="$lt_save_ifs" 5390555991fdSmrgelse 5391555991fdSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 5392555991fdSmrgfi]) 5393555991fdSmrgLD="$lt_cv_path_LD" 5394555991fdSmrgif test -n "$LD"; then 5395555991fdSmrg AC_MSG_RESULT($LD) 5396555991fdSmrgelse 5397555991fdSmrg AC_MSG_RESULT(no) 5398555991fdSmrgfi 5399555991fdSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5400555991fdSmrg_LT_PATH_LD_GNU 5401555991fdSmrgAC_SUBST([LD]) 5402d656433aSmrg 5403555991fdSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5404555991fdSmrg])# LT_PATH_LD 5405d656433aSmrg 5406555991fdSmrg# Old names: 5407555991fdSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5408555991fdSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5409555991fdSmrgdnl aclocal-1.4 backwards compatibility: 5410555991fdSmrgdnl AC_DEFUN([AM_PROG_LD], []) 5411555991fdSmrgdnl AC_DEFUN([AC_PROG_LD], []) 5412126a8a12Smrg 5413126a8a12Smrg 5414555991fdSmrg# _LT_PATH_LD_GNU 5415555991fdSmrg#- -------------- 5416555991fdSmrgm4_defun([_LT_PATH_LD_GNU], 5417555991fdSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5418555991fdSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5419555991fdSmrgcase `$LD -v 2>&1 </dev/null` in 5420555991fdSmrg*GNU* | *'with BFD'*) 5421555991fdSmrg lt_cv_prog_gnu_ld=yes 5422555991fdSmrg ;; 5423555991fdSmrg*) 5424555991fdSmrg lt_cv_prog_gnu_ld=no 5425555991fdSmrg ;; 5426555991fdSmrgesac]) 5427555991fdSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5428555991fdSmrg])# _LT_PATH_LD_GNU 5429126a8a12Smrg 5430126a8a12Smrg 5431555991fdSmrg# _LT_CMD_RELOAD 5432555991fdSmrg# -------------- 5433555991fdSmrg# find reload flag for linker 5434555991fdSmrg# -- PORTME Some linkers may need a different reload flag. 5435555991fdSmrgm4_defun([_LT_CMD_RELOAD], 5436555991fdSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 5437555991fdSmrg lt_cv_ld_reload_flag, 5438555991fdSmrg [lt_cv_ld_reload_flag='-r']) 5439555991fdSmrgreload_flag=$lt_cv_ld_reload_flag 5440555991fdSmrgcase $reload_flag in 5441555991fdSmrg"" | " "*) ;; 5442555991fdSmrg*) reload_flag=" $reload_flag" ;; 5443555991fdSmrgesac 5444555991fdSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 5445555991fdSmrgcase $host_os in 5446555991fdSmrg darwin*) 5447555991fdSmrg if test "$GCC" = yes; then 5448555991fdSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5449555991fdSmrg else 5450555991fdSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 5451555991fdSmrg fi 5452555991fdSmrg ;; 5453555991fdSmrgesac 5454555991fdSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5455555991fdSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 5456555991fdSmrg])# _LT_CMD_RELOAD 5457126a8a12Smrg 5458126a8a12Smrg 5459555991fdSmrg# _LT_CHECK_MAGIC_METHOD 5460555991fdSmrg# ---------------------- 5461555991fdSmrg# how to check for library dependencies 5462555991fdSmrg# -- PORTME fill in with the dynamic library characteristics 5463555991fdSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5464555991fdSmrg[m4_require([_LT_DECL_EGREP]) 5465555991fdSmrgm4_require([_LT_DECL_OBJDUMP]) 5466555991fdSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 5467555991fdSmrglt_cv_deplibs_check_method, 5468555991fdSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 5469555991fdSmrglt_cv_file_magic_test_file= 5470555991fdSmrglt_cv_deplibs_check_method='unknown' 5471555991fdSmrg# Need to set the preceding variable on all platforms that support 5472555991fdSmrg# interlibrary dependencies. 5473555991fdSmrg# 'none' -- dependencies not supported. 5474555991fdSmrg# `unknown' -- same as none, but documents that we really don't know. 5475555991fdSmrg# 'pass_all' -- all dependencies passed with no checks. 5476555991fdSmrg# 'test_compile' -- check by making test program. 5477555991fdSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 5478555991fdSmrg# which responds to the $file_magic_cmd with a given extended regex. 5479555991fdSmrg# If you have `file' or equivalent on your system and you're not sure 5480555991fdSmrg# whether `pass_all' will *always* work, you probably want this one. 5481126a8a12Smrg 5482555991fdSmrgcase $host_os in 5483555991fdSmrgaix[[4-9]]*) 5484555991fdSmrg lt_cv_deplibs_check_method=pass_all 5485555991fdSmrg ;; 5486d656433aSmrg 5487555991fdSmrgbeos*) 5488555991fdSmrg lt_cv_deplibs_check_method=pass_all 5489555991fdSmrg ;; 5490d656433aSmrg 5491555991fdSmrgbsdi[[45]]*) 5492555991fdSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5493555991fdSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 5494555991fdSmrg lt_cv_file_magic_test_file=/shlib/libc.so 5495555991fdSmrg ;; 5496d656433aSmrg 5497555991fdSmrgcygwin*) 5498555991fdSmrg # func_win32_libid is a shell function defined in ltmain.sh 5499555991fdSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5500555991fdSmrg lt_cv_file_magic_cmd='func_win32_libid' 5501555991fdSmrg ;; 5502126a8a12Smrg 5503555991fdSmrgmingw* | pw32*) 5504555991fdSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 5505555991fdSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 5506555991fdSmrg # unless we find 'file', for example because we are cross-compiling. 5507555991fdSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 5508555991fdSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 5509555991fdSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5510555991fdSmrg lt_cv_file_magic_cmd='func_win32_libid' 5511555991fdSmrg else 5512555991fdSmrg # Keep this pattern in sync with the one in func_win32_libid. 5513555991fdSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 5514555991fdSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5515555991fdSmrg fi 5516555991fdSmrg ;; 5517555991fdSmrg 5518555991fdSmrgcegcc*) 5519555991fdSmrg # use the weaker test based on 'objdump'. See mingw*. 5520555991fdSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5521555991fdSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5522555991fdSmrg ;; 5523555991fdSmrg 5524555991fdSmrgdarwin* | rhapsody*) 5525555991fdSmrg lt_cv_deplibs_check_method=pass_all 5526555991fdSmrg ;; 5527555991fdSmrg 5528555991fdSmrgfreebsd* | dragonfly*) 5529555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5530555991fdSmrg case $host_cpu in 5531555991fdSmrg i*86 ) 5532555991fdSmrg # Not sure whether the presence of OpenBSD here was a mistake. 5533555991fdSmrg # Let's accept both of them until this is cleared up. 5534555991fdSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5535555991fdSmrg lt_cv_file_magic_cmd=/usr/bin/file 5536555991fdSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5537555991fdSmrg ;; 5538555991fdSmrg esac 5539555991fdSmrg else 5540555991fdSmrg lt_cv_deplibs_check_method=pass_all 5541555991fdSmrg fi 5542555991fdSmrg ;; 5543555991fdSmrg 5544555991fdSmrggnu*) 5545555991fdSmrg lt_cv_deplibs_check_method=pass_all 5546555991fdSmrg ;; 5547555991fdSmrg 5548555991fdSmrghaiku*) 5549555991fdSmrg lt_cv_deplibs_check_method=pass_all 5550555991fdSmrg ;; 5551555991fdSmrg 5552555991fdSmrghpux10.20* | hpux11*) 5553555991fdSmrg lt_cv_file_magic_cmd=/usr/bin/file 5554555991fdSmrg case $host_cpu in 5555555991fdSmrg ia64*) 5556555991fdSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5557555991fdSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5558555991fdSmrg ;; 5559555991fdSmrg hppa*64*) 5560555991fdSmrg [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]'] 5561555991fdSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5562555991fdSmrg ;; 5563555991fdSmrg *) 5564555991fdSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 5565555991fdSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 5566d656433aSmrg ;; 5567d656433aSmrg esac 5568555991fdSmrg ;; 5569d656433aSmrg 5570555991fdSmrginterix[[3-9]]*) 5571555991fdSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5572555991fdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5573555991fdSmrg ;; 5574d656433aSmrg 5575555991fdSmrgirix5* | irix6* | nonstopux*) 5576555991fdSmrg case $LD in 5577555991fdSmrg *-32|*"-32 ") libmagic=32-bit;; 5578555991fdSmrg *-n32|*"-n32 ") libmagic=N32;; 5579555991fdSmrg *-64|*"-64 ") libmagic=64-bit;; 5580555991fdSmrg *) libmagic=never-match;; 5581555991fdSmrg esac 5582555991fdSmrg lt_cv_deplibs_check_method=pass_all 5583555991fdSmrg ;; 5584126a8a12Smrg 5585555991fdSmrg# This must be Linux ELF. 5586555991fdSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 5587555991fdSmrg lt_cv_deplibs_check_method=pass_all 5588555991fdSmrg ;; 5589126a8a12Smrg 5590555991fdSmrgnetbsd*) 5591555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5592555991fdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5593555991fdSmrg else 5594555991fdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5595555991fdSmrg fi 5596555991fdSmrg ;; 5597555991fdSmrg 5598555991fdSmrgnewos6*) 5599555991fdSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5600555991fdSmrg lt_cv_file_magic_cmd=/usr/bin/file 5601555991fdSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 5602555991fdSmrg ;; 5603126a8a12Smrg 5604555991fdSmrg*nto* | *qnx*) 5605555991fdSmrg lt_cv_deplibs_check_method=pass_all 5606555991fdSmrg ;; 5607126a8a12Smrg 5608555991fdSmrgopenbsd*) 5609555991fdSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5610555991fdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5611555991fdSmrg else 5612555991fdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5613555991fdSmrg fi 5614555991fdSmrg ;; 5615126a8a12Smrg 5616555991fdSmrgosf3* | osf4* | osf5*) 5617555991fdSmrg lt_cv_deplibs_check_method=pass_all 5618555991fdSmrg ;; 5619d656433aSmrg 5620555991fdSmrgrdos*) 5621555991fdSmrg lt_cv_deplibs_check_method=pass_all 5622555991fdSmrg ;; 5623126a8a12Smrg 5624555991fdSmrgsolaris*) 5625555991fdSmrg lt_cv_deplibs_check_method=pass_all 5626555991fdSmrg ;; 5627126a8a12Smrg 5628555991fdSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5629555991fdSmrg lt_cv_deplibs_check_method=pass_all 5630555991fdSmrg ;; 5631d656433aSmrg 5632555991fdSmrgsysv4 | sysv4.3*) 5633555991fdSmrg case $host_vendor in 5634555991fdSmrg motorola) 5635555991fdSmrg 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]]' 5636555991fdSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 5637555991fdSmrg ;; 5638555991fdSmrg ncr) 5639555991fdSmrg lt_cv_deplibs_check_method=pass_all 5640555991fdSmrg ;; 5641555991fdSmrg sequent) 5642555991fdSmrg lt_cv_file_magic_cmd='/bin/file' 5643555991fdSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5644555991fdSmrg ;; 5645555991fdSmrg sni) 5646555991fdSmrg lt_cv_file_magic_cmd='/bin/file' 5647555991fdSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5648555991fdSmrg lt_cv_file_magic_test_file=/lib/libc.so 5649555991fdSmrg ;; 5650555991fdSmrg siemens) 5651555991fdSmrg lt_cv_deplibs_check_method=pass_all 5652555991fdSmrg ;; 5653555991fdSmrg pc) 5654555991fdSmrg lt_cv_deplibs_check_method=pass_all 5655555991fdSmrg ;; 5656555991fdSmrg esac 5657555991fdSmrg ;; 5658d656433aSmrg 5659555991fdSmrgtpf*) 5660555991fdSmrg lt_cv_deplibs_check_method=pass_all 5661555991fdSmrg ;; 5662555991fdSmrgesac 5663555991fdSmrg]) 5664555991fdSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 5665555991fdSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 5666555991fdSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5667d656433aSmrg 5668555991fdSmrg_LT_DECL([], [deplibs_check_method], [1], 5669555991fdSmrg [Method to check whether dependent libraries are shared objects]) 5670555991fdSmrg_LT_DECL([], [file_magic_cmd], [1], 5671555991fdSmrg [Command to use when deplibs_check_method == "file_magic"]) 5672555991fdSmrg])# _LT_CHECK_MAGIC_METHOD 5673d656433aSmrg 5674d656433aSmrg 5675555991fdSmrg# LT_PATH_NM 5676555991fdSmrg# ---------- 5677555991fdSmrg# find the pathname to a BSD- or MS-compatible name lister 5678555991fdSmrgAC_DEFUN([LT_PATH_NM], 5679555991fdSmrg[AC_REQUIRE([AC_PROG_CC])dnl 5680555991fdSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5681555991fdSmrg[if test -n "$NM"; then 5682555991fdSmrg # Let the user override the test. 5683555991fdSmrg lt_cv_path_NM="$NM" 5684555991fdSmrgelse 5685555991fdSmrg lt_nm_to_check="${ac_tool_prefix}nm" 5686555991fdSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5687555991fdSmrg lt_nm_to_check="$lt_nm_to_check nm" 5688126a8a12Smrg fi 5689555991fdSmrg for lt_tmp_nm in $lt_nm_to_check; do 5690555991fdSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5691555991fdSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5692555991fdSmrg IFS="$lt_save_ifs" 5693555991fdSmrg test -z "$ac_dir" && ac_dir=. 5694555991fdSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 5695555991fdSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 5696555991fdSmrg # Check to see if the nm accepts a BSD-compat flag. 5697555991fdSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 5698555991fdSmrg # nm: unknown option "B" ignored 5699555991fdSmrg # Tru64's nm complains that /dev/null is an invalid object file 5700555991fdSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 5701555991fdSmrg */dev/null* | *'Invalid file or object type'*) 5702555991fdSmrg lt_cv_path_NM="$tmp_nm -B" 5703555991fdSmrg break 5704555991fdSmrg ;; 5705555991fdSmrg *) 5706555991fdSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5707555991fdSmrg */dev/null*) 5708555991fdSmrg lt_cv_path_NM="$tmp_nm -p" 5709555991fdSmrg break 5710555991fdSmrg ;; 5711555991fdSmrg *) 5712555991fdSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5713555991fdSmrg continue # so that we can try to find one that supports BSD flags 5714555991fdSmrg ;; 5715555991fdSmrg esac 5716555991fdSmrg ;; 5717555991fdSmrg esac 5718555991fdSmrg fi 5719555991fdSmrg done 5720555991fdSmrg IFS="$lt_save_ifs" 5721555991fdSmrg done 5722555991fdSmrg : ${lt_cv_path_NM=no} 5723555991fdSmrgfi]) 5724555991fdSmrgif test "$lt_cv_path_NM" != "no"; then 5725555991fdSmrg NM="$lt_cv_path_NM" 5726555991fdSmrgelse 5727555991fdSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 5728555991fdSmrg if test -n "$DUMPBIN"; then : 5729555991fdSmrg # Let the user override the test. 5730d656433aSmrg else 5731555991fdSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 5732555991fdSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 5733555991fdSmrg *COFF*) 5734555991fdSmrg DUMPBIN="$DUMPBIN -symbols" 5735555991fdSmrg ;; 5736555991fdSmrg *) 5737555991fdSmrg DUMPBIN=: 5738555991fdSmrg ;; 5739555991fdSmrg esac 5740126a8a12Smrg fi 5741555991fdSmrg AC_SUBST([DUMPBIN]) 5742555991fdSmrg if test "$DUMPBIN" != ":"; then 5743555991fdSmrg NM="$DUMPBIN" 5744555991fdSmrg fi 5745555991fdSmrgfi 5746555991fdSmrgtest -z "$NM" && NM=nm 5747555991fdSmrgAC_SUBST([NM]) 5748555991fdSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5749126a8a12Smrg 5750555991fdSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5751555991fdSmrg [lt_cv_nm_interface="BSD nm" 5752555991fdSmrg echo "int some_variable = 0;" > conftest.$ac_ext 5753555991fdSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5754555991fdSmrg (eval "$ac_compile" 2>conftest.err) 5755555991fdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5756555991fdSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5757555991fdSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5758555991fdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5759555991fdSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 5760555991fdSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 5761555991fdSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5762555991fdSmrg lt_cv_nm_interface="MS dumpbin" 5763555991fdSmrg fi 5764555991fdSmrg rm -f conftest*]) 5765555991fdSmrg])# LT_PATH_NM 5766555991fdSmrg 5767555991fdSmrg# Old names: 5768555991fdSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5769555991fdSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5770555991fdSmrgdnl aclocal-1.4 backwards compatibility: 5771555991fdSmrgdnl AC_DEFUN([AM_PROG_NM], []) 5772555991fdSmrgdnl AC_DEFUN([AC_PROG_NM], []) 5773555991fdSmrg 5774555991fdSmrg 5775555991fdSmrg# LT_LIB_M 5776555991fdSmrg# -------- 5777555991fdSmrg# check for math library 5778555991fdSmrgAC_DEFUN([LT_LIB_M], 5779555991fdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5780555991fdSmrgLIBM= 5781555991fdSmrgcase $host in 5782555991fdSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 5783555991fdSmrg # These system don't have libm, or don't need it 5784555991fdSmrg ;; 5785555991fdSmrg*-ncr-sysv4.3*) 5786555991fdSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 5787555991fdSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 5788555991fdSmrg ;; 5789555991fdSmrg*) 5790555991fdSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 5791555991fdSmrg ;; 5792555991fdSmrgesac 5793555991fdSmrgAC_SUBST([LIBM]) 5794555991fdSmrg])# LT_LIB_M 5795555991fdSmrg 5796555991fdSmrg# Old name: 5797555991fdSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5798555991fdSmrgdnl aclocal-1.4 backwards compatibility: 5799555991fdSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 5800126a8a12Smrg 5801126a8a12Smrg 5802555991fdSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 5803555991fdSmrg# ------------------------------- 5804555991fdSmrgm4_defun([_LT_COMPILER_NO_RTTI], 5805555991fdSmrg[m4_require([_LT_TAG_COMPILER])dnl 5806126a8a12Smrg 5807555991fdSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5808126a8a12Smrg 5809555991fdSmrgif test "$GCC" = yes; then 5810555991fdSmrg case $cc_basename in 5811555991fdSmrg nvcc*) 5812555991fdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 5813555991fdSmrg *) 5814555991fdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 5815555991fdSmrg esac 5816126a8a12Smrg 5817555991fdSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5818555991fdSmrg lt_cv_prog_compiler_rtti_exceptions, 5819555991fdSmrg [-fno-rtti -fno-exceptions], [], 5820555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5821555991fdSmrgfi 5822555991fdSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5823555991fdSmrg [Compiler flag to turn off builtin functions]) 5824555991fdSmrg])# _LT_COMPILER_NO_RTTI 5825126a8a12Smrg 5826d656433aSmrg 5827555991fdSmrg# _LT_CMD_GLOBAL_SYMBOLS 5828555991fdSmrg# ---------------------- 5829555991fdSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5830555991fdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5831555991fdSmrgAC_REQUIRE([AC_PROG_CC])dnl 5832555991fdSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5833555991fdSmrgAC_REQUIRE([LT_PATH_NM])dnl 5834555991fdSmrgAC_REQUIRE([LT_PATH_LD])dnl 5835555991fdSmrgm4_require([_LT_DECL_SED])dnl 5836555991fdSmrgm4_require([_LT_DECL_EGREP])dnl 5837555991fdSmrgm4_require([_LT_TAG_COMPILER])dnl 5838126a8a12Smrg 5839555991fdSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5840555991fdSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5841555991fdSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5842555991fdSmrg[ 5843555991fdSmrg# These are sane defaults that work on at least a few old systems. 5844555991fdSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5845126a8a12Smrg 5846555991fdSmrg# Character class describing NM global symbol codes. 5847555991fdSmrgsymcode='[[BCDEGRST]]' 5848126a8a12Smrg 5849555991fdSmrg# Regexp to match symbols that can be accessed directly from C. 5850555991fdSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5851d656433aSmrg 5852555991fdSmrg# Define system-specific variables. 5853555991fdSmrgcase $host_os in 5854555991fdSmrgaix*) 5855555991fdSmrg symcode='[[BCDT]]' 5856555991fdSmrg ;; 5857555991fdSmrgcygwin* | mingw* | pw32* | cegcc*) 5858555991fdSmrg symcode='[[ABCDGISTW]]' 5859555991fdSmrg ;; 5860555991fdSmrghpux*) 5861555991fdSmrg if test "$host_cpu" = ia64; then 5862555991fdSmrg symcode='[[ABCDEGRST]]' 5863555991fdSmrg fi 5864555991fdSmrg ;; 5865555991fdSmrgirix* | nonstopux*) 5866555991fdSmrg symcode='[[BCDEGRST]]' 5867555991fdSmrg ;; 5868555991fdSmrgosf*) 5869555991fdSmrg symcode='[[BCDEGQRST]]' 5870555991fdSmrg ;; 5871555991fdSmrgsolaris*) 5872555991fdSmrg symcode='[[BDRT]]' 5873555991fdSmrg ;; 5874555991fdSmrgsco3.2v5*) 5875555991fdSmrg symcode='[[DT]]' 5876555991fdSmrg ;; 5877555991fdSmrgsysv4.2uw2*) 5878555991fdSmrg symcode='[[DT]]' 5879555991fdSmrg ;; 5880555991fdSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5881555991fdSmrg symcode='[[ABDT]]' 5882555991fdSmrg ;; 5883555991fdSmrgsysv4) 5884555991fdSmrg symcode='[[DFNSTU]]' 5885555991fdSmrg ;; 5886555991fdSmrgesac 5887126a8a12Smrg 5888555991fdSmrg# If we're using GNU nm, then use its standard symbol codes. 5889555991fdSmrgcase `$NM -V 2>&1` in 5890555991fdSmrg*GNU* | *'with BFD'*) 5891555991fdSmrg symcode='[[ABCDGIRSTW]]' ;; 5892555991fdSmrgesac 5893126a8a12Smrg 5894555991fdSmrg# Transform an extracted symbol line into a proper C declaration. 5895555991fdSmrg# Some systems (esp. on ia64) link data and code symbols differently, 5896555991fdSmrg# so use this general approach. 5897555991fdSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5898d656433aSmrg 5899555991fdSmrg# Transform an extracted symbol line into symbol name and symbol address 5900555991fdSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5901555991fdSmrglt_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'" 5902d656433aSmrg 5903555991fdSmrg# Handle CRLF in mingw tool chain 5904555991fdSmrgopt_cr= 5905555991fdSmrgcase $build_os in 5906555991fdSmrgmingw*) 5907555991fdSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5908555991fdSmrg ;; 5909555991fdSmrgesac 5910126a8a12Smrg 5911555991fdSmrg# Try without a prefix underscore, then with it. 5912555991fdSmrgfor ac_symprfx in "" "_"; do 5913d656433aSmrg 5914555991fdSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5915555991fdSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 5916555991fdSmrg 5917555991fdSmrg # Write the raw and C identifiers. 5918555991fdSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5919555991fdSmrg # Fake it for dumpbin and say T for any non-static function 5920555991fdSmrg # and D for any global variable. 5921555991fdSmrg # Also find C++ and __fastcall symbols from MSVC++, 5922555991fdSmrg # which start with @ or ?. 5923555991fdSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5924555991fdSmrg" {last_section=section; section=\$ 3};"\ 5925555991fdSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5926555991fdSmrg" \$ 0!~/External *\|/{next};"\ 5927555991fdSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5928555991fdSmrg" {if(hide[section]) next};"\ 5929555991fdSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5930555991fdSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5931555991fdSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5932555991fdSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5933555991fdSmrg" ' prfx=^$ac_symprfx]" 5934555991fdSmrg else 5935555991fdSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5936555991fdSmrg fi 5937d656433aSmrg 5938555991fdSmrg # Check to see that the pipe works correctly. 5939555991fdSmrg pipe_works=no 5940d656433aSmrg 5941555991fdSmrg rm -f conftest* 5942555991fdSmrg cat > conftest.$ac_ext <<_LT_EOF 5943555991fdSmrg#ifdef __cplusplus 5944555991fdSmrgextern "C" { 5945555991fdSmrg#endif 5946555991fdSmrgchar nm_test_var; 5947555991fdSmrgvoid nm_test_func(void); 5948555991fdSmrgvoid nm_test_func(void){} 5949555991fdSmrg#ifdef __cplusplus 5950555991fdSmrg} 5951555991fdSmrg#endif 5952555991fdSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 5953555991fdSmrg_LT_EOF 5954d656433aSmrg 5955555991fdSmrg if AC_TRY_EVAL(ac_compile); then 5956555991fdSmrg # Now try to grab the symbols. 5957555991fdSmrg nlist=conftest.nm 5958555991fdSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 5959555991fdSmrg # Try sorting and uniquifying the output. 5960555991fdSmrg if sort "$nlist" | uniq > "$nlist"T; then 5961555991fdSmrg mv -f "$nlist"T "$nlist" 5962555991fdSmrg else 5963555991fdSmrg rm -f "$nlist"T 5964555991fdSmrg fi 5965d656433aSmrg 5966555991fdSmrg # Make sure that we snagged all the symbols we need. 5967555991fdSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5968555991fdSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5969555991fdSmrg cat <<_LT_EOF > conftest.$ac_ext 5970555991fdSmrg#ifdef __cplusplus 5971555991fdSmrgextern "C" { 5972555991fdSmrg#endif 5973d656433aSmrg 5974555991fdSmrg_LT_EOF 5975555991fdSmrg # Now generate the symbol file. 5976555991fdSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 5977d656433aSmrg 5978555991fdSmrg cat <<_LT_EOF >> conftest.$ac_ext 5979d656433aSmrg 5980555991fdSmrg/* The mapping between symbol names and symbols. */ 5981555991fdSmrgconst struct { 5982555991fdSmrg const char *name; 5983555991fdSmrg void *address; 5984555991fdSmrg} 5985555991fdSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 5986555991fdSmrg{ 5987555991fdSmrg { "@PROGRAM@", (void *) 0 }, 5988555991fdSmrg_LT_EOF 5989555991fdSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 5990555991fdSmrg cat <<\_LT_EOF >> conftest.$ac_ext 5991555991fdSmrg {0, (void *) 0} 5992555991fdSmrg}; 5993d656433aSmrg 5994555991fdSmrg/* This works around a problem in FreeBSD linker */ 5995555991fdSmrg#ifdef FREEBSD_WORKAROUND 5996555991fdSmrgstatic const void *lt_preloaded_setup() { 5997555991fdSmrg return lt__PROGRAM__LTX_preloaded_symbols; 5998555991fdSmrg} 5999555991fdSmrg#endif 6000d656433aSmrg 6001555991fdSmrg#ifdef __cplusplus 6002555991fdSmrg} 6003555991fdSmrg#endif 6004555991fdSmrg_LT_EOF 6005555991fdSmrg # Now try linking the two files. 6006555991fdSmrg mv conftest.$ac_objext conftstm.$ac_objext 6007555991fdSmrg lt_save_LIBS="$LIBS" 6008555991fdSmrg lt_save_CFLAGS="$CFLAGS" 6009555991fdSmrg LIBS="conftstm.$ac_objext" 6010555991fdSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6011555991fdSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6012555991fdSmrg pipe_works=yes 6013555991fdSmrg fi 6014555991fdSmrg LIBS="$lt_save_LIBS" 6015555991fdSmrg CFLAGS="$lt_save_CFLAGS" 6016555991fdSmrg else 6017555991fdSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6018555991fdSmrg fi 6019555991fdSmrg else 6020555991fdSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6021555991fdSmrg fi 6022555991fdSmrg else 6023555991fdSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6024555991fdSmrg fi 6025555991fdSmrg else 6026555991fdSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6027555991fdSmrg cat conftest.$ac_ext >&5 6028555991fdSmrg fi 6029555991fdSmrg rm -rf conftest* conftst* 6030d656433aSmrg 6031555991fdSmrg # Do not use the global_symbol_pipe unless it works. 6032555991fdSmrg if test "$pipe_works" = yes; then 6033555991fdSmrg break 6034555991fdSmrg else 6035555991fdSmrg lt_cv_sys_global_symbol_pipe= 6036555991fdSmrg fi 6037555991fdSmrgdone 6038555991fdSmrg]) 6039555991fdSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 6040555991fdSmrg lt_cv_sys_global_symbol_to_cdecl= 6041555991fdSmrgfi 6042555991fdSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6043555991fdSmrg AC_MSG_RESULT(failed) 6044555991fdSmrgelse 6045555991fdSmrg AC_MSG_RESULT(ok) 6046555991fdSmrgfi 6047d656433aSmrg 6048555991fdSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 6049555991fdSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 6050555991fdSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 6051555991fdSmrg [Transform the output of nm in a proper C declaration]) 6052555991fdSmrg_LT_DECL([global_symbol_to_c_name_address], 6053555991fdSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 6054555991fdSmrg [Transform the output of nm in a C name address pair]) 6055555991fdSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 6056555991fdSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 6057555991fdSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 6058555991fdSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 6059d656433aSmrg 6060d656433aSmrg 6061555991fdSmrg# _LT_COMPILER_PIC([TAGNAME]) 6062555991fdSmrg# --------------------------- 6063555991fdSmrgm4_defun([_LT_COMPILER_PIC], 6064555991fdSmrg[m4_require([_LT_TAG_COMPILER])dnl 6065555991fdSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 6066555991fdSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6067555991fdSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 6068555991fdSmrg 6069555991fdSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 6070555991fdSmrgm4_if([$1], [CXX], [ 6071555991fdSmrg # C++ specific cases for pic, static, wl, etc. 6072555991fdSmrg if test "$GXX" = yes; then 6073555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6074555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6075555991fdSmrg 6076555991fdSmrg case $host_os in 6077555991fdSmrg aix*) 6078555991fdSmrg # All AIX code is PIC. 6079555991fdSmrg if test "$host_cpu" = ia64; then 6080555991fdSmrg # AIX 5 now supports IA64 processor 6081555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6082555991fdSmrg fi 6083555991fdSmrg ;; 6084d656433aSmrg 6085555991fdSmrg amigaos*) 6086555991fdSmrg case $host_cpu in 6087555991fdSmrg powerpc) 6088555991fdSmrg # see comment about AmigaOS4 .so support 6089555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6090555991fdSmrg ;; 6091555991fdSmrg m68k) 6092555991fdSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6093555991fdSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6094555991fdSmrg # like `-m68040'. 6095555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6096d656433aSmrg ;; 6097555991fdSmrg esac 6098555991fdSmrg ;; 6099d656433aSmrg 6100555991fdSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6101555991fdSmrg # PIC is the default for these OSes. 6102555991fdSmrg ;; 6103555991fdSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 6104555991fdSmrg # This hack is so that the source file can tell whether it is being 6105555991fdSmrg # built for inclusion in a dll (and should export symbols for example). 6106555991fdSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6107555991fdSmrg # (--disable-auto-import) libraries 6108555991fdSmrg m4_if([$1], [GCJ], [], 6109555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6110555991fdSmrg ;; 6111555991fdSmrg darwin* | rhapsody*) 6112555991fdSmrg # PIC is the default on this platform 6113555991fdSmrg # Common symbols not allowed in MH_DYLIB files 6114555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6115555991fdSmrg ;; 6116555991fdSmrg *djgpp*) 6117555991fdSmrg # DJGPP does not support shared libraries at all 6118555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6119555991fdSmrg ;; 6120555991fdSmrg haiku*) 6121555991fdSmrg # PIC is the default for Haiku. 6122555991fdSmrg # The "-static" flag exists, but is broken. 6123555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6124555991fdSmrg ;; 6125555991fdSmrg interix[[3-9]]*) 6126555991fdSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6127555991fdSmrg # Instead, we relocate shared libraries at runtime. 6128555991fdSmrg ;; 6129555991fdSmrg sysv4*MP*) 6130555991fdSmrg if test -d /usr/nec; then 6131555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6132555991fdSmrg fi 6133555991fdSmrg ;; 6134555991fdSmrg hpux*) 6135555991fdSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6136555991fdSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6137555991fdSmrg # sets the default TLS model and affects inlining. 6138555991fdSmrg case $host_cpu in 6139555991fdSmrg hppa*64*) 6140126a8a12Smrg ;; 6141555991fdSmrg *) 6142555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6143555991fdSmrg ;; 6144555991fdSmrg esac 6145555991fdSmrg ;; 6146555991fdSmrg *qnx* | *nto*) 6147555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6148555991fdSmrg # it will coredump. 6149555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6150555991fdSmrg ;; 6151555991fdSmrg *) 6152555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6153555991fdSmrg ;; 6154555991fdSmrg esac 6155555991fdSmrg else 6156555991fdSmrg case $host_os in 6157555991fdSmrg aix[[4-9]]*) 6158555991fdSmrg # All AIX code is PIC. 6159555991fdSmrg if test "$host_cpu" = ia64; then 6160555991fdSmrg # AIX 5 now supports IA64 processor 6161555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6162555991fdSmrg else 6163555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6164555991fdSmrg fi 6165555991fdSmrg ;; 6166555991fdSmrg chorus*) 6167555991fdSmrg case $cc_basename in 6168555991fdSmrg cxch68*) 6169555991fdSmrg # Green Hills C++ Compiler 6170555991fdSmrg # _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" 6171555991fdSmrg ;; 6172555991fdSmrg esac 6173555991fdSmrg ;; 6174555991fdSmrg dgux*) 6175555991fdSmrg case $cc_basename in 6176555991fdSmrg ec++*) 6177555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6178126a8a12Smrg ;; 6179555991fdSmrg ghcx*) 6180555991fdSmrg # Green Hills C++ Compiler 6181555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6182126a8a12Smrg ;; 6183555991fdSmrg *) 6184126a8a12Smrg ;; 6185555991fdSmrg esac 6186555991fdSmrg ;; 6187555991fdSmrg freebsd* | dragonfly*) 6188555991fdSmrg # FreeBSD uses GNU C++ 6189555991fdSmrg ;; 6190555991fdSmrg hpux9* | hpux10* | hpux11*) 6191555991fdSmrg case $cc_basename in 6192555991fdSmrg CC*) 6193555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6194555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6195555991fdSmrg if test "$host_cpu" != ia64; then 6196555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6197555991fdSmrg fi 6198126a8a12Smrg ;; 6199555991fdSmrg aCC*) 6200555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6201555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6202555991fdSmrg case $host_cpu in 6203555991fdSmrg hppa*64*|ia64*) 6204555991fdSmrg # +Z the default 6205d656433aSmrg ;; 6206555991fdSmrg *) 6207555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6208d656433aSmrg ;; 6209d656433aSmrg esac 6210126a8a12Smrg ;; 6211126a8a12Smrg *) 6212126a8a12Smrg ;; 6213126a8a12Smrg esac 6214126a8a12Smrg ;; 6215555991fdSmrg interix*) 6216555991fdSmrg # This is c89, which is MS Visual C++ (no shared libs) 6217555991fdSmrg # Anyone wants to do a port? 6218126a8a12Smrg ;; 6219555991fdSmrg irix5* | irix6* | nonstopux*) 6220555991fdSmrg case $cc_basename in 6221555991fdSmrg CC*) 6222555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6223555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6224555991fdSmrg # CC pic flag -KPIC is the default. 6225126a8a12Smrg ;; 6226126a8a12Smrg *) 6227126a8a12Smrg ;; 6228126a8a12Smrg esac 6229126a8a12Smrg ;; 6230555991fdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6231555991fdSmrg case $cc_basename in 6232555991fdSmrg KCC*) 6233555991fdSmrg # KAI C++ Compiler 6234555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6235555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6236126a8a12Smrg ;; 6237555991fdSmrg ecpc* ) 6238555991fdSmrg # old Intel C++ for x86_64 which still supported -KPIC. 6239555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6240555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6241555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6242126a8a12Smrg ;; 6243555991fdSmrg icpc* ) 6244555991fdSmrg # Intel C++, used to be incompatible with GCC. 6245555991fdSmrg # ICC 10 doesn't accept -KPIC any more. 6246555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6247555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6248555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6249555991fdSmrg ;; 6250555991fdSmrg pgCC* | pgcpp*) 6251555991fdSmrg # Portland Group C++ compiler 6252555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6253555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6254555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6255555991fdSmrg ;; 6256555991fdSmrg cxx*) 6257555991fdSmrg # Compaq C++ 6258555991fdSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6259555991fdSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6260555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6261555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6262555991fdSmrg ;; 6263555991fdSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6264555991fdSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 6265555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6266555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6267555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6268126a8a12Smrg ;; 6269126a8a12Smrg *) 6270555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 6271555991fdSmrg *Sun\ C*) 6272555991fdSmrg # Sun C++ 5.9 6273555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6274555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6275555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6276555991fdSmrg ;; 6277555991fdSmrg esac 6278126a8a12Smrg ;; 6279555991fdSmrg esac 6280555991fdSmrg ;; 6281555991fdSmrg lynxos*) 6282555991fdSmrg ;; 6283555991fdSmrg m88k*) 6284555991fdSmrg ;; 6285555991fdSmrg mvs*) 6286555991fdSmrg case $cc_basename in 6287555991fdSmrg cxx*) 6288555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6289555991fdSmrg ;; 6290555991fdSmrg *) 6291555991fdSmrg ;; 6292555991fdSmrg esac 6293555991fdSmrg ;; 6294555991fdSmrg netbsd*) 6295555991fdSmrg ;; 6296555991fdSmrg *qnx* | *nto*) 6297555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6298555991fdSmrg # it will coredump. 6299555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6300d656433aSmrg ;; 6301555991fdSmrg osf3* | osf4* | osf5*) 6302555991fdSmrg case $cc_basename in 6303555991fdSmrg KCC*) 6304555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6305126a8a12Smrg ;; 6306555991fdSmrg RCC*) 6307555991fdSmrg # Rational C++ 2.4.1 6308555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6309126a8a12Smrg ;; 6310555991fdSmrg cxx*) 6311555991fdSmrg # Digital/Compaq C++ 6312555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6313555991fdSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6314555991fdSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6315555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6316555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6317d656433aSmrg ;; 6318555991fdSmrg *) 6319555991fdSmrg ;; 6320555991fdSmrg esac 6321555991fdSmrg ;; 6322555991fdSmrg psos*) 6323555991fdSmrg ;; 6324d656433aSmrg solaris*) 6325555991fdSmrg case $cc_basename in 6326555991fdSmrg CC* | sunCC*) 6327d656433aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6328555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6329555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6330555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6331d656433aSmrg ;; 6332555991fdSmrg gcx*) 6333d656433aSmrg # Green Hills C++ Compiler 6334555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6335d656433aSmrg ;; 6336555991fdSmrg *) 6337d656433aSmrg ;; 6338555991fdSmrg esac 6339555991fdSmrg ;; 6340555991fdSmrg sunos4*) 6341d656433aSmrg case $cc_basename in 6342555991fdSmrg CC*) 6343555991fdSmrg # Sun C++ 4.x 6344555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6345555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6346555991fdSmrg ;; 6347555991fdSmrg lcc*) 6348555991fdSmrg # Lucid 6349555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6350d656433aSmrg ;; 6351d656433aSmrg *) 6352d656433aSmrg ;; 6353d656433aSmrg esac 6354555991fdSmrg ;; 6355555991fdSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6356555991fdSmrg case $cc_basename in 6357555991fdSmrg CC*) 6358555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6359555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6360555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6361555991fdSmrg ;; 6362555991fdSmrg esac 6363555991fdSmrg ;; 6364d656433aSmrg tandem*) 6365555991fdSmrg case $cc_basename in 6366555991fdSmrg NCC*) 6367d656433aSmrg # NonStop-UX NCC 3.20 6368555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6369d656433aSmrg ;; 6370555991fdSmrg *) 6371d656433aSmrg ;; 6372555991fdSmrg esac 6373555991fdSmrg ;; 6374555991fdSmrg vxworks*) 6375555991fdSmrg ;; 6376555991fdSmrg *) 6377555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6378555991fdSmrg ;; 6379555991fdSmrg esac 6380555991fdSmrg fi 6381555991fdSmrg], 6382555991fdSmrg[ 6383555991fdSmrg if test "$GCC" = yes; then 6384555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6385555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6386555991fdSmrg 6387555991fdSmrg case $host_os in 6388555991fdSmrg aix*) 6389555991fdSmrg # All AIX code is PIC. 6390555991fdSmrg if test "$host_cpu" = ia64; then 6391555991fdSmrg # AIX 5 now supports IA64 processor 6392555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6393555991fdSmrg fi 6394555991fdSmrg ;; 6395555991fdSmrg 6396555991fdSmrg amigaos*) 6397555991fdSmrg case $host_cpu in 6398555991fdSmrg powerpc) 6399555991fdSmrg # see comment about AmigaOS4 .so support 6400555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6401555991fdSmrg ;; 6402555991fdSmrg m68k) 6403555991fdSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6404555991fdSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6405555991fdSmrg # like `-m68040'. 6406555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6407d656433aSmrg ;; 6408555991fdSmrg esac 6409555991fdSmrg ;; 6410555991fdSmrg 6411555991fdSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6412555991fdSmrg # PIC is the default for these OSes. 6413555991fdSmrg ;; 6414126a8a12Smrg 6415555991fdSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6416555991fdSmrg # This hack is so that the source file can tell whether it is being 6417555991fdSmrg # built for inclusion in a dll (and should export symbols for example). 6418555991fdSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6419555991fdSmrg # (--disable-auto-import) libraries 6420555991fdSmrg m4_if([$1], [GCJ], [], 6421555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6422555991fdSmrg ;; 6423126a8a12Smrg 6424555991fdSmrg darwin* | rhapsody*) 6425555991fdSmrg # PIC is the default on this platform 6426555991fdSmrg # Common symbols not allowed in MH_DYLIB files 6427555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6428555991fdSmrg ;; 6429126a8a12Smrg 6430555991fdSmrg haiku*) 6431555991fdSmrg # PIC is the default for Haiku. 6432555991fdSmrg # The "-static" flag exists, but is broken. 6433555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6434555991fdSmrg ;; 6435d656433aSmrg 6436555991fdSmrg hpux*) 6437555991fdSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6438555991fdSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6439555991fdSmrg # sets the default TLS model and affects inlining. 6440555991fdSmrg case $host_cpu in 6441555991fdSmrg hppa*64*) 6442555991fdSmrg # +Z the default 6443555991fdSmrg ;; 6444555991fdSmrg *) 6445555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6446555991fdSmrg ;; 6447555991fdSmrg esac 6448555991fdSmrg ;; 6449d656433aSmrg 6450555991fdSmrg interix[[3-9]]*) 6451555991fdSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6452555991fdSmrg # Instead, we relocate shared libraries at runtime. 6453555991fdSmrg ;; 6454d656433aSmrg 6455555991fdSmrg msdosdjgpp*) 6456555991fdSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6457555991fdSmrg # on systems that don't support them. 6458555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6459555991fdSmrg enable_shared=no 6460555991fdSmrg ;; 6461d656433aSmrg 6462555991fdSmrg *nto* | *qnx*) 6463555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6464555991fdSmrg # it will coredump. 6465555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6466555991fdSmrg ;; 6467126a8a12Smrg 6468555991fdSmrg sysv4*MP*) 6469555991fdSmrg if test -d /usr/nec; then 6470555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6471555991fdSmrg fi 6472555991fdSmrg ;; 6473126a8a12Smrg 6474555991fdSmrg *) 6475555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6476555991fdSmrg ;; 6477555991fdSmrg esac 6478126a8a12Smrg 6479555991fdSmrg case $cc_basename in 6480555991fdSmrg nvcc*) # Cuda Compiler Driver 2.2 6481555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6482555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 6483555991fdSmrg ;; 6484555991fdSmrg esac 6485555991fdSmrg else 6486555991fdSmrg # PORTME Check for flag to pass linker flags through the system compiler. 6487555991fdSmrg case $host_os in 6488555991fdSmrg aix*) 6489555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6490555991fdSmrg if test "$host_cpu" = ia64; then 6491555991fdSmrg # AIX 5 now supports IA64 processor 6492555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6493555991fdSmrg else 6494555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6495555991fdSmrg fi 6496555991fdSmrg ;; 6497126a8a12Smrg 6498555991fdSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6499555991fdSmrg # This hack is so that the source file can tell whether it is being 6500555991fdSmrg # built for inclusion in a dll (and should export symbols for example). 6501555991fdSmrg m4_if([$1], [GCJ], [], 6502555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6503555991fdSmrg ;; 6504126a8a12Smrg 6505555991fdSmrg hpux9* | hpux10* | hpux11*) 6506555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6507555991fdSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6508555991fdSmrg # not for PA HP-UX. 6509555991fdSmrg case $host_cpu in 6510555991fdSmrg hppa*64*|ia64*) 6511555991fdSmrg # +Z the default 6512555991fdSmrg ;; 6513555991fdSmrg *) 6514555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6515555991fdSmrg ;; 6516555991fdSmrg esac 6517555991fdSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6518555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6519555991fdSmrg ;; 6520126a8a12Smrg 6521555991fdSmrg irix5* | irix6* | nonstopux*) 6522555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6523555991fdSmrg # PIC (with -KPIC) is the default. 6524555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6525555991fdSmrg ;; 6526126a8a12Smrg 6527555991fdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6528555991fdSmrg case $cc_basename in 6529555991fdSmrg # old Intel for x86_64 which still supported -KPIC. 6530555991fdSmrg ecc*) 6531555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6532555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6533555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6534555991fdSmrg ;; 6535555991fdSmrg # icc used to be incompatible with GCC. 6536555991fdSmrg # ICC 10 doesn't accept -KPIC any more. 6537555991fdSmrg icc* | ifort*) 6538555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6539555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6540555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6541555991fdSmrg ;; 6542555991fdSmrg # Lahey Fortran 8.1. 6543555991fdSmrg lf95*) 6544555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6545555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6546555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6547555991fdSmrg ;; 6548555991fdSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6549555991fdSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 6550555991fdSmrg # which looks to be a dead project) 6551555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6552555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6553555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6554555991fdSmrg ;; 6555555991fdSmrg ccc*) 6556555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6557555991fdSmrg # All Alpha code is PIC. 6558555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6559555991fdSmrg ;; 6560555991fdSmrg xl* | bgxl* | bgf* | mpixl*) 6561555991fdSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 6562555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6563555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6564555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6565555991fdSmrg ;; 6566555991fdSmrg *) 6567555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 6568555991fdSmrg *Sun\ F* | *Sun*Fortran*) 6569555991fdSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6570555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6571555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6572555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6573555991fdSmrg ;; 6574555991fdSmrg *Sun\ C*) 6575555991fdSmrg # Sun C 5.9 6576555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6577555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6578555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6579555991fdSmrg ;; 6580555991fdSmrg esac 6581555991fdSmrg ;; 6582555991fdSmrg esac 6583555991fdSmrg ;; 6584126a8a12Smrg 6585555991fdSmrg newsos6) 6586555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6587555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6588555991fdSmrg ;; 6589126a8a12Smrg 6590555991fdSmrg *nto* | *qnx*) 6591555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6592555991fdSmrg # it will coredump. 6593555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6594555991fdSmrg ;; 6595126a8a12Smrg 6596555991fdSmrg osf3* | osf4* | osf5*) 6597555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6598555991fdSmrg # All OSF/1 code is PIC. 6599555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6600555991fdSmrg ;; 6601126a8a12Smrg 6602555991fdSmrg rdos*) 6603555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6604555991fdSmrg ;; 6605126a8a12Smrg 6606555991fdSmrg solaris*) 6607555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6608555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6609555991fdSmrg case $cc_basename in 6610555991fdSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 6611555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6612555991fdSmrg *) 6613555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6614555991fdSmrg esac 6615555991fdSmrg ;; 6616126a8a12Smrg 6617555991fdSmrg sunos4*) 6618555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6619555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6620555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6621555991fdSmrg ;; 6622126a8a12Smrg 6623555991fdSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 6624555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6625555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6626555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6627555991fdSmrg ;; 6628126a8a12Smrg 6629555991fdSmrg sysv4*MP*) 6630555991fdSmrg if test -d /usr/nec ;then 6631555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6632555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6633555991fdSmrg fi 6634555991fdSmrg ;; 6635126a8a12Smrg 6636555991fdSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6637555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6638555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6639555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6640555991fdSmrg ;; 6641d656433aSmrg 6642555991fdSmrg unicos*) 6643555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6644555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6645126a8a12Smrg ;; 6646126a8a12Smrg 6647555991fdSmrg uts4*) 6648555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6649555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6650555991fdSmrg ;; 6651126a8a12Smrg 6652555991fdSmrg *) 6653555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6654d656433aSmrg ;; 6655d656433aSmrg esac 6656555991fdSmrg fi 6657d656433aSmrg]) 6658555991fdSmrgcase $host_os in 6659555991fdSmrg # For platforms which do not support PIC, -DPIC is meaningless: 6660555991fdSmrg *djgpp*) 6661555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6662555991fdSmrg ;; 6663555991fdSmrg *) 6664555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6665555991fdSmrg ;; 6666d656433aSmrgesac 6667555991fdSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6668555991fdSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6669555991fdSmrg [How to pass a linker flag through the compiler]) 6670d656433aSmrg 6671555991fdSmrg# 6672555991fdSmrg# Check to make sure the PIC flag actually works. 6673555991fdSmrg# 6674555991fdSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6675555991fdSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6676555991fdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6677555991fdSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6678555991fdSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6679555991fdSmrg "" | " "*) ;; 6680555991fdSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6681555991fdSmrg esac], 6682555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6683555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6684555991fdSmrgfi 6685555991fdSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6686555991fdSmrg [Additional compiler flags for building library objects]) 6687126a8a12Smrg 6688555991fdSmrg# 6689555991fdSmrg# Check to make sure the static flag actually works. 6690555991fdSmrg# 6691555991fdSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6692555991fdSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6693555991fdSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6694555991fdSmrg $lt_tmp_static_flag, 6695555991fdSmrg [], 6696555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6697555991fdSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6698555991fdSmrg [Compiler flag to prevent dynamic linking]) 6699555991fdSmrg])# _LT_COMPILER_PIC 6700126a8a12Smrg 6701126a8a12Smrg 6702555991fdSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 6703555991fdSmrg# ---------------------------- 6704555991fdSmrg# See if the linker supports building shared libraries. 6705555991fdSmrgm4_defun([_LT_LINKER_SHLIBS], 6706555991fdSmrg[AC_REQUIRE([LT_PATH_LD])dnl 6707555991fdSmrgAC_REQUIRE([LT_PATH_NM])dnl 6708555991fdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6709555991fdSmrgm4_require([_LT_DECL_EGREP])dnl 6710555991fdSmrgm4_require([_LT_DECL_SED])dnl 6711555991fdSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6712555991fdSmrgm4_require([_LT_TAG_COMPILER])dnl 6713555991fdSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6714555991fdSmrgm4_if([$1], [CXX], [ 6715555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6716555991fdSmrg case $host_os in 6717555991fdSmrg aix[[4-9]]*) 6718555991fdSmrg # If we're using GNU nm, then we don't want the "-C" option. 6719555991fdSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6720555991fdSmrg # Also, AIX nm treats weak defined symbols like other global defined 6721555991fdSmrg # symbols, whereas GNU nm marks them as "W". 6722555991fdSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6723555991fdSmrg _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' 6724555991fdSmrg else 6725555991fdSmrg _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' 6726555991fdSmrg fi 6727555991fdSmrg ;; 6728555991fdSmrg pw32*) 6729555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6730555991fdSmrg ;; 6731555991fdSmrg cygwin* | mingw* | cegcc*) 6732555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 6733555991fdSmrg ;; 6734555991fdSmrg *) 6735555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6736555991fdSmrg ;; 6737555991fdSmrg esac 6738555991fdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6739555991fdSmrg], [ 6740555991fdSmrg runpath_var= 6741555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 6742555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6743555991fdSmrg _LT_TAGVAR(archive_cmds, $1)= 6744555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 6745555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 6746555991fdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6747555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6748555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6749555991fdSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 6750555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6751555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6752555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6753555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6754555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6755555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 6756555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6757555991fdSmrg _LT_TAGVAR(inherit_rpath, $1)=no 6758555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 6759555991fdSmrg _LT_TAGVAR(module_cmds, $1)= 6760555991fdSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 6761555991fdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6762555991fdSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6763555991fdSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 6764555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6765555991fdSmrg # include_expsyms should be a list of space-separated symbols to be *always* 6766555991fdSmrg # included in the symbol list 6767555991fdSmrg _LT_TAGVAR(include_expsyms, $1)= 6768555991fdSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 6769555991fdSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6770555991fdSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6771555991fdSmrg # as well as any symbol that contains `d'. 6772555991fdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6773555991fdSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6774555991fdSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 6775555991fdSmrg # the symbol is explicitly referenced. Since portable code cannot 6776555991fdSmrg # rely on this symbol name, it's probably fine to never include it in 6777555991fdSmrg # preloaded symbol tables. 6778555991fdSmrg # Exclude shared library initialization/finalization symbols. 6779555991fdSmrgdnl Note also adjust exclude_expsyms for C++ above. 6780555991fdSmrg extract_expsyms_cmds= 6781126a8a12Smrg 6782555991fdSmrg case $host_os in 6783555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 6784555991fdSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6785555991fdSmrg # When not using gcc, we currently assume that we are using 6786555991fdSmrg # Microsoft Visual C++. 6787555991fdSmrg if test "$GCC" != yes; then 6788555991fdSmrg with_gnu_ld=no 6789555991fdSmrg fi 6790555991fdSmrg ;; 6791555991fdSmrg interix*) 6792555991fdSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6793555991fdSmrg with_gnu_ld=yes 6794555991fdSmrg ;; 6795555991fdSmrg openbsd*) 6796555991fdSmrg with_gnu_ld=no 6797555991fdSmrg ;; 6798555991fdSmrg esac 6799126a8a12Smrg 6800555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6801126a8a12Smrg 6802555991fdSmrg # On some targets, GNU ld is compatible enough with the native linker 6803555991fdSmrg # that we're better off using the native interface for both. 6804555991fdSmrg lt_use_gnu_ld_interface=no 6805555991fdSmrg if test "$with_gnu_ld" = yes; then 6806d656433aSmrg case $host_os in 6807555991fdSmrg aix*) 6808555991fdSmrg # The AIX port of GNU ld has always aspired to compatibility 6809555991fdSmrg # with the native linker. However, as the warning in the GNU ld 6810555991fdSmrg # block says, versions before 2.19.5* couldn't really create working 6811555991fdSmrg # shared libraries, regardless of the interface used. 6812555991fdSmrg case `$LD -v 2>&1` in 6813555991fdSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 6814555991fdSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 6815555991fdSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 6816555991fdSmrg *) 6817555991fdSmrg lt_use_gnu_ld_interface=yes 6818555991fdSmrg ;; 6819555991fdSmrg esac 6820555991fdSmrg ;; 6821555991fdSmrg *) 6822555991fdSmrg lt_use_gnu_ld_interface=yes 6823555991fdSmrg ;; 6824d656433aSmrg esac 6825555991fdSmrg fi 6826d656433aSmrg 6827555991fdSmrg if test "$lt_use_gnu_ld_interface" = yes; then 6828555991fdSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6829555991fdSmrg wlarc='${wl}' 6830126a8a12Smrg 6831555991fdSmrg # Set some defaults for GNU ld with shared library support. These 6832555991fdSmrg # are reset later if shared libraries are not supported. Putting them 6833555991fdSmrg # here allows them to be overridden if necessary. 6834555991fdSmrg runpath_var=LD_RUN_PATH 6835555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6836555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6837555991fdSmrg # ancient GNU ld didn't support --whole-archive et. al. 6838555991fdSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6839555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6840555991fdSmrg else 6841555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6842555991fdSmrg fi 6843555991fdSmrg supports_anon_versioning=no 6844555991fdSmrg case `$LD -v 2>&1` in 6845555991fdSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 6846555991fdSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6847555991fdSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6848555991fdSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6849555991fdSmrg *\ 2.11.*) ;; # other 2.11 versions 6850555991fdSmrg *) supports_anon_versioning=yes ;; 6851555991fdSmrg esac 6852126a8a12Smrg 6853555991fdSmrg # See if GNU ld supports shared libraries. 6854555991fdSmrg case $host_os in 6855555991fdSmrg aix[[3-9]]*) 6856555991fdSmrg # On AIX/PPC, the GNU linker is very broken 6857555991fdSmrg if test "$host_cpu" != ia64; then 6858555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6859555991fdSmrg cat <<_LT_EOF 1>&2 6860126a8a12Smrg 6861555991fdSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 6862555991fdSmrg*** to be unable to reliably create shared libraries on AIX. 6863555991fdSmrg*** Therefore, libtool is disabling shared libraries support. If you 6864555991fdSmrg*** really care for shared libraries, you may want to install binutils 6865555991fdSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 6866555991fdSmrg*** You will then need to restart the configuration process. 6867126a8a12Smrg 6868555991fdSmrg_LT_EOF 6869555991fdSmrg fi 6870555991fdSmrg ;; 6871126a8a12Smrg 6872555991fdSmrg amigaos*) 6873555991fdSmrg case $host_cpu in 6874555991fdSmrg powerpc) 6875555991fdSmrg # see comment about AmigaOS4 .so support 6876555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6877555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6878555991fdSmrg ;; 6879555991fdSmrg m68k) 6880555991fdSmrg _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)' 6881555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6882555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6883555991fdSmrg ;; 6884555991fdSmrg esac 6885555991fdSmrg ;; 6886126a8a12Smrg 6887555991fdSmrg beos*) 6888555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6889555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6890555991fdSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6891555991fdSmrg # support --undefined. This deserves some investigation. FIXME 6892555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6893555991fdSmrg else 6894555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6895555991fdSmrg fi 6896555991fdSmrg ;; 6897d656433aSmrg 6898555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 6899555991fdSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6900555991fdSmrg # as there is no search path for DLLs. 6901555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6902555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6903555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6904555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6905555991fdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6906555991fdSmrg _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' 6907d656433aSmrg 6908555991fdSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6909555991fdSmrg _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' 6910555991fdSmrg # If the export-symbols file already is a .def file (1st line 6911555991fdSmrg # is EXPORTS), use it as is; otherwise, prepend... 6912555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6913555991fdSmrg cp $export_symbols $output_objdir/$soname.def; 6914555991fdSmrg else 6915555991fdSmrg echo EXPORTS > $output_objdir/$soname.def; 6916555991fdSmrg cat $export_symbols >> $output_objdir/$soname.def; 6917555991fdSmrg fi~ 6918555991fdSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6919555991fdSmrg else 6920555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6921555991fdSmrg fi 6922555991fdSmrg ;; 6923d656433aSmrg 6924555991fdSmrg haiku*) 6925555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6926555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6927555991fdSmrg ;; 6928d656433aSmrg 6929555991fdSmrg interix[[3-9]]*) 6930555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6931555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6932555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6933555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6934555991fdSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6935555991fdSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6936555991fdSmrg # default) and relocated if they conflict, which is a slow very memory 6937555991fdSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6938555991fdSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6939555991fdSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6940555991fdSmrg _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' 6941555991fdSmrg _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' 6942555991fdSmrg ;; 6943126a8a12Smrg 6944555991fdSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 6945555991fdSmrg tmp_diet=no 6946555991fdSmrg if test "$host_os" = linux-dietlibc; then 6947555991fdSmrg case $cc_basename in 6948555991fdSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6949555991fdSmrg esac 6950555991fdSmrg fi 6951555991fdSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6952555991fdSmrg && test "$tmp_diet" = no 6953555991fdSmrg then 6954555991fdSmrg tmp_addflag= 6955555991fdSmrg tmp_sharedflag='-shared' 6956555991fdSmrg case $cc_basename,$host_cpu in 6957555991fdSmrg pgcc*) # Portland Group C compiler 6958555991fdSmrg _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' 6959555991fdSmrg tmp_addflag=' $pic_flag' 6960555991fdSmrg ;; 6961555991fdSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 6962555991fdSmrg # Portland Group f77 and f90 compilers 6963555991fdSmrg _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' 6964555991fdSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 6965555991fdSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6966555991fdSmrg tmp_addflag=' -i_dynamic' ;; 6967555991fdSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6968555991fdSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6969555991fdSmrg ifc* | ifort*) # Intel Fortran compiler 6970555991fdSmrg tmp_addflag=' -nofor_main' ;; 6971555991fdSmrg lf95*) # Lahey Fortran 8.1 6972555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6973555991fdSmrg tmp_sharedflag='--shared' ;; 6974555991fdSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6975555991fdSmrg tmp_sharedflag='-qmkshrobj' 6976555991fdSmrg tmp_addflag= ;; 6977555991fdSmrg nvcc*) # Cuda Compiler Driver 2.2 6978555991fdSmrg _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' 6979555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6980555991fdSmrg ;; 6981555991fdSmrg esac 6982555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 6983555991fdSmrg *Sun\ C*) # Sun C 5.9 6984555991fdSmrg _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' 6985555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6986555991fdSmrg tmp_sharedflag='-G' ;; 6987555991fdSmrg *Sun\ F*) # Sun Fortran 8.3 6988555991fdSmrg tmp_sharedflag='-G' ;; 6989555991fdSmrg esac 6990555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6991126a8a12Smrg 6992555991fdSmrg if test "x$supports_anon_versioning" = xyes; then 6993555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6994555991fdSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6995555991fdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6996555991fdSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6997555991fdSmrg fi 6998126a8a12Smrg 6999555991fdSmrg case $cc_basename in 7000555991fdSmrg xlf* | bgf* | bgxlf* | mpixlf*) 7001555991fdSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 7002555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 7003555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7004555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7005555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 7006555991fdSmrg if test "x$supports_anon_versioning" = xyes; then 7007555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7008555991fdSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7009555991fdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7010555991fdSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 7011555991fdSmrg fi 7012555991fdSmrg ;; 7013555991fdSmrg esac 7014555991fdSmrg else 7015555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7016555991fdSmrg fi 7017555991fdSmrg ;; 7018126a8a12Smrg 7019555991fdSmrg netbsd*) 7020555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7021555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7022555991fdSmrg wlarc= 7023555991fdSmrg else 7024555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7025555991fdSmrg _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' 7026555991fdSmrg fi 7027555991fdSmrg ;; 7028126a8a12Smrg 7029555991fdSmrg solaris*) 7030555991fdSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 7031555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7032555991fdSmrg cat <<_LT_EOF 1>&2 7033126a8a12Smrg 7034555991fdSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7035555991fdSmrg*** create shared libraries on Solaris systems. Therefore, libtool 7036555991fdSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 7037555991fdSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 7038555991fdSmrg*** your PATH or compiler configuration so that the native linker is 7039555991fdSmrg*** used, and then restart. 7040126a8a12Smrg 7041555991fdSmrg_LT_EOF 7042555991fdSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7043555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7044555991fdSmrg _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' 7045555991fdSmrg else 7046555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7047555991fdSmrg fi 7048555991fdSmrg ;; 7049126a8a12Smrg 7050555991fdSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7051555991fdSmrg case `$LD -v 2>&1` in 7052555991fdSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7053555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7054555991fdSmrg cat <<_LT_EOF 1>&2 7055d656433aSmrg 7056555991fdSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7057555991fdSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 7058555991fdSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 7059555991fdSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7060555991fdSmrg*** your PATH or compiler configuration so that the native linker is 7061555991fdSmrg*** used, and then restart. 7062d656433aSmrg 7063555991fdSmrg_LT_EOF 7064555991fdSmrg ;; 7065555991fdSmrg *) 7066555991fdSmrg # For security reasons, it is highly recommended that you always 7067555991fdSmrg # use absolute paths for naming shared libraries, and exclude the 7068555991fdSmrg # DT_RUNPATH tag from executables and libraries. But doing so 7069555991fdSmrg # requires that you compile everything twice, which is a pain. 7070555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7071555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7072555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7073555991fdSmrg _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' 7074555991fdSmrg else 7075555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7076555991fdSmrg fi 7077555991fdSmrg ;; 7078555991fdSmrg esac 7079555991fdSmrg ;; 7080d656433aSmrg 7081555991fdSmrg sunos4*) 7082555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7083555991fdSmrg wlarc= 7084555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7085555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7086555991fdSmrg ;; 7087555991fdSmrg 7088555991fdSmrg *) 7089555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7090555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7091555991fdSmrg _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' 7092555991fdSmrg else 7093555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7094555991fdSmrg fi 7095555991fdSmrg ;; 7096555991fdSmrg esac 7097d656433aSmrg 7098555991fdSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 7099555991fdSmrg runpath_var= 7100555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7101555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7102555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7103555991fdSmrg fi 7104555991fdSmrg else 7105555991fdSmrg # PORTME fill in a description of your system's linker (not GNU ld) 7106555991fdSmrg case $host_os in 7107555991fdSmrg aix3*) 7108555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7109555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 7110555991fdSmrg _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' 7111555991fdSmrg # Note: this linker hardcodes the directories in LIBPATH if there 7112555991fdSmrg # are no directories specified by -L. 7113555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7114555991fdSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7115555991fdSmrg # Neither direct hardcoding nor static linking is supported with a 7116555991fdSmrg # broken collect2. 7117555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7118555991fdSmrg fi 7119555991fdSmrg ;; 7120d656433aSmrg 7121555991fdSmrg aix[[4-9]]*) 7122555991fdSmrg if test "$host_cpu" = ia64; then 7123555991fdSmrg # On IA64, the linker does run time linking by default, so we don't 7124555991fdSmrg # have to do anything special. 7125555991fdSmrg aix_use_runtimelinking=no 7126555991fdSmrg exp_sym_flag='-Bexport' 7127555991fdSmrg no_entry_flag="" 7128555991fdSmrg else 7129555991fdSmrg # If we're using GNU nm, then we don't want the "-C" option. 7130555991fdSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7131555991fdSmrg # Also, AIX nm treats weak defined symbols like other global 7132555991fdSmrg # defined symbols, whereas GNU nm marks them as "W". 7133555991fdSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7134555991fdSmrg _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' 7135555991fdSmrg else 7136555991fdSmrg _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' 7137555991fdSmrg fi 7138555991fdSmrg aix_use_runtimelinking=no 7139126a8a12Smrg 7140555991fdSmrg # Test if we are trying to use run time linking or normal 7141555991fdSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7142555991fdSmrg # need to do runtime linking. 7143555991fdSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7144555991fdSmrg for ld_flag in $LDFLAGS; do 7145555991fdSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7146555991fdSmrg aix_use_runtimelinking=yes 7147555991fdSmrg break 7148555991fdSmrg fi 7149555991fdSmrg done 7150555991fdSmrg ;; 7151555991fdSmrg esac 7152126a8a12Smrg 7153555991fdSmrg exp_sym_flag='-bexport' 7154555991fdSmrg no_entry_flag='-bnoentry' 7155555991fdSmrg fi 7156126a8a12Smrg 7157555991fdSmrg # When large executables or shared objects are built, AIX ld can 7158555991fdSmrg # have problems creating the table of contents. If linking a library 7159555991fdSmrg # or program results in "error TOC overflow" add -mminimal-toc to 7160555991fdSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7161555991fdSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7162126a8a12Smrg 7163555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='' 7164555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7165555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7166555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7167555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7168555991fdSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7169126a8a12Smrg 7170555991fdSmrg if test "$GCC" = yes; then 7171555991fdSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7172555991fdSmrg # We only want to do this on AIX 4.2 and lower, the check 7173555991fdSmrg # below for broken collect2 doesn't work under 4.3+ 7174555991fdSmrg collect2name=`${CC} -print-prog-name=collect2` 7175555991fdSmrg if test -f "$collect2name" && 7176555991fdSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7177555991fdSmrg then 7178555991fdSmrg # We have reworked collect2 7179555991fdSmrg : 7180555991fdSmrg else 7181555991fdSmrg # We have old collect2 7182555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7183555991fdSmrg # It fails to find uninstalled libraries when the uninstalled 7184555991fdSmrg # path is not listed in the libpath. Setting hardcode_minus_L 7185555991fdSmrg # to unsupported forces relinking 7186555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7187555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7188555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7189555991fdSmrg fi 7190555991fdSmrg ;; 7191555991fdSmrg esac 7192555991fdSmrg shared_flag='-shared' 7193555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 7194555991fdSmrg shared_flag="$shared_flag "'${wl}-G' 7195555991fdSmrg fi 7196555991fdSmrg else 7197555991fdSmrg # not using gcc 7198555991fdSmrg if test "$host_cpu" = ia64; then 7199555991fdSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7200555991fdSmrg # chokes on -Wl,-G. The following line is correct: 7201555991fdSmrg shared_flag='-G' 7202555991fdSmrg else 7203555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 7204555991fdSmrg shared_flag='${wl}-G' 7205555991fdSmrg else 7206555991fdSmrg shared_flag='${wl}-bM:SRE' 7207555991fdSmrg fi 7208555991fdSmrg fi 7209555991fdSmrg fi 7210126a8a12Smrg 7211555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7212555991fdSmrg # It seems that -bexpall does not export symbols beginning with 7213555991fdSmrg # underscore (_), so it is better to generate a list of symbols to export. 7214555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 7215555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 7216555991fdSmrg # Warning - without using the other runtime loading flags (-brtl), 7217555991fdSmrg # -berok will link without error, but may produce a broken library. 7218555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7219555991fdSmrg # Determine the default libpath from the value encoded in an 7220555991fdSmrg # empty executable. 7221555991fdSmrg _LT_SYS_MODULE_PATH_AIX 7222555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7223555991fdSmrg _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" 7224555991fdSmrg else 7225555991fdSmrg if test "$host_cpu" = ia64; then 7226555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7227555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7228555991fdSmrg _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" 7229555991fdSmrg else 7230555991fdSmrg # Determine the default libpath from the value encoded in an 7231555991fdSmrg # empty executable. 7232555991fdSmrg _LT_SYS_MODULE_PATH_AIX 7233555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7234555991fdSmrg # Warning - without using the other run time loading flags, 7235555991fdSmrg # -berok will link without error, but may produce a broken library. 7236555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7237555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7238555991fdSmrg if test "$with_gnu_ld" = yes; then 7239555991fdSmrg # We only use this code for GNU lds that support --whole-archive. 7240555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7241555991fdSmrg else 7242555991fdSmrg # Exported symbols can be pulled into shared objects from archives 7243555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7244555991fdSmrg fi 7245555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7246555991fdSmrg # This is similar to how AIX traditionally builds its shared libraries. 7247555991fdSmrg _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' 7248555991fdSmrg fi 7249555991fdSmrg fi 7250555991fdSmrg ;; 7251126a8a12Smrg 7252555991fdSmrg amigaos*) 7253555991fdSmrg case $host_cpu in 7254555991fdSmrg powerpc) 7255555991fdSmrg # see comment about AmigaOS4 .so support 7256555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7257555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 7258555991fdSmrg ;; 7259555991fdSmrg m68k) 7260555991fdSmrg _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)' 7261555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7262555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7263555991fdSmrg ;; 7264555991fdSmrg esac 7265555991fdSmrg ;; 7266126a8a12Smrg 7267555991fdSmrg bsdi[[45]]*) 7268555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7269555991fdSmrg ;; 7270126a8a12Smrg 7271555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 7272555991fdSmrg # When not using gcc, we currently assume that we are using 7273555991fdSmrg # Microsoft Visual C++. 7274555991fdSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7275555991fdSmrg # no search path for DLLs. 7276555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7277555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7278555991fdSmrg # Tell ltmain to make .lib files, not .a files. 7279555991fdSmrg libext=lib 7280555991fdSmrg # Tell ltmain to make .dll files, not .so files. 7281555991fdSmrg shrext_cmds=".dll" 7282555991fdSmrg # FIXME: Setting linknames here is a bad hack. 7283555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7284555991fdSmrg # The linker will automatically build a .lib file if we build a DLL. 7285555991fdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7286555991fdSmrg # FIXME: Should let the user specify the lib program. 7287555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7288555991fdSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7289555991fdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7290555991fdSmrg ;; 7291126a8a12Smrg 7292555991fdSmrg darwin* | rhapsody*) 7293555991fdSmrg _LT_DARWIN_LINKER_FEATURES($1) 7294555991fdSmrg ;; 7295126a8a12Smrg 7296555991fdSmrg dgux*) 7297555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7298555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7299555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7300555991fdSmrg ;; 7301126a8a12Smrg 7302555991fdSmrg freebsd1*) 7303555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7304555991fdSmrg ;; 7305126a8a12Smrg 7306555991fdSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7307555991fdSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 7308555991fdSmrg # does not break anything, and helps significantly (at the cost of a little 7309555991fdSmrg # extra space). 7310555991fdSmrg freebsd2.2*) 7311555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7312555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7313555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7314555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7315555991fdSmrg ;; 7316555991fdSmrg 7317555991fdSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7318555991fdSmrg freebsd2*) 7319555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7320555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7321555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7322555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7323555991fdSmrg ;; 7324126a8a12Smrg 7325555991fdSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7326555991fdSmrg freebsd* | dragonfly*) 7327555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7328555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7329555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7330555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7331555991fdSmrg ;; 7332126a8a12Smrg 7333555991fdSmrg hpux9*) 7334555991fdSmrg if test "$GCC" = yes; then 7335555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7336555991fdSmrg else 7337555991fdSmrg _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' 7338555991fdSmrg fi 7339555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7340555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7341555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7342126a8a12Smrg 7343555991fdSmrg # hardcode_minus_L: Not really in the search PATH, 7344555991fdSmrg # but as the default location of the library. 7345555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7346555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7347555991fdSmrg ;; 7348126a8a12Smrg 7349555991fdSmrg hpux10*) 7350555991fdSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7351555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7352555991fdSmrg else 7353555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7354555991fdSmrg fi 7355555991fdSmrg if test "$with_gnu_ld" = no; then 7356555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7357555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7358555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7359555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7360555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7361555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7362555991fdSmrg # hardcode_minus_L: Not really in the search PATH, 7363555991fdSmrg # but as the default location of the library. 7364555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7365555991fdSmrg fi 7366555991fdSmrg ;; 7367126a8a12Smrg 7368555991fdSmrg hpux11*) 7369555991fdSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7370555991fdSmrg case $host_cpu in 7371555991fdSmrg hppa*64*) 7372555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7373555991fdSmrg ;; 7374555991fdSmrg ia64*) 7375555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7376555991fdSmrg ;; 7377555991fdSmrg *) 7378555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7379555991fdSmrg ;; 7380555991fdSmrg esac 7381555991fdSmrg else 7382555991fdSmrg case $host_cpu in 7383555991fdSmrg hppa*64*) 7384555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7385555991fdSmrg ;; 7386555991fdSmrg ia64*) 7387555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7388555991fdSmrg ;; 7389555991fdSmrg *) 7390555991fdSmrg m4_if($1, [], [ 7391555991fdSmrg # Older versions of the 11.00 compiler do not understand -b yet 7392555991fdSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7393555991fdSmrg _LT_LINKER_OPTION([if $CC understands -b], 7394555991fdSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7395555991fdSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7396555991fdSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7397555991fdSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7398555991fdSmrg ;; 7399555991fdSmrg esac 7400555991fdSmrg fi 7401555991fdSmrg if test "$with_gnu_ld" = no; then 7402555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7403555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7404126a8a12Smrg 7405555991fdSmrg case $host_cpu in 7406555991fdSmrg hppa*64*|ia64*) 7407555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7408555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7409555991fdSmrg ;; 7410555991fdSmrg *) 7411555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7412555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7413555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7414126a8a12Smrg 7415555991fdSmrg # hardcode_minus_L: Not really in the search PATH, 7416555991fdSmrg # but as the default location of the library. 7417555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7418555991fdSmrg ;; 7419555991fdSmrg esac 7420555991fdSmrg fi 7421555991fdSmrg ;; 7422126a8a12Smrg 7423555991fdSmrg irix5* | irix6* | nonstopux*) 7424555991fdSmrg if test "$GCC" = yes; then 7425555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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' 7426555991fdSmrg # Try to use the -exported_symbol ld option, if it does not 7427555991fdSmrg # work, assume that -exports_file does not work either and 7428555991fdSmrg # implicitly export all symbols. 7429555991fdSmrg save_LDFLAGS="$LDFLAGS" 7430555991fdSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7431555991fdSmrg AC_LINK_IFELSE(int foo(void) {}, 7432555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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' 7433555991fdSmrg ) 7434555991fdSmrg LDFLAGS="$save_LDFLAGS" 7435555991fdSmrg else 7436555991fdSmrg _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' 7437555991fdSmrg _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' 7438555991fdSmrg fi 7439555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7440555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7441555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7442555991fdSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 7443555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7444555991fdSmrg ;; 7445126a8a12Smrg 7446555991fdSmrg netbsd*) 7447555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7448555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7449555991fdSmrg else 7450555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7451555991fdSmrg fi 7452555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7453555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7454555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7455555991fdSmrg ;; 7456126a8a12Smrg 7457555991fdSmrg newsos6) 7458555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7459555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7460555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7461555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7462555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7463555991fdSmrg ;; 7464126a8a12Smrg 7465555991fdSmrg *nto* | *qnx*) 7466555991fdSmrg ;; 7467126a8a12Smrg 7468555991fdSmrg openbsd*) 7469555991fdSmrg if test -f /usr/libexec/ld.so; then 7470555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7471555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7472555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7473555991fdSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7474555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7475555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7476555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7477555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7478555991fdSmrg else 7479555991fdSmrg case $host_os in 7480555991fdSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7481555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7482555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7483555991fdSmrg ;; 7484555991fdSmrg *) 7485555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7486555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7487555991fdSmrg ;; 7488555991fdSmrg esac 7489555991fdSmrg fi 7490555991fdSmrg else 7491555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7492555991fdSmrg fi 7493555991fdSmrg ;; 7494126a8a12Smrg 7495555991fdSmrg os2*) 7496555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7497555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7498555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7499555991fdSmrg _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' 7500555991fdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7501555991fdSmrg ;; 7502126a8a12Smrg 7503555991fdSmrg osf3*) 7504555991fdSmrg if test "$GCC" = yes; then 7505555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7506555991fdSmrg _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' 7507555991fdSmrg else 7508555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7509555991fdSmrg _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' 7510555991fdSmrg fi 7511555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7512555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7513555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7514555991fdSmrg ;; 7515126a8a12Smrg 7516555991fdSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7517555991fdSmrg if test "$GCC" = yes; then 7518555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7519555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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' 7520555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7521555991fdSmrg else 7522555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7523555991fdSmrg _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' 7524555991fdSmrg _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~ 7525555991fdSmrg $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' 7526126a8a12Smrg 7527555991fdSmrg # Both c and cxx compiler support -rpath directly 7528555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7529555991fdSmrg fi 7530555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7531555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7532555991fdSmrg ;; 7533d656433aSmrg 7534555991fdSmrg solaris*) 7535555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7536555991fdSmrg if test "$GCC" = yes; then 7537555991fdSmrg wlarc='${wl}' 7538555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7539555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7540555991fdSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7541555991fdSmrg else 7542555991fdSmrg case `$CC -V 2>&1` in 7543555991fdSmrg *"Compilers 5.0"*) 7544555991fdSmrg wlarc='' 7545555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7546555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7547555991fdSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7548555991fdSmrg ;; 7549555991fdSmrg *) 7550555991fdSmrg wlarc='${wl}' 7551555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7552555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7553555991fdSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7554555991fdSmrg ;; 7555555991fdSmrg esac 7556555991fdSmrg fi 7557555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7558555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7559555991fdSmrg case $host_os in 7560555991fdSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7561555991fdSmrg *) 7562555991fdSmrg # The compiler driver will combine and reorder linker options, 7563555991fdSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 7564555991fdSmrg # but is careful enough not to reorder. 7565555991fdSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7566555991fdSmrg if test "$GCC" = yes; then 7567555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7568555991fdSmrg else 7569555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7570555991fdSmrg fi 7571555991fdSmrg ;; 7572555991fdSmrg esac 7573555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7574555991fdSmrg ;; 7575126a8a12Smrg 7576555991fdSmrg sunos4*) 7577555991fdSmrg if test "x$host_vendor" = xsequent; then 7578555991fdSmrg # Use $CC to link under sequent, because it throws in some extra .o 7579555991fdSmrg # files that make .init and .fini sections work. 7580555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7581555991fdSmrg else 7582555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7583555991fdSmrg fi 7584555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7585555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7586555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7587555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7588555991fdSmrg ;; 7589126a8a12Smrg 7590555991fdSmrg sysv4) 7591555991fdSmrg case $host_vendor in 7592555991fdSmrg sni) 7593555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7594555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7595555991fdSmrg ;; 7596555991fdSmrg siemens) 7597555991fdSmrg ## LD is ld it makes a PLAMLIB 7598555991fdSmrg ## CC just makes a GrossModule. 7599555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7600555991fdSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7601555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7602555991fdSmrg ;; 7603555991fdSmrg motorola) 7604555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7605555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7606555991fdSmrg ;; 7607555991fdSmrg esac 7608555991fdSmrg runpath_var='LD_RUN_PATH' 7609555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7610555991fdSmrg ;; 7611126a8a12Smrg 7612555991fdSmrg sysv4.3*) 7613555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7614555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7615555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7616555991fdSmrg ;; 7617126a8a12Smrg 7618555991fdSmrg sysv4*MP*) 7619555991fdSmrg if test -d /usr/nec; then 7620555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7621555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7622555991fdSmrg runpath_var=LD_RUN_PATH 7623555991fdSmrg hardcode_runpath_var=yes 7624555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7625555991fdSmrg fi 7626555991fdSmrg ;; 7627126a8a12Smrg 7628555991fdSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7629555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7630555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7631555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7632555991fdSmrg runpath_var='LD_RUN_PATH' 7633126a8a12Smrg 7634555991fdSmrg if test "$GCC" = yes; then 7635555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7636555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7637555991fdSmrg else 7638555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7639555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7640555991fdSmrg fi 7641555991fdSmrg ;; 7642d656433aSmrg 7643555991fdSmrg sysv5* | sco3.2v5* | sco5v6*) 7644555991fdSmrg # Note: We can NOT use -z defs as we might desire, because we do not 7645555991fdSmrg # link with -lc, and that would cause any symbols used from libc to 7646555991fdSmrg # always be unresolved, which means just about no library would 7647555991fdSmrg # ever link correctly. If we're not using GNU ld we use -z text 7648555991fdSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7649555991fdSmrg # as -z defs. 7650555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7651555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7652555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7653555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7654555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7655555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7656555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7657555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7658555991fdSmrg runpath_var='LD_RUN_PATH' 7659126a8a12Smrg 7660555991fdSmrg if test "$GCC" = yes; then 7661555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7662555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7663555991fdSmrg else 7664555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7665555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7666555991fdSmrg fi 7667555991fdSmrg ;; 7668d656433aSmrg 7669555991fdSmrg uts4*) 7670555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7671555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7672555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7673555991fdSmrg ;; 7674d656433aSmrg 7675555991fdSmrg *) 7676555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7677555991fdSmrg ;; 7678555991fdSmrg esac 7679d656433aSmrg 7680555991fdSmrg if test x$host_vendor = xsni; then 7681555991fdSmrg case $host in 7682555991fdSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7683555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7684555991fdSmrg ;; 7685555991fdSmrg esac 7686126a8a12Smrg fi 7687555991fdSmrg fi 7688126a8a12Smrg]) 7689555991fdSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7690555991fdSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7691d656433aSmrg 7692555991fdSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 7693d656433aSmrg 7694555991fdSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7695555991fdSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7696555991fdSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 7697555991fdSmrg [The commands to extract the exported symbol list from a shared archive]) 7698555991fdSmrg 7699555991fdSmrg# 7700555991fdSmrg# Do we need to explicitly link libc? 7701555991fdSmrg# 7702555991fdSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7703555991fdSmrgx|xyes) 7704555991fdSmrg # Assume -lc should be added 7705555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7706555991fdSmrg 7707555991fdSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7708555991fdSmrg case $_LT_TAGVAR(archive_cmds, $1) in 7709555991fdSmrg *'~'*) 7710555991fdSmrg # FIXME: we may have to deal with multi-command sequences. 7711555991fdSmrg ;; 7712555991fdSmrg '$CC '*) 7713555991fdSmrg # Test whether the compiler implicitly links with -lc since on some 7714555991fdSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7715555991fdSmrg # to ld, don't add -lc before -lgcc. 7716555991fdSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 7717555991fdSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 7718555991fdSmrg [$RM conftest* 7719555991fdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7720555991fdSmrg 7721555991fdSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7722555991fdSmrg soname=conftest 7723555991fdSmrg lib=conftest 7724555991fdSmrg libobjs=conftest.$ac_objext 7725555991fdSmrg deplibs= 7726555991fdSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7727555991fdSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7728555991fdSmrg compiler_flags=-v 7729555991fdSmrg linker_flags=-v 7730555991fdSmrg verstring= 7731555991fdSmrg output_objdir=. 7732555991fdSmrg libname=conftest 7733555991fdSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7734555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 7735555991fdSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7736555991fdSmrg then 7737555991fdSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7738555991fdSmrg else 7739555991fdSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7740555991fdSmrg fi 7741555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7742555991fdSmrg else 7743555991fdSmrg cat conftest.err 1>&5 7744555991fdSmrg fi 7745555991fdSmrg $RM conftest* 7746555991fdSmrg ]) 7747555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 7748555991fdSmrg ;; 7749555991fdSmrg esac 7750555991fdSmrg fi 7751d656433aSmrg ;; 7752d656433aSmrgesac 7753555991fdSmrg 7754555991fdSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7755555991fdSmrg [Whether or not to add -lc for building shared libraries]) 7756555991fdSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7757555991fdSmrg [enable_shared_with_static_runtimes], [0], 7758555991fdSmrg [Whether or not to disallow shared libs when runtime libs are static]) 7759555991fdSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7760555991fdSmrg [Compiler flag to allow reflexive dlopens]) 7761555991fdSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7762555991fdSmrg [Compiler flag to generate shared objects directly from archives]) 7763555991fdSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 7764555991fdSmrg [Whether the compiler copes with passing no objects directly]) 7765555991fdSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7766555991fdSmrg [Create an old-style archive from a shared archive]) 7767555991fdSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7768555991fdSmrg [Create a temporary old-style archive to link instead of a shared archive]) 7769555991fdSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7770555991fdSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7771555991fdSmrg_LT_TAGDECL([], [module_cmds], [2], 7772555991fdSmrg [Commands used to build a loadable module if different from building 7773555991fdSmrg a shared archive.]) 7774555991fdSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 7775555991fdSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 7776555991fdSmrg [Whether we are building with GNU ld or not]) 7777555991fdSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 7778555991fdSmrg [Flag that allows shared libraries with undefined symbols to be built]) 7779555991fdSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 7780555991fdSmrg [Flag that enforces no undefined symbols]) 7781555991fdSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7782555991fdSmrg [Flag to hardcode $libdir into a binary during linking. 7783555991fdSmrg This must work even if $libdir does not exist]) 7784555991fdSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7785555991fdSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 7786555991fdSmrg during linking. This must work even if $libdir does not exist]]) 7787555991fdSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7788555991fdSmrg [Whether we need a single "-rpath" flag with a separated argument]) 7789555991fdSmrg_LT_TAGDECL([], [hardcode_direct], [0], 7790555991fdSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7791555991fdSmrg DIR into the resulting binary]) 7792555991fdSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7793555991fdSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7794555991fdSmrg DIR into the resulting binary and the resulting library dependency is 7795555991fdSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7796555991fdSmrg library is relocated]) 7797555991fdSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 7798555991fdSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7799555991fdSmrg into the resulting binary]) 7800555991fdSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7801555991fdSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7802555991fdSmrg into the resulting binary]) 7803555991fdSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 7804555991fdSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 7805555991fdSmrg into the library and all subsequent libraries and executables linked 7806555991fdSmrg against it]) 7807555991fdSmrg_LT_TAGDECL([], [inherit_rpath], [0], 7808555991fdSmrg [Set to yes if linker adds runtime paths of dependent libraries 7809555991fdSmrg to runtime path list]) 7810555991fdSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 7811555991fdSmrg [Whether libtool must link a program against all its dependency libraries]) 7812555991fdSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 7813555991fdSmrg [Fix the shell variable $srcfile for the compiler]) 7814555991fdSmrg_LT_TAGDECL([], [always_export_symbols], [0], 7815555991fdSmrg [Set to "yes" if exported symbols are required]) 7816555991fdSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 7817555991fdSmrg [The commands to list exported symbols]) 7818555991fdSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 7819555991fdSmrg [Symbols that should not be listed in the preloaded symbols]) 7820555991fdSmrg_LT_TAGDECL([], [include_expsyms], [1], 7821555991fdSmrg [Symbols that must always be exported]) 7822555991fdSmrg_LT_TAGDECL([], [prelink_cmds], [2], 7823555991fdSmrg [Commands necessary for linking programs (against libraries) with templates]) 7824555991fdSmrg_LT_TAGDECL([], [file_list_spec], [1], 7825555991fdSmrg [Specify filename containing input files]) 7826555991fdSmrgdnl FIXME: Not yet implemented 7827555991fdSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7828555991fdSmrgdnl [Compiler flag to generate thread safe objects]) 7829555991fdSmrg])# _LT_LINKER_SHLIBS 7830d656433aSmrg 7831d656433aSmrg 7832555991fdSmrg# _LT_LANG_C_CONFIG([TAG]) 7833555991fdSmrg# ------------------------ 7834555991fdSmrg# Ensure that the configuration variables for a C compiler are suitably 7835555991fdSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 7836555991fdSmrg# the compiler configuration to `libtool'. 7837555991fdSmrgm4_defun([_LT_LANG_C_CONFIG], 7838555991fdSmrg[m4_require([_LT_DECL_EGREP])dnl 7839555991fdSmrglt_save_CC="$CC" 7840555991fdSmrgAC_LANG_PUSH(C) 7841d656433aSmrg 7842555991fdSmrg# Source file extension for C test sources. 7843555991fdSmrgac_ext=c 7844d656433aSmrg 7845555991fdSmrg# Object file extension for compiled C test sources. 7846555991fdSmrgobjext=o 7847555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 7848d656433aSmrg 7849555991fdSmrg# Code to be used in simple compile tests 7850555991fdSmrglt_simple_compile_test_code="int some_variable = 0;" 7851d656433aSmrg 7852555991fdSmrg# Code to be used in simple link tests 7853555991fdSmrglt_simple_link_test_code='int main(){return(0);}' 7854d656433aSmrg 7855555991fdSmrg_LT_TAG_COMPILER 7856555991fdSmrg# Save the default compiler, since it gets overwritten when the other 7857555991fdSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7858555991fdSmrgcompiler_DEFAULT=$CC 7859d656433aSmrg 7860555991fdSmrg# save warnings/boilerplate of simple test code 7861555991fdSmrg_LT_COMPILER_BOILERPLATE 7862555991fdSmrg_LT_LINKER_BOILERPLATE 7863d656433aSmrg 7864555991fdSmrgif test -n "$compiler"; then 7865555991fdSmrg _LT_COMPILER_NO_RTTI($1) 7866555991fdSmrg _LT_COMPILER_PIC($1) 7867555991fdSmrg _LT_COMPILER_C_O($1) 7868555991fdSmrg _LT_COMPILER_FILE_LOCKS($1) 7869555991fdSmrg _LT_LINKER_SHLIBS($1) 7870555991fdSmrg _LT_SYS_DYNAMIC_LINKER($1) 7871555991fdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7872555991fdSmrg LT_SYS_DLOPEN_SELF 7873555991fdSmrg _LT_CMD_STRIPLIB 7874d656433aSmrg 7875555991fdSmrg # Report which library types will actually be built 7876555991fdSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7877555991fdSmrg AC_MSG_RESULT([$can_build_shared]) 7878d656433aSmrg 7879555991fdSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7880555991fdSmrg test "$can_build_shared" = "no" && enable_shared=no 7881555991fdSmrg 7882555991fdSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7883555991fdSmrg # are all built from PIC. 7884555991fdSmrg case $host_os in 7885555991fdSmrg aix3*) 7886555991fdSmrg test "$enable_shared" = yes && enable_static=no 7887555991fdSmrg if test -n "$RANLIB"; then 7888555991fdSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7889555991fdSmrg postinstall_cmds='$RANLIB $lib' 7890555991fdSmrg fi 7891555991fdSmrg ;; 7892d656433aSmrg 7893555991fdSmrg aix[[4-9]]*) 7894555991fdSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7895555991fdSmrg test "$enable_shared" = yes && enable_static=no 7896555991fdSmrg fi 7897d656433aSmrg ;; 7898555991fdSmrg esac 7899555991fdSmrg AC_MSG_RESULT([$enable_shared]) 7900d656433aSmrg 7901555991fdSmrg AC_MSG_CHECKING([whether to build static libraries]) 7902555991fdSmrg # Make sure either enable_shared or enable_static is yes. 7903555991fdSmrg test "$enable_shared" = yes || enable_static=yes 7904555991fdSmrg AC_MSG_RESULT([$enable_static]) 7905d656433aSmrg 7906555991fdSmrg _LT_CONFIG($1) 7907555991fdSmrgfi 7908555991fdSmrgAC_LANG_POP 7909555991fdSmrgCC="$lt_save_CC" 7910555991fdSmrg])# _LT_LANG_C_CONFIG 7911d656433aSmrg 7912d656433aSmrg 7913555991fdSmrg# _LT_LANG_CXX_CONFIG([TAG]) 7914555991fdSmrg# -------------------------- 7915555991fdSmrg# Ensure that the configuration variables for a C++ compiler are suitably 7916555991fdSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 7917555991fdSmrg# the compiler configuration to `libtool'. 7918555991fdSmrgm4_defun([_LT_LANG_CXX_CONFIG], 7919555991fdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7920555991fdSmrgm4_require([_LT_DECL_EGREP])dnl 7921555991fdSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 7922555991fdSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7923555991fdSmrg (test "X$CXX" != "Xg++"))) ; then 7924555991fdSmrg AC_PROG_CXXCPP 7925555991fdSmrgelse 7926555991fdSmrg _lt_caught_CXX_error=yes 7927555991fdSmrgfi 7928d656433aSmrg 7929555991fdSmrgAC_LANG_PUSH(C++) 7930555991fdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7931555991fdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7932555991fdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7933555991fdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7934555991fdSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 7935555991fdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7936555991fdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7937555991fdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7938555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7939555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7940555991fdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7941555991fdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7942555991fdSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7943555991fdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7944555991fdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7945555991fdSmrg_LT_TAGVAR(module_cmds, $1)= 7946555991fdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7947555991fdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7948555991fdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7949555991fdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7950555991fdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7951555991fdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7952555991fdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7953555991fdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7954d656433aSmrg 7955555991fdSmrg# Source file extension for C++ test sources. 7956555991fdSmrgac_ext=cpp 7957d656433aSmrg 7958555991fdSmrg# Object file extension for compiled C++ test sources. 7959555991fdSmrgobjext=o 7960555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 7961d656433aSmrg 7962555991fdSmrg# No sense in running all these tests if we already determined that 7963555991fdSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 7964555991fdSmrg# are currently assumed to apply to all compilers on this platform, 7965555991fdSmrg# and will be corrupted by setting them based on a non-working compiler. 7966555991fdSmrgif test "$_lt_caught_CXX_error" != yes; then 7967555991fdSmrg # Code to be used in simple compile tests 7968555991fdSmrg lt_simple_compile_test_code="int some_variable = 0;" 7969d656433aSmrg 7970555991fdSmrg # Code to be used in simple link tests 7971555991fdSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7972d656433aSmrg 7973555991fdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7974555991fdSmrg _LT_TAG_COMPILER 7975d656433aSmrg 7976555991fdSmrg # save warnings/boilerplate of simple test code 7977555991fdSmrg _LT_COMPILER_BOILERPLATE 7978555991fdSmrg _LT_LINKER_BOILERPLATE 7979d656433aSmrg 7980555991fdSmrg # Allow CC to be a program name with arguments. 7981555991fdSmrg lt_save_CC=$CC 7982555991fdSmrg lt_save_LD=$LD 7983555991fdSmrg lt_save_GCC=$GCC 7984555991fdSmrg GCC=$GXX 7985555991fdSmrg lt_save_with_gnu_ld=$with_gnu_ld 7986555991fdSmrg lt_save_path_LD=$lt_cv_path_LD 7987555991fdSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7988555991fdSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7989555991fdSmrg else 7990555991fdSmrg $as_unset lt_cv_prog_gnu_ld 7991555991fdSmrg fi 7992555991fdSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 7993555991fdSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 7994555991fdSmrg else 7995555991fdSmrg $as_unset lt_cv_path_LD 7996555991fdSmrg fi 7997555991fdSmrg test -z "${LDCXX+set}" || LD=$LDCXX 7998555991fdSmrg CC=${CXX-"c++"} 7999555991fdSmrg compiler=$CC 8000555991fdSmrg _LT_TAGVAR(compiler, $1)=$CC 8001555991fdSmrg _LT_CC_BASENAME([$compiler]) 8002d656433aSmrg 8003555991fdSmrg if test -n "$compiler"; then 8004555991fdSmrg # We don't want -fno-exception when compiling C++ code, so set the 8005555991fdSmrg # no_builtin_flag separately 8006555991fdSmrg if test "$GXX" = yes; then 8007555991fdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 8008555991fdSmrg else 8009555991fdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 8010555991fdSmrg fi 8011d656433aSmrg 8012555991fdSmrg if test "$GXX" = yes; then 8013555991fdSmrg # Set up default GNU C++ configuration 8014d656433aSmrg 8015555991fdSmrg LT_PATH_LD 8016d656433aSmrg 8017555991fdSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 8018555991fdSmrg # archiving commands below assume that GNU ld is being used. 8019555991fdSmrg if test "$with_gnu_ld" = yes; then 8020555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8021555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 8022d656433aSmrg 8023555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8024555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8025d656433aSmrg 8026555991fdSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 8027555991fdSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 8028555991fdSmrg # investigate it a little bit more. (MM) 8029555991fdSmrg wlarc='${wl}' 8030555991fdSmrg 8031555991fdSmrg # ancient GNU ld didn't support --whole-archive et. al. 8032555991fdSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 8033555991fdSmrg $GREP 'no-whole-archive' > /dev/null; then 8034555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8035555991fdSmrg else 8036555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8037555991fdSmrg fi 8038555991fdSmrg else 8039555991fdSmrg with_gnu_ld=no 8040555991fdSmrg wlarc= 8041d656433aSmrg 8042555991fdSmrg # A generic and very simple default shared library creation 8043555991fdSmrg # command for GNU C++ for the case where it uses the native 8044555991fdSmrg # linker, instead of GNU ld. If possible, this setting should 8045555991fdSmrg # overridden to take advantage of the native linker features on 8046555991fdSmrg # the platform it is being used on. 8047555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8048555991fdSmrg fi 8049d656433aSmrg 8050555991fdSmrg # Commands to make compiler produce verbose output that lists 8051555991fdSmrg # what "hidden" libraries, object files and flags are used when 8052555991fdSmrg # linking a shared library. 8053555991fdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8054555991fdSmrg 8055555991fdSmrg else 8056555991fdSmrg GXX=no 8057555991fdSmrg with_gnu_ld=no 8058555991fdSmrg wlarc= 8059555991fdSmrg fi 8060d656433aSmrg 8061555991fdSmrg # PORTME: fill in a description of your system's C++ link characteristics 8062555991fdSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8063555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8064555991fdSmrg case $host_os in 8065555991fdSmrg aix3*) 8066555991fdSmrg # FIXME: insert proper C++ library support 8067555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8068555991fdSmrg ;; 8069555991fdSmrg aix[[4-9]]*) 8070555991fdSmrg if test "$host_cpu" = ia64; then 8071555991fdSmrg # On IA64, the linker does run time linking by default, so we don't 8072555991fdSmrg # have to do anything special. 8073555991fdSmrg aix_use_runtimelinking=no 8074555991fdSmrg exp_sym_flag='-Bexport' 8075555991fdSmrg no_entry_flag="" 8076555991fdSmrg else 8077555991fdSmrg aix_use_runtimelinking=no 8078d656433aSmrg 8079555991fdSmrg # Test if we are trying to use run time linking or normal 8080555991fdSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8081555991fdSmrg # need to do runtime linking. 8082555991fdSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8083555991fdSmrg for ld_flag in $LDFLAGS; do 8084555991fdSmrg case $ld_flag in 8085555991fdSmrg *-brtl*) 8086555991fdSmrg aix_use_runtimelinking=yes 8087555991fdSmrg break 8088555991fdSmrg ;; 8089555991fdSmrg esac 8090555991fdSmrg done 8091555991fdSmrg ;; 8092555991fdSmrg esac 8093d656433aSmrg 8094555991fdSmrg exp_sym_flag='-bexport' 8095555991fdSmrg no_entry_flag='-bnoentry' 8096555991fdSmrg fi 8097d656433aSmrg 8098555991fdSmrg # When large executables or shared objects are built, AIX ld can 8099555991fdSmrg # have problems creating the table of contents. If linking a library 8100555991fdSmrg # or program results in "error TOC overflow" add -mminimal-toc to 8101555991fdSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8102555991fdSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8103d656433aSmrg 8104555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='' 8105555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8106555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8107555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8108555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8109555991fdSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 8110d656433aSmrg 8111555991fdSmrg if test "$GXX" = yes; then 8112555991fdSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8113555991fdSmrg # We only want to do this on AIX 4.2 and lower, the check 8114555991fdSmrg # below for broken collect2 doesn't work under 4.3+ 8115555991fdSmrg collect2name=`${CC} -print-prog-name=collect2` 8116555991fdSmrg if test -f "$collect2name" && 8117555991fdSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8118555991fdSmrg then 8119555991fdSmrg # We have reworked collect2 8120555991fdSmrg : 8121555991fdSmrg else 8122555991fdSmrg # We have old collect2 8123555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8124555991fdSmrg # It fails to find uninstalled libraries when the uninstalled 8125555991fdSmrg # path is not listed in the libpath. Setting hardcode_minus_L 8126555991fdSmrg # to unsupported forces relinking 8127555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8128555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8129555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8130555991fdSmrg fi 8131555991fdSmrg esac 8132555991fdSmrg shared_flag='-shared' 8133555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 8134555991fdSmrg shared_flag="$shared_flag "'${wl}-G' 8135555991fdSmrg fi 8136555991fdSmrg else 8137555991fdSmrg # not using gcc 8138555991fdSmrg if test "$host_cpu" = ia64; then 8139555991fdSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8140555991fdSmrg # chokes on -Wl,-G. The following line is correct: 8141555991fdSmrg shared_flag='-G' 8142555991fdSmrg else 8143555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 8144555991fdSmrg shared_flag='${wl}-G' 8145555991fdSmrg else 8146555991fdSmrg shared_flag='${wl}-bM:SRE' 8147555991fdSmrg fi 8148555991fdSmrg fi 8149555991fdSmrg fi 8150d656433aSmrg 8151555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 8152555991fdSmrg # It seems that -bexpall does not export symbols beginning with 8153555991fdSmrg # underscore (_), so it is better to generate a list of symbols to 8154555991fdSmrg # export. 8155555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8156555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 8157555991fdSmrg # Warning - without using the other runtime loading flags (-brtl), 8158555991fdSmrg # -berok will link without error, but may produce a broken library. 8159555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8160555991fdSmrg # Determine the default libpath from the value encoded in an empty 8161555991fdSmrg # executable. 8162555991fdSmrg _LT_SYS_MODULE_PATH_AIX 8163555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8164d656433aSmrg 8165555991fdSmrg _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" 8166555991fdSmrg else 8167555991fdSmrg if test "$host_cpu" = ia64; then 8168555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8169555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8170555991fdSmrg _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" 8171555991fdSmrg else 8172555991fdSmrg # Determine the default libpath from the value encoded in an 8173555991fdSmrg # empty executable. 8174555991fdSmrg _LT_SYS_MODULE_PATH_AIX 8175555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8176555991fdSmrg # Warning - without using the other run time loading flags, 8177555991fdSmrg # -berok will link without error, but may produce a broken library. 8178555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8179555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8180555991fdSmrg if test "$with_gnu_ld" = yes; then 8181555991fdSmrg # We only use this code for GNU lds that support --whole-archive. 8182555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8183555991fdSmrg else 8184555991fdSmrg # Exported symbols can be pulled into shared objects from archives 8185555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8186555991fdSmrg fi 8187555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8188555991fdSmrg # This is similar to how AIX traditionally builds its shared 8189555991fdSmrg # libraries. 8190555991fdSmrg _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' 8191555991fdSmrg fi 8192555991fdSmrg fi 8193555991fdSmrg ;; 8194d656433aSmrg 8195555991fdSmrg beos*) 8196555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8197555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8198555991fdSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8199555991fdSmrg # support --undefined. This deserves some investigation. FIXME 8200555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8201555991fdSmrg else 8202555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8203555991fdSmrg fi 8204555991fdSmrg ;; 8205d656433aSmrg 8206555991fdSmrg chorus*) 8207555991fdSmrg case $cc_basename in 8208555991fdSmrg *) 8209555991fdSmrg # FIXME: insert proper C++ library support 8210555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8211555991fdSmrg ;; 8212555991fdSmrg esac 8213555991fdSmrg ;; 8214d656433aSmrg 8215555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 8216555991fdSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8217555991fdSmrg # as there is no search path for DLLs. 8218555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8219555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 8220555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8221555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8222555991fdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8223d656433aSmrg 8224555991fdSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8225555991fdSmrg _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' 8226555991fdSmrg # If the export-symbols file already is a .def file (1st line 8227555991fdSmrg # is EXPORTS), use it as is; otherwise, prepend... 8228555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8229555991fdSmrg cp $export_symbols $output_objdir/$soname.def; 8230555991fdSmrg else 8231555991fdSmrg echo EXPORTS > $output_objdir/$soname.def; 8232555991fdSmrg cat $export_symbols >> $output_objdir/$soname.def; 8233555991fdSmrg fi~ 8234555991fdSmrg $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' 8235555991fdSmrg else 8236555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8237555991fdSmrg fi 8238555991fdSmrg ;; 8239555991fdSmrg darwin* | rhapsody*) 8240555991fdSmrg _LT_DARWIN_LINKER_FEATURES($1) 8241555991fdSmrg ;; 8242d656433aSmrg 8243555991fdSmrg dgux*) 8244555991fdSmrg case $cc_basename in 8245555991fdSmrg ec++*) 8246555991fdSmrg # FIXME: insert proper C++ library support 8247555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8248555991fdSmrg ;; 8249555991fdSmrg ghcx*) 8250555991fdSmrg # Green Hills C++ Compiler 8251555991fdSmrg # FIXME: insert proper C++ library support 8252555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8253555991fdSmrg ;; 8254555991fdSmrg *) 8255555991fdSmrg # FIXME: insert proper C++ library support 8256555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8257555991fdSmrg ;; 8258555991fdSmrg esac 8259555991fdSmrg ;; 8260d656433aSmrg 8261555991fdSmrg freebsd[[12]]*) 8262555991fdSmrg # C++ shared libraries reported to be fairly broken before 8263555991fdSmrg # switch to ELF 8264555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8265555991fdSmrg ;; 8266d656433aSmrg 8267555991fdSmrg freebsd-elf*) 8268555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8269555991fdSmrg ;; 8270d656433aSmrg 8271555991fdSmrg freebsd* | dragonfly*) 8272555991fdSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8273555991fdSmrg # conventions 8274555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8275555991fdSmrg ;; 8276d656433aSmrg 8277555991fdSmrg gnu*) 8278555991fdSmrg ;; 8279d656433aSmrg 8280555991fdSmrg haiku*) 8281555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8282555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8283555991fdSmrg ;; 8284d656433aSmrg 8285555991fdSmrg hpux9*) 8286555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8287555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8288555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8289555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8290555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8291555991fdSmrg # but as the default 8292555991fdSmrg # location of the library. 8293d656433aSmrg 8294555991fdSmrg case $cc_basename in 8295555991fdSmrg CC*) 8296555991fdSmrg # FIXME: insert proper C++ library support 8297555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8298555991fdSmrg ;; 8299555991fdSmrg aCC*) 8300555991fdSmrg _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' 8301555991fdSmrg # Commands to make compiler produce verbose output that lists 8302555991fdSmrg # what "hidden" libraries, object files and flags are used when 8303555991fdSmrg # linking a shared library. 8304555991fdSmrg # 8305555991fdSmrg # There doesn't appear to be a way to prevent this compiler from 8306555991fdSmrg # explicitly linking system object files so we need to strip them 8307555991fdSmrg # from the output so that they don't get included in the library 8308555991fdSmrg # dependencies. 8309555991fdSmrg 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"' 8310555991fdSmrg ;; 8311555991fdSmrg *) 8312555991fdSmrg if test "$GXX" = yes; then 8313555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 8314555991fdSmrg else 8315555991fdSmrg # FIXME: insert proper C++ library support 8316555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8317555991fdSmrg fi 8318555991fdSmrg ;; 8319555991fdSmrg esac 8320555991fdSmrg ;; 8321d656433aSmrg 8322555991fdSmrg hpux10*|hpux11*) 8323555991fdSmrg if test $with_gnu_ld = no; then 8324555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8325555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8326d656433aSmrg 8327555991fdSmrg case $host_cpu in 8328555991fdSmrg hppa*64*|ia64*) 8329555991fdSmrg ;; 8330555991fdSmrg *) 8331555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8332555991fdSmrg ;; 8333555991fdSmrg esac 8334555991fdSmrg fi 8335555991fdSmrg case $host_cpu in 8336555991fdSmrg hppa*64*|ia64*) 8337555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8338555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8339555991fdSmrg ;; 8340555991fdSmrg *) 8341555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8342555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8343555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8344555991fdSmrg # but as the default 8345555991fdSmrg # location of the library. 8346555991fdSmrg ;; 8347555991fdSmrg esac 8348d656433aSmrg 8349555991fdSmrg case $cc_basename in 8350555991fdSmrg CC*) 8351555991fdSmrg # FIXME: insert proper C++ library support 8352555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8353555991fdSmrg ;; 8354555991fdSmrg aCC*) 8355555991fdSmrg case $host_cpu in 8356555991fdSmrg hppa*64*) 8357555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8358555991fdSmrg ;; 8359555991fdSmrg ia64*) 8360555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8361555991fdSmrg ;; 8362555991fdSmrg *) 8363555991fdSmrg _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' 8364555991fdSmrg ;; 8365555991fdSmrg esac 8366555991fdSmrg # Commands to make compiler produce verbose output that lists 8367555991fdSmrg # what "hidden" libraries, object files and flags are used when 8368555991fdSmrg # linking a shared library. 8369555991fdSmrg # 8370555991fdSmrg # There doesn't appear to be a way to prevent this compiler from 8371555991fdSmrg # explicitly linking system object files so we need to strip them 8372555991fdSmrg # from the output so that they don't get included in the library 8373555991fdSmrg # dependencies. 8374555991fdSmrg 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"' 8375555991fdSmrg ;; 8376555991fdSmrg *) 8377555991fdSmrg if test "$GXX" = yes; then 8378555991fdSmrg if test $with_gnu_ld = no; then 8379555991fdSmrg case $host_cpu in 8380555991fdSmrg hppa*64*) 8381555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8382555991fdSmrg ;; 8383555991fdSmrg ia64*) 8384555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8385555991fdSmrg ;; 8386555991fdSmrg *) 8387555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8388555991fdSmrg ;; 8389555991fdSmrg esac 8390555991fdSmrg fi 8391555991fdSmrg else 8392555991fdSmrg # FIXME: insert proper C++ library support 8393555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8394555991fdSmrg fi 8395555991fdSmrg ;; 8396555991fdSmrg esac 8397555991fdSmrg ;; 8398d656433aSmrg 8399555991fdSmrg interix[[3-9]]*) 8400555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8401555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8402555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8403555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8404555991fdSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8405555991fdSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8406555991fdSmrg # default) and relocated if they conflict, which is a slow very memory 8407555991fdSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8408555991fdSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8409555991fdSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8410555991fdSmrg _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' 8411555991fdSmrg _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' 8412555991fdSmrg ;; 8413555991fdSmrg irix5* | irix6*) 8414555991fdSmrg case $cc_basename in 8415555991fdSmrg CC*) 8416555991fdSmrg # SGI C++ 8417555991fdSmrg _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' 8418d656433aSmrg 8419555991fdSmrg # Archives containing C++ object files must be created using 8420555991fdSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8421555991fdSmrg # necessary to make sure instantiated templates are included 8422555991fdSmrg # in the archive. 8423555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8424555991fdSmrg ;; 8425555991fdSmrg *) 8426555991fdSmrg if test "$GXX" = yes; then 8427555991fdSmrg if test "$with_gnu_ld" = no; then 8428555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8429555991fdSmrg else 8430555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8431555991fdSmrg fi 8432555991fdSmrg fi 8433555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8434555991fdSmrg ;; 8435555991fdSmrg esac 8436555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8437555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8438555991fdSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 8439555991fdSmrg ;; 8440d656433aSmrg 8441555991fdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 8442555991fdSmrg case $cc_basename in 8443555991fdSmrg KCC*) 8444555991fdSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8445555991fdSmrg 8446555991fdSmrg # KCC will only create a shared library if the output file 8447555991fdSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8448555991fdSmrg # to its proper name (with version) after linking. 8449555991fdSmrg _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' 8450555991fdSmrg _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' 8451555991fdSmrg # Commands to make compiler produce verbose output that lists 8452555991fdSmrg # what "hidden" libraries, object files and flags are used when 8453555991fdSmrg # linking a shared library. 8454555991fdSmrg # 8455555991fdSmrg # There doesn't appear to be a way to prevent this compiler from 8456555991fdSmrg # explicitly linking system object files so we need to strip them 8457555991fdSmrg # from the output so that they don't get included in the library 8458555991fdSmrg # dependencies. 8459555991fdSmrg 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"' 8460d656433aSmrg 8461555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8462555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8463d656433aSmrg 8464555991fdSmrg # Archives containing C++ object files must be created using 8465555991fdSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8466555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8467555991fdSmrg ;; 8468555991fdSmrg icpc* | ecpc* ) 8469555991fdSmrg # Intel C++ 8470555991fdSmrg with_gnu_ld=yes 8471555991fdSmrg # version 8.0 and above of icpc choke on multiply defined symbols 8472555991fdSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8473555991fdSmrg # earlier do not add the objects themselves. 8474555991fdSmrg case `$CC -V 2>&1` in 8475555991fdSmrg *"Version 7."*) 8476555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8477555991fdSmrg _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' 8478555991fdSmrg ;; 8479555991fdSmrg *) # Version 8.0 or newer 8480555991fdSmrg tmp_idyn= 8481555991fdSmrg case $host_cpu in 8482555991fdSmrg ia64*) tmp_idyn=' -i_dynamic';; 8483555991fdSmrg esac 8484555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8485555991fdSmrg _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' 8486555991fdSmrg ;; 8487555991fdSmrg esac 8488555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8489555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8490555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8491555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8492555991fdSmrg ;; 8493555991fdSmrg pgCC* | pgcpp*) 8494555991fdSmrg # Portland Group C++ compiler 8495555991fdSmrg case `$CC -V` in 8496555991fdSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 8497555991fdSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8498555991fdSmrg rm -rf $tpldir~ 8499555991fdSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8500555991fdSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 8501555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8502555991fdSmrg rm -rf $tpldir~ 8503555991fdSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8504555991fdSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 8505555991fdSmrg $RANLIB $oldlib' 8506555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8507555991fdSmrg rm -rf $tpldir~ 8508555991fdSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8509555991fdSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8510555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8511555991fdSmrg rm -rf $tpldir~ 8512555991fdSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8513555991fdSmrg $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' 8514555991fdSmrg ;; 8515555991fdSmrg *) # Version 6 and above use weak symbols 8516555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8517555991fdSmrg _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' 8518555991fdSmrg ;; 8519555991fdSmrg esac 8520d656433aSmrg 8521555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8522555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8523555991fdSmrg _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' 8524555991fdSmrg ;; 8525555991fdSmrg cxx*) 8526555991fdSmrg # Compaq C++ 8527555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8528555991fdSmrg _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' 8529d656433aSmrg 8530555991fdSmrg runpath_var=LD_RUN_PATH 8531555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8532555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8533d656433aSmrg 8534555991fdSmrg # Commands to make compiler produce verbose output that lists 8535555991fdSmrg # what "hidden" libraries, object files and flags are used when 8536555991fdSmrg # linking a shared library. 8537555991fdSmrg # 8538555991fdSmrg # There doesn't appear to be a way to prevent this compiler from 8539555991fdSmrg # explicitly linking system object files so we need to strip them 8540555991fdSmrg # from the output so that they don't get included in the library 8541555991fdSmrg # dependencies. 8542555991fdSmrg 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' 8543555991fdSmrg ;; 8544555991fdSmrg xl* | mpixl* | bgxl*) 8545555991fdSmrg # IBM XL 8.0 on PPC, with GNU ld 8546555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8547555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8548555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8549555991fdSmrg if test "x$supports_anon_versioning" = xyes; then 8550555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8551555991fdSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8552555991fdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8553555991fdSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8554555991fdSmrg fi 8555555991fdSmrg ;; 8556555991fdSmrg *) 8557555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 8558555991fdSmrg *Sun\ C*) 8559555991fdSmrg # Sun C++ 5.9 8560555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8561555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8562555991fdSmrg _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' 8563555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8564555991fdSmrg _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' 8565555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8566d656433aSmrg 8567555991fdSmrg # Not sure whether something based on 8568555991fdSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8569555991fdSmrg # would be better. 8570555991fdSmrg output_verbose_link_cmd='func_echo_all' 8571d656433aSmrg 8572555991fdSmrg # Archives containing C++ object files must be created using 8573555991fdSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8574555991fdSmrg # necessary to make sure instantiated templates are included 8575555991fdSmrg # in the archive. 8576555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8577555991fdSmrg ;; 8578555991fdSmrg esac 8579555991fdSmrg ;; 8580555991fdSmrg esac 8581555991fdSmrg ;; 8582d656433aSmrg 8583555991fdSmrg lynxos*) 8584555991fdSmrg # FIXME: insert proper C++ library support 8585555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8586555991fdSmrg ;; 8587d656433aSmrg 8588555991fdSmrg m88k*) 8589555991fdSmrg # FIXME: insert proper C++ library support 8590555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8591555991fdSmrg ;; 8592d656433aSmrg 8593555991fdSmrg mvs*) 8594555991fdSmrg case $cc_basename in 8595555991fdSmrg cxx*) 8596555991fdSmrg # FIXME: insert proper C++ library support 8597555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8598555991fdSmrg ;; 8599555991fdSmrg *) 8600555991fdSmrg # FIXME: insert proper C++ library support 8601555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8602555991fdSmrg ;; 8603555991fdSmrg esac 8604555991fdSmrg ;; 8605d656433aSmrg 8606555991fdSmrg netbsd*) 8607555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8608555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8609555991fdSmrg wlarc= 8610555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8611555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8612555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8613d656433aSmrg fi 8614555991fdSmrg # Workaround some broken pre-1.5 toolchains 8615555991fdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8616555991fdSmrg ;; 8617d656433aSmrg 8618555991fdSmrg *nto* | *qnx*) 8619555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8620555991fdSmrg ;; 8621d656433aSmrg 8622555991fdSmrg openbsd2*) 8623555991fdSmrg # C++ shared libraries are fairly broken 8624555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8625555991fdSmrg ;; 8626d656433aSmrg 8627555991fdSmrg openbsd*) 8628555991fdSmrg if test -f /usr/libexec/ld.so; then 8629555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8630555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8631555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8632555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8633555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8634555991fdSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8635555991fdSmrg _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' 8636555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8637555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8638555991fdSmrg fi 8639555991fdSmrg output_verbose_link_cmd=func_echo_all 8640555991fdSmrg else 8641555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8642555991fdSmrg fi 8643555991fdSmrg ;; 8644d656433aSmrg 8645555991fdSmrg osf3* | osf4* | osf5*) 8646555991fdSmrg case $cc_basename in 8647555991fdSmrg KCC*) 8648555991fdSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8649d656433aSmrg 8650555991fdSmrg # KCC will only create a shared library if the output file 8651555991fdSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8652555991fdSmrg # to its proper name (with version) after linking. 8653555991fdSmrg _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' 8654d656433aSmrg 8655555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8656555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8657d656433aSmrg 8658555991fdSmrg # Archives containing C++ object files must be created using 8659555991fdSmrg # the KAI C++ compiler. 8660555991fdSmrg case $host in 8661555991fdSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8662555991fdSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8663555991fdSmrg esac 8664555991fdSmrg ;; 8665555991fdSmrg RCC*) 8666555991fdSmrg # Rational C++ 2.4.1 8667555991fdSmrg # FIXME: insert proper C++ library support 8668555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8669555991fdSmrg ;; 8670555991fdSmrg cxx*) 8671555991fdSmrg case $host in 8672555991fdSmrg osf3*) 8673555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8674555991fdSmrg _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' 8675555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8676555991fdSmrg ;; 8677555991fdSmrg *) 8678555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8679555991fdSmrg _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' 8680555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8681555991fdSmrg echo "-hidden">> $lib.exp~ 8682555991fdSmrg $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~ 8683555991fdSmrg $RM $lib.exp' 8684555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8685555991fdSmrg ;; 8686555991fdSmrg esac 8687d656433aSmrg 8688555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8689d656433aSmrg 8690555991fdSmrg # Commands to make compiler produce verbose output that lists 8691555991fdSmrg # what "hidden" libraries, object files and flags are used when 8692555991fdSmrg # linking a shared library. 8693555991fdSmrg # 8694555991fdSmrg # There doesn't appear to be a way to prevent this compiler from 8695555991fdSmrg # explicitly linking system object files so we need to strip them 8696555991fdSmrg # from the output so that they don't get included in the library 8697555991fdSmrg # dependencies. 8698555991fdSmrg 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"' 8699555991fdSmrg ;; 8700555991fdSmrg *) 8701555991fdSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8702555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8703555991fdSmrg case $host in 8704555991fdSmrg osf3*) 8705555991fdSmrg _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' 8706555991fdSmrg ;; 8707555991fdSmrg *) 8708555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8709555991fdSmrg ;; 8710555991fdSmrg esac 8711d656433aSmrg 8712555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8713555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8714d656433aSmrg 8715555991fdSmrg # Commands to make compiler produce verbose output that lists 8716555991fdSmrg # what "hidden" libraries, object files and flags are used when 8717555991fdSmrg # linking a shared library. 8718555991fdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8719d656433aSmrg 8720555991fdSmrg else 8721555991fdSmrg # FIXME: insert proper C++ library support 8722555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8723555991fdSmrg fi 8724555991fdSmrg ;; 8725555991fdSmrg esac 8726555991fdSmrg ;; 8727d656433aSmrg 8728555991fdSmrg psos*) 8729555991fdSmrg # FIXME: insert proper C++ library support 8730555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8731555991fdSmrg ;; 8732d656433aSmrg 8733555991fdSmrg sunos4*) 8734555991fdSmrg case $cc_basename in 8735555991fdSmrg CC*) 8736555991fdSmrg # Sun C++ 4.x 8737555991fdSmrg # FIXME: insert proper C++ library support 8738555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8739555991fdSmrg ;; 8740555991fdSmrg lcc*) 8741555991fdSmrg # Lucid 8742555991fdSmrg # FIXME: insert proper C++ library support 8743555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8744555991fdSmrg ;; 8745555991fdSmrg *) 8746555991fdSmrg # FIXME: insert proper C++ library support 8747555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8748555991fdSmrg ;; 8749555991fdSmrg esac 8750555991fdSmrg ;; 8751d656433aSmrg 8752555991fdSmrg solaris*) 8753555991fdSmrg case $cc_basename in 8754555991fdSmrg CC* | sunCC*) 8755555991fdSmrg # Sun C++ 4.2, 5.x and Centerline C++ 8756555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8757555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8758555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8759555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8760555991fdSmrg $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' 8761d656433aSmrg 8762555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8763555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8764555991fdSmrg case $host_os in 8765555991fdSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8766555991fdSmrg *) 8767555991fdSmrg # The compiler driver will combine and reorder linker options, 8768555991fdSmrg # but understands `-z linker_flag'. 8769555991fdSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8770555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8771555991fdSmrg ;; 8772555991fdSmrg esac 8773555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8774d656433aSmrg 8775555991fdSmrg output_verbose_link_cmd='func_echo_all' 8776d656433aSmrg 8777555991fdSmrg # Archives containing C++ object files must be created using 8778555991fdSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8779555991fdSmrg # necessary to make sure instantiated templates are included 8780555991fdSmrg # in the archive. 8781555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8782555991fdSmrg ;; 8783555991fdSmrg gcx*) 8784555991fdSmrg # Green Hills C++ Compiler 8785555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8786d656433aSmrg 8787555991fdSmrg # The C++ compiler must be used to create the archive. 8788555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8789555991fdSmrg ;; 8790555991fdSmrg *) 8791555991fdSmrg # GNU C++ compiler with Solaris linker 8792555991fdSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8793555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8794555991fdSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8795555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8796555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8797555991fdSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8798d656433aSmrg 8799555991fdSmrg # Commands to make compiler produce verbose output that lists 8800555991fdSmrg # what "hidden" libraries, object files and flags are used when 8801555991fdSmrg # linking a shared library. 8802555991fdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8803555991fdSmrg else 8804555991fdSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 8805555991fdSmrg # platform. 8806555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8807555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8808555991fdSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8809d656433aSmrg 8810555991fdSmrg # Commands to make compiler produce verbose output that lists 8811555991fdSmrg # what "hidden" libraries, object files and flags are used when 8812555991fdSmrg # linking a shared library. 8813555991fdSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8814555991fdSmrg fi 8815d656433aSmrg 8816555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8817555991fdSmrg case $host_os in 8818555991fdSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8819555991fdSmrg *) 8820555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8821555991fdSmrg ;; 8822555991fdSmrg esac 8823555991fdSmrg fi 8824555991fdSmrg ;; 8825555991fdSmrg esac 8826555991fdSmrg ;; 8827d656433aSmrg 8828555991fdSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8829555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8830555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8831555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8832555991fdSmrg runpath_var='LD_RUN_PATH' 8833d656433aSmrg 8834555991fdSmrg case $cc_basename in 8835555991fdSmrg CC*) 8836555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8837555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8838555991fdSmrg ;; 8839555991fdSmrg *) 8840555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8841555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8842555991fdSmrg ;; 8843555991fdSmrg esac 8844555991fdSmrg ;; 8845d656433aSmrg 8846555991fdSmrg sysv5* | sco3.2v5* | sco5v6*) 8847555991fdSmrg # Note: We can NOT use -z defs as we might desire, because we do not 8848555991fdSmrg # link with -lc, and that would cause any symbols used from libc to 8849555991fdSmrg # always be unresolved, which means just about no library would 8850555991fdSmrg # ever link correctly. If we're not using GNU ld we use -z text 8851555991fdSmrg # though, which does catch some bad symbols but isn't as heavy-handed 8852555991fdSmrg # as -z defs. 8853555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8854555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8855555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8856555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8857555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8858555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8859555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8860555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8861555991fdSmrg runpath_var='LD_RUN_PATH' 8862d656433aSmrg 8863555991fdSmrg case $cc_basename in 8864555991fdSmrg CC*) 8865555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8866555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8867555991fdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 8868555991fdSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 8869555991fdSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 8870555991fdSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 8871555991fdSmrg ;; 8872555991fdSmrg *) 8873555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8874555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8875555991fdSmrg ;; 8876555991fdSmrg esac 8877555991fdSmrg ;; 8878d656433aSmrg 8879555991fdSmrg tandem*) 8880555991fdSmrg case $cc_basename in 8881555991fdSmrg NCC*) 8882555991fdSmrg # NonStop-UX NCC 3.20 8883555991fdSmrg # FIXME: insert proper C++ library support 8884555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8885555991fdSmrg ;; 8886555991fdSmrg *) 8887555991fdSmrg # FIXME: insert proper C++ library support 8888555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8889555991fdSmrg ;; 8890555991fdSmrg esac 8891555991fdSmrg ;; 8892d656433aSmrg 8893555991fdSmrg vxworks*) 8894555991fdSmrg # FIXME: insert proper C++ library support 8895555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8896555991fdSmrg ;; 8897d656433aSmrg 8898555991fdSmrg *) 8899555991fdSmrg # FIXME: insert proper C++ library support 8900555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8901555991fdSmrg ;; 8902555991fdSmrg esac 8903d656433aSmrg 8904555991fdSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8905555991fdSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8906d656433aSmrg 8907555991fdSmrg _LT_TAGVAR(GCC, $1)="$GXX" 8908555991fdSmrg _LT_TAGVAR(LD, $1)="$LD" 8909d656433aSmrg 8910555991fdSmrg ## CAVEAT EMPTOR: 8911555991fdSmrg ## There is no encapsulation within the following macros, do not change 8912555991fdSmrg ## the running order or otherwise move them around unless you know exactly 8913555991fdSmrg ## what you are doing... 8914555991fdSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 8915555991fdSmrg _LT_COMPILER_PIC($1) 8916555991fdSmrg _LT_COMPILER_C_O($1) 8917555991fdSmrg _LT_COMPILER_FILE_LOCKS($1) 8918555991fdSmrg _LT_LINKER_SHLIBS($1) 8919555991fdSmrg _LT_SYS_DYNAMIC_LINKER($1) 8920555991fdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8921d656433aSmrg 8922555991fdSmrg _LT_CONFIG($1) 8923555991fdSmrg fi # test -n "$compiler" 8924d656433aSmrg 8925555991fdSmrg CC=$lt_save_CC 8926555991fdSmrg LDCXX=$LD 8927555991fdSmrg LD=$lt_save_LD 8928555991fdSmrg GCC=$lt_save_GCC 8929555991fdSmrg with_gnu_ld=$lt_save_with_gnu_ld 8930555991fdSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 8931555991fdSmrg lt_cv_path_LD=$lt_save_path_LD 8932555991fdSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8933555991fdSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8934555991fdSmrgfi # test "$_lt_caught_CXX_error" != yes 8935d656433aSmrg 8936555991fdSmrgAC_LANG_POP 8937555991fdSmrg])# _LT_LANG_CXX_CONFIG 8938d656433aSmrg 8939d656433aSmrg 8940555991fdSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8941555991fdSmrg# --------------------------------- 8942555991fdSmrg# Figure out "hidden" library dependencies from verbose 8943555991fdSmrg# compiler output when linking a shared library. 8944555991fdSmrg# Parse the compiler output and extract the necessary 8945555991fdSmrg# objects, libraries and library flags. 8946555991fdSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8947555991fdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8948555991fdSmrg# Dependencies to place before and after the object being linked: 8949555991fdSmrg_LT_TAGVAR(predep_objects, $1)= 8950555991fdSmrg_LT_TAGVAR(postdep_objects, $1)= 8951555991fdSmrg_LT_TAGVAR(predeps, $1)= 8952555991fdSmrg_LT_TAGVAR(postdeps, $1)= 8953555991fdSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8954d656433aSmrg 8955555991fdSmrgdnl we can't use the lt_simple_compile_test_code here, 8956555991fdSmrgdnl because it contains code intended for an executable, 8957555991fdSmrgdnl not a library. It's possible we should let each 8958555991fdSmrgdnl tag define a new lt_????_link_test_code variable, 8959555991fdSmrgdnl but it's only used here... 8960555991fdSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8961555991fdSmrgint a; 8962555991fdSmrgvoid foo (void) { a = 0; } 8963555991fdSmrg_LT_EOF 8964555991fdSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8965555991fdSmrgclass Foo 8966555991fdSmrg{ 8967555991fdSmrgpublic: 8968555991fdSmrg Foo (void) { a = 0; } 8969555991fdSmrgprivate: 8970555991fdSmrg int a; 8971555991fdSmrg}; 8972555991fdSmrg_LT_EOF 8973555991fdSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8974555991fdSmrg subroutine foo 8975555991fdSmrg implicit none 8976555991fdSmrg integer*4 a 8977555991fdSmrg a=0 8978555991fdSmrg return 8979555991fdSmrg end 8980555991fdSmrg_LT_EOF 8981555991fdSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8982555991fdSmrg subroutine foo 8983555991fdSmrg implicit none 8984555991fdSmrg integer a 8985555991fdSmrg a=0 8986555991fdSmrg return 8987555991fdSmrg end 8988555991fdSmrg_LT_EOF 8989555991fdSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8990555991fdSmrgpublic class foo { 8991555991fdSmrg private int a; 8992555991fdSmrg public void bar (void) { 8993555991fdSmrg a = 0; 8994555991fdSmrg } 8995555991fdSmrg}; 8996555991fdSmrg_LT_EOF 8997555991fdSmrg]) 8998555991fdSmrgdnl Parse the compiler output and extract the necessary 8999555991fdSmrgdnl objects, libraries and library flags. 9000555991fdSmrgif AC_TRY_EVAL(ac_compile); then 9001555991fdSmrg # Parse the compiler output and extract the necessary 9002555991fdSmrg # objects, libraries and library flags. 9003d656433aSmrg 9004555991fdSmrg # Sentinel used to keep track of whether or not we are before 9005555991fdSmrg # the conftest object file. 9006555991fdSmrg pre_test_object_deps_done=no 9007d656433aSmrg 9008555991fdSmrg for p in `eval "$output_verbose_link_cmd"`; do 9009555991fdSmrg case $p in 9010d656433aSmrg 9011555991fdSmrg -L* | -R* | -l*) 9012555991fdSmrg # Some compilers place space between "-{L,R}" and the path. 9013555991fdSmrg # Remove the space. 9014555991fdSmrg if test $p = "-L" || 9015555991fdSmrg test $p = "-R"; then 9016555991fdSmrg prev=$p 9017555991fdSmrg continue 9018555991fdSmrg else 9019555991fdSmrg prev= 9020555991fdSmrg fi 9021d656433aSmrg 9022555991fdSmrg if test "$pre_test_object_deps_done" = no; then 9023555991fdSmrg case $p in 9024555991fdSmrg -L* | -R*) 9025555991fdSmrg # Internal compiler library paths should come after those 9026555991fdSmrg # provided the user. The postdeps already come after the 9027555991fdSmrg # user supplied libs so there is no need to process them. 9028555991fdSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 9029555991fdSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 9030555991fdSmrg else 9031555991fdSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 9032555991fdSmrg fi 9033555991fdSmrg ;; 9034555991fdSmrg # The "-l" case would never come before the object being 9035555991fdSmrg # linked, so don't bother handling this case. 9036555991fdSmrg esac 9037555991fdSmrg else 9038555991fdSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 9039555991fdSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 9040555991fdSmrg else 9041555991fdSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 9042555991fdSmrg fi 9043555991fdSmrg fi 9044555991fdSmrg ;; 9045d656433aSmrg 9046555991fdSmrg *.$objext) 9047555991fdSmrg # This assumes that the test object file only shows up 9048555991fdSmrg # once in the compiler output. 9049555991fdSmrg if test "$p" = "conftest.$objext"; then 9050555991fdSmrg pre_test_object_deps_done=yes 9051555991fdSmrg continue 9052555991fdSmrg fi 9053d656433aSmrg 9054555991fdSmrg if test "$pre_test_object_deps_done" = no; then 9055555991fdSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 9056555991fdSmrg _LT_TAGVAR(predep_objects, $1)="$p" 9057555991fdSmrg else 9058555991fdSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 9059555991fdSmrg fi 9060555991fdSmrg else 9061555991fdSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 9062555991fdSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 9063555991fdSmrg else 9064555991fdSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 9065555991fdSmrg fi 9066555991fdSmrg fi 9067555991fdSmrg ;; 9068d656433aSmrg 9069555991fdSmrg *) ;; # Ignore the rest. 9070d656433aSmrg 9071555991fdSmrg esac 9072555991fdSmrg done 9073d656433aSmrg 9074555991fdSmrg # Clean up. 9075555991fdSmrg rm -f a.out a.exe 9076555991fdSmrgelse 9077555991fdSmrg echo "libtool.m4: error: problem compiling $1 test program" 9078555991fdSmrgfi 9079d656433aSmrg 9080555991fdSmrg$RM -f confest.$objext 9081d656433aSmrg 9082555991fdSmrg# PORTME: override above test on systems where it is broken 9083555991fdSmrgm4_if([$1], [CXX], 9084555991fdSmrg[case $host_os in 9085555991fdSmrginterix[[3-9]]*) 9086555991fdSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 9087555991fdSmrg # hack all around it, let's just trust "g++" to DTRT. 9088555991fdSmrg _LT_TAGVAR(predep_objects,$1)= 9089555991fdSmrg _LT_TAGVAR(postdep_objects,$1)= 9090555991fdSmrg _LT_TAGVAR(postdeps,$1)= 9091555991fdSmrg ;; 9092d656433aSmrg 9093555991fdSmrglinux*) 9094555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 9095555991fdSmrg *Sun\ C*) 9096555991fdSmrg # Sun C++ 5.9 9097d656433aSmrg 9098555991fdSmrg # The more standards-conforming stlport4 library is 9099555991fdSmrg # incompatible with the Cstd library. Avoid specifying 9100555991fdSmrg # it if it's in CXXFLAGS. Ignore libCrun as 9101555991fdSmrg # -library=stlport4 depends on it. 9102555991fdSmrg case " $CXX $CXXFLAGS " in 9103555991fdSmrg *" -library=stlport4 "*) 9104555991fdSmrg solaris_use_stlport4=yes 9105555991fdSmrg ;; 9106555991fdSmrg esac 9107d656433aSmrg 9108555991fdSmrg if test "$solaris_use_stlport4" != yes; then 9109555991fdSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9110555991fdSmrg fi 9111555991fdSmrg ;; 9112555991fdSmrg esac 9113555991fdSmrg ;; 9114d656433aSmrg 9115555991fdSmrgsolaris*) 9116555991fdSmrg case $cc_basename in 9117555991fdSmrg CC* | sunCC*) 9118555991fdSmrg # The more standards-conforming stlport4 library is 9119555991fdSmrg # incompatible with the Cstd library. Avoid specifying 9120555991fdSmrg # it if it's in CXXFLAGS. Ignore libCrun as 9121555991fdSmrg # -library=stlport4 depends on it. 9122555991fdSmrg case " $CXX $CXXFLAGS " in 9123555991fdSmrg *" -library=stlport4 "*) 9124555991fdSmrg solaris_use_stlport4=yes 9125555991fdSmrg ;; 9126555991fdSmrg esac 9127126a8a12Smrg 9128555991fdSmrg # Adding this requires a known-good setup of shared libraries for 9129555991fdSmrg # Sun compiler versions before 5.6, else PIC objects from an old 9130555991fdSmrg # archive will be linked into the output, leading to subtle bugs. 9131555991fdSmrg if test "$solaris_use_stlport4" != yes; then 9132555991fdSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9133555991fdSmrg fi 9134555991fdSmrg ;; 9135555991fdSmrg esac 9136555991fdSmrg ;; 9137555991fdSmrgesac 9138555991fdSmrg]) 9139d656433aSmrg 9140555991fdSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 9141555991fdSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 9142555991fdSmrgesac 9143555991fdSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9144555991fdSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9145555991fdSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 9146555991fdSmrgfi 9147555991fdSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9148555991fdSmrg [The directories searched by this compiler when creating a shared library]) 9149555991fdSmrg_LT_TAGDECL([], [predep_objects], [1], 9150555991fdSmrg [Dependencies to place before and after the objects being linked to 9151555991fdSmrg create a shared library]) 9152555991fdSmrg_LT_TAGDECL([], [postdep_objects], [1]) 9153555991fdSmrg_LT_TAGDECL([], [predeps], [1]) 9154555991fdSmrg_LT_TAGDECL([], [postdeps], [1]) 9155555991fdSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 9156555991fdSmrg [The library search path used internally by the compiler when linking 9157555991fdSmrg a shared library]) 9158555991fdSmrg])# _LT_SYS_HIDDEN_LIBDEPS 9159d656433aSmrg 9160d656433aSmrg 9161555991fdSmrg# _LT_LANG_F77_CONFIG([TAG]) 9162555991fdSmrg# -------------------------- 9163555991fdSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 9164555991fdSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9165555991fdSmrg# to write the compiler configuration to `libtool'. 9166555991fdSmrgm4_defun([_LT_LANG_F77_CONFIG], 9167555991fdSmrg[AC_LANG_PUSH(Fortran 77) 9168555991fdSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 9169555991fdSmrg _lt_disable_F77=yes 9170555991fdSmrgfi 9171d656433aSmrg 9172555991fdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9173555991fdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9174555991fdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9175555991fdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9176555991fdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9177555991fdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9178555991fdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9179555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9180555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9181555991fdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9182555991fdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9183555991fdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9184555991fdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9185555991fdSmrg_LT_TAGVAR(module_cmds, $1)= 9186555991fdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9187555991fdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9188555991fdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9189555991fdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9190555991fdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9191555991fdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9192555991fdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9193555991fdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9194d656433aSmrg 9195555991fdSmrg# Source file extension for f77 test sources. 9196555991fdSmrgac_ext=f 9197126a8a12Smrg 9198555991fdSmrg# Object file extension for compiled f77 test sources. 9199555991fdSmrgobjext=o 9200555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 9201126a8a12Smrg 9202555991fdSmrg# No sense in running all these tests if we already determined that 9203555991fdSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 9204555991fdSmrg# are currently assumed to apply to all compilers on this platform, 9205555991fdSmrg# and will be corrupted by setting them based on a non-working compiler. 9206555991fdSmrgif test "$_lt_disable_F77" != yes; then 9207555991fdSmrg # Code to be used in simple compile tests 9208555991fdSmrg lt_simple_compile_test_code="\ 9209555991fdSmrg subroutine t 9210555991fdSmrg return 9211555991fdSmrg end 9212555991fdSmrg" 9213126a8a12Smrg 9214555991fdSmrg # Code to be used in simple link tests 9215555991fdSmrg lt_simple_link_test_code="\ 9216555991fdSmrg program t 9217555991fdSmrg end 9218555991fdSmrg" 9219126a8a12Smrg 9220555991fdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9221555991fdSmrg _LT_TAG_COMPILER 9222126a8a12Smrg 9223555991fdSmrg # save warnings/boilerplate of simple test code 9224555991fdSmrg _LT_COMPILER_BOILERPLATE 9225555991fdSmrg _LT_LINKER_BOILERPLATE 9226126a8a12Smrg 9227555991fdSmrg # Allow CC to be a program name with arguments. 9228555991fdSmrg lt_save_CC="$CC" 9229555991fdSmrg lt_save_GCC=$GCC 9230555991fdSmrg CC=${F77-"f77"} 9231555991fdSmrg compiler=$CC 9232555991fdSmrg _LT_TAGVAR(compiler, $1)=$CC 9233555991fdSmrg _LT_CC_BASENAME([$compiler]) 9234555991fdSmrg GCC=$G77 9235555991fdSmrg if test -n "$compiler"; then 9236555991fdSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9237555991fdSmrg AC_MSG_RESULT([$can_build_shared]) 9238126a8a12Smrg 9239555991fdSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9240555991fdSmrg test "$can_build_shared" = "no" && enable_shared=no 9241126a8a12Smrg 9242555991fdSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9243555991fdSmrg # are all built from PIC. 9244555991fdSmrg case $host_os in 9245555991fdSmrg aix3*) 9246555991fdSmrg test "$enable_shared" = yes && enable_static=no 9247555991fdSmrg if test -n "$RANLIB"; then 9248555991fdSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9249555991fdSmrg postinstall_cmds='$RANLIB $lib' 9250555991fdSmrg fi 9251555991fdSmrg ;; 9252555991fdSmrg aix[[4-9]]*) 9253555991fdSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9254555991fdSmrg test "$enable_shared" = yes && enable_static=no 9255555991fdSmrg fi 9256555991fdSmrg ;; 9257555991fdSmrg esac 9258555991fdSmrg AC_MSG_RESULT([$enable_shared]) 9259126a8a12Smrg 9260555991fdSmrg AC_MSG_CHECKING([whether to build static libraries]) 9261555991fdSmrg # Make sure either enable_shared or enable_static is yes. 9262555991fdSmrg test "$enable_shared" = yes || enable_static=yes 9263555991fdSmrg AC_MSG_RESULT([$enable_static]) 9264126a8a12Smrg 9265555991fdSmrg _LT_TAGVAR(GCC, $1)="$G77" 9266555991fdSmrg _LT_TAGVAR(LD, $1)="$LD" 9267126a8a12Smrg 9268555991fdSmrg ## CAVEAT EMPTOR: 9269555991fdSmrg ## There is no encapsulation within the following macros, do not change 9270555991fdSmrg ## the running order or otherwise move them around unless you know exactly 9271555991fdSmrg ## what you are doing... 9272555991fdSmrg _LT_COMPILER_PIC($1) 9273555991fdSmrg _LT_COMPILER_C_O($1) 9274555991fdSmrg _LT_COMPILER_FILE_LOCKS($1) 9275555991fdSmrg _LT_LINKER_SHLIBS($1) 9276555991fdSmrg _LT_SYS_DYNAMIC_LINKER($1) 9277555991fdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9278126a8a12Smrg 9279555991fdSmrg _LT_CONFIG($1) 9280555991fdSmrg fi # test -n "$compiler" 9281126a8a12Smrg 9282555991fdSmrg GCC=$lt_save_GCC 9283555991fdSmrg CC="$lt_save_CC" 9284555991fdSmrgfi # test "$_lt_disable_F77" != yes 9285126a8a12Smrg 9286555991fdSmrgAC_LANG_POP 9287555991fdSmrg])# _LT_LANG_F77_CONFIG 9288126a8a12Smrg 9289126a8a12Smrg 9290555991fdSmrg# _LT_LANG_FC_CONFIG([TAG]) 9291555991fdSmrg# ------------------------- 9292555991fdSmrg# Ensure that the configuration variables for a Fortran compiler are 9293555991fdSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9294555991fdSmrg# to write the compiler configuration to `libtool'. 9295555991fdSmrgm4_defun([_LT_LANG_FC_CONFIG], 9296555991fdSmrg[AC_LANG_PUSH(Fortran) 9297126a8a12Smrg 9298555991fdSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 9299555991fdSmrg _lt_disable_FC=yes 9300555991fdSmrgfi 9301126a8a12Smrg 9302555991fdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9303555991fdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9304555991fdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9305555991fdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9306555991fdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9307555991fdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9308555991fdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9309555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9310555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9311555991fdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9312555991fdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9313555991fdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9314555991fdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9315555991fdSmrg_LT_TAGVAR(module_cmds, $1)= 9316555991fdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9317555991fdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9318555991fdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9319555991fdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9320555991fdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9321555991fdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9322555991fdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9323555991fdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9324d656433aSmrg 9325555991fdSmrg# Source file extension for fc test sources. 9326555991fdSmrgac_ext=${ac_fc_srcext-f} 9327d656433aSmrg 9328555991fdSmrg# Object file extension for compiled fc test sources. 9329555991fdSmrgobjext=o 9330555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 9331d656433aSmrg 9332555991fdSmrg# No sense in running all these tests if we already determined that 9333555991fdSmrg# the FC compiler isn't working. Some variables (like enable_shared) 9334555991fdSmrg# are currently assumed to apply to all compilers on this platform, 9335555991fdSmrg# and will be corrupted by setting them based on a non-working compiler. 9336555991fdSmrgif test "$_lt_disable_FC" != yes; then 9337555991fdSmrg # Code to be used in simple compile tests 9338555991fdSmrg lt_simple_compile_test_code="\ 9339555991fdSmrg subroutine t 9340555991fdSmrg return 9341555991fdSmrg end 9342555991fdSmrg" 9343555991fdSmrg 9344555991fdSmrg # Code to be used in simple link tests 9345555991fdSmrg lt_simple_link_test_code="\ 9346555991fdSmrg program t 9347555991fdSmrg end 9348555991fdSmrg" 9349d656433aSmrg 9350555991fdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9351555991fdSmrg _LT_TAG_COMPILER 9352d656433aSmrg 9353555991fdSmrg # save warnings/boilerplate of simple test code 9354555991fdSmrg _LT_COMPILER_BOILERPLATE 9355555991fdSmrg _LT_LINKER_BOILERPLATE 9356d656433aSmrg 9357555991fdSmrg # Allow CC to be a program name with arguments. 9358555991fdSmrg lt_save_CC="$CC" 9359555991fdSmrg lt_save_GCC=$GCC 9360555991fdSmrg CC=${FC-"f95"} 9361555991fdSmrg compiler=$CC 9362555991fdSmrg GCC=$ac_cv_fc_compiler_gnu 9363d656433aSmrg 9364555991fdSmrg _LT_TAGVAR(compiler, $1)=$CC 9365555991fdSmrg _LT_CC_BASENAME([$compiler]) 9366d656433aSmrg 9367555991fdSmrg if test -n "$compiler"; then 9368555991fdSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9369555991fdSmrg AC_MSG_RESULT([$can_build_shared]) 9370d656433aSmrg 9371555991fdSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9372555991fdSmrg test "$can_build_shared" = "no" && enable_shared=no 9373d656433aSmrg 9374555991fdSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9375555991fdSmrg # are all built from PIC. 9376d656433aSmrg case $host_os in 9377555991fdSmrg aix3*) 9378555991fdSmrg test "$enable_shared" = yes && enable_static=no 9379555991fdSmrg if test -n "$RANLIB"; then 9380555991fdSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9381555991fdSmrg postinstall_cmds='$RANLIB $lib' 9382555991fdSmrg fi 9383555991fdSmrg ;; 9384555991fdSmrg aix[[4-9]]*) 9385555991fdSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9386555991fdSmrg test "$enable_shared" = yes && enable_static=no 9387555991fdSmrg fi 9388555991fdSmrg ;; 9389d656433aSmrg esac 9390555991fdSmrg AC_MSG_RESULT([$enable_shared]) 9391d656433aSmrg 9392555991fdSmrg AC_MSG_CHECKING([whether to build static libraries]) 9393555991fdSmrg # Make sure either enable_shared or enable_static is yes. 9394555991fdSmrg test "$enable_shared" = yes || enable_static=yes 9395555991fdSmrg AC_MSG_RESULT([$enable_static]) 9396d656433aSmrg 9397555991fdSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9398555991fdSmrg _LT_TAGVAR(LD, $1)="$LD" 9399d656433aSmrg 9400555991fdSmrg ## CAVEAT EMPTOR: 9401555991fdSmrg ## There is no encapsulation within the following macros, do not change 9402555991fdSmrg ## the running order or otherwise move them around unless you know exactly 9403555991fdSmrg ## what you are doing... 9404555991fdSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 9405555991fdSmrg _LT_COMPILER_PIC($1) 9406555991fdSmrg _LT_COMPILER_C_O($1) 9407555991fdSmrg _LT_COMPILER_FILE_LOCKS($1) 9408555991fdSmrg _LT_LINKER_SHLIBS($1) 9409555991fdSmrg _LT_SYS_DYNAMIC_LINKER($1) 9410555991fdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9411d656433aSmrg 9412555991fdSmrg _LT_CONFIG($1) 9413555991fdSmrg fi # test -n "$compiler" 9414d656433aSmrg 9415555991fdSmrg GCC=$lt_save_GCC 9416555991fdSmrg CC="$lt_save_CC" 9417555991fdSmrgfi # test "$_lt_disable_FC" != yes 9418d656433aSmrg 9419555991fdSmrgAC_LANG_POP 9420555991fdSmrg])# _LT_LANG_FC_CONFIG 9421d656433aSmrg 9422d656433aSmrg 9423555991fdSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 9424555991fdSmrg# -------------------------- 9425555991fdSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9426555991fdSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9427555991fdSmrg# to write the compiler configuration to `libtool'. 9428555991fdSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 9429555991fdSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 9430555991fdSmrgAC_LANG_SAVE 9431d656433aSmrg 9432555991fdSmrg# Source file extension for Java test sources. 9433555991fdSmrgac_ext=java 9434d656433aSmrg 9435555991fdSmrg# Object file extension for compiled Java test sources. 9436555991fdSmrgobjext=o 9437555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 9438d656433aSmrg 9439555991fdSmrg# Code to be used in simple compile tests 9440555991fdSmrglt_simple_compile_test_code="class foo {}" 9441d656433aSmrg 9442555991fdSmrg# Code to be used in simple link tests 9443555991fdSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 9444d656433aSmrg 9445555991fdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9446555991fdSmrg_LT_TAG_COMPILER 9447d656433aSmrg 9448555991fdSmrg# save warnings/boilerplate of simple test code 9449555991fdSmrg_LT_COMPILER_BOILERPLATE 9450555991fdSmrg_LT_LINKER_BOILERPLATE 9451d656433aSmrg 9452555991fdSmrg# Allow CC to be a program name with arguments. 9453555991fdSmrglt_save_CC="$CC" 9454555991fdSmrglt_save_GCC=$GCC 9455555991fdSmrgGCC=yes 9456555991fdSmrgCC=${GCJ-"gcj"} 9457555991fdSmrgcompiler=$CC 9458555991fdSmrg_LT_TAGVAR(compiler, $1)=$CC 9459555991fdSmrg_LT_TAGVAR(LD, $1)="$LD" 9460555991fdSmrg_LT_CC_BASENAME([$compiler]) 9461d656433aSmrg 9462555991fdSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 9463555991fdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9464d656433aSmrg 9465555991fdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9466555991fdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9467555991fdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9468d656433aSmrg 9469555991fdSmrgif test -n "$compiler"; then 9470555991fdSmrg _LT_COMPILER_NO_RTTI($1) 9471555991fdSmrg _LT_COMPILER_PIC($1) 9472555991fdSmrg _LT_COMPILER_C_O($1) 9473555991fdSmrg _LT_COMPILER_FILE_LOCKS($1) 9474555991fdSmrg _LT_LINKER_SHLIBS($1) 9475555991fdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9476555991fdSmrg 9477555991fdSmrg _LT_CONFIG($1) 9478d656433aSmrgfi 9479d656433aSmrg 9480555991fdSmrgAC_LANG_RESTORE 9481555991fdSmrg 9482555991fdSmrgGCC=$lt_save_GCC 9483555991fdSmrgCC="$lt_save_CC" 9484555991fdSmrg])# _LT_LANG_GCJ_CONFIG 9485555991fdSmrg 9486555991fdSmrg 9487555991fdSmrg# _LT_LANG_RC_CONFIG([TAG]) 9488555991fdSmrg# ------------------------- 9489555991fdSmrg# Ensure that the configuration variables for the Windows resource compiler 9490555991fdSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9491555991fdSmrg# to write the compiler configuration to `libtool'. 9492555991fdSmrgm4_defun([_LT_LANG_RC_CONFIG], 9493555991fdSmrg[AC_REQUIRE([LT_PROG_RC])dnl 9494555991fdSmrgAC_LANG_SAVE 9495555991fdSmrg 9496555991fdSmrg# Source file extension for RC test sources. 9497555991fdSmrgac_ext=rc 9498555991fdSmrg 9499555991fdSmrg# Object file extension for compiled RC test sources. 9500555991fdSmrgobjext=o 9501555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 9502555991fdSmrg 9503555991fdSmrg# Code to be used in simple compile tests 9504555991fdSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 9505555991fdSmrg 9506555991fdSmrg# Code to be used in simple link tests 9507555991fdSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 9508d656433aSmrg 9509555991fdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9510555991fdSmrg_LT_TAG_COMPILER 9511d656433aSmrg 9512555991fdSmrg# save warnings/boilerplate of simple test code 9513555991fdSmrg_LT_COMPILER_BOILERPLATE 9514555991fdSmrg_LT_LINKER_BOILERPLATE 9515d656433aSmrg 9516555991fdSmrg# Allow CC to be a program name with arguments. 9517555991fdSmrglt_save_CC="$CC" 9518555991fdSmrglt_save_GCC=$GCC 9519555991fdSmrgGCC= 9520555991fdSmrgCC=${RC-"windres"} 9521555991fdSmrgcompiler=$CC 9522555991fdSmrg_LT_TAGVAR(compiler, $1)=$CC 9523555991fdSmrg_LT_CC_BASENAME([$compiler]) 9524555991fdSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9525d656433aSmrg 9526555991fdSmrgif test -n "$compiler"; then 9527555991fdSmrg : 9528555991fdSmrg _LT_CONFIG($1) 9529d656433aSmrgfi 9530d656433aSmrg 9531555991fdSmrgGCC=$lt_save_GCC 9532555991fdSmrgAC_LANG_RESTORE 9533555991fdSmrgCC="$lt_save_CC" 9534555991fdSmrg])# _LT_LANG_RC_CONFIG 9535d656433aSmrg 9536d656433aSmrg 9537555991fdSmrg# LT_PROG_GCJ 9538555991fdSmrg# ----------- 9539555991fdSmrgAC_DEFUN([LT_PROG_GCJ], 9540555991fdSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9541555991fdSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9542555991fdSmrg [AC_CHECK_TOOL(GCJ, gcj,) 9543555991fdSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9544555991fdSmrg AC_SUBST(GCJFLAGS)])])[]dnl 9545555991fdSmrg]) 9546d656433aSmrg 9547555991fdSmrg# Old name: 9548555991fdSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9549555991fdSmrgdnl aclocal-1.4 backwards compatibility: 9550555991fdSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9551d656433aSmrg 9552d656433aSmrg 9553555991fdSmrg# LT_PROG_RC 9554555991fdSmrg# ---------- 9555555991fdSmrgAC_DEFUN([LT_PROG_RC], 9556555991fdSmrg[AC_CHECK_TOOL(RC, windres,) 9557555991fdSmrg]) 9558d656433aSmrg 9559555991fdSmrg# Old name: 9560555991fdSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9561555991fdSmrgdnl aclocal-1.4 backwards compatibility: 9562555991fdSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 9563d656433aSmrg 9564d656433aSmrg 9565555991fdSmrg# _LT_DECL_EGREP 9566555991fdSmrg# -------------- 9567555991fdSmrg# If we don't have a new enough Autoconf to choose the best grep 9568555991fdSmrg# available, choose the one first in the user's PATH. 9569555991fdSmrgm4_defun([_LT_DECL_EGREP], 9570555991fdSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 9571555991fdSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 9572555991fdSmrgtest -z "$GREP" && GREP=grep 9573555991fdSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9574555991fdSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9575555991fdSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9576555991fdSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9577555991fdSmrgAC_SUBST([GREP]) 9578555991fdSmrg]) 9579d656433aSmrg 9580d656433aSmrg 9581555991fdSmrg# _LT_DECL_OBJDUMP 9582555991fdSmrg# -------------- 9583555991fdSmrg# If we don't have a new enough Autoconf to choose the best objdump 9584555991fdSmrg# available, choose the one first in the user's PATH. 9585555991fdSmrgm4_defun([_LT_DECL_OBJDUMP], 9586555991fdSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9587555991fdSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9588555991fdSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9589555991fdSmrgAC_SUBST([OBJDUMP]) 9590555991fdSmrg]) 9591d656433aSmrg 9592d656433aSmrg 9593555991fdSmrg# _LT_DECL_SED 9594555991fdSmrg# ------------ 9595555991fdSmrg# Check for a fully-functional sed program, that truncates 9596555991fdSmrg# as few characters as possible. Prefer GNU sed if found. 9597555991fdSmrgm4_defun([_LT_DECL_SED], 9598555991fdSmrg[AC_PROG_SED 9599555991fdSmrgtest -z "$SED" && SED=sed 9600555991fdSmrgXsed="$SED -e 1s/^X//" 9601555991fdSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9602555991fdSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9603555991fdSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9604555991fdSmrg])# _LT_DECL_SED 9605555991fdSmrg 9606555991fdSmrgm4_ifndef([AC_PROG_SED], [ 9607555991fdSmrg# NOTE: This macro has been submitted for inclusion into # 9608555991fdSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 9609555991fdSmrg# a released version of Autoconf we should remove this # 9610555991fdSmrg# macro and use it instead. # 9611555991fdSmrg 9612555991fdSmrgm4_defun([AC_PROG_SED], 9613555991fdSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 9614555991fdSmrgAC_CACHE_VAL(lt_cv_path_SED, 9615555991fdSmrg[# Loop through the user's path and test for sed and gsed. 9616555991fdSmrg# Then use that list of sed's as ones to test for truncation. 9617555991fdSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9618555991fdSmrgfor as_dir in $PATH 9619555991fdSmrgdo 9620555991fdSmrg IFS=$as_save_IFS 9621555991fdSmrg test -z "$as_dir" && as_dir=. 9622555991fdSmrg for lt_ac_prog in sed gsed; do 9623555991fdSmrg for ac_exec_ext in '' $ac_executable_extensions; do 9624555991fdSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9625555991fdSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 9626555991fdSmrg fi 9627555991fdSmrg done 9628555991fdSmrg done 9629555991fdSmrgdone 9630555991fdSmrgIFS=$as_save_IFS 9631555991fdSmrglt_ac_max=0 9632555991fdSmrglt_ac_count=0 9633555991fdSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9634555991fdSmrg# along with /bin/sed that truncates output. 9635555991fdSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9636555991fdSmrg test ! -f $lt_ac_sed && continue 9637555991fdSmrg cat /dev/null > conftest.in 9638555991fdSmrg lt_ac_count=0 9639555991fdSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9640555991fdSmrg # Check for GNU sed and select it if it is found. 9641555991fdSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9642555991fdSmrg lt_cv_path_SED=$lt_ac_sed 9643555991fdSmrg break 9644555991fdSmrg fi 9645555991fdSmrg while true; do 9646555991fdSmrg cat conftest.in conftest.in >conftest.tmp 9647555991fdSmrg mv conftest.tmp conftest.in 9648555991fdSmrg cp conftest.in conftest.nl 9649555991fdSmrg echo >>conftest.nl 9650555991fdSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9651555991fdSmrg cmp -s conftest.out conftest.nl || break 9652555991fdSmrg # 10000 chars as input seems more than enough 9653555991fdSmrg test $lt_ac_count -gt 10 && break 9654555991fdSmrg lt_ac_count=`expr $lt_ac_count + 1` 9655555991fdSmrg if test $lt_ac_count -gt $lt_ac_max; then 9656555991fdSmrg lt_ac_max=$lt_ac_count 9657555991fdSmrg lt_cv_path_SED=$lt_ac_sed 9658555991fdSmrg fi 9659555991fdSmrg done 9660555991fdSmrgdone 9661555991fdSmrg]) 9662555991fdSmrgSED=$lt_cv_path_SED 9663555991fdSmrgAC_SUBST([SED]) 9664555991fdSmrgAC_MSG_RESULT([$SED]) 9665555991fdSmrg])#AC_PROG_SED 9666555991fdSmrg])#m4_ifndef 9667555991fdSmrg 9668555991fdSmrg# Old name: 9669555991fdSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9670555991fdSmrgdnl aclocal-1.4 backwards compatibility: 9671555991fdSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9672d656433aSmrg 9673d656433aSmrg 9674555991fdSmrg# _LT_CHECK_SHELL_FEATURES 9675555991fdSmrg# ------------------------ 9676555991fdSmrg# Find out whether the shell is Bourne or XSI compatible, 9677555991fdSmrg# or has some other useful features. 9678555991fdSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 9679555991fdSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9680555991fdSmrg# Try some XSI features 9681555991fdSmrgxsi_shell=no 9682555991fdSmrg( _lt_dummy="a/b/c" 9683555991fdSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9684555991fdSmrg = c,a/b,, \ 9685555991fdSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 9686555991fdSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9687555991fdSmrg && xsi_shell=yes 9688555991fdSmrgAC_MSG_RESULT([$xsi_shell]) 9689555991fdSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9690126a8a12Smrg 9691555991fdSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 9692555991fdSmrglt_shell_append=no 9693555991fdSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9694555991fdSmrg >/dev/null 2>&1 \ 9695555991fdSmrg && lt_shell_append=yes 9696555991fdSmrgAC_MSG_RESULT([$lt_shell_append]) 9697555991fdSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9698126a8a12Smrg 9699555991fdSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9700555991fdSmrg lt_unset=unset 9701555991fdSmrgelse 9702555991fdSmrg lt_unset=false 9703555991fdSmrgfi 9704555991fdSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9705d656433aSmrg 9706555991fdSmrg# test EBCDIC or ASCII 9707555991fdSmrgcase `echo X|tr X '\101'` in 9708555991fdSmrg A) # ASCII based system 9709555991fdSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9710555991fdSmrg lt_SP2NL='tr \040 \012' 9711555991fdSmrg lt_NL2SP='tr \015\012 \040\040' 9712555991fdSmrg ;; 9713555991fdSmrg *) # EBCDIC based system 9714555991fdSmrg lt_SP2NL='tr \100 \n' 9715555991fdSmrg lt_NL2SP='tr \r\n \100\100' 9716555991fdSmrg ;; 9717555991fdSmrgesac 9718555991fdSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9719555991fdSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9720555991fdSmrg])# _LT_CHECK_SHELL_FEATURES 9721126a8a12Smrg 9722126a8a12Smrg 9723555991fdSmrg# _LT_PROG_XSI_SHELLFNS 9724555991fdSmrg# --------------------- 9725555991fdSmrg# Bourne and XSI compatible variants of some useful shell functions. 9726555991fdSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 9727555991fdSmrg[case $xsi_shell in 9728555991fdSmrg yes) 9729555991fdSmrg cat << \_LT_EOF >> "$cfgfile" 9730126a8a12Smrg 9731555991fdSmrg# func_dirname file append nondir_replacement 9732555991fdSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9733555991fdSmrg# otherwise set result to NONDIR_REPLACEMENT. 9734555991fdSmrgfunc_dirname () 9735555991fdSmrg{ 9736555991fdSmrg case ${1} in 9737555991fdSmrg */*) func_dirname_result="${1%/*}${2}" ;; 9738555991fdSmrg * ) func_dirname_result="${3}" ;; 9739555991fdSmrg esac 9740555991fdSmrg} 9741d656433aSmrg 9742555991fdSmrg# func_basename file 9743555991fdSmrgfunc_basename () 9744555991fdSmrg{ 9745555991fdSmrg func_basename_result="${1##*/}" 9746555991fdSmrg} 9747126a8a12Smrg 9748555991fdSmrg# func_dirname_and_basename file append nondir_replacement 9749555991fdSmrg# perform func_basename and func_dirname in a single function 9750555991fdSmrg# call: 9751555991fdSmrg# dirname: Compute the dirname of FILE. If nonempty, 9752555991fdSmrg# add APPEND to the result, otherwise set result 9753555991fdSmrg# to NONDIR_REPLACEMENT. 9754555991fdSmrg# value returned in "$func_dirname_result" 9755555991fdSmrg# basename: Compute filename of FILE. 9756555991fdSmrg# value retuned in "$func_basename_result" 9757555991fdSmrg# Implementation must be kept synchronized with func_dirname 9758555991fdSmrg# and func_basename. For efficiency, we do not delegate to 9759555991fdSmrg# those functions but instead duplicate the functionality here. 9760555991fdSmrgfunc_dirname_and_basename () 9761555991fdSmrg{ 9762555991fdSmrg case ${1} in 9763555991fdSmrg */*) func_dirname_result="${1%/*}${2}" ;; 9764555991fdSmrg * ) func_dirname_result="${3}" ;; 9765555991fdSmrg esac 9766555991fdSmrg func_basename_result="${1##*/}" 9767555991fdSmrg} 9768126a8a12Smrg 9769555991fdSmrg# func_stripname prefix suffix name 9770555991fdSmrg# strip PREFIX and SUFFIX off of NAME. 9771555991fdSmrg# PREFIX and SUFFIX must not contain globbing or regex special 9772555991fdSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9773555991fdSmrg# dot (in which case that matches only a dot). 9774555991fdSmrgfunc_stripname () 9775555991fdSmrg{ 9776555991fdSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9777555991fdSmrg # positional parameters, so assign one to ordinary parameter first. 9778555991fdSmrg func_stripname_result=${3} 9779555991fdSmrg func_stripname_result=${func_stripname_result#"${1}"} 9780555991fdSmrg func_stripname_result=${func_stripname_result%"${2}"} 9781555991fdSmrg} 9782126a8a12Smrg 9783555991fdSmrg# func_opt_split 9784555991fdSmrgfunc_opt_split () 9785555991fdSmrg{ 9786555991fdSmrg func_opt_split_opt=${1%%=*} 9787555991fdSmrg func_opt_split_arg=${1#*=} 9788555991fdSmrg} 9789126a8a12Smrg 9790555991fdSmrg# func_lo2o object 9791555991fdSmrgfunc_lo2o () 9792555991fdSmrg{ 9793555991fdSmrg case ${1} in 9794555991fdSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9795555991fdSmrg *) func_lo2o_result=${1} ;; 9796555991fdSmrg esac 9797555991fdSmrg} 9798126a8a12Smrg 9799555991fdSmrg# func_xform libobj-or-source 9800555991fdSmrgfunc_xform () 9801555991fdSmrg{ 9802555991fdSmrg func_xform_result=${1%.*}.lo 9803555991fdSmrg} 9804126a8a12Smrg 9805555991fdSmrg# func_arith arithmetic-term... 9806555991fdSmrgfunc_arith () 9807555991fdSmrg{ 9808555991fdSmrg func_arith_result=$(( $[*] )) 9809555991fdSmrg} 9810126a8a12Smrg 9811555991fdSmrg# func_len string 9812555991fdSmrg# STRING may not start with a hyphen. 9813555991fdSmrgfunc_len () 9814555991fdSmrg{ 9815555991fdSmrg func_len_result=${#1} 9816555991fdSmrg} 9817126a8a12Smrg 9818555991fdSmrg_LT_EOF 9819555991fdSmrg ;; 9820555991fdSmrg *) # Bourne compatible functions. 9821555991fdSmrg cat << \_LT_EOF >> "$cfgfile" 9822126a8a12Smrg 9823555991fdSmrg# func_dirname file append nondir_replacement 9824555991fdSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9825555991fdSmrg# otherwise set result to NONDIR_REPLACEMENT. 9826555991fdSmrgfunc_dirname () 9827555991fdSmrg{ 9828555991fdSmrg # Extract subdirectory from the argument. 9829555991fdSmrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 9830555991fdSmrg if test "X$func_dirname_result" = "X${1}"; then 9831555991fdSmrg func_dirname_result="${3}" 9832555991fdSmrg else 9833555991fdSmrg func_dirname_result="$func_dirname_result${2}" 9834555991fdSmrg fi 9835555991fdSmrg} 9836126a8a12Smrg 9837555991fdSmrg# func_basename file 9838555991fdSmrgfunc_basename () 9839555991fdSmrg{ 9840555991fdSmrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 9841555991fdSmrg} 9842126a8a12Smrg 9843555991fdSmrgdnl func_dirname_and_basename 9844555991fdSmrgdnl A portable version of this function is already defined in general.m4sh 9845555991fdSmrgdnl so there is no need for it here. 9846126a8a12Smrg 9847555991fdSmrg# func_stripname prefix suffix name 9848555991fdSmrg# strip PREFIX and SUFFIX off of NAME. 9849555991fdSmrg# PREFIX and SUFFIX must not contain globbing or regex special 9850555991fdSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9851555991fdSmrg# dot (in which case that matches only a dot). 9852555991fdSmrg# func_strip_suffix prefix name 9853555991fdSmrgfunc_stripname () 9854555991fdSmrg{ 9855555991fdSmrg case ${2} in 9856555991fdSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 9857555991fdSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 9858555991fdSmrg esac 9859555991fdSmrg} 9860126a8a12Smrg 9861555991fdSmrg# sed scripts: 9862555991fdSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9863555991fdSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 9864126a8a12Smrg 9865555991fdSmrg# func_opt_split 9866555991fdSmrgfunc_opt_split () 9867555991fdSmrg{ 9868555991fdSmrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 9869555991fdSmrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 9870555991fdSmrg} 9871126a8a12Smrg 9872555991fdSmrg# func_lo2o object 9873555991fdSmrgfunc_lo2o () 9874555991fdSmrg{ 9875555991fdSmrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 9876555991fdSmrg} 9877126a8a12Smrg 9878555991fdSmrg# func_xform libobj-or-source 9879555991fdSmrgfunc_xform () 9880555991fdSmrg{ 9881555991fdSmrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 9882555991fdSmrg} 9883126a8a12Smrg 9884555991fdSmrg# func_arith arithmetic-term... 9885555991fdSmrgfunc_arith () 9886555991fdSmrg{ 9887555991fdSmrg func_arith_result=`expr "$[@]"` 9888555991fdSmrg} 9889555991fdSmrg 9890555991fdSmrg# func_len string 9891555991fdSmrg# STRING may not start with a hyphen. 9892555991fdSmrgfunc_len () 9893555991fdSmrg{ 9894555991fdSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9895555991fdSmrg} 9896126a8a12Smrg 9897555991fdSmrg_LT_EOF 9898555991fdSmrgesac 9899126a8a12Smrg 9900555991fdSmrgcase $lt_shell_append in 9901555991fdSmrg yes) 9902555991fdSmrg cat << \_LT_EOF >> "$cfgfile" 9903126a8a12Smrg 9904555991fdSmrg# func_append var value 9905555991fdSmrg# Append VALUE to the end of shell variable VAR. 9906555991fdSmrgfunc_append () 9907555991fdSmrg{ 9908555991fdSmrg eval "$[1]+=\$[2]" 9909555991fdSmrg} 9910555991fdSmrg_LT_EOF 9911555991fdSmrg ;; 9912555991fdSmrg *) 9913555991fdSmrg cat << \_LT_EOF >> "$cfgfile" 9914555991fdSmrg 9915555991fdSmrg# func_append var value 9916555991fdSmrg# Append VALUE to the end of shell variable VAR. 9917555991fdSmrgfunc_append () 9918555991fdSmrg{ 9919555991fdSmrg eval "$[1]=\$$[1]\$[2]" 9920555991fdSmrg} 9921126a8a12Smrg 9922555991fdSmrg_LT_EOF 9923555991fdSmrg ;; 9924555991fdSmrg esac 9925555991fdSmrg]) 9926126a8a12Smrg 9927555991fdSmrg# Helper functions for option handling. -*- Autoconf -*- 9928126a8a12Smrg# 9929555991fdSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9930555991fdSmrg# Inc. 9931555991fdSmrg# Written by Gary V. Vaughan, 2004 9932555991fdSmrg# 9933555991fdSmrg# This file is free software; the Free Software Foundation gives 9934555991fdSmrg# unlimited permission to copy and/or distribute it, with or without 9935555991fdSmrg# modifications, as long as this notice is preserved. 9936126a8a12Smrg 9937555991fdSmrg# serial 7 ltoptions.m4 9938126a8a12Smrg 9939555991fdSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9940555991fdSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9941126a8a12Smrg 9942d656433aSmrg 9943555991fdSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9944555991fdSmrg# ------------------------------------------ 9945555991fdSmrgm4_define([_LT_MANGLE_OPTION], 9946555991fdSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9947126a8a12Smrg 9948126a8a12Smrg 9949555991fdSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9950555991fdSmrg# --------------------------------------- 9951555991fdSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9952555991fdSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9953555991fdSmrg# saved as a flag. 9954555991fdSmrgm4_define([_LT_SET_OPTION], 9955555991fdSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9956555991fdSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9957555991fdSmrg _LT_MANGLE_DEFUN([$1], [$2]), 9958555991fdSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9959126a8a12Smrg]) 9960126a8a12Smrg 9961126a8a12Smrg 9962555991fdSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9963555991fdSmrg# ------------------------------------------------------------ 9964555991fdSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9965555991fdSmrgm4_define([_LT_IF_OPTION], 9966555991fdSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9967126a8a12Smrg 9968126a8a12Smrg 9969555991fdSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9970555991fdSmrg# ------------------------------------------------------- 9971555991fdSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9972555991fdSmrg# are set. 9973555991fdSmrgm4_define([_LT_UNLESS_OPTIONS], 9974555991fdSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9975555991fdSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9976555991fdSmrg [m4_define([$0_found])])])[]dnl 9977555991fdSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9978555991fdSmrg])[]dnl 9979126a8a12Smrg]) 9980126a8a12Smrg 9981126a8a12Smrg 9982555991fdSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9983555991fdSmrg# ---------------------------------------- 9984555991fdSmrg# OPTION-LIST is a space-separated list of Libtool options associated 9985555991fdSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9986555991fdSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9987555991fdSmrg# the unknown option and exit. 9988555991fdSmrgm4_defun([_LT_SET_OPTIONS], 9989555991fdSmrg[# Set options 9990555991fdSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9991555991fdSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 9992555991fdSmrg 9993555991fdSmrgm4_if([$1],[LT_INIT],[ 9994555991fdSmrg dnl 9995555991fdSmrg dnl Simply set some default values (i.e off) if boolean options were not 9996555991fdSmrg dnl specified: 9997555991fdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9998555991fdSmrg ]) 9999555991fdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 10000555991fdSmrg ]) 10001555991fdSmrg dnl 10002555991fdSmrg dnl If no reference was made to various pairs of opposing options, then 10003555991fdSmrg dnl we run the default mode handler for the pair. For example, if neither 10004555991fdSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 10005555991fdSmrg dnl archives by default: 10006555991fdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 10007555991fdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 10008555991fdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 10009555991fdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 10010555991fdSmrg [_LT_ENABLE_FAST_INSTALL]) 10011555991fdSmrg ]) 10012555991fdSmrg])# _LT_SET_OPTIONS 10013555991fdSmrg 10014555991fdSmrg 10015126a8a12Smrg 10016555991fdSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 10017555991fdSmrg# ----------------------------------------- 10018555991fdSmrgm4_define([_LT_MANGLE_DEFUN], 10019555991fdSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 10020126a8a12Smrg 10021126a8a12Smrg 10022555991fdSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 10023555991fdSmrg# ----------------------------------------------- 10024555991fdSmrgm4_define([LT_OPTION_DEFINE], 10025555991fdSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 10026555991fdSmrg])# LT_OPTION_DEFINE 10027126a8a12Smrg 10028555991fdSmrg 10029555991fdSmrg# dlopen 10030555991fdSmrg# ------ 10031555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 10032126a8a12Smrg]) 10033126a8a12Smrg 10034555991fdSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 10035555991fdSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 10036555991fdSmrgAC_DIAGNOSE([obsolete], 10037555991fdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10038555991fdSmrgput the `dlopen' option into LT_INIT's first parameter.]) 10039555991fdSmrg]) 10040126a8a12Smrg 10041555991fdSmrgdnl aclocal-1.4 backwards compatibility: 10042555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 10043126a8a12Smrg 10044126a8a12Smrg 10045555991fdSmrg# win32-dll 10046555991fdSmrg# --------- 10047555991fdSmrg# Declare package support for building win32 dll's. 10048555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 10049555991fdSmrg[enable_win32_dll=yes 10050126a8a12Smrg 10051555991fdSmrgcase $host in 10052555991fdSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 10053555991fdSmrg AC_CHECK_TOOL(AS, as, false) 10054555991fdSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10055555991fdSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 10056555991fdSmrg ;; 10057555991fdSmrgesac 10058126a8a12Smrg 10059555991fdSmrgtest -z "$AS" && AS=as 10060555991fdSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 10061126a8a12Smrg 10062555991fdSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 10063555991fdSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 10064126a8a12Smrg 10065555991fdSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 10066555991fdSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 10067555991fdSmrg])# win32-dll 10068126a8a12Smrg 10069555991fdSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 10070555991fdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10071555991fdSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 10072555991fdSmrgAC_DIAGNOSE([obsolete], 10073555991fdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10074555991fdSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 10075555991fdSmrg]) 10076126a8a12Smrg 10077555991fdSmrgdnl aclocal-1.4 backwards compatibility: 10078555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 10079126a8a12Smrg 10080126a8a12Smrg 10081555991fdSmrg# _LT_ENABLE_SHARED([DEFAULT]) 10082555991fdSmrg# ---------------------------- 10083555991fdSmrg# implement the --enable-shared flag, and supports the `shared' and 10084555991fdSmrg# `disable-shared' LT_INIT options. 10085555991fdSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10086555991fdSmrgm4_define([_LT_ENABLE_SHARED], 10087555991fdSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 10088555991fdSmrgAC_ARG_ENABLE([shared], 10089555991fdSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 10090555991fdSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 10091555991fdSmrg [p=${PACKAGE-default} 10092555991fdSmrg case $enableval in 10093555991fdSmrg yes) enable_shared=yes ;; 10094555991fdSmrg no) enable_shared=no ;; 10095555991fdSmrg *) 10096555991fdSmrg enable_shared=no 10097555991fdSmrg # Look at the argument we got. We use all the common list separators. 10098555991fdSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10099555991fdSmrg for pkg in $enableval; do 10100555991fdSmrg IFS="$lt_save_ifs" 10101555991fdSmrg if test "X$pkg" = "X$p"; then 10102555991fdSmrg enable_shared=yes 10103555991fdSmrg fi 10104555991fdSmrg done 10105555991fdSmrg IFS="$lt_save_ifs" 10106555991fdSmrg ;; 10107555991fdSmrg esac], 10108555991fdSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 10109555991fdSmrg 10110555991fdSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 10111555991fdSmrg [Whether or not to build shared libraries]) 10112555991fdSmrg])# _LT_ENABLE_SHARED 10113555991fdSmrg 10114555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10115555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 10116555991fdSmrg 10117555991fdSmrg# Old names: 10118555991fdSmrgAC_DEFUN([AC_ENABLE_SHARED], 10119555991fdSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10120126a8a12Smrg]) 10121555991fdSmrg 10122555991fdSmrgAC_DEFUN([AC_DISABLE_SHARED], 10123555991fdSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10124126a8a12Smrg]) 10125126a8a12Smrg 10126555991fdSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10127555991fdSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10128d656433aSmrg 10129555991fdSmrgdnl aclocal-1.4 backwards compatibility: 10130555991fdSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 10131555991fdSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 10132126a8a12Smrg 10133126a8a12Smrg 10134126a8a12Smrg 10135555991fdSmrg# _LT_ENABLE_STATIC([DEFAULT]) 10136555991fdSmrg# ---------------------------- 10137555991fdSmrg# implement the --enable-static flag, and support the `static' and 10138555991fdSmrg# `disable-static' LT_INIT options. 10139555991fdSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10140555991fdSmrgm4_define([_LT_ENABLE_STATIC], 10141555991fdSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10142555991fdSmrgAC_ARG_ENABLE([static], 10143555991fdSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10144555991fdSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10145555991fdSmrg [p=${PACKAGE-default} 10146555991fdSmrg case $enableval in 10147555991fdSmrg yes) enable_static=yes ;; 10148555991fdSmrg no) enable_static=no ;; 10149555991fdSmrg *) 10150555991fdSmrg enable_static=no 10151555991fdSmrg # Look at the argument we got. We use all the common list separators. 10152555991fdSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10153555991fdSmrg for pkg in $enableval; do 10154555991fdSmrg IFS="$lt_save_ifs" 10155555991fdSmrg if test "X$pkg" = "X$p"; then 10156555991fdSmrg enable_static=yes 10157555991fdSmrg fi 10158555991fdSmrg done 10159555991fdSmrg IFS="$lt_save_ifs" 10160555991fdSmrg ;; 10161555991fdSmrg esac], 10162555991fdSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10163126a8a12Smrg 10164555991fdSmrg _LT_DECL([build_old_libs], [enable_static], [0], 10165555991fdSmrg [Whether or not to build static libraries]) 10166555991fdSmrg])# _LT_ENABLE_STATIC 10167126a8a12Smrg 10168555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10169555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10170126a8a12Smrg 10171555991fdSmrg# Old names: 10172555991fdSmrgAC_DEFUN([AC_ENABLE_STATIC], 10173555991fdSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10174555991fdSmrg]) 10175126a8a12Smrg 10176555991fdSmrgAC_DEFUN([AC_DISABLE_STATIC], 10177555991fdSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 10178555991fdSmrg]) 10179126a8a12Smrg 10180555991fdSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10181555991fdSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10182126a8a12Smrg 10183555991fdSmrgdnl aclocal-1.4 backwards compatibility: 10184555991fdSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 10185555991fdSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 10186126a8a12Smrg 10187126a8a12Smrg 10188126a8a12Smrg 10189555991fdSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10190555991fdSmrg# ---------------------------------- 10191555991fdSmrg# implement the --enable-fast-install flag, and support the `fast-install' 10192555991fdSmrg# and `disable-fast-install' LT_INIT options. 10193555991fdSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10194555991fdSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 10195555991fdSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10196555991fdSmrgAC_ARG_ENABLE([fast-install], 10197555991fdSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10198555991fdSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10199555991fdSmrg [p=${PACKAGE-default} 10200555991fdSmrg case $enableval in 10201555991fdSmrg yes) enable_fast_install=yes ;; 10202555991fdSmrg no) enable_fast_install=no ;; 10203555991fdSmrg *) 10204555991fdSmrg enable_fast_install=no 10205555991fdSmrg # Look at the argument we got. We use all the common list separators. 10206555991fdSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10207555991fdSmrg for pkg in $enableval; do 10208555991fdSmrg IFS="$lt_save_ifs" 10209555991fdSmrg if test "X$pkg" = "X$p"; then 10210555991fdSmrg enable_fast_install=yes 10211555991fdSmrg fi 10212555991fdSmrg done 10213555991fdSmrg IFS="$lt_save_ifs" 10214555991fdSmrg ;; 10215555991fdSmrg esac], 10216555991fdSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 10217126a8a12Smrg 10218555991fdSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 10219555991fdSmrg [Whether or not to optimize for fast installation])dnl 10220555991fdSmrg])# _LT_ENABLE_FAST_INSTALL 10221126a8a12Smrg 10222555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10223555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10224126a8a12Smrg 10225555991fdSmrg# Old names: 10226555991fdSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 10227555991fdSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10228555991fdSmrgAC_DIAGNOSE([obsolete], 10229555991fdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10230555991fdSmrgthe `fast-install' option into LT_INIT's first parameter.]) 10231555991fdSmrg]) 10232126a8a12Smrg 10233555991fdSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 10234555991fdSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10235555991fdSmrgAC_DIAGNOSE([obsolete], 10236555991fdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10237555991fdSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 10238126a8a12Smrg]) 10239126a8a12Smrg 10240555991fdSmrgdnl aclocal-1.4 backwards compatibility: 10241555991fdSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10242555991fdSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10243126a8a12Smrg 10244126a8a12Smrg 10245555991fdSmrg# _LT_WITH_PIC([MODE]) 10246555991fdSmrg# -------------------- 10247555991fdSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 10248555991fdSmrg# LT_INIT options. 10249555991fdSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 10250555991fdSmrgm4_define([_LT_WITH_PIC], 10251555991fdSmrg[AC_ARG_WITH([pic], 10252555991fdSmrg [AS_HELP_STRING([--with-pic], 10253555991fdSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 10254555991fdSmrg [pic_mode="$withval"], 10255555991fdSmrg [pic_mode=default]) 10256126a8a12Smrg 10257555991fdSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10258126a8a12Smrg 10259555991fdSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10260555991fdSmrg])# _LT_WITH_PIC 10261126a8a12Smrg 10262555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10263555991fdSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 10264555991fdSmrg 10265555991fdSmrg# Old name: 10266555991fdSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 10267555991fdSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 10268555991fdSmrgAC_DIAGNOSE([obsolete], 10269555991fdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10270555991fdSmrgput the `pic-only' option into LT_INIT's first parameter.]) 10271126a8a12Smrg]) 10272126a8a12Smrg 10273555991fdSmrgdnl aclocal-1.4 backwards compatibility: 10274555991fdSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10275126a8a12Smrg 10276126a8a12Smrg 10277555991fdSmrgm4_define([_LTDL_MODE], []) 10278555991fdSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10279555991fdSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 10280555991fdSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 10281555991fdSmrg [m4_define([_LTDL_MODE], [recursive])]) 10282555991fdSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 10283555991fdSmrg [m4_define([_LTDL_MODE], [subproject])]) 10284126a8a12Smrg 10285555991fdSmrgm4_define([_LTDL_TYPE], []) 10286555991fdSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 10287555991fdSmrg [m4_define([_LTDL_TYPE], [installable])]) 10288555991fdSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 10289555991fdSmrg [m4_define([_LTDL_TYPE], [convenience])]) 10290555991fdSmrg 10291555991fdSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10292126a8a12Smrg# 10293555991fdSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10294555991fdSmrg# Written by Gary V. Vaughan, 2004 10295555991fdSmrg# 10296555991fdSmrg# This file is free software; the Free Software Foundation gives 10297555991fdSmrg# unlimited permission to copy and/or distribute it, with or without 10298555991fdSmrg# modifications, as long as this notice is preserved. 10299126a8a12Smrg 10300555991fdSmrg# serial 6 ltsugar.m4 10301126a8a12Smrg 10302555991fdSmrg# This is to help aclocal find these macros, as it can't see m4_define. 10303555991fdSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10304126a8a12Smrg 10305126a8a12Smrg 10306555991fdSmrg# lt_join(SEP, ARG1, [ARG2...]) 10307555991fdSmrg# ----------------------------- 10308555991fdSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10309555991fdSmrg# associated separator. 10310555991fdSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10311555991fdSmrg# versions in m4sugar had bugs. 10312555991fdSmrgm4_define([lt_join], 10313555991fdSmrg[m4_if([$#], [1], [], 10314555991fdSmrg [$#], [2], [[$2]], 10315555991fdSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10316555991fdSmrgm4_define([_lt_join], 10317555991fdSmrg[m4_if([$#$2], [2], [], 10318555991fdSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10319126a8a12Smrg 10320126a8a12Smrg 10321555991fdSmrg# lt_car(LIST) 10322555991fdSmrg# lt_cdr(LIST) 10323555991fdSmrg# ------------ 10324555991fdSmrg# Manipulate m4 lists. 10325555991fdSmrg# These macros are necessary as long as will still need to support 10326555991fdSmrg# Autoconf-2.59 which quotes differently. 10327555991fdSmrgm4_define([lt_car], [[$1]]) 10328555991fdSmrgm4_define([lt_cdr], 10329555991fdSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10330555991fdSmrg [$#], 1, [], 10331555991fdSmrg [m4_dquote(m4_shift($@))])]) 10332555991fdSmrgm4_define([lt_unquote], $1) 10333126a8a12Smrg 10334555991fdSmrg 10335555991fdSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10336555991fdSmrg# ------------------------------------------ 10337555991fdSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10338555991fdSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10339555991fdSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10340555991fdSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10341555991fdSmrg# than defined and empty). 10342126a8a12Smrg# 10343555991fdSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10344555991fdSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10345555991fdSmrgm4_define([lt_append], 10346555991fdSmrg[m4_define([$1], 10347555991fdSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10348126a8a12Smrg 10349126a8a12Smrg 10350d656433aSmrg 10351555991fdSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10352555991fdSmrg# ---------------------------------------------------------- 10353555991fdSmrg# Produce a SEP delimited list of all paired combinations of elements of 10354555991fdSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10355555991fdSmrg# has the form PREFIXmINFIXSUFFIXn. 10356555991fdSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10357555991fdSmrgm4_define([lt_combine], 10358555991fdSmrg[m4_if(m4_eval([$# > 3]), [1], 10359555991fdSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10360555991fdSmrg[[m4_foreach([_Lt_prefix], [$2], 10361555991fdSmrg [m4_foreach([_Lt_suffix], 10362555991fdSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10363555991fdSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10364555991fdSmrg 10365555991fdSmrg 10366555991fdSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10367555991fdSmrg# ----------------------------------------------------------------------- 10368555991fdSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10369555991fdSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10370555991fdSmrgm4_define([lt_if_append_uniq], 10371555991fdSmrg[m4_ifdef([$1], 10372555991fdSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10373555991fdSmrg [lt_append([$1], [$2], [$3])$4], 10374555991fdSmrg [$5])], 10375555991fdSmrg [lt_append([$1], [$2], [$3])$4])]) 10376555991fdSmrg 10377555991fdSmrg 10378555991fdSmrg# lt_dict_add(DICT, KEY, VALUE) 10379555991fdSmrg# ----------------------------- 10380555991fdSmrgm4_define([lt_dict_add], 10381555991fdSmrg[m4_define([$1($2)], [$3])]) 10382555991fdSmrg 10383555991fdSmrg 10384555991fdSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10385555991fdSmrg# -------------------------------------------- 10386555991fdSmrgm4_define([lt_dict_add_subkey], 10387555991fdSmrg[m4_define([$1($2:$3)], [$4])]) 10388555991fdSmrg 10389555991fdSmrg 10390555991fdSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10391555991fdSmrg# ---------------------------------- 10392555991fdSmrgm4_define([lt_dict_fetch], 10393555991fdSmrg[m4_ifval([$3], 10394555991fdSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10395555991fdSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10396126a8a12Smrg 10397126a8a12Smrg 10398555991fdSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10399555991fdSmrg# ----------------------------------------------------------------- 10400555991fdSmrgm4_define([lt_if_dict_fetch], 10401555991fdSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10402555991fdSmrg [$5], 10403555991fdSmrg [$6])]) 10404126a8a12Smrg 10405126a8a12Smrg 10406555991fdSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10407555991fdSmrg# -------------------------------------------------------------- 10408555991fdSmrgm4_define([lt_dict_filter], 10409555991fdSmrg[m4_if([$5], [], [], 10410555991fdSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10411555991fdSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10412555991fdSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10413555991fdSmrg]) 10414126a8a12Smrg 10415555991fdSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10416126a8a12Smrg# 10417555991fdSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 10418555991fdSmrg# Written by Scott James Remnant, 2004 10419555991fdSmrg# 10420555991fdSmrg# This file is free software; the Free Software Foundation gives 10421555991fdSmrg# unlimited permission to copy and/or distribute it, with or without 10422555991fdSmrg# modifications, as long as this notice is preserved. 10423126a8a12Smrg 10424555991fdSmrg# Generated from ltversion.in. 10425d656433aSmrg 10426555991fdSmrg# serial 3175 ltversion.m4 10427555991fdSmrg# This file is part of GNU Libtool 10428126a8a12Smrg 10429555991fdSmrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 10430555991fdSmrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 10431d656433aSmrg 10432555991fdSmrgAC_DEFUN([LTVERSION_VERSION], 10433555991fdSmrg[macro_version='2.2.10' 10434555991fdSmrgmacro_revision='1.3175' 10435555991fdSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10436555991fdSmrg_LT_DECL(, macro_revision, 0) 10437555991fdSmrg]) 10438126a8a12Smrg 10439555991fdSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10440126a8a12Smrg# 10441555991fdSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 10442555991fdSmrg# Written by Scott James Remnant, 2004. 10443555991fdSmrg# 10444555991fdSmrg# This file is free software; the Free Software Foundation gives 10445555991fdSmrg# unlimited permission to copy and/or distribute it, with or without 10446555991fdSmrg# modifications, as long as this notice is preserved. 10447126a8a12Smrg 10448555991fdSmrg# serial 5 lt~obsolete.m4 10449126a8a12Smrg 10450555991fdSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 10451126a8a12Smrg# 10452555991fdSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10453555991fdSmrg# which have later been changed to m4_define as they aren't part of the 10454555991fdSmrg# exported API, or moved to Autoconf or Automake where they belong. 10455126a8a12Smrg# 10456555991fdSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10457555991fdSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10458555991fdSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 10459555991fdSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10460555991fdSmrg# and doesn't know about Autoconf macros at all.) 10461555991fdSmrg# 10462555991fdSmrg# So we provide this file, which has a silly filename so it's always 10463555991fdSmrg# included after everything else. This provides aclocal with the 10464555991fdSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10465555991fdSmrg# because those macros already exist, or will be overwritten later. 10466555991fdSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10467555991fdSmrg# 10468555991fdSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10469555991fdSmrg# Yes, that means every name once taken will need to remain here until 10470555991fdSmrg# we give up compatibility with versions before 1.7, at which point 10471555991fdSmrg# we need to keep only those names which we still refer to. 10472126a8a12Smrg 10473555991fdSmrg# This is to help aclocal find these macros, as it can't see m4_define. 10474555991fdSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10475126a8a12Smrg 10476555991fdSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10477555991fdSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10478555991fdSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10479555991fdSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10480555991fdSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10481555991fdSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10482555991fdSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10483555991fdSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10484555991fdSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10485555991fdSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10486555991fdSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10487555991fdSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10488555991fdSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10489555991fdSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10490555991fdSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10491555991fdSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10492555991fdSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10493555991fdSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10494555991fdSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10495555991fdSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10496555991fdSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10497555991fdSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10498555991fdSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10499555991fdSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10500555991fdSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10501555991fdSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10502555991fdSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10503555991fdSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10504555991fdSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10505555991fdSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10506555991fdSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10507555991fdSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10508555991fdSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10509555991fdSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10510555991fdSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10511555991fdSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10512555991fdSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10513555991fdSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10514555991fdSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10515555991fdSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10516555991fdSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10517555991fdSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10518555991fdSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10519555991fdSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10520555991fdSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10521555991fdSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10522555991fdSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10523555991fdSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10524555991fdSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10525555991fdSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10526555991fdSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10527555991fdSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10528555991fdSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10529555991fdSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10530555991fdSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 10531555991fdSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 10532555991fdSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 10533555991fdSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 10534555991fdSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 10535555991fdSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 10536555991fdSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 10537126a8a12Smrg 10538