1# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2 3# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18[m4_warning([this file was generated for autoconf 2.71. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24# 25# This file is free software; the Free Software Foundation 26# gives unlimited permission to copy and/or distribute it, 27# with or without modifications, as long as this notice is preserved. 28 29# AM_AUTOMAKE_VERSION(VERSION) 30# ---------------------------- 31# Automake X.Y traces this macro to ensure aclocal.m4 has been 32# generated from the m4 files accompanying Automake X.Y. 33# (This private macro should not be called outside this file.) 34AC_DEFUN([AM_AUTOMAKE_VERSION], 35[am__api_version='1.16' 36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37dnl require some minimum version. Point them to the right macro. 38m4_if([$1], [1.16.5], [], 39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40]) 41 42# _AM_AUTOCONF_VERSION(VERSION) 43# ----------------------------- 44# aclocal traces this macro to find the Autoconf version. 45# This is a private macro too. Using m4_define simplifies 46# the logic in aclocal, which can simply ignore this definition. 47m4_define([_AM_AUTOCONF_VERSION], []) 48 49# AM_SET_CURRENT_AUTOMAKE_VERSION 50# ------------------------------- 51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54[AM_AUTOMAKE_VERSION([1.16.5])dnl 55m4_ifndef([AC_AUTOCONF_VERSION], 56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58 59# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60 61# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62# 63# This file is free software; the Free Software Foundation 64# gives unlimited permission to copy and/or distribute it, 65# with or without modifications, as long as this notice is preserved. 66 67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70# 71# Of course, Automake must honor this variable whenever it calls a 72# tool from the auxiliary directory. The problem is that $srcdir (and 73# therefore $ac_aux_dir as well) can be either absolute or relative, 74# depending on how configure is run. This is pretty annoying, since 75# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76# source directory, any form will work fine, but in subdirectories a 77# relative path needs to be adjusted first. 78# 79# $ac_aux_dir/missing 80# fails when called from a subdirectory if $ac_aux_dir is relative 81# $top_srcdir/$ac_aux_dir/missing 82# fails if $ac_aux_dir is absolute, 83# fails when called from a subdirectory in a VPATH build with 84# a relative $ac_aux_dir 85# 86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87# are both prefixed by $srcdir. In an in-source build this is usually 88# harmless because $srcdir is '.', but things will broke when you 89# start a VPATH build or use an absolute $srcdir. 90# 91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94# and then we would define $MISSING as 95# MISSING="\${SHELL} $am_aux_dir/missing" 96# This will work as long as MISSING is not called from configure, because 97# unfortunately $(top_srcdir) has no meaning in configure. 98# However there are other variables, like CC, which are often used in 99# configure, and could therefore not use this "fixed" $ac_aux_dir. 100# 101# Another solution, used here, is to always expand $ac_aux_dir to an 102# absolute PATH. The drawback is that using absolute paths prevent a 103# configured tree to be moved without reconfiguration. 104 105AC_DEFUN([AM_AUX_DIR_EXPAND], 106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107# Expand $ac_aux_dir to an absolute path. 108am_aux_dir=`cd "$ac_aux_dir" && pwd` 109]) 110 111# AM_CONDITIONAL -*- Autoconf -*- 112 113# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114# 115# This file is free software; the Free Software Foundation 116# gives unlimited permission to copy and/or distribute it, 117# with or without modifications, as long as this notice is preserved. 118 119# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120# ------------------------------------- 121# Define a conditional. 122AC_DEFUN([AM_CONDITIONAL], 123[AC_PREREQ([2.52])dnl 124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126AC_SUBST([$1_TRUE])dnl 127AC_SUBST([$1_FALSE])dnl 128_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130m4_define([_AM_COND_VALUE_$1], [$2])dnl 131if $2; then 132 $1_TRUE= 133 $1_FALSE='#' 134else 135 $1_TRUE='#' 136 $1_FALSE= 137fi 138AC_CONFIG_COMMANDS_PRE( 139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140 AC_MSG_ERROR([[conditional "$1" was never defined. 141Usually this means the macro was only invoked conditionally.]]) 142fi])]) 143 144# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145# 146# This file is free software; the Free Software Foundation 147# gives unlimited permission to copy and/or distribute it, 148# with or without modifications, as long as this notice is preserved. 149 150 151# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152# written in clear, in which case automake, when reading aclocal.m4, 153# will think it sees a *use*, and therefore will trigger all it's 154# C support machinery. Also note that it means that autoscan, seeing 155# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156 157 158# _AM_DEPENDENCIES(NAME) 159# ---------------------- 160# See how the compiler implements dependency checking. 161# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162# We try a few techniques and use that to set a single cache variable. 163# 164# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166# dependency, and given that the user is not expected to run this macro, 167# just rely on AC_PROG_CC. 168AC_DEFUN([_AM_DEPENDENCIES], 169[AC_REQUIRE([AM_SET_DEPDIR])dnl 170AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171AC_REQUIRE([AM_MAKE_INCLUDE])dnl 172AC_REQUIRE([AM_DEP_TRACK])dnl 173 174m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180 [depcc="$$1" am_compiler_list=]) 181 182AC_CACHE_CHECK([dependency style of $depcc], 183 [am_cv_$1_dependencies_compiler_type], 184[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185 # We make a subdir and do the tests there. Otherwise we can end up 186 # making bogus files that we don't know about and never remove. For 187 # instance it was reported that on HP-UX the gcc test will end up 188 # making a dummy file named 'D' -- because '-MD' means "put the output 189 # in D". 190 rm -rf conftest.dir 191 mkdir conftest.dir 192 # Copy depcomp to subdir because otherwise we won't find it if we're 193 # using a relative directory. 194 cp "$am_depcomp" conftest.dir 195 cd conftest.dir 196 # We will build objects and dependencies in a subdirectory because 197 # it helps to detect inapplicable dependency modes. For instance 198 # both Tru64's cc and ICC support -MD to output dependencies as a 199 # side effect of compilation, but ICC will put the dependencies in 200 # the current directory while Tru64 will put them in the object 201 # directory. 202 mkdir sub 203 204 am_cv_$1_dependencies_compiler_type=none 205 if test "$am_compiler_list" = ""; then 206 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207 fi 208 am__universal=false 209 m4_case([$1], [CC], 210 [case " $depcc " in #( 211 *\ -arch\ *\ -arch\ *) am__universal=true ;; 212 esac], 213 [CXX], 214 [case " $depcc " in #( 215 *\ -arch\ *\ -arch\ *) am__universal=true ;; 216 esac]) 217 218 for depmode in $am_compiler_list; do 219 # Setup a source with many dependencies, because some compilers 220 # like to wrap large dependency lists on column 80 (with \), and 221 # we should not choose a depcomp mode which is confused by this. 222 # 223 # We need to recreate these files for each test, as the compiler may 224 # overwrite some of them when testing with obscure command lines. 225 # This happens at least with the AIX C compiler. 226 : > sub/conftest.c 227 for i in 1 2 3 4 5 6; do 228 echo '#include "conftst'$i'.h"' >> sub/conftest.c 229 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230 # Solaris 10 /bin/sh. 231 echo '/* dummy */' > sub/conftst$i.h 232 done 233 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234 235 # We check with '-c' and '-o' for the sake of the "dashmstdout" 236 # mode. It turns out that the SunPro C++ compiler does not properly 237 # handle '-M -o', and we need to detect this. Also, some Intel 238 # versions had trouble with output in subdirs. 239 am__obj=sub/conftest.${OBJEXT-o} 240 am__minus_obj="-o $am__obj" 241 case $depmode in 242 gcc) 243 # This depmode causes a compiler race in universal mode. 244 test "$am__universal" = false || continue 245 ;; 246 nosideeffect) 247 # After this tag, mechanisms are not by side-effect, so they'll 248 # only be used when explicitly requested. 249 if test "x$enable_dependency_tracking" = xyes; then 250 continue 251 else 252 break 253 fi 254 ;; 255 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256 # This compiler won't grok '-c -o', but also, the minuso test has 257 # not run yet. These depmodes are late enough in the game, and 258 # so weak that their functioning should not be impacted. 259 am__obj=conftest.${OBJEXT-o} 260 am__minus_obj= 261 ;; 262 none) break ;; 263 esac 264 if depmode=$depmode \ 265 source=sub/conftest.c object=$am__obj \ 266 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268 >/dev/null 2>conftest.err && 269 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273 # icc doesn't choke on unknown options, it will just issue warnings 274 # or remarks (even with -Werror). So we grep stderr for any message 275 # that says an option was ignored or not supported. 276 # When given -MP, icc 7.0 and 7.1 complain thusly: 277 # icc: Command line warning: ignoring option '-M'; no argument required 278 # The diagnosis changed in icc 8.0: 279 # icc: Command line remark: option '-MP' not supported 280 if (grep 'ignoring option' conftest.err || 281 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282 am_cv_$1_dependencies_compiler_type=$depmode 283 break 284 fi 285 fi 286 done 287 288 cd .. 289 rm -rf conftest.dir 290else 291 am_cv_$1_dependencies_compiler_type=none 292fi 293]) 294AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295AM_CONDITIONAL([am__fastdep$1], [ 296 test "x$enable_dependency_tracking" != xno \ 297 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298]) 299 300 301# AM_SET_DEPDIR 302# ------------- 303# Choose a directory name for dependency files. 304# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305AC_DEFUN([AM_SET_DEPDIR], 306[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308]) 309 310 311# AM_DEP_TRACK 312# ------------ 313AC_DEFUN([AM_DEP_TRACK], 314[AC_ARG_ENABLE([dependency-tracking], [dnl 315AS_HELP_STRING( 316 [--enable-dependency-tracking], 317 [do not reject slow dependency extractors]) 318AS_HELP_STRING( 319 [--disable-dependency-tracking], 320 [speeds up one-time build])]) 321if test "x$enable_dependency_tracking" != xno; then 322 am_depcomp="$ac_aux_dir/depcomp" 323 AMDEPBACKSLASH='\' 324 am__nodep='_no' 325fi 326AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327AC_SUBST([AMDEPBACKSLASH])dnl 328_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329AC_SUBST([am__nodep])dnl 330_AM_SUBST_NOTMAKE([am__nodep])dnl 331]) 332 333# Generate code to set up dependency tracking. -*- Autoconf -*- 334 335# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336# 337# This file is free software; the Free Software Foundation 338# gives unlimited permission to copy and/or distribute it, 339# with or without modifications, as long as this notice is preserved. 340 341# _AM_OUTPUT_DEPENDENCY_COMMANDS 342# ------------------------------ 343AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344[{ 345 # Older Autoconf quotes --file arguments for eval, but not when files 346 # are listed without --file. Let's play safe and only enable the eval 347 # if we detect the quoting. 348 # TODO: see whether this extra hack can be removed once we start 349 # requiring Autoconf 2.70 or later. 350 AS_CASE([$CONFIG_FILES], 351 [*\'*], [eval set x "$CONFIG_FILES"], 352 [*], [set x $CONFIG_FILES]) 353 shift 354 # Used to flag and report bootstrapping failures. 355 am_rc=0 356 for am_mf 357 do 358 # Strip MF so we end up with the name of the file. 359 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360 # Check whether this is an Automake generated Makefile which includes 361 # dependency-tracking related rules and includes. 362 # Grep'ing the whole file directly is not great: AIX grep has a line 363 # limit of 2048, but all sed's we know have understand at least 4000. 364 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365 || continue 366 am_dirpart=`AS_DIRNAME(["$am_mf"])` 367 am_filepart=`AS_BASENAME(["$am_mf"])` 368 AM_RUN_LOG([cd "$am_dirpart" \ 369 && sed -e '/# am--include-marker/d' "$am_filepart" \ 370 | $MAKE -f - am--depfiles]) || am_rc=$? 371 done 372 if test $am_rc -ne 0; then 373 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374 for automatic dependency tracking. If GNU make was not used, consider 375 re-running the configure script with MAKE="gmake" (or whatever is 376 necessary). You can also try re-running configure with the 377 '--disable-dependency-tracking' option to at least be able to build 378 the package (albeit without support for automatic dependency tracking).]) 379 fi 380 AS_UNSET([am_dirpart]) 381 AS_UNSET([am_filepart]) 382 AS_UNSET([am_mf]) 383 AS_UNSET([am_rc]) 384 rm -f conftest-deps.mk 385} 386])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387 388 389# AM_OUTPUT_DEPENDENCY_COMMANDS 390# ----------------------------- 391# This macro should only be invoked once -- use via AC_REQUIRE. 392# 393# This code is only required when automatic dependency tracking is enabled. 394# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395# order to bootstrap the dependency handling code. 396AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397[AC_CONFIG_COMMANDS([depfiles], 398 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400 401# Do all the work for Automake. -*- Autoconf -*- 402 403# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404# 405# This file is free software; the Free Software Foundation 406# gives unlimited permission to copy and/or distribute it, 407# with or without modifications, as long as this notice is preserved. 408 409# This macro actually does too much. Some checks are only needed if 410# your package does certain things. But this isn't really a big deal. 411 412dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413m4_define([AC_PROG_CC], 414m4_defn([AC_PROG_CC]) 415[_AM_PROG_CC_C_O 416]) 417 418# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419# AM_INIT_AUTOMAKE([OPTIONS]) 420# ----------------------------------------------- 421# The call with PACKAGE and VERSION arguments is the old style 422# call (pre autoconf-2.50), which is being phased out. PACKAGE 423# and VERSION should now be passed to AC_INIT and removed from 424# the call to AM_INIT_AUTOMAKE. 425# We support both call styles for the transition. After 426# the next Automake release, Autoconf can make the AC_INIT 427# arguments mandatory, and then we can depend on a new Autoconf 428# release and drop the old call support. 429AC_DEFUN([AM_INIT_AUTOMAKE], 430[AC_PREREQ([2.65])dnl 431m4_ifdef([_$0_ALREADY_INIT], 432 [m4_fatal([$0 expanded multiple times 433]m4_defn([_$0_ALREADY_INIT]))], 434 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435dnl Autoconf wants to disallow AM_ names. We explicitly allow 436dnl the ones we care about. 437m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439AC_REQUIRE([AC_PROG_INSTALL])dnl 440if test "`cd $srcdir && pwd`" != "`pwd`"; then 441 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442 # is not polluted with repeated "-I." 443 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444 # test to see if srcdir already configured 445 if test -f $srcdir/config.status; then 446 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447 fi 448fi 449 450# test whether we have cygpath 451if test -z "$CYGPATH_W"; then 452 if (cygpath --version) >/dev/null 2>/dev/null; then 453 CYGPATH_W='cygpath -w' 454 else 455 CYGPATH_W=echo 456 fi 457fi 458AC_SUBST([CYGPATH_W]) 459 460# Define the identity of the package. 461dnl Distinguish between old-style and new-style calls. 462m4_ifval([$2], 463[AC_DIAGNOSE([obsolete], 464 [$0: two- and three-arguments forms are deprecated.]) 465m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466 AC_SUBST([PACKAGE], [$1])dnl 467 AC_SUBST([VERSION], [$2])], 468[_AM_SET_OPTIONS([$1])dnl 469dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470m4_if( 471 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472 [ok:ok],, 473 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476 477_AM_IF_OPTION([no-define],, 478[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480 481# Some tools Automake needs. 482AC_REQUIRE([AM_SANITY_CHECK])dnl 483AC_REQUIRE([AC_ARG_PROGRAM])dnl 484AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485AM_MISSING_PROG([AUTOCONF], [autoconf]) 486AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487AM_MISSING_PROG([AUTOHEADER], [autoheader]) 488AM_MISSING_PROG([MAKEINFO], [makeinfo]) 489AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491AC_REQUIRE([AC_PROG_MKDIR_P])dnl 492# For better backward compatibility. To be removed once Automake 1.9.x 493# dies out for good. For more background, see: 494# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497# We need awk for the "check" target (and possibly the TAP driver). The 498# system "awk" is bad on some platforms. 499AC_REQUIRE([AC_PROG_AWK])dnl 500AC_REQUIRE([AC_PROG_MAKE_SET])dnl 501AC_REQUIRE([AM_SET_LEADING_DOT])dnl 502_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504 [_AM_PROG_TAR([v7])])]) 505_AM_IF_OPTION([no-dependencies],, 506[AC_PROVIDE_IFELSE([AC_PROG_CC], 507 [_AM_DEPENDENCIES([CC])], 508 [m4_define([AC_PROG_CC], 509 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510AC_PROVIDE_IFELSE([AC_PROG_CXX], 511 [_AM_DEPENDENCIES([CXX])], 512 [m4_define([AC_PROG_CXX], 513 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514AC_PROVIDE_IFELSE([AC_PROG_OBJC], 515 [_AM_DEPENDENCIES([OBJC])], 516 [m4_define([AC_PROG_OBJC], 517 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519 [_AM_DEPENDENCIES([OBJCXX])], 520 [m4_define([AC_PROG_OBJCXX], 521 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522]) 523# Variables for tags utilities; see am/tags.am 524if test -z "$CTAGS"; then 525 CTAGS=ctags 526fi 527AC_SUBST([CTAGS]) 528if test -z "$ETAGS"; then 529 ETAGS=etags 530fi 531AC_SUBST([ETAGS]) 532if test -z "$CSCOPE"; then 533 CSCOPE=cscope 534fi 535AC_SUBST([CSCOPE]) 536 537AC_REQUIRE([AM_SILENT_RULES])dnl 538dnl The testsuite driver may need to know about EXEEXT, so add the 539dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541AC_CONFIG_COMMANDS_PRE(dnl 542[m4_provide_if([_AM_COMPILER_EXEEXT], 543 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544 545# POSIX will say in a future version that running "rm -f" with no argument 546# is OK; and we want to be able to make that assumption in our Makefile 547# recipes. So use an aggressive probe to check that the usage we want is 548# actually supported "in the wild" to an acceptable degree. 549# See automake bug#10828. 550# To make any issue more visible, cause the running configure to be aborted 551# by default if the 'rm' program in use doesn't match our expectations; the 552# user can still override this though. 553if rm -f && rm -fr && rm -rf; then : OK; else 554 cat >&2 <<'END' 555Oops! 556 557Your 'rm' program seems unable to run without file operands specified 558on the command line, even when the '-f' option is present. This is contrary 559to the behaviour of most rm programs out there, and not conforming with 560the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561 562Please tell bug-automake@gnu.org about your system, including the value 563of your $PATH and any error possibly output before this message. This 564can help us improve future automake versions. 565 566END 567 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568 echo 'Configuration will proceed anyway, since you have set the' >&2 569 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570 echo >&2 571 else 572 cat >&2 <<'END' 573Aborting the configuration process, to ensure you take notice of the issue. 574 575You can download and install GNU coreutils to get an 'rm' implementation 576that behaves properly: <https://www.gnu.org/software/coreutils/>. 577 578If you want to complete the configuration process using your problematic 579'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580to "yes", and re-run configure. 581 582END 583 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584 fi 585fi 586dnl The trailing newline in this macro's definition is deliberate, for 587dnl backward compatibility and to allow trailing 'dnl'-style comments 588dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589]) 590 591dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593dnl mangled by Autoconf and run in a shell conditional statement. 594m4_define([_AC_COMPILER_EXEEXT], 595m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596 597# When config.status generates a header, we must update the stamp-h file. 598# This file resides in the same directory as the config header 599# that is generated. The stamp files are numbered to have different names. 600 601# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602# loop where config.status creates the headers, so we can generate 603# our stamp files there. 604AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605[# Compute $1's index in $config_headers. 606_am_arg=$1 607_am_stamp_count=1 608for _am_header in $config_headers :; do 609 case $_am_header in 610 $_am_arg | $_am_arg:* ) 611 break ;; 612 * ) 613 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614 esac 615done 616echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617 618# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619# 620# This file is free software; the Free Software Foundation 621# gives unlimited permission to copy and/or distribute it, 622# with or without modifications, as long as this notice is preserved. 623 624# AM_PROG_INSTALL_SH 625# ------------------ 626# Define $install_sh. 627AC_DEFUN([AM_PROG_INSTALL_SH], 628[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629if test x"${install_sh+set}" != xset; then 630 case $am_aux_dir in 631 *\ * | *\ *) 632 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633 *) 634 install_sh="\${SHELL} $am_aux_dir/install-sh" 635 esac 636fi 637AC_SUBST([install_sh])]) 638 639# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640# 641# This file is free software; the Free Software Foundation 642# gives unlimited permission to copy and/or distribute it, 643# with or without modifications, as long as this notice is preserved. 644 645# Check whether the underlying file-system supports filenames 646# with a leading dot. For instance MS-DOS doesn't. 647AC_DEFUN([AM_SET_LEADING_DOT], 648[rm -rf .tst 2>/dev/null 649mkdir .tst 2>/dev/null 650if test -d .tst; then 651 am__leading_dot=. 652else 653 am__leading_dot=_ 654fi 655rmdir .tst 2>/dev/null 656AC_SUBST([am__leading_dot])]) 657 658# Check to see how 'make' treats includes. -*- Autoconf -*- 659 660# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661# 662# This file is free software; the Free Software Foundation 663# gives unlimited permission to copy and/or distribute it, 664# with or without modifications, as long as this notice is preserved. 665 666# AM_MAKE_INCLUDE() 667# ----------------- 668# Check whether make has an 'include' directive that can support all 669# the idioms we need for our automatic dependency tracking code. 670AC_DEFUN([AM_MAKE_INCLUDE], 671[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672cat > confinc.mk << 'END' 673am__doit: 674 @echo this is the am__doit target >confinc.out 675.PHONY: am__doit 676END 677am__include="#" 678am__quote= 679# BSD make does it like this. 680echo '.include "confinc.mk" # ignored' > confmf.BSD 681# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682echo 'include confinc.mk # ignored' > confmf.GNU 683_am_result=no 684for s in GNU BSD; do 685 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687 ['0:this is the am__doit target'], 688 [AS_CASE([$s], 689 [BSD], [am__include='.include' am__quote='"'], 690 [am__include='include' am__quote=''])]) 691 if test "$am__include" != "#"; then 692 _am_result="yes ($s style)" 693 break 694 fi 695done 696rm -f confinc.* confmf.* 697AC_MSG_RESULT([${_am_result}]) 698AC_SUBST([am__include])]) 699AC_SUBST([am__quote])]) 700 701# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702 703# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704# 705# This file is free software; the Free Software Foundation 706# gives unlimited permission to copy and/or distribute it, 707# with or without modifications, as long as this notice is preserved. 708 709# AM_MISSING_PROG(NAME, PROGRAM) 710# ------------------------------ 711AC_DEFUN([AM_MISSING_PROG], 712[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713$1=${$1-"${am_missing_run}$2"} 714AC_SUBST($1)]) 715 716# AM_MISSING_HAS_RUN 717# ------------------ 718# Define MISSING if not defined so far and test if it is modern enough. 719# If it is, set am_missing_run to use it, otherwise, to nothing. 720AC_DEFUN([AM_MISSING_HAS_RUN], 721[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722AC_REQUIRE_AUX_FILE([missing])dnl 723if test x"${MISSING+set}" != xset; then 724 MISSING="\${SHELL} '$am_aux_dir/missing'" 725fi 726# Use eval to expand $SHELL 727if eval "$MISSING --is-lightweight"; then 728 am_missing_run="$MISSING " 729else 730 am_missing_run= 731 AC_MSG_WARN(['missing' script is too old or missing]) 732fi 733]) 734 735# Helper functions for option handling. -*- Autoconf -*- 736 737# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738# 739# This file is free software; the Free Software Foundation 740# gives unlimited permission to copy and/or distribute it, 741# with or without modifications, as long as this notice is preserved. 742 743# _AM_MANGLE_OPTION(NAME) 744# ----------------------- 745AC_DEFUN([_AM_MANGLE_OPTION], 746[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747 748# _AM_SET_OPTION(NAME) 749# -------------------- 750# Set option NAME. Presently that only means defining a flag for this option. 751AC_DEFUN([_AM_SET_OPTION], 752[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753 754# _AM_SET_OPTIONS(OPTIONS) 755# ------------------------ 756# OPTIONS is a space-separated list of Automake options. 757AC_DEFUN([_AM_SET_OPTIONS], 758[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759 760# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761# ------------------------------------------- 762# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763AC_DEFUN([_AM_IF_OPTION], 764[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765 766# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767# 768# This file is free software; the Free Software Foundation 769# gives unlimited permission to copy and/or distribute it, 770# with or without modifications, as long as this notice is preserved. 771 772# _AM_PROG_CC_C_O 773# --------------- 774# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775# to automatically call this. 776AC_DEFUN([_AM_PROG_CC_C_O], 777[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778AC_REQUIRE_AUX_FILE([compile])dnl 779AC_LANG_PUSH([C])dnl 780AC_CACHE_CHECK( 781 [whether $CC understands -c and -o together], 782 [am_cv_prog_cc_c_o], 783 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784 # Make sure it works both with $CC and with simple cc. 785 # Following AC_PROG_CC_C_O, we do the test twice because some 786 # compilers refuse to overwrite an existing .o file with -o, 787 # though they will create one. 788 am_cv_prog_cc_c_o=yes 789 for am_i in 1 2; do 790 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791 && test -f conftest2.$ac_objext; then 792 : OK 793 else 794 am_cv_prog_cc_c_o=no 795 break 796 fi 797 done 798 rm -f core conftest* 799 unset am_i]) 800if test "$am_cv_prog_cc_c_o" != yes; then 801 # Losing compiler, so override with the script. 802 # FIXME: It is wrong to rewrite CC. 803 # But if we don't then we get into trouble of one sort or another. 804 # A longer-term fix would be to have automake use am__CC in this case, 805 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806 CC="$am_aux_dir/compile $CC" 807fi 808AC_LANG_POP([C])]) 809 810# For backward compatibility. 811AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812 813# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814# 815# This file is free software; the Free Software Foundation 816# gives unlimited permission to copy and/or distribute it, 817# with or without modifications, as long as this notice is preserved. 818 819# AM_RUN_LOG(COMMAND) 820# ------------------- 821# Run COMMAND, save the exit status in ac_status, and log it. 822# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823AC_DEFUN([AM_RUN_LOG], 824[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826 ac_status=$? 827 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828 (exit $ac_status); }]) 829 830# Check to make sure that the build environment is sane. -*- Autoconf -*- 831 832# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833# 834# This file is free software; the Free Software Foundation 835# gives unlimited permission to copy and/or distribute it, 836# with or without modifications, as long as this notice is preserved. 837 838# AM_SANITY_CHECK 839# --------------- 840AC_DEFUN([AM_SANITY_CHECK], 841[AC_MSG_CHECKING([whether build environment is sane]) 842# Reject unsafe characters in $srcdir or the absolute working directory 843# name. Accept space and tab only in the latter. 844am_lf=' 845' 846case `pwd` in 847 *[[\\\"\#\$\&\'\`$am_lf]]*) 848 AC_MSG_ERROR([unsafe absolute working directory name]);; 849esac 850case $srcdir in 851 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853esac 854 855# Do 'set' in a subshell so we don't clobber the current shell's 856# arguments. Must try -L first in case configure is actually a 857# symlink; some systems play weird games with the mod time of symlinks 858# (eg FreeBSD returns the mod time of the symlink's containing 859# directory). 860if ( 861 am_has_slept=no 862 for am_try in 1 2; do 863 echo "timestamp, slept: $am_has_slept" > conftest.file 864 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865 if test "$[*]" = "X"; then 866 # -L didn't work. 867 set X `ls -t "$srcdir/configure" conftest.file` 868 fi 869 if test "$[*]" != "X $srcdir/configure conftest.file" \ 870 && test "$[*]" != "X conftest.file $srcdir/configure"; then 871 872 # If neither matched, then we have a broken ls. This can happen 873 # if, for instance, CONFIG_SHELL is bash and it inherits a 874 # broken ls alias from the environment. This has actually 875 # happened. Such a system could not be considered "sane". 876 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877 alias in your environment]) 878 fi 879 if test "$[2]" = conftest.file || test $am_try -eq 2; then 880 break 881 fi 882 # Just in case. 883 sleep 1 884 am_has_slept=yes 885 done 886 test "$[2]" = conftest.file 887 ) 888then 889 # Ok. 890 : 891else 892 AC_MSG_ERROR([newly created file is older than distributed files! 893Check your system clock]) 894fi 895AC_MSG_RESULT([yes]) 896# If we didn't sleep, we still need to ensure time stamps of config.status and 897# generated files are strictly newer. 898am_sleep_pid= 899if grep 'slept: no' conftest.file >/dev/null 2>&1; then 900 ( sleep 1 ) & 901 am_sleep_pid=$! 902fi 903AC_CONFIG_COMMANDS_PRE( 904 [AC_MSG_CHECKING([that generated files are newer than configure]) 905 if test -n "$am_sleep_pid"; then 906 # Hide warnings about reused PIDs. 907 wait $am_sleep_pid 2>/dev/null 908 fi 909 AC_MSG_RESULT([done])]) 910rm -f conftest.file 911]) 912 913# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914# 915# This file is free software; the Free Software Foundation 916# gives unlimited permission to copy and/or distribute it, 917# with or without modifications, as long as this notice is preserved. 918 919# AM_SILENT_RULES([DEFAULT]) 920# -------------------------- 921# Enable less verbose build rules; with the default set to DEFAULT 922# ("yes" being less verbose, "no" or empty being verbose). 923AC_DEFUN([AM_SILENT_RULES], 924[AC_ARG_ENABLE([silent-rules], [dnl 925AS_HELP_STRING( 926 [--enable-silent-rules], 927 [less verbose build output (undo: "make V=1")]) 928AS_HELP_STRING( 929 [--disable-silent-rules], 930 [verbose build output (undo: "make V=0")])dnl 931]) 932case $enable_silent_rules in @%:@ ((( 933 yes) AM_DEFAULT_VERBOSITY=0;; 934 no) AM_DEFAULT_VERBOSITY=1;; 935 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936esac 937dnl 938dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939dnl do not support nested variable expansions. 940dnl See automake bug#9928 and bug#10237. 941am_make=${MAKE-make} 942AC_CACHE_CHECK([whether $am_make supports nested variables], 943 [am_cv_make_support_nested_variables], 944 [if AS_ECHO([['TRUE=$(BAR$(V)) 945BAR0=false 946BAR1=true 947V=1 948am__doit: 949 @$(TRUE) 950.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951 am_cv_make_support_nested_variables=yes 952else 953 am_cv_make_support_nested_variables=no 954fi]) 955if test $am_cv_make_support_nested_variables = yes; then 956 dnl Using '$V' instead of '$(V)' breaks IRIX make. 957 AM_V='$(V)' 958 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959else 960 AM_V=$AM_DEFAULT_VERBOSITY 961 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962fi 963AC_SUBST([AM_V])dnl 964AM_SUBST_NOTMAKE([AM_V])dnl 965AC_SUBST([AM_DEFAULT_V])dnl 966AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968AM_BACKSLASH='\' 969AC_SUBST([AM_BACKSLASH])dnl 970_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971]) 972 973# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974# 975# This file is free software; the Free Software Foundation 976# gives unlimited permission to copy and/or distribute it, 977# with or without modifications, as long as this notice is preserved. 978 979# AM_PROG_INSTALL_STRIP 980# --------------------- 981# One issue with vendor 'install' (even GNU) is that you can't 982# specify the program used to strip binaries. This is especially 983# annoying in cross-compiling environments, where the build's strip 984# is unlikely to handle the host's binaries. 985# Fortunately install-sh will honor a STRIPPROG variable, so we 986# always use install-sh in "make install-strip", and initialize 987# STRIPPROG with the value of the STRIP variable (set by the user). 988AC_DEFUN([AM_PROG_INSTALL_STRIP], 989[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990# Installed binaries are usually stripped using 'strip' when the user 991# run "make install-strip". However 'strip' might not be the right 992# tool to use in cross-compilation environments, therefore Automake 993# will honor the 'STRIP' environment variable to overrule this program. 994dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995if test "$cross_compiling" != no; then 996 AC_CHECK_TOOL([STRIP], [strip], :) 997fi 998INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000 1001# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002# 1003# This file is free software; the Free Software Foundation 1004# gives unlimited permission to copy and/or distribute it, 1005# with or without modifications, as long as this notice is preserved. 1006 1007# _AM_SUBST_NOTMAKE(VARIABLE) 1008# --------------------------- 1009# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010# This macro is traced by Automake. 1011AC_DEFUN([_AM_SUBST_NOTMAKE]) 1012 1013# AM_SUBST_NOTMAKE(VARIABLE) 1014# -------------------------- 1015# Public sister of _AM_SUBST_NOTMAKE. 1016AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017 1018# Check how to create a tarball. -*- Autoconf -*- 1019 1020# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021# 1022# This file is free software; the Free Software Foundation 1023# gives unlimited permission to copy and/or distribute it, 1024# with or without modifications, as long as this notice is preserved. 1025 1026# _AM_PROG_TAR(FORMAT) 1027# -------------------- 1028# Check how to create a tarball in format FORMAT. 1029# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030# 1031# Substitute a variable $(am__tar) that is a command 1032# writing to stdout a FORMAT-tarball containing the directory 1033# $tardir. 1034# tardir=directory && $(am__tar) > result.tar 1035# 1036# Substitute a variable $(am__untar) that extract such 1037# a tarball read from stdin. 1038# $(am__untar) < result.tar 1039# 1040AC_DEFUN([_AM_PROG_TAR], 1041[# Always define AMTAR for backward compatibility. Yes, it's still used 1042# in the wild :-( We should find a proper way to deprecate it ... 1043AC_SUBST([AMTAR], ['$${TAR-tar}']) 1044 1045# We'll loop over all known methods to create a tar archive until one works. 1046_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047 1048m4_if([$1], [v7], 1049 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050 1051 [m4_case([$1], 1052 [ustar], 1053 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054 # There is notably a 21 bits limit for the UID and the GID. In fact, 1055 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056 # and bug#13588). 1057 am_max_uid=2097151 # 2^21 - 1 1058 am_max_gid=$am_max_uid 1059 # The $UID and $GID variables are not portable, so we need to resort 1060 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061 # below are definitely unexpected, so allow the users to see them 1062 # (that is, avoid stderr redirection). 1063 am_uid=`id -u || echo unknown` 1064 am_gid=`id -g || echo unknown` 1065 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066 if test $am_uid -le $am_max_uid; then 1067 AC_MSG_RESULT([yes]) 1068 else 1069 AC_MSG_RESULT([no]) 1070 _am_tools=none 1071 fi 1072 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073 if test $am_gid -le $am_max_gid; then 1074 AC_MSG_RESULT([yes]) 1075 else 1076 AC_MSG_RESULT([no]) 1077 _am_tools=none 1078 fi], 1079 1080 [pax], 1081 [], 1082 1083 [m4_fatal([Unknown tar format])]) 1084 1085 AC_MSG_CHECKING([how to create a $1 tar archive]) 1086 1087 # Go ahead even if we have the value already cached. We do so because we 1088 # need to set the values for the 'am__tar' and 'am__untar' variables. 1089 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090 1091 for _am_tool in $_am_tools; do 1092 case $_am_tool in 1093 gnutar) 1094 for _am_tar in tar gnutar gtar; do 1095 AM_RUN_LOG([$_am_tar --version]) && break 1096 done 1097 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099 am__untar="$_am_tar -xf -" 1100 ;; 1101 plaintar) 1102 # Must skip GNU tar: if it does not support --format= it doesn't create 1103 # ustar tarball either. 1104 (tar --version) >/dev/null 2>&1 && continue 1105 am__tar='tar chf - "$$tardir"' 1106 am__tar_='tar chf - "$tardir"' 1107 am__untar='tar xf -' 1108 ;; 1109 pax) 1110 am__tar='pax -L -x $1 -w "$$tardir"' 1111 am__tar_='pax -L -x $1 -w "$tardir"' 1112 am__untar='pax -r' 1113 ;; 1114 cpio) 1115 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117 am__untar='cpio -i -H $1 -d' 1118 ;; 1119 none) 1120 am__tar=false 1121 am__tar_=false 1122 am__untar=false 1123 ;; 1124 esac 1125 1126 # If the value was cached, stop now. We just wanted to have am__tar 1127 # and am__untar set. 1128 test -n "${am_cv_prog_tar_$1}" && break 1129 1130 # tar/untar a dummy directory, and stop if the command works. 1131 rm -rf conftest.dir 1132 mkdir conftest.dir 1133 echo GrepMe > conftest.dir/file 1134 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135 rm -rf conftest.dir 1136 if test -s conftest.tar; then 1137 AM_RUN_LOG([$am__untar <conftest.tar]) 1138 AM_RUN_LOG([cat conftest.dir/file]) 1139 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140 fi 1141 done 1142 rm -rf conftest.dir 1143 1144 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146 1147AC_SUBST([am__tar]) 1148AC_SUBST([am__untar]) 1149]) # _AM_PROG_TAR 1150 1151dnl Copyright 2005 Red Hat, Inc 1152dnl 1153dnl Permission to use, copy, modify, distribute, and sell this software and its 1154dnl documentation for any purpose is hereby granted without fee, provided that 1155dnl the above copyright notice appear in all copies and that both that 1156dnl copyright notice and this permission notice appear in supporting 1157dnl documentation. 1158dnl 1159dnl The above copyright notice and this permission notice shall be included 1160dnl in all copies or substantial portions of the Software. 1161dnl 1162dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1163dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1164dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1165dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1166dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1167dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1168dnl OTHER DEALINGS IN THE SOFTWARE. 1169dnl 1170dnl Except as contained in this notice, the name of the copyright holders shall 1171dnl not be used in advertising or otherwise to promote the sale, use or 1172dnl other dealings in this Software without prior written authorization 1173dnl from the copyright holders. 1174dnl 1175 1176# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 1177# -------------------------- 1178# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1179# is defined, then add the given PROTO to $REQUIRED_MODULES. 1180 1181AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1182 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1183 SAVE_CFLAGS="$CFLAGS" 1184 CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1185 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1186#include "xorg-server.h" 1187#if !defined $1 1188#error $1 not defined 1189#endif 1190 ]])], 1191 [_EXT_CHECK=yes], 1192 [_EXT_CHECK=no]) 1193 CFLAGS="$SAVE_CFLAGS" 1194 AC_MSG_CHECKING([if $1 is defined]) 1195 AC_MSG_RESULT([$_EXT_CHECK]) 1196 if test "$_EXT_CHECK" != no; then 1197 REQUIRED_MODULES="$REQUIRED_MODULES $2" 1198 fi 1199]) 1200 1201dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1202dnl serial 11 (pkg-config-0.29) 1203dnl 1204dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1205dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1206dnl 1207dnl This program is free software; you can redistribute it and/or modify 1208dnl it under the terms of the GNU General Public License as published by 1209dnl the Free Software Foundation; either version 2 of the License, or 1210dnl (at your option) any later version. 1211dnl 1212dnl This program is distributed in the hope that it will be useful, but 1213dnl WITHOUT ANY WARRANTY; without even the implied warranty of 1214dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1215dnl General Public License for more details. 1216dnl 1217dnl You should have received a copy of the GNU General Public License 1218dnl along with this program; if not, write to the Free Software 1219dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1220dnl 02111-1307, USA. 1221dnl 1222dnl As a special exception to the GNU General Public License, if you 1223dnl distribute this file as part of a program that contains a 1224dnl configuration script generated by Autoconf, you may include it under 1225dnl the same distribution terms that you use for the rest of that 1226dnl program. 1227 1228dnl PKG_PREREQ(MIN-VERSION) 1229dnl ----------------------- 1230dnl Since: 0.29 1231dnl 1232dnl Verify that the version of the pkg-config macros are at least 1233dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1234dnl installed version of pkg-config, this checks the developer's version 1235dnl of pkg.m4 when generating configure. 1236dnl 1237dnl To ensure that this macro is defined, also add: 1238dnl m4_ifndef([PKG_PREREQ], 1239dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1240dnl 1241dnl See the "Since" comment for each macro you use to see what version 1242dnl of the macros you require. 1243m4_defun([PKG_PREREQ], 1244[m4_define([PKG_MACROS_VERSION], [0.29]) 1245m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1246 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1247])dnl PKG_PREREQ 1248 1249dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1250dnl ---------------------------------- 1251dnl Since: 0.16 1252dnl 1253dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1254dnl first found in the path. Checks that the version of pkg-config found 1255dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1256dnl used since that's the first version where most current features of 1257dnl pkg-config existed. 1258AC_DEFUN([PKG_PROG_PKG_CONFIG], 1259[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1260m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1261m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1262AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1263AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1264AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1265 1266if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1267 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1268fi 1269if test -n "$PKG_CONFIG"; then 1270 _pkg_min_version=m4_default([$1], [0.9.0]) 1271 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1272 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1273 AC_MSG_RESULT([yes]) 1274 else 1275 AC_MSG_RESULT([no]) 1276 PKG_CONFIG="" 1277 fi 1278fi[]dnl 1279])dnl PKG_PROG_PKG_CONFIG 1280 1281dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1282dnl ------------------------------------------------------------------- 1283dnl Since: 0.18 1284dnl 1285dnl Check to see whether a particular set of modules exists. Similar to 1286dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1287dnl 1288dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1289dnl only at the first occurence in configure.ac, so if the first place 1290dnl it's called might be skipped (such as if it is within an "if", you 1291dnl have to call PKG_CHECK_EXISTS manually 1292AC_DEFUN([PKG_CHECK_EXISTS], 1293[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1294if test -n "$PKG_CONFIG" && \ 1295 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1296 m4_default([$2], [:]) 1297m4_ifvaln([$3], [else 1298 $3])dnl 1299fi]) 1300 1301dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1302dnl --------------------------------------------- 1303dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1304dnl pkg_failed based on the result. 1305m4_define([_PKG_CONFIG], 1306[if test -n "$$1"; then 1307 pkg_cv_[]$1="$$1" 1308 elif test -n "$PKG_CONFIG"; then 1309 PKG_CHECK_EXISTS([$3], 1310 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1311 test "x$?" != "x0" && pkg_failed=yes ], 1312 [pkg_failed=yes]) 1313 else 1314 pkg_failed=untried 1315fi[]dnl 1316])dnl _PKG_CONFIG 1317 1318dnl _PKG_SHORT_ERRORS_SUPPORTED 1319dnl --------------------------- 1320dnl Internal check to see if pkg-config supports short errors. 1321AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1322[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1323if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1324 _pkg_short_errors_supported=yes 1325else 1326 _pkg_short_errors_supported=no 1327fi[]dnl 1328])dnl _PKG_SHORT_ERRORS_SUPPORTED 1329 1330 1331dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1332dnl [ACTION-IF-NOT-FOUND]) 1333dnl -------------------------------------------------------------- 1334dnl Since: 0.4.0 1335dnl 1336dnl Note that if there is a possibility the first call to 1337dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1338dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1339AC_DEFUN([PKG_CHECK_MODULES], 1340[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1341AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1342AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1343 1344pkg_failed=no 1345AC_MSG_CHECKING([for $1]) 1346 1347_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1348_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1349 1350m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1351and $1[]_LIBS to avoid the need to call pkg-config. 1352See the pkg-config man page for more details.]) 1353 1354if test $pkg_failed = yes; then 1355 AC_MSG_RESULT([no]) 1356 _PKG_SHORT_ERRORS_SUPPORTED 1357 if test $_pkg_short_errors_supported = yes; then 1358 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1359 else 1360 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1361 fi 1362 # Put the nasty error message in config.log where it belongs 1363 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1364 1365 m4_default([$4], [AC_MSG_ERROR( 1366[Package requirements ($2) were not met: 1367 1368$$1_PKG_ERRORS 1369 1370Consider adjusting the PKG_CONFIG_PATH environment variable if you 1371installed software in a non-standard prefix. 1372 1373_PKG_TEXT])[]dnl 1374 ]) 1375elif test $pkg_failed = untried; then 1376 AC_MSG_RESULT([no]) 1377 m4_default([$4], [AC_MSG_FAILURE( 1378[The pkg-config script could not be found or is too old. Make sure it 1379is in your PATH or set the PKG_CONFIG environment variable to the full 1380path to pkg-config. 1381 1382_PKG_TEXT 1383 1384To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1385 ]) 1386else 1387 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1388 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1389 AC_MSG_RESULT([yes]) 1390 $3 1391fi[]dnl 1392])dnl PKG_CHECK_MODULES 1393 1394 1395dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1396dnl [ACTION-IF-NOT-FOUND]) 1397dnl --------------------------------------------------------------------- 1398dnl Since: 0.29 1399dnl 1400dnl Checks for existence of MODULES and gathers its build flags with 1401dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1402dnl and VARIABLE-PREFIX_LIBS from --libs. 1403dnl 1404dnl Note that if there is a possibility the first call to 1405dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1406dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1407dnl configure.ac. 1408AC_DEFUN([PKG_CHECK_MODULES_STATIC], 1409[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1410_save_PKG_CONFIG=$PKG_CONFIG 1411PKG_CONFIG="$PKG_CONFIG --static" 1412PKG_CHECK_MODULES($@) 1413PKG_CONFIG=$_save_PKG_CONFIG[]dnl 1414])dnl PKG_CHECK_MODULES_STATIC 1415 1416 1417dnl PKG_INSTALLDIR([DIRECTORY]) 1418dnl ------------------------- 1419dnl Since: 0.27 1420dnl 1421dnl Substitutes the variable pkgconfigdir as the location where a module 1422dnl should install pkg-config .pc files. By default the directory is 1423dnl $libdir/pkgconfig, but the default can be changed by passing 1424dnl DIRECTORY. The user can override through the --with-pkgconfigdir 1425dnl parameter. 1426AC_DEFUN([PKG_INSTALLDIR], 1427[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1428m4_pushdef([pkg_description], 1429 [pkg-config installation directory @<:@]pkg_default[@:>@]) 1430AC_ARG_WITH([pkgconfigdir], 1431 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1432 [with_pkgconfigdir=]pkg_default) 1433AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1434m4_popdef([pkg_default]) 1435m4_popdef([pkg_description]) 1436])dnl PKG_INSTALLDIR 1437 1438 1439dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1440dnl -------------------------------- 1441dnl Since: 0.27 1442dnl 1443dnl Substitutes the variable noarch_pkgconfigdir as the location where a 1444dnl module should install arch-independent pkg-config .pc files. By 1445dnl default the directory is $datadir/pkgconfig, but the default can be 1446dnl changed by passing DIRECTORY. The user can override through the 1447dnl --with-noarch-pkgconfigdir parameter. 1448AC_DEFUN([PKG_NOARCH_INSTALLDIR], 1449[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1450m4_pushdef([pkg_description], 1451 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1452AC_ARG_WITH([noarch-pkgconfigdir], 1453 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1454 [with_noarch_pkgconfigdir=]pkg_default) 1455AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1456m4_popdef([pkg_default]) 1457m4_popdef([pkg_description]) 1458])dnl PKG_NOARCH_INSTALLDIR 1459 1460 1461dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1462dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1463dnl ------------------------------------------- 1464dnl Since: 0.28 1465dnl 1466dnl Retrieves the value of the pkg-config variable for the given module. 1467AC_DEFUN([PKG_CHECK_VAR], 1468[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1469AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1470 1471_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1472AS_VAR_COPY([$1], [pkg_cv_][$1]) 1473 1474AS_VAR_IF([$1], [""], [$5], [$4])dnl 1475])dnl PKG_CHECK_VAR 1476 1477dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1478dnl 1479dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1480dnl 1481dnl Permission is hereby granted, free of charge, to any person obtaining a 1482dnl copy of this software and associated documentation files (the "Software"), 1483dnl to deal in the Software without restriction, including without limitation 1484dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1485dnl and/or sell copies of the Software, and to permit persons to whom the 1486dnl Software is furnished to do so, subject to the following conditions: 1487dnl 1488dnl The above copyright notice and this permission notice (including the next 1489dnl paragraph) shall be included in all copies or substantial portions of the 1490dnl Software. 1491dnl 1492dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1493dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1494dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1495dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1496dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1497dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1498dnl DEALINGS IN THE SOFTWARE. 1499 1500# XORG_MACROS_VERSION(required-version) 1501# ------------------------------------- 1502# Minimum version: 1.1.0 1503# 1504# If you're using a macro added in Version 1.1 or newer, include this in 1505# your configure.ac with the minimum required version, such as: 1506# XORG_MACROS_VERSION(1.1) 1507# 1508# To ensure that this macro is defined, also add: 1509# m4_ifndef([XORG_MACROS_VERSION], 1510# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1511# 1512# 1513# See the "minimum version" comment for each macro you use to see what 1514# version you require. 1515m4_defun([XORG_MACROS_VERSION],[ 1516m4_define([vers_have], [1.19.3]) 1517m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1518m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1519m4_if(m4_cmp(maj_have, maj_needed), 0,, 1520 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1521m4_if(m4_version_compare(vers_have, [$1]), -1, 1522 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1523m4_undefine([vers_have]) 1524m4_undefine([maj_have]) 1525m4_undefine([maj_needed]) 1526]) # XORG_MACROS_VERSION 1527 1528# XORG_PROG_RAWCPP() 1529# ------------------ 1530# Minimum version: 1.0.0 1531# 1532# Find cpp program and necessary flags for use in pre-processing text files 1533# such as man pages and config files 1534AC_DEFUN([XORG_PROG_RAWCPP],[ 1535AC_REQUIRE([AC_PROG_CPP]) 1536AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1537 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1538 1539# Check for flag to avoid builtin definitions - assumes unix is predefined, 1540# which is not the best choice for supporting other OS'es, but covers most 1541# of the ones we need for now. 1542AC_MSG_CHECKING([if $RAWCPP requires -undef]) 1543AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1544if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1545 AC_MSG_RESULT([no]) 1546else 1547 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1548 RAWCPPFLAGS=-undef 1549 AC_MSG_RESULT([yes]) 1550 # under Cygwin unix is still defined even with -undef 1551 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1552 RAWCPPFLAGS="-undef -ansi" 1553 AC_MSG_RESULT([yes, with -ansi]) 1554 else 1555 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1556 fi 1557fi 1558rm -f conftest.$ac_ext 1559 1560AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1561AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1562if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1563 AC_MSG_RESULT([no]) 1564else 1565 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1566 TRADITIONALCPPFLAGS="-traditional" 1567 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1568 AC_MSG_RESULT([yes]) 1569 else 1570 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1571 fi 1572fi 1573rm -f conftest.$ac_ext 1574AC_SUBST(RAWCPPFLAGS) 1575AC_SUBST(TRADITIONALCPPFLAGS) 1576]) # XORG_PROG_RAWCPP 1577 1578# XORG_MANPAGE_SECTIONS() 1579# ----------------------- 1580# Minimum version: 1.0.0 1581# 1582# Determine which sections man pages go in for the different man page types 1583# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1584# Not sure if there's any better way than just hardcoding by OS name. 1585# Override default settings by setting environment variables 1586# Added MAN_SUBSTS in version 1.8 1587# Added AC_PROG_SED in version 1.8 1588 1589AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1590AC_REQUIRE([AC_CANONICAL_HOST]) 1591AC_REQUIRE([AC_PROG_SED]) 1592 1593case $host_os in 1594 solaris*) 1595 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1596 # check for a man page file found in later versions that use 1597 # traditional section numbers instead 1598 AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1599 [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1600 ;; 1601 *) SYSV_MAN_SECTIONS=false ;; 1602esac 1603 1604if test x$APP_MAN_SUFFIX = x ; then 1605 APP_MAN_SUFFIX=1 1606fi 1607if test x$APP_MAN_DIR = x ; then 1608 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1609fi 1610 1611if test x$LIB_MAN_SUFFIX = x ; then 1612 LIB_MAN_SUFFIX=3 1613fi 1614if test x$LIB_MAN_DIR = x ; then 1615 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1616fi 1617 1618if test x$FILE_MAN_SUFFIX = x ; then 1619 case $SYSV_MAN_SECTIONS in 1620 true) FILE_MAN_SUFFIX=4 ;; 1621 *) FILE_MAN_SUFFIX=5 ;; 1622 esac 1623fi 1624if test x$FILE_MAN_DIR = x ; then 1625 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1626fi 1627 1628if test x$MISC_MAN_SUFFIX = x ; then 1629 case $SYSV_MAN_SECTIONS in 1630 true) MISC_MAN_SUFFIX=5 ;; 1631 *) MISC_MAN_SUFFIX=7 ;; 1632 esac 1633fi 1634if test x$MISC_MAN_DIR = x ; then 1635 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1636fi 1637 1638if test x$DRIVER_MAN_SUFFIX = x ; then 1639 case $SYSV_MAN_SECTIONS in 1640 true) DRIVER_MAN_SUFFIX=7 ;; 1641 *) DRIVER_MAN_SUFFIX=4 ;; 1642 esac 1643fi 1644if test x$DRIVER_MAN_DIR = x ; then 1645 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1646fi 1647 1648if test x$ADMIN_MAN_SUFFIX = x ; then 1649 case $SYSV_MAN_SECTIONS in 1650 true) ADMIN_MAN_SUFFIX=1m ;; 1651 *) ADMIN_MAN_SUFFIX=8 ;; 1652 esac 1653fi 1654if test x$ADMIN_MAN_DIR = x ; then 1655 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1656fi 1657 1658 1659AC_SUBST([APP_MAN_SUFFIX]) 1660AC_SUBST([LIB_MAN_SUFFIX]) 1661AC_SUBST([FILE_MAN_SUFFIX]) 1662AC_SUBST([MISC_MAN_SUFFIX]) 1663AC_SUBST([DRIVER_MAN_SUFFIX]) 1664AC_SUBST([ADMIN_MAN_SUFFIX]) 1665AC_SUBST([APP_MAN_DIR]) 1666AC_SUBST([LIB_MAN_DIR]) 1667AC_SUBST([FILE_MAN_DIR]) 1668AC_SUBST([MISC_MAN_DIR]) 1669AC_SUBST([DRIVER_MAN_DIR]) 1670AC_SUBST([ADMIN_MAN_DIR]) 1671 1672XORG_MAN_PAGE="X Version 11" 1673AC_SUBST([XORG_MAN_PAGE]) 1674MAN_SUBSTS="\ 1675 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1676 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1677 -e 's|__xservername__|Xorg|g' \ 1678 -e 's|__xconfigfile__|xorg.conf|g' \ 1679 -e 's|__projectroot__|\$(prefix)|g' \ 1680 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1681 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1682 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1683 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1684 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1685 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1686 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1687AC_SUBST([MAN_SUBSTS]) 1688 1689]) # XORG_MANPAGE_SECTIONS 1690 1691# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1692# ------------------------ 1693# Minimum version: 1.7.0 1694# 1695# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1696# provided by xorg-sgml-doctools, if installed. 1697AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1698AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1699XORG_SGML_PATH= 1700PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1701 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1702 [m4_ifval([$1],[:], 1703 [if test x"$cross_compiling" != x"yes" ; then 1704 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1705 [XORG_SGML_PATH=$prefix/share/sgml]) 1706 fi]) 1707 ]) 1708 1709# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1710# the path and the name of the doc stylesheet 1711if test "x$XORG_SGML_PATH" != "x" ; then 1712 AC_MSG_RESULT([$XORG_SGML_PATH]) 1713 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1714 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1715else 1716 AC_MSG_RESULT([no]) 1717fi 1718 1719AC_SUBST(XORG_SGML_PATH) 1720AC_SUBST(STYLESHEET_SRCDIR) 1721AC_SUBST(XSL_STYLESHEET) 1722AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1723]) # XORG_CHECK_SGML_DOCTOOLS 1724 1725# XORG_CHECK_LINUXDOC 1726# ------------------- 1727# Minimum version: 1.0.0 1728# 1729# Defines the variable MAKE_TEXT if the necessary tools and 1730# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1731# Whether or not the necessary tools and files are found can be checked 1732# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1733AC_DEFUN([XORG_CHECK_LINUXDOC],[ 1734AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1735AC_REQUIRE([XORG_WITH_PS2PDF]) 1736 1737AC_PATH_PROG(LINUXDOC, linuxdoc) 1738 1739AC_MSG_CHECKING([whether to build documentation]) 1740 1741if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1742 BUILDDOC=yes 1743else 1744 BUILDDOC=no 1745fi 1746 1747AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1748 1749AC_MSG_RESULT([$BUILDDOC]) 1750 1751AC_MSG_CHECKING([whether to build pdf documentation]) 1752 1753if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1754 BUILDPDFDOC=yes 1755else 1756 BUILDPDFDOC=no 1757fi 1758 1759AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1760 1761AC_MSG_RESULT([$BUILDPDFDOC]) 1762 1763MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1764MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1765MAKE_PDF="$PS2PDF" 1766MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1767 1768AC_SUBST(MAKE_TEXT) 1769AC_SUBST(MAKE_PS) 1770AC_SUBST(MAKE_PDF) 1771AC_SUBST(MAKE_HTML) 1772]) # XORG_CHECK_LINUXDOC 1773 1774# XORG_CHECK_DOCBOOK 1775# ------------------- 1776# Minimum version: 1.0.0 1777# 1778# Checks for the ability to build output formats from SGML DocBook source. 1779# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1780# indicates whether the necessary tools and files are found and, if set, 1781# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1782AC_DEFUN([XORG_CHECK_DOCBOOK],[ 1783AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1784 1785BUILDTXTDOC=no 1786BUILDPDFDOC=no 1787BUILDPSDOC=no 1788BUILDHTMLDOC=no 1789 1790AC_PATH_PROG(DOCBOOKPS, docbook2ps) 1791AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1792AC_PATH_PROG(DOCBOOKHTML, docbook2html) 1793AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1794 1795AC_MSG_CHECKING([whether to build text documentation]) 1796if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1797 test x$BUILD_TXTDOC != xno; then 1798 BUILDTXTDOC=yes 1799fi 1800AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1801AC_MSG_RESULT([$BUILDTXTDOC]) 1802 1803AC_MSG_CHECKING([whether to build PDF documentation]) 1804if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1805 test x$BUILD_PDFDOC != xno; then 1806 BUILDPDFDOC=yes 1807fi 1808AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1809AC_MSG_RESULT([$BUILDPDFDOC]) 1810 1811AC_MSG_CHECKING([whether to build PostScript documentation]) 1812if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1813 test x$BUILD_PSDOC != xno; then 1814 BUILDPSDOC=yes 1815fi 1816AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1817AC_MSG_RESULT([$BUILDPSDOC]) 1818 1819AC_MSG_CHECKING([whether to build HTML documentation]) 1820if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1821 test x$BUILD_HTMLDOC != xno; then 1822 BUILDHTMLDOC=yes 1823fi 1824AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1825AC_MSG_RESULT([$BUILDHTMLDOC]) 1826 1827MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1828MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1829MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1830MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1831 1832AC_SUBST(MAKE_TEXT) 1833AC_SUBST(MAKE_PS) 1834AC_SUBST(MAKE_PDF) 1835AC_SUBST(MAKE_HTML) 1836]) # XORG_CHECK_DOCBOOK 1837 1838# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1839# ---------------- 1840# Minimum version: 1.5.0 1841# Minimum version for optional DEFAULT argument: 1.11.0 1842# 1843# Documentation tools are not always available on all platforms and sometimes 1844# not at the appropriate level. This macro enables a module to test for the 1845# presence of the tool and obtain it's path in separate variables. Coupled with 1846# the --with-xmlto option, it allows maximum flexibilty in making decisions 1847# as whether or not to use the xmlto package. When DEFAULT is not specified, 1848# --with-xmlto assumes 'auto'. 1849# 1850# Interface to module: 1851# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1852# XMLTO: returns the path of the xmlto program found 1853# returns the path set by the user in the environment 1854# --with-xmlto: 'yes' user instructs the module to use xmlto 1855# 'no' user instructs the module not to use xmlto 1856# 1857# Added in version 1.10.0 1858# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1859# xmlto for text output requires either lynx, links, or w3m browsers 1860# 1861# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1862# 1863AC_DEFUN([XORG_WITH_XMLTO],[ 1864AC_ARG_VAR([XMLTO], [Path to xmlto command]) 1865m4_define([_defopt], m4_default([$2], [auto])) 1866AC_ARG_WITH(xmlto, 1867 AS_HELP_STRING([--with-xmlto], 1868 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1869 [use_xmlto=$withval], [use_xmlto=]_defopt) 1870m4_undefine([_defopt]) 1871 1872if test "x$use_xmlto" = x"auto"; then 1873 AC_PATH_PROG([XMLTO], [xmlto]) 1874 if test "x$XMLTO" = "x"; then 1875 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1876 have_xmlto=no 1877 else 1878 have_xmlto=yes 1879 fi 1880elif test "x$use_xmlto" = x"yes" ; then 1881 AC_PATH_PROG([XMLTO], [xmlto]) 1882 if test "x$XMLTO" = "x"; then 1883 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1884 fi 1885 have_xmlto=yes 1886elif test "x$use_xmlto" = x"no" ; then 1887 if test "x$XMLTO" != "x"; then 1888 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1889 fi 1890 have_xmlto=no 1891else 1892 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1893fi 1894 1895# Test for a minimum version of xmlto, if provided. 1896m4_ifval([$1], 1897[if test "$have_xmlto" = yes; then 1898 # scrape the xmlto version 1899 AC_MSG_CHECKING([the xmlto version]) 1900 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1901 AC_MSG_RESULT([$xmlto_version]) 1902 AS_VERSION_COMPARE([$xmlto_version], [$1], 1903 [if test "x$use_xmlto" = xauto; then 1904 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1905 have_xmlto=no 1906 else 1907 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1908 fi]) 1909fi]) 1910 1911# Test for the ability of xmlto to generate a text target 1912# 1913# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1914# following test for empty XML docbook files. 1915# For compatibility reasons use the following empty XML docbook file and if 1916# it fails try it again with a non-empty XML file. 1917have_xmlto_text=no 1918cat > conftest.xml << "EOF" 1919EOF 1920AS_IF([test "$have_xmlto" = yes], 1921 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1922 [have_xmlto_text=yes], 1923 [# Try it again with a non-empty XML file. 1924 cat > conftest.xml << "EOF" 1925<x></x> 1926EOF 1927 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1928 [have_xmlto_text=yes], 1929 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1930rm -f conftest.xml 1931AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1932AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1933]) # XORG_WITH_XMLTO 1934 1935# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1936# -------------------------------------------- 1937# Minimum version: 1.12.0 1938# Minimum version for optional DEFAULT argument: 1.12.0 1939# 1940# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1941# XML-based language used for the transformation of XML documents. 1942# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1943# It is used under the cover by xmlto to generate html files from DocBook/XML. 1944# The XSLT processor is often used as a standalone tool for transformations. 1945# It should not be assumed that this tool is used only to work with documnetation. 1946# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1947# 1948# Interface to module: 1949# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1950# XSLTPROC: returns the path of the xsltproc program found 1951# returns the path set by the user in the environment 1952# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1953# 'no' user instructs the module not to use xsltproc 1954# have_xsltproc: returns yes if xsltproc found in PATH or no 1955# 1956# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1957# 1958AC_DEFUN([XORG_WITH_XSLTPROC],[ 1959AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1960# Preserves the interface, should it be implemented later 1961m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1962m4_define([_defopt], m4_default([$2], [auto])) 1963AC_ARG_WITH(xsltproc, 1964 AS_HELP_STRING([--with-xsltproc], 1965 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1966 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1967m4_undefine([_defopt]) 1968 1969if test "x$use_xsltproc" = x"auto"; then 1970 AC_PATH_PROG([XSLTPROC], [xsltproc]) 1971 if test "x$XSLTPROC" = "x"; then 1972 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1973 have_xsltproc=no 1974 else 1975 have_xsltproc=yes 1976 fi 1977elif test "x$use_xsltproc" = x"yes" ; then 1978 AC_PATH_PROG([XSLTPROC], [xsltproc]) 1979 if test "x$XSLTPROC" = "x"; then 1980 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1981 fi 1982 have_xsltproc=yes 1983elif test "x$use_xsltproc" = x"no" ; then 1984 if test "x$XSLTPROC" != "x"; then 1985 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1986 fi 1987 have_xsltproc=no 1988else 1989 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1990fi 1991 1992AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1993]) # XORG_WITH_XSLTPROC 1994 1995# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1996# ---------------------------------------- 1997# Minimum version: 1.15.0 1998# 1999# PERL (Practical Extraction and Report Language) is a language optimized for 2000# scanning arbitrary text files, extracting information from those text files, 2001# and printing reports based on that information. 2002# 2003# When DEFAULT is not specified, --with-perl assumes 'auto'. 2004# 2005# Interface to module: 2006# HAVE_PERL: used in makefiles to conditionally scan text files 2007# PERL: returns the path of the perl program found 2008# returns the path set by the user in the environment 2009# --with-perl: 'yes' user instructs the module to use perl 2010# 'no' user instructs the module not to use perl 2011# have_perl: returns yes if perl found in PATH or no 2012# 2013# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 2014# 2015AC_DEFUN([XORG_WITH_PERL],[ 2016AC_ARG_VAR([PERL], [Path to perl command]) 2017# Preserves the interface, should it be implemented later 2018m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 2019m4_define([_defopt], m4_default([$2], [auto])) 2020AC_ARG_WITH(perl, 2021 AS_HELP_STRING([--with-perl], 2022 [Use perl for extracting information from files (default: ]_defopt[)]), 2023 [use_perl=$withval], [use_perl=]_defopt) 2024m4_undefine([_defopt]) 2025 2026if test "x$use_perl" = x"auto"; then 2027 AC_PATH_PROG([PERL], [perl]) 2028 if test "x$PERL" = "x"; then 2029 AC_MSG_WARN([perl not found - cannot extract information and report]) 2030 have_perl=no 2031 else 2032 have_perl=yes 2033 fi 2034elif test "x$use_perl" = x"yes" ; then 2035 AC_PATH_PROG([PERL], [perl]) 2036 if test "x$PERL" = "x"; then 2037 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 2038 fi 2039 have_perl=yes 2040elif test "x$use_perl" = x"no" ; then 2041 if test "x$PERL" != "x"; then 2042 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 2043 fi 2044 have_perl=no 2045else 2046 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 2047fi 2048 2049AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2050]) # XORG_WITH_PERL 2051 2052# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2053# ---------------- 2054# Minimum version: 1.5.0 2055# Minimum version for optional DEFAULT argument: 1.11.0 2056# 2057# Documentation tools are not always available on all platforms and sometimes 2058# not at the appropriate level. This macro enables a module to test for the 2059# presence of the tool and obtain it's path in separate variables. Coupled with 2060# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2061# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2062# --with-asciidoc assumes 'auto'. 2063# 2064# Interface to module: 2065# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2066# ASCIIDOC: returns the path of the asciidoc program found 2067# returns the path set by the user in the environment 2068# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2069# 'no' user instructs the module not to use asciidoc 2070# 2071# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2072# 2073AC_DEFUN([XORG_WITH_ASCIIDOC],[ 2074AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2075m4_define([_defopt], m4_default([$2], [auto])) 2076AC_ARG_WITH(asciidoc, 2077 AS_HELP_STRING([--with-asciidoc], 2078 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2079 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2080m4_undefine([_defopt]) 2081 2082if test "x$use_asciidoc" = x"auto"; then 2083 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2084 if test "x$ASCIIDOC" = "x"; then 2085 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2086 have_asciidoc=no 2087 else 2088 have_asciidoc=yes 2089 fi 2090elif test "x$use_asciidoc" = x"yes" ; then 2091 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2092 if test "x$ASCIIDOC" = "x"; then 2093 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2094 fi 2095 have_asciidoc=yes 2096elif test "x$use_asciidoc" = x"no" ; then 2097 if test "x$ASCIIDOC" != "x"; then 2098 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2099 fi 2100 have_asciidoc=no 2101else 2102 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2103fi 2104m4_ifval([$1], 2105[if test "$have_asciidoc" = yes; then 2106 # scrape the asciidoc version 2107 AC_MSG_CHECKING([the asciidoc version]) 2108 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2109 AC_MSG_RESULT([$asciidoc_version]) 2110 AS_VERSION_COMPARE([$asciidoc_version], [$1], 2111 [if test "x$use_asciidoc" = xauto; then 2112 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2113 have_asciidoc=no 2114 else 2115 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2116 fi]) 2117fi]) 2118AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2119]) # XORG_WITH_ASCIIDOC 2120 2121# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2122# ------------------------------------------- 2123# Minimum version: 1.5.0 2124# Minimum version for optional DEFAULT argument: 1.11.0 2125# Minimum version for optional DOT checking: 1.18.0 2126# 2127# Documentation tools are not always available on all platforms and sometimes 2128# not at the appropriate level. This macro enables a module to test for the 2129# presence of the tool and obtain it's path in separate variables. Coupled with 2130# the --with-doxygen option, it allows maximum flexibilty in making decisions 2131# as whether or not to use the doxygen package. When DEFAULT is not specified, 2132# --with-doxygen assumes 'auto'. 2133# 2134# Interface to module: 2135# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2136# DOXYGEN: returns the path of the doxygen program found 2137# returns the path set by the user in the environment 2138# --with-doxygen: 'yes' user instructs the module to use doxygen 2139# 'no' user instructs the module not to use doxygen 2140# 2141# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2142# 2143AC_DEFUN([XORG_WITH_DOXYGEN],[ 2144AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2145AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2146m4_define([_defopt], m4_default([$2], [auto])) 2147AC_ARG_WITH(doxygen, 2148 AS_HELP_STRING([--with-doxygen], 2149 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2150 [use_doxygen=$withval], [use_doxygen=]_defopt) 2151m4_undefine([_defopt]) 2152 2153if test "x$use_doxygen" = x"auto"; then 2154 AC_PATH_PROG([DOXYGEN], [doxygen]) 2155 if test "x$DOXYGEN" = "x"; then 2156 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2157 have_doxygen=no 2158 else 2159 have_doxygen=yes 2160 fi 2161elif test "x$use_doxygen" = x"yes" ; then 2162 AC_PATH_PROG([DOXYGEN], [doxygen]) 2163 if test "x$DOXYGEN" = "x"; then 2164 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2165 fi 2166 have_doxygen=yes 2167elif test "x$use_doxygen" = x"no" ; then 2168 if test "x$DOXYGEN" != "x"; then 2169 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2170 fi 2171 have_doxygen=no 2172else 2173 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2174fi 2175m4_ifval([$1], 2176[if test "$have_doxygen" = yes; then 2177 # scrape the doxygen version 2178 AC_MSG_CHECKING([the doxygen version]) 2179 doxygen_version=`$DOXYGEN --version 2>/dev/null` 2180 AC_MSG_RESULT([$doxygen_version]) 2181 AS_VERSION_COMPARE([$doxygen_version], [$1], 2182 [if test "x$use_doxygen" = xauto; then 2183 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2184 have_doxygen=no 2185 else 2186 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2187 fi]) 2188fi]) 2189 2190dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2191dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2192dnl HAVE_DOT = @HAVE_DOT@ 2193HAVE_DOT=no 2194if test "x$have_doxygen" = "xyes"; then 2195 AC_PATH_PROG([DOT], [dot]) 2196 if test "x$DOT" != "x"; then 2197 HAVE_DOT=yes 2198 fi 2199fi 2200 2201AC_SUBST([HAVE_DOT]) 2202AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2203AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2204]) # XORG_WITH_DOXYGEN 2205 2206# XORG_WITH_GROFF([DEFAULT]) 2207# ---------------- 2208# Minimum version: 1.6.0 2209# Minimum version for optional DEFAULT argument: 1.11.0 2210# 2211# Documentation tools are not always available on all platforms and sometimes 2212# not at the appropriate level. This macro enables a module to test for the 2213# presence of the tool and obtain it's path in separate variables. Coupled with 2214# the --with-groff option, it allows maximum flexibilty in making decisions 2215# as whether or not to use the groff package. When DEFAULT is not specified, 2216# --with-groff assumes 'auto'. 2217# 2218# Interface to module: 2219# HAVE_GROFF: used in makefiles to conditionally generate documentation 2220# HAVE_GROFF_MM: the memorandum macros (-mm) package 2221# HAVE_GROFF_MS: the -ms macros package 2222# GROFF: returns the path of the groff program found 2223# returns the path set by the user in the environment 2224# --with-groff: 'yes' user instructs the module to use groff 2225# 'no' user instructs the module not to use groff 2226# 2227# Added in version 1.9.0: 2228# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2229# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2230# psselect from the psutils package. 2231# the ghostcript package. Refer to the grohtml man pages 2232# 2233# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2234# 2235# OS and distros often splits groff in a basic and full package, the former 2236# having the groff program and the later having devices, fonts and macros 2237# Checking for the groff executable is not enough. 2238# 2239# If macros are missing, we cannot assume that groff is useless, so we don't 2240# unset HAVE_GROFF or GROFF env variables. 2241# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2242# 2243AC_DEFUN([XORG_WITH_GROFF],[ 2244AC_ARG_VAR([GROFF], [Path to groff command]) 2245m4_define([_defopt], m4_default([$1], [auto])) 2246AC_ARG_WITH(groff, 2247 AS_HELP_STRING([--with-groff], 2248 [Use groff to regenerate documentation (default: ]_defopt[)]), 2249 [use_groff=$withval], [use_groff=]_defopt) 2250m4_undefine([_defopt]) 2251 2252if test "x$use_groff" = x"auto"; then 2253 AC_PATH_PROG([GROFF], [groff]) 2254 if test "x$GROFF" = "x"; then 2255 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2256 have_groff=no 2257 else 2258 have_groff=yes 2259 fi 2260elif test "x$use_groff" = x"yes" ; then 2261 AC_PATH_PROG([GROFF], [groff]) 2262 if test "x$GROFF" = "x"; then 2263 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2264 fi 2265 have_groff=yes 2266elif test "x$use_groff" = x"no" ; then 2267 if test "x$GROFF" != "x"; then 2268 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2269 fi 2270 have_groff=no 2271else 2272 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2273fi 2274 2275# We have groff, test for the presence of the macro packages 2276if test "x$have_groff" = x"yes"; then 2277 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2278 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2279 groff_ms_works=yes 2280 else 2281 groff_ms_works=no 2282 fi 2283 AC_MSG_RESULT([$groff_ms_works]) 2284 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2285 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2286 groff_mm_works=yes 2287 else 2288 groff_mm_works=no 2289 fi 2290 AC_MSG_RESULT([$groff_mm_works]) 2291fi 2292 2293# We have groff, test for HTML dependencies, one command per package 2294if test "x$have_groff" = x"yes"; then 2295 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2296 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2297 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2298 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2299 have_groff_html=yes 2300 else 2301 have_groff_html=no 2302 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2303 fi 2304fi 2305 2306# Set Automake conditionals for Makefiles 2307AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2308AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2309AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2310AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2311]) # XORG_WITH_GROFF 2312 2313# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2314# --------------------------------------- 2315# Minimum version: 1.6.0 2316# Minimum version for optional DEFAULT argument: 1.11.0 2317# Minimum version for optional MIN-VERSION argument: 1.15.0 2318# 2319# Documentation tools are not always available on all platforms and sometimes 2320# not at the appropriate level. This macro enables a module to test for the 2321# presence of the tool and obtain it's path in separate variables. Coupled with 2322# the --with-fop option, it allows maximum flexibilty in making decisions 2323# as whether or not to use the fop package. When DEFAULT is not specified, 2324# --with-fop assumes 'auto'. 2325# 2326# Interface to module: 2327# HAVE_FOP: used in makefiles to conditionally generate documentation 2328# FOP: returns the path of the fop program found 2329# returns the path set by the user in the environment 2330# --with-fop: 'yes' user instructs the module to use fop 2331# 'no' user instructs the module not to use fop 2332# 2333# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2334# 2335AC_DEFUN([XORG_WITH_FOP],[ 2336AC_ARG_VAR([FOP], [Path to fop command]) 2337m4_define([_defopt], m4_default([$2], [auto])) 2338AC_ARG_WITH(fop, 2339 AS_HELP_STRING([--with-fop], 2340 [Use fop to regenerate documentation (default: ]_defopt[)]), 2341 [use_fop=$withval], [use_fop=]_defopt) 2342m4_undefine([_defopt]) 2343 2344if test "x$use_fop" = x"auto"; then 2345 AC_PATH_PROG([FOP], [fop]) 2346 if test "x$FOP" = "x"; then 2347 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2348 have_fop=no 2349 else 2350 have_fop=yes 2351 fi 2352elif test "x$use_fop" = x"yes" ; then 2353 AC_PATH_PROG([FOP], [fop]) 2354 if test "x$FOP" = "x"; then 2355 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2356 fi 2357 have_fop=yes 2358elif test "x$use_fop" = x"no" ; then 2359 if test "x$FOP" != "x"; then 2360 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2361 fi 2362 have_fop=no 2363else 2364 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2365fi 2366 2367# Test for a minimum version of fop, if provided. 2368m4_ifval([$1], 2369[if test "$have_fop" = yes; then 2370 # scrape the fop version 2371 AC_MSG_CHECKING([for fop minimum version]) 2372 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2373 AC_MSG_RESULT([$fop_version]) 2374 AS_VERSION_COMPARE([$fop_version], [$1], 2375 [if test "x$use_fop" = xauto; then 2376 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2377 have_fop=no 2378 else 2379 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2380 fi]) 2381fi]) 2382AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2383]) # XORG_WITH_FOP 2384 2385# XORG_WITH_M4([MIN-VERSION]) 2386# --------------------------- 2387# Minimum version: 1.19.0 2388# 2389# This macro attempts to locate an m4 macro processor which supports 2390# -I option and is only useful for modules relying on M4 in order to 2391# expand macros in source code files. 2392# 2393# Interface to module: 2394# M4: returns the path of the m4 program found 2395# returns the path set by the user in the environment 2396# 2397AC_DEFUN([XORG_WITH_M4], [ 2398AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2399 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2400 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2401 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2402 [AC_MSG_ERROR([could not find m4 that supports -I option])], 2403 [$PATH:/usr/gnu/bin])]) 2404 2405AC_SUBST([M4], [$ac_cv_path_M4]) 2406]) # XORG_WITH_M4 2407 2408# XORG_WITH_PS2PDF([DEFAULT]) 2409# ---------------- 2410# Minimum version: 1.6.0 2411# Minimum version for optional DEFAULT argument: 1.11.0 2412# 2413# Documentation tools are not always available on all platforms and sometimes 2414# not at the appropriate level. This macro enables a module to test for the 2415# presence of the tool and obtain it's path in separate variables. Coupled with 2416# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2417# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2418# --with-ps2pdf assumes 'auto'. 2419# 2420# Interface to module: 2421# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2422# PS2PDF: returns the path of the ps2pdf program found 2423# returns the path set by the user in the environment 2424# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2425# 'no' user instructs the module not to use ps2pdf 2426# 2427# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2428# 2429AC_DEFUN([XORG_WITH_PS2PDF],[ 2430AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2431m4_define([_defopt], m4_default([$1], [auto])) 2432AC_ARG_WITH(ps2pdf, 2433 AS_HELP_STRING([--with-ps2pdf], 2434 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2435 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2436m4_undefine([_defopt]) 2437 2438if test "x$use_ps2pdf" = x"auto"; then 2439 AC_PATH_PROG([PS2PDF], [ps2pdf]) 2440 if test "x$PS2PDF" = "x"; then 2441 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2442 have_ps2pdf=no 2443 else 2444 have_ps2pdf=yes 2445 fi 2446elif test "x$use_ps2pdf" = x"yes" ; then 2447 AC_PATH_PROG([PS2PDF], [ps2pdf]) 2448 if test "x$PS2PDF" = "x"; then 2449 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2450 fi 2451 have_ps2pdf=yes 2452elif test "x$use_ps2pdf" = x"no" ; then 2453 if test "x$PS2PDF" != "x"; then 2454 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2455 fi 2456 have_ps2pdf=no 2457else 2458 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2459fi 2460AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2461]) # XORG_WITH_PS2PDF 2462 2463# XORG_ENABLE_DOCS (enable_docs=yes) 2464# ---------------- 2465# Minimum version: 1.6.0 2466# 2467# Documentation tools are not always available on all platforms and sometimes 2468# not at the appropriate level. This macro enables a builder to skip all 2469# documentation targets except traditional man pages. 2470# Combined with the specific tool checking macros XORG_WITH_*, it provides 2471# maximum flexibilty in controlling documentation building. 2472# Refer to: 2473# XORG_WITH_XMLTO --with-xmlto 2474# XORG_WITH_ASCIIDOC --with-asciidoc 2475# XORG_WITH_DOXYGEN --with-doxygen 2476# XORG_WITH_FOP --with-fop 2477# XORG_WITH_GROFF --with-groff 2478# XORG_WITH_PS2PDF --with-ps2pdf 2479# 2480# Interface to module: 2481# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2482# --enable-docs: 'yes' user instructs the module to generate docs 2483# 'no' user instructs the module not to generate docs 2484# parm1: specify the default value, yes or no. 2485# 2486AC_DEFUN([XORG_ENABLE_DOCS],[ 2487m4_define([docs_default], m4_default([$1], [yes])) 2488AC_ARG_ENABLE(docs, 2489 AS_HELP_STRING([--enable-docs], 2490 [Enable building the documentation (default: ]docs_default[)]), 2491 [build_docs=$enableval], [build_docs=]docs_default) 2492m4_undefine([docs_default]) 2493AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2494AC_MSG_CHECKING([whether to build documentation]) 2495AC_MSG_RESULT([$build_docs]) 2496]) # XORG_ENABLE_DOCS 2497 2498# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2499# ---------------- 2500# Minimum version: 1.6.0 2501# 2502# This macro enables a builder to skip all developer documentation. 2503# Combined with the specific tool checking macros XORG_WITH_*, it provides 2504# maximum flexibilty in controlling documentation building. 2505# Refer to: 2506# XORG_WITH_XMLTO --with-xmlto 2507# XORG_WITH_ASCIIDOC --with-asciidoc 2508# XORG_WITH_DOXYGEN --with-doxygen 2509# XORG_WITH_FOP --with-fop 2510# XORG_WITH_GROFF --with-groff 2511# XORG_WITH_PS2PDF --with-ps2pdf 2512# 2513# Interface to module: 2514# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2515# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2516# 'no' user instructs the module not to generate developer docs 2517# parm1: specify the default value, yes or no. 2518# 2519AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2520m4_define([devel_default], m4_default([$1], [yes])) 2521AC_ARG_ENABLE(devel-docs, 2522 AS_HELP_STRING([--enable-devel-docs], 2523 [Enable building the developer documentation (default: ]devel_default[)]), 2524 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2525m4_undefine([devel_default]) 2526AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2527AC_MSG_CHECKING([whether to build developer documentation]) 2528AC_MSG_RESULT([$build_devel_docs]) 2529]) # XORG_ENABLE_DEVEL_DOCS 2530 2531# XORG_ENABLE_SPECS (enable_specs=yes) 2532# ---------------- 2533# Minimum version: 1.6.0 2534# 2535# This macro enables a builder to skip all functional specification targets. 2536# Combined with the specific tool checking macros XORG_WITH_*, it provides 2537# maximum flexibilty in controlling documentation building. 2538# Refer to: 2539# XORG_WITH_XMLTO --with-xmlto 2540# XORG_WITH_ASCIIDOC --with-asciidoc 2541# XORG_WITH_DOXYGEN --with-doxygen 2542# XORG_WITH_FOP --with-fop 2543# XORG_WITH_GROFF --with-groff 2544# XORG_WITH_PS2PDF --with-ps2pdf 2545# 2546# Interface to module: 2547# ENABLE_SPECS: used in makefiles to conditionally generate specs 2548# --enable-specs: 'yes' user instructs the module to generate specs 2549# 'no' user instructs the module not to generate specs 2550# parm1: specify the default value, yes or no. 2551# 2552AC_DEFUN([XORG_ENABLE_SPECS],[ 2553m4_define([spec_default], m4_default([$1], [yes])) 2554AC_ARG_ENABLE(specs, 2555 AS_HELP_STRING([--enable-specs], 2556 [Enable building the specs (default: ]spec_default[)]), 2557 [build_specs=$enableval], [build_specs=]spec_default) 2558m4_undefine([spec_default]) 2559AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2560AC_MSG_CHECKING([whether to build functional specifications]) 2561AC_MSG_RESULT([$build_specs]) 2562]) # XORG_ENABLE_SPECS 2563 2564# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2565# ---------------------------------------------- 2566# Minimum version: 1.13.0 2567# 2568# This macro enables a builder to enable/disable unit testing 2569# It makes no assumption about the test cases implementation 2570# Test cases may or may not use Automake "Support for test suites" 2571# They may or may not use the software utility library GLib 2572# 2573# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2574# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2575# The variable enable_unit_tests is used by other macros in this file. 2576# 2577# Interface to module: 2578# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2579# enable_unit_tests: used in configure.ac for additional configuration 2580# --enable-unit-tests: 'yes' user instructs the module to build tests 2581# 'no' user instructs the module not to build tests 2582# parm1: specify the default value, yes or no. 2583# 2584AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2585AC_BEFORE([$0], [XORG_WITH_GLIB]) 2586AC_BEFORE([$0], [XORG_LD_WRAP]) 2587AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2588m4_define([_defopt], m4_default([$1], [auto])) 2589AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2590 [Enable building unit test cases (default: ]_defopt[)]), 2591 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2592m4_undefine([_defopt]) 2593AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2594AC_MSG_CHECKING([whether to build unit test cases]) 2595AC_MSG_RESULT([$enable_unit_tests]) 2596]) # XORG_ENABLE_UNIT_TESTS 2597 2598# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2599# ------------------------------------------------------ 2600# Minimum version: 1.17.0 2601# 2602# This macro enables a builder to enable/disable integration testing 2603# It makes no assumption about the test cases' implementation 2604# Test cases may or may not use Automake "Support for test suites" 2605# 2606# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2607# usually requires less dependencies and may be built and run under less 2608# stringent environments than integration tests. 2609# 2610# Interface to module: 2611# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2612# enable_integration_tests: used in configure.ac for additional configuration 2613# --enable-integration-tests: 'yes' user instructs the module to build tests 2614# 'no' user instructs the module not to build tests 2615# parm1: specify the default value, yes or no. 2616# 2617AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2618AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2619m4_define([_defopt], m4_default([$1], [auto])) 2620AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2621 [Enable building integration test cases (default: ]_defopt[)]), 2622 [enable_integration_tests=$enableval], 2623 [enable_integration_tests=]_defopt) 2624m4_undefine([_defopt]) 2625AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2626 [test "x$enable_integration_tests" != xno]) 2627AC_MSG_CHECKING([whether to build unit test cases]) 2628AC_MSG_RESULT([$enable_integration_tests]) 2629]) # XORG_ENABLE_INTEGRATION_TESTS 2630 2631# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2632# ---------------------------------------- 2633# Minimum version: 1.13.0 2634# 2635# GLib is a library which provides advanced data structures and functions. 2636# This macro enables a module to test for the presence of Glib. 2637# 2638# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2639# Otherwise the value of $enable_unit_tests is blank. 2640# 2641# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2642# test support usually requires less dependencies and may be built and run under 2643# less stringent environments than integration tests. 2644# 2645# Interface to module: 2646# HAVE_GLIB: used in makefiles to conditionally build targets 2647# with_glib: used in configure.ac to know if GLib has been found 2648# --with-glib: 'yes' user instructs the module to use glib 2649# 'no' user instructs the module not to use glib 2650# 2651AC_DEFUN([XORG_WITH_GLIB],[ 2652AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2653m4_define([_defopt], m4_default([$2], [auto])) 2654AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2655 [Use GLib library for unit testing (default: ]_defopt[)]), 2656 [with_glib=$withval], [with_glib=]_defopt) 2657m4_undefine([_defopt]) 2658 2659have_glib=no 2660# Do not probe GLib if user explicitly disabled unit testing 2661if test "x$enable_unit_tests" != x"no"; then 2662 # Do not probe GLib if user explicitly disabled it 2663 if test "x$with_glib" != x"no"; then 2664 m4_ifval( 2665 [$1], 2666 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2667 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2668 ) 2669 fi 2670fi 2671 2672# Not having GLib when unit testing has been explicitly requested is an error 2673if test "x$enable_unit_tests" = x"yes"; then 2674 if test "x$have_glib" = x"no"; then 2675 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2676 fi 2677fi 2678 2679# Having unit testing disabled when GLib has been explicitly requested is an error 2680if test "x$enable_unit_tests" = x"no"; then 2681 if test "x$with_glib" = x"yes"; then 2682 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2683 fi 2684fi 2685 2686# Not having GLib when it has been explicitly requested is an error 2687if test "x$with_glib" = x"yes"; then 2688 if test "x$have_glib" = x"no"; then 2689 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2690 fi 2691fi 2692 2693AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2694]) # XORG_WITH_GLIB 2695 2696# XORG_LD_WRAP([required|optional]) 2697# --------------------------------- 2698# Minimum version: 1.13.0 2699# 2700# Check if linker supports -wrap, passed via compiler flags 2701# 2702# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2703# Otherwise the value of $enable_unit_tests is blank. 2704# 2705# Argument added in 1.16.0 - default is "required", to match existing behavior 2706# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2707# available, an argument of "optional" allows use when some unit tests require 2708# ld -wrap and others do not. 2709# 2710AC_DEFUN([XORG_LD_WRAP],[ 2711XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2712 [AC_LANG_PROGRAM([#include <stdlib.h> 2713 void __wrap_exit(int status) { return; }], 2714 [exit(0);])]) 2715# Not having ld wrap when unit testing has been explicitly requested is an error 2716if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2717 if test "x$have_ld_wrap" = x"no"; then 2718 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2719 fi 2720fi 2721AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2722# 2723]) # XORG_LD_WRAP 2724 2725# XORG_CHECK_LINKER_FLAGS 2726# ----------------------- 2727# SYNOPSIS 2728# 2729# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2730# 2731# DESCRIPTION 2732# 2733# Check whether the given linker FLAGS work with the current language's 2734# linker, or whether they give an error. 2735# 2736# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2737# success/failure. 2738# 2739# PROGRAM-SOURCE is the program source to link with, if needed 2740# 2741# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2742# 2743# LICENSE 2744# 2745# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2746# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2747# Copyright (c) 2009 Matteo Frigo 2748# 2749# This program is free software: you can redistribute it and/or modify it 2750# under the terms of the GNU General Public License as published by the 2751# Free Software Foundation, either version 3 of the License, or (at your 2752# option) any later version. 2753# 2754# This program is distributed in the hope that it will be useful, but 2755# WITHOUT ANY WARRANTY; without even the implied warranty of 2756# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2757# Public License for more details. 2758# 2759# You should have received a copy of the GNU General Public License along 2760# with this program. If not, see <http://www.gnu.org/licenses/>. 2761# 2762# As a special exception, the respective Autoconf Macro's copyright owner 2763# gives unlimited permission to copy, distribute and modify the configure 2764# scripts that are the output of Autoconf when processing the Macro. You 2765# need not follow the terms of the GNU General Public License when using 2766# or distributing such scripts, even though portions of the text of the 2767# Macro appear in them. The GNU General Public License (GPL) does govern 2768# all other use of the material that constitutes the Autoconf Macro. 2769# 2770# This special exception to the GPL applies to versions of the Autoconf 2771# Macro released by the Autoconf Archive. When you make and distribute a 2772# modified version of the Autoconf Macro, you may extend this special 2773# exception to the GPL to apply to your modified version as well.# 2774AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2775[AC_MSG_CHECKING([whether the linker accepts $1]) 2776dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2777AS_LITERAL_IF([$1], 2778 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2779 ax_save_FLAGS=$LDFLAGS 2780 LDFLAGS="$1" 2781 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2782 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2783 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2784 LDFLAGS=$ax_save_FLAGS])], 2785 [ax_save_FLAGS=$LDFLAGS 2786 LDFLAGS="$1" 2787 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2788 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2789 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2790 LDFLAGS=$ax_save_FLAGS]) 2791eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2792AC_MSG_RESULT($xorg_check_linker_flags) 2793if test "x$xorg_check_linker_flags" = xyes; then 2794 m4_default([$2], :) 2795else 2796 m4_default([$3], :) 2797fi 2798]) # XORG_CHECK_LINKER_FLAGS 2799 2800# XORG_MEMORY_CHECK_FLAGS 2801# ----------------------- 2802# Minimum version: 1.16.0 2803# 2804# This macro attempts to find appropriate memory checking functionality 2805# for various platforms which unit testing code may use to catch various 2806# forms of memory allocation and access errors in testing. 2807# 2808# Interface to module: 2809# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2810# Usually added to TESTS_ENVIRONMENT in Makefile.am 2811# 2812# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2813# 2814AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2815 2816AC_REQUIRE([AC_CANONICAL_HOST]) 2817AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2818 [Environment variables to enable memory checking in tests]) 2819 2820# Check for different types of support on different platforms 2821case $host_os in 2822 solaris*) 2823 AC_CHECK_LIB([umem], [umem_alloc], 2824 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2825 ;; 2826 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2827 # both directly and inverted, so should not be 0 or 255. 2828 malloc_debug_env='MALLOC_PERTURB_=15' 2829 ;; 2830 darwin*) 2831 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2832 ;; 2833 *bsd*) 2834 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2835 ;; 2836esac 2837 2838# User supplied flags override default flags 2839if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2840 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2841fi 2842 2843AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2844]) # XORG_WITH_LINT 2845 2846# XORG_CHECK_MALLOC_ZERO 2847# ---------------------- 2848# Minimum version: 1.0.0 2849# 2850# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2851# malloc(0) returns NULL. Packages should add one of these cflags to 2852# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2853AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2854AC_ARG_ENABLE(malloc0returnsnull, 2855 AS_HELP_STRING([--enable-malloc0returnsnull], 2856 [malloc(0) returns NULL (default: auto)]), 2857 [MALLOC_ZERO_RETURNS_NULL=$enableval], 2858 [MALLOC_ZERO_RETURNS_NULL=auto]) 2859 2860AC_MSG_CHECKING([whether malloc(0) returns NULL]) 2861if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2862AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2863 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2864#include <stdlib.h> 2865],[ 2866 char *m0, *r0, *c0, *p; 2867 m0 = malloc(0); 2868 p = malloc(10); 2869 r0 = realloc(p,0); 2870 c0 = calloc(0,10); 2871 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2872])], 2873 [xorg_cv_malloc0_returns_null=yes], 2874 [xorg_cv_malloc0_returns_null=no])]) 2875MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2876fi 2877AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2878 2879if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2880 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2881 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2882 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2883else 2884 MALLOC_ZERO_CFLAGS="" 2885 XMALLOC_ZERO_CFLAGS="" 2886 XTMALLOC_ZERO_CFLAGS="" 2887fi 2888 2889AC_SUBST([MALLOC_ZERO_CFLAGS]) 2890AC_SUBST([XMALLOC_ZERO_CFLAGS]) 2891AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2892]) # XORG_CHECK_MALLOC_ZERO 2893 2894# XORG_WITH_LINT() 2895# ---------------- 2896# Minimum version: 1.1.0 2897# 2898# This macro enables the use of a tool that flags some suspicious and 2899# non-portable constructs (likely to be bugs) in C language source code. 2900# It will attempt to locate the tool and use appropriate options. 2901# There are various lint type tools on different platforms. 2902# 2903# Interface to module: 2904# LINT: returns the path to the tool found on the platform 2905# or the value set to LINT on the configure cmd line 2906# also an Automake conditional 2907# LINT_FLAGS: an Automake variable with appropriate flags 2908# 2909# --with-lint: 'yes' user instructs the module to use lint 2910# 'no' user instructs the module not to use lint (default) 2911# 2912# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2913# If the user sets the value of LINT_FLAGS, they are used verbatim. 2914# 2915AC_DEFUN([XORG_WITH_LINT],[ 2916 2917AC_ARG_VAR([LINT], [Path to a lint-style command]) 2918AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2919AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2920 [Use a lint-style source code checker (default: disabled)])], 2921 [use_lint=$withval], [use_lint=no]) 2922 2923# Obtain platform specific info like program name and options 2924# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2925case $host_os in 2926 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2927 lint_name=splint 2928 lint_options="-badflag" 2929 ;; 2930 *freebsd* | *netbsd*) 2931 lint_name=lint 2932 lint_options="-u -b" 2933 ;; 2934 *solaris*) 2935 lint_name=lint 2936 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2937 ;; 2938esac 2939 2940# Test for the presence of the program (either guessed by the code or spelled out by the user) 2941if test "x$use_lint" = x"yes" ; then 2942 AC_PATH_PROG([LINT], [$lint_name]) 2943 if test "x$LINT" = "x"; then 2944 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2945 fi 2946elif test "x$use_lint" = x"no" ; then 2947 if test "x$LINT" != "x"; then 2948 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2949 fi 2950else 2951 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2952fi 2953 2954# User supplied flags override default flags 2955if test "x$LINT_FLAGS" != "x"; then 2956 lint_options=$LINT_FLAGS 2957fi 2958 2959AC_SUBST([LINT_FLAGS],[$lint_options]) 2960AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2961 2962]) # XORG_WITH_LINT 2963 2964# XORG_LINT_LIBRARY(LIBNAME) 2965# -------------------------- 2966# Minimum version: 1.1.0 2967# 2968# Sets up flags for building lint libraries for checking programs that call 2969# functions in the library. 2970# 2971# Interface to module: 2972# LINTLIB - Automake variable with the name of lint library file to make 2973# MAKE_LINT_LIB - Automake conditional 2974# 2975# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2976# - 'no' user instructs the module not to create a lint library (default) 2977 2978AC_DEFUN([XORG_LINT_LIBRARY],[ 2979AC_REQUIRE([XORG_WITH_LINT]) 2980AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2981 [Create lint library (default: disabled)])], 2982 [make_lint_lib=$enableval], [make_lint_lib=no]) 2983 2984if test "x$make_lint_lib" = x"yes" ; then 2985 LINTLIB=llib-l$1.ln 2986 if test "x$LINT" = "x"; then 2987 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2988 fi 2989elif test "x$make_lint_lib" != x"no" ; then 2990 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2991fi 2992 2993AC_SUBST(LINTLIB) 2994AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2995 2996]) # XORG_LINT_LIBRARY 2997 2998# XORG_COMPILER_BRAND 2999# ------------------- 3000# Minimum version: 1.14.0 3001# 3002# Checks for various brands of compilers and sets flags as appropriate: 3003# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 3004# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 3005# clang compiler - sets CLANGCC to "yes" 3006# Intel compiler - sets INTELCC to "yes" 3007# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 3008# 3009AC_DEFUN([XORG_COMPILER_BRAND], [ 3010AC_LANG_CASE( 3011 [C], [ 3012 AC_REQUIRE([AC_PROG_CC_C99]) 3013 ], 3014 [C++], [ 3015 AC_REQUIRE([AC_PROG_CXX]) 3016 ] 3017) 3018AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 3019AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 3020AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 3021]) # XORG_COMPILER_BRAND 3022 3023# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 3024# --------------- 3025# Minimum version: 1.16.0 3026# 3027# Test if the compiler works when passed the given flag as a command line argument. 3028# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 3029# next flag in the list until there are no more options. 3030# 3031# Note that this does not guarantee that the compiler supports the flag as some 3032# compilers will simply ignore arguments that they do not understand, but we do 3033# attempt to weed out false positives by using -Werror=unknown-warning-option and 3034# -Werror=unused-command-line-argument 3035# 3036AC_DEFUN([XORG_TESTSET_CFLAG], [ 3037m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3038m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3039 3040AC_LANG_COMPILER_REQUIRE 3041 3042AC_LANG_CASE( 3043 [C], [ 3044 AC_REQUIRE([AC_PROG_CC_C99]) 3045 define([PREFIX], [C]) 3046 define([CACHE_PREFIX], [cc]) 3047 define([COMPILER], [$CC]) 3048 ], 3049 [C++], [ 3050 define([PREFIX], [CXX]) 3051 define([CACHE_PREFIX], [cxx]) 3052 define([COMPILER], [$CXX]) 3053 ] 3054) 3055 3056[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3057 3058if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3059 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3060 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3061 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3062 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3063 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3064 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3065 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3066 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3067fi 3068 3069if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3070 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3071 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3072 fi 3073 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3074 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3075 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3076 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3077 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3078 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3079 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3080 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3081fi 3082 3083found="no" 3084m4_foreach([flag], m4_cdr($@), [ 3085 if test $found = "no" ; then 3086 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3087 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3088 fi 3089 3090 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3091 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3092 fi 3093 3094 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3095 3096dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3097 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3098 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3099 AC_CACHE_VAL($cacheid, 3100 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3101 [eval $cacheid=yes], 3102 [eval $cacheid=no])]) 3103 3104 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3105 3106 eval supported=\$$cacheid 3107 AC_MSG_RESULT([$supported]) 3108 if test "$supported" = "yes" ; then 3109 $1="$$1 ]flag[" 3110 found="yes" 3111 fi 3112 fi 3113]) 3114]) # XORG_TESTSET_CFLAG 3115 3116# XORG_COMPILER_FLAGS 3117# --------------- 3118# Minimum version: 1.16.0 3119# 3120# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3121# arguments supported by the selected compiler which do NOT alter the generated 3122# code. These arguments will cause the compiler to print various warnings 3123# during compilation AND turn a conservative set of warnings into errors. 3124# 3125# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3126# future versions of util-macros as options are added to new compilers. 3127# 3128AC_DEFUN([XORG_COMPILER_FLAGS], [ 3129AC_REQUIRE([XORG_COMPILER_BRAND]) 3130 3131AC_ARG_ENABLE(selective-werror, 3132 AS_HELP_STRING([--disable-selective-werror], 3133 [Turn off selective compiler errors. (default: enabled)]), 3134 [SELECTIVE_WERROR=$enableval], 3135 [SELECTIVE_WERROR=yes]) 3136 3137AC_LANG_CASE( 3138 [C], [ 3139 define([PREFIX], [C]) 3140 ], 3141 [C++], [ 3142 define([PREFIX], [CXX]) 3143 ] 3144) 3145# -v is too short to test reliably with XORG_TESTSET_CFLAG 3146if test "x$SUNCC" = "xyes"; then 3147 [BASE_]PREFIX[FLAGS]="-v" 3148else 3149 [BASE_]PREFIX[FLAGS]="" 3150fi 3151 3152# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3153XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3154XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3155XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3156XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3157 3158AC_LANG_CASE( 3159 [C], [ 3160 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3161 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3162 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3163 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3164 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3165 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3166 ] 3167) 3168 3169# This chunk adds additional warnings that could catch undesired effects. 3170XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3171XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3172XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3173XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3174XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3175XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3176XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3177 3178# These are currently disabled because they are noisy. They will be enabled 3179# in the future once the codebase is sufficiently modernized to silence 3180# them. For now, I don't want them to drown out the other warnings. 3181# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3182# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3183# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3184 3185# Turn some warnings into errors, so we don't accidently get successful builds 3186# when there are problems that should be fixed. 3187 3188if test "x$SELECTIVE_WERROR" = "xyes" ; then 3189XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3190XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3191XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3192XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3193XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3194XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3195XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3196XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3197XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3198XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3199XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3200XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3201XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3202else 3203AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 3204XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3205XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3206XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3207XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3208XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3209XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3210XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3211XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3212XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3213XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3214XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3215XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3216XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3217fi 3218 3219AC_SUBST([BASE_]PREFIX[FLAGS]) 3220]) # XORG_COMPILER_FLAGS 3221 3222# XORG_CWARNFLAGS 3223# --------------- 3224# Minimum version: 1.2.0 3225# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3226# 3227# Defines CWARNFLAGS to enable C compiler warnings. 3228# 3229# This function is deprecated because it defines -fno-strict-aliasing 3230# which alters the code generated by the compiler. If -fno-strict-aliasing 3231# is needed, then it should be added explicitly in the module when 3232# it is updated to use BASE_CFLAGS. 3233# 3234AC_DEFUN([XORG_CWARNFLAGS], [ 3235AC_REQUIRE([XORG_COMPILER_FLAGS]) 3236AC_REQUIRE([XORG_COMPILER_BRAND]) 3237AC_LANG_CASE( 3238 [C], [ 3239 CWARNFLAGS="$BASE_CFLAGS" 3240 if test "x$GCC" = xyes ; then 3241 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3242 fi 3243 AC_SUBST(CWARNFLAGS) 3244 ] 3245) 3246]) # XORG_CWARNFLAGS 3247 3248# XORG_STRICT_OPTION 3249# ----------------------- 3250# Minimum version: 1.3.0 3251# 3252# Add configure option to enable strict compilation flags, such as treating 3253# warnings as fatal errors. 3254# If --enable-strict-compilation is passed to configure, adds strict flags to 3255# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3256# 3257# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3258# when strict compilation is unconditionally desired. 3259AC_DEFUN([XORG_STRICT_OPTION], [ 3260AC_REQUIRE([XORG_CWARNFLAGS]) 3261AC_REQUIRE([XORG_COMPILER_FLAGS]) 3262 3263AC_ARG_ENABLE(strict-compilation, 3264 AS_HELP_STRING([--enable-strict-compilation], 3265 [Enable all warnings from compiler and make them errors (default: disabled)]), 3266 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3267 3268AC_LANG_CASE( 3269 [C], [ 3270 define([PREFIX], [C]) 3271 ], 3272 [C++], [ 3273 define([PREFIX], [CXX]) 3274 ] 3275) 3276 3277[STRICT_]PREFIX[FLAGS]="" 3278XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3279XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3280 3281# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3282# activate it with -Werror, so we add it here explicitly. 3283XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3284 3285if test "x$STRICT_COMPILE" = "xyes"; then 3286 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3287 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3288fi 3289AC_SUBST([STRICT_]PREFIX[FLAGS]) 3290AC_SUBST([BASE_]PREFIX[FLAGS]) 3291AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3292]) # XORG_STRICT_OPTION 3293 3294# XORG_DEFAULT_OPTIONS 3295# -------------------- 3296# Minimum version: 1.3.0 3297# 3298# Defines default options for X.Org modules. 3299# 3300AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3301AC_REQUIRE([AC_PROG_INSTALL]) 3302XORG_COMPILER_FLAGS 3303XORG_CWARNFLAGS 3304XORG_STRICT_OPTION 3305XORG_RELEASE_VERSION 3306XORG_CHANGELOG 3307XORG_INSTALL 3308XORG_MANPAGE_SECTIONS 3309m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3310 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3311]) # XORG_DEFAULT_OPTIONS 3312 3313# XORG_INSTALL() 3314# ---------------- 3315# Minimum version: 1.4.0 3316# 3317# Defines the variable INSTALL_CMD as the command to copy 3318# INSTALL from $prefix/share/util-macros. 3319# 3320AC_DEFUN([XORG_INSTALL], [ 3321AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3322macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3323INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3324mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3325|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3326touch \$(top_srcdir)/INSTALL; \ 3327echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3328AC_SUBST([INSTALL_CMD]) 3329]) # XORG_INSTALL 3330dnl Copyright 2005 Red Hat, Inc 3331dnl 3332dnl Permission to use, copy, modify, distribute, and sell this software and its 3333dnl documentation for any purpose is hereby granted without fee, provided that 3334dnl the above copyright notice appear in all copies and that both that 3335dnl copyright notice and this permission notice appear in supporting 3336dnl documentation. 3337dnl 3338dnl The above copyright notice and this permission notice shall be included 3339dnl in all copies or substantial portions of the Software. 3340dnl 3341dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3342dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3343dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3344dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3345dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3346dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3347dnl OTHER DEALINGS IN THE SOFTWARE. 3348dnl 3349dnl Except as contained in this notice, the name of the copyright holders shall 3350dnl not be used in advertising or otherwise to promote the sale, use or 3351dnl other dealings in this Software without prior written authorization 3352dnl from the copyright holders. 3353dnl 3354 3355# XORG_RELEASE_VERSION 3356# -------------------- 3357# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3358 3359AC_DEFUN([XORG_RELEASE_VERSION],[ 3360 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3361 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3362 [Major version of this package]) 3363 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3364 if test "x$PVM" = "x"; then 3365 PVM="0" 3366 fi 3367 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3368 [$PVM], 3369 [Minor version of this package]) 3370 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3371 if test "x$PVP" = "x"; then 3372 PVP="0" 3373 fi 3374 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3375 [$PVP], 3376 [Patch version of this package]) 3377]) 3378 3379# XORG_CHANGELOG() 3380# ---------------- 3381# Minimum version: 1.2.0 3382# 3383# Defines the variable CHANGELOG_CMD as the command to generate 3384# ChangeLog from git. 3385# 3386# 3387AC_DEFUN([XORG_CHANGELOG], [ 3388CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3389mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3390|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3391touch \$(top_srcdir)/ChangeLog; \ 3392echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3393AC_SUBST([CHANGELOG_CMD]) 3394]) # XORG_CHANGELOG 3395 3396# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3397# 3398# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3399# Foundation, Inc. 3400# Written by Gordon Matzigkeit, 1996 3401# 3402# This file is free software; the Free Software Foundation gives 3403# unlimited permission to copy and/or distribute it, with or without 3404# modifications, as long as this notice is preserved. 3405 3406m4_define([_LT_COPYING], [dnl 3407# Copyright (C) 2014 Free Software Foundation, Inc. 3408# This is free software; see the source for copying conditions. There is NO 3409# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3410 3411# GNU Libtool is free software; you can redistribute it and/or modify 3412# it under the terms of the GNU General Public License as published by 3413# the Free Software Foundation; either version 2 of of the License, or 3414# (at your option) any later version. 3415# 3416# As a special exception to the GNU General Public License, if you 3417# distribute this file as part of a program or library that is built 3418# using GNU Libtool, you may include this file under the same 3419# distribution terms that you use for the rest of that program. 3420# 3421# GNU Libtool is distributed in the hope that it will be useful, but 3422# WITHOUT ANY WARRANTY; without even the implied warranty of 3423# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3424# GNU General Public License for more details. 3425# 3426# You should have received a copy of the GNU General Public License 3427# along with this program. If not, see <http://www.gnu.org/licenses/>. 3428]) 3429 3430# serial 59 LT_INIT 3431 3432 3433# LT_PREREQ(VERSION) 3434# ------------------ 3435# Complain and exit if this libtool version is less that VERSION. 3436m4_defun([LT_PREREQ], 3437[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3438 [m4_default([$3], 3439 [m4_fatal([Libtool version $1 or higher is required], 3440 63)])], 3441 [$2])]) 3442 3443 3444# _LT_CHECK_BUILDDIR 3445# ------------------ 3446# Complain if the absolute build directory name contains unusual characters 3447m4_defun([_LT_CHECK_BUILDDIR], 3448[case `pwd` in 3449 *\ * | *\ *) 3450 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3451esac 3452]) 3453 3454 3455# LT_INIT([OPTIONS]) 3456# ------------------ 3457AC_DEFUN([LT_INIT], 3458[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3459AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3460AC_BEFORE([$0], [LT_LANG])dnl 3461AC_BEFORE([$0], [LT_OUTPUT])dnl 3462AC_BEFORE([$0], [LTDL_INIT])dnl 3463m4_require([_LT_CHECK_BUILDDIR])dnl 3464 3465dnl Autoconf doesn't catch unexpanded LT_ macros by default: 3466m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3467m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3468dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3469dnl unless we require an AC_DEFUNed macro: 3470AC_REQUIRE([LTOPTIONS_VERSION])dnl 3471AC_REQUIRE([LTSUGAR_VERSION])dnl 3472AC_REQUIRE([LTVERSION_VERSION])dnl 3473AC_REQUIRE([LTOBSOLETE_VERSION])dnl 3474m4_require([_LT_PROG_LTMAIN])dnl 3475 3476_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3477 3478dnl Parse OPTIONS 3479_LT_SET_OPTIONS([$0], [$1]) 3480 3481# This can be used to rebuild libtool when needed 3482LIBTOOL_DEPS=$ltmain 3483 3484# Always use our own libtool. 3485LIBTOOL='$(SHELL) $(top_builddir)/libtool' 3486AC_SUBST(LIBTOOL)dnl 3487 3488_LT_SETUP 3489 3490# Only expand once: 3491m4_define([LT_INIT]) 3492])# LT_INIT 3493 3494# Old names: 3495AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3496AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3497dnl aclocal-1.4 backwards compatibility: 3498dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3499dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3500 3501 3502# _LT_PREPARE_CC_BASENAME 3503# ----------------------- 3504m4_defun([_LT_PREPARE_CC_BASENAME], [ 3505# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3506func_cc_basename () 3507{ 3508 for cc_temp in @S|@*""; do 3509 case $cc_temp in 3510 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3511 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3512 \-*) ;; 3513 *) break;; 3514 esac 3515 done 3516 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3517} 3518])# _LT_PREPARE_CC_BASENAME 3519 3520 3521# _LT_CC_BASENAME(CC) 3522# ------------------- 3523# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3524# but that macro is also expanded into generated libtool script, which 3525# arranges for $SED and $ECHO to be set by different means. 3526m4_defun([_LT_CC_BASENAME], 3527[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3528AC_REQUIRE([_LT_DECL_SED])dnl 3529AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3530func_cc_basename $1 3531cc_basename=$func_cc_basename_result 3532]) 3533 3534 3535# _LT_FILEUTILS_DEFAULTS 3536# ---------------------- 3537# It is okay to use these file commands and assume they have been set 3538# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3539m4_defun([_LT_FILEUTILS_DEFAULTS], 3540[: ${CP="cp -f"} 3541: ${MV="mv -f"} 3542: ${RM="rm -f"} 3543])# _LT_FILEUTILS_DEFAULTS 3544 3545 3546# _LT_SETUP 3547# --------- 3548m4_defun([_LT_SETUP], 3549[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3550AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3551AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3552AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3553 3554_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3555dnl 3556_LT_DECL([], [host_alias], [0], [The host system])dnl 3557_LT_DECL([], [host], [0])dnl 3558_LT_DECL([], [host_os], [0])dnl 3559dnl 3560_LT_DECL([], [build_alias], [0], [The build system])dnl 3561_LT_DECL([], [build], [0])dnl 3562_LT_DECL([], [build_os], [0])dnl 3563dnl 3564AC_REQUIRE([AC_PROG_CC])dnl 3565AC_REQUIRE([LT_PATH_LD])dnl 3566AC_REQUIRE([LT_PATH_NM])dnl 3567dnl 3568AC_REQUIRE([AC_PROG_LN_S])dnl 3569test -z "$LN_S" && LN_S="ln -s" 3570_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3571dnl 3572AC_REQUIRE([LT_CMD_MAX_LEN])dnl 3573_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3574_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3575dnl 3576m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3577m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3578m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3579m4_require([_LT_CMD_RELOAD])dnl 3580m4_require([_LT_DECL_FILECMD])dnl 3581m4_require([_LT_CHECK_MAGIC_METHOD])dnl 3582m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3583m4_require([_LT_CMD_OLD_ARCHIVE])dnl 3584m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3585m4_require([_LT_WITH_SYSROOT])dnl 3586m4_require([_LT_CMD_TRUNCATE])dnl 3587 3588_LT_CONFIG_LIBTOOL_INIT([ 3589# See if we are running on zsh, and set the options that allow our 3590# commands through without removal of \ escapes INIT. 3591if test -n "\${ZSH_VERSION+set}"; then 3592 setopt NO_GLOB_SUBST 3593fi 3594]) 3595if test -n "${ZSH_VERSION+set}"; then 3596 setopt NO_GLOB_SUBST 3597fi 3598 3599_LT_CHECK_OBJDIR 3600 3601m4_require([_LT_TAG_COMPILER])dnl 3602 3603case $host_os in 3604aix3*) 3605 # AIX sometimes has problems with the GCC collect2 program. For some 3606 # reason, if we set the COLLECT_NAMES environment variable, the problems 3607 # vanish in a puff of smoke. 3608 if test set != "${COLLECT_NAMES+set}"; then 3609 COLLECT_NAMES= 3610 export COLLECT_NAMES 3611 fi 3612 ;; 3613esac 3614 3615# Global variables: 3616ofile=libtool 3617can_build_shared=yes 3618 3619# All known linkers require a '.a' archive for static linking (except MSVC and 3620# ICC, which need '.lib'). 3621libext=a 3622 3623with_gnu_ld=$lt_cv_prog_gnu_ld 3624 3625old_CC=$CC 3626old_CFLAGS=$CFLAGS 3627 3628# Set sane defaults for various variables 3629test -z "$CC" && CC=cc 3630test -z "$LTCC" && LTCC=$CC 3631test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3632test -z "$LD" && LD=ld 3633test -z "$ac_objext" && ac_objext=o 3634 3635_LT_CC_BASENAME([$compiler]) 3636 3637# Only perform the check for file, if the check method requires it 3638test -z "$MAGIC_CMD" && MAGIC_CMD=file 3639case $deplibs_check_method in 3640file_magic*) 3641 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3642 _LT_PATH_MAGIC 3643 fi 3644 ;; 3645esac 3646 3647# Use C for the default configuration in the libtool script 3648LT_SUPPORTED_TAG([CC]) 3649_LT_LANG_C_CONFIG 3650_LT_LANG_DEFAULT_CONFIG 3651_LT_CONFIG_COMMANDS 3652])# _LT_SETUP 3653 3654 3655# _LT_PREPARE_SED_QUOTE_VARS 3656# -------------------------- 3657# Define a few sed substitution that help us do robust quoting. 3658m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3659[# Backslashify metacharacters that are still active within 3660# double-quoted strings. 3661sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3662 3663# Same as above, but do not quote variable references. 3664double_quote_subst='s/\([["`\\]]\)/\\\1/g' 3665 3666# Sed substitution to delay expansion of an escaped shell variable in a 3667# double_quote_subst'ed string. 3668delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3669 3670# Sed substitution to delay expansion of an escaped single quote. 3671delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3672 3673# Sed substitution to avoid accidental globbing in evaled expressions 3674no_glob_subst='s/\*/\\\*/g' 3675]) 3676 3677# _LT_PROG_LTMAIN 3678# --------------- 3679# Note that this code is called both from 'configure', and 'config.status' 3680# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3681# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3682# so we pass a copy along to make sure it has a sensible value anyway. 3683m4_defun([_LT_PROG_LTMAIN], 3684[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3685_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3686ltmain=$ac_aux_dir/ltmain.sh 3687])# _LT_PROG_LTMAIN 3688 3689 3690 3691# So that we can recreate a full libtool script including additional 3692# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3693# in macros and then make a single call at the end using the 'libtool' 3694# label. 3695 3696 3697# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3698# ---------------------------------------- 3699# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3700m4_define([_LT_CONFIG_LIBTOOL_INIT], 3701[m4_ifval([$1], 3702 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3703 [$1 3704])])]) 3705 3706# Initialize. 3707m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3708 3709 3710# _LT_CONFIG_LIBTOOL([COMMANDS]) 3711# ------------------------------ 3712# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3713m4_define([_LT_CONFIG_LIBTOOL], 3714[m4_ifval([$1], 3715 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3716 [$1 3717])])]) 3718 3719# Initialize. 3720m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3721 3722 3723# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3724# ----------------------------------------------------- 3725m4_defun([_LT_CONFIG_SAVE_COMMANDS], 3726[_LT_CONFIG_LIBTOOL([$1]) 3727_LT_CONFIG_LIBTOOL_INIT([$2]) 3728]) 3729 3730 3731# _LT_FORMAT_COMMENT([COMMENT]) 3732# ----------------------------- 3733# Add leading comment marks to the start of each line, and a trailing 3734# full-stop to the whole comment if one is not present already. 3735m4_define([_LT_FORMAT_COMMENT], 3736[m4_ifval([$1], [ 3737m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3738 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3739)]) 3740 3741 3742 3743 3744 3745# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3746# ------------------------------------------------------------------- 3747# CONFIGNAME is the name given to the value in the libtool script. 3748# VARNAME is the (base) name used in the configure script. 3749# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3750# VARNAME. Any other value will be used directly. 3751m4_define([_LT_DECL], 3752[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3753 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3754 [m4_ifval([$1], [$1], [$2])]) 3755 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3756 m4_ifval([$4], 3757 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3758 lt_dict_add_subkey([lt_decl_dict], [$2], 3759 [tagged?], [m4_ifval([$5], [yes], [no])])]) 3760]) 3761 3762 3763# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3764# -------------------------------------------------------- 3765m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3766 3767 3768# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3769# ------------------------------------------------ 3770m4_define([lt_decl_tag_varnames], 3771[_lt_decl_filter([tagged?], [yes], $@)]) 3772 3773 3774# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3775# --------------------------------------------------------- 3776m4_define([_lt_decl_filter], 3777[m4_case([$#], 3778 [0], [m4_fatal([$0: too few arguments: $#])], 3779 [1], [m4_fatal([$0: too few arguments: $#: $1])], 3780 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3781 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3782 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3783]) 3784 3785 3786# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3787# -------------------------------------------------- 3788m4_define([lt_decl_quote_varnames], 3789[_lt_decl_filter([value], [1], $@)]) 3790 3791 3792# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3793# --------------------------------------------------- 3794m4_define([lt_decl_dquote_varnames], 3795[_lt_decl_filter([value], [2], $@)]) 3796 3797 3798# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3799# --------------------------------------------------- 3800m4_define([lt_decl_varnames_tagged], 3801[m4_assert([$# <= 2])dnl 3802_$0(m4_quote(m4_default([$1], [[, ]])), 3803 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3804 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3805m4_define([_lt_decl_varnames_tagged], 3806[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3807 3808 3809# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3810# ------------------------------------------------ 3811m4_define([lt_decl_all_varnames], 3812[_$0(m4_quote(m4_default([$1], [[, ]])), 3813 m4_if([$2], [], 3814 m4_quote(lt_decl_varnames), 3815 m4_quote(m4_shift($@))))[]dnl 3816]) 3817m4_define([_lt_decl_all_varnames], 3818[lt_join($@, lt_decl_varnames_tagged([$1], 3819 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3820]) 3821 3822 3823# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3824# ------------------------------------ 3825# Quote a variable value, and forward it to 'config.status' so that its 3826# declaration there will have the same value as in 'configure'. VARNAME 3827# must have a single quote delimited value for this to work. 3828m4_define([_LT_CONFIG_STATUS_DECLARE], 3829[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3830 3831 3832# _LT_CONFIG_STATUS_DECLARATIONS 3833# ------------------------------ 3834# We delimit libtool config variables with single quotes, so when 3835# we write them to config.status, we have to be sure to quote all 3836# embedded single quotes properly. In configure, this macro expands 3837# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3838# 3839# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3840m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3841[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3842 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3843 3844 3845# _LT_LIBTOOL_TAGS 3846# ---------------- 3847# Output comment and list of tags supported by the script 3848m4_defun([_LT_LIBTOOL_TAGS], 3849[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3850available_tags='_LT_TAGS'dnl 3851]) 3852 3853 3854# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3855# ----------------------------------- 3856# Extract the dictionary values for VARNAME (optionally with TAG) and 3857# expand to a commented shell variable setting: 3858# 3859# # Some comment about what VAR is for. 3860# visible_name=$lt_internal_name 3861m4_define([_LT_LIBTOOL_DECLARE], 3862[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3863 [description])))[]dnl 3864m4_pushdef([_libtool_name], 3865 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3866m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3867 [0], [_libtool_name=[$]$1], 3868 [1], [_libtool_name=$lt_[]$1], 3869 [2], [_libtool_name=$lt_[]$1], 3870 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3871m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3872]) 3873 3874 3875# _LT_LIBTOOL_CONFIG_VARS 3876# ----------------------- 3877# Produce commented declarations of non-tagged libtool config variables 3878# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3879# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3880# section) are produced by _LT_LIBTOOL_TAG_VARS. 3881m4_defun([_LT_LIBTOOL_CONFIG_VARS], 3882[m4_foreach([_lt_var], 3883 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3884 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3885 3886 3887# _LT_LIBTOOL_TAG_VARS(TAG) 3888# ------------------------- 3889m4_define([_LT_LIBTOOL_TAG_VARS], 3890[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3891 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3892 3893 3894# _LT_TAGVAR(VARNAME, [TAGNAME]) 3895# ------------------------------ 3896m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3897 3898 3899# _LT_CONFIG_COMMANDS 3900# ------------------- 3901# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3902# variables for single and double quote escaping we saved from calls 3903# to _LT_DECL, we can put quote escaped variables declarations 3904# into 'config.status', and then the shell code to quote escape them in 3905# for loops in 'config.status'. Finally, any additional code accumulated 3906# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3907m4_defun([_LT_CONFIG_COMMANDS], 3908[AC_PROVIDE_IFELSE([LT_OUTPUT], 3909 dnl If the libtool generation code has been placed in $CONFIG_LT, 3910 dnl instead of duplicating it all over again into config.status, 3911 dnl then we will have config.status run $CONFIG_LT later, so it 3912 dnl needs to know what name is stored there: 3913 [AC_CONFIG_COMMANDS([libtool], 3914 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3915 dnl If the libtool generation code is destined for config.status, 3916 dnl expand the accumulated commands and init code now: 3917 [AC_CONFIG_COMMANDS([libtool], 3918 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3919])#_LT_CONFIG_COMMANDS 3920 3921 3922# Initialize. 3923m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3924[ 3925 3926# The HP-UX ksh and POSIX shell print the target directory to stdout 3927# if CDPATH is set. 3928(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3929 3930sed_quote_subst='$sed_quote_subst' 3931double_quote_subst='$double_quote_subst' 3932delay_variable_subst='$delay_variable_subst' 3933_LT_CONFIG_STATUS_DECLARATIONS 3934LTCC='$LTCC' 3935LTCFLAGS='$LTCFLAGS' 3936compiler='$compiler_DEFAULT' 3937 3938# A function that is used when there is no print builtin or printf. 3939func_fallback_echo () 3940{ 3941 eval 'cat <<_LTECHO_EOF 3942\$[]1 3943_LTECHO_EOF' 3944} 3945 3946# Quote evaled strings. 3947for var in lt_decl_all_varnames([[ \ 3948]], lt_decl_quote_varnames); do 3949 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3950 *[[\\\\\\\`\\"\\\$]]*) 3951 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3952 ;; 3953 *) 3954 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3955 ;; 3956 esac 3957done 3958 3959# Double-quote double-evaled strings. 3960for var in lt_decl_all_varnames([[ \ 3961]], lt_decl_dquote_varnames); do 3962 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3963 *[[\\\\\\\`\\"\\\$]]*) 3964 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3965 ;; 3966 *) 3967 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3968 ;; 3969 esac 3970done 3971 3972_LT_OUTPUT_LIBTOOL_INIT 3973]) 3974 3975# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3976# ------------------------------------ 3977# Generate a child script FILE with all initialization necessary to 3978# reuse the environment learned by the parent script, and make the 3979# file executable. If COMMENT is supplied, it is inserted after the 3980# '#!' sequence but before initialization text begins. After this 3981# macro, additional text can be appended to FILE to form the body of 3982# the child script. The macro ends with non-zero status if the 3983# file could not be fully written (such as if the disk is full). 3984m4_ifdef([AS_INIT_GENERATED], 3985[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3986[m4_defun([_LT_GENERATED_FILE_INIT], 3987[m4_require([AS_PREPARE])]dnl 3988[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3989[lt_write_fail=0 3990cat >$1 <<_ASEOF || lt_write_fail=1 3991#! $SHELL 3992# Generated by $as_me. 3993$2 3994SHELL=\${CONFIG_SHELL-$SHELL} 3995export SHELL 3996_ASEOF 3997cat >>$1 <<\_ASEOF || lt_write_fail=1 3998AS_SHELL_SANITIZE 3999_AS_PREPARE 4000exec AS_MESSAGE_FD>&1 4001_ASEOF 4002test 0 = "$lt_write_fail" && chmod +x $1[]dnl 4003m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4004 4005# LT_OUTPUT 4006# --------- 4007# This macro allows early generation of the libtool script (before 4008# AC_OUTPUT is called), incase it is used in configure for compilation 4009# tests. 4010AC_DEFUN([LT_OUTPUT], 4011[: ${CONFIG_LT=./config.lt} 4012AC_MSG_NOTICE([creating $CONFIG_LT]) 4013_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4014[# Run this file to recreate a libtool stub with the current configuration.]) 4015 4016cat >>"$CONFIG_LT" <<\_LTEOF 4017lt_cl_silent=false 4018exec AS_MESSAGE_LOG_FD>>config.log 4019{ 4020 echo 4021 AS_BOX([Running $as_me.]) 4022} >&AS_MESSAGE_LOG_FD 4023 4024lt_cl_help="\ 4025'$as_me' creates a local libtool stub from the current configuration, 4026for use in further configure time tests before the real libtool is 4027generated. 4028 4029Usage: $[0] [[OPTIONS]] 4030 4031 -h, --help print this help, then exit 4032 -V, --version print version number, then exit 4033 -q, --quiet do not print progress messages 4034 -d, --debug don't remove temporary files 4035 4036Report bugs to <bug-libtool@gnu.org>." 4037 4038lt_cl_version="\ 4039m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4040m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4041configured by $[0], generated by m4_PACKAGE_STRING. 4042 4043Copyright (C) 2011 Free Software Foundation, Inc. 4044This config.lt script is free software; the Free Software Foundation 4045gives unlimited permision to copy, distribute and modify it." 4046 4047while test 0 != $[#] 4048do 4049 case $[1] in 4050 --version | --v* | -V ) 4051 echo "$lt_cl_version"; exit 0 ;; 4052 --help | --h* | -h ) 4053 echo "$lt_cl_help"; exit 0 ;; 4054 --debug | --d* | -d ) 4055 debug=: ;; 4056 --quiet | --q* | --silent | --s* | -q ) 4057 lt_cl_silent=: ;; 4058 4059 -*) AC_MSG_ERROR([unrecognized option: $[1] 4060Try '$[0] --help' for more information.]) ;; 4061 4062 *) AC_MSG_ERROR([unrecognized argument: $[1] 4063Try '$[0] --help' for more information.]) ;; 4064 esac 4065 shift 4066done 4067 4068if $lt_cl_silent; then 4069 exec AS_MESSAGE_FD>/dev/null 4070fi 4071_LTEOF 4072 4073cat >>"$CONFIG_LT" <<_LTEOF 4074_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4075_LTEOF 4076 4077cat >>"$CONFIG_LT" <<\_LTEOF 4078AC_MSG_NOTICE([creating $ofile]) 4079_LT_OUTPUT_LIBTOOL_COMMANDS 4080AS_EXIT(0) 4081_LTEOF 4082chmod +x "$CONFIG_LT" 4083 4084# configure is writing to config.log, but config.lt does its own redirection, 4085# appending to config.log, which fails on DOS, as config.log is still kept 4086# open by configure. Here we exec the FD to /dev/null, effectively closing 4087# config.log, so it can be properly (re)opened and appended to by config.lt. 4088lt_cl_success=: 4089test yes = "$silent" && 4090 lt_config_lt_args="$lt_config_lt_args --quiet" 4091exec AS_MESSAGE_LOG_FD>/dev/null 4092$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4093exec AS_MESSAGE_LOG_FD>>config.log 4094$lt_cl_success || AS_EXIT(1) 4095])# LT_OUTPUT 4096 4097 4098# _LT_CONFIG(TAG) 4099# --------------- 4100# If TAG is the built-in tag, create an initial libtool script with a 4101# default configuration from the untagged config vars. Otherwise add code 4102# to config.status for appending the configuration named by TAG from the 4103# matching tagged config vars. 4104m4_defun([_LT_CONFIG], 4105[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4106_LT_CONFIG_SAVE_COMMANDS([ 4107 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4108 m4_if(_LT_TAG, [C], [ 4109 # See if we are running on zsh, and set the options that allow our 4110 # commands through without removal of \ escapes. 4111 if test -n "${ZSH_VERSION+set}"; then 4112 setopt NO_GLOB_SUBST 4113 fi 4114 4115 cfgfile=${ofile}T 4116 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4117 $RM "$cfgfile" 4118 4119 cat <<_LT_EOF >> "$cfgfile" 4120#! $SHELL 4121# Generated automatically by $as_me ($PACKAGE) $VERSION 4122# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4123# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4124 4125# Provide generalized library-building support services. 4126# Written by Gordon Matzigkeit, 1996 4127 4128_LT_COPYING 4129_LT_LIBTOOL_TAGS 4130 4131# Configured defaults for sys_lib_dlsearch_path munging. 4132: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4133 4134# ### BEGIN LIBTOOL CONFIG 4135_LT_LIBTOOL_CONFIG_VARS 4136_LT_LIBTOOL_TAG_VARS 4137# ### END LIBTOOL CONFIG 4138 4139_LT_EOF 4140 4141 cat <<'_LT_EOF' >> "$cfgfile" 4142 4143# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4144 4145_LT_PREPARE_MUNGE_PATH_LIST 4146_LT_PREPARE_CC_BASENAME 4147 4148# ### END FUNCTIONS SHARED WITH CONFIGURE 4149 4150_LT_EOF 4151 4152 case $host_os in 4153 aix3*) 4154 cat <<\_LT_EOF >> "$cfgfile" 4155# AIX sometimes has problems with the GCC collect2 program. For some 4156# reason, if we set the COLLECT_NAMES environment variable, the problems 4157# vanish in a puff of smoke. 4158if test set != "${COLLECT_NAMES+set}"; then 4159 COLLECT_NAMES= 4160 export COLLECT_NAMES 4161fi 4162_LT_EOF 4163 ;; 4164 esac 4165 4166 _LT_PROG_LTMAIN 4167 4168 # We use sed instead of cat because bash on DJGPP gets confused if 4169 # if finds mixed CR/LF and LF-only lines. Since sed operates in 4170 # text mode, it properly converts lines to CR/LF. This bash problem 4171 # is reportedly fixed, but why not run on old versions too? 4172 $SED '$q' "$ltmain" >> "$cfgfile" \ 4173 || (rm -f "$cfgfile"; exit 1) 4174 4175 mv -f "$cfgfile" "$ofile" || 4176 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4177 chmod +x "$ofile" 4178], 4179[cat <<_LT_EOF >> "$ofile" 4180 4181dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4182dnl in a comment (ie after a #). 4183# ### BEGIN LIBTOOL TAG CONFIG: $1 4184_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4185# ### END LIBTOOL TAG CONFIG: $1 4186_LT_EOF 4187])dnl /m4_if 4188], 4189[m4_if([$1], [], [ 4190 PACKAGE='$PACKAGE' 4191 VERSION='$VERSION' 4192 RM='$RM' 4193 ofile='$ofile'], []) 4194])dnl /_LT_CONFIG_SAVE_COMMANDS 4195])# _LT_CONFIG 4196 4197 4198# LT_SUPPORTED_TAG(TAG) 4199# --------------------- 4200# Trace this macro to discover what tags are supported by the libtool 4201# --tag option, using: 4202# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4203AC_DEFUN([LT_SUPPORTED_TAG], []) 4204 4205 4206# C support is built-in for now 4207m4_define([_LT_LANG_C_enabled], []) 4208m4_define([_LT_TAGS], []) 4209 4210 4211# LT_LANG(LANG) 4212# ------------- 4213# Enable libtool support for the given language if not already enabled. 4214AC_DEFUN([LT_LANG], 4215[AC_BEFORE([$0], [LT_OUTPUT])dnl 4216m4_case([$1], 4217 [C], [_LT_LANG(C)], 4218 [C++], [_LT_LANG(CXX)], 4219 [Go], [_LT_LANG(GO)], 4220 [Java], [_LT_LANG(GCJ)], 4221 [Fortran 77], [_LT_LANG(F77)], 4222 [Fortran], [_LT_LANG(FC)], 4223 [Windows Resource], [_LT_LANG(RC)], 4224 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4225 [_LT_LANG($1)], 4226 [m4_fatal([$0: unsupported language: "$1"])])])dnl 4227])# LT_LANG 4228 4229 4230# _LT_LANG(LANGNAME) 4231# ------------------ 4232m4_defun([_LT_LANG], 4233[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4234 [LT_SUPPORTED_TAG([$1])dnl 4235 m4_append([_LT_TAGS], [$1 ])dnl 4236 m4_define([_LT_LANG_]$1[_enabled], [])dnl 4237 _LT_LANG_$1_CONFIG($1)])dnl 4238])# _LT_LANG 4239 4240 4241m4_ifndef([AC_PROG_GO], [ 4242# NOTE: This macro has been submitted for inclusion into # 4243# GNU Autoconf as AC_PROG_GO. When it is available in # 4244# a released version of Autoconf we should remove this # 4245# macro and use it instead. # 4246m4_defun([AC_PROG_GO], 4247[AC_LANG_PUSH(Go)dnl 4248AC_ARG_VAR([GOC], [Go compiler command])dnl 4249AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4250_AC_ARG_VAR_LDFLAGS()dnl 4251AC_CHECK_TOOL(GOC, gccgo) 4252if test -z "$GOC"; then 4253 if test -n "$ac_tool_prefix"; then 4254 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4255 fi 4256fi 4257if test -z "$GOC"; then 4258 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4259fi 4260])#m4_defun 4261])#m4_ifndef 4262 4263 4264# _LT_LANG_DEFAULT_CONFIG 4265# ----------------------- 4266m4_defun([_LT_LANG_DEFAULT_CONFIG], 4267[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4268 [LT_LANG(CXX)], 4269 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4270 4271AC_PROVIDE_IFELSE([AC_PROG_F77], 4272 [LT_LANG(F77)], 4273 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4274 4275AC_PROVIDE_IFELSE([AC_PROG_FC], 4276 [LT_LANG(FC)], 4277 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4278 4279dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4280dnl pulling things in needlessly. 4281AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4282 [LT_LANG(GCJ)], 4283 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4284 [LT_LANG(GCJ)], 4285 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4286 [LT_LANG(GCJ)], 4287 [m4_ifdef([AC_PROG_GCJ], 4288 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4289 m4_ifdef([A][M_PROG_GCJ], 4290 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4291 m4_ifdef([LT_PROG_GCJ], 4292 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4293 4294AC_PROVIDE_IFELSE([AC_PROG_GO], 4295 [LT_LANG(GO)], 4296 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4297 4298AC_PROVIDE_IFELSE([LT_PROG_RC], 4299 [LT_LANG(RC)], 4300 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4301])# _LT_LANG_DEFAULT_CONFIG 4302 4303# Obsolete macros: 4304AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4305AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4306AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4307AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4308AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4309dnl aclocal-1.4 backwards compatibility: 4310dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4311dnl AC_DEFUN([AC_LIBTOOL_F77], []) 4312dnl AC_DEFUN([AC_LIBTOOL_FC], []) 4313dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4314dnl AC_DEFUN([AC_LIBTOOL_RC], []) 4315 4316 4317# _LT_TAG_COMPILER 4318# ---------------- 4319m4_defun([_LT_TAG_COMPILER], 4320[AC_REQUIRE([AC_PROG_CC])dnl 4321 4322_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4323_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4324_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4325_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4326 4327# If no C compiler was specified, use CC. 4328LTCC=${LTCC-"$CC"} 4329 4330# If no C compiler flags were specified, use CFLAGS. 4331LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4332 4333# Allow CC to be a program name with arguments. 4334compiler=$CC 4335])# _LT_TAG_COMPILER 4336 4337 4338# _LT_COMPILER_BOILERPLATE 4339# ------------------------ 4340# Check for compiler boilerplate output or warnings with 4341# the simple compiler test code. 4342m4_defun([_LT_COMPILER_BOILERPLATE], 4343[m4_require([_LT_DECL_SED])dnl 4344ac_outfile=conftest.$ac_objext 4345echo "$lt_simple_compile_test_code" >conftest.$ac_ext 4346eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4347_lt_compiler_boilerplate=`cat conftest.err` 4348$RM conftest* 4349])# _LT_COMPILER_BOILERPLATE 4350 4351 4352# _LT_LINKER_BOILERPLATE 4353# ---------------------- 4354# Check for linker boilerplate output or warnings with 4355# the simple link test code. 4356m4_defun([_LT_LINKER_BOILERPLATE], 4357[m4_require([_LT_DECL_SED])dnl 4358ac_outfile=conftest.$ac_objext 4359echo "$lt_simple_link_test_code" >conftest.$ac_ext 4360eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4361_lt_linker_boilerplate=`cat conftest.err` 4362$RM -r conftest* 4363])# _LT_LINKER_BOILERPLATE 4364 4365# _LT_REQUIRED_DARWIN_CHECKS 4366# ------------------------- 4367m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4368 case $host_os in 4369 rhapsody* | darwin*) 4370 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4371 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4372 AC_CHECK_TOOL([LIPO], [lipo], [:]) 4373 AC_CHECK_TOOL([OTOOL], [otool], [:]) 4374 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4375 _LT_DECL([], [DSYMUTIL], [1], 4376 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4377 _LT_DECL([], [NMEDIT], [1], 4378 [Tool to change global to local symbols on Mac OS X]) 4379 _LT_DECL([], [LIPO], [1], 4380 [Tool to manipulate fat objects and archives on Mac OS X]) 4381 _LT_DECL([], [OTOOL], [1], 4382 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4383 _LT_DECL([], [OTOOL64], [1], 4384 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4385 4386 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4387 [lt_cv_apple_cc_single_mod=no 4388 if test -z "$LT_MULTI_MODULE"; then 4389 # By default we will add the -single_module flag. You can override 4390 # by either setting the environment variable LT_MULTI_MODULE 4391 # non-empty at configure time, or by adding -multi_module to the 4392 # link flags. 4393 rm -rf libconftest.dylib* 4394 echo "int foo(void){return 1;}" > conftest.c 4395 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4396-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4397 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4398 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4399 _lt_result=$? 4400 # If there is a non-empty error log, and "single_module" 4401 # appears in it, assume the flag caused a linker warning 4402 if test -s conftest.err && $GREP single_module conftest.err; then 4403 cat conftest.err >&AS_MESSAGE_LOG_FD 4404 # Otherwise, if the output was created with a 0 exit code from 4405 # the compiler, it worked. 4406 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4407 lt_cv_apple_cc_single_mod=yes 4408 else 4409 cat conftest.err >&AS_MESSAGE_LOG_FD 4410 fi 4411 rm -rf libconftest.dylib* 4412 rm -f conftest.* 4413 fi]) 4414 4415 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4416 [lt_cv_ld_exported_symbols_list], 4417 [lt_cv_ld_exported_symbols_list=no 4418 save_LDFLAGS=$LDFLAGS 4419 echo "_main" > conftest.sym 4420 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4421 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4422 [lt_cv_ld_exported_symbols_list=yes], 4423 [lt_cv_ld_exported_symbols_list=no]) 4424 LDFLAGS=$save_LDFLAGS 4425 ]) 4426 4427 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4428 [lt_cv_ld_force_load=no 4429 cat > conftest.c << _LT_EOF 4430int forced_loaded() { return 2;} 4431_LT_EOF 4432 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4433 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4434 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4435 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4436 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4437 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4438 cat > conftest.c << _LT_EOF 4439int main() { return 0;} 4440_LT_EOF 4441 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4442 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4443 _lt_result=$? 4444 if test -s conftest.err && $GREP force_load conftest.err; then 4445 cat conftest.err >&AS_MESSAGE_LOG_FD 4446 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4447 lt_cv_ld_force_load=yes 4448 else 4449 cat conftest.err >&AS_MESSAGE_LOG_FD 4450 fi 4451 rm -f conftest.err libconftest.a conftest conftest.c 4452 rm -rf conftest.dSYM 4453 ]) 4454 case $host_os in 4455 rhapsody* | darwin1.[[012]]) 4456 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4457 darwin1.*) 4458 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4459 darwin*) 4460 case $MACOSX_DEPLOYMENT_TARGET,$host in 4461 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4462 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4463 *) 4464 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4465 esac 4466 ;; 4467 esac 4468 if test yes = "$lt_cv_apple_cc_single_mod"; then 4469 _lt_dar_single_mod='$single_module' 4470 fi 4471 if test yes = "$lt_cv_ld_exported_symbols_list"; then 4472 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4473 else 4474 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4475 fi 4476 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4477 _lt_dsymutil='~$DSYMUTIL $lib || :' 4478 else 4479 _lt_dsymutil= 4480 fi 4481 ;; 4482 esac 4483]) 4484 4485 4486# _LT_DARWIN_LINKER_FEATURES([TAG]) 4487# --------------------------------- 4488# Checks for linker and compiler features on darwin 4489m4_defun([_LT_DARWIN_LINKER_FEATURES], 4490[ 4491 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4492 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4493 _LT_TAGVAR(hardcode_direct, $1)=no 4494 _LT_TAGVAR(hardcode_automatic, $1)=yes 4495 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4496 if test yes = "$lt_cv_ld_force_load"; then 4497 _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\"`' 4498 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4499 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4500 else 4501 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4502 fi 4503 _LT_TAGVAR(link_all_deplibs, $1)=yes 4504 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4505 case $cc_basename in 4506 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4507 *) _lt_dar_can_shared=$GCC ;; 4508 esac 4509 if test yes = "$_lt_dar_can_shared"; then 4510 output_verbose_link_cmd=func_echo_all 4511 _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" 4512 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4513 _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" 4514 _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" 4515 m4_if([$1], [CXX], 4516[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4517 _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" 4518 _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" 4519 fi 4520],[]) 4521 else 4522 _LT_TAGVAR(ld_shlibs, $1)=no 4523 fi 4524]) 4525 4526# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4527# ---------------------------------- 4528# Links a minimal program and checks the executable 4529# for the system default hardcoded library path. In most cases, 4530# this is /usr/lib:/lib, but when the MPI compilers are used 4531# the location of the communication and MPI libs are included too. 4532# If we don't find anything, use the default library path according 4533# to the aix ld manual. 4534# Store the results from the different compilers for each TAGNAME. 4535# Allow to override them for all tags through lt_cv_aix_libpath. 4536m4_defun([_LT_SYS_MODULE_PATH_AIX], 4537[m4_require([_LT_DECL_SED])dnl 4538if test set = "${lt_cv_aix_libpath+set}"; then 4539 aix_libpath=$lt_cv_aix_libpath 4540else 4541 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4542 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4543 lt_aix_libpath_sed='[ 4544 /Import File Strings/,/^$/ { 4545 /^0/ { 4546 s/^0 *\([^ ]*\) *$/\1/ 4547 p 4548 } 4549 }]' 4550 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4551 # Check for a 64-bit object if we didn't find anything. 4552 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4553 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4554 fi],[]) 4555 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4556 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4557 fi 4558 ]) 4559 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4560fi 4561])# _LT_SYS_MODULE_PATH_AIX 4562 4563 4564# _LT_SHELL_INIT(ARG) 4565# ------------------- 4566m4_define([_LT_SHELL_INIT], 4567[m4_divert_text([M4SH-INIT], [$1 4568])])# _LT_SHELL_INIT 4569 4570 4571 4572# _LT_PROG_ECHO_BACKSLASH 4573# ----------------------- 4574# Find how we can fake an echo command that does not interpret backslash. 4575# In particular, with Autoconf 2.60 or later we add some code to the start 4576# of the generated configure script that will find a shell with a builtin 4577# printf (that we can use as an echo command). 4578m4_defun([_LT_PROG_ECHO_BACKSLASH], 4579[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4580ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4581ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4582 4583AC_MSG_CHECKING([how to print strings]) 4584# Test print first, because it will be a builtin if present. 4585if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4586 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4587 ECHO='print -r --' 4588elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4589 ECHO='printf %s\n' 4590else 4591 # Use this function as a fallback that always works. 4592 func_fallback_echo () 4593 { 4594 eval 'cat <<_LTECHO_EOF 4595$[]1 4596_LTECHO_EOF' 4597 } 4598 ECHO='func_fallback_echo' 4599fi 4600 4601# func_echo_all arg... 4602# Invoke $ECHO with all args, space-separated. 4603func_echo_all () 4604{ 4605 $ECHO "$*" 4606} 4607 4608case $ECHO in 4609 printf*) AC_MSG_RESULT([printf]) ;; 4610 print*) AC_MSG_RESULT([print -r]) ;; 4611 *) AC_MSG_RESULT([cat]) ;; 4612esac 4613 4614m4_ifdef([_AS_DETECT_SUGGESTED], 4615[_AS_DETECT_SUGGESTED([ 4616 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4617 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4618 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4619 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4620 PATH=/empty FPATH=/empty; export PATH FPATH 4621 test "X`printf %s $ECHO`" = "X$ECHO" \ 4622 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4623 4624_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4625_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4626])# _LT_PROG_ECHO_BACKSLASH 4627 4628 4629# _LT_WITH_SYSROOT 4630# ---------------- 4631AC_DEFUN([_LT_WITH_SYSROOT], 4632[m4_require([_LT_DECL_SED])dnl 4633AC_MSG_CHECKING([for sysroot]) 4634AC_ARG_WITH([sysroot], 4635[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4636 [Search for dependent libraries within DIR (or the compiler's sysroot 4637 if not specified).])], 4638[], [with_sysroot=no]) 4639 4640dnl lt_sysroot will always be passed unquoted. We quote it here 4641dnl in case the user passed a directory name. 4642lt_sysroot= 4643case $with_sysroot in #( 4644 yes) 4645 if test yes = "$GCC"; then 4646 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4647 fi 4648 ;; #( 4649 /*) 4650 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4651 ;; #( 4652 no|'') 4653 ;; #( 4654 *) 4655 AC_MSG_RESULT([$with_sysroot]) 4656 AC_MSG_ERROR([The sysroot must be an absolute path.]) 4657 ;; 4658esac 4659 4660 AC_MSG_RESULT([${lt_sysroot:-no}]) 4661_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4662[dependent libraries, and where our libraries should be installed.])]) 4663 4664# _LT_ENABLE_LOCK 4665# --------------- 4666m4_defun([_LT_ENABLE_LOCK], 4667[AC_ARG_ENABLE([libtool-lock], 4668 [AS_HELP_STRING([--disable-libtool-lock], 4669 [avoid locking (might break parallel builds)])]) 4670test no = "$enable_libtool_lock" || enable_libtool_lock=yes 4671 4672# Some flags need to be propagated to the compiler or linker for good 4673# libtool support. 4674case $host in 4675ia64-*-hpux*) 4676 # Find out what ABI is being produced by ac_compile, and set mode 4677 # options accordingly. 4678 echo 'int i;' > conftest.$ac_ext 4679 if AC_TRY_EVAL(ac_compile); then 4680 case `$FILECMD conftest.$ac_objext` in 4681 *ELF-32*) 4682 HPUX_IA64_MODE=32 4683 ;; 4684 *ELF-64*) 4685 HPUX_IA64_MODE=64 4686 ;; 4687 esac 4688 fi 4689 rm -rf conftest* 4690 ;; 4691*-*-irix6*) 4692 # Find out what ABI is being produced by ac_compile, and set linker 4693 # options accordingly. 4694 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4695 if AC_TRY_EVAL(ac_compile); then 4696 if test yes = "$lt_cv_prog_gnu_ld"; then 4697 case `$FILECMD conftest.$ac_objext` in 4698 *32-bit*) 4699 LD="${LD-ld} -melf32bsmip" 4700 ;; 4701 *N32*) 4702 LD="${LD-ld} -melf32bmipn32" 4703 ;; 4704 *64-bit*) 4705 LD="${LD-ld} -melf64bmip" 4706 ;; 4707 esac 4708 else 4709 case `$FILECMD conftest.$ac_objext` in 4710 *32-bit*) 4711 LD="${LD-ld} -32" 4712 ;; 4713 *N32*) 4714 LD="${LD-ld} -n32" 4715 ;; 4716 *64-bit*) 4717 LD="${LD-ld} -64" 4718 ;; 4719 esac 4720 fi 4721 fi 4722 rm -rf conftest* 4723 ;; 4724 4725mips64*-*linux*) 4726 # Find out what ABI is being produced by ac_compile, and set linker 4727 # options accordingly. 4728 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4729 if AC_TRY_EVAL(ac_compile); then 4730 emul=elf 4731 case `$FILECMD conftest.$ac_objext` in 4732 *32-bit*) 4733 emul="${emul}32" 4734 ;; 4735 *64-bit*) 4736 emul="${emul}64" 4737 ;; 4738 esac 4739 case `$FILECMD conftest.$ac_objext` in 4740 *MSB*) 4741 emul="${emul}btsmip" 4742 ;; 4743 *LSB*) 4744 emul="${emul}ltsmip" 4745 ;; 4746 esac 4747 case `$FILECMD conftest.$ac_objext` in 4748 *N32*) 4749 emul="${emul}n32" 4750 ;; 4751 esac 4752 LD="${LD-ld} -m $emul" 4753 fi 4754 rm -rf conftest* 4755 ;; 4756 4757x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4758s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4759 # Find out what ABI is being produced by ac_compile, and set linker 4760 # options accordingly. Note that the listed cases only cover the 4761 # situations where additional linker options are needed (such as when 4762 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4763 # vice versa); the common cases where no linker options are needed do 4764 # not appear in the list. 4765 echo 'int i;' > conftest.$ac_ext 4766 if AC_TRY_EVAL(ac_compile); then 4767 case `$FILECMD conftest.o` in 4768 *32-bit*) 4769 case $host in 4770 x86_64-*kfreebsd*-gnu) 4771 LD="${LD-ld} -m elf_i386_fbsd" 4772 ;; 4773 x86_64-*linux*) 4774 case `$FILECMD conftest.o` in 4775 *x86-64*) 4776 LD="${LD-ld} -m elf32_x86_64" 4777 ;; 4778 *) 4779 LD="${LD-ld} -m elf_i386" 4780 ;; 4781 esac 4782 ;; 4783 powerpc64le-*linux*) 4784 LD="${LD-ld} -m elf32lppclinux" 4785 ;; 4786 powerpc64-*linux*) 4787 LD="${LD-ld} -m elf32ppclinux" 4788 ;; 4789 s390x-*linux*) 4790 LD="${LD-ld} -m elf_s390" 4791 ;; 4792 sparc64-*linux*) 4793 LD="${LD-ld} -m elf32_sparc" 4794 ;; 4795 esac 4796 ;; 4797 *64-bit*) 4798 case $host in 4799 x86_64-*kfreebsd*-gnu) 4800 LD="${LD-ld} -m elf_x86_64_fbsd" 4801 ;; 4802 x86_64-*linux*) 4803 LD="${LD-ld} -m elf_x86_64" 4804 ;; 4805 powerpcle-*linux*) 4806 LD="${LD-ld} -m elf64lppc" 4807 ;; 4808 powerpc-*linux*) 4809 LD="${LD-ld} -m elf64ppc" 4810 ;; 4811 s390*-*linux*|s390*-*tpf*) 4812 LD="${LD-ld} -m elf64_s390" 4813 ;; 4814 sparc*-*linux*) 4815 LD="${LD-ld} -m elf64_sparc" 4816 ;; 4817 esac 4818 ;; 4819 esac 4820 fi 4821 rm -rf conftest* 4822 ;; 4823 4824*-*-sco3.2v5*) 4825 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4826 SAVE_CFLAGS=$CFLAGS 4827 CFLAGS="$CFLAGS -belf" 4828 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4829 [AC_LANG_PUSH(C) 4830 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4831 AC_LANG_POP]) 4832 if test yes != "$lt_cv_cc_needs_belf"; then 4833 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4834 CFLAGS=$SAVE_CFLAGS 4835 fi 4836 ;; 4837*-*solaris*) 4838 # Find out what ABI is being produced by ac_compile, and set linker 4839 # options accordingly. 4840 echo 'int i;' > conftest.$ac_ext 4841 if AC_TRY_EVAL(ac_compile); then 4842 case `$FILECMD conftest.o` in 4843 *64-bit*) 4844 case $lt_cv_prog_gnu_ld in 4845 yes*) 4846 case $host in 4847 i?86-*-solaris*|x86_64-*-solaris*) 4848 LD="${LD-ld} -m elf_x86_64" 4849 ;; 4850 sparc*-*-solaris*) 4851 LD="${LD-ld} -m elf64_sparc" 4852 ;; 4853 esac 4854 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4855 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4856 LD=${LD-ld}_sol2 4857 fi 4858 ;; 4859 *) 4860 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4861 LD="${LD-ld} -64" 4862 fi 4863 ;; 4864 esac 4865 ;; 4866 esac 4867 fi 4868 rm -rf conftest* 4869 ;; 4870esac 4871 4872need_locks=$enable_libtool_lock 4873])# _LT_ENABLE_LOCK 4874 4875 4876# _LT_PROG_AR 4877# ----------- 4878m4_defun([_LT_PROG_AR], 4879[AC_CHECK_TOOLS(AR, [ar], false) 4880: ${AR=ar} 4881_LT_DECL([], [AR], [1], [The archiver]) 4882 4883# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4884# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4885# higher priority because thats what people were doing historically (setting 4886# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4887# variable obsoleted/removed. 4888 4889test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4890lt_ar_flags=$AR_FLAGS 4891_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4892 4893# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4894# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4895_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4896 [Flags to create an archive]) 4897 4898AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4899 [lt_cv_ar_at_file=no 4900 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4901 [echo conftest.$ac_objext > conftest.lst 4902 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4903 AC_TRY_EVAL([lt_ar_try]) 4904 if test 0 -eq "$ac_status"; then 4905 # Ensure the archiver fails upon bogus file names. 4906 rm -f conftest.$ac_objext libconftest.a 4907 AC_TRY_EVAL([lt_ar_try]) 4908 if test 0 -ne "$ac_status"; then 4909 lt_cv_ar_at_file=@ 4910 fi 4911 fi 4912 rm -f conftest.* libconftest.a 4913 ]) 4914 ]) 4915 4916if test no = "$lt_cv_ar_at_file"; then 4917 archiver_list_spec= 4918else 4919 archiver_list_spec=$lt_cv_ar_at_file 4920fi 4921_LT_DECL([], [archiver_list_spec], [1], 4922 [How to feed a file listing to the archiver]) 4923])# _LT_PROG_AR 4924 4925 4926# _LT_CMD_OLD_ARCHIVE 4927# ------------------- 4928m4_defun([_LT_CMD_OLD_ARCHIVE], 4929[_LT_PROG_AR 4930 4931AC_CHECK_TOOL(STRIP, strip, :) 4932test -z "$STRIP" && STRIP=: 4933_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4934 4935AC_CHECK_TOOL(RANLIB, ranlib, :) 4936test -z "$RANLIB" && RANLIB=: 4937_LT_DECL([], [RANLIB], [1], 4938 [Commands used to install an old-style archive]) 4939 4940# Determine commands to create old-style static archives. 4941old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4942old_postinstall_cmds='chmod 644 $oldlib' 4943old_postuninstall_cmds= 4944 4945if test -n "$RANLIB"; then 4946 case $host_os in 4947 bitrig* | openbsd*) 4948 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 4949 ;; 4950 *) 4951 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 4952 ;; 4953 esac 4954 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4955fi 4956 4957case $host_os in 4958 darwin*) 4959 lock_old_archive_extraction=yes ;; 4960 *) 4961 lock_old_archive_extraction=no ;; 4962esac 4963_LT_DECL([], [old_postinstall_cmds], [2]) 4964_LT_DECL([], [old_postuninstall_cmds], [2]) 4965_LT_TAGDECL([], [old_archive_cmds], [2], 4966 [Commands used to build an old-style archive]) 4967_LT_DECL([], [lock_old_archive_extraction], [0], 4968 [Whether to use a lock for old archive extraction]) 4969])# _LT_CMD_OLD_ARCHIVE 4970 4971 4972# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4973# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4974# ---------------------------------------------------------------- 4975# Check whether the given compiler option works 4976AC_DEFUN([_LT_COMPILER_OPTION], 4977[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4978m4_require([_LT_DECL_SED])dnl 4979AC_CACHE_CHECK([$1], [$2], 4980 [$2=no 4981 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4982 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4983 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 4984 # Insert the option either (1) after the last *FLAGS variable, or 4985 # (2) before a word containing "conftest.", or (3) at the end. 4986 # Note that $ac_compile itself does not contain backslashes and begins 4987 # with a dollar sign (not a hyphen), so the echo should work correctly. 4988 # The option is referenced via a variable to avoid confusing sed. 4989 lt_compile=`echo "$ac_compile" | $SED \ 4990 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4991 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4992 -e 's:$: $lt_compiler_flag:'` 4993 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4994 (eval "$lt_compile" 2>conftest.err) 4995 ac_status=$? 4996 cat conftest.err >&AS_MESSAGE_LOG_FD 4997 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4998 if (exit $ac_status) && test -s "$ac_outfile"; then 4999 # The compiler can only warn and ignore the option if not recognized 5000 # So say no if there are warnings other than the usual output. 5001 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5002 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5003 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5004 $2=yes 5005 fi 5006 fi 5007 $RM conftest* 5008]) 5009 5010if test yes = "[$]$2"; then 5011 m4_if([$5], , :, [$5]) 5012else 5013 m4_if([$6], , :, [$6]) 5014fi 5015])# _LT_COMPILER_OPTION 5016 5017# Old name: 5018AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5019dnl aclocal-1.4 backwards compatibility: 5020dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5021 5022 5023# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5024# [ACTION-SUCCESS], [ACTION-FAILURE]) 5025# ---------------------------------------------------- 5026# Check whether the given linker option works 5027AC_DEFUN([_LT_LINKER_OPTION], 5028[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5029m4_require([_LT_DECL_SED])dnl 5030AC_CACHE_CHECK([$1], [$2], 5031 [$2=no 5032 save_LDFLAGS=$LDFLAGS 5033 LDFLAGS="$LDFLAGS $3" 5034 echo "$lt_simple_link_test_code" > conftest.$ac_ext 5035 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5036 # The linker can only warn and ignore the option if not recognized 5037 # So say no if there are warnings 5038 if test -s conftest.err; then 5039 # Append any errors to the config.log. 5040 cat conftest.err 1>&AS_MESSAGE_LOG_FD 5041 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5042 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5043 if diff conftest.exp conftest.er2 >/dev/null; then 5044 $2=yes 5045 fi 5046 else 5047 $2=yes 5048 fi 5049 fi 5050 $RM -r conftest* 5051 LDFLAGS=$save_LDFLAGS 5052]) 5053 5054if test yes = "[$]$2"; then 5055 m4_if([$4], , :, [$4]) 5056else 5057 m4_if([$5], , :, [$5]) 5058fi 5059])# _LT_LINKER_OPTION 5060 5061# Old name: 5062AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5063dnl aclocal-1.4 backwards compatibility: 5064dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5065 5066 5067# LT_CMD_MAX_LEN 5068#--------------- 5069AC_DEFUN([LT_CMD_MAX_LEN], 5070[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5071# find the maximum length of command line arguments 5072AC_MSG_CHECKING([the maximum length of command line arguments]) 5073AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5074 i=0 5075 teststring=ABCD 5076 5077 case $build_os in 5078 msdosdjgpp*) 5079 # On DJGPP, this test can blow up pretty badly due to problems in libc 5080 # (any single argument exceeding 2000 bytes causes a buffer overrun 5081 # during glob expansion). Even if it were fixed, the result of this 5082 # check would be larger than it should be. 5083 lt_cv_sys_max_cmd_len=12288; # 12K is about right 5084 ;; 5085 5086 gnu*) 5087 # Under GNU Hurd, this test is not required because there is 5088 # no limit to the length of command line arguments. 5089 # Libtool will interpret -1 as no limit whatsoever 5090 lt_cv_sys_max_cmd_len=-1; 5091 ;; 5092 5093 cygwin* | mingw* | cegcc*) 5094 # On Win9x/ME, this test blows up -- it succeeds, but takes 5095 # about 5 minutes as the teststring grows exponentially. 5096 # Worse, since 9x/ME are not pre-emptively multitasking, 5097 # you end up with a "frozen" computer, even though with patience 5098 # the test eventually succeeds (with a max line length of 256k). 5099 # Instead, let's just punt: use the minimum linelength reported by 5100 # all of the supported platforms: 8192 (on NT/2K/XP). 5101 lt_cv_sys_max_cmd_len=8192; 5102 ;; 5103 5104 mint*) 5105 # On MiNT this can take a long time and run out of memory. 5106 lt_cv_sys_max_cmd_len=8192; 5107 ;; 5108 5109 amigaos*) 5110 # On AmigaOS with pdksh, this test takes hours, literally. 5111 # So we just punt and use a minimum line length of 8192. 5112 lt_cv_sys_max_cmd_len=8192; 5113 ;; 5114 5115 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5116 # This has been around since 386BSD, at least. Likely further. 5117 if test -x /sbin/sysctl; then 5118 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5119 elif test -x /usr/sbin/sysctl; then 5120 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5121 else 5122 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5123 fi 5124 # And add a safety zone 5125 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5126 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5127 ;; 5128 5129 interix*) 5130 # We know the value 262144 and hardcode it with a safety zone (like BSD) 5131 lt_cv_sys_max_cmd_len=196608 5132 ;; 5133 5134 os2*) 5135 # The test takes a long time on OS/2. 5136 lt_cv_sys_max_cmd_len=8192 5137 ;; 5138 5139 osf*) 5140 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5141 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5142 # nice to cause kernel panics so lets avoid the loop below. 5143 # First set a reasonable default. 5144 lt_cv_sys_max_cmd_len=16384 5145 # 5146 if test -x /sbin/sysconfig; then 5147 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5148 *1*) lt_cv_sys_max_cmd_len=-1 ;; 5149 esac 5150 fi 5151 ;; 5152 sco3.2v5*) 5153 lt_cv_sys_max_cmd_len=102400 5154 ;; 5155 sysv5* | sco5v6* | sysv4.2uw2*) 5156 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5157 if test -n "$kargmax"; then 5158 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5159 else 5160 lt_cv_sys_max_cmd_len=32768 5161 fi 5162 ;; 5163 *) 5164 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5165 if test -n "$lt_cv_sys_max_cmd_len" && \ 5166 test undefined != "$lt_cv_sys_max_cmd_len"; then 5167 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5168 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5169 else 5170 # Make teststring a little bigger before we do anything with it. 5171 # a 1K string should be a reasonable start. 5172 for i in 1 2 3 4 5 6 7 8; do 5173 teststring=$teststring$teststring 5174 done 5175 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5176 # If test is not a shell built-in, we'll probably end up computing a 5177 # maximum length that is only half of the actual maximum length, but 5178 # we can't tell. 5179 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5180 = "X$teststring$teststring"; } >/dev/null 2>&1 && 5181 test 17 != "$i" # 1/2 MB should be enough 5182 do 5183 i=`expr $i + 1` 5184 teststring=$teststring$teststring 5185 done 5186 # Only check the string length outside the loop. 5187 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5188 teststring= 5189 # Add a significant safety factor because C++ compilers can tack on 5190 # massive amounts of additional arguments before passing them to the 5191 # linker. It appears as though 1/2 is a usable value. 5192 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5193 fi 5194 ;; 5195 esac 5196]) 5197if test -n "$lt_cv_sys_max_cmd_len"; then 5198 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5199else 5200 AC_MSG_RESULT(none) 5201fi 5202max_cmd_len=$lt_cv_sys_max_cmd_len 5203_LT_DECL([], [max_cmd_len], [0], 5204 [What is the maximum length of a command?]) 5205])# LT_CMD_MAX_LEN 5206 5207# Old name: 5208AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5209dnl aclocal-1.4 backwards compatibility: 5210dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5211 5212 5213# _LT_HEADER_DLFCN 5214# ---------------- 5215m4_defun([_LT_HEADER_DLFCN], 5216[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5217])# _LT_HEADER_DLFCN 5218 5219 5220# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5221# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5222# ---------------------------------------------------------------- 5223m4_defun([_LT_TRY_DLOPEN_SELF], 5224[m4_require([_LT_HEADER_DLFCN])dnl 5225if test yes = "$cross_compiling"; then : 5226 [$4] 5227else 5228 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5229 lt_status=$lt_dlunknown 5230 cat > conftest.$ac_ext <<_LT_EOF 5231[#line $LINENO "configure" 5232#include "confdefs.h" 5233 5234#if HAVE_DLFCN_H 5235#include <dlfcn.h> 5236#endif 5237 5238#include <stdio.h> 5239 5240#ifdef RTLD_GLOBAL 5241# define LT_DLGLOBAL RTLD_GLOBAL 5242#else 5243# ifdef DL_GLOBAL 5244# define LT_DLGLOBAL DL_GLOBAL 5245# else 5246# define LT_DLGLOBAL 0 5247# endif 5248#endif 5249 5250/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5251 find out it does not work in some platform. */ 5252#ifndef LT_DLLAZY_OR_NOW 5253# ifdef RTLD_LAZY 5254# define LT_DLLAZY_OR_NOW RTLD_LAZY 5255# else 5256# ifdef DL_LAZY 5257# define LT_DLLAZY_OR_NOW DL_LAZY 5258# else 5259# ifdef RTLD_NOW 5260# define LT_DLLAZY_OR_NOW RTLD_NOW 5261# else 5262# ifdef DL_NOW 5263# define LT_DLLAZY_OR_NOW DL_NOW 5264# else 5265# define LT_DLLAZY_OR_NOW 0 5266# endif 5267# endif 5268# endif 5269# endif 5270#endif 5271 5272/* When -fvisibility=hidden is used, assume the code has been annotated 5273 correspondingly for the symbols needed. */ 5274#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5275int fnord () __attribute__((visibility("default"))); 5276#endif 5277 5278int fnord () { return 42; } 5279int main () 5280{ 5281 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5282 int status = $lt_dlunknown; 5283 5284 if (self) 5285 { 5286 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5287 else 5288 { 5289 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5290 else puts (dlerror ()); 5291 } 5292 /* dlclose (self); */ 5293 } 5294 else 5295 puts (dlerror ()); 5296 5297 return status; 5298}] 5299_LT_EOF 5300 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5301 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5302 lt_status=$? 5303 case x$lt_status in 5304 x$lt_dlno_uscore) $1 ;; 5305 x$lt_dlneed_uscore) $2 ;; 5306 x$lt_dlunknown|x*) $3 ;; 5307 esac 5308 else : 5309 # compilation failed 5310 $3 5311 fi 5312fi 5313rm -fr conftest* 5314])# _LT_TRY_DLOPEN_SELF 5315 5316 5317# LT_SYS_DLOPEN_SELF 5318# ------------------ 5319AC_DEFUN([LT_SYS_DLOPEN_SELF], 5320[m4_require([_LT_HEADER_DLFCN])dnl 5321if test yes != "$enable_dlopen"; then 5322 enable_dlopen=unknown 5323 enable_dlopen_self=unknown 5324 enable_dlopen_self_static=unknown 5325else 5326 lt_cv_dlopen=no 5327 lt_cv_dlopen_libs= 5328 5329 case $host_os in 5330 beos*) 5331 lt_cv_dlopen=load_add_on 5332 lt_cv_dlopen_libs= 5333 lt_cv_dlopen_self=yes 5334 ;; 5335 5336 mingw* | pw32* | cegcc*) 5337 lt_cv_dlopen=LoadLibrary 5338 lt_cv_dlopen_libs= 5339 ;; 5340 5341 cygwin*) 5342 lt_cv_dlopen=dlopen 5343 lt_cv_dlopen_libs= 5344 ;; 5345 5346 darwin*) 5347 # if libdl is installed we need to link against it 5348 AC_CHECK_LIB([dl], [dlopen], 5349 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5350 lt_cv_dlopen=dyld 5351 lt_cv_dlopen_libs= 5352 lt_cv_dlopen_self=yes 5353 ]) 5354 ;; 5355 5356 tpf*) 5357 # Don't try to run any link tests for TPF. We know it's impossible 5358 # because TPF is a cross-compiler, and we know how we open DSOs. 5359 lt_cv_dlopen=dlopen 5360 lt_cv_dlopen_libs= 5361 lt_cv_dlopen_self=no 5362 ;; 5363 5364 *) 5365 AC_CHECK_FUNC([shl_load], 5366 [lt_cv_dlopen=shl_load], 5367 [AC_CHECK_LIB([dld], [shl_load], 5368 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5369 [AC_CHECK_FUNC([dlopen], 5370 [lt_cv_dlopen=dlopen], 5371 [AC_CHECK_LIB([dl], [dlopen], 5372 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5373 [AC_CHECK_LIB([svld], [dlopen], 5374 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5375 [AC_CHECK_LIB([dld], [dld_link], 5376 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5377 ]) 5378 ]) 5379 ]) 5380 ]) 5381 ]) 5382 ;; 5383 esac 5384 5385 if test no = "$lt_cv_dlopen"; then 5386 enable_dlopen=no 5387 else 5388 enable_dlopen=yes 5389 fi 5390 5391 case $lt_cv_dlopen in 5392 dlopen) 5393 save_CPPFLAGS=$CPPFLAGS 5394 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5395 5396 save_LDFLAGS=$LDFLAGS 5397 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5398 5399 save_LIBS=$LIBS 5400 LIBS="$lt_cv_dlopen_libs $LIBS" 5401 5402 AC_CACHE_CHECK([whether a program can dlopen itself], 5403 lt_cv_dlopen_self, [dnl 5404 _LT_TRY_DLOPEN_SELF( 5405 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5406 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5407 ]) 5408 5409 if test yes = "$lt_cv_dlopen_self"; then 5410 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5411 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5412 lt_cv_dlopen_self_static, [dnl 5413 _LT_TRY_DLOPEN_SELF( 5414 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5415 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5416 ]) 5417 fi 5418 5419 CPPFLAGS=$save_CPPFLAGS 5420 LDFLAGS=$save_LDFLAGS 5421 LIBS=$save_LIBS 5422 ;; 5423 esac 5424 5425 case $lt_cv_dlopen_self in 5426 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5427 *) enable_dlopen_self=unknown ;; 5428 esac 5429 5430 case $lt_cv_dlopen_self_static in 5431 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5432 *) enable_dlopen_self_static=unknown ;; 5433 esac 5434fi 5435_LT_DECL([dlopen_support], [enable_dlopen], [0], 5436 [Whether dlopen is supported]) 5437_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5438 [Whether dlopen of programs is supported]) 5439_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5440 [Whether dlopen of statically linked programs is supported]) 5441])# LT_SYS_DLOPEN_SELF 5442 5443# Old name: 5444AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5445dnl aclocal-1.4 backwards compatibility: 5446dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5447 5448 5449# _LT_COMPILER_C_O([TAGNAME]) 5450# --------------------------- 5451# Check to see if options -c and -o are simultaneously supported by compiler. 5452# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5453m4_defun([_LT_COMPILER_C_O], 5454[m4_require([_LT_DECL_SED])dnl 5455m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5456m4_require([_LT_TAG_COMPILER])dnl 5457AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5458 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5459 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5460 $RM -r conftest 2>/dev/null 5461 mkdir conftest 5462 cd conftest 5463 mkdir out 5464 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5465 5466 lt_compiler_flag="-o out/conftest2.$ac_objext" 5467 # Insert the option either (1) after the last *FLAGS variable, or 5468 # (2) before a word containing "conftest.", or (3) at the end. 5469 # Note that $ac_compile itself does not contain backslashes and begins 5470 # with a dollar sign (not a hyphen), so the echo should work correctly. 5471 lt_compile=`echo "$ac_compile" | $SED \ 5472 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5473 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5474 -e 's:$: $lt_compiler_flag:'` 5475 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5476 (eval "$lt_compile" 2>out/conftest.err) 5477 ac_status=$? 5478 cat out/conftest.err >&AS_MESSAGE_LOG_FD 5479 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5480 if (exit $ac_status) && test -s out/conftest2.$ac_objext 5481 then 5482 # The compiler can only warn and ignore the option if not recognized 5483 # So say no if there are warnings 5484 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5485 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5486 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5487 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5488 fi 5489 fi 5490 chmod u+w . 2>&AS_MESSAGE_LOG_FD 5491 $RM conftest* 5492 # SGI C++ compiler will create directory out/ii_files/ for 5493 # template instantiation 5494 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5495 $RM out/* && rmdir out 5496 cd .. 5497 $RM -r conftest 5498 $RM conftest* 5499]) 5500_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5501 [Does compiler simultaneously support -c and -o options?]) 5502])# _LT_COMPILER_C_O 5503 5504 5505# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5506# ---------------------------------- 5507# Check to see if we can do hard links to lock some files if needed 5508m4_defun([_LT_COMPILER_FILE_LOCKS], 5509[m4_require([_LT_ENABLE_LOCK])dnl 5510m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5511_LT_COMPILER_C_O([$1]) 5512 5513hard_links=nottested 5514if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5515 # do not overwrite the value of need_locks provided by the user 5516 AC_MSG_CHECKING([if we can lock with hard links]) 5517 hard_links=yes 5518 $RM conftest* 5519 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5520 touch conftest.a 5521 ln conftest.a conftest.b 2>&5 || hard_links=no 5522 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5523 AC_MSG_RESULT([$hard_links]) 5524 if test no = "$hard_links"; then 5525 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5526 need_locks=warn 5527 fi 5528else 5529 need_locks=no 5530fi 5531_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5532])# _LT_COMPILER_FILE_LOCKS 5533 5534 5535# _LT_CHECK_OBJDIR 5536# ---------------- 5537m4_defun([_LT_CHECK_OBJDIR], 5538[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5539[rm -f .libs 2>/dev/null 5540mkdir .libs 2>/dev/null 5541if test -d .libs; then 5542 lt_cv_objdir=.libs 5543else 5544 # MS-DOS does not allow filenames that begin with a dot. 5545 lt_cv_objdir=_libs 5546fi 5547rmdir .libs 2>/dev/null]) 5548objdir=$lt_cv_objdir 5549_LT_DECL([], [objdir], [0], 5550 [The name of the directory that contains temporary libtool files])dnl 5551m4_pattern_allow([LT_OBJDIR])dnl 5552AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5553 [Define to the sub-directory where libtool stores uninstalled libraries.]) 5554])# _LT_CHECK_OBJDIR 5555 5556 5557# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5558# -------------------------------------- 5559# Check hardcoding attributes. 5560m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5561[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5562_LT_TAGVAR(hardcode_action, $1)= 5563if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5564 test -n "$_LT_TAGVAR(runpath_var, $1)" || 5565 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5566 5567 # We can hardcode non-existent directories. 5568 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5569 # If the only mechanism to avoid hardcoding is shlibpath_var, we 5570 # have to relink, otherwise we might link with an installed library 5571 # when we should be linking with a yet-to-be-installed one 5572 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5573 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5574 # Linking always hardcodes the temporary library directory. 5575 _LT_TAGVAR(hardcode_action, $1)=relink 5576 else 5577 # We can link without hardcoding, and we can hardcode nonexisting dirs. 5578 _LT_TAGVAR(hardcode_action, $1)=immediate 5579 fi 5580else 5581 # We cannot hardcode anything, or else we can only hardcode existing 5582 # directories. 5583 _LT_TAGVAR(hardcode_action, $1)=unsupported 5584fi 5585AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5586 5587if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5588 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5589 # Fast installation is not supported 5590 enable_fast_install=no 5591elif test yes = "$shlibpath_overrides_runpath" || 5592 test no = "$enable_shared"; then 5593 # Fast installation is not necessary 5594 enable_fast_install=needless 5595fi 5596_LT_TAGDECL([], [hardcode_action], [0], 5597 [How to hardcode a shared library path into an executable]) 5598])# _LT_LINKER_HARDCODE_LIBPATH 5599 5600 5601# _LT_CMD_STRIPLIB 5602# ---------------- 5603m4_defun([_LT_CMD_STRIPLIB], 5604[m4_require([_LT_DECL_EGREP]) 5605striplib= 5606old_striplib= 5607AC_MSG_CHECKING([whether stripping libraries is possible]) 5608if test -z "$STRIP"; then 5609 AC_MSG_RESULT([no]) 5610else 5611 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5612 old_striplib="$STRIP --strip-debug" 5613 striplib="$STRIP --strip-unneeded" 5614 AC_MSG_RESULT([yes]) 5615 else 5616 case $host_os in 5617 darwin*) 5618 # FIXME - insert some real tests, host_os isn't really good enough 5619 striplib="$STRIP -x" 5620 old_striplib="$STRIP -S" 5621 AC_MSG_RESULT([yes]) 5622 ;; 5623 freebsd*) 5624 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5625 old_striplib="$STRIP --strip-debug" 5626 striplib="$STRIP --strip-unneeded" 5627 AC_MSG_RESULT([yes]) 5628 else 5629 AC_MSG_RESULT([no]) 5630 fi 5631 ;; 5632 *) 5633 AC_MSG_RESULT([no]) 5634 ;; 5635 esac 5636 fi 5637fi 5638_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5639_LT_DECL([], [striplib], [1]) 5640])# _LT_CMD_STRIPLIB 5641 5642 5643# _LT_PREPARE_MUNGE_PATH_LIST 5644# --------------------------- 5645# Make sure func_munge_path_list() is defined correctly. 5646m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5647[[# func_munge_path_list VARIABLE PATH 5648# ----------------------------------- 5649# VARIABLE is name of variable containing _space_ separated list of 5650# directories to be munged by the contents of PATH, which is string 5651# having a format: 5652# "DIR[:DIR]:" 5653# string "DIR[ DIR]" will be prepended to VARIABLE 5654# ":DIR[:DIR]" 5655# string "DIR[ DIR]" will be appended to VARIABLE 5656# "DIRP[:DIRP]::[DIRA:]DIRA" 5657# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5658# "DIRA[ DIRA]" will be appended to VARIABLE 5659# "DIR[:DIR]" 5660# VARIABLE will be replaced by "DIR[ DIR]" 5661func_munge_path_list () 5662{ 5663 case x@S|@2 in 5664 x) 5665 ;; 5666 *:) 5667 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5668 ;; 5669 x:*) 5670 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5671 ;; 5672 *::*) 5673 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5674 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5675 ;; 5676 *) 5677 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5678 ;; 5679 esac 5680} 5681]])# _LT_PREPARE_PATH_LIST 5682 5683 5684# _LT_SYS_DYNAMIC_LINKER([TAG]) 5685# ----------------------------- 5686# PORTME Fill in your ld.so characteristics 5687m4_defun([_LT_SYS_DYNAMIC_LINKER], 5688[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5689m4_require([_LT_DECL_EGREP])dnl 5690m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5691m4_require([_LT_DECL_OBJDUMP])dnl 5692m4_require([_LT_DECL_SED])dnl 5693m4_require([_LT_CHECK_SHELL_FEATURES])dnl 5694m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5695AC_MSG_CHECKING([dynamic linker characteristics]) 5696m4_if([$1], 5697 [], [ 5698if test yes = "$GCC"; then 5699 case $host_os in 5700 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5701 *) lt_awk_arg='/^libraries:/' ;; 5702 esac 5703 case $host_os in 5704 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5705 *) lt_sed_strip_eq='s|=/|/|g' ;; 5706 esac 5707 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5708 case $lt_search_path_spec in 5709 *\;*) 5710 # if the path contains ";" then we assume it to be the separator 5711 # otherwise default to the standard path separator (i.e. ":") - it is 5712 # assumed that no part of a normal pathname contains ";" but that should 5713 # okay in the real world where ";" in dirpaths is itself problematic. 5714 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5715 ;; 5716 *) 5717 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5718 ;; 5719 esac 5720 # Ok, now we have the path, separated by spaces, we can step through it 5721 # and add multilib dir if necessary... 5722 lt_tmp_lt_search_path_spec= 5723 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5724 # ...but if some path component already ends with the multilib dir we assume 5725 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5726 case "$lt_multi_os_dir; $lt_search_path_spec " in 5727 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5728 lt_multi_os_dir= 5729 ;; 5730 esac 5731 for lt_sys_path in $lt_search_path_spec; do 5732 if test -d "$lt_sys_path$lt_multi_os_dir"; then 5733 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5734 elif test -n "$lt_multi_os_dir"; then 5735 test -d "$lt_sys_path" && \ 5736 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5737 fi 5738 done 5739 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5740BEGIN {RS = " "; FS = "/|\n";} { 5741 lt_foo = ""; 5742 lt_count = 0; 5743 for (lt_i = NF; lt_i > 0; lt_i--) { 5744 if ($lt_i != "" && $lt_i != ".") { 5745 if ($lt_i == "..") { 5746 lt_count++; 5747 } else { 5748 if (lt_count == 0) { 5749 lt_foo = "/" $lt_i lt_foo; 5750 } else { 5751 lt_count--; 5752 } 5753 } 5754 } 5755 } 5756 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5757 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5758}'` 5759 # AWK program above erroneously prepends '/' to C:/dos/paths 5760 # for these hosts. 5761 case $host_os in 5762 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5763 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5764 esac 5765 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5766else 5767 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5768fi]) 5769library_names_spec= 5770libname_spec='lib$name' 5771soname_spec= 5772shrext_cmds=.so 5773postinstall_cmds= 5774postuninstall_cmds= 5775finish_cmds= 5776finish_eval= 5777shlibpath_var= 5778shlibpath_overrides_runpath=unknown 5779version_type=none 5780dynamic_linker="$host_os ld.so" 5781sys_lib_dlsearch_path_spec="/lib /usr/lib" 5782need_lib_prefix=unknown 5783hardcode_into_libs=no 5784 5785# when you set need_version to no, make sure it does not cause -set_version 5786# flags to be left without arguments 5787need_version=unknown 5788 5789AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5790[User-defined run-time library search path.]) 5791 5792case $host_os in 5793aix3*) 5794 version_type=linux # correct to gnu/linux during the next big refactor 5795 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5796 shlibpath_var=LIBPATH 5797 5798 # AIX 3 has no versioning support, so we append a major version to the name. 5799 soname_spec='$libname$release$shared_ext$major' 5800 ;; 5801 5802aix[[4-9]]*) 5803 version_type=linux # correct to gnu/linux during the next big refactor 5804 need_lib_prefix=no 5805 need_version=no 5806 hardcode_into_libs=yes 5807 if test ia64 = "$host_cpu"; then 5808 # AIX 5 supports IA64 5809 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5810 shlibpath_var=LD_LIBRARY_PATH 5811 else 5812 # With GCC up to 2.95.x, collect2 would create an import file 5813 # for dependence libraries. The import file would start with 5814 # the line '#! .'. This would cause the generated library to 5815 # depend on '.', always an invalid library. This was fixed in 5816 # development snapshots of GCC prior to 3.0. 5817 case $host_os in 5818 aix4 | aix4.[[01]] | aix4.[[01]].*) 5819 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5820 echo ' yes ' 5821 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5822 : 5823 else 5824 can_build_shared=no 5825 fi 5826 ;; 5827 esac 5828 # Using Import Files as archive members, it is possible to support 5829 # filename-based versioning of shared library archives on AIX. While 5830 # this would work for both with and without runtime linking, it will 5831 # prevent static linking of such archives. So we do filename-based 5832 # shared library versioning with .so extension only, which is used 5833 # when both runtime linking and shared linking is enabled. 5834 # Unfortunately, runtime linking may impact performance, so we do 5835 # not want this to be the default eventually. Also, we use the 5836 # versioned .so libs for executables only if there is the -brtl 5837 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5838 # To allow for filename-based versioning support, we need to create 5839 # libNAME.so.V as an archive file, containing: 5840 # *) an Import File, referring to the versioned filename of the 5841 # archive as well as the shared archive member, telling the 5842 # bitwidth (32 or 64) of that shared object, and providing the 5843 # list of exported symbols of that shared object, eventually 5844 # decorated with the 'weak' keyword 5845 # *) the shared object with the F_LOADONLY flag set, to really avoid 5846 # it being seen by the linker. 5847 # At run time we better use the real file rather than another symlink, 5848 # but for link time we create the symlink libNAME.so -> libNAME.so.V 5849 5850 case $with_aix_soname,$aix_use_runtimelinking in 5851 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5852 # soname into executable. Probably we can add versioning support to 5853 # collect2, so additional links can be useful in future. 5854 aix,yes) # traditional libtool 5855 dynamic_linker='AIX unversionable lib.so' 5856 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5857 # instead of lib<name>.a to let people know that these are not 5858 # typical AIX shared libraries. 5859 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5860 ;; 5861 aix,no) # traditional AIX only 5862 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5863 # We preserve .a as extension for shared libraries through AIX4.2 5864 # and later when we are not doing run time linking. 5865 library_names_spec='$libname$release.a $libname.a' 5866 soname_spec='$libname$release$shared_ext$major' 5867 ;; 5868 svr4,*) # full svr4 only 5869 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5870 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5871 # We do not specify a path in Import Files, so LIBPATH fires. 5872 shlibpath_overrides_runpath=yes 5873 ;; 5874 *,yes) # both, prefer svr4 5875 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5876 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5877 # unpreferred sharedlib libNAME.a needs extra handling 5878 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 5879 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 5880 # We do not specify a path in Import Files, so LIBPATH fires. 5881 shlibpath_overrides_runpath=yes 5882 ;; 5883 *,no) # both, prefer aix 5884 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5885 library_names_spec='$libname$release.a $libname.a' 5886 soname_spec='$libname$release$shared_ext$major' 5887 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5888 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 5889 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 5890 ;; 5891 esac 5892 shlibpath_var=LIBPATH 5893 fi 5894 ;; 5895 5896amigaos*) 5897 case $host_cpu in 5898 powerpc) 5899 # Since July 2007 AmigaOS4 officially supports .so libraries. 5900 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5901 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5902 ;; 5903 m68k) 5904 library_names_spec='$libname.ixlibrary $libname.a' 5905 # Create ${libname}_ixlibrary.a entries in /sys/libs. 5906 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 5907 ;; 5908 esac 5909 ;; 5910 5911beos*) 5912 library_names_spec='$libname$shared_ext' 5913 dynamic_linker="$host_os ld.so" 5914 shlibpath_var=LIBRARY_PATH 5915 ;; 5916 5917bsdi[[45]]*) 5918 version_type=linux # correct to gnu/linux during the next big refactor 5919 need_version=no 5920 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5921 soname_spec='$libname$release$shared_ext$major' 5922 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5923 shlibpath_var=LD_LIBRARY_PATH 5924 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5925 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5926 # the default ld.so.conf also contains /usr/contrib/lib and 5927 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5928 # libtool to hard-code these into programs 5929 ;; 5930 5931cygwin* | mingw* | pw32* | cegcc*) 5932 version_type=windows 5933 shrext_cmds=.dll 5934 need_version=no 5935 need_lib_prefix=no 5936 5937 case $GCC,$cc_basename in 5938 yes,*) 5939 # gcc 5940 library_names_spec='$libname.dll.a' 5941 # DLL is installed to $(libdir)/../bin by postinstall_cmds 5942 postinstall_cmds='base_file=`basename \$file`~ 5943 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5944 dldir=$destdir/`dirname \$dlpath`~ 5945 test -d \$dldir || mkdir -p \$dldir~ 5946 $install_prog $dir/$dlname \$dldir/$dlname~ 5947 chmod a+x \$dldir/$dlname~ 5948 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5949 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5950 fi' 5951 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5952 dlpath=$dir/\$dldll~ 5953 $RM \$dlpath' 5954 shlibpath_overrides_runpath=yes 5955 5956 case $host_os in 5957 cygwin*) 5958 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5959 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5960m4_if([$1], [],[ 5961 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5962 ;; 5963 mingw* | cegcc*) 5964 # MinGW DLLs use traditional 'lib' prefix 5965 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5966 ;; 5967 pw32*) 5968 # pw32 DLLs use 'pw' prefix rather than 'lib' 5969 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5970 ;; 5971 esac 5972 dynamic_linker='Win32 ld.exe' 5973 ;; 5974 5975 *,cl* | *,icl*) 5976 # Native MSVC or ICC 5977 libname_spec='$name' 5978 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5979 library_names_spec='$libname.dll.lib' 5980 5981 case $build_os in 5982 mingw*) 5983 sys_lib_search_path_spec= 5984 lt_save_ifs=$IFS 5985 IFS=';' 5986 for lt_path in $LIB 5987 do 5988 IFS=$lt_save_ifs 5989 # Let DOS variable expansion print the short 8.3 style file name. 5990 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 5991 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 5992 done 5993 IFS=$lt_save_ifs 5994 # Convert to MSYS style. 5995 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 5996 ;; 5997 cygwin*) 5998 # Convert to unix form, then to dos form, then back to unix form 5999 # but this time dos style (no spaces!) so that the unix form looks 6000 # like /cygdrive/c/PROGRA~1:/cygdr... 6001 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6002 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6003 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6004 ;; 6005 *) 6006 sys_lib_search_path_spec=$LIB 6007 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6008 # It is most probably a Windows format PATH. 6009 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6010 else 6011 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6012 fi 6013 # FIXME: find the short name or the path components, as spaces are 6014 # common. (e.g. "Program Files" -> "PROGRA~1") 6015 ;; 6016 esac 6017 6018 # DLL is installed to $(libdir)/../bin by postinstall_cmds 6019 postinstall_cmds='base_file=`basename \$file`~ 6020 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6021 dldir=$destdir/`dirname \$dlpath`~ 6022 test -d \$dldir || mkdir -p \$dldir~ 6023 $install_prog $dir/$dlname \$dldir/$dlname' 6024 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6025 dlpath=$dir/\$dldll~ 6026 $RM \$dlpath' 6027 shlibpath_overrides_runpath=yes 6028 dynamic_linker='Win32 link.exe' 6029 ;; 6030 6031 *) 6032 # Assume MSVC and ICC wrapper 6033 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6034 dynamic_linker='Win32 ld.exe' 6035 ;; 6036 esac 6037 # FIXME: first we should search . and the directory the executable is in 6038 shlibpath_var=PATH 6039 ;; 6040 6041darwin* | rhapsody*) 6042 dynamic_linker="$host_os dyld" 6043 version_type=darwin 6044 need_lib_prefix=no 6045 need_version=no 6046 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6047 soname_spec='$libname$release$major$shared_ext' 6048 shlibpath_overrides_runpath=yes 6049 shlibpath_var=DYLD_LIBRARY_PATH 6050 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6051m4_if([$1], [],[ 6052 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6053 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6054 ;; 6055 6056dgux*) 6057 version_type=linux # correct to gnu/linux during the next big refactor 6058 need_lib_prefix=no 6059 need_version=no 6060 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6061 soname_spec='$libname$release$shared_ext$major' 6062 shlibpath_var=LD_LIBRARY_PATH 6063 ;; 6064 6065freebsd* | dragonfly* | midnightbsd*) 6066 # DragonFly does not have aout. When/if they implement a new 6067 # versioning mechanism, adjust this. 6068 if test -x /usr/bin/objformat; then 6069 objformat=`/usr/bin/objformat` 6070 else 6071 case $host_os in 6072 freebsd[[23]].*) objformat=aout ;; 6073 *) objformat=elf ;; 6074 esac 6075 fi 6076 version_type=freebsd-$objformat 6077 case $version_type in 6078 freebsd-elf*) 6079 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6080 soname_spec='$libname$release$shared_ext$major' 6081 need_version=no 6082 need_lib_prefix=no 6083 ;; 6084 freebsd-*) 6085 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6086 need_version=yes 6087 ;; 6088 esac 6089 shlibpath_var=LD_LIBRARY_PATH 6090 case $host_os in 6091 freebsd2.*) 6092 shlibpath_overrides_runpath=yes 6093 ;; 6094 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6095 shlibpath_overrides_runpath=yes 6096 hardcode_into_libs=yes 6097 ;; 6098 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6099 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6100 shlibpath_overrides_runpath=no 6101 hardcode_into_libs=yes 6102 ;; 6103 *) # from 4.6 on, and DragonFly 6104 shlibpath_overrides_runpath=yes 6105 hardcode_into_libs=yes 6106 ;; 6107 esac 6108 ;; 6109 6110haiku*) 6111 version_type=linux # correct to gnu/linux during the next big refactor 6112 need_lib_prefix=no 6113 need_version=no 6114 dynamic_linker="$host_os runtime_loader" 6115 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6116 soname_spec='$libname$release$shared_ext$major' 6117 shlibpath_var=LIBRARY_PATH 6118 shlibpath_overrides_runpath=no 6119 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6120 hardcode_into_libs=yes 6121 ;; 6122 6123hpux9* | hpux10* | hpux11*) 6124 # Give a soname corresponding to the major version so that dld.sl refuses to 6125 # link against other versions. 6126 version_type=sunos 6127 need_lib_prefix=no 6128 need_version=no 6129 case $host_cpu in 6130 ia64*) 6131 shrext_cmds='.so' 6132 hardcode_into_libs=yes 6133 dynamic_linker="$host_os dld.so" 6134 shlibpath_var=LD_LIBRARY_PATH 6135 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6136 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6137 soname_spec='$libname$release$shared_ext$major' 6138 if test 32 = "$HPUX_IA64_MODE"; then 6139 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6140 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6141 else 6142 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6143 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6144 fi 6145 ;; 6146 hppa*64*) 6147 shrext_cmds='.sl' 6148 hardcode_into_libs=yes 6149 dynamic_linker="$host_os dld.sl" 6150 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6151 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6152 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6153 soname_spec='$libname$release$shared_ext$major' 6154 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6155 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6156 ;; 6157 *) 6158 shrext_cmds='.sl' 6159 dynamic_linker="$host_os dld.sl" 6160 shlibpath_var=SHLIB_PATH 6161 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6162 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6163 soname_spec='$libname$release$shared_ext$major' 6164 ;; 6165 esac 6166 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6167 postinstall_cmds='chmod 555 $lib' 6168 # or fails outright, so override atomically: 6169 install_override_mode=555 6170 ;; 6171 6172interix[[3-9]]*) 6173 version_type=linux # correct to gnu/linux during the next big refactor 6174 need_lib_prefix=no 6175 need_version=no 6176 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6177 soname_spec='$libname$release$shared_ext$major' 6178 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6179 shlibpath_var=LD_LIBRARY_PATH 6180 shlibpath_overrides_runpath=no 6181 hardcode_into_libs=yes 6182 ;; 6183 6184irix5* | irix6* | nonstopux*) 6185 case $host_os in 6186 nonstopux*) version_type=nonstopux ;; 6187 *) 6188 if test yes = "$lt_cv_prog_gnu_ld"; then 6189 version_type=linux # correct to gnu/linux during the next big refactor 6190 else 6191 version_type=irix 6192 fi ;; 6193 esac 6194 need_lib_prefix=no 6195 need_version=no 6196 soname_spec='$libname$release$shared_ext$major' 6197 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6198 case $host_os in 6199 irix5* | nonstopux*) 6200 libsuff= shlibsuff= 6201 ;; 6202 *) 6203 case $LD in # libtool.m4 will add one of these switches to LD 6204 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6205 libsuff= shlibsuff= libmagic=32-bit;; 6206 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6207 libsuff=32 shlibsuff=N32 libmagic=N32;; 6208 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6209 libsuff=64 shlibsuff=64 libmagic=64-bit;; 6210 *) libsuff= shlibsuff= libmagic=never-match;; 6211 esac 6212 ;; 6213 esac 6214 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6215 shlibpath_overrides_runpath=no 6216 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6217 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6218 hardcode_into_libs=yes 6219 ;; 6220 6221# No shared lib support for Linux oldld, aout, or coff. 6222linux*oldld* | linux*aout* | linux*coff*) 6223 dynamic_linker=no 6224 ;; 6225 6226linux*android*) 6227 version_type=none # Android doesn't support versioned libraries. 6228 need_lib_prefix=no 6229 need_version=no 6230 library_names_spec='$libname$release$shared_ext' 6231 soname_spec='$libname$release$shared_ext' 6232 finish_cmds= 6233 shlibpath_var=LD_LIBRARY_PATH 6234 shlibpath_overrides_runpath=yes 6235 6236 # This implies no fast_install, which is unacceptable. 6237 # Some rework will be needed to allow for fast_install 6238 # before this can be enabled. 6239 hardcode_into_libs=yes 6240 6241 dynamic_linker='Android linker' 6242 # Don't embed -rpath directories since the linker doesn't support them. 6243 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6244 ;; 6245 6246# This must be glibc/ELF. 6247linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6248 version_type=linux # correct to gnu/linux during the next big refactor 6249 need_lib_prefix=no 6250 need_version=no 6251 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6252 soname_spec='$libname$release$shared_ext$major' 6253 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6254 shlibpath_var=LD_LIBRARY_PATH 6255 shlibpath_overrides_runpath=no 6256 6257 # Some binutils ld are patched to set DT_RUNPATH 6258 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6259 [lt_cv_shlibpath_overrides_runpath=no 6260 save_LDFLAGS=$LDFLAGS 6261 save_libdir=$libdir 6262 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6263 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6264 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6265 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6266 [lt_cv_shlibpath_overrides_runpath=yes])]) 6267 LDFLAGS=$save_LDFLAGS 6268 libdir=$save_libdir 6269 ]) 6270 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6271 6272 # This implies no fast_install, which is unacceptable. 6273 # Some rework will be needed to allow for fast_install 6274 # before this can be enabled. 6275 hardcode_into_libs=yes 6276 6277 # Ideally, we could use ldconfig to report *all* directores which are 6278 # searched for libraries, however this is still not possible. Aside from not 6279 # being certain /sbin/ldconfig is available, command 6280 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6281 # even though it is searched at run-time. Try to do the best guess by 6282 # appending ld.so.conf contents (and includes) to the search path. 6283 if test -f /etc/ld.so.conf; then 6284 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' ' '` 6285 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6286 fi 6287 6288 # We used to test for /lib/ld.so.1 and disable shared libraries on 6289 # powerpc, because MkLinux only supported shared libraries with the 6290 # GNU dynamic linker. Since this was broken with cross compilers, 6291 # most powerpc-linux boxes support dynamic linking these days and 6292 # people can always --disable-shared, the test was removed, and we 6293 # assume the GNU/Linux dynamic linker is in use. 6294 dynamic_linker='GNU/Linux ld.so' 6295 ;; 6296 6297netbsd*) 6298 version_type=sunos 6299 need_lib_prefix=no 6300 need_version=no 6301 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6302 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6303 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6304 dynamic_linker='NetBSD (a.out) ld.so' 6305 else 6306 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6307 soname_spec='$libname$release$shared_ext$major' 6308 dynamic_linker='NetBSD ld.elf_so' 6309 fi 6310 shlibpath_var=LD_LIBRARY_PATH 6311 shlibpath_overrides_runpath=yes 6312 hardcode_into_libs=yes 6313 ;; 6314 6315newsos6) 6316 version_type=linux # correct to gnu/linux during the next big refactor 6317 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6318 shlibpath_var=LD_LIBRARY_PATH 6319 shlibpath_overrides_runpath=yes 6320 ;; 6321 6322*nto* | *qnx*) 6323 version_type=qnx 6324 need_lib_prefix=no 6325 need_version=no 6326 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6327 soname_spec='$libname$release$shared_ext$major' 6328 shlibpath_var=LD_LIBRARY_PATH 6329 shlibpath_overrides_runpath=no 6330 hardcode_into_libs=yes 6331 dynamic_linker='ldqnx.so' 6332 ;; 6333 6334openbsd* | bitrig*) 6335 version_type=sunos 6336 sys_lib_dlsearch_path_spec=/usr/lib 6337 need_lib_prefix=no 6338 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6339 need_version=no 6340 else 6341 need_version=yes 6342 fi 6343 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6344 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6345 shlibpath_var=LD_LIBRARY_PATH 6346 shlibpath_overrides_runpath=yes 6347 ;; 6348 6349os2*) 6350 libname_spec='$name' 6351 version_type=windows 6352 shrext_cmds=.dll 6353 need_version=no 6354 need_lib_prefix=no 6355 # OS/2 can only load a DLL with a base name of 8 characters or less. 6356 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6357 v=$($ECHO $release$versuffix | tr -d .-); 6358 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6359 $ECHO $n$v`$shared_ext' 6360 library_names_spec='${libname}_dll.$libext' 6361 dynamic_linker='OS/2 ld.exe' 6362 shlibpath_var=BEGINLIBPATH 6363 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6364 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6365 postinstall_cmds='base_file=`basename \$file`~ 6366 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6367 dldir=$destdir/`dirname \$dlpath`~ 6368 test -d \$dldir || mkdir -p \$dldir~ 6369 $install_prog $dir/$dlname \$dldir/$dlname~ 6370 chmod a+x \$dldir/$dlname~ 6371 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6372 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6373 fi' 6374 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6375 dlpath=$dir/\$dldll~ 6376 $RM \$dlpath' 6377 ;; 6378 6379osf3* | osf4* | osf5*) 6380 version_type=osf 6381 need_lib_prefix=no 6382 need_version=no 6383 soname_spec='$libname$release$shared_ext$major' 6384 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6385 shlibpath_var=LD_LIBRARY_PATH 6386 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6387 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6388 ;; 6389 6390rdos*) 6391 dynamic_linker=no 6392 ;; 6393 6394solaris*) 6395 version_type=linux # correct to gnu/linux during the next big refactor 6396 need_lib_prefix=no 6397 need_version=no 6398 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6399 soname_spec='$libname$release$shared_ext$major' 6400 shlibpath_var=LD_LIBRARY_PATH 6401 shlibpath_overrides_runpath=yes 6402 hardcode_into_libs=yes 6403 # ldd complains unless libraries are executable 6404 postinstall_cmds='chmod +x $lib' 6405 ;; 6406 6407sunos4*) 6408 version_type=sunos 6409 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6410 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6411 shlibpath_var=LD_LIBRARY_PATH 6412 shlibpath_overrides_runpath=yes 6413 if test yes = "$with_gnu_ld"; then 6414 need_lib_prefix=no 6415 fi 6416 need_version=yes 6417 ;; 6418 6419sysv4 | sysv4.3*) 6420 version_type=linux # correct to gnu/linux during the next big refactor 6421 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6422 soname_spec='$libname$release$shared_ext$major' 6423 shlibpath_var=LD_LIBRARY_PATH 6424 case $host_vendor in 6425 sni) 6426 shlibpath_overrides_runpath=no 6427 need_lib_prefix=no 6428 runpath_var=LD_RUN_PATH 6429 ;; 6430 siemens) 6431 need_lib_prefix=no 6432 ;; 6433 motorola) 6434 need_lib_prefix=no 6435 need_version=no 6436 shlibpath_overrides_runpath=no 6437 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6438 ;; 6439 esac 6440 ;; 6441 6442sysv4*MP*) 6443 if test -d /usr/nec; then 6444 version_type=linux # correct to gnu/linux during the next big refactor 6445 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6446 soname_spec='$libname$shared_ext.$major' 6447 shlibpath_var=LD_LIBRARY_PATH 6448 fi 6449 ;; 6450 6451sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6452 version_type=sco 6453 need_lib_prefix=no 6454 need_version=no 6455 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6456 soname_spec='$libname$release$shared_ext$major' 6457 shlibpath_var=LD_LIBRARY_PATH 6458 shlibpath_overrides_runpath=yes 6459 hardcode_into_libs=yes 6460 if test yes = "$with_gnu_ld"; then 6461 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6462 else 6463 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6464 case $host_os in 6465 sco3.2v5*) 6466 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6467 ;; 6468 esac 6469 fi 6470 sys_lib_dlsearch_path_spec='/usr/lib' 6471 ;; 6472 6473tpf*) 6474 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6475 version_type=linux # correct to gnu/linux during the next big refactor 6476 need_lib_prefix=no 6477 need_version=no 6478 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6479 shlibpath_var=LD_LIBRARY_PATH 6480 shlibpath_overrides_runpath=no 6481 hardcode_into_libs=yes 6482 ;; 6483 6484uts4*) 6485 version_type=linux # correct to gnu/linux during the next big refactor 6486 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6487 soname_spec='$libname$release$shared_ext$major' 6488 shlibpath_var=LD_LIBRARY_PATH 6489 ;; 6490 6491*) 6492 dynamic_linker=no 6493 ;; 6494esac 6495AC_MSG_RESULT([$dynamic_linker]) 6496test no = "$dynamic_linker" && can_build_shared=no 6497 6498variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6499if test yes = "$GCC"; then 6500 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6501fi 6502 6503if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6504 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6505fi 6506 6507if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6508 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6509fi 6510 6511# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6512configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6513 6514# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6515func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6516 6517# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6518configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6519 6520_LT_DECL([], [variables_saved_for_relink], [1], 6521 [Variables whose values should be saved in libtool wrapper scripts and 6522 restored at link time]) 6523_LT_DECL([], [need_lib_prefix], [0], 6524 [Do we need the "lib" prefix for modules?]) 6525_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6526_LT_DECL([], [version_type], [0], [Library versioning type]) 6527_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6528_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6529_LT_DECL([], [shlibpath_overrides_runpath], [0], 6530 [Is shlibpath searched before the hard-coded library search path?]) 6531_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6532_LT_DECL([], [library_names_spec], [1], 6533 [[List of archive names. First name is the real one, the rest are links. 6534 The last name is the one that the linker finds with -lNAME]]) 6535_LT_DECL([], [soname_spec], [1], 6536 [[The coded name of the library, if different from the real name]]) 6537_LT_DECL([], [install_override_mode], [1], 6538 [Permission mode override for installation of shared libraries]) 6539_LT_DECL([], [postinstall_cmds], [2], 6540 [Command to use after installation of a shared archive]) 6541_LT_DECL([], [postuninstall_cmds], [2], 6542 [Command to use after uninstallation of a shared archive]) 6543_LT_DECL([], [finish_cmds], [2], 6544 [Commands used to finish a libtool library installation in a directory]) 6545_LT_DECL([], [finish_eval], [1], 6546 [[As "finish_cmds", except a single script fragment to be evaled but 6547 not shown]]) 6548_LT_DECL([], [hardcode_into_libs], [0], 6549 [Whether we should hardcode library paths into libraries]) 6550_LT_DECL([], [sys_lib_search_path_spec], [2], 6551 [Compile-time system search path for libraries]) 6552_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6553 [Detected run-time system search path for libraries]) 6554_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6555 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6556])# _LT_SYS_DYNAMIC_LINKER 6557 6558 6559# _LT_PATH_TOOL_PREFIX(TOOL) 6560# -------------------------- 6561# find a file program that can recognize shared library 6562AC_DEFUN([_LT_PATH_TOOL_PREFIX], 6563[m4_require([_LT_DECL_EGREP])dnl 6564AC_MSG_CHECKING([for $1]) 6565AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6566[case $MAGIC_CMD in 6567[[\\/*] | ?:[\\/]*]) 6568 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6569 ;; 6570*) 6571 lt_save_MAGIC_CMD=$MAGIC_CMD 6572 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6573dnl $ac_dummy forces splitting on constant user-supplied paths. 6574dnl POSIX.2 word splitting is done only on the output of word expansions, 6575dnl not every word. This closes a longstanding sh security hole. 6576 ac_dummy="m4_if([$2], , $PATH, [$2])" 6577 for ac_dir in $ac_dummy; do 6578 IFS=$lt_save_ifs 6579 test -z "$ac_dir" && ac_dir=. 6580 if test -f "$ac_dir/$1"; then 6581 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6582 if test -n "$file_magic_test_file"; then 6583 case $deplibs_check_method in 6584 "file_magic "*) 6585 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6586 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6587 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6588 $EGREP "$file_magic_regex" > /dev/null; then 6589 : 6590 else 6591 cat <<_LT_EOF 1>&2 6592 6593*** Warning: the command libtool uses to detect shared libraries, 6594*** $file_magic_cmd, produces output that libtool cannot recognize. 6595*** The result is that libtool may fail to recognize shared libraries 6596*** as such. This will affect the creation of libtool libraries that 6597*** depend on shared libraries, but programs linked with such libtool 6598*** libraries will work regardless of this problem. Nevertheless, you 6599*** may want to report the problem to your system manager and/or to 6600*** bug-libtool@gnu.org 6601 6602_LT_EOF 6603 fi ;; 6604 esac 6605 fi 6606 break 6607 fi 6608 done 6609 IFS=$lt_save_ifs 6610 MAGIC_CMD=$lt_save_MAGIC_CMD 6611 ;; 6612esac]) 6613MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6614if test -n "$MAGIC_CMD"; then 6615 AC_MSG_RESULT($MAGIC_CMD) 6616else 6617 AC_MSG_RESULT(no) 6618fi 6619_LT_DECL([], [MAGIC_CMD], [0], 6620 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6621])# _LT_PATH_TOOL_PREFIX 6622 6623# Old name: 6624AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6625dnl aclocal-1.4 backwards compatibility: 6626dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6627 6628 6629# _LT_PATH_MAGIC 6630# -------------- 6631# find a file program that can recognize a shared library 6632m4_defun([_LT_PATH_MAGIC], 6633[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6634if test -z "$lt_cv_path_MAGIC_CMD"; then 6635 if test -n "$ac_tool_prefix"; then 6636 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6637 else 6638 MAGIC_CMD=: 6639 fi 6640fi 6641])# _LT_PATH_MAGIC 6642 6643 6644# LT_PATH_LD 6645# ---------- 6646# find the pathname to the GNU or non-GNU linker 6647AC_DEFUN([LT_PATH_LD], 6648[AC_REQUIRE([AC_PROG_CC])dnl 6649AC_REQUIRE([AC_CANONICAL_HOST])dnl 6650AC_REQUIRE([AC_CANONICAL_BUILD])dnl 6651m4_require([_LT_DECL_SED])dnl 6652m4_require([_LT_DECL_EGREP])dnl 6653m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6654 6655AC_ARG_WITH([gnu-ld], 6656 [AS_HELP_STRING([--with-gnu-ld], 6657 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6658 [test no = "$withval" || with_gnu_ld=yes], 6659 [with_gnu_ld=no])dnl 6660 6661ac_prog=ld 6662if test yes = "$GCC"; then 6663 # Check if gcc -print-prog-name=ld gives a path. 6664 AC_MSG_CHECKING([for ld used by $CC]) 6665 case $host in 6666 *-*-mingw*) 6667 # gcc leaves a trailing carriage return, which upsets mingw 6668 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6669 *) 6670 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6671 esac 6672 case $ac_prog in 6673 # Accept absolute paths. 6674 [[\\/]]* | ?:[[\\/]]*) 6675 re_direlt='/[[^/]][[^/]]*/\.\./' 6676 # Canonicalize the pathname of ld 6677 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6678 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6679 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6680 done 6681 test -z "$LD" && LD=$ac_prog 6682 ;; 6683 "") 6684 # If it fails, then pretend we aren't using GCC. 6685 ac_prog=ld 6686 ;; 6687 *) 6688 # If it is relative, then search for the first ld in PATH. 6689 with_gnu_ld=unknown 6690 ;; 6691 esac 6692elif test yes = "$with_gnu_ld"; then 6693 AC_MSG_CHECKING([for GNU ld]) 6694else 6695 AC_MSG_CHECKING([for non-GNU ld]) 6696fi 6697AC_CACHE_VAL(lt_cv_path_LD, 6698[if test -z "$LD"; then 6699 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6700 for ac_dir in $PATH; do 6701 IFS=$lt_save_ifs 6702 test -z "$ac_dir" && ac_dir=. 6703 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6704 lt_cv_path_LD=$ac_dir/$ac_prog 6705 # Check to see if the program is GNU ld. I'd rather use --version, 6706 # but apparently some variants of GNU ld only accept -v. 6707 # Break only if it was the GNU/non-GNU ld that we prefer. 6708 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6709 *GNU* | *'with BFD'*) 6710 test no != "$with_gnu_ld" && break 6711 ;; 6712 *) 6713 test yes != "$with_gnu_ld" && break 6714 ;; 6715 esac 6716 fi 6717 done 6718 IFS=$lt_save_ifs 6719else 6720 lt_cv_path_LD=$LD # Let the user override the test with a path. 6721fi]) 6722LD=$lt_cv_path_LD 6723if test -n "$LD"; then 6724 AC_MSG_RESULT($LD) 6725else 6726 AC_MSG_RESULT(no) 6727fi 6728test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6729_LT_PATH_LD_GNU 6730AC_SUBST([LD]) 6731 6732_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6733])# LT_PATH_LD 6734 6735# Old names: 6736AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6737AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6738dnl aclocal-1.4 backwards compatibility: 6739dnl AC_DEFUN([AM_PROG_LD], []) 6740dnl AC_DEFUN([AC_PROG_LD], []) 6741 6742 6743# _LT_PATH_LD_GNU 6744#- -------------- 6745m4_defun([_LT_PATH_LD_GNU], 6746[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6747[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6748case `$LD -v 2>&1 </dev/null` in 6749*GNU* | *'with BFD'*) 6750 lt_cv_prog_gnu_ld=yes 6751 ;; 6752*) 6753 lt_cv_prog_gnu_ld=no 6754 ;; 6755esac]) 6756with_gnu_ld=$lt_cv_prog_gnu_ld 6757])# _LT_PATH_LD_GNU 6758 6759 6760# _LT_CMD_RELOAD 6761# -------------- 6762# find reload flag for linker 6763# -- PORTME Some linkers may need a different reload flag. 6764m4_defun([_LT_CMD_RELOAD], 6765[AC_CACHE_CHECK([for $LD option to reload object files], 6766 lt_cv_ld_reload_flag, 6767 [lt_cv_ld_reload_flag='-r']) 6768reload_flag=$lt_cv_ld_reload_flag 6769case $reload_flag in 6770"" | " "*) ;; 6771*) reload_flag=" $reload_flag" ;; 6772esac 6773reload_cmds='$LD$reload_flag -o $output$reload_objs' 6774case $host_os in 6775 cygwin* | mingw* | pw32* | cegcc*) 6776 if test yes != "$GCC"; then 6777 reload_cmds=false 6778 fi 6779 ;; 6780 darwin*) 6781 if test yes = "$GCC"; then 6782 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6783 else 6784 reload_cmds='$LD$reload_flag -o $output$reload_objs' 6785 fi 6786 ;; 6787esac 6788_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6789_LT_TAGDECL([], [reload_cmds], [2])dnl 6790])# _LT_CMD_RELOAD 6791 6792 6793# _LT_PATH_DD 6794# ----------- 6795# find a working dd 6796m4_defun([_LT_PATH_DD], 6797[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6798[printf 0123456789abcdef0123456789abcdef >conftest.i 6799cat conftest.i conftest.i >conftest2.i 6800: ${lt_DD:=$DD} 6801AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6802[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6803 cmp -s conftest.i conftest.out \ 6804 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6805fi]) 6806rm -f conftest.i conftest2.i conftest.out]) 6807])# _LT_PATH_DD 6808 6809 6810# _LT_CMD_TRUNCATE 6811# ---------------- 6812# find command to truncate a binary pipe 6813m4_defun([_LT_CMD_TRUNCATE], 6814[m4_require([_LT_PATH_DD]) 6815AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6816[printf 0123456789abcdef0123456789abcdef >conftest.i 6817cat conftest.i conftest.i >conftest2.i 6818lt_cv_truncate_bin= 6819if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6820 cmp -s conftest.i conftest.out \ 6821 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6822fi 6823rm -f conftest.i conftest2.i conftest.out 6824test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6825_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6826 [Command to truncate a binary pipe]) 6827])# _LT_CMD_TRUNCATE 6828 6829 6830# _LT_CHECK_MAGIC_METHOD 6831# ---------------------- 6832# how to check for library dependencies 6833# -- PORTME fill in with the dynamic library characteristics 6834m4_defun([_LT_CHECK_MAGIC_METHOD], 6835[m4_require([_LT_DECL_EGREP]) 6836m4_require([_LT_DECL_OBJDUMP]) 6837AC_CACHE_CHECK([how to recognize dependent libraries], 6838lt_cv_deplibs_check_method, 6839[lt_cv_file_magic_cmd='$MAGIC_CMD' 6840lt_cv_file_magic_test_file= 6841lt_cv_deplibs_check_method='unknown' 6842# Need to set the preceding variable on all platforms that support 6843# interlibrary dependencies. 6844# 'none' -- dependencies not supported. 6845# 'unknown' -- same as none, but documents that we really don't know. 6846# 'pass_all' -- all dependencies passed with no checks. 6847# 'test_compile' -- check by making test program. 6848# 'file_magic [[regex]]' -- check by looking for files in library path 6849# that responds to the $file_magic_cmd with a given extended regex. 6850# If you have 'file' or equivalent on your system and you're not sure 6851# whether 'pass_all' will *always* work, you probably want this one. 6852 6853case $host_os in 6854aix[[4-9]]*) 6855 lt_cv_deplibs_check_method=pass_all 6856 ;; 6857 6858beos*) 6859 lt_cv_deplibs_check_method=pass_all 6860 ;; 6861 6862bsdi[[45]]*) 6863 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6864 lt_cv_file_magic_cmd='$FILECMD -L' 6865 lt_cv_file_magic_test_file=/shlib/libc.so 6866 ;; 6867 6868cygwin*) 6869 # func_win32_libid is a shell function defined in ltmain.sh 6870 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6871 lt_cv_file_magic_cmd='func_win32_libid' 6872 ;; 6873 6874mingw* | pw32*) 6875 # Base MSYS/MinGW do not provide the 'file' command needed by 6876 # func_win32_libid shell function, so use a weaker test based on 'objdump', 6877 # unless we find 'file', for example because we are cross-compiling. 6878 if ( file / ) >/dev/null 2>&1; then 6879 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6880 lt_cv_file_magic_cmd='func_win32_libid' 6881 else 6882 # Keep this pattern in sync with the one in func_win32_libid. 6883 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6884 lt_cv_file_magic_cmd='$OBJDUMP -f' 6885 fi 6886 ;; 6887 6888cegcc*) 6889 # use the weaker test based on 'objdump'. See mingw*. 6890 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6891 lt_cv_file_magic_cmd='$OBJDUMP -f' 6892 ;; 6893 6894darwin* | rhapsody*) 6895 lt_cv_deplibs_check_method=pass_all 6896 ;; 6897 6898freebsd* | dragonfly* | midnightbsd*) 6899 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6900 case $host_cpu in 6901 i*86 ) 6902 # Not sure whether the presence of OpenBSD here was a mistake. 6903 # Let's accept both of them until this is cleared up. 6904 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6905 lt_cv_file_magic_cmd=$FILECMD 6906 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6907 ;; 6908 esac 6909 else 6910 lt_cv_deplibs_check_method=pass_all 6911 fi 6912 ;; 6913 6914haiku*) 6915 lt_cv_deplibs_check_method=pass_all 6916 ;; 6917 6918hpux10.20* | hpux11*) 6919 lt_cv_file_magic_cmd=$FILECMD 6920 case $host_cpu in 6921 ia64*) 6922 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6923 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6924 ;; 6925 hppa*64*) 6926 [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]'] 6927 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6928 ;; 6929 *) 6930 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6931 lt_cv_file_magic_test_file=/usr/lib/libc.sl 6932 ;; 6933 esac 6934 ;; 6935 6936interix[[3-9]]*) 6937 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6938 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6939 ;; 6940 6941irix5* | irix6* | nonstopux*) 6942 case $LD in 6943 *-32|*"-32 ") libmagic=32-bit;; 6944 *-n32|*"-n32 ") libmagic=N32;; 6945 *-64|*"-64 ") libmagic=64-bit;; 6946 *) libmagic=never-match;; 6947 esac 6948 lt_cv_deplibs_check_method=pass_all 6949 ;; 6950 6951# This must be glibc/ELF. 6952linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6953 lt_cv_deplibs_check_method=pass_all 6954 ;; 6955 6956netbsd*) 6957 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6958 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6959 else 6960 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6961 fi 6962 ;; 6963 6964newos6*) 6965 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6966 lt_cv_file_magic_cmd=$FILECMD 6967 lt_cv_file_magic_test_file=/usr/lib/libnls.so 6968 ;; 6969 6970*nto* | *qnx*) 6971 lt_cv_deplibs_check_method=pass_all 6972 ;; 6973 6974openbsd* | bitrig*) 6975 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6976 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6977 else 6978 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6979 fi 6980 ;; 6981 6982osf3* | osf4* | osf5*) 6983 lt_cv_deplibs_check_method=pass_all 6984 ;; 6985 6986rdos*) 6987 lt_cv_deplibs_check_method=pass_all 6988 ;; 6989 6990solaris*) 6991 lt_cv_deplibs_check_method=pass_all 6992 ;; 6993 6994sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6995 lt_cv_deplibs_check_method=pass_all 6996 ;; 6997 6998sysv4 | sysv4.3*) 6999 case $host_vendor in 7000 motorola) 7001 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]]' 7002 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7003 ;; 7004 ncr) 7005 lt_cv_deplibs_check_method=pass_all 7006 ;; 7007 sequent) 7008 lt_cv_file_magic_cmd='/bin/file' 7009 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7010 ;; 7011 sni) 7012 lt_cv_file_magic_cmd='/bin/file' 7013 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7014 lt_cv_file_magic_test_file=/lib/libc.so 7015 ;; 7016 siemens) 7017 lt_cv_deplibs_check_method=pass_all 7018 ;; 7019 pc) 7020 lt_cv_deplibs_check_method=pass_all 7021 ;; 7022 esac 7023 ;; 7024 7025tpf*) 7026 lt_cv_deplibs_check_method=pass_all 7027 ;; 7028os2*) 7029 lt_cv_deplibs_check_method=pass_all 7030 ;; 7031esac 7032]) 7033 7034file_magic_glob= 7035want_nocaseglob=no 7036if test "$build" = "$host"; then 7037 case $host_os in 7038 mingw* | pw32*) 7039 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7040 want_nocaseglob=yes 7041 else 7042 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7043 fi 7044 ;; 7045 esac 7046fi 7047 7048file_magic_cmd=$lt_cv_file_magic_cmd 7049deplibs_check_method=$lt_cv_deplibs_check_method 7050test -z "$deplibs_check_method" && deplibs_check_method=unknown 7051 7052_LT_DECL([], [deplibs_check_method], [1], 7053 [Method to check whether dependent libraries are shared objects]) 7054_LT_DECL([], [file_magic_cmd], [1], 7055 [Command to use when deplibs_check_method = "file_magic"]) 7056_LT_DECL([], [file_magic_glob], [1], 7057 [How to find potential files when deplibs_check_method = "file_magic"]) 7058_LT_DECL([], [want_nocaseglob], [1], 7059 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7060])# _LT_CHECK_MAGIC_METHOD 7061 7062 7063# LT_PATH_NM 7064# ---------- 7065# find the pathname to a BSD- or MS-compatible name lister 7066AC_DEFUN([LT_PATH_NM], 7067[AC_REQUIRE([AC_PROG_CC])dnl 7068AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7069[if test -n "$NM"; then 7070 # Let the user override the test. 7071 lt_cv_path_NM=$NM 7072else 7073 lt_nm_to_check=${ac_tool_prefix}nm 7074 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7075 lt_nm_to_check="$lt_nm_to_check nm" 7076 fi 7077 for lt_tmp_nm in $lt_nm_to_check; do 7078 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7079 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7080 IFS=$lt_save_ifs 7081 test -z "$ac_dir" && ac_dir=. 7082 tmp_nm=$ac_dir/$lt_tmp_nm 7083 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7084 # Check to see if the nm accepts a BSD-compat flag. 7085 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7086 # nm: unknown option "B" ignored 7087 # Tru64's nm complains that /dev/null is an invalid object file 7088 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7089 case $build_os in 7090 mingw*) lt_bad_file=conftest.nm/nofile ;; 7091 *) lt_bad_file=/dev/null ;; 7092 esac 7093 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7094 *$lt_bad_file* | *'Invalid file or object type'*) 7095 lt_cv_path_NM="$tmp_nm -B" 7096 break 2 7097 ;; 7098 *) 7099 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7100 */dev/null*) 7101 lt_cv_path_NM="$tmp_nm -p" 7102 break 2 7103 ;; 7104 *) 7105 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7106 continue # so that we can try to find one that supports BSD flags 7107 ;; 7108 esac 7109 ;; 7110 esac 7111 fi 7112 done 7113 IFS=$lt_save_ifs 7114 done 7115 : ${lt_cv_path_NM=no} 7116fi]) 7117if test no != "$lt_cv_path_NM"; then 7118 NM=$lt_cv_path_NM 7119else 7120 # Didn't find any BSD compatible name lister, look for dumpbin. 7121 if test -n "$DUMPBIN"; then : 7122 # Let the user override the test. 7123 else 7124 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7125 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7126 *COFF*) 7127 DUMPBIN="$DUMPBIN -symbols -headers" 7128 ;; 7129 *) 7130 DUMPBIN=: 7131 ;; 7132 esac 7133 fi 7134 AC_SUBST([DUMPBIN]) 7135 if test : != "$DUMPBIN"; then 7136 NM=$DUMPBIN 7137 fi 7138fi 7139test -z "$NM" && NM=nm 7140AC_SUBST([NM]) 7141_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7142 7143AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7144 [lt_cv_nm_interface="BSD nm" 7145 echo "int some_variable = 0;" > conftest.$ac_ext 7146 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7147 (eval "$ac_compile" 2>conftest.err) 7148 cat conftest.err >&AS_MESSAGE_LOG_FD 7149 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7150 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7151 cat conftest.err >&AS_MESSAGE_LOG_FD 7152 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7153 cat conftest.out >&AS_MESSAGE_LOG_FD 7154 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7155 lt_cv_nm_interface="MS dumpbin" 7156 fi 7157 rm -f conftest*]) 7158])# LT_PATH_NM 7159 7160# Old names: 7161AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7162AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7163dnl aclocal-1.4 backwards compatibility: 7164dnl AC_DEFUN([AM_PROG_NM], []) 7165dnl AC_DEFUN([AC_PROG_NM], []) 7166 7167# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7168# -------------------------------- 7169# how to determine the name of the shared library 7170# associated with a specific link library. 7171# -- PORTME fill in with the dynamic library characteristics 7172m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7173[m4_require([_LT_DECL_EGREP]) 7174m4_require([_LT_DECL_OBJDUMP]) 7175m4_require([_LT_DECL_DLLTOOL]) 7176AC_CACHE_CHECK([how to associate runtime and link libraries], 7177lt_cv_sharedlib_from_linklib_cmd, 7178[lt_cv_sharedlib_from_linklib_cmd='unknown' 7179 7180case $host_os in 7181cygwin* | mingw* | pw32* | cegcc*) 7182 # two different shell functions defined in ltmain.sh; 7183 # decide which one to use based on capabilities of $DLLTOOL 7184 case `$DLLTOOL --help 2>&1` in 7185 *--identify-strict*) 7186 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7187 ;; 7188 *) 7189 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7190 ;; 7191 esac 7192 ;; 7193*) 7194 # fallback: assume linklib IS sharedlib 7195 lt_cv_sharedlib_from_linklib_cmd=$ECHO 7196 ;; 7197esac 7198]) 7199sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7200test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7201 7202_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7203 [Command to associate shared and link libraries]) 7204])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7205 7206 7207# _LT_PATH_MANIFEST_TOOL 7208# ---------------------- 7209# locate the manifest tool 7210m4_defun([_LT_PATH_MANIFEST_TOOL], 7211[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7212test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7213AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7214 [lt_cv_path_mainfest_tool=no 7215 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7216 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7217 cat conftest.err >&AS_MESSAGE_LOG_FD 7218 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7219 lt_cv_path_mainfest_tool=yes 7220 fi 7221 rm -f conftest*]) 7222if test yes != "$lt_cv_path_mainfest_tool"; then 7223 MANIFEST_TOOL=: 7224fi 7225_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7226])# _LT_PATH_MANIFEST_TOOL 7227 7228 7229# _LT_DLL_DEF_P([FILE]) 7230# --------------------- 7231# True iff FILE is a Windows DLL '.def' file. 7232# Keep in sync with func_dll_def_p in the libtool script 7233AC_DEFUN([_LT_DLL_DEF_P], 7234[dnl 7235 test DEF = "`$SED -n dnl 7236 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7237 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7238 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7239 -e q dnl Only consider the first "real" line 7240 $1`" dnl 7241])# _LT_DLL_DEF_P 7242 7243 7244# LT_LIB_M 7245# -------- 7246# check for math library 7247AC_DEFUN([LT_LIB_M], 7248[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7249LIBM= 7250case $host in 7251*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7252 # These system don't have libm, or don't need it 7253 ;; 7254*-ncr-sysv4.3*) 7255 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7256 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7257 ;; 7258*) 7259 AC_CHECK_LIB(m, cos, LIBM=-lm) 7260 ;; 7261esac 7262AC_SUBST([LIBM]) 7263])# LT_LIB_M 7264 7265# Old name: 7266AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7267dnl aclocal-1.4 backwards compatibility: 7268dnl AC_DEFUN([AC_CHECK_LIBM], []) 7269 7270 7271# _LT_COMPILER_NO_RTTI([TAGNAME]) 7272# ------------------------------- 7273m4_defun([_LT_COMPILER_NO_RTTI], 7274[m4_require([_LT_TAG_COMPILER])dnl 7275 7276_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7277 7278if test yes = "$GCC"; then 7279 case $cc_basename in 7280 nvcc*) 7281 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7282 *) 7283 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7284 esac 7285 7286 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7287 lt_cv_prog_compiler_rtti_exceptions, 7288 [-fno-rtti -fno-exceptions], [], 7289 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7290fi 7291_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7292 [Compiler flag to turn off builtin functions]) 7293])# _LT_COMPILER_NO_RTTI 7294 7295 7296# _LT_CMD_GLOBAL_SYMBOLS 7297# ---------------------- 7298m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7299[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7300AC_REQUIRE([AC_PROG_CC])dnl 7301AC_REQUIRE([AC_PROG_AWK])dnl 7302AC_REQUIRE([LT_PATH_NM])dnl 7303AC_REQUIRE([LT_PATH_LD])dnl 7304m4_require([_LT_DECL_SED])dnl 7305m4_require([_LT_DECL_EGREP])dnl 7306m4_require([_LT_TAG_COMPILER])dnl 7307 7308# Check for command to grab the raw symbol name followed by C symbol from nm. 7309AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7310AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7311[ 7312# These are sane defaults that work on at least a few old systems. 7313# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7314 7315# Character class describing NM global symbol codes. 7316symcode='[[BCDEGRST]]' 7317 7318# Regexp to match symbols that can be accessed directly from C. 7319sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7320 7321# Define system-specific variables. 7322case $host_os in 7323aix*) 7324 symcode='[[BCDT]]' 7325 ;; 7326cygwin* | mingw* | pw32* | cegcc*) 7327 symcode='[[ABCDGISTW]]' 7328 ;; 7329hpux*) 7330 if test ia64 = "$host_cpu"; then 7331 symcode='[[ABCDEGRST]]' 7332 fi 7333 ;; 7334irix* | nonstopux*) 7335 symcode='[[BCDEGRST]]' 7336 ;; 7337osf*) 7338 symcode='[[BCDEGQRST]]' 7339 ;; 7340solaris*) 7341 symcode='[[BDRT]]' 7342 ;; 7343sco3.2v5*) 7344 symcode='[[DT]]' 7345 ;; 7346sysv4.2uw2*) 7347 symcode='[[DT]]' 7348 ;; 7349sysv5* | sco5v6* | unixware* | OpenUNIX*) 7350 symcode='[[ABDT]]' 7351 ;; 7352sysv4) 7353 symcode='[[DFNSTU]]' 7354 ;; 7355esac 7356 7357# If we're using GNU nm, then use its standard symbol codes. 7358case `$NM -V 2>&1` in 7359*GNU* | *'with BFD'*) 7360 symcode='[[ABCDGIRSTW]]' ;; 7361esac 7362 7363if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7364 # Gets list of data symbols to import. 7365 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7366 # Adjust the below global symbol transforms to fixup imported variables. 7367 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7368 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7369 lt_c_name_lib_hook="\ 7370 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7371 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7372else 7373 # Disable hooks by default. 7374 lt_cv_sys_global_symbol_to_import= 7375 lt_cdecl_hook= 7376 lt_c_name_hook= 7377 lt_c_name_lib_hook= 7378fi 7379 7380# Transform an extracted symbol line into a proper C declaration. 7381# Some systems (esp. on ia64) link data and code symbols differently, 7382# so use this general approach. 7383lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7384$lt_cdecl_hook\ 7385" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7386" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7387 7388# Transform an extracted symbol line into symbol name and symbol address 7389lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7390$lt_c_name_hook\ 7391" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7392" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7393 7394# Transform an extracted symbol line into symbol name with lib prefix and 7395# symbol address. 7396lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7397$lt_c_name_lib_hook\ 7398" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7399" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7400" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7401 7402# Handle CRLF in mingw tool chain 7403opt_cr= 7404case $build_os in 7405mingw*) 7406 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7407 ;; 7408esac 7409 7410# Try without a prefix underscore, then with it. 7411for ac_symprfx in "" "_"; do 7412 7413 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7414 symxfrm="\\1 $ac_symprfx\\2 \\2" 7415 7416 # Write the raw and C identifiers. 7417 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7418 # Fake it for dumpbin and say T for any non-static function, 7419 # D for any global variable and I for any imported variable. 7420 # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7421 # which start with @ or ?. 7422 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7423" {last_section=section; section=\$ 3};"\ 7424" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7425" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7426" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7427" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7428" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7429" \$ 0!~/External *\|/{next};"\ 7430" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7431" {if(hide[section]) next};"\ 7432" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7433" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7434" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7435" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7436" ' prfx=^$ac_symprfx]" 7437 else 7438 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7439 fi 7440 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7441 7442 # Check to see that the pipe works correctly. 7443 pipe_works=no 7444 7445 rm -f conftest* 7446 cat > conftest.$ac_ext <<_LT_EOF 7447#ifdef __cplusplus 7448extern "C" { 7449#endif 7450char nm_test_var; 7451void nm_test_func(void); 7452void nm_test_func(void){} 7453#ifdef __cplusplus 7454} 7455#endif 7456int main(){nm_test_var='a';nm_test_func();return(0);} 7457_LT_EOF 7458 7459 if AC_TRY_EVAL(ac_compile); then 7460 # Now try to grab the symbols. 7461 nlist=conftest.nm 7462 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7463 # Try sorting and uniquifying the output. 7464 if sort "$nlist" | uniq > "$nlist"T; then 7465 mv -f "$nlist"T "$nlist" 7466 else 7467 rm -f "$nlist"T 7468 fi 7469 7470 # Make sure that we snagged all the symbols we need. 7471 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7472 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7473 cat <<_LT_EOF > conftest.$ac_ext 7474/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7475#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7476/* DATA imports from DLLs on WIN32 can't be const, because runtime 7477 relocations are performed -- see ld's documentation on pseudo-relocs. */ 7478# define LT@&t@_DLSYM_CONST 7479#elif defined __osf__ 7480/* This system does not cope well with relocations in const data. */ 7481# define LT@&t@_DLSYM_CONST 7482#else 7483# define LT@&t@_DLSYM_CONST const 7484#endif 7485 7486#ifdef __cplusplus 7487extern "C" { 7488#endif 7489 7490_LT_EOF 7491 # Now generate the symbol file. 7492 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7493 7494 cat <<_LT_EOF >> conftest.$ac_ext 7495 7496/* The mapping between symbol names and symbols. */ 7497LT@&t@_DLSYM_CONST struct { 7498 const char *name; 7499 void *address; 7500} 7501lt__PROGRAM__LTX_preloaded_symbols[[]] = 7502{ 7503 { "@PROGRAM@", (void *) 0 }, 7504_LT_EOF 7505 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7506 cat <<\_LT_EOF >> conftest.$ac_ext 7507 {0, (void *) 0} 7508}; 7509 7510/* This works around a problem in FreeBSD linker */ 7511#ifdef FREEBSD_WORKAROUND 7512static const void *lt_preloaded_setup() { 7513 return lt__PROGRAM__LTX_preloaded_symbols; 7514} 7515#endif 7516 7517#ifdef __cplusplus 7518} 7519#endif 7520_LT_EOF 7521 # Now try linking the two files. 7522 mv conftest.$ac_objext conftstm.$ac_objext 7523 lt_globsym_save_LIBS=$LIBS 7524 lt_globsym_save_CFLAGS=$CFLAGS 7525 LIBS=conftstm.$ac_objext 7526 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7527 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7528 pipe_works=yes 7529 fi 7530 LIBS=$lt_globsym_save_LIBS 7531 CFLAGS=$lt_globsym_save_CFLAGS 7532 else 7533 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7534 fi 7535 else 7536 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7537 fi 7538 else 7539 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7540 fi 7541 else 7542 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7543 cat conftest.$ac_ext >&5 7544 fi 7545 rm -rf conftest* conftst* 7546 7547 # Do not use the global_symbol_pipe unless it works. 7548 if test yes = "$pipe_works"; then 7549 break 7550 else 7551 lt_cv_sys_global_symbol_pipe= 7552 fi 7553done 7554]) 7555if test -z "$lt_cv_sys_global_symbol_pipe"; then 7556 lt_cv_sys_global_symbol_to_cdecl= 7557fi 7558if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7559 AC_MSG_RESULT(failed) 7560else 7561 AC_MSG_RESULT(ok) 7562fi 7563 7564# Response file support. 7565if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7566 nm_file_list_spec='@' 7567elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7568 nm_file_list_spec='@' 7569fi 7570 7571_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7572 [Take the output of nm and produce a listing of raw symbols and C names]) 7573_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7574 [Transform the output of nm in a proper C declaration]) 7575_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7576 [Transform the output of nm into a list of symbols to manually relocate]) 7577_LT_DECL([global_symbol_to_c_name_address], 7578 [lt_cv_sys_global_symbol_to_c_name_address], [1], 7579 [Transform the output of nm in a C name address pair]) 7580_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7581 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7582 [Transform the output of nm in a C name address pair when lib prefix is needed]) 7583_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7584 [The name lister interface]) 7585_LT_DECL([], [nm_file_list_spec], [1], 7586 [Specify filename containing input files for $NM]) 7587]) # _LT_CMD_GLOBAL_SYMBOLS 7588 7589 7590# _LT_COMPILER_PIC([TAGNAME]) 7591# --------------------------- 7592m4_defun([_LT_COMPILER_PIC], 7593[m4_require([_LT_TAG_COMPILER])dnl 7594_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7595_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7596_LT_TAGVAR(lt_prog_compiler_static, $1)= 7597 7598m4_if([$1], [CXX], [ 7599 # C++ specific cases for pic, static, wl, etc. 7600 if test yes = "$GXX"; then 7601 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7602 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7603 7604 case $host_os in 7605 aix*) 7606 # All AIX code is PIC. 7607 if test ia64 = "$host_cpu"; then 7608 # AIX 5 now supports IA64 processor 7609 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7610 fi 7611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7612 ;; 7613 7614 amigaos*) 7615 case $host_cpu in 7616 powerpc) 7617 # see comment about AmigaOS4 .so support 7618 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7619 ;; 7620 m68k) 7621 # FIXME: we need at least 68020 code to build shared libraries, but 7622 # adding the '-m68020' flag to GCC prevents building anything better, 7623 # like '-m68040'. 7624 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7625 ;; 7626 esac 7627 ;; 7628 7629 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7630 # PIC is the default for these OSes. 7631 ;; 7632 mingw* | cygwin* | os2* | pw32* | cegcc*) 7633 # This hack is so that the source file can tell whether it is being 7634 # built for inclusion in a dll (and should export symbols for example). 7635 # Although the cygwin gcc ignores -fPIC, still need this for old-style 7636 # (--disable-auto-import) libraries 7637 m4_if([$1], [GCJ], [], 7638 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7639 case $host_os in 7640 os2*) 7641 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7642 ;; 7643 esac 7644 ;; 7645 darwin* | rhapsody*) 7646 # PIC is the default on this platform 7647 # Common symbols not allowed in MH_DYLIB files 7648 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7649 ;; 7650 *djgpp*) 7651 # DJGPP does not support shared libraries at all 7652 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7653 ;; 7654 haiku*) 7655 # PIC is the default for Haiku. 7656 # The "-static" flag exists, but is broken. 7657 _LT_TAGVAR(lt_prog_compiler_static, $1)= 7658 ;; 7659 interix[[3-9]]*) 7660 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7661 # Instead, we relocate shared libraries at runtime. 7662 ;; 7663 sysv4*MP*) 7664 if test -d /usr/nec; then 7665 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7666 fi 7667 ;; 7668 hpux*) 7669 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7670 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7671 # sets the default TLS model and affects inlining. 7672 case $host_cpu in 7673 hppa*64*) 7674 ;; 7675 *) 7676 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7677 ;; 7678 esac 7679 ;; 7680 *qnx* | *nto*) 7681 # QNX uses GNU C++, but need to define -shared option too, otherwise 7682 # it will coredump. 7683 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7684 ;; 7685 *) 7686 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7687 ;; 7688 esac 7689 else 7690 case $host_os in 7691 aix[[4-9]]*) 7692 # All AIX code is PIC. 7693 if test ia64 = "$host_cpu"; then 7694 # AIX 5 now supports IA64 processor 7695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7696 else 7697 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7698 fi 7699 ;; 7700 chorus*) 7701 case $cc_basename in 7702 cxch68*) 7703 # Green Hills C++ Compiler 7704 # _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" 7705 ;; 7706 esac 7707 ;; 7708 mingw* | cygwin* | os2* | pw32* | cegcc*) 7709 # This hack is so that the source file can tell whether it is being 7710 # built for inclusion in a dll (and should export symbols for example). 7711 m4_if([$1], [GCJ], [], 7712 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7713 ;; 7714 dgux*) 7715 case $cc_basename in 7716 ec++*) 7717 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7718 ;; 7719 ghcx*) 7720 # Green Hills C++ Compiler 7721 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7722 ;; 7723 *) 7724 ;; 7725 esac 7726 ;; 7727 freebsd* | dragonfly* | midnightbsd*) 7728 # FreeBSD uses GNU C++ 7729 ;; 7730 hpux9* | hpux10* | hpux11*) 7731 case $cc_basename in 7732 CC*) 7733 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7734 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7735 if test ia64 != "$host_cpu"; then 7736 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7737 fi 7738 ;; 7739 aCC*) 7740 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7741 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7742 case $host_cpu in 7743 hppa*64*|ia64*) 7744 # +Z the default 7745 ;; 7746 *) 7747 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7748 ;; 7749 esac 7750 ;; 7751 *) 7752 ;; 7753 esac 7754 ;; 7755 interix*) 7756 # This is c89, which is MS Visual C++ (no shared libs) 7757 # Anyone wants to do a port? 7758 ;; 7759 irix5* | irix6* | nonstopux*) 7760 case $cc_basename in 7761 CC*) 7762 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7763 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7764 # CC pic flag -KPIC is the default. 7765 ;; 7766 *) 7767 ;; 7768 esac 7769 ;; 7770 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7771 case $cc_basename in 7772 KCC*) 7773 # KAI C++ Compiler 7774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7776 ;; 7777 ecpc* ) 7778 # old Intel C++ for x86_64, which still supported -KPIC. 7779 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7781 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7782 ;; 7783 icpc* ) 7784 # Intel C++, used to be incompatible with GCC. 7785 # ICC 10 doesn't accept -KPIC any more. 7786 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7787 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7788 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7789 ;; 7790 pgCC* | pgcpp*) 7791 # Portland Group C++ compiler 7792 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7794 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7795 ;; 7796 cxx*) 7797 # Compaq C++ 7798 # Make sure the PIC flag is empty. It appears that all Alpha 7799 # Linux and Compaq Tru64 Unix objects are PIC. 7800 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7802 ;; 7803 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7804 # IBM XL 8.0, 9.0 on PPC and BlueGene 7805 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7806 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7808 ;; 7809 *) 7810 case `$CC -V 2>&1 | $SED 5q` in 7811 *Sun\ C*) 7812 # Sun C++ 5.9 7813 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7814 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7815 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7816 ;; 7817 esac 7818 ;; 7819 esac 7820 ;; 7821 lynxos*) 7822 ;; 7823 m88k*) 7824 ;; 7825 mvs*) 7826 case $cc_basename in 7827 cxx*) 7828 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7829 ;; 7830 *) 7831 ;; 7832 esac 7833 ;; 7834 netbsd*) 7835 ;; 7836 *qnx* | *nto*) 7837 # QNX uses GNU C++, but need to define -shared option too, otherwise 7838 # it will coredump. 7839 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7840 ;; 7841 osf3* | osf4* | osf5*) 7842 case $cc_basename in 7843 KCC*) 7844 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7845 ;; 7846 RCC*) 7847 # Rational C++ 2.4.1 7848 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7849 ;; 7850 cxx*) 7851 # Digital/Compaq C++ 7852 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7853 # Make sure the PIC flag is empty. It appears that all Alpha 7854 # Linux and Compaq Tru64 Unix objects are PIC. 7855 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7856 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7857 ;; 7858 *) 7859 ;; 7860 esac 7861 ;; 7862 psos*) 7863 ;; 7864 solaris*) 7865 case $cc_basename in 7866 CC* | sunCC*) 7867 # Sun C++ 4.2, 5.x and Centerline C++ 7868 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7869 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7870 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7871 ;; 7872 gcx*) 7873 # Green Hills C++ Compiler 7874 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7875 ;; 7876 *) 7877 ;; 7878 esac 7879 ;; 7880 sunos4*) 7881 case $cc_basename in 7882 CC*) 7883 # Sun C++ 4.x 7884 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7885 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7886 ;; 7887 lcc*) 7888 # Lucid 7889 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7890 ;; 7891 *) 7892 ;; 7893 esac 7894 ;; 7895 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7896 case $cc_basename in 7897 CC*) 7898 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7900 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7901 ;; 7902 esac 7903 ;; 7904 tandem*) 7905 case $cc_basename in 7906 NCC*) 7907 # NonStop-UX NCC 3.20 7908 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7909 ;; 7910 *) 7911 ;; 7912 esac 7913 ;; 7914 vxworks*) 7915 ;; 7916 *) 7917 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7918 ;; 7919 esac 7920 fi 7921], 7922[ 7923 if test yes = "$GCC"; then 7924 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7925 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7926 7927 case $host_os in 7928 aix*) 7929 # All AIX code is PIC. 7930 if test ia64 = "$host_cpu"; then 7931 # AIX 5 now supports IA64 processor 7932 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7933 fi 7934 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7935 ;; 7936 7937 amigaos*) 7938 case $host_cpu in 7939 powerpc) 7940 # see comment about AmigaOS4 .so support 7941 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7942 ;; 7943 m68k) 7944 # FIXME: we need at least 68020 code to build shared libraries, but 7945 # adding the '-m68020' flag to GCC prevents building anything better, 7946 # like '-m68040'. 7947 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7948 ;; 7949 esac 7950 ;; 7951 7952 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7953 # PIC is the default for these OSes. 7954 ;; 7955 7956 mingw* | cygwin* | pw32* | os2* | cegcc*) 7957 # This hack is so that the source file can tell whether it is being 7958 # built for inclusion in a dll (and should export symbols for example). 7959 # Although the cygwin gcc ignores -fPIC, still need this for old-style 7960 # (--disable-auto-import) libraries 7961 m4_if([$1], [GCJ], [], 7962 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7963 case $host_os in 7964 os2*) 7965 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7966 ;; 7967 esac 7968 ;; 7969 7970 darwin* | rhapsody*) 7971 # PIC is the default on this platform 7972 # Common symbols not allowed in MH_DYLIB files 7973 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7974 ;; 7975 7976 haiku*) 7977 # PIC is the default for Haiku. 7978 # The "-static" flag exists, but is broken. 7979 _LT_TAGVAR(lt_prog_compiler_static, $1)= 7980 ;; 7981 7982 hpux*) 7983 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7984 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7985 # sets the default TLS model and affects inlining. 7986 case $host_cpu in 7987 hppa*64*) 7988 # +Z the default 7989 ;; 7990 *) 7991 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7992 ;; 7993 esac 7994 ;; 7995 7996 interix[[3-9]]*) 7997 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7998 # Instead, we relocate shared libraries at runtime. 7999 ;; 8000 8001 msdosdjgpp*) 8002 # Just because we use GCC doesn't mean we suddenly get shared libraries 8003 # on systems that don't support them. 8004 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8005 enable_shared=no 8006 ;; 8007 8008 *nto* | *qnx*) 8009 # QNX uses GNU C++, but need to define -shared option too, otherwise 8010 # it will coredump. 8011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8012 ;; 8013 8014 sysv4*MP*) 8015 if test -d /usr/nec; then 8016 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8017 fi 8018 ;; 8019 8020 *) 8021 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8022 ;; 8023 esac 8024 8025 case $cc_basename in 8026 nvcc*) # Cuda Compiler Driver 2.2 8027 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8028 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8029 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8030 fi 8031 ;; 8032 esac 8033 else 8034 # PORTME Check for flag to pass linker flags through the system compiler. 8035 case $host_os in 8036 aix*) 8037 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8038 if test ia64 = "$host_cpu"; then 8039 # AIX 5 now supports IA64 processor 8040 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8041 else 8042 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8043 fi 8044 ;; 8045 8046 darwin* | rhapsody*) 8047 # PIC is the default on this platform 8048 # Common symbols not allowed in MH_DYLIB files 8049 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8050 case $cc_basename in 8051 nagfor*) 8052 # NAG Fortran compiler 8053 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8054 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8055 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8056 ;; 8057 esac 8058 ;; 8059 8060 mingw* | cygwin* | pw32* | os2* | cegcc*) 8061 # This hack is so that the source file can tell whether it is being 8062 # built for inclusion in a dll (and should export symbols for example). 8063 m4_if([$1], [GCJ], [], 8064 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8065 case $host_os in 8066 os2*) 8067 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8068 ;; 8069 esac 8070 ;; 8071 8072 hpux9* | hpux10* | hpux11*) 8073 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8074 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8075 # not for PA HP-UX. 8076 case $host_cpu in 8077 hppa*64*|ia64*) 8078 # +Z the default 8079 ;; 8080 *) 8081 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8082 ;; 8083 esac 8084 # Is there a better lt_prog_compiler_static that works with the bundled CC? 8085 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8086 ;; 8087 8088 irix5* | irix6* | nonstopux*) 8089 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8090 # PIC (with -KPIC) is the default. 8091 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8092 ;; 8093 8094 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8095 case $cc_basename in 8096 # old Intel for x86_64, which still supported -KPIC. 8097 ecc*) 8098 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8099 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8100 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8101 ;; 8102 # icc used to be incompatible with GCC. 8103 # ICC 10 doesn't accept -KPIC any more. 8104 icc* | ifort*) 8105 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8106 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8107 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8108 ;; 8109 # Lahey Fortran 8.1. 8110 lf95*) 8111 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8113 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8114 ;; 8115 nagfor*) 8116 # NAG Fortran compiler 8117 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8118 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8119 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8120 ;; 8121 tcc*) 8122 # Fabrice Bellard et al's Tiny C Compiler 8123 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8124 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8125 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8126 ;; 8127 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8128 # Portland Group compilers (*not* the Pentium gcc compiler, 8129 # which looks to be a dead project) 8130 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8131 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8132 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8133 ;; 8134 ccc*) 8135 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8136 # All Alpha code is PIC. 8137 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8138 ;; 8139 xl* | bgxl* | bgf* | mpixl*) 8140 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8141 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8142 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8143 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8144 ;; 8145 *) 8146 case `$CC -V 2>&1 | $SED 5q` in 8147 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8148 # Sun Fortran 8.3 passes all unrecognized flags to the linker 8149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8150 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8151 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8152 ;; 8153 *Sun\ F* | *Sun*Fortran*) 8154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8155 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8156 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8157 ;; 8158 *Sun\ C*) 8159 # Sun C 5.9 8160 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8161 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8162 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8163 ;; 8164 *Intel*\ [[CF]]*Compiler*) 8165 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8166 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8167 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8168 ;; 8169 *Portland\ Group*) 8170 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8171 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8172 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8173 ;; 8174 esac 8175 ;; 8176 esac 8177 ;; 8178 8179 newsos6) 8180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8182 ;; 8183 8184 *nto* | *qnx*) 8185 # QNX uses GNU C++, but need to define -shared option too, otherwise 8186 # it will coredump. 8187 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8188 ;; 8189 8190 osf3* | osf4* | osf5*) 8191 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8192 # All OSF/1 code is PIC. 8193 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8194 ;; 8195 8196 rdos*) 8197 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8198 ;; 8199 8200 solaris*) 8201 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8202 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8203 case $cc_basename in 8204 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8206 *) 8207 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8208 esac 8209 ;; 8210 8211 sunos4*) 8212 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8214 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8215 ;; 8216 8217 sysv4 | sysv4.2uw2* | sysv4.3*) 8218 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8219 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8220 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8221 ;; 8222 8223 sysv4*MP*) 8224 if test -d /usr/nec; then 8225 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8226 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8227 fi 8228 ;; 8229 8230 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8231 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8232 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8233 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8234 ;; 8235 8236 unicos*) 8237 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8238 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8239 ;; 8240 8241 uts4*) 8242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8243 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8244 ;; 8245 8246 *) 8247 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8248 ;; 8249 esac 8250 fi 8251]) 8252case $host_os in 8253 # For platforms that do not support PIC, -DPIC is meaningless: 8254 *djgpp*) 8255 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8256 ;; 8257 *) 8258 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8259 ;; 8260esac 8261 8262AC_CACHE_CHECK([for $compiler option to produce PIC], 8263 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8264 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8265_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8266 8267# 8268# Check to make sure the PIC flag actually works. 8269# 8270if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8271 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8272 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8273 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8274 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8275 "" | " "*) ;; 8276 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8277 esac], 8278 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8279 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8280fi 8281_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8282 [Additional compiler flags for building library objects]) 8283 8284_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8285 [How to pass a linker flag through the compiler]) 8286# 8287# Check to make sure the static flag actually works. 8288# 8289wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8290_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8291 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8292 $lt_tmp_static_flag, 8293 [], 8294 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8295_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8296 [Compiler flag to prevent dynamic linking]) 8297])# _LT_COMPILER_PIC 8298 8299 8300# _LT_LINKER_SHLIBS([TAGNAME]) 8301# ---------------------------- 8302# See if the linker supports building shared libraries. 8303m4_defun([_LT_LINKER_SHLIBS], 8304[AC_REQUIRE([LT_PATH_LD])dnl 8305AC_REQUIRE([LT_PATH_NM])dnl 8306m4_require([_LT_PATH_MANIFEST_TOOL])dnl 8307m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8308m4_require([_LT_DECL_EGREP])dnl 8309m4_require([_LT_DECL_SED])dnl 8310m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8311m4_require([_LT_TAG_COMPILER])dnl 8312AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8313m4_if([$1], [CXX], [ 8314 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8315 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8316 case $host_os in 8317 aix[[4-9]]*) 8318 # If we're using GNU nm, then we don't want the "-C" option. 8319 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8320 # Without the "-l" option, or with the "-B" option, AIX nm treats 8321 # weak defined symbols like other global defined symbols, whereas 8322 # GNU nm marks them as "W". 8323 # While the 'weak' keyword is ignored in the Export File, we need 8324 # it in the Import File for the 'aix-soname' feature, so we have 8325 # to replace the "-B" option with "-P" for AIX nm. 8326 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8327 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8328 else 8329 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8330 fi 8331 ;; 8332 pw32*) 8333 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8334 ;; 8335 cygwin* | mingw* | cegcc*) 8336 case $cc_basename in 8337 cl* | icl*) 8338 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8339 ;; 8340 *) 8341 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 8342 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8343 ;; 8344 esac 8345 ;; 8346 *) 8347 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8348 ;; 8349 esac 8350], [ 8351 runpath_var= 8352 _LT_TAGVAR(allow_undefined_flag, $1)= 8353 _LT_TAGVAR(always_export_symbols, $1)=no 8354 _LT_TAGVAR(archive_cmds, $1)= 8355 _LT_TAGVAR(archive_expsym_cmds, $1)= 8356 _LT_TAGVAR(compiler_needs_object, $1)=no 8357 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8358 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8359 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8360 _LT_TAGVAR(hardcode_automatic, $1)=no 8361 _LT_TAGVAR(hardcode_direct, $1)=no 8362 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8363 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8364 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8365 _LT_TAGVAR(hardcode_minus_L, $1)=no 8366 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8367 _LT_TAGVAR(inherit_rpath, $1)=no 8368 _LT_TAGVAR(link_all_deplibs, $1)=unknown 8369 _LT_TAGVAR(module_cmds, $1)= 8370 _LT_TAGVAR(module_expsym_cmds, $1)= 8371 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8372 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8373 _LT_TAGVAR(thread_safe_flag_spec, $1)= 8374 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8375 # include_expsyms should be a list of space-separated symbols to be *always* 8376 # included in the symbol list 8377 _LT_TAGVAR(include_expsyms, $1)= 8378 # exclude_expsyms can be an extended regexp of symbols to exclude 8379 # it will be wrapped by ' (' and ')$', so one must not match beginning or 8380 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8381 # as well as any symbol that contains 'd'. 8382 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8383 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8384 # platforms (ab)use it in PIC code, but their linkers get confused if 8385 # the symbol is explicitly referenced. Since portable code cannot 8386 # rely on this symbol name, it's probably fine to never include it in 8387 # preloaded symbol tables. 8388 # Exclude shared library initialization/finalization symbols. 8389dnl Note also adjust exclude_expsyms for C++ above. 8390 extract_expsyms_cmds= 8391 8392 case $host_os in 8393 cygwin* | mingw* | pw32* | cegcc*) 8394 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8395 # When not using gcc, we currently assume that we are using 8396 # Microsoft Visual C++ or Intel C++ Compiler. 8397 if test yes != "$GCC"; then 8398 with_gnu_ld=no 8399 fi 8400 ;; 8401 interix*) 8402 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8403 with_gnu_ld=yes 8404 ;; 8405 openbsd* | bitrig*) 8406 with_gnu_ld=no 8407 ;; 8408 esac 8409 8410 _LT_TAGVAR(ld_shlibs, $1)=yes 8411 8412 # On some targets, GNU ld is compatible enough with the native linker 8413 # that we're better off using the native interface for both. 8414 lt_use_gnu_ld_interface=no 8415 if test yes = "$with_gnu_ld"; then 8416 case $host_os in 8417 aix*) 8418 # The AIX port of GNU ld has always aspired to compatibility 8419 # with the native linker. However, as the warning in the GNU ld 8420 # block says, versions before 2.19.5* couldn't really create working 8421 # shared libraries, regardless of the interface used. 8422 case `$LD -v 2>&1` in 8423 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8424 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8425 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8426 *) 8427 lt_use_gnu_ld_interface=yes 8428 ;; 8429 esac 8430 ;; 8431 *) 8432 lt_use_gnu_ld_interface=yes 8433 ;; 8434 esac 8435 fi 8436 8437 if test yes = "$lt_use_gnu_ld_interface"; then 8438 # If archive_cmds runs LD, not CC, wlarc should be empty 8439 wlarc='$wl' 8440 8441 # Set some defaults for GNU ld with shared library support. These 8442 # are reset later if shared libraries are not supported. Putting them 8443 # here allows them to be overridden if necessary. 8444 runpath_var=LD_RUN_PATH 8445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8446 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8447 # ancient GNU ld didn't support --whole-archive et. al. 8448 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8449 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8450 else 8451 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8452 fi 8453 supports_anon_versioning=no 8454 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8455 *GNU\ gold*) supports_anon_versioning=yes ;; 8456 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8457 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8458 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8459 *\ 2.11.*) ;; # other 2.11 versions 8460 *) supports_anon_versioning=yes ;; 8461 esac 8462 8463 # See if GNU ld supports shared libraries. 8464 case $host_os in 8465 aix[[3-9]]*) 8466 # On AIX/PPC, the GNU linker is very broken 8467 if test ia64 != "$host_cpu"; then 8468 _LT_TAGVAR(ld_shlibs, $1)=no 8469 cat <<_LT_EOF 1>&2 8470 8471*** Warning: the GNU linker, at least up to release 2.19, is reported 8472*** to be unable to reliably create shared libraries on AIX. 8473*** Therefore, libtool is disabling shared libraries support. If you 8474*** really care for shared libraries, you may want to install binutils 8475*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8476*** You will then need to restart the configuration process. 8477 8478_LT_EOF 8479 fi 8480 ;; 8481 8482 amigaos*) 8483 case $host_cpu in 8484 powerpc) 8485 # see comment about AmigaOS4 .so support 8486 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8487 _LT_TAGVAR(archive_expsym_cmds, $1)='' 8488 ;; 8489 m68k) 8490 _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)' 8491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8492 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8493 ;; 8494 esac 8495 ;; 8496 8497 beos*) 8498 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8499 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8500 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8501 # support --undefined. This deserves some investigation. FIXME 8502 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8503 else 8504 _LT_TAGVAR(ld_shlibs, $1)=no 8505 fi 8506 ;; 8507 8508 cygwin* | mingw* | pw32* | cegcc*) 8509 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8510 # as there is no search path for DLLs. 8511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8513 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8514 _LT_TAGVAR(always_export_symbols, $1)=no 8515 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8516 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 8517 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8518 8519 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8520 _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' 8521 # If the export-symbols file already is a .def file, use it as 8522 # is; otherwise, prepend EXPORTS... 8523 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8524 cp $export_symbols $output_objdir/$soname.def; 8525 else 8526 echo EXPORTS > $output_objdir/$soname.def; 8527 cat $export_symbols >> $output_objdir/$soname.def; 8528 fi~ 8529 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8530 else 8531 _LT_TAGVAR(ld_shlibs, $1)=no 8532 fi 8533 ;; 8534 8535 haiku*) 8536 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8537 _LT_TAGVAR(link_all_deplibs, $1)=yes 8538 ;; 8539 8540 os2*) 8541 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8542 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8543 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8544 shrext_cmds=.dll 8545 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8546 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8547 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8548 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8549 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8550 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8551 emximp -o $lib $output_objdir/$libname.def' 8552 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8553 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8554 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8555 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8556 prefix_cmds="$SED"~ 8557 if test EXPORTS = "`$SED 1q $export_symbols`"; then 8558 prefix_cmds="$prefix_cmds -e 1d"; 8559 fi~ 8560 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8561 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8562 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8563 emximp -o $lib $output_objdir/$libname.def' 8564 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8565 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8566 _LT_TAGVAR(file_list_spec, $1)='@' 8567 ;; 8568 8569 interix[[3-9]]*) 8570 _LT_TAGVAR(hardcode_direct, $1)=no 8571 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8574 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8575 # Instead, shared libraries are loaded at an image base (0x10000000 by 8576 # default) and relocated if they conflict, which is a slow very memory 8577 # consuming and fragmenting process. To avoid this, we pick a random, 8578 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8579 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8580 _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' 8581 _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' 8582 ;; 8583 8584 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8585 tmp_diet=no 8586 if test linux-dietlibc = "$host_os"; then 8587 case $cc_basename in 8588 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8589 esac 8590 fi 8591 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8592 && test no = "$tmp_diet" 8593 then 8594 tmp_addflag=' $pic_flag' 8595 tmp_sharedflag='-shared' 8596 case $cc_basename,$host_cpu in 8597 pgcc*) # Portland Group C compiler 8598 _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' 8599 tmp_addflag=' $pic_flag' 8600 ;; 8601 pgf77* | pgf90* | pgf95* | pgfortran*) 8602 # Portland Group f77 and f90 compilers 8603 _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' 8604 tmp_addflag=' $pic_flag -Mnomain' ;; 8605 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8606 tmp_addflag=' -i_dynamic' ;; 8607 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8608 tmp_addflag=' -i_dynamic -nofor_main' ;; 8609 ifc* | ifort*) # Intel Fortran compiler 8610 tmp_addflag=' -nofor_main' ;; 8611 lf95*) # Lahey Fortran 8.1 8612 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8613 tmp_sharedflag='--shared' ;; 8614 nagfor*) # NAGFOR 5.3 8615 tmp_sharedflag='-Wl,-shared' ;; 8616 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8617 tmp_sharedflag='-qmkshrobj' 8618 tmp_addflag= ;; 8619 nvcc*) # Cuda Compiler Driver 2.2 8620 _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' 8621 _LT_TAGVAR(compiler_needs_object, $1)=yes 8622 ;; 8623 esac 8624 case `$CC -V 2>&1 | $SED 5q` in 8625 *Sun\ C*) # Sun C 5.9 8626 _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' 8627 _LT_TAGVAR(compiler_needs_object, $1)=yes 8628 tmp_sharedflag='-G' ;; 8629 *Sun\ F*) # Sun Fortran 8.3 8630 tmp_sharedflag='-G' ;; 8631 esac 8632 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8633 8634 if test yes = "$supports_anon_versioning"; then 8635 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8636 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8637 echo "local: *; };" >> $output_objdir/$libname.ver~ 8638 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8639 fi 8640 8641 case $cc_basename in 8642 tcc*) 8643 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8644 ;; 8645 xlf* | bgf* | bgxlf* | mpixlf*) 8646 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8647 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8648 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8649 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8650 if test yes = "$supports_anon_versioning"; then 8651 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8652 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8653 echo "local: *; };" >> $output_objdir/$libname.ver~ 8654 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8655 fi 8656 ;; 8657 esac 8658 else 8659 _LT_TAGVAR(ld_shlibs, $1)=no 8660 fi 8661 ;; 8662 8663 netbsd*) 8664 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8665 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8666 wlarc= 8667 else 8668 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8669 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8670 fi 8671 ;; 8672 8673 solaris*) 8674 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8675 _LT_TAGVAR(ld_shlibs, $1)=no 8676 cat <<_LT_EOF 1>&2 8677 8678*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8679*** create shared libraries on Solaris systems. Therefore, libtool 8680*** is disabling shared libraries support. We urge you to upgrade GNU 8681*** binutils to release 2.9.1 or newer. Another option is to modify 8682*** your PATH or compiler configuration so that the native linker is 8683*** used, and then restart. 8684 8685_LT_EOF 8686 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8687 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8688 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8689 else 8690 _LT_TAGVAR(ld_shlibs, $1)=no 8691 fi 8692 ;; 8693 8694 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8695 case `$LD -v 2>&1` in 8696 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8697 _LT_TAGVAR(ld_shlibs, $1)=no 8698 cat <<_LT_EOF 1>&2 8699 8700*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8701*** reliably create shared libraries on SCO systems. Therefore, libtool 8702*** is disabling shared libraries support. We urge you to upgrade GNU 8703*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8704*** your PATH or compiler configuration so that the native linker is 8705*** used, and then restart. 8706 8707_LT_EOF 8708 ;; 8709 *) 8710 # For security reasons, it is highly recommended that you always 8711 # use absolute paths for naming shared libraries, and exclude the 8712 # DT_RUNPATH tag from executables and libraries. But doing so 8713 # requires that you compile everything twice, which is a pain. 8714 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8716 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8717 _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' 8718 else 8719 _LT_TAGVAR(ld_shlibs, $1)=no 8720 fi 8721 ;; 8722 esac 8723 ;; 8724 8725 sunos4*) 8726 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8727 wlarc= 8728 _LT_TAGVAR(hardcode_direct, $1)=yes 8729 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8730 ;; 8731 8732 *) 8733 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8734 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8735 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8736 else 8737 _LT_TAGVAR(ld_shlibs, $1)=no 8738 fi 8739 ;; 8740 esac 8741 8742 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8743 runpath_var= 8744 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8745 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8746 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8747 fi 8748 else 8749 # PORTME fill in a description of your system's linker (not GNU ld) 8750 case $host_os in 8751 aix3*) 8752 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8753 _LT_TAGVAR(always_export_symbols, $1)=yes 8754 _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' 8755 # Note: this linker hardcodes the directories in LIBPATH if there 8756 # are no directories specified by -L. 8757 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8758 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8759 # Neither direct hardcoding nor static linking is supported with a 8760 # broken collect2. 8761 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8762 fi 8763 ;; 8764 8765 aix[[4-9]]*) 8766 if test ia64 = "$host_cpu"; then 8767 # On IA64, the linker does run time linking by default, so we don't 8768 # have to do anything special. 8769 aix_use_runtimelinking=no 8770 exp_sym_flag='-Bexport' 8771 no_entry_flag= 8772 else 8773 # If we're using GNU nm, then we don't want the "-C" option. 8774 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8775 # Without the "-l" option, or with the "-B" option, AIX nm treats 8776 # weak defined symbols like other global defined symbols, whereas 8777 # GNU nm marks them as "W". 8778 # While the 'weak' keyword is ignored in the Export File, we need 8779 # it in the Import File for the 'aix-soname' feature, so we have 8780 # to replace the "-B" option with "-P" for AIX nm. 8781 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8782 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8783 else 8784 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8785 fi 8786 aix_use_runtimelinking=no 8787 8788 # Test if we are trying to use run time linking or normal 8789 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8790 # have runtime linking enabled, and use it for executables. 8791 # For shared libraries, we enable/disable runtime linking 8792 # depending on the kind of the shared library created - 8793 # when "with_aix_soname,aix_use_runtimelinking" is: 8794 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8795 # "aix,yes" lib.so shared, rtl:yes, for executables 8796 # lib.a static archive 8797 # "both,no" lib.so.V(shr.o) shared, rtl:yes 8798 # lib.a(lib.so.V) shared, rtl:no, for executables 8799 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8800 # lib.a(lib.so.V) shared, rtl:no 8801 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8802 # lib.a static archive 8803 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8804 for ld_flag in $LDFLAGS; do 8805 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8806 aix_use_runtimelinking=yes 8807 break 8808 fi 8809 done 8810 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8811 # With aix-soname=svr4, we create the lib.so.V shared archives only, 8812 # so we don't have lib.a shared libs to link our executables. 8813 # We have to force runtime linking in this case. 8814 aix_use_runtimelinking=yes 8815 LDFLAGS="$LDFLAGS -Wl,-brtl" 8816 fi 8817 ;; 8818 esac 8819 8820 exp_sym_flag='-bexport' 8821 no_entry_flag='-bnoentry' 8822 fi 8823 8824 # When large executables or shared objects are built, AIX ld can 8825 # have problems creating the table of contents. If linking a library 8826 # or program results in "error TOC overflow" add -mminimal-toc to 8827 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8828 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8829 8830 _LT_TAGVAR(archive_cmds, $1)='' 8831 _LT_TAGVAR(hardcode_direct, $1)=yes 8832 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8833 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8834 _LT_TAGVAR(link_all_deplibs, $1)=yes 8835 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8836 case $with_aix_soname,$aix_use_runtimelinking in 8837 aix,*) ;; # traditional, no import file 8838 svr4,* | *,yes) # use import file 8839 # The Import File defines what to hardcode. 8840 _LT_TAGVAR(hardcode_direct, $1)=no 8841 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8842 ;; 8843 esac 8844 8845 if test yes = "$GCC"; then 8846 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8847 # We only want to do this on AIX 4.2 and lower, the check 8848 # below for broken collect2 doesn't work under 4.3+ 8849 collect2name=`$CC -print-prog-name=collect2` 8850 if test -f "$collect2name" && 8851 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8852 then 8853 # We have reworked collect2 8854 : 8855 else 8856 # We have old collect2 8857 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8858 # It fails to find uninstalled libraries when the uninstalled 8859 # path is not listed in the libpath. Setting hardcode_minus_L 8860 # to unsupported forces relinking 8861 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8862 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8863 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8864 fi 8865 ;; 8866 esac 8867 shared_flag='-shared' 8868 if test yes = "$aix_use_runtimelinking"; then 8869 shared_flag="$shared_flag "'$wl-G' 8870 fi 8871 # Need to ensure runtime linking is disabled for the traditional 8872 # shared library, or the linker may eventually find shared libraries 8873 # /with/ Import File - we do not want to mix them. 8874 shared_flag_aix='-shared' 8875 shared_flag_svr4='-shared $wl-G' 8876 else 8877 # not using gcc 8878 if test ia64 = "$host_cpu"; then 8879 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8880 # chokes on -Wl,-G. The following line is correct: 8881 shared_flag='-G' 8882 else 8883 if test yes = "$aix_use_runtimelinking"; then 8884 shared_flag='$wl-G' 8885 else 8886 shared_flag='$wl-bM:SRE' 8887 fi 8888 shared_flag_aix='$wl-bM:SRE' 8889 shared_flag_svr4='$wl-G' 8890 fi 8891 fi 8892 8893 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8894 # It seems that -bexpall does not export symbols beginning with 8895 # underscore (_), so it is better to generate a list of symbols to export. 8896 _LT_TAGVAR(always_export_symbols, $1)=yes 8897 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8898 # Warning - without using the other runtime loading flags (-brtl), 8899 # -berok will link without error, but may produce a broken library. 8900 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8901 # Determine the default libpath from the value encoded in an 8902 # empty executable. 8903 _LT_SYS_MODULE_PATH_AIX([$1]) 8904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8905 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 8906 else 8907 if test ia64 = "$host_cpu"; then 8908 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8909 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8910 _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" 8911 else 8912 # Determine the default libpath from the value encoded in an 8913 # empty executable. 8914 _LT_SYS_MODULE_PATH_AIX([$1]) 8915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8916 # Warning - without using the other run time loading flags, 8917 # -berok will link without error, but may produce a broken library. 8918 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8919 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8920 if test yes = "$with_gnu_ld"; then 8921 # We only use this code for GNU lds that support --whole-archive. 8922 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8923 else 8924 # Exported symbols can be pulled into shared objects from archives 8925 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8926 fi 8927 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8928 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8929 # -brtl affects multiple linker settings, -berok does not and is overridden later 8930 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8931 if test svr4 != "$with_aix_soname"; then 8932 # This is similar to how AIX traditionally builds its shared libraries. 8933 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 8934 fi 8935 if test aix != "$with_aix_soname"; then 8936 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 8937 else 8938 # used by -dlpreopen to get the symbols 8939 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8940 fi 8941 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8942 fi 8943 fi 8944 ;; 8945 8946 amigaos*) 8947 case $host_cpu in 8948 powerpc) 8949 # see comment about AmigaOS4 .so support 8950 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8951 _LT_TAGVAR(archive_expsym_cmds, $1)='' 8952 ;; 8953 m68k) 8954 _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)' 8955 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8956 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8957 ;; 8958 esac 8959 ;; 8960 8961 bsdi[[45]]*) 8962 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8963 ;; 8964 8965 cygwin* | mingw* | pw32* | cegcc*) 8966 # When not using gcc, we currently assume that we are using 8967 # Microsoft Visual C++ or Intel C++ Compiler. 8968 # hardcode_libdir_flag_spec is actually meaningless, as there is 8969 # no search path for DLLs. 8970 case $cc_basename in 8971 cl* | icl*) 8972 # Native MSVC or ICC 8973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8974 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8975 _LT_TAGVAR(always_export_symbols, $1)=yes 8976 _LT_TAGVAR(file_list_spec, $1)='@' 8977 # Tell ltmain to make .lib files, not .a files. 8978 libext=lib 8979 # Tell ltmain to make .dll files, not .so files. 8980 shrext_cmds=.dll 8981 # FIXME: Setting linknames here is a bad hack. 8982 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8983 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8984 cp "$export_symbols" "$output_objdir/$soname.def"; 8985 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8986 else 8987 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8988 fi~ 8989 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8990 linknames=' 8991 # The linker will not automatically build a static lib if we build a DLL. 8992 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8993 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8994 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8995 _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' 8996 # Don't use ranlib 8997 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8998 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8999 lt_tool_outputfile="@TOOL_OUTPUT@"~ 9000 case $lt_outputfile in 9001 *.exe|*.EXE) ;; 9002 *) 9003 lt_outputfile=$lt_outputfile.exe 9004 lt_tool_outputfile=$lt_tool_outputfile.exe 9005 ;; 9006 esac~ 9007 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9008 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9009 $RM "$lt_outputfile.manifest"; 9010 fi' 9011 ;; 9012 *) 9013 # Assume MSVC and ICC wrapper 9014 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9015 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9016 # Tell ltmain to make .lib files, not .a files. 9017 libext=lib 9018 # Tell ltmain to make .dll files, not .so files. 9019 shrext_cmds=.dll 9020 # FIXME: Setting linknames here is a bad hack. 9021 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9022 # The linker will automatically build a .lib file if we build a DLL. 9023 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9024 # FIXME: Should let the user specify the lib program. 9025 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9026 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9027 ;; 9028 esac 9029 ;; 9030 9031 darwin* | rhapsody*) 9032 _LT_DARWIN_LINKER_FEATURES($1) 9033 ;; 9034 9035 dgux*) 9036 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9038 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9039 ;; 9040 9041 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9042 # support. Future versions do this automatically, but an explicit c++rt0.o 9043 # does not break anything, and helps significantly (at the cost of a little 9044 # extra space). 9045 freebsd2.2*) 9046 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9047 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9048 _LT_TAGVAR(hardcode_direct, $1)=yes 9049 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9050 ;; 9051 9052 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9053 freebsd2.*) 9054 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9055 _LT_TAGVAR(hardcode_direct, $1)=yes 9056 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9057 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9058 ;; 9059 9060 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9061 freebsd* | dragonfly* | midnightbsd*) 9062 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9063 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9064 _LT_TAGVAR(hardcode_direct, $1)=yes 9065 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9066 ;; 9067 9068 hpux9*) 9069 if test yes = "$GCC"; then 9070 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9071 else 9072 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9073 fi 9074 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9075 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9076 _LT_TAGVAR(hardcode_direct, $1)=yes 9077 9078 # hardcode_minus_L: Not really in the search PATH, 9079 # but as the default location of the library. 9080 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9081 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9082 ;; 9083 9084 hpux10*) 9085 if test yes,no = "$GCC,$with_gnu_ld"; then 9086 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9087 else 9088 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9089 fi 9090 if test no = "$with_gnu_ld"; then 9091 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9092 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9093 _LT_TAGVAR(hardcode_direct, $1)=yes 9094 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9095 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9096 # hardcode_minus_L: Not really in the search PATH, 9097 # but as the default location of the library. 9098 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9099 fi 9100 ;; 9101 9102 hpux11*) 9103 if test yes,no = "$GCC,$with_gnu_ld"; then 9104 case $host_cpu in 9105 hppa*64*) 9106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9107 ;; 9108 ia64*) 9109 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9110 ;; 9111 *) 9112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9113 ;; 9114 esac 9115 else 9116 case $host_cpu in 9117 hppa*64*) 9118 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9119 ;; 9120 ia64*) 9121 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9122 ;; 9123 *) 9124 m4_if($1, [], [ 9125 # Older versions of the 11.00 compiler do not understand -b yet 9126 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9127 _LT_LINKER_OPTION([if $CC understands -b], 9128 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9129 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9130 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9131 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9132 ;; 9133 esac 9134 fi 9135 if test no = "$with_gnu_ld"; then 9136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9137 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9138 9139 case $host_cpu in 9140 hppa*64*|ia64*) 9141 _LT_TAGVAR(hardcode_direct, $1)=no 9142 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9143 ;; 9144 *) 9145 _LT_TAGVAR(hardcode_direct, $1)=yes 9146 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9147 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9148 9149 # hardcode_minus_L: Not really in the search PATH, 9150 # but as the default location of the library. 9151 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9152 ;; 9153 esac 9154 fi 9155 ;; 9156 9157 irix5* | irix6* | nonstopux*) 9158 if test yes = "$GCC"; then 9159 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9160 # Try to use the -exported_symbol ld option, if it does not 9161 # work, assume that -exports_file does not work either and 9162 # implicitly export all symbols. 9163 # This should be the same for all languages, so no per-tag cache variable. 9164 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9165 [lt_cv_irix_exported_symbol], 9166 [save_LDFLAGS=$LDFLAGS 9167 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9168 AC_LINK_IFELSE( 9169 [AC_LANG_SOURCE( 9170 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9171 [C++], [[int foo (void) { return 0; }]], 9172 [Fortran 77], [[ 9173 subroutine foo 9174 end]], 9175 [Fortran], [[ 9176 subroutine foo 9177 end]])])], 9178 [lt_cv_irix_exported_symbol=yes], 9179 [lt_cv_irix_exported_symbol=no]) 9180 LDFLAGS=$save_LDFLAGS]) 9181 if test yes = "$lt_cv_irix_exported_symbol"; then 9182 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 9183 fi 9184 else 9185 _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' 9186 _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' 9187 fi 9188 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9189 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9190 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9191 _LT_TAGVAR(inherit_rpath, $1)=yes 9192 _LT_TAGVAR(link_all_deplibs, $1)=yes 9193 ;; 9194 9195 linux*) 9196 case $cc_basename in 9197 tcc*) 9198 # Fabrice Bellard et al's Tiny C Compiler 9199 _LT_TAGVAR(ld_shlibs, $1)=yes 9200 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9201 ;; 9202 esac 9203 ;; 9204 9205 netbsd*) 9206 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9207 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9208 else 9209 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9210 fi 9211 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9212 _LT_TAGVAR(hardcode_direct, $1)=yes 9213 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9214 ;; 9215 9216 newsos6) 9217 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9218 _LT_TAGVAR(hardcode_direct, $1)=yes 9219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9220 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9221 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9222 ;; 9223 9224 *nto* | *qnx*) 9225 ;; 9226 9227 openbsd* | bitrig*) 9228 if test -f /usr/libexec/ld.so; then 9229 _LT_TAGVAR(hardcode_direct, $1)=yes 9230 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9231 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9232 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9233 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9234 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9235 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9236 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9237 else 9238 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9240 fi 9241 else 9242 _LT_TAGVAR(ld_shlibs, $1)=no 9243 fi 9244 ;; 9245 9246 os2*) 9247 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9248 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9249 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9250 shrext_cmds=.dll 9251 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9252 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9253 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9254 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9255 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9256 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9257 emximp -o $lib $output_objdir/$libname.def' 9258 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9259 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9260 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9261 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9262 prefix_cmds="$SED"~ 9263 if test EXPORTS = "`$SED 1q $export_symbols`"; then 9264 prefix_cmds="$prefix_cmds -e 1d"; 9265 fi~ 9266 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9267 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9268 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9269 emximp -o $lib $output_objdir/$libname.def' 9270 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9271 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9272 _LT_TAGVAR(file_list_spec, $1)='@' 9273 ;; 9274 9275 osf3*) 9276 if test yes = "$GCC"; then 9277 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9278 _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' 9279 else 9280 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9281 _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' 9282 fi 9283 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9284 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9285 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9286 ;; 9287 9288 osf4* | osf5*) # as osf3* with the addition of -msym flag 9289 if test yes = "$GCC"; then 9290 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9291 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9292 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9293 else 9294 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9295 _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' 9296 _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~ 9297 $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' 9298 9299 # Both c and cxx compiler support -rpath directly 9300 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9301 fi 9302 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9303 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9304 ;; 9305 9306 solaris*) 9307 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9308 if test yes = "$GCC"; then 9309 wlarc='$wl' 9310 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9311 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9312 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9313 else 9314 case `$CC -V 2>&1` in 9315 *"Compilers 5.0"*) 9316 wlarc='' 9317 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9318 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9319 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9320 ;; 9321 *) 9322 wlarc='$wl' 9323 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9324 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9325 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9326 ;; 9327 esac 9328 fi 9329 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9330 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9331 case $host_os in 9332 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9333 *) 9334 # The compiler driver will combine and reorder linker options, 9335 # but understands '-z linker_flag'. GCC discards it without '$wl', 9336 # but is careful enough not to reorder. 9337 # Supported since Solaris 2.6 (maybe 2.5.1?) 9338 if test yes = "$GCC"; then 9339 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9340 else 9341 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9342 fi 9343 ;; 9344 esac 9345 _LT_TAGVAR(link_all_deplibs, $1)=yes 9346 ;; 9347 9348 sunos4*) 9349 if test sequent = "$host_vendor"; then 9350 # Use $CC to link under sequent, because it throws in some extra .o 9351 # files that make .init and .fini sections work. 9352 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9353 else 9354 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9355 fi 9356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9357 _LT_TAGVAR(hardcode_direct, $1)=yes 9358 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9359 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9360 ;; 9361 9362 sysv4) 9363 case $host_vendor in 9364 sni) 9365 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9366 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9367 ;; 9368 siemens) 9369 ## LD is ld it makes a PLAMLIB 9370 ## CC just makes a GrossModule. 9371 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9372 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9373 _LT_TAGVAR(hardcode_direct, $1)=no 9374 ;; 9375 motorola) 9376 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9377 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9378 ;; 9379 esac 9380 runpath_var='LD_RUN_PATH' 9381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9382 ;; 9383 9384 sysv4.3*) 9385 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9386 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9387 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9388 ;; 9389 9390 sysv4*MP*) 9391 if test -d /usr/nec; then 9392 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9393 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9394 runpath_var=LD_RUN_PATH 9395 hardcode_runpath_var=yes 9396 _LT_TAGVAR(ld_shlibs, $1)=yes 9397 fi 9398 ;; 9399 9400 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9401 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9402 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9403 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9404 runpath_var='LD_RUN_PATH' 9405 9406 if test yes = "$GCC"; then 9407 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9408 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9409 else 9410 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9411 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9412 fi 9413 ;; 9414 9415 sysv5* | sco3.2v5* | sco5v6*) 9416 # Note: We CANNOT use -z defs as we might desire, because we do not 9417 # link with -lc, and that would cause any symbols used from libc to 9418 # always be unresolved, which means just about no library would 9419 # ever link correctly. If we're not using GNU ld we use -z text 9420 # though, which does catch some bad symbols but isn't as heavy-handed 9421 # as -z defs. 9422 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9423 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9424 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9425 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9426 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9427 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9428 _LT_TAGVAR(link_all_deplibs, $1)=yes 9429 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9430 runpath_var='LD_RUN_PATH' 9431 9432 if test yes = "$GCC"; then 9433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9434 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9435 else 9436 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9437 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9438 fi 9439 ;; 9440 9441 uts4*) 9442 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9443 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9444 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9445 ;; 9446 9447 *) 9448 _LT_TAGVAR(ld_shlibs, $1)=no 9449 ;; 9450 esac 9451 9452 if test sni = "$host_vendor"; then 9453 case $host in 9454 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9455 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9456 ;; 9457 esac 9458 fi 9459 fi 9460]) 9461AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9462test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9463 9464_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9465 9466_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9467_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9468_LT_DECL([], [extract_expsyms_cmds], [2], 9469 [The commands to extract the exported symbol list from a shared archive]) 9470 9471# 9472# Do we need to explicitly link libc? 9473# 9474case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9475x|xyes) 9476 # Assume -lc should be added 9477 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9478 9479 if test yes,yes = "$GCC,$enable_shared"; then 9480 case $_LT_TAGVAR(archive_cmds, $1) in 9481 *'~'*) 9482 # FIXME: we may have to deal with multi-command sequences. 9483 ;; 9484 '$CC '*) 9485 # Test whether the compiler implicitly links with -lc since on some 9486 # systems, -lgcc has to come before -lc. If gcc already passes -lc 9487 # to ld, don't add -lc before -lgcc. 9488 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9489 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9490 [$RM conftest* 9491 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9492 9493 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9494 soname=conftest 9495 lib=conftest 9496 libobjs=conftest.$ac_objext 9497 deplibs= 9498 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9499 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9500 compiler_flags=-v 9501 linker_flags=-v 9502 verstring= 9503 output_objdir=. 9504 libname=conftest 9505 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9506 _LT_TAGVAR(allow_undefined_flag, $1)= 9507 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9508 then 9509 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9510 else 9511 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9512 fi 9513 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9514 else 9515 cat conftest.err 1>&5 9516 fi 9517 $RM conftest* 9518 ]) 9519 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9520 ;; 9521 esac 9522 fi 9523 ;; 9524esac 9525 9526_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9527 [Whether or not to add -lc for building shared libraries]) 9528_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9529 [enable_shared_with_static_runtimes], [0], 9530 [Whether or not to disallow shared libs when runtime libs are static]) 9531_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9532 [Compiler flag to allow reflexive dlopens]) 9533_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9534 [Compiler flag to generate shared objects directly from archives]) 9535_LT_TAGDECL([], [compiler_needs_object], [1], 9536 [Whether the compiler copes with passing no objects directly]) 9537_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9538 [Create an old-style archive from a shared archive]) 9539_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9540 [Create a temporary old-style archive to link instead of a shared archive]) 9541_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9542_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9543_LT_TAGDECL([], [module_cmds], [2], 9544 [Commands used to build a loadable module if different from building 9545 a shared archive.]) 9546_LT_TAGDECL([], [module_expsym_cmds], [2]) 9547_LT_TAGDECL([], [with_gnu_ld], [1], 9548 [Whether we are building with GNU ld or not]) 9549_LT_TAGDECL([], [allow_undefined_flag], [1], 9550 [Flag that allows shared libraries with undefined symbols to be built]) 9551_LT_TAGDECL([], [no_undefined_flag], [1], 9552 [Flag that enforces no undefined symbols]) 9553_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9554 [Flag to hardcode $libdir into a binary during linking. 9555 This must work even if $libdir does not exist]) 9556_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9557 [Whether we need a single "-rpath" flag with a separated argument]) 9558_LT_TAGDECL([], [hardcode_direct], [0], 9559 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9560 DIR into the resulting binary]) 9561_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9562 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9563 DIR into the resulting binary and the resulting library dependency is 9564 "absolute", i.e impossible to change by setting $shlibpath_var if the 9565 library is relocated]) 9566_LT_TAGDECL([], [hardcode_minus_L], [0], 9567 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9568 into the resulting binary]) 9569_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9570 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9571 into the resulting binary]) 9572_LT_TAGDECL([], [hardcode_automatic], [0], 9573 [Set to "yes" if building a shared library automatically hardcodes DIR 9574 into the library and all subsequent libraries and executables linked 9575 against it]) 9576_LT_TAGDECL([], [inherit_rpath], [0], 9577 [Set to yes if linker adds runtime paths of dependent libraries 9578 to runtime path list]) 9579_LT_TAGDECL([], [link_all_deplibs], [0], 9580 [Whether libtool must link a program against all its dependency libraries]) 9581_LT_TAGDECL([], [always_export_symbols], [0], 9582 [Set to "yes" if exported symbols are required]) 9583_LT_TAGDECL([], [export_symbols_cmds], [2], 9584 [The commands to list exported symbols]) 9585_LT_TAGDECL([], [exclude_expsyms], [1], 9586 [Symbols that should not be listed in the preloaded symbols]) 9587_LT_TAGDECL([], [include_expsyms], [1], 9588 [Symbols that must always be exported]) 9589_LT_TAGDECL([], [prelink_cmds], [2], 9590 [Commands necessary for linking programs (against libraries) with templates]) 9591_LT_TAGDECL([], [postlink_cmds], [2], 9592 [Commands necessary for finishing linking programs]) 9593_LT_TAGDECL([], [file_list_spec], [1], 9594 [Specify filename containing input files]) 9595dnl FIXME: Not yet implemented 9596dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9597dnl [Compiler flag to generate thread safe objects]) 9598])# _LT_LINKER_SHLIBS 9599 9600 9601# _LT_LANG_C_CONFIG([TAG]) 9602# ------------------------ 9603# Ensure that the configuration variables for a C compiler are suitably 9604# defined. These variables are subsequently used by _LT_CONFIG to write 9605# the compiler configuration to 'libtool'. 9606m4_defun([_LT_LANG_C_CONFIG], 9607[m4_require([_LT_DECL_EGREP])dnl 9608lt_save_CC=$CC 9609AC_LANG_PUSH(C) 9610 9611# Source file extension for C test sources. 9612ac_ext=c 9613 9614# Object file extension for compiled C test sources. 9615objext=o 9616_LT_TAGVAR(objext, $1)=$objext 9617 9618# Code to be used in simple compile tests 9619lt_simple_compile_test_code="int some_variable = 0;" 9620 9621# Code to be used in simple link tests 9622lt_simple_link_test_code='int main(){return(0);}' 9623 9624_LT_TAG_COMPILER 9625# Save the default compiler, since it gets overwritten when the other 9626# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9627compiler_DEFAULT=$CC 9628 9629# save warnings/boilerplate of simple test code 9630_LT_COMPILER_BOILERPLATE 9631_LT_LINKER_BOILERPLATE 9632 9633if test -n "$compiler"; then 9634 _LT_COMPILER_NO_RTTI($1) 9635 _LT_COMPILER_PIC($1) 9636 _LT_COMPILER_C_O($1) 9637 _LT_COMPILER_FILE_LOCKS($1) 9638 _LT_LINKER_SHLIBS($1) 9639 _LT_SYS_DYNAMIC_LINKER($1) 9640 _LT_LINKER_HARDCODE_LIBPATH($1) 9641 LT_SYS_DLOPEN_SELF 9642 _LT_CMD_STRIPLIB 9643 9644 # Report what library types will actually be built 9645 AC_MSG_CHECKING([if libtool supports shared libraries]) 9646 AC_MSG_RESULT([$can_build_shared]) 9647 9648 AC_MSG_CHECKING([whether to build shared libraries]) 9649 test no = "$can_build_shared" && enable_shared=no 9650 9651 # On AIX, shared libraries and static libraries use the same namespace, and 9652 # are all built from PIC. 9653 case $host_os in 9654 aix3*) 9655 test yes = "$enable_shared" && enable_static=no 9656 if test -n "$RANLIB"; then 9657 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9658 postinstall_cmds='$RANLIB $lib' 9659 fi 9660 ;; 9661 9662 aix[[4-9]]*) 9663 if test ia64 != "$host_cpu"; then 9664 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9665 yes,aix,yes) ;; # shared object as lib.so file only 9666 yes,svr4,*) ;; # shared object as lib.so archive member only 9667 yes,*) enable_static=no ;; # shared object in lib.a archive as well 9668 esac 9669 fi 9670 ;; 9671 esac 9672 AC_MSG_RESULT([$enable_shared]) 9673 9674 AC_MSG_CHECKING([whether to build static libraries]) 9675 # Make sure either enable_shared or enable_static is yes. 9676 test yes = "$enable_shared" || enable_static=yes 9677 AC_MSG_RESULT([$enable_static]) 9678 9679 _LT_CONFIG($1) 9680fi 9681AC_LANG_POP 9682CC=$lt_save_CC 9683])# _LT_LANG_C_CONFIG 9684 9685 9686# _LT_LANG_CXX_CONFIG([TAG]) 9687# -------------------------- 9688# Ensure that the configuration variables for a C++ compiler are suitably 9689# defined. These variables are subsequently used by _LT_CONFIG to write 9690# the compiler configuration to 'libtool'. 9691m4_defun([_LT_LANG_CXX_CONFIG], 9692[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9693m4_require([_LT_DECL_EGREP])dnl 9694m4_require([_LT_PATH_MANIFEST_TOOL])dnl 9695if test -n "$CXX" && ( test no != "$CXX" && 9696 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9697 (test g++ != "$CXX"))); then 9698 AC_PROG_CXXCPP 9699else 9700 _lt_caught_CXX_error=yes 9701fi 9702 9703AC_LANG_PUSH(C++) 9704_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9705_LT_TAGVAR(allow_undefined_flag, $1)= 9706_LT_TAGVAR(always_export_symbols, $1)=no 9707_LT_TAGVAR(archive_expsym_cmds, $1)= 9708_LT_TAGVAR(compiler_needs_object, $1)=no 9709_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9710_LT_TAGVAR(hardcode_direct, $1)=no 9711_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9712_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9713_LT_TAGVAR(hardcode_libdir_separator, $1)= 9714_LT_TAGVAR(hardcode_minus_L, $1)=no 9715_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9716_LT_TAGVAR(hardcode_automatic, $1)=no 9717_LT_TAGVAR(inherit_rpath, $1)=no 9718_LT_TAGVAR(module_cmds, $1)= 9719_LT_TAGVAR(module_expsym_cmds, $1)= 9720_LT_TAGVAR(link_all_deplibs, $1)=unknown 9721_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9722_LT_TAGVAR(reload_flag, $1)=$reload_flag 9723_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9724_LT_TAGVAR(no_undefined_flag, $1)= 9725_LT_TAGVAR(whole_archive_flag_spec, $1)= 9726_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9727 9728# Source file extension for C++ test sources. 9729ac_ext=cpp 9730 9731# Object file extension for compiled C++ test sources. 9732objext=o 9733_LT_TAGVAR(objext, $1)=$objext 9734 9735# No sense in running all these tests if we already determined that 9736# the CXX compiler isn't working. Some variables (like enable_shared) 9737# are currently assumed to apply to all compilers on this platform, 9738# and will be corrupted by setting them based on a non-working compiler. 9739if test yes != "$_lt_caught_CXX_error"; then 9740 # Code to be used in simple compile tests 9741 lt_simple_compile_test_code="int some_variable = 0;" 9742 9743 # Code to be used in simple link tests 9744 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9745 9746 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9747 _LT_TAG_COMPILER 9748 9749 # save warnings/boilerplate of simple test code 9750 _LT_COMPILER_BOILERPLATE 9751 _LT_LINKER_BOILERPLATE 9752 9753 # Allow CC to be a program name with arguments. 9754 lt_save_CC=$CC 9755 lt_save_CFLAGS=$CFLAGS 9756 lt_save_LD=$LD 9757 lt_save_GCC=$GCC 9758 GCC=$GXX 9759 lt_save_with_gnu_ld=$with_gnu_ld 9760 lt_save_path_LD=$lt_cv_path_LD 9761 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9762 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9763 else 9764 $as_unset lt_cv_prog_gnu_ld 9765 fi 9766 if test -n "${lt_cv_path_LDCXX+set}"; then 9767 lt_cv_path_LD=$lt_cv_path_LDCXX 9768 else 9769 $as_unset lt_cv_path_LD 9770 fi 9771 test -z "${LDCXX+set}" || LD=$LDCXX 9772 CC=${CXX-"c++"} 9773 CFLAGS=$CXXFLAGS 9774 compiler=$CC 9775 _LT_TAGVAR(compiler, $1)=$CC 9776 _LT_CC_BASENAME([$compiler]) 9777 9778 if test -n "$compiler"; then 9779 # We don't want -fno-exception when compiling C++ code, so set the 9780 # no_builtin_flag separately 9781 if test yes = "$GXX"; then 9782 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9783 else 9784 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9785 fi 9786 9787 if test yes = "$GXX"; then 9788 # Set up default GNU C++ configuration 9789 9790 LT_PATH_LD 9791 9792 # Check if GNU C++ uses GNU ld as the underlying linker, since the 9793 # archiving commands below assume that GNU ld is being used. 9794 if test yes = "$with_gnu_ld"; then 9795 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9797 9798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9799 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9800 9801 # If archive_cmds runs LD, not CC, wlarc should be empty 9802 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9803 # investigate it a little bit more. (MM) 9804 wlarc='$wl' 9805 9806 # ancient GNU ld didn't support --whole-archive et. al. 9807 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9808 $GREP 'no-whole-archive' > /dev/null; then 9809 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9810 else 9811 _LT_TAGVAR(whole_archive_flag_spec, $1)= 9812 fi 9813 else 9814 with_gnu_ld=no 9815 wlarc= 9816 9817 # A generic and very simple default shared library creation 9818 # command for GNU C++ for the case where it uses the native 9819 # linker, instead of GNU ld. If possible, this setting should 9820 # overridden to take advantage of the native linker features on 9821 # the platform it is being used on. 9822 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9823 fi 9824 9825 # Commands to make compiler produce verbose output that lists 9826 # what "hidden" libraries, object files and flags are used when 9827 # linking a shared library. 9828 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9829 9830 else 9831 GXX=no 9832 with_gnu_ld=no 9833 wlarc= 9834 fi 9835 9836 # PORTME: fill in a description of your system's C++ link characteristics 9837 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9838 _LT_TAGVAR(ld_shlibs, $1)=yes 9839 case $host_os in 9840 aix3*) 9841 # FIXME: insert proper C++ library support 9842 _LT_TAGVAR(ld_shlibs, $1)=no 9843 ;; 9844 aix[[4-9]]*) 9845 if test ia64 = "$host_cpu"; then 9846 # On IA64, the linker does run time linking by default, so we don't 9847 # have to do anything special. 9848 aix_use_runtimelinking=no 9849 exp_sym_flag='-Bexport' 9850 no_entry_flag= 9851 else 9852 aix_use_runtimelinking=no 9853 9854 # Test if we are trying to use run time linking or normal 9855 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9856 # have runtime linking enabled, and use it for executables. 9857 # For shared libraries, we enable/disable runtime linking 9858 # depending on the kind of the shared library created - 9859 # when "with_aix_soname,aix_use_runtimelinking" is: 9860 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9861 # "aix,yes" lib.so shared, rtl:yes, for executables 9862 # lib.a static archive 9863 # "both,no" lib.so.V(shr.o) shared, rtl:yes 9864 # lib.a(lib.so.V) shared, rtl:no, for executables 9865 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9866 # lib.a(lib.so.V) shared, rtl:no 9867 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9868 # lib.a static archive 9869 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9870 for ld_flag in $LDFLAGS; do 9871 case $ld_flag in 9872 *-brtl*) 9873 aix_use_runtimelinking=yes 9874 break 9875 ;; 9876 esac 9877 done 9878 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9879 # With aix-soname=svr4, we create the lib.so.V shared archives only, 9880 # so we don't have lib.a shared libs to link our executables. 9881 # We have to force runtime linking in this case. 9882 aix_use_runtimelinking=yes 9883 LDFLAGS="$LDFLAGS -Wl,-brtl" 9884 fi 9885 ;; 9886 esac 9887 9888 exp_sym_flag='-bexport' 9889 no_entry_flag='-bnoentry' 9890 fi 9891 9892 # When large executables or shared objects are built, AIX ld can 9893 # have problems creating the table of contents. If linking a library 9894 # or program results in "error TOC overflow" add -mminimal-toc to 9895 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9896 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9897 9898 _LT_TAGVAR(archive_cmds, $1)='' 9899 _LT_TAGVAR(hardcode_direct, $1)=yes 9900 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9901 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9902 _LT_TAGVAR(link_all_deplibs, $1)=yes 9903 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9904 case $with_aix_soname,$aix_use_runtimelinking in 9905 aix,*) ;; # no import file 9906 svr4,* | *,yes) # use import file 9907 # The Import File defines what to hardcode. 9908 _LT_TAGVAR(hardcode_direct, $1)=no 9909 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9910 ;; 9911 esac 9912 9913 if test yes = "$GXX"; then 9914 case $host_os in aix4.[[012]]|aix4.[[012]].*) 9915 # We only want to do this on AIX 4.2 and lower, the check 9916 # below for broken collect2 doesn't work under 4.3+ 9917 collect2name=`$CC -print-prog-name=collect2` 9918 if test -f "$collect2name" && 9919 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9920 then 9921 # We have reworked collect2 9922 : 9923 else 9924 # We have old collect2 9925 _LT_TAGVAR(hardcode_direct, $1)=unsupported 9926 # It fails to find uninstalled libraries when the uninstalled 9927 # path is not listed in the libpath. Setting hardcode_minus_L 9928 # to unsupported forces relinking 9929 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9930 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9931 _LT_TAGVAR(hardcode_libdir_separator, $1)= 9932 fi 9933 esac 9934 shared_flag='-shared' 9935 if test yes = "$aix_use_runtimelinking"; then 9936 shared_flag=$shared_flag' $wl-G' 9937 fi 9938 # Need to ensure runtime linking is disabled for the traditional 9939 # shared library, or the linker may eventually find shared libraries 9940 # /with/ Import File - we do not want to mix them. 9941 shared_flag_aix='-shared' 9942 shared_flag_svr4='-shared $wl-G' 9943 else 9944 # not using gcc 9945 if test ia64 = "$host_cpu"; then 9946 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9947 # chokes on -Wl,-G. The following line is correct: 9948 shared_flag='-G' 9949 else 9950 if test yes = "$aix_use_runtimelinking"; then 9951 shared_flag='$wl-G' 9952 else 9953 shared_flag='$wl-bM:SRE' 9954 fi 9955 shared_flag_aix='$wl-bM:SRE' 9956 shared_flag_svr4='$wl-G' 9957 fi 9958 fi 9959 9960 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9961 # It seems that -bexpall does not export symbols beginning with 9962 # underscore (_), so it is better to generate a list of symbols to 9963 # export. 9964 _LT_TAGVAR(always_export_symbols, $1)=yes 9965 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9966 # Warning - without using the other runtime loading flags (-brtl), 9967 # -berok will link without error, but may produce a broken library. 9968 # The "-G" linker flag allows undefined symbols. 9969 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9970 # Determine the default libpath from the value encoded in an empty 9971 # executable. 9972 _LT_SYS_MODULE_PATH_AIX([$1]) 9973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9974 9975 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 9976 else 9977 if test ia64 = "$host_cpu"; then 9978 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9979 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9980 _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" 9981 else 9982 # Determine the default libpath from the value encoded in an 9983 # empty executable. 9984 _LT_SYS_MODULE_PATH_AIX([$1]) 9985 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9986 # Warning - without using the other run time loading flags, 9987 # -berok will link without error, but may produce a broken library. 9988 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9989 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9990 if test yes = "$with_gnu_ld"; then 9991 # We only use this code for GNU lds that support --whole-archive. 9992 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9993 else 9994 # Exported symbols can be pulled into shared objects from archives 9995 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9996 fi 9997 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9998 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9999 # -brtl affects multiple linker settings, -berok does not and is overridden later 10000 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10001 if test svr4 != "$with_aix_soname"; then 10002 # This is similar to how AIX traditionally builds its shared 10003 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10004 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 10005 fi 10006 if test aix != "$with_aix_soname"; then 10007 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 10008 else 10009 # used by -dlpreopen to get the symbols 10010 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10011 fi 10012 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10013 fi 10014 fi 10015 ;; 10016 10017 beos*) 10018 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10019 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10020 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10021 # support --undefined. This deserves some investigation. FIXME 10022 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10023 else 10024 _LT_TAGVAR(ld_shlibs, $1)=no 10025 fi 10026 ;; 10027 10028 chorus*) 10029 case $cc_basename in 10030 *) 10031 # FIXME: insert proper C++ library support 10032 _LT_TAGVAR(ld_shlibs, $1)=no 10033 ;; 10034 esac 10035 ;; 10036 10037 cygwin* | mingw* | pw32* | cegcc*) 10038 case $GXX,$cc_basename in 10039 ,cl* | no,cl* | ,icl* | no,icl*) 10040 # Native MSVC or ICC 10041 # hardcode_libdir_flag_spec is actually meaningless, as there is 10042 # no search path for DLLs. 10043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10044 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10045 _LT_TAGVAR(always_export_symbols, $1)=yes 10046 _LT_TAGVAR(file_list_spec, $1)='@' 10047 # Tell ltmain to make .lib files, not .a files. 10048 libext=lib 10049 # Tell ltmain to make .dll files, not .so files. 10050 shrext_cmds=.dll 10051 # FIXME: Setting linknames here is a bad hack. 10052 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10053 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10054 cp "$export_symbols" "$output_objdir/$soname.def"; 10055 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10056 else 10057 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10058 fi~ 10059 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10060 linknames=' 10061 # The linker will not automatically build a static lib if we build a DLL. 10062 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10063 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10064 # Don't use ranlib 10065 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10066 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10067 lt_tool_outputfile="@TOOL_OUTPUT@"~ 10068 case $lt_outputfile in 10069 *.exe|*.EXE) ;; 10070 *) 10071 lt_outputfile=$lt_outputfile.exe 10072 lt_tool_outputfile=$lt_tool_outputfile.exe 10073 ;; 10074 esac~ 10075 func_to_tool_file "$lt_outputfile"~ 10076 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10077 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10078 $RM "$lt_outputfile.manifest"; 10079 fi' 10080 ;; 10081 *) 10082 # g++ 10083 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10084 # as there is no search path for DLLs. 10085 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10086 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10087 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10088 _LT_TAGVAR(always_export_symbols, $1)=no 10089 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10090 10091 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10092 _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' 10093 # If the export-symbols file already is a .def file, use it as 10094 # is; otherwise, prepend EXPORTS... 10095 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10096 cp $export_symbols $output_objdir/$soname.def; 10097 else 10098 echo EXPORTS > $output_objdir/$soname.def; 10099 cat $export_symbols >> $output_objdir/$soname.def; 10100 fi~ 10101 $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' 10102 else 10103 _LT_TAGVAR(ld_shlibs, $1)=no 10104 fi 10105 ;; 10106 esac 10107 ;; 10108 darwin* | rhapsody*) 10109 _LT_DARWIN_LINKER_FEATURES($1) 10110 ;; 10111 10112 os2*) 10113 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10114 _LT_TAGVAR(hardcode_minus_L, $1)=yes 10115 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10116 shrext_cmds=.dll 10117 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10118 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10119 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10120 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10121 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10122 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10123 emximp -o $lib $output_objdir/$libname.def' 10124 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10125 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10126 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10127 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10128 prefix_cmds="$SED"~ 10129 if test EXPORTS = "`$SED 1q $export_symbols`"; then 10130 prefix_cmds="$prefix_cmds -e 1d"; 10131 fi~ 10132 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10133 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10134 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10135 emximp -o $lib $output_objdir/$libname.def' 10136 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10137 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10138 _LT_TAGVAR(file_list_spec, $1)='@' 10139 ;; 10140 10141 dgux*) 10142 case $cc_basename in 10143 ec++*) 10144 # FIXME: insert proper C++ library support 10145 _LT_TAGVAR(ld_shlibs, $1)=no 10146 ;; 10147 ghcx*) 10148 # Green Hills C++ Compiler 10149 # FIXME: insert proper C++ library support 10150 _LT_TAGVAR(ld_shlibs, $1)=no 10151 ;; 10152 *) 10153 # FIXME: insert proper C++ library support 10154 _LT_TAGVAR(ld_shlibs, $1)=no 10155 ;; 10156 esac 10157 ;; 10158 10159 freebsd2.*) 10160 # C++ shared libraries reported to be fairly broken before 10161 # switch to ELF 10162 _LT_TAGVAR(ld_shlibs, $1)=no 10163 ;; 10164 10165 freebsd-elf*) 10166 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10167 ;; 10168 10169 freebsd* | dragonfly* | midnightbsd*) 10170 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10171 # conventions 10172 _LT_TAGVAR(ld_shlibs, $1)=yes 10173 ;; 10174 10175 haiku*) 10176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10177 _LT_TAGVAR(link_all_deplibs, $1)=yes 10178 ;; 10179 10180 hpux9*) 10181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10182 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10183 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10184 _LT_TAGVAR(hardcode_direct, $1)=yes 10185 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10186 # but as the default 10187 # location of the library. 10188 10189 case $cc_basename in 10190 CC*) 10191 # FIXME: insert proper C++ library support 10192 _LT_TAGVAR(ld_shlibs, $1)=no 10193 ;; 10194 aCC*) 10195 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10196 # Commands to make compiler produce verbose output that lists 10197 # what "hidden" libraries, object files and flags are used when 10198 # linking a shared library. 10199 # 10200 # There doesn't appear to be a way to prevent this compiler from 10201 # explicitly linking system object files so we need to strip them 10202 # from the output so that they don't get included in the library 10203 # dependencies. 10204 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"' 10205 ;; 10206 *) 10207 if test yes = "$GXX"; then 10208 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10209 else 10210 # FIXME: insert proper C++ library support 10211 _LT_TAGVAR(ld_shlibs, $1)=no 10212 fi 10213 ;; 10214 esac 10215 ;; 10216 10217 hpux10*|hpux11*) 10218 if test no = "$with_gnu_ld"; then 10219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10220 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10221 10222 case $host_cpu in 10223 hppa*64*|ia64*) 10224 ;; 10225 *) 10226 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10227 ;; 10228 esac 10229 fi 10230 case $host_cpu in 10231 hppa*64*|ia64*) 10232 _LT_TAGVAR(hardcode_direct, $1)=no 10233 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10234 ;; 10235 *) 10236 _LT_TAGVAR(hardcode_direct, $1)=yes 10237 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10238 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10239 # but as the default 10240 # location of the library. 10241 ;; 10242 esac 10243 10244 case $cc_basename in 10245 CC*) 10246 # FIXME: insert proper C++ library support 10247 _LT_TAGVAR(ld_shlibs, $1)=no 10248 ;; 10249 aCC*) 10250 case $host_cpu in 10251 hppa*64*) 10252 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10253 ;; 10254 ia64*) 10255 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10256 ;; 10257 *) 10258 _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' 10259 ;; 10260 esac 10261 # Commands to make compiler produce verbose output that lists 10262 # what "hidden" libraries, object files and flags are used when 10263 # linking a shared library. 10264 # 10265 # There doesn't appear to be a way to prevent this compiler from 10266 # explicitly linking system object files so we need to strip them 10267 # from the output so that they don't get included in the library 10268 # dependencies. 10269 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"' 10270 ;; 10271 *) 10272 if test yes = "$GXX"; then 10273 if test no = "$with_gnu_ld"; then 10274 case $host_cpu in 10275 hppa*64*) 10276 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10277 ;; 10278 ia64*) 10279 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10280 ;; 10281 *) 10282 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10283 ;; 10284 esac 10285 fi 10286 else 10287 # FIXME: insert proper C++ library support 10288 _LT_TAGVAR(ld_shlibs, $1)=no 10289 fi 10290 ;; 10291 esac 10292 ;; 10293 10294 interix[[3-9]]*) 10295 _LT_TAGVAR(hardcode_direct, $1)=no 10296 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10297 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10298 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10299 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10300 # Instead, shared libraries are loaded at an image base (0x10000000 by 10301 # default) and relocated if they conflict, which is a slow very memory 10302 # consuming and fragmenting process. To avoid this, we pick a random, 10303 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10304 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10305 _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' 10306 _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' 10307 ;; 10308 irix5* | irix6*) 10309 case $cc_basename in 10310 CC*) 10311 # SGI C++ 10312 _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' 10313 10314 # Archives containing C++ object files must be created using 10315 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10316 # necessary to make sure instantiated templates are included 10317 # in the archive. 10318 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10319 ;; 10320 *) 10321 if test yes = "$GXX"; then 10322 if test no = "$with_gnu_ld"; then 10323 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10324 else 10325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 10326 fi 10327 fi 10328 _LT_TAGVAR(link_all_deplibs, $1)=yes 10329 ;; 10330 esac 10331 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10332 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10333 _LT_TAGVAR(inherit_rpath, $1)=yes 10334 ;; 10335 10336 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10337 case $cc_basename in 10338 KCC*) 10339 # Kuck and Associates, Inc. (KAI) C++ Compiler 10340 10341 # KCC will only create a shared library if the output file 10342 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10343 # to its proper name (with version) after linking. 10344 _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' 10345 _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' 10346 # Commands to make compiler produce verbose output that lists 10347 # what "hidden" libraries, object files and flags are used when 10348 # linking a shared library. 10349 # 10350 # There doesn't appear to be a way to prevent this compiler from 10351 # explicitly linking system object files so we need to strip them 10352 # from the output so that they don't get included in the library 10353 # dependencies. 10354 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"' 10355 10356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10357 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10358 10359 # Archives containing C++ object files must be created using 10360 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10361 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10362 ;; 10363 icpc* | ecpc* ) 10364 # Intel C++ 10365 with_gnu_ld=yes 10366 # version 8.0 and above of icpc choke on multiply defined symbols 10367 # if we add $predep_objects and $postdep_objects, however 7.1 and 10368 # earlier do not add the objects themselves. 10369 case `$CC -V 2>&1` in 10370 *"Version 7."*) 10371 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10372 _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' 10373 ;; 10374 *) # Version 8.0 or newer 10375 tmp_idyn= 10376 case $host_cpu in 10377 ia64*) tmp_idyn=' -i_dynamic';; 10378 esac 10379 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10380 _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' 10381 ;; 10382 esac 10383 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10384 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10385 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10386 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10387 ;; 10388 pgCC* | pgcpp*) 10389 # Portland Group C++ compiler 10390 case `$CC -V` in 10391 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10392 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10393 rm -rf $tpldir~ 10394 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10395 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10396 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10397 rm -rf $tpldir~ 10398 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10399 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10400 $RANLIB $oldlib' 10401 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10402 rm -rf $tpldir~ 10403 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10404 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10405 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10406 rm -rf $tpldir~ 10407 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10408 $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' 10409 ;; 10410 *) # Version 6 and above use weak symbols 10411 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10412 _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' 10413 ;; 10414 esac 10415 10416 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10417 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10418 _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' 10419 ;; 10420 cxx*) 10421 # Compaq C++ 10422 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10423 _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' 10424 10425 runpath_var=LD_RUN_PATH 10426 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10427 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10428 10429 # Commands to make compiler produce verbose output that lists 10430 # what "hidden" libraries, object files and flags are used when 10431 # linking a shared library. 10432 # 10433 # There doesn't appear to be a way to prevent this compiler from 10434 # explicitly linking system object files so we need to strip them 10435 # from the output so that they don't get included in the library 10436 # dependencies. 10437 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' 10438 ;; 10439 xl* | mpixl* | bgxl*) 10440 # IBM XL 8.0 on PPC, with GNU ld 10441 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10442 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10443 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10444 if test yes = "$supports_anon_versioning"; then 10445 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10446 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10447 echo "local: *; };" >> $output_objdir/$libname.ver~ 10448 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10449 fi 10450 ;; 10451 *) 10452 case `$CC -V 2>&1 | $SED 5q` in 10453 *Sun\ C*) 10454 # Sun C++ 5.9 10455 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10456 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10457 _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' 10458 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10459 _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' 10460 _LT_TAGVAR(compiler_needs_object, $1)=yes 10461 10462 # Not sure whether something based on 10463 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10464 # would be better. 10465 output_verbose_link_cmd='func_echo_all' 10466 10467 # Archives containing C++ object files must be created using 10468 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10469 # necessary to make sure instantiated templates are included 10470 # in the archive. 10471 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10472 ;; 10473 esac 10474 ;; 10475 esac 10476 ;; 10477 10478 lynxos*) 10479 # FIXME: insert proper C++ library support 10480 _LT_TAGVAR(ld_shlibs, $1)=no 10481 ;; 10482 10483 m88k*) 10484 # FIXME: insert proper C++ library support 10485 _LT_TAGVAR(ld_shlibs, $1)=no 10486 ;; 10487 10488 mvs*) 10489 case $cc_basename in 10490 cxx*) 10491 # FIXME: insert proper C++ library support 10492 _LT_TAGVAR(ld_shlibs, $1)=no 10493 ;; 10494 *) 10495 # FIXME: insert proper C++ library support 10496 _LT_TAGVAR(ld_shlibs, $1)=no 10497 ;; 10498 esac 10499 ;; 10500 10501 netbsd*) 10502 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10503 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10504 wlarc= 10505 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10506 _LT_TAGVAR(hardcode_direct, $1)=yes 10507 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10508 fi 10509 # Workaround some broken pre-1.5 toolchains 10510 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10511 ;; 10512 10513 *nto* | *qnx*) 10514 _LT_TAGVAR(ld_shlibs, $1)=yes 10515 ;; 10516 10517 openbsd* | bitrig*) 10518 if test -f /usr/libexec/ld.so; then 10519 _LT_TAGVAR(hardcode_direct, $1)=yes 10520 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10521 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10522 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10524 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10525 _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' 10526 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10527 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10528 fi 10529 output_verbose_link_cmd=func_echo_all 10530 else 10531 _LT_TAGVAR(ld_shlibs, $1)=no 10532 fi 10533 ;; 10534 10535 osf3* | osf4* | osf5*) 10536 case $cc_basename in 10537 KCC*) 10538 # Kuck and Associates, Inc. (KAI) C++ Compiler 10539 10540 # KCC will only create a shared library if the output file 10541 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10542 # to its proper name (with version) after linking. 10543 _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' 10544 10545 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10546 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10547 10548 # Archives containing C++ object files must be created using 10549 # the KAI C++ compiler. 10550 case $host in 10551 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10552 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10553 esac 10554 ;; 10555 RCC*) 10556 # Rational C++ 2.4.1 10557 # FIXME: insert proper C++ library support 10558 _LT_TAGVAR(ld_shlibs, $1)=no 10559 ;; 10560 cxx*) 10561 case $host in 10562 osf3*) 10563 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10564 _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' 10565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10566 ;; 10567 *) 10568 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10569 _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' 10570 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10571 echo "-hidden">> $lib.exp~ 10572 $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~ 10573 $RM $lib.exp' 10574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10575 ;; 10576 esac 10577 10578 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10579 10580 # Commands to make compiler produce verbose output that lists 10581 # what "hidden" libraries, object files and flags are used when 10582 # linking a shared library. 10583 # 10584 # There doesn't appear to be a way to prevent this compiler from 10585 # explicitly linking system object files so we need to strip them 10586 # from the output so that they don't get included in the library 10587 # dependencies. 10588 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"' 10589 ;; 10590 *) 10591 if test yes,no = "$GXX,$with_gnu_ld"; then 10592 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10593 case $host in 10594 osf3*) 10595 _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' 10596 ;; 10597 *) 10598 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10599 ;; 10600 esac 10601 10602 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10603 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10604 10605 # Commands to make compiler produce verbose output that lists 10606 # what "hidden" libraries, object files and flags are used when 10607 # linking a shared library. 10608 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10609 10610 else 10611 # FIXME: insert proper C++ library support 10612 _LT_TAGVAR(ld_shlibs, $1)=no 10613 fi 10614 ;; 10615 esac 10616 ;; 10617 10618 psos*) 10619 # FIXME: insert proper C++ library support 10620 _LT_TAGVAR(ld_shlibs, $1)=no 10621 ;; 10622 10623 sunos4*) 10624 case $cc_basename in 10625 CC*) 10626 # Sun C++ 4.x 10627 # FIXME: insert proper C++ library support 10628 _LT_TAGVAR(ld_shlibs, $1)=no 10629 ;; 10630 lcc*) 10631 # Lucid 10632 # FIXME: insert proper C++ library support 10633 _LT_TAGVAR(ld_shlibs, $1)=no 10634 ;; 10635 *) 10636 # FIXME: insert proper C++ library support 10637 _LT_TAGVAR(ld_shlibs, $1)=no 10638 ;; 10639 esac 10640 ;; 10641 10642 solaris*) 10643 case $cc_basename in 10644 CC* | sunCC*) 10645 # Sun C++ 4.2, 5.x and Centerline C++ 10646 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10647 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10648 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10649 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10650 $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' 10651 10652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10653 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10654 case $host_os in 10655 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10656 *) 10657 # The compiler driver will combine and reorder linker options, 10658 # but understands '-z linker_flag'. 10659 # Supported since Solaris 2.6 (maybe 2.5.1?) 10660 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10661 ;; 10662 esac 10663 _LT_TAGVAR(link_all_deplibs, $1)=yes 10664 10665 output_verbose_link_cmd='func_echo_all' 10666 10667 # Archives containing C++ object files must be created using 10668 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10669 # necessary to make sure instantiated templates are included 10670 # in the archive. 10671 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10672 ;; 10673 gcx*) 10674 # Green Hills C++ Compiler 10675 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10676 10677 # The C++ compiler must be used to create the archive. 10678 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10679 ;; 10680 *) 10681 # GNU C++ compiler with Solaris linker 10682 if test yes,no = "$GXX,$with_gnu_ld"; then 10683 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10684 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10685 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10686 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10687 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 10688 10689 # Commands to make compiler produce verbose output that lists 10690 # what "hidden" libraries, object files and flags are used when 10691 # linking a shared library. 10692 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10693 else 10694 # g++ 2.7 appears to require '-G' NOT '-shared' on this 10695 # platform. 10696 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10697 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10698 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 10699 10700 # Commands to make compiler produce verbose output that lists 10701 # what "hidden" libraries, object files and flags are used when 10702 # linking a shared library. 10703 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10704 fi 10705 10706 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10707 case $host_os in 10708 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10709 *) 10710 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10711 ;; 10712 esac 10713 fi 10714 ;; 10715 esac 10716 ;; 10717 10718 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10719 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10720 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10721 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10722 runpath_var='LD_RUN_PATH' 10723 10724 case $cc_basename in 10725 CC*) 10726 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10727 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10728 ;; 10729 *) 10730 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10731 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10732 ;; 10733 esac 10734 ;; 10735 10736 sysv5* | sco3.2v5* | sco5v6*) 10737 # Note: We CANNOT use -z defs as we might desire, because we do not 10738 # link with -lc, and that would cause any symbols used from libc to 10739 # always be unresolved, which means just about no library would 10740 # ever link correctly. If we're not using GNU ld we use -z text 10741 # though, which does catch some bad symbols but isn't as heavy-handed 10742 # as -z defs. 10743 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10744 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10745 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10746 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10747 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10748 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10749 _LT_TAGVAR(link_all_deplibs, $1)=yes 10750 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10751 runpath_var='LD_RUN_PATH' 10752 10753 case $cc_basename in 10754 CC*) 10755 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10756 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10757 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10758 '"$_LT_TAGVAR(old_archive_cmds, $1)" 10759 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10760 '"$_LT_TAGVAR(reload_cmds, $1)" 10761 ;; 10762 *) 10763 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10764 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10765 ;; 10766 esac 10767 ;; 10768 10769 tandem*) 10770 case $cc_basename in 10771 NCC*) 10772 # NonStop-UX NCC 3.20 10773 # FIXME: insert proper C++ library support 10774 _LT_TAGVAR(ld_shlibs, $1)=no 10775 ;; 10776 *) 10777 # FIXME: insert proper C++ library support 10778 _LT_TAGVAR(ld_shlibs, $1)=no 10779 ;; 10780 esac 10781 ;; 10782 10783 vxworks*) 10784 # FIXME: insert proper C++ library support 10785 _LT_TAGVAR(ld_shlibs, $1)=no 10786 ;; 10787 10788 *) 10789 # FIXME: insert proper C++ library support 10790 _LT_TAGVAR(ld_shlibs, $1)=no 10791 ;; 10792 esac 10793 10794 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10795 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10796 10797 _LT_TAGVAR(GCC, $1)=$GXX 10798 _LT_TAGVAR(LD, $1)=$LD 10799 10800 ## CAVEAT EMPTOR: 10801 ## There is no encapsulation within the following macros, do not change 10802 ## the running order or otherwise move them around unless you know exactly 10803 ## what you are doing... 10804 _LT_SYS_HIDDEN_LIBDEPS($1) 10805 _LT_COMPILER_PIC($1) 10806 _LT_COMPILER_C_O($1) 10807 _LT_COMPILER_FILE_LOCKS($1) 10808 _LT_LINKER_SHLIBS($1) 10809 _LT_SYS_DYNAMIC_LINKER($1) 10810 _LT_LINKER_HARDCODE_LIBPATH($1) 10811 10812 _LT_CONFIG($1) 10813 fi # test -n "$compiler" 10814 10815 CC=$lt_save_CC 10816 CFLAGS=$lt_save_CFLAGS 10817 LDCXX=$LD 10818 LD=$lt_save_LD 10819 GCC=$lt_save_GCC 10820 with_gnu_ld=$lt_save_with_gnu_ld 10821 lt_cv_path_LDCXX=$lt_cv_path_LD 10822 lt_cv_path_LD=$lt_save_path_LD 10823 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10824 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10825fi # test yes != "$_lt_caught_CXX_error" 10826 10827AC_LANG_POP 10828])# _LT_LANG_CXX_CONFIG 10829 10830 10831# _LT_FUNC_STRIPNAME_CNF 10832# ---------------------- 10833# func_stripname_cnf prefix suffix name 10834# strip PREFIX and SUFFIX off of NAME. 10835# PREFIX and SUFFIX must not contain globbing or regex special 10836# characters, hashes, percent signs, but SUFFIX may contain a leading 10837# dot (in which case that matches only a dot). 10838# 10839# This function is identical to the (non-XSI) version of func_stripname, 10840# except this one can be used by m4 code that may be executed by configure, 10841# rather than the libtool script. 10842m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10843AC_REQUIRE([_LT_DECL_SED]) 10844AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10845func_stripname_cnf () 10846{ 10847 case @S|@2 in 10848 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10849 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10850 esac 10851} # func_stripname_cnf 10852])# _LT_FUNC_STRIPNAME_CNF 10853 10854 10855# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10856# --------------------------------- 10857# Figure out "hidden" library dependencies from verbose 10858# compiler output when linking a shared library. 10859# Parse the compiler output and extract the necessary 10860# objects, libraries and library flags. 10861m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10862[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10863AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10864# Dependencies to place before and after the object being linked: 10865_LT_TAGVAR(predep_objects, $1)= 10866_LT_TAGVAR(postdep_objects, $1)= 10867_LT_TAGVAR(predeps, $1)= 10868_LT_TAGVAR(postdeps, $1)= 10869_LT_TAGVAR(compiler_lib_search_path, $1)= 10870 10871dnl we can't use the lt_simple_compile_test_code here, 10872dnl because it contains code intended for an executable, 10873dnl not a library. It's possible we should let each 10874dnl tag define a new lt_????_link_test_code variable, 10875dnl but it's only used here... 10876m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10877int a; 10878void foo (void) { a = 0; } 10879_LT_EOF 10880], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10881class Foo 10882{ 10883public: 10884 Foo (void) { a = 0; } 10885private: 10886 int a; 10887}; 10888_LT_EOF 10889], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10890 subroutine foo 10891 implicit none 10892 integer*4 a 10893 a=0 10894 return 10895 end 10896_LT_EOF 10897], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10898 subroutine foo 10899 implicit none 10900 integer a 10901 a=0 10902 return 10903 end 10904_LT_EOF 10905], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10906public class foo { 10907 private int a; 10908 public void bar (void) { 10909 a = 0; 10910 } 10911}; 10912_LT_EOF 10913], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10914package foo 10915func foo() { 10916} 10917_LT_EOF 10918]) 10919 10920_lt_libdeps_save_CFLAGS=$CFLAGS 10921case "$CC $CFLAGS " in #( 10922*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10923*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10924*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10925esac 10926 10927dnl Parse the compiler output and extract the necessary 10928dnl objects, libraries and library flags. 10929if AC_TRY_EVAL(ac_compile); then 10930 # Parse the compiler output and extract the necessary 10931 # objects, libraries and library flags. 10932 10933 # Sentinel used to keep track of whether or not we are before 10934 # the conftest object file. 10935 pre_test_object_deps_done=no 10936 10937 for p in `eval "$output_verbose_link_cmd"`; do 10938 case $prev$p in 10939 10940 -L* | -R* | -l*) 10941 # Some compilers place space between "-{L,R}" and the path. 10942 # Remove the space. 10943 if test x-L = "$p" || 10944 test x-R = "$p"; then 10945 prev=$p 10946 continue 10947 fi 10948 10949 # Expand the sysroot to ease extracting the directories later. 10950 if test -z "$prev"; then 10951 case $p in 10952 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10953 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10954 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10955 esac 10956 fi 10957 case $p in 10958 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10959 esac 10960 if test no = "$pre_test_object_deps_done"; then 10961 case $prev in 10962 -L | -R) 10963 # Internal compiler library paths should come after those 10964 # provided the user. The postdeps already come after the 10965 # user supplied libs so there is no need to process them. 10966 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10967 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10968 else 10969 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10970 fi 10971 ;; 10972 # The "-l" case would never come before the object being 10973 # linked, so don't bother handling this case. 10974 esac 10975 else 10976 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10977 _LT_TAGVAR(postdeps, $1)=$prev$p 10978 else 10979 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 10980 fi 10981 fi 10982 prev= 10983 ;; 10984 10985 *.lto.$objext) ;; # Ignore GCC LTO objects 10986 *.$objext) 10987 # This assumes that the test object file only shows up 10988 # once in the compiler output. 10989 if test "$p" = "conftest.$objext"; then 10990 pre_test_object_deps_done=yes 10991 continue 10992 fi 10993 10994 if test no = "$pre_test_object_deps_done"; then 10995 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 10996 _LT_TAGVAR(predep_objects, $1)=$p 10997 else 10998 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 10999 fi 11000 else 11001 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11002 _LT_TAGVAR(postdep_objects, $1)=$p 11003 else 11004 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11005 fi 11006 fi 11007 ;; 11008 11009 *) ;; # Ignore the rest. 11010 11011 esac 11012 done 11013 11014 # Clean up. 11015 rm -f a.out a.exe 11016else 11017 echo "libtool.m4: error: problem compiling $1 test program" 11018fi 11019 11020$RM -f confest.$objext 11021CFLAGS=$_lt_libdeps_save_CFLAGS 11022 11023# PORTME: override above test on systems where it is broken 11024m4_if([$1], [CXX], 11025[case $host_os in 11026interix[[3-9]]*) 11027 # Interix 3.5 installs completely hosed .la files for C++, so rather than 11028 # hack all around it, let's just trust "g++" to DTRT. 11029 _LT_TAGVAR(predep_objects,$1)= 11030 _LT_TAGVAR(postdep_objects,$1)= 11031 _LT_TAGVAR(postdeps,$1)= 11032 ;; 11033esac 11034]) 11035 11036case " $_LT_TAGVAR(postdeps, $1) " in 11037*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11038esac 11039 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11040if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11041 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11042fi 11043_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11044 [The directories searched by this compiler when creating a shared library]) 11045_LT_TAGDECL([], [predep_objects], [1], 11046 [Dependencies to place before and after the objects being linked to 11047 create a shared library]) 11048_LT_TAGDECL([], [postdep_objects], [1]) 11049_LT_TAGDECL([], [predeps], [1]) 11050_LT_TAGDECL([], [postdeps], [1]) 11051_LT_TAGDECL([], [compiler_lib_search_path], [1], 11052 [The library search path used internally by the compiler when linking 11053 a shared library]) 11054])# _LT_SYS_HIDDEN_LIBDEPS 11055 11056 11057# _LT_LANG_F77_CONFIG([TAG]) 11058# -------------------------- 11059# Ensure that the configuration variables for a Fortran 77 compiler are 11060# suitably defined. These variables are subsequently used by _LT_CONFIG 11061# to write the compiler configuration to 'libtool'. 11062m4_defun([_LT_LANG_F77_CONFIG], 11063[AC_LANG_PUSH(Fortran 77) 11064if test -z "$F77" || test no = "$F77"; then 11065 _lt_disable_F77=yes 11066fi 11067 11068_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11069_LT_TAGVAR(allow_undefined_flag, $1)= 11070_LT_TAGVAR(always_export_symbols, $1)=no 11071_LT_TAGVAR(archive_expsym_cmds, $1)= 11072_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11073_LT_TAGVAR(hardcode_direct, $1)=no 11074_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11075_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11076_LT_TAGVAR(hardcode_libdir_separator, $1)= 11077_LT_TAGVAR(hardcode_minus_L, $1)=no 11078_LT_TAGVAR(hardcode_automatic, $1)=no 11079_LT_TAGVAR(inherit_rpath, $1)=no 11080_LT_TAGVAR(module_cmds, $1)= 11081_LT_TAGVAR(module_expsym_cmds, $1)= 11082_LT_TAGVAR(link_all_deplibs, $1)=unknown 11083_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11084_LT_TAGVAR(reload_flag, $1)=$reload_flag 11085_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11086_LT_TAGVAR(no_undefined_flag, $1)= 11087_LT_TAGVAR(whole_archive_flag_spec, $1)= 11088_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11089 11090# Source file extension for f77 test sources. 11091ac_ext=f 11092 11093# Object file extension for compiled f77 test sources. 11094objext=o 11095_LT_TAGVAR(objext, $1)=$objext 11096 11097# No sense in running all these tests if we already determined that 11098# the F77 compiler isn't working. Some variables (like enable_shared) 11099# are currently assumed to apply to all compilers on this platform, 11100# and will be corrupted by setting them based on a non-working compiler. 11101if test yes != "$_lt_disable_F77"; then 11102 # Code to be used in simple compile tests 11103 lt_simple_compile_test_code="\ 11104 subroutine t 11105 return 11106 end 11107" 11108 11109 # Code to be used in simple link tests 11110 lt_simple_link_test_code="\ 11111 program t 11112 end 11113" 11114 11115 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11116 _LT_TAG_COMPILER 11117 11118 # save warnings/boilerplate of simple test code 11119 _LT_COMPILER_BOILERPLATE 11120 _LT_LINKER_BOILERPLATE 11121 11122 # Allow CC to be a program name with arguments. 11123 lt_save_CC=$CC 11124 lt_save_GCC=$GCC 11125 lt_save_CFLAGS=$CFLAGS 11126 CC=${F77-"f77"} 11127 CFLAGS=$FFLAGS 11128 compiler=$CC 11129 _LT_TAGVAR(compiler, $1)=$CC 11130 _LT_CC_BASENAME([$compiler]) 11131 GCC=$G77 11132 if test -n "$compiler"; then 11133 AC_MSG_CHECKING([if libtool supports shared libraries]) 11134 AC_MSG_RESULT([$can_build_shared]) 11135 11136 AC_MSG_CHECKING([whether to build shared libraries]) 11137 test no = "$can_build_shared" && enable_shared=no 11138 11139 # On AIX, shared libraries and static libraries use the same namespace, and 11140 # are all built from PIC. 11141 case $host_os in 11142 aix3*) 11143 test yes = "$enable_shared" && enable_static=no 11144 if test -n "$RANLIB"; then 11145 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11146 postinstall_cmds='$RANLIB $lib' 11147 fi 11148 ;; 11149 aix[[4-9]]*) 11150 if test ia64 != "$host_cpu"; then 11151 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11152 yes,aix,yes) ;; # shared object as lib.so file only 11153 yes,svr4,*) ;; # shared object as lib.so archive member only 11154 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11155 esac 11156 fi 11157 ;; 11158 esac 11159 AC_MSG_RESULT([$enable_shared]) 11160 11161 AC_MSG_CHECKING([whether to build static libraries]) 11162 # Make sure either enable_shared or enable_static is yes. 11163 test yes = "$enable_shared" || enable_static=yes 11164 AC_MSG_RESULT([$enable_static]) 11165 11166 _LT_TAGVAR(GCC, $1)=$G77 11167 _LT_TAGVAR(LD, $1)=$LD 11168 11169 ## CAVEAT EMPTOR: 11170 ## There is no encapsulation within the following macros, do not change 11171 ## the running order or otherwise move them around unless you know exactly 11172 ## what you are doing... 11173 _LT_COMPILER_PIC($1) 11174 _LT_COMPILER_C_O($1) 11175 _LT_COMPILER_FILE_LOCKS($1) 11176 _LT_LINKER_SHLIBS($1) 11177 _LT_SYS_DYNAMIC_LINKER($1) 11178 _LT_LINKER_HARDCODE_LIBPATH($1) 11179 11180 _LT_CONFIG($1) 11181 fi # test -n "$compiler" 11182 11183 GCC=$lt_save_GCC 11184 CC=$lt_save_CC 11185 CFLAGS=$lt_save_CFLAGS 11186fi # test yes != "$_lt_disable_F77" 11187 11188AC_LANG_POP 11189])# _LT_LANG_F77_CONFIG 11190 11191 11192# _LT_LANG_FC_CONFIG([TAG]) 11193# ------------------------- 11194# Ensure that the configuration variables for a Fortran compiler are 11195# suitably defined. These variables are subsequently used by _LT_CONFIG 11196# to write the compiler configuration to 'libtool'. 11197m4_defun([_LT_LANG_FC_CONFIG], 11198[AC_LANG_PUSH(Fortran) 11199 11200if test -z "$FC" || test no = "$FC"; then 11201 _lt_disable_FC=yes 11202fi 11203 11204_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11205_LT_TAGVAR(allow_undefined_flag, $1)= 11206_LT_TAGVAR(always_export_symbols, $1)=no 11207_LT_TAGVAR(archive_expsym_cmds, $1)= 11208_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11209_LT_TAGVAR(hardcode_direct, $1)=no 11210_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11211_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11212_LT_TAGVAR(hardcode_libdir_separator, $1)= 11213_LT_TAGVAR(hardcode_minus_L, $1)=no 11214_LT_TAGVAR(hardcode_automatic, $1)=no 11215_LT_TAGVAR(inherit_rpath, $1)=no 11216_LT_TAGVAR(module_cmds, $1)= 11217_LT_TAGVAR(module_expsym_cmds, $1)= 11218_LT_TAGVAR(link_all_deplibs, $1)=unknown 11219_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11220_LT_TAGVAR(reload_flag, $1)=$reload_flag 11221_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11222_LT_TAGVAR(no_undefined_flag, $1)= 11223_LT_TAGVAR(whole_archive_flag_spec, $1)= 11224_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11225 11226# Source file extension for fc test sources. 11227ac_ext=${ac_fc_srcext-f} 11228 11229# Object file extension for compiled fc test sources. 11230objext=o 11231_LT_TAGVAR(objext, $1)=$objext 11232 11233# No sense in running all these tests if we already determined that 11234# the FC compiler isn't working. Some variables (like enable_shared) 11235# are currently assumed to apply to all compilers on this platform, 11236# and will be corrupted by setting them based on a non-working compiler. 11237if test yes != "$_lt_disable_FC"; then 11238 # Code to be used in simple compile tests 11239 lt_simple_compile_test_code="\ 11240 subroutine t 11241 return 11242 end 11243" 11244 11245 # Code to be used in simple link tests 11246 lt_simple_link_test_code="\ 11247 program t 11248 end 11249" 11250 11251 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11252 _LT_TAG_COMPILER 11253 11254 # save warnings/boilerplate of simple test code 11255 _LT_COMPILER_BOILERPLATE 11256 _LT_LINKER_BOILERPLATE 11257 11258 # Allow CC to be a program name with arguments. 11259 lt_save_CC=$CC 11260 lt_save_GCC=$GCC 11261 lt_save_CFLAGS=$CFLAGS 11262 CC=${FC-"f95"} 11263 CFLAGS=$FCFLAGS 11264 compiler=$CC 11265 GCC=$ac_cv_fc_compiler_gnu 11266 11267 _LT_TAGVAR(compiler, $1)=$CC 11268 _LT_CC_BASENAME([$compiler]) 11269 11270 if test -n "$compiler"; then 11271 AC_MSG_CHECKING([if libtool supports shared libraries]) 11272 AC_MSG_RESULT([$can_build_shared]) 11273 11274 AC_MSG_CHECKING([whether to build shared libraries]) 11275 test no = "$can_build_shared" && enable_shared=no 11276 11277 # On AIX, shared libraries and static libraries use the same namespace, and 11278 # are all built from PIC. 11279 case $host_os in 11280 aix3*) 11281 test yes = "$enable_shared" && enable_static=no 11282 if test -n "$RANLIB"; then 11283 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11284 postinstall_cmds='$RANLIB $lib' 11285 fi 11286 ;; 11287 aix[[4-9]]*) 11288 if test ia64 != "$host_cpu"; then 11289 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11290 yes,aix,yes) ;; # shared object as lib.so file only 11291 yes,svr4,*) ;; # shared object as lib.so archive member only 11292 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11293 esac 11294 fi 11295 ;; 11296 esac 11297 AC_MSG_RESULT([$enable_shared]) 11298 11299 AC_MSG_CHECKING([whether to build static libraries]) 11300 # Make sure either enable_shared or enable_static is yes. 11301 test yes = "$enable_shared" || enable_static=yes 11302 AC_MSG_RESULT([$enable_static]) 11303 11304 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11305 _LT_TAGVAR(LD, $1)=$LD 11306 11307 ## CAVEAT EMPTOR: 11308 ## There is no encapsulation within the following macros, do not change 11309 ## the running order or otherwise move them around unless you know exactly 11310 ## what you are doing... 11311 _LT_SYS_HIDDEN_LIBDEPS($1) 11312 _LT_COMPILER_PIC($1) 11313 _LT_COMPILER_C_O($1) 11314 _LT_COMPILER_FILE_LOCKS($1) 11315 _LT_LINKER_SHLIBS($1) 11316 _LT_SYS_DYNAMIC_LINKER($1) 11317 _LT_LINKER_HARDCODE_LIBPATH($1) 11318 11319 _LT_CONFIG($1) 11320 fi # test -n "$compiler" 11321 11322 GCC=$lt_save_GCC 11323 CC=$lt_save_CC 11324 CFLAGS=$lt_save_CFLAGS 11325fi # test yes != "$_lt_disable_FC" 11326 11327AC_LANG_POP 11328])# _LT_LANG_FC_CONFIG 11329 11330 11331# _LT_LANG_GCJ_CONFIG([TAG]) 11332# -------------------------- 11333# Ensure that the configuration variables for the GNU Java Compiler compiler 11334# are suitably defined. These variables are subsequently used by _LT_CONFIG 11335# to write the compiler configuration to 'libtool'. 11336m4_defun([_LT_LANG_GCJ_CONFIG], 11337[AC_REQUIRE([LT_PROG_GCJ])dnl 11338AC_LANG_SAVE 11339 11340# Source file extension for Java test sources. 11341ac_ext=java 11342 11343# Object file extension for compiled Java test sources. 11344objext=o 11345_LT_TAGVAR(objext, $1)=$objext 11346 11347# Code to be used in simple compile tests 11348lt_simple_compile_test_code="class foo {}" 11349 11350# Code to be used in simple link tests 11351lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11352 11353# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11354_LT_TAG_COMPILER 11355 11356# save warnings/boilerplate of simple test code 11357_LT_COMPILER_BOILERPLATE 11358_LT_LINKER_BOILERPLATE 11359 11360# Allow CC to be a program name with arguments. 11361lt_save_CC=$CC 11362lt_save_CFLAGS=$CFLAGS 11363lt_save_GCC=$GCC 11364GCC=yes 11365CC=${GCJ-"gcj"} 11366CFLAGS=$GCJFLAGS 11367compiler=$CC 11368_LT_TAGVAR(compiler, $1)=$CC 11369_LT_TAGVAR(LD, $1)=$LD 11370_LT_CC_BASENAME([$compiler]) 11371 11372# GCJ did not exist at the time GCC didn't implicitly link libc in. 11373_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11374 11375_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11376_LT_TAGVAR(reload_flag, $1)=$reload_flag 11377_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11378 11379if test -n "$compiler"; then 11380 _LT_COMPILER_NO_RTTI($1) 11381 _LT_COMPILER_PIC($1) 11382 _LT_COMPILER_C_O($1) 11383 _LT_COMPILER_FILE_LOCKS($1) 11384 _LT_LINKER_SHLIBS($1) 11385 _LT_LINKER_HARDCODE_LIBPATH($1) 11386 11387 _LT_CONFIG($1) 11388fi 11389 11390AC_LANG_RESTORE 11391 11392GCC=$lt_save_GCC 11393CC=$lt_save_CC 11394CFLAGS=$lt_save_CFLAGS 11395])# _LT_LANG_GCJ_CONFIG 11396 11397 11398# _LT_LANG_GO_CONFIG([TAG]) 11399# -------------------------- 11400# Ensure that the configuration variables for the GNU Go compiler 11401# are suitably defined. These variables are subsequently used by _LT_CONFIG 11402# to write the compiler configuration to 'libtool'. 11403m4_defun([_LT_LANG_GO_CONFIG], 11404[AC_REQUIRE([LT_PROG_GO])dnl 11405AC_LANG_SAVE 11406 11407# Source file extension for Go test sources. 11408ac_ext=go 11409 11410# Object file extension for compiled Go test sources. 11411objext=o 11412_LT_TAGVAR(objext, $1)=$objext 11413 11414# Code to be used in simple compile tests 11415lt_simple_compile_test_code="package main; func main() { }" 11416 11417# Code to be used in simple link tests 11418lt_simple_link_test_code='package main; func main() { }' 11419 11420# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11421_LT_TAG_COMPILER 11422 11423# save warnings/boilerplate of simple test code 11424_LT_COMPILER_BOILERPLATE 11425_LT_LINKER_BOILERPLATE 11426 11427# Allow CC to be a program name with arguments. 11428lt_save_CC=$CC 11429lt_save_CFLAGS=$CFLAGS 11430lt_save_GCC=$GCC 11431GCC=yes 11432CC=${GOC-"gccgo"} 11433CFLAGS=$GOFLAGS 11434compiler=$CC 11435_LT_TAGVAR(compiler, $1)=$CC 11436_LT_TAGVAR(LD, $1)=$LD 11437_LT_CC_BASENAME([$compiler]) 11438 11439# Go did not exist at the time GCC didn't implicitly link libc in. 11440_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11441 11442_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11443_LT_TAGVAR(reload_flag, $1)=$reload_flag 11444_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11445 11446if test -n "$compiler"; then 11447 _LT_COMPILER_NO_RTTI($1) 11448 _LT_COMPILER_PIC($1) 11449 _LT_COMPILER_C_O($1) 11450 _LT_COMPILER_FILE_LOCKS($1) 11451 _LT_LINKER_SHLIBS($1) 11452 _LT_LINKER_HARDCODE_LIBPATH($1) 11453 11454 _LT_CONFIG($1) 11455fi 11456 11457AC_LANG_RESTORE 11458 11459GCC=$lt_save_GCC 11460CC=$lt_save_CC 11461CFLAGS=$lt_save_CFLAGS 11462])# _LT_LANG_GO_CONFIG 11463 11464 11465# _LT_LANG_RC_CONFIG([TAG]) 11466# ------------------------- 11467# Ensure that the configuration variables for the Windows resource compiler 11468# are suitably defined. These variables are subsequently used by _LT_CONFIG 11469# to write the compiler configuration to 'libtool'. 11470m4_defun([_LT_LANG_RC_CONFIG], 11471[AC_REQUIRE([LT_PROG_RC])dnl 11472AC_LANG_SAVE 11473 11474# Source file extension for RC test sources. 11475ac_ext=rc 11476 11477# Object file extension for compiled RC test sources. 11478objext=o 11479_LT_TAGVAR(objext, $1)=$objext 11480 11481# Code to be used in simple compile tests 11482lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11483 11484# Code to be used in simple link tests 11485lt_simple_link_test_code=$lt_simple_compile_test_code 11486 11487# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11488_LT_TAG_COMPILER 11489 11490# save warnings/boilerplate of simple test code 11491_LT_COMPILER_BOILERPLATE 11492_LT_LINKER_BOILERPLATE 11493 11494# Allow CC to be a program name with arguments. 11495lt_save_CC=$CC 11496lt_save_CFLAGS=$CFLAGS 11497lt_save_GCC=$GCC 11498GCC= 11499CC=${RC-"windres"} 11500CFLAGS= 11501compiler=$CC 11502_LT_TAGVAR(compiler, $1)=$CC 11503_LT_CC_BASENAME([$compiler]) 11504_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11505 11506if test -n "$compiler"; then 11507 : 11508 _LT_CONFIG($1) 11509fi 11510 11511GCC=$lt_save_GCC 11512AC_LANG_RESTORE 11513CC=$lt_save_CC 11514CFLAGS=$lt_save_CFLAGS 11515])# _LT_LANG_RC_CONFIG 11516 11517 11518# LT_PROG_GCJ 11519# ----------- 11520AC_DEFUN([LT_PROG_GCJ], 11521[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11522 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11523 [AC_CHECK_TOOL(GCJ, gcj,) 11524 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11525 AC_SUBST(GCJFLAGS)])])[]dnl 11526]) 11527 11528# Old name: 11529AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11530dnl aclocal-1.4 backwards compatibility: 11531dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11532 11533 11534# LT_PROG_GO 11535# ---------- 11536AC_DEFUN([LT_PROG_GO], 11537[AC_CHECK_TOOL(GOC, gccgo,) 11538]) 11539 11540 11541# LT_PROG_RC 11542# ---------- 11543AC_DEFUN([LT_PROG_RC], 11544[AC_CHECK_TOOL(RC, windres,) 11545]) 11546 11547# Old name: 11548AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11549dnl aclocal-1.4 backwards compatibility: 11550dnl AC_DEFUN([LT_AC_PROG_RC], []) 11551 11552 11553# _LT_DECL_EGREP 11554# -------------- 11555# If we don't have a new enough Autoconf to choose the best grep 11556# available, choose the one first in the user's PATH. 11557m4_defun([_LT_DECL_EGREP], 11558[AC_REQUIRE([AC_PROG_EGREP])dnl 11559AC_REQUIRE([AC_PROG_FGREP])dnl 11560test -z "$GREP" && GREP=grep 11561_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11562_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11563_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11564dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11565AC_SUBST([GREP]) 11566]) 11567 11568 11569# _LT_DECL_OBJDUMP 11570# -------------- 11571# If we don't have a new enough Autoconf to choose the best objdump 11572# available, choose the one first in the user's PATH. 11573m4_defun([_LT_DECL_OBJDUMP], 11574[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11575test -z "$OBJDUMP" && OBJDUMP=objdump 11576_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11577AC_SUBST([OBJDUMP]) 11578]) 11579 11580# _LT_DECL_DLLTOOL 11581# ---------------- 11582# Ensure DLLTOOL variable is set. 11583m4_defun([_LT_DECL_DLLTOOL], 11584[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11585test -z "$DLLTOOL" && DLLTOOL=dlltool 11586_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11587AC_SUBST([DLLTOOL]) 11588]) 11589 11590# _LT_DECL_FILECMD 11591# ---------------- 11592# Check for a file(cmd) program that can be used to detect file type and magic 11593m4_defun([_LT_DECL_FILECMD], 11594[AC_CHECK_TOOL([FILECMD], [file], [:]) 11595_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11596])# _LD_DECL_FILECMD 11597 11598# _LT_DECL_SED 11599# ------------ 11600# Check for a fully-functional sed program, that truncates 11601# as few characters as possible. Prefer GNU sed if found. 11602m4_defun([_LT_DECL_SED], 11603[AC_PROG_SED 11604test -z "$SED" && SED=sed 11605Xsed="$SED -e 1s/^X//" 11606_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11607_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11608 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11609])# _LT_DECL_SED 11610 11611m4_ifndef([AC_PROG_SED], [ 11612# NOTE: This macro has been submitted for inclusion into # 11613# GNU Autoconf as AC_PROG_SED. When it is available in # 11614# a released version of Autoconf we should remove this # 11615# macro and use it instead. # 11616 11617m4_defun([AC_PROG_SED], 11618[AC_MSG_CHECKING([for a sed that does not truncate output]) 11619AC_CACHE_VAL(lt_cv_path_SED, 11620[# Loop through the user's path and test for sed and gsed. 11621# Then use that list of sed's as ones to test for truncation. 11622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11623for as_dir in $PATH 11624do 11625 IFS=$as_save_IFS 11626 test -z "$as_dir" && as_dir=. 11627 for lt_ac_prog in sed gsed; do 11628 for ac_exec_ext in '' $ac_executable_extensions; do 11629 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11630 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11631 fi 11632 done 11633 done 11634done 11635IFS=$as_save_IFS 11636lt_ac_max=0 11637lt_ac_count=0 11638# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11639# along with /bin/sed that truncates output. 11640for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11641 test ! -f "$lt_ac_sed" && continue 11642 cat /dev/null > conftest.in 11643 lt_ac_count=0 11644 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11645 # Check for GNU sed and select it if it is found. 11646 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11647 lt_cv_path_SED=$lt_ac_sed 11648 break 11649 fi 11650 while true; do 11651 cat conftest.in conftest.in >conftest.tmp 11652 mv conftest.tmp conftest.in 11653 cp conftest.in conftest.nl 11654 echo >>conftest.nl 11655 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11656 cmp -s conftest.out conftest.nl || break 11657 # 10000 chars as input seems more than enough 11658 test 10 -lt "$lt_ac_count" && break 11659 lt_ac_count=`expr $lt_ac_count + 1` 11660 if test "$lt_ac_count" -gt "$lt_ac_max"; then 11661 lt_ac_max=$lt_ac_count 11662 lt_cv_path_SED=$lt_ac_sed 11663 fi 11664 done 11665done 11666]) 11667SED=$lt_cv_path_SED 11668AC_SUBST([SED]) 11669AC_MSG_RESULT([$SED]) 11670])#AC_PROG_SED 11671])#m4_ifndef 11672 11673# Old name: 11674AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11675dnl aclocal-1.4 backwards compatibility: 11676dnl AC_DEFUN([LT_AC_PROG_SED], []) 11677 11678 11679# _LT_CHECK_SHELL_FEATURES 11680# ------------------------ 11681# Find out whether the shell is Bourne or XSI compatible, 11682# or has some other useful features. 11683m4_defun([_LT_CHECK_SHELL_FEATURES], 11684[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11685 lt_unset=unset 11686else 11687 lt_unset=false 11688fi 11689_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11690 11691# test EBCDIC or ASCII 11692case `echo X|tr X '\101'` in 11693 A) # ASCII based system 11694 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11695 lt_SP2NL='tr \040 \012' 11696 lt_NL2SP='tr \015\012 \040\040' 11697 ;; 11698 *) # EBCDIC based system 11699 lt_SP2NL='tr \100 \n' 11700 lt_NL2SP='tr \r\n \100\100' 11701 ;; 11702esac 11703_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11704_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11705])# _LT_CHECK_SHELL_FEATURES 11706 11707 11708# _LT_PATH_CONVERSION_FUNCTIONS 11709# ----------------------------- 11710# Determine what file name conversion functions should be used by 11711# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11712# for certain cross-compile configurations and native mingw. 11713m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11714[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11715AC_REQUIRE([AC_CANONICAL_BUILD])dnl 11716AC_MSG_CHECKING([how to convert $build file names to $host format]) 11717AC_CACHE_VAL(lt_cv_to_host_file_cmd, 11718[case $host in 11719 *-*-mingw* ) 11720 case $build in 11721 *-*-mingw* ) # actually msys 11722 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11723 ;; 11724 *-*-cygwin* ) 11725 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11726 ;; 11727 * ) # otherwise, assume *nix 11728 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11729 ;; 11730 esac 11731 ;; 11732 *-*-cygwin* ) 11733 case $build in 11734 *-*-mingw* ) # actually msys 11735 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11736 ;; 11737 *-*-cygwin* ) 11738 lt_cv_to_host_file_cmd=func_convert_file_noop 11739 ;; 11740 * ) # otherwise, assume *nix 11741 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11742 ;; 11743 esac 11744 ;; 11745 * ) # unhandled hosts (and "normal" native builds) 11746 lt_cv_to_host_file_cmd=func_convert_file_noop 11747 ;; 11748esac 11749]) 11750to_host_file_cmd=$lt_cv_to_host_file_cmd 11751AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11752_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11753 [0], [convert $build file names to $host format])dnl 11754 11755AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11756AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11757[#assume ordinary cross tools, or native build. 11758lt_cv_to_tool_file_cmd=func_convert_file_noop 11759case $host in 11760 *-*-mingw* ) 11761 case $build in 11762 *-*-mingw* ) # actually msys 11763 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11764 ;; 11765 esac 11766 ;; 11767esac 11768]) 11769to_tool_file_cmd=$lt_cv_to_tool_file_cmd 11770AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11771_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11772 [0], [convert $build files to toolchain format])dnl 11773])# _LT_PATH_CONVERSION_FUNCTIONS 11774 11775# Helper functions for option handling. -*- Autoconf -*- 11776# 11777# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11778# Software Foundation, Inc. 11779# Written by Gary V. Vaughan, 2004 11780# 11781# This file is free software; the Free Software Foundation gives 11782# unlimited permission to copy and/or distribute it, with or without 11783# modifications, as long as this notice is preserved. 11784 11785# serial 8 ltoptions.m4 11786 11787# This is to help aclocal find these macros, as it can't see m4_define. 11788AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11789 11790 11791# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11792# ------------------------------------------ 11793m4_define([_LT_MANGLE_OPTION], 11794[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11795 11796 11797# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11798# --------------------------------------- 11799# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11800# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11801# saved as a flag. 11802m4_define([_LT_SET_OPTION], 11803[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11804m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11805 _LT_MANGLE_DEFUN([$1], [$2]), 11806 [m4_warning([Unknown $1 option '$2'])])[]dnl 11807]) 11808 11809 11810# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11811# ------------------------------------------------------------ 11812# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11813m4_define([_LT_IF_OPTION], 11814[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11815 11816 11817# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11818# ------------------------------------------------------- 11819# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11820# are set. 11821m4_define([_LT_UNLESS_OPTIONS], 11822[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11823 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11824 [m4_define([$0_found])])])[]dnl 11825m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11826])[]dnl 11827]) 11828 11829 11830# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11831# ---------------------------------------- 11832# OPTION-LIST is a space-separated list of Libtool options associated 11833# with MACRO-NAME. If any OPTION has a matching handler declared with 11834# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11835# the unknown option and exit. 11836m4_defun([_LT_SET_OPTIONS], 11837[# Set options 11838m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11839 [_LT_SET_OPTION([$1], _LT_Option)]) 11840 11841m4_if([$1],[LT_INIT],[ 11842 dnl 11843 dnl Simply set some default values (i.e off) if boolean options were not 11844 dnl specified: 11845 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11846 ]) 11847 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11848 ]) 11849 dnl 11850 dnl If no reference was made to various pairs of opposing options, then 11851 dnl we run the default mode handler for the pair. For example, if neither 11852 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11853 dnl archives by default: 11854 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11855 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11856 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11857 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11858 [_LT_ENABLE_FAST_INSTALL]) 11859 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11860 [_LT_WITH_AIX_SONAME([aix])]) 11861 ]) 11862])# _LT_SET_OPTIONS 11863 11864 11865 11866# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11867# ----------------------------------------- 11868m4_define([_LT_MANGLE_DEFUN], 11869[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11870 11871 11872# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11873# ----------------------------------------------- 11874m4_define([LT_OPTION_DEFINE], 11875[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11876])# LT_OPTION_DEFINE 11877 11878 11879# dlopen 11880# ------ 11881LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11882]) 11883 11884AU_DEFUN([AC_LIBTOOL_DLOPEN], 11885[_LT_SET_OPTION([LT_INIT], [dlopen]) 11886AC_DIAGNOSE([obsolete], 11887[$0: Remove this warning and the call to _LT_SET_OPTION when you 11888put the 'dlopen' option into LT_INIT's first parameter.]) 11889]) 11890 11891dnl aclocal-1.4 backwards compatibility: 11892dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11893 11894 11895# win32-dll 11896# --------- 11897# Declare package support for building win32 dll's. 11898LT_OPTION_DEFINE([LT_INIT], [win32-dll], 11899[enable_win32_dll=yes 11900 11901case $host in 11902*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11903 AC_CHECK_TOOL(AS, as, false) 11904 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11905 AC_CHECK_TOOL(OBJDUMP, objdump, false) 11906 ;; 11907esac 11908 11909test -z "$AS" && AS=as 11910_LT_DECL([], [AS], [1], [Assembler program])dnl 11911 11912test -z "$DLLTOOL" && DLLTOOL=dlltool 11913_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11914 11915test -z "$OBJDUMP" && OBJDUMP=objdump 11916_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11917])# win32-dll 11918 11919AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11920[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11921_LT_SET_OPTION([LT_INIT], [win32-dll]) 11922AC_DIAGNOSE([obsolete], 11923[$0: Remove this warning and the call to _LT_SET_OPTION when you 11924put the 'win32-dll' option into LT_INIT's first parameter.]) 11925]) 11926 11927dnl aclocal-1.4 backwards compatibility: 11928dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11929 11930 11931# _LT_ENABLE_SHARED([DEFAULT]) 11932# ---------------------------- 11933# implement the --enable-shared flag, and supports the 'shared' and 11934# 'disable-shared' LT_INIT options. 11935# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11936m4_define([_LT_ENABLE_SHARED], 11937[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11938AC_ARG_ENABLE([shared], 11939 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11940 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11941 [p=${PACKAGE-default} 11942 case $enableval in 11943 yes) enable_shared=yes ;; 11944 no) enable_shared=no ;; 11945 *) 11946 enable_shared=no 11947 # Look at the argument we got. We use all the common list separators. 11948 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11949 for pkg in $enableval; do 11950 IFS=$lt_save_ifs 11951 if test "X$pkg" = "X$p"; then 11952 enable_shared=yes 11953 fi 11954 done 11955 IFS=$lt_save_ifs 11956 ;; 11957 esac], 11958 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11959 11960 _LT_DECL([build_libtool_libs], [enable_shared], [0], 11961 [Whether or not to build shared libraries]) 11962])# _LT_ENABLE_SHARED 11963 11964LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11965LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11966 11967# Old names: 11968AC_DEFUN([AC_ENABLE_SHARED], 11969[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11970]) 11971 11972AC_DEFUN([AC_DISABLE_SHARED], 11973[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11974]) 11975 11976AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11977AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11978 11979dnl aclocal-1.4 backwards compatibility: 11980dnl AC_DEFUN([AM_ENABLE_SHARED], []) 11981dnl AC_DEFUN([AM_DISABLE_SHARED], []) 11982 11983 11984 11985# _LT_ENABLE_STATIC([DEFAULT]) 11986# ---------------------------- 11987# implement the --enable-static flag, and support the 'static' and 11988# 'disable-static' LT_INIT options. 11989# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11990m4_define([_LT_ENABLE_STATIC], 11991[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 11992AC_ARG_ENABLE([static], 11993 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 11994 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 11995 [p=${PACKAGE-default} 11996 case $enableval in 11997 yes) enable_static=yes ;; 11998 no) enable_static=no ;; 11999 *) 12000 enable_static=no 12001 # Look at the argument we got. We use all the common list separators. 12002 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12003 for pkg in $enableval; do 12004 IFS=$lt_save_ifs 12005 if test "X$pkg" = "X$p"; then 12006 enable_static=yes 12007 fi 12008 done 12009 IFS=$lt_save_ifs 12010 ;; 12011 esac], 12012 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12013 12014 _LT_DECL([build_old_libs], [enable_static], [0], 12015 [Whether or not to build static libraries]) 12016])# _LT_ENABLE_STATIC 12017 12018LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12019LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12020 12021# Old names: 12022AC_DEFUN([AC_ENABLE_STATIC], 12023[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12024]) 12025 12026AC_DEFUN([AC_DISABLE_STATIC], 12027[_LT_SET_OPTION([LT_INIT], [disable-static]) 12028]) 12029 12030AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12031AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12032 12033dnl aclocal-1.4 backwards compatibility: 12034dnl AC_DEFUN([AM_ENABLE_STATIC], []) 12035dnl AC_DEFUN([AM_DISABLE_STATIC], []) 12036 12037 12038 12039# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12040# ---------------------------------- 12041# implement the --enable-fast-install flag, and support the 'fast-install' 12042# and 'disable-fast-install' LT_INIT options. 12043# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12044m4_define([_LT_ENABLE_FAST_INSTALL], 12045[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12046AC_ARG_ENABLE([fast-install], 12047 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12048 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12049 [p=${PACKAGE-default} 12050 case $enableval in 12051 yes) enable_fast_install=yes ;; 12052 no) enable_fast_install=no ;; 12053 *) 12054 enable_fast_install=no 12055 # Look at the argument we got. We use all the common list separators. 12056 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12057 for pkg in $enableval; do 12058 IFS=$lt_save_ifs 12059 if test "X$pkg" = "X$p"; then 12060 enable_fast_install=yes 12061 fi 12062 done 12063 IFS=$lt_save_ifs 12064 ;; 12065 esac], 12066 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12067 12068_LT_DECL([fast_install], [enable_fast_install], [0], 12069 [Whether or not to optimize for fast installation])dnl 12070])# _LT_ENABLE_FAST_INSTALL 12071 12072LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12073LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12074 12075# Old names: 12076AU_DEFUN([AC_ENABLE_FAST_INSTALL], 12077[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12078AC_DIAGNOSE([obsolete], 12079[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12080the 'fast-install' option into LT_INIT's first parameter.]) 12081]) 12082 12083AU_DEFUN([AC_DISABLE_FAST_INSTALL], 12084[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12085AC_DIAGNOSE([obsolete], 12086[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12087the 'disable-fast-install' option into LT_INIT's first parameter.]) 12088]) 12089 12090dnl aclocal-1.4 backwards compatibility: 12091dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12092dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12093 12094 12095# _LT_WITH_AIX_SONAME([DEFAULT]) 12096# ---------------------------------- 12097# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12098# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12099# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12100m4_define([_LT_WITH_AIX_SONAME], 12101[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12102shared_archive_member_spec= 12103case $host,$enable_shared in 12104power*-*-aix[[5-9]]*,yes) 12105 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12106 AC_ARG_WITH([aix-soname], 12107 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12108 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12109 [case $withval in 12110 aix|svr4|both) 12111 ;; 12112 *) 12113 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12114 ;; 12115 esac 12116 lt_cv_with_aix_soname=$with_aix_soname], 12117 [AC_CACHE_VAL([lt_cv_with_aix_soname], 12118 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12119 with_aix_soname=$lt_cv_with_aix_soname]) 12120 AC_MSG_RESULT([$with_aix_soname]) 12121 if test aix != "$with_aix_soname"; then 12122 # For the AIX way of multilib, we name the shared archive member 12123 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12124 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12125 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12126 # the AIX toolchain works better with OBJECT_MODE set (default 32). 12127 if test 64 = "${OBJECT_MODE-32}"; then 12128 shared_archive_member_spec=shr_64 12129 else 12130 shared_archive_member_spec=shr 12131 fi 12132 fi 12133 ;; 12134*) 12135 with_aix_soname=aix 12136 ;; 12137esac 12138 12139_LT_DECL([], [shared_archive_member_spec], [0], 12140 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12141])# _LT_WITH_AIX_SONAME 12142 12143LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12144LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12145LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12146 12147 12148# _LT_WITH_PIC([MODE]) 12149# -------------------- 12150# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12151# LT_INIT options. 12152# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12153m4_define([_LT_WITH_PIC], 12154[AC_ARG_WITH([pic], 12155 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12156 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12157 [lt_p=${PACKAGE-default} 12158 case $withval in 12159 yes|no) pic_mode=$withval ;; 12160 *) 12161 pic_mode=default 12162 # Look at the argument we got. We use all the common list separators. 12163 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12164 for lt_pkg in $withval; do 12165 IFS=$lt_save_ifs 12166 if test "X$lt_pkg" = "X$lt_p"; then 12167 pic_mode=yes 12168 fi 12169 done 12170 IFS=$lt_save_ifs 12171 ;; 12172 esac], 12173 [pic_mode=m4_default([$1], [default])]) 12174 12175_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12176])# _LT_WITH_PIC 12177 12178LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12179LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12180 12181# Old name: 12182AU_DEFUN([AC_LIBTOOL_PICMODE], 12183[_LT_SET_OPTION([LT_INIT], [pic-only]) 12184AC_DIAGNOSE([obsolete], 12185[$0: Remove this warning and the call to _LT_SET_OPTION when you 12186put the 'pic-only' option into LT_INIT's first parameter.]) 12187]) 12188 12189dnl aclocal-1.4 backwards compatibility: 12190dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12191 12192 12193m4_define([_LTDL_MODE], []) 12194LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12195 [m4_define([_LTDL_MODE], [nonrecursive])]) 12196LT_OPTION_DEFINE([LTDL_INIT], [recursive], 12197 [m4_define([_LTDL_MODE], [recursive])]) 12198LT_OPTION_DEFINE([LTDL_INIT], [subproject], 12199 [m4_define([_LTDL_MODE], [subproject])]) 12200 12201m4_define([_LTDL_TYPE], []) 12202LT_OPTION_DEFINE([LTDL_INIT], [installable], 12203 [m4_define([_LTDL_TYPE], [installable])]) 12204LT_OPTION_DEFINE([LTDL_INIT], [convenience], 12205 [m4_define([_LTDL_TYPE], [convenience])]) 12206 12207# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12208# 12209# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12210# Foundation, Inc. 12211# Written by Gary V. Vaughan, 2004 12212# 12213# This file is free software; the Free Software Foundation gives 12214# unlimited permission to copy and/or distribute it, with or without 12215# modifications, as long as this notice is preserved. 12216 12217# serial 6 ltsugar.m4 12218 12219# This is to help aclocal find these macros, as it can't see m4_define. 12220AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12221 12222 12223# lt_join(SEP, ARG1, [ARG2...]) 12224# ----------------------------- 12225# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12226# associated separator. 12227# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12228# versions in m4sugar had bugs. 12229m4_define([lt_join], 12230[m4_if([$#], [1], [], 12231 [$#], [2], [[$2]], 12232 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12233m4_define([_lt_join], 12234[m4_if([$#$2], [2], [], 12235 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12236 12237 12238# lt_car(LIST) 12239# lt_cdr(LIST) 12240# ------------ 12241# Manipulate m4 lists. 12242# These macros are necessary as long as will still need to support 12243# Autoconf-2.59, which quotes differently. 12244m4_define([lt_car], [[$1]]) 12245m4_define([lt_cdr], 12246[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12247 [$#], 1, [], 12248 [m4_dquote(m4_shift($@))])]) 12249m4_define([lt_unquote], $1) 12250 12251 12252# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12253# ------------------------------------------ 12254# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12255# Note that neither SEPARATOR nor STRING are expanded; they are appended 12256# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12257# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12258# than defined and empty). 12259# 12260# This macro is needed until we can rely on Autoconf 2.62, since earlier 12261# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12262m4_define([lt_append], 12263[m4_define([$1], 12264 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12265 12266 12267 12268# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12269# ---------------------------------------------------------- 12270# Produce a SEP delimited list of all paired combinations of elements of 12271# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12272# has the form PREFIXmINFIXSUFFIXn. 12273# Needed until we can rely on m4_combine added in Autoconf 2.62. 12274m4_define([lt_combine], 12275[m4_if(m4_eval([$# > 3]), [1], 12276 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12277[[m4_foreach([_Lt_prefix], [$2], 12278 [m4_foreach([_Lt_suffix], 12279 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12280 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12281 12282 12283# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12284# ----------------------------------------------------------------------- 12285# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12286# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12287m4_define([lt_if_append_uniq], 12288[m4_ifdef([$1], 12289 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12290 [lt_append([$1], [$2], [$3])$4], 12291 [$5])], 12292 [lt_append([$1], [$2], [$3])$4])]) 12293 12294 12295# lt_dict_add(DICT, KEY, VALUE) 12296# ----------------------------- 12297m4_define([lt_dict_add], 12298[m4_define([$1($2)], [$3])]) 12299 12300 12301# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12302# -------------------------------------------- 12303m4_define([lt_dict_add_subkey], 12304[m4_define([$1($2:$3)], [$4])]) 12305 12306 12307# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12308# ---------------------------------- 12309m4_define([lt_dict_fetch], 12310[m4_ifval([$3], 12311 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12312 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12313 12314 12315# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12316# ----------------------------------------------------------------- 12317m4_define([lt_if_dict_fetch], 12318[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12319 [$5], 12320 [$6])]) 12321 12322 12323# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12324# -------------------------------------------------------------- 12325m4_define([lt_dict_filter], 12326[m4_if([$5], [], [], 12327 [lt_join(m4_quote(m4_default([$4], [[, ]])), 12328 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12329 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12330]) 12331 12332# ltversion.m4 -- version numbers -*- Autoconf -*- 12333# 12334# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12335# Inc. 12336# Written by Scott James Remnant, 2004 12337# 12338# This file is free software; the Free Software Foundation gives 12339# unlimited permission to copy and/or distribute it, with or without 12340# modifications, as long as this notice is preserved. 12341 12342# @configure_input@ 12343 12344# serial 4245 ltversion.m4 12345# This file is part of GNU Libtool 12346 12347m4_define([LT_PACKAGE_VERSION], [2.4.7]) 12348m4_define([LT_PACKAGE_REVISION], [2.4.7]) 12349 12350AC_DEFUN([LTVERSION_VERSION], 12351[macro_version='2.4.7' 12352macro_revision='2.4.7' 12353_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12354_LT_DECL(, macro_revision, 0) 12355]) 12356 12357# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12358# 12359# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12360# Software Foundation, Inc. 12361# Written by Scott James Remnant, 2004. 12362# 12363# This file is free software; the Free Software Foundation gives 12364# unlimited permission to copy and/or distribute it, with or without 12365# modifications, as long as this notice is preserved. 12366 12367# serial 5 lt~obsolete.m4 12368 12369# These exist entirely to fool aclocal when bootstrapping libtool. 12370# 12371# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12372# which have later been changed to m4_define as they aren't part of the 12373# exported API, or moved to Autoconf or Automake where they belong. 12374# 12375# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12376# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12377# using a macro with the same name in our local m4/libtool.m4 it'll 12378# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12379# and doesn't know about Autoconf macros at all.) 12380# 12381# So we provide this file, which has a silly filename so it's always 12382# included after everything else. This provides aclocal with the 12383# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12384# because those macros already exist, or will be overwritten later. 12385# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12386# 12387# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12388# Yes, that means every name once taken will need to remain here until 12389# we give up compatibility with versions before 1.7, at which point 12390# we need to keep only those names which we still refer to. 12391 12392# This is to help aclocal find these macros, as it can't see m4_define. 12393AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12394 12395m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12396m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12397m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12398m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12399m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12400m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12401m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12402m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12403m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12404m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12405m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12406m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12407m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12408m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12409m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12410m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12411m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12412m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12413m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12414m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12415m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12416m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12417m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12418m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12419m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12420m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12421m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12422m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12423m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12424m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12425m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12426m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12427m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12428m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12429m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12430m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12431m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12432m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12433m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12434m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12435m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12436m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12437m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12438m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12439m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12440m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12441m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12442m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12443m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12444m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12445m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12446m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12447m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12448m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12449m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12450m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12451m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12452m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12453m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12454m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12455m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12456 12457