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, 2023, Oracle and/or its affiliates. 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.20.0]) 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 flexibility 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 flexibility 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 flexibility 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 flexibility 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 flexibility 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 flexibility 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 flexibility 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 flexibility 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 flexibility 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 dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3013 dnl and complains that AC_PROG_CC_C99 is obsolete 3014 m4_version_prereq([2.70], 3015 [AC_REQUIRE([AC_PROG_CC])], 3016 [AC_REQUIRE([AC_PROG_CC_C99])]) 3017 ], 3018 [C++], [ 3019 AC_REQUIRE([AC_PROG_CXX]) 3020 ] 3021) 3022AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 3023AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 3024AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 3025]) # XORG_COMPILER_BRAND 3026 3027# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 3028# --------------- 3029# Minimum version: 1.16.0 3030# 3031# Test if the compiler works when passed the given flag as a command line argument. 3032# If it succeeds, the flag is appended to the given variable. If not, it tries the 3033# next flag in the list until there are no more options. 3034# 3035# Note that this does not guarantee that the compiler supports the flag as some 3036# compilers will simply ignore arguments that they do not understand, but we do 3037# attempt to weed out false positives by using -Werror=unknown-warning-option and 3038# -Werror=unused-command-line-argument 3039# 3040AC_DEFUN([XORG_TESTSET_CFLAG], [ 3041m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3042m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3043 3044AC_LANG_COMPILER_REQUIRE 3045 3046AC_LANG_CASE( 3047 [C], [ 3048 dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3049 dnl and complains that AC_PROG_CC_C99 is obsolete 3050 m4_version_prereq([2.70], 3051 [AC_REQUIRE([AC_PROG_CC])], 3052 [AC_REQUIRE([AC_PROG_CC_C99])]) 3053 define([PREFIX], [C]) 3054 define([CACHE_PREFIX], [cc]) 3055 define([COMPILER], [$CC]) 3056 ], 3057 [C++], [ 3058 define([PREFIX], [CXX]) 3059 define([CACHE_PREFIX], [cxx]) 3060 define([COMPILER], [$CXX]) 3061 ] 3062) 3063 3064[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3065 3066if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3067 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3068 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3069 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3070 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3071 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3072 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3073 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3074 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3075fi 3076 3077if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3078 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3079 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3080 fi 3081 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3082 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3083 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3084 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3085 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3086 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3087 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3088 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3089fi 3090 3091found="no" 3092m4_foreach([flag], m4_cdr($@), [ 3093 if test $found = "no" ; then 3094 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3095 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3096 fi 3097 3098 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3099 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3100 fi 3101 3102 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3103 3104dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3105 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3106 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3107 AC_CACHE_VAL($cacheid, 3108 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3109 [eval $cacheid=yes], 3110 [eval $cacheid=no])]) 3111 3112 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3113 3114 eval supported=\$$cacheid 3115 AC_MSG_RESULT([$supported]) 3116 if test "$supported" = "yes" ; then 3117 $1="$$1 ]flag[" 3118 found="yes" 3119 fi 3120 fi 3121]) 3122]) # XORG_TESTSET_CFLAG 3123 3124# XORG_COMPILER_FLAGS 3125# --------------- 3126# Minimum version: 1.16.0 3127# 3128# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3129# arguments supported by the selected compiler which do NOT alter the generated 3130# code. These arguments will cause the compiler to print various warnings 3131# during compilation AND turn a conservative set of warnings into errors. 3132# 3133# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3134# future versions of util-macros as options are added to new compilers. 3135# 3136AC_DEFUN([XORG_COMPILER_FLAGS], [ 3137AC_REQUIRE([XORG_COMPILER_BRAND]) 3138 3139AC_ARG_ENABLE(selective-werror, 3140 AS_HELP_STRING([--disable-selective-werror], 3141 [Turn off selective compiler errors. (default: enabled)]), 3142 [SELECTIVE_WERROR=$enableval], 3143 [SELECTIVE_WERROR=yes]) 3144 3145AC_LANG_CASE( 3146 [C], [ 3147 define([PREFIX], [C]) 3148 ], 3149 [C++], [ 3150 define([PREFIX], [CXX]) 3151 ] 3152) 3153# -v is too short to test reliably with XORG_TESTSET_CFLAG 3154if test "x$SUNCC" = "xyes"; then 3155 [BASE_]PREFIX[FLAGS]="-v" 3156else 3157 [BASE_]PREFIX[FLAGS]="" 3158fi 3159 3160# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3161XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3162XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3163XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3164XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3165 3166AC_LANG_CASE( 3167 [C], [ 3168 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3169 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3170 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3171 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3172 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3173 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3174 ] 3175) 3176 3177# This chunk adds additional warnings that could catch undesired effects. 3178XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3179XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3180XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3181XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3182XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3183XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3184XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3185 3186# These are currently disabled because they are noisy. They will be enabled 3187# in the future once the codebase is sufficiently modernized to silence 3188# them. For now, I don't want them to drown out the other warnings. 3189# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3190# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3191# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3192 3193# Turn some warnings into errors, so we don't accidentally get successful builds 3194# when there are problems that should be fixed. 3195 3196if test "x$SELECTIVE_WERROR" = "xyes" ; then 3197XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3198XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3199XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3200XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3201XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3202XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3203XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3204XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3205XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3206XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3207XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3208XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3209XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3210else 3211AC_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]) 3212XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3213XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3214XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3215XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3216XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3217XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3218XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3219XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3220XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3221XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3222XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3223XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3224XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3225fi 3226 3227AC_SUBST([BASE_]PREFIX[FLAGS]) 3228]) # XORG_COMPILER_FLAGS 3229 3230# XORG_CWARNFLAGS 3231# --------------- 3232# Minimum version: 1.2.0 3233# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3234# 3235# Defines CWARNFLAGS to enable C compiler warnings. 3236# 3237# This function is deprecated because it defines -fno-strict-aliasing 3238# which alters the code generated by the compiler. If -fno-strict-aliasing 3239# is needed, then it should be added explicitly in the module when 3240# it is updated to use BASE_CFLAGS. 3241# 3242AC_DEFUN([XORG_CWARNFLAGS], [ 3243AC_REQUIRE([XORG_COMPILER_FLAGS]) 3244AC_REQUIRE([XORG_COMPILER_BRAND]) 3245AC_LANG_CASE( 3246 [C], [ 3247 CWARNFLAGS="$BASE_CFLAGS" 3248 if test "x$GCC" = xyes ; then 3249 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3250 fi 3251 AC_SUBST(CWARNFLAGS) 3252 ] 3253) 3254]) # XORG_CWARNFLAGS 3255 3256# XORG_STRICT_OPTION 3257# ----------------------- 3258# Minimum version: 1.3.0 3259# 3260# Add configure option to enable strict compilation flags, such as treating 3261# warnings as fatal errors. 3262# If --enable-strict-compilation is passed to configure, adds strict flags to 3263# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3264# 3265# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3266# when strict compilation is unconditionally desired. 3267AC_DEFUN([XORG_STRICT_OPTION], [ 3268AC_REQUIRE([XORG_CWARNFLAGS]) 3269AC_REQUIRE([XORG_COMPILER_FLAGS]) 3270 3271AC_ARG_ENABLE(strict-compilation, 3272 AS_HELP_STRING([--enable-strict-compilation], 3273 [Enable all warnings from compiler and make them errors (default: disabled)]), 3274 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3275 3276AC_LANG_CASE( 3277 [C], [ 3278 define([PREFIX], [C]) 3279 ], 3280 [C++], [ 3281 define([PREFIX], [CXX]) 3282 ] 3283) 3284 3285[STRICT_]PREFIX[FLAGS]="" 3286XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3287XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3288 3289# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3290# activate it with -Werror, so we add it here explicitly. 3291XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3292 3293if test "x$STRICT_COMPILE" = "xyes"; then 3294 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3295 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3296fi 3297AC_SUBST([STRICT_]PREFIX[FLAGS]) 3298AC_SUBST([BASE_]PREFIX[FLAGS]) 3299AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3300]) # XORG_STRICT_OPTION 3301 3302# XORG_DEFAULT_NOCODE_OPTIONS 3303# --------------------------- 3304# Minimum version: 1.20.0 3305# 3306# Defines default options for X.Org modules which don't compile code, 3307# such as fonts, bitmaps, cursors, and docs. 3308# 3309AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 3310AC_REQUIRE([AC_PROG_INSTALL]) 3311XORG_RELEASE_VERSION 3312XORG_CHANGELOG 3313XORG_INSTALL 3314XORG_MANPAGE_SECTIONS 3315m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3316 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3317]) # XORG_DEFAULT_NOCODE_OPTIONS 3318 3319# XORG_DEFAULT_OPTIONS 3320# -------------------- 3321# Minimum version: 1.3.0 3322# 3323# Defines default options for X.Org modules which compile code. 3324# 3325AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3326AC_REQUIRE([AC_PROG_INSTALL]) 3327XORG_COMPILER_FLAGS 3328XORG_CWARNFLAGS 3329XORG_STRICT_OPTION 3330XORG_DEFAULT_NOCODE_OPTIONS 3331]) # XORG_DEFAULT_OPTIONS 3332 3333# XORG_INSTALL() 3334# ---------------- 3335# Minimum version: 1.4.0 3336# 3337# Defines the variable INSTALL_CMD as the command to copy 3338# INSTALL from $prefix/share/util-macros. 3339# 3340AC_DEFUN([XORG_INSTALL], [ 3341AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3342macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3343INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3344mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3345|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3346touch \$(top_srcdir)/INSTALL; \ 3347echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3348AC_SUBST([INSTALL_CMD]) 3349]) # XORG_INSTALL 3350dnl Copyright 2005 Red Hat, Inc 3351dnl 3352dnl Permission to use, copy, modify, distribute, and sell this software and its 3353dnl documentation for any purpose is hereby granted without fee, provided that 3354dnl the above copyright notice appear in all copies and that both that 3355dnl copyright notice and this permission notice appear in supporting 3356dnl documentation. 3357dnl 3358dnl The above copyright notice and this permission notice shall be included 3359dnl in all copies or substantial portions of the Software. 3360dnl 3361dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3362dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3363dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3364dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3365dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3366dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3367dnl OTHER DEALINGS IN THE SOFTWARE. 3368dnl 3369dnl Except as contained in this notice, the name of the copyright holders shall 3370dnl not be used in advertising or otherwise to promote the sale, use or 3371dnl other dealings in this Software without prior written authorization 3372dnl from the copyright holders. 3373dnl 3374 3375# XORG_RELEASE_VERSION 3376# -------------------- 3377# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3378 3379AC_DEFUN([XORG_RELEASE_VERSION],[ 3380 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3381 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3382 [Major version of this package]) 3383 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3384 if test "x$PVM" = "x"; then 3385 PVM="0" 3386 fi 3387 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3388 [$PVM], 3389 [Minor version of this package]) 3390 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3391 if test "x$PVP" = "x"; then 3392 PVP="0" 3393 fi 3394 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3395 [$PVP], 3396 [Patch version of this package]) 3397]) 3398 3399# XORG_CHANGELOG() 3400# ---------------- 3401# Minimum version: 1.2.0 3402# 3403# Defines the variable CHANGELOG_CMD as the command to generate 3404# ChangeLog from git. 3405# 3406# 3407AC_DEFUN([XORG_CHANGELOG], [ 3408CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3409mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3410|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3411touch \$(top_srcdir)/ChangeLog; \ 3412echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3413AC_SUBST([CHANGELOG_CMD]) 3414]) # XORG_CHANGELOG 3415 3416# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3417# 3418# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3419# Foundation, Inc. 3420# Written by Gordon Matzigkeit, 1996 3421# 3422# This file is free software; the Free Software Foundation gives 3423# unlimited permission to copy and/or distribute it, with or without 3424# modifications, as long as this notice is preserved. 3425 3426m4_define([_LT_COPYING], [dnl 3427# Copyright (C) 2014 Free Software Foundation, Inc. 3428# This is free software; see the source for copying conditions. There is NO 3429# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3430 3431# GNU Libtool is free software; you can redistribute it and/or modify 3432# it under the terms of the GNU General Public License as published by 3433# the Free Software Foundation; either version 2 of of the License, or 3434# (at your option) any later version. 3435# 3436# As a special exception to the GNU General Public License, if you 3437# distribute this file as part of a program or library that is built 3438# using GNU Libtool, you may include this file under the same 3439# distribution terms that you use for the rest of that program. 3440# 3441# GNU Libtool is distributed in the hope that it will be useful, but 3442# WITHOUT ANY WARRANTY; without even the implied warranty of 3443# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3444# GNU General Public License for more details. 3445# 3446# You should have received a copy of the GNU General Public License 3447# along with this program. If not, see <http://www.gnu.org/licenses/>. 3448]) 3449 3450# serial 59 LT_INIT 3451 3452 3453# LT_PREREQ(VERSION) 3454# ------------------ 3455# Complain and exit if this libtool version is less that VERSION. 3456m4_defun([LT_PREREQ], 3457[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3458 [m4_default([$3], 3459 [m4_fatal([Libtool version $1 or higher is required], 3460 63)])], 3461 [$2])]) 3462 3463 3464# _LT_CHECK_BUILDDIR 3465# ------------------ 3466# Complain if the absolute build directory name contains unusual characters 3467m4_defun([_LT_CHECK_BUILDDIR], 3468[case `pwd` in 3469 *\ * | *\ *) 3470 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3471esac 3472]) 3473 3474 3475# LT_INIT([OPTIONS]) 3476# ------------------ 3477AC_DEFUN([LT_INIT], 3478[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3479AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3480AC_BEFORE([$0], [LT_LANG])dnl 3481AC_BEFORE([$0], [LT_OUTPUT])dnl 3482AC_BEFORE([$0], [LTDL_INIT])dnl 3483m4_require([_LT_CHECK_BUILDDIR])dnl 3484 3485dnl Autoconf doesn't catch unexpanded LT_ macros by default: 3486m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3487m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3488dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3489dnl unless we require an AC_DEFUNed macro: 3490AC_REQUIRE([LTOPTIONS_VERSION])dnl 3491AC_REQUIRE([LTSUGAR_VERSION])dnl 3492AC_REQUIRE([LTVERSION_VERSION])dnl 3493AC_REQUIRE([LTOBSOLETE_VERSION])dnl 3494m4_require([_LT_PROG_LTMAIN])dnl 3495 3496_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3497 3498dnl Parse OPTIONS 3499_LT_SET_OPTIONS([$0], [$1]) 3500 3501# This can be used to rebuild libtool when needed 3502LIBTOOL_DEPS=$ltmain 3503 3504# Always use our own libtool. 3505LIBTOOL='$(SHELL) $(top_builddir)/libtool' 3506AC_SUBST(LIBTOOL)dnl 3507 3508_LT_SETUP 3509 3510# Only expand once: 3511m4_define([LT_INIT]) 3512])# LT_INIT 3513 3514# Old names: 3515AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3516AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3517dnl aclocal-1.4 backwards compatibility: 3518dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3519dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3520 3521 3522# _LT_PREPARE_CC_BASENAME 3523# ----------------------- 3524m4_defun([_LT_PREPARE_CC_BASENAME], [ 3525# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3526func_cc_basename () 3527{ 3528 for cc_temp in @S|@*""; do 3529 case $cc_temp in 3530 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3531 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3532 \-*) ;; 3533 *) break;; 3534 esac 3535 done 3536 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3537} 3538])# _LT_PREPARE_CC_BASENAME 3539 3540 3541# _LT_CC_BASENAME(CC) 3542# ------------------- 3543# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3544# but that macro is also expanded into generated libtool script, which 3545# arranges for $SED and $ECHO to be set by different means. 3546m4_defun([_LT_CC_BASENAME], 3547[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3548AC_REQUIRE([_LT_DECL_SED])dnl 3549AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3550func_cc_basename $1 3551cc_basename=$func_cc_basename_result 3552]) 3553 3554 3555# _LT_FILEUTILS_DEFAULTS 3556# ---------------------- 3557# It is okay to use these file commands and assume they have been set 3558# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3559m4_defun([_LT_FILEUTILS_DEFAULTS], 3560[: ${CP="cp -f"} 3561: ${MV="mv -f"} 3562: ${RM="rm -f"} 3563])# _LT_FILEUTILS_DEFAULTS 3564 3565 3566# _LT_SETUP 3567# --------- 3568m4_defun([_LT_SETUP], 3569[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3570AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3571AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3572AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3573 3574_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3575dnl 3576_LT_DECL([], [host_alias], [0], [The host system])dnl 3577_LT_DECL([], [host], [0])dnl 3578_LT_DECL([], [host_os], [0])dnl 3579dnl 3580_LT_DECL([], [build_alias], [0], [The build system])dnl 3581_LT_DECL([], [build], [0])dnl 3582_LT_DECL([], [build_os], [0])dnl 3583dnl 3584AC_REQUIRE([AC_PROG_CC])dnl 3585AC_REQUIRE([LT_PATH_LD])dnl 3586AC_REQUIRE([LT_PATH_NM])dnl 3587dnl 3588AC_REQUIRE([AC_PROG_LN_S])dnl 3589test -z "$LN_S" && LN_S="ln -s" 3590_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3591dnl 3592AC_REQUIRE([LT_CMD_MAX_LEN])dnl 3593_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3594_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3595dnl 3596m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3597m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3598m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3599m4_require([_LT_CMD_RELOAD])dnl 3600m4_require([_LT_DECL_FILECMD])dnl 3601m4_require([_LT_CHECK_MAGIC_METHOD])dnl 3602m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3603m4_require([_LT_CMD_OLD_ARCHIVE])dnl 3604m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3605m4_require([_LT_WITH_SYSROOT])dnl 3606m4_require([_LT_CMD_TRUNCATE])dnl 3607 3608_LT_CONFIG_LIBTOOL_INIT([ 3609# See if we are running on zsh, and set the options that allow our 3610# commands through without removal of \ escapes INIT. 3611if test -n "\${ZSH_VERSION+set}"; then 3612 setopt NO_GLOB_SUBST 3613fi 3614]) 3615if test -n "${ZSH_VERSION+set}"; then 3616 setopt NO_GLOB_SUBST 3617fi 3618 3619_LT_CHECK_OBJDIR 3620 3621m4_require([_LT_TAG_COMPILER])dnl 3622 3623case $host_os in 3624aix3*) 3625 # AIX sometimes has problems with the GCC collect2 program. For some 3626 # reason, if we set the COLLECT_NAMES environment variable, the problems 3627 # vanish in a puff of smoke. 3628 if test set != "${COLLECT_NAMES+set}"; then 3629 COLLECT_NAMES= 3630 export COLLECT_NAMES 3631 fi 3632 ;; 3633esac 3634 3635# Global variables: 3636ofile=libtool 3637can_build_shared=yes 3638 3639# All known linkers require a '.a' archive for static linking (except MSVC and 3640# ICC, which need '.lib'). 3641libext=a 3642 3643with_gnu_ld=$lt_cv_prog_gnu_ld 3644 3645old_CC=$CC 3646old_CFLAGS=$CFLAGS 3647 3648# Set sane defaults for various variables 3649test -z "$CC" && CC=cc 3650test -z "$LTCC" && LTCC=$CC 3651test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3652test -z "$LD" && LD=ld 3653test -z "$ac_objext" && ac_objext=o 3654 3655_LT_CC_BASENAME([$compiler]) 3656 3657# Only perform the check for file, if the check method requires it 3658test -z "$MAGIC_CMD" && MAGIC_CMD=file 3659case $deplibs_check_method in 3660file_magic*) 3661 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3662 _LT_PATH_MAGIC 3663 fi 3664 ;; 3665esac 3666 3667# Use C for the default configuration in the libtool script 3668LT_SUPPORTED_TAG([CC]) 3669_LT_LANG_C_CONFIG 3670_LT_LANG_DEFAULT_CONFIG 3671_LT_CONFIG_COMMANDS 3672])# _LT_SETUP 3673 3674 3675# _LT_PREPARE_SED_QUOTE_VARS 3676# -------------------------- 3677# Define a few sed substitution that help us do robust quoting. 3678m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3679[# Backslashify metacharacters that are still active within 3680# double-quoted strings. 3681sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3682 3683# Same as above, but do not quote variable references. 3684double_quote_subst='s/\([["`\\]]\)/\\\1/g' 3685 3686# Sed substitution to delay expansion of an escaped shell variable in a 3687# double_quote_subst'ed string. 3688delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3689 3690# Sed substitution to delay expansion of an escaped single quote. 3691delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3692 3693# Sed substitution to avoid accidental globbing in evaled expressions 3694no_glob_subst='s/\*/\\\*/g' 3695]) 3696 3697# _LT_PROG_LTMAIN 3698# --------------- 3699# Note that this code is called both from 'configure', and 'config.status' 3700# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3701# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3702# so we pass a copy along to make sure it has a sensible value anyway. 3703m4_defun([_LT_PROG_LTMAIN], 3704[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3705_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3706ltmain=$ac_aux_dir/ltmain.sh 3707])# _LT_PROG_LTMAIN 3708 3709 3710 3711# So that we can recreate a full libtool script including additional 3712# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3713# in macros and then make a single call at the end using the 'libtool' 3714# label. 3715 3716 3717# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3718# ---------------------------------------- 3719# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3720m4_define([_LT_CONFIG_LIBTOOL_INIT], 3721[m4_ifval([$1], 3722 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3723 [$1 3724])])]) 3725 3726# Initialize. 3727m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3728 3729 3730# _LT_CONFIG_LIBTOOL([COMMANDS]) 3731# ------------------------------ 3732# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3733m4_define([_LT_CONFIG_LIBTOOL], 3734[m4_ifval([$1], 3735 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3736 [$1 3737])])]) 3738 3739# Initialize. 3740m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3741 3742 3743# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3744# ----------------------------------------------------- 3745m4_defun([_LT_CONFIG_SAVE_COMMANDS], 3746[_LT_CONFIG_LIBTOOL([$1]) 3747_LT_CONFIG_LIBTOOL_INIT([$2]) 3748]) 3749 3750 3751# _LT_FORMAT_COMMENT([COMMENT]) 3752# ----------------------------- 3753# Add leading comment marks to the start of each line, and a trailing 3754# full-stop to the whole comment if one is not present already. 3755m4_define([_LT_FORMAT_COMMENT], 3756[m4_ifval([$1], [ 3757m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3758 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3759)]) 3760 3761 3762 3763 3764 3765# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3766# ------------------------------------------------------------------- 3767# CONFIGNAME is the name given to the value in the libtool script. 3768# VARNAME is the (base) name used in the configure script. 3769# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3770# VARNAME. Any other value will be used directly. 3771m4_define([_LT_DECL], 3772[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3773 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3774 [m4_ifval([$1], [$1], [$2])]) 3775 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3776 m4_ifval([$4], 3777 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3778 lt_dict_add_subkey([lt_decl_dict], [$2], 3779 [tagged?], [m4_ifval([$5], [yes], [no])])]) 3780]) 3781 3782 3783# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3784# -------------------------------------------------------- 3785m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3786 3787 3788# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3789# ------------------------------------------------ 3790m4_define([lt_decl_tag_varnames], 3791[_lt_decl_filter([tagged?], [yes], $@)]) 3792 3793 3794# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3795# --------------------------------------------------------- 3796m4_define([_lt_decl_filter], 3797[m4_case([$#], 3798 [0], [m4_fatal([$0: too few arguments: $#])], 3799 [1], [m4_fatal([$0: too few arguments: $#: $1])], 3800 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3801 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3802 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3803]) 3804 3805 3806# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3807# -------------------------------------------------- 3808m4_define([lt_decl_quote_varnames], 3809[_lt_decl_filter([value], [1], $@)]) 3810 3811 3812# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3813# --------------------------------------------------- 3814m4_define([lt_decl_dquote_varnames], 3815[_lt_decl_filter([value], [2], $@)]) 3816 3817 3818# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3819# --------------------------------------------------- 3820m4_define([lt_decl_varnames_tagged], 3821[m4_assert([$# <= 2])dnl 3822_$0(m4_quote(m4_default([$1], [[, ]])), 3823 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3824 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3825m4_define([_lt_decl_varnames_tagged], 3826[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3827 3828 3829# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3830# ------------------------------------------------ 3831m4_define([lt_decl_all_varnames], 3832[_$0(m4_quote(m4_default([$1], [[, ]])), 3833 m4_if([$2], [], 3834 m4_quote(lt_decl_varnames), 3835 m4_quote(m4_shift($@))))[]dnl 3836]) 3837m4_define([_lt_decl_all_varnames], 3838[lt_join($@, lt_decl_varnames_tagged([$1], 3839 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3840]) 3841 3842 3843# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3844# ------------------------------------ 3845# Quote a variable value, and forward it to 'config.status' so that its 3846# declaration there will have the same value as in 'configure'. VARNAME 3847# must have a single quote delimited value for this to work. 3848m4_define([_LT_CONFIG_STATUS_DECLARE], 3849[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3850 3851 3852# _LT_CONFIG_STATUS_DECLARATIONS 3853# ------------------------------ 3854# We delimit libtool config variables with single quotes, so when 3855# we write them to config.status, we have to be sure to quote all 3856# embedded single quotes properly. In configure, this macro expands 3857# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3858# 3859# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3860m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3861[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3862 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3863 3864 3865# _LT_LIBTOOL_TAGS 3866# ---------------- 3867# Output comment and list of tags supported by the script 3868m4_defun([_LT_LIBTOOL_TAGS], 3869[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3870available_tags='_LT_TAGS'dnl 3871]) 3872 3873 3874# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3875# ----------------------------------- 3876# Extract the dictionary values for VARNAME (optionally with TAG) and 3877# expand to a commented shell variable setting: 3878# 3879# # Some comment about what VAR is for. 3880# visible_name=$lt_internal_name 3881m4_define([_LT_LIBTOOL_DECLARE], 3882[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3883 [description])))[]dnl 3884m4_pushdef([_libtool_name], 3885 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3886m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3887 [0], [_libtool_name=[$]$1], 3888 [1], [_libtool_name=$lt_[]$1], 3889 [2], [_libtool_name=$lt_[]$1], 3890 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3891m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3892]) 3893 3894 3895# _LT_LIBTOOL_CONFIG_VARS 3896# ----------------------- 3897# Produce commented declarations of non-tagged libtool config variables 3898# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3899# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3900# section) are produced by _LT_LIBTOOL_TAG_VARS. 3901m4_defun([_LT_LIBTOOL_CONFIG_VARS], 3902[m4_foreach([_lt_var], 3903 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3904 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3905 3906 3907# _LT_LIBTOOL_TAG_VARS(TAG) 3908# ------------------------- 3909m4_define([_LT_LIBTOOL_TAG_VARS], 3910[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3911 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3912 3913 3914# _LT_TAGVAR(VARNAME, [TAGNAME]) 3915# ------------------------------ 3916m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3917 3918 3919# _LT_CONFIG_COMMANDS 3920# ------------------- 3921# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3922# variables for single and double quote escaping we saved from calls 3923# to _LT_DECL, we can put quote escaped variables declarations 3924# into 'config.status', and then the shell code to quote escape them in 3925# for loops in 'config.status'. Finally, any additional code accumulated 3926# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3927m4_defun([_LT_CONFIG_COMMANDS], 3928[AC_PROVIDE_IFELSE([LT_OUTPUT], 3929 dnl If the libtool generation code has been placed in $CONFIG_LT, 3930 dnl instead of duplicating it all over again into config.status, 3931 dnl then we will have config.status run $CONFIG_LT later, so it 3932 dnl needs to know what name is stored there: 3933 [AC_CONFIG_COMMANDS([libtool], 3934 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3935 dnl If the libtool generation code is destined for config.status, 3936 dnl expand the accumulated commands and init code now: 3937 [AC_CONFIG_COMMANDS([libtool], 3938 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3939])#_LT_CONFIG_COMMANDS 3940 3941 3942# Initialize. 3943m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3944[ 3945 3946# The HP-UX ksh and POSIX shell print the target directory to stdout 3947# if CDPATH is set. 3948(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3949 3950sed_quote_subst='$sed_quote_subst' 3951double_quote_subst='$double_quote_subst' 3952delay_variable_subst='$delay_variable_subst' 3953_LT_CONFIG_STATUS_DECLARATIONS 3954LTCC='$LTCC' 3955LTCFLAGS='$LTCFLAGS' 3956compiler='$compiler_DEFAULT' 3957 3958# A function that is used when there is no print builtin or printf. 3959func_fallback_echo () 3960{ 3961 eval 'cat <<_LTECHO_EOF 3962\$[]1 3963_LTECHO_EOF' 3964} 3965 3966# Quote evaled strings. 3967for var in lt_decl_all_varnames([[ \ 3968]], lt_decl_quote_varnames); do 3969 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3970 *[[\\\\\\\`\\"\\\$]]*) 3971 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3972 ;; 3973 *) 3974 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3975 ;; 3976 esac 3977done 3978 3979# Double-quote double-evaled strings. 3980for var in lt_decl_all_varnames([[ \ 3981]], lt_decl_dquote_varnames); do 3982 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3983 *[[\\\\\\\`\\"\\\$]]*) 3984 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3985 ;; 3986 *) 3987 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3988 ;; 3989 esac 3990done 3991 3992_LT_OUTPUT_LIBTOOL_INIT 3993]) 3994 3995# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3996# ------------------------------------ 3997# Generate a child script FILE with all initialization necessary to 3998# reuse the environment learned by the parent script, and make the 3999# file executable. If COMMENT is supplied, it is inserted after the 4000# '#!' sequence but before initialization text begins. After this 4001# macro, additional text can be appended to FILE to form the body of 4002# the child script. The macro ends with non-zero status if the 4003# file could not be fully written (such as if the disk is full). 4004m4_ifdef([AS_INIT_GENERATED], 4005[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4006[m4_defun([_LT_GENERATED_FILE_INIT], 4007[m4_require([AS_PREPARE])]dnl 4008[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4009[lt_write_fail=0 4010cat >$1 <<_ASEOF || lt_write_fail=1 4011#! $SHELL 4012# Generated by $as_me. 4013$2 4014SHELL=\${CONFIG_SHELL-$SHELL} 4015export SHELL 4016_ASEOF 4017cat >>$1 <<\_ASEOF || lt_write_fail=1 4018AS_SHELL_SANITIZE 4019_AS_PREPARE 4020exec AS_MESSAGE_FD>&1 4021_ASEOF 4022test 0 = "$lt_write_fail" && chmod +x $1[]dnl 4023m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4024 4025# LT_OUTPUT 4026# --------- 4027# This macro allows early generation of the libtool script (before 4028# AC_OUTPUT is called), incase it is used in configure for compilation 4029# tests. 4030AC_DEFUN([LT_OUTPUT], 4031[: ${CONFIG_LT=./config.lt} 4032AC_MSG_NOTICE([creating $CONFIG_LT]) 4033_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4034[# Run this file to recreate a libtool stub with the current configuration.]) 4035 4036cat >>"$CONFIG_LT" <<\_LTEOF 4037lt_cl_silent=false 4038exec AS_MESSAGE_LOG_FD>>config.log 4039{ 4040 echo 4041 AS_BOX([Running $as_me.]) 4042} >&AS_MESSAGE_LOG_FD 4043 4044lt_cl_help="\ 4045'$as_me' creates a local libtool stub from the current configuration, 4046for use in further configure time tests before the real libtool is 4047generated. 4048 4049Usage: $[0] [[OPTIONS]] 4050 4051 -h, --help print this help, then exit 4052 -V, --version print version number, then exit 4053 -q, --quiet do not print progress messages 4054 -d, --debug don't remove temporary files 4055 4056Report bugs to <bug-libtool@gnu.org>." 4057 4058lt_cl_version="\ 4059m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4060m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4061configured by $[0], generated by m4_PACKAGE_STRING. 4062 4063Copyright (C) 2011 Free Software Foundation, Inc. 4064This config.lt script is free software; the Free Software Foundation 4065gives unlimited permision to copy, distribute and modify it." 4066 4067while test 0 != $[#] 4068do 4069 case $[1] in 4070 --version | --v* | -V ) 4071 echo "$lt_cl_version"; exit 0 ;; 4072 --help | --h* | -h ) 4073 echo "$lt_cl_help"; exit 0 ;; 4074 --debug | --d* | -d ) 4075 debug=: ;; 4076 --quiet | --q* | --silent | --s* | -q ) 4077 lt_cl_silent=: ;; 4078 4079 -*) AC_MSG_ERROR([unrecognized option: $[1] 4080Try '$[0] --help' for more information.]) ;; 4081 4082 *) AC_MSG_ERROR([unrecognized argument: $[1] 4083Try '$[0] --help' for more information.]) ;; 4084 esac 4085 shift 4086done 4087 4088if $lt_cl_silent; then 4089 exec AS_MESSAGE_FD>/dev/null 4090fi 4091_LTEOF 4092 4093cat >>"$CONFIG_LT" <<_LTEOF 4094_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4095_LTEOF 4096 4097cat >>"$CONFIG_LT" <<\_LTEOF 4098AC_MSG_NOTICE([creating $ofile]) 4099_LT_OUTPUT_LIBTOOL_COMMANDS 4100AS_EXIT(0) 4101_LTEOF 4102chmod +x "$CONFIG_LT" 4103 4104# configure is writing to config.log, but config.lt does its own redirection, 4105# appending to config.log, which fails on DOS, as config.log is still kept 4106# open by configure. Here we exec the FD to /dev/null, effectively closing 4107# config.log, so it can be properly (re)opened and appended to by config.lt. 4108lt_cl_success=: 4109test yes = "$silent" && 4110 lt_config_lt_args="$lt_config_lt_args --quiet" 4111exec AS_MESSAGE_LOG_FD>/dev/null 4112$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4113exec AS_MESSAGE_LOG_FD>>config.log 4114$lt_cl_success || AS_EXIT(1) 4115])# LT_OUTPUT 4116 4117 4118# _LT_CONFIG(TAG) 4119# --------------- 4120# If TAG is the built-in tag, create an initial libtool script with a 4121# default configuration from the untagged config vars. Otherwise add code 4122# to config.status for appending the configuration named by TAG from the 4123# matching tagged config vars. 4124m4_defun([_LT_CONFIG], 4125[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4126_LT_CONFIG_SAVE_COMMANDS([ 4127 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4128 m4_if(_LT_TAG, [C], [ 4129 # See if we are running on zsh, and set the options that allow our 4130 # commands through without removal of \ escapes. 4131 if test -n "${ZSH_VERSION+set}"; then 4132 setopt NO_GLOB_SUBST 4133 fi 4134 4135 cfgfile=${ofile}T 4136 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4137 $RM "$cfgfile" 4138 4139 cat <<_LT_EOF >> "$cfgfile" 4140#! $SHELL 4141# Generated automatically by $as_me ($PACKAGE) $VERSION 4142# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4143# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4144 4145# Provide generalized library-building support services. 4146# Written by Gordon Matzigkeit, 1996 4147 4148_LT_COPYING 4149_LT_LIBTOOL_TAGS 4150 4151# Configured defaults for sys_lib_dlsearch_path munging. 4152: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4153 4154# ### BEGIN LIBTOOL CONFIG 4155_LT_LIBTOOL_CONFIG_VARS 4156_LT_LIBTOOL_TAG_VARS 4157# ### END LIBTOOL CONFIG 4158 4159_LT_EOF 4160 4161 cat <<'_LT_EOF' >> "$cfgfile" 4162 4163# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4164 4165_LT_PREPARE_MUNGE_PATH_LIST 4166_LT_PREPARE_CC_BASENAME 4167 4168# ### END FUNCTIONS SHARED WITH CONFIGURE 4169 4170_LT_EOF 4171 4172 case $host_os in 4173 aix3*) 4174 cat <<\_LT_EOF >> "$cfgfile" 4175# AIX sometimes has problems with the GCC collect2 program. For some 4176# reason, if we set the COLLECT_NAMES environment variable, the problems 4177# vanish in a puff of smoke. 4178if test set != "${COLLECT_NAMES+set}"; then 4179 COLLECT_NAMES= 4180 export COLLECT_NAMES 4181fi 4182_LT_EOF 4183 ;; 4184 esac 4185 4186 _LT_PROG_LTMAIN 4187 4188 # We use sed instead of cat because bash on DJGPP gets confused if 4189 # if finds mixed CR/LF and LF-only lines. Since sed operates in 4190 # text mode, it properly converts lines to CR/LF. This bash problem 4191 # is reportedly fixed, but why not run on old versions too? 4192 $SED '$q' "$ltmain" >> "$cfgfile" \ 4193 || (rm -f "$cfgfile"; exit 1) 4194 4195 mv -f "$cfgfile" "$ofile" || 4196 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4197 chmod +x "$ofile" 4198], 4199[cat <<_LT_EOF >> "$ofile" 4200 4201dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4202dnl in a comment (ie after a #). 4203# ### BEGIN LIBTOOL TAG CONFIG: $1 4204_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4205# ### END LIBTOOL TAG CONFIG: $1 4206_LT_EOF 4207])dnl /m4_if 4208], 4209[m4_if([$1], [], [ 4210 PACKAGE='$PACKAGE' 4211 VERSION='$VERSION' 4212 RM='$RM' 4213 ofile='$ofile'], []) 4214])dnl /_LT_CONFIG_SAVE_COMMANDS 4215])# _LT_CONFIG 4216 4217 4218# LT_SUPPORTED_TAG(TAG) 4219# --------------------- 4220# Trace this macro to discover what tags are supported by the libtool 4221# --tag option, using: 4222# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4223AC_DEFUN([LT_SUPPORTED_TAG], []) 4224 4225 4226# C support is built-in for now 4227m4_define([_LT_LANG_C_enabled], []) 4228m4_define([_LT_TAGS], []) 4229 4230 4231# LT_LANG(LANG) 4232# ------------- 4233# Enable libtool support for the given language if not already enabled. 4234AC_DEFUN([LT_LANG], 4235[AC_BEFORE([$0], [LT_OUTPUT])dnl 4236m4_case([$1], 4237 [C], [_LT_LANG(C)], 4238 [C++], [_LT_LANG(CXX)], 4239 [Go], [_LT_LANG(GO)], 4240 [Java], [_LT_LANG(GCJ)], 4241 [Fortran 77], [_LT_LANG(F77)], 4242 [Fortran], [_LT_LANG(FC)], 4243 [Windows Resource], [_LT_LANG(RC)], 4244 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4245 [_LT_LANG($1)], 4246 [m4_fatal([$0: unsupported language: "$1"])])])dnl 4247])# LT_LANG 4248 4249 4250# _LT_LANG(LANGNAME) 4251# ------------------ 4252m4_defun([_LT_LANG], 4253[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4254 [LT_SUPPORTED_TAG([$1])dnl 4255 m4_append([_LT_TAGS], [$1 ])dnl 4256 m4_define([_LT_LANG_]$1[_enabled], [])dnl 4257 _LT_LANG_$1_CONFIG($1)])dnl 4258])# _LT_LANG 4259 4260 4261m4_ifndef([AC_PROG_GO], [ 4262# NOTE: This macro has been submitted for inclusion into # 4263# GNU Autoconf as AC_PROG_GO. When it is available in # 4264# a released version of Autoconf we should remove this # 4265# macro and use it instead. # 4266m4_defun([AC_PROG_GO], 4267[AC_LANG_PUSH(Go)dnl 4268AC_ARG_VAR([GOC], [Go compiler command])dnl 4269AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4270_AC_ARG_VAR_LDFLAGS()dnl 4271AC_CHECK_TOOL(GOC, gccgo) 4272if test -z "$GOC"; then 4273 if test -n "$ac_tool_prefix"; then 4274 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4275 fi 4276fi 4277if test -z "$GOC"; then 4278 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4279fi 4280])#m4_defun 4281])#m4_ifndef 4282 4283 4284# _LT_LANG_DEFAULT_CONFIG 4285# ----------------------- 4286m4_defun([_LT_LANG_DEFAULT_CONFIG], 4287[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4288 [LT_LANG(CXX)], 4289 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4290 4291AC_PROVIDE_IFELSE([AC_PROG_F77], 4292 [LT_LANG(F77)], 4293 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4294 4295AC_PROVIDE_IFELSE([AC_PROG_FC], 4296 [LT_LANG(FC)], 4297 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4298 4299dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4300dnl pulling things in needlessly. 4301AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4302 [LT_LANG(GCJ)], 4303 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4304 [LT_LANG(GCJ)], 4305 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4306 [LT_LANG(GCJ)], 4307 [m4_ifdef([AC_PROG_GCJ], 4308 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4309 m4_ifdef([A][M_PROG_GCJ], 4310 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4311 m4_ifdef([LT_PROG_GCJ], 4312 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4313 4314AC_PROVIDE_IFELSE([AC_PROG_GO], 4315 [LT_LANG(GO)], 4316 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4317 4318AC_PROVIDE_IFELSE([LT_PROG_RC], 4319 [LT_LANG(RC)], 4320 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4321])# _LT_LANG_DEFAULT_CONFIG 4322 4323# Obsolete macros: 4324AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4325AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4326AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4327AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4328AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4329dnl aclocal-1.4 backwards compatibility: 4330dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4331dnl AC_DEFUN([AC_LIBTOOL_F77], []) 4332dnl AC_DEFUN([AC_LIBTOOL_FC], []) 4333dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4334dnl AC_DEFUN([AC_LIBTOOL_RC], []) 4335 4336 4337# _LT_TAG_COMPILER 4338# ---------------- 4339m4_defun([_LT_TAG_COMPILER], 4340[AC_REQUIRE([AC_PROG_CC])dnl 4341 4342_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4343_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4344_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4345_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4346 4347# If no C compiler was specified, use CC. 4348LTCC=${LTCC-"$CC"} 4349 4350# If no C compiler flags were specified, use CFLAGS. 4351LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4352 4353# Allow CC to be a program name with arguments. 4354compiler=$CC 4355])# _LT_TAG_COMPILER 4356 4357 4358# _LT_COMPILER_BOILERPLATE 4359# ------------------------ 4360# Check for compiler boilerplate output or warnings with 4361# the simple compiler test code. 4362m4_defun([_LT_COMPILER_BOILERPLATE], 4363[m4_require([_LT_DECL_SED])dnl 4364ac_outfile=conftest.$ac_objext 4365echo "$lt_simple_compile_test_code" >conftest.$ac_ext 4366eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4367_lt_compiler_boilerplate=`cat conftest.err` 4368$RM conftest* 4369])# _LT_COMPILER_BOILERPLATE 4370 4371 4372# _LT_LINKER_BOILERPLATE 4373# ---------------------- 4374# Check for linker boilerplate output or warnings with 4375# the simple link test code. 4376m4_defun([_LT_LINKER_BOILERPLATE], 4377[m4_require([_LT_DECL_SED])dnl 4378ac_outfile=conftest.$ac_objext 4379echo "$lt_simple_link_test_code" >conftest.$ac_ext 4380eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4381_lt_linker_boilerplate=`cat conftest.err` 4382$RM -r conftest* 4383])# _LT_LINKER_BOILERPLATE 4384 4385# _LT_REQUIRED_DARWIN_CHECKS 4386# ------------------------- 4387m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4388 case $host_os in 4389 rhapsody* | darwin*) 4390 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4391 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4392 AC_CHECK_TOOL([LIPO], [lipo], [:]) 4393 AC_CHECK_TOOL([OTOOL], [otool], [:]) 4394 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4395 _LT_DECL([], [DSYMUTIL], [1], 4396 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4397 _LT_DECL([], [NMEDIT], [1], 4398 [Tool to change global to local symbols on Mac OS X]) 4399 _LT_DECL([], [LIPO], [1], 4400 [Tool to manipulate fat objects and archives on Mac OS X]) 4401 _LT_DECL([], [OTOOL], [1], 4402 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4403 _LT_DECL([], [OTOOL64], [1], 4404 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4405 4406 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4407 [lt_cv_apple_cc_single_mod=no 4408 if test -z "$LT_MULTI_MODULE"; then 4409 # By default we will add the -single_module flag. You can override 4410 # by either setting the environment variable LT_MULTI_MODULE 4411 # non-empty at configure time, or by adding -multi_module to the 4412 # link flags. 4413 rm -rf libconftest.dylib* 4414 echo "int foo(void){return 1;}" > conftest.c 4415 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4416-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4417 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4418 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4419 _lt_result=$? 4420 # If there is a non-empty error log, and "single_module" 4421 # appears in it, assume the flag caused a linker warning 4422 if test -s conftest.err && $GREP single_module conftest.err; then 4423 cat conftest.err >&AS_MESSAGE_LOG_FD 4424 # Otherwise, if the output was created with a 0 exit code from 4425 # the compiler, it worked. 4426 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4427 lt_cv_apple_cc_single_mod=yes 4428 else 4429 cat conftest.err >&AS_MESSAGE_LOG_FD 4430 fi 4431 rm -rf libconftest.dylib* 4432 rm -f conftest.* 4433 fi]) 4434 4435 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4436 [lt_cv_ld_exported_symbols_list], 4437 [lt_cv_ld_exported_symbols_list=no 4438 save_LDFLAGS=$LDFLAGS 4439 echo "_main" > conftest.sym 4440 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4441 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4442 [lt_cv_ld_exported_symbols_list=yes], 4443 [lt_cv_ld_exported_symbols_list=no]) 4444 LDFLAGS=$save_LDFLAGS 4445 ]) 4446 4447 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4448 [lt_cv_ld_force_load=no 4449 cat > conftest.c << _LT_EOF 4450int forced_loaded() { return 2;} 4451_LT_EOF 4452 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4453 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4454 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4455 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4456 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4457 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4458 cat > conftest.c << _LT_EOF 4459int main() { return 0;} 4460_LT_EOF 4461 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4462 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4463 _lt_result=$? 4464 if test -s conftest.err && $GREP force_load conftest.err; then 4465 cat conftest.err >&AS_MESSAGE_LOG_FD 4466 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4467 lt_cv_ld_force_load=yes 4468 else 4469 cat conftest.err >&AS_MESSAGE_LOG_FD 4470 fi 4471 rm -f conftest.err libconftest.a conftest conftest.c 4472 rm -rf conftest.dSYM 4473 ]) 4474 case $host_os in 4475 rhapsody* | darwin1.[[012]]) 4476 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4477 darwin1.*) 4478 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4479 darwin*) 4480 case $MACOSX_DEPLOYMENT_TARGET,$host in 4481 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4482 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4483 *) 4484 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4485 esac 4486 ;; 4487 esac 4488 if test yes = "$lt_cv_apple_cc_single_mod"; then 4489 _lt_dar_single_mod='$single_module' 4490 fi 4491 if test yes = "$lt_cv_ld_exported_symbols_list"; then 4492 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4493 else 4494 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4495 fi 4496 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4497 _lt_dsymutil='~$DSYMUTIL $lib || :' 4498 else 4499 _lt_dsymutil= 4500 fi 4501 ;; 4502 esac 4503]) 4504 4505 4506# _LT_DARWIN_LINKER_FEATURES([TAG]) 4507# --------------------------------- 4508# Checks for linker and compiler features on darwin 4509m4_defun([_LT_DARWIN_LINKER_FEATURES], 4510[ 4511 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4512 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4513 _LT_TAGVAR(hardcode_direct, $1)=no 4514 _LT_TAGVAR(hardcode_automatic, $1)=yes 4515 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4516 if test yes = "$lt_cv_ld_force_load"; then 4517 _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\"`' 4518 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4519 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4520 else 4521 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4522 fi 4523 _LT_TAGVAR(link_all_deplibs, $1)=yes 4524 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4525 case $cc_basename in 4526 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4527 *) _lt_dar_can_shared=$GCC ;; 4528 esac 4529 if test yes = "$_lt_dar_can_shared"; then 4530 output_verbose_link_cmd=func_echo_all 4531 _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" 4532 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4533 _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" 4534 _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" 4535 m4_if([$1], [CXX], 4536[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4537 _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" 4538 _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" 4539 fi 4540],[]) 4541 else 4542 _LT_TAGVAR(ld_shlibs, $1)=no 4543 fi 4544]) 4545 4546# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4547# ---------------------------------- 4548# Links a minimal program and checks the executable 4549# for the system default hardcoded library path. In most cases, 4550# this is /usr/lib:/lib, but when the MPI compilers are used 4551# the location of the communication and MPI libs are included too. 4552# If we don't find anything, use the default library path according 4553# to the aix ld manual. 4554# Store the results from the different compilers for each TAGNAME. 4555# Allow to override them for all tags through lt_cv_aix_libpath. 4556m4_defun([_LT_SYS_MODULE_PATH_AIX], 4557[m4_require([_LT_DECL_SED])dnl 4558if test set = "${lt_cv_aix_libpath+set}"; then 4559 aix_libpath=$lt_cv_aix_libpath 4560else 4561 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4562 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4563 lt_aix_libpath_sed='[ 4564 /Import File Strings/,/^$/ { 4565 /^0/ { 4566 s/^0 *\([^ ]*\) *$/\1/ 4567 p 4568 } 4569 }]' 4570 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4571 # Check for a 64-bit object if we didn't find anything. 4572 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4573 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4574 fi],[]) 4575 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4576 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4577 fi 4578 ]) 4579 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4580fi 4581])# _LT_SYS_MODULE_PATH_AIX 4582 4583 4584# _LT_SHELL_INIT(ARG) 4585# ------------------- 4586m4_define([_LT_SHELL_INIT], 4587[m4_divert_text([M4SH-INIT], [$1 4588])])# _LT_SHELL_INIT 4589 4590 4591 4592# _LT_PROG_ECHO_BACKSLASH 4593# ----------------------- 4594# Find how we can fake an echo command that does not interpret backslash. 4595# In particular, with Autoconf 2.60 or later we add some code to the start 4596# of the generated configure script that will find a shell with a builtin 4597# printf (that we can use as an echo command). 4598m4_defun([_LT_PROG_ECHO_BACKSLASH], 4599[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4600ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4601ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4602 4603AC_MSG_CHECKING([how to print strings]) 4604# Test print first, because it will be a builtin if present. 4605if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4606 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4607 ECHO='print -r --' 4608elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4609 ECHO='printf %s\n' 4610else 4611 # Use this function as a fallback that always works. 4612 func_fallback_echo () 4613 { 4614 eval 'cat <<_LTECHO_EOF 4615$[]1 4616_LTECHO_EOF' 4617 } 4618 ECHO='func_fallback_echo' 4619fi 4620 4621# func_echo_all arg... 4622# Invoke $ECHO with all args, space-separated. 4623func_echo_all () 4624{ 4625 $ECHO "$*" 4626} 4627 4628case $ECHO in 4629 printf*) AC_MSG_RESULT([printf]) ;; 4630 print*) AC_MSG_RESULT([print -r]) ;; 4631 *) AC_MSG_RESULT([cat]) ;; 4632esac 4633 4634m4_ifdef([_AS_DETECT_SUGGESTED], 4635[_AS_DETECT_SUGGESTED([ 4636 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4637 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4638 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4639 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4640 PATH=/empty FPATH=/empty; export PATH FPATH 4641 test "X`printf %s $ECHO`" = "X$ECHO" \ 4642 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4643 4644_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4645_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4646])# _LT_PROG_ECHO_BACKSLASH 4647 4648 4649# _LT_WITH_SYSROOT 4650# ---------------- 4651AC_DEFUN([_LT_WITH_SYSROOT], 4652[m4_require([_LT_DECL_SED])dnl 4653AC_MSG_CHECKING([for sysroot]) 4654AC_ARG_WITH([sysroot], 4655[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4656 [Search for dependent libraries within DIR (or the compiler's sysroot 4657 if not specified).])], 4658[], [with_sysroot=no]) 4659 4660dnl lt_sysroot will always be passed unquoted. We quote it here 4661dnl in case the user passed a directory name. 4662lt_sysroot= 4663case $with_sysroot in #( 4664 yes) 4665 if test yes = "$GCC"; then 4666 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4667 fi 4668 ;; #( 4669 /*) 4670 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4671 ;; #( 4672 no|'') 4673 ;; #( 4674 *) 4675 AC_MSG_RESULT([$with_sysroot]) 4676 AC_MSG_ERROR([The sysroot must be an absolute path.]) 4677 ;; 4678esac 4679 4680 AC_MSG_RESULT([${lt_sysroot:-no}]) 4681_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4682[dependent libraries, and where our libraries should be installed.])]) 4683 4684# _LT_ENABLE_LOCK 4685# --------------- 4686m4_defun([_LT_ENABLE_LOCK], 4687[AC_ARG_ENABLE([libtool-lock], 4688 [AS_HELP_STRING([--disable-libtool-lock], 4689 [avoid locking (might break parallel builds)])]) 4690test no = "$enable_libtool_lock" || enable_libtool_lock=yes 4691 4692# Some flags need to be propagated to the compiler or linker for good 4693# libtool support. 4694case $host in 4695ia64-*-hpux*) 4696 # Find out what ABI is being produced by ac_compile, and set mode 4697 # options accordingly. 4698 echo 'int i;' > conftest.$ac_ext 4699 if AC_TRY_EVAL(ac_compile); then 4700 case `$FILECMD conftest.$ac_objext` in 4701 *ELF-32*) 4702 HPUX_IA64_MODE=32 4703 ;; 4704 *ELF-64*) 4705 HPUX_IA64_MODE=64 4706 ;; 4707 esac 4708 fi 4709 rm -rf conftest* 4710 ;; 4711*-*-irix6*) 4712 # Find out what ABI is being produced by ac_compile, and set linker 4713 # options accordingly. 4714 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4715 if AC_TRY_EVAL(ac_compile); then 4716 if test yes = "$lt_cv_prog_gnu_ld"; then 4717 case `$FILECMD conftest.$ac_objext` in 4718 *32-bit*) 4719 LD="${LD-ld} -melf32bsmip" 4720 ;; 4721 *N32*) 4722 LD="${LD-ld} -melf32bmipn32" 4723 ;; 4724 *64-bit*) 4725 LD="${LD-ld} -melf64bmip" 4726 ;; 4727 esac 4728 else 4729 case `$FILECMD conftest.$ac_objext` in 4730 *32-bit*) 4731 LD="${LD-ld} -32" 4732 ;; 4733 *N32*) 4734 LD="${LD-ld} -n32" 4735 ;; 4736 *64-bit*) 4737 LD="${LD-ld} -64" 4738 ;; 4739 esac 4740 fi 4741 fi 4742 rm -rf conftest* 4743 ;; 4744 4745mips64*-*linux*) 4746 # Find out what ABI is being produced by ac_compile, and set linker 4747 # options accordingly. 4748 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4749 if AC_TRY_EVAL(ac_compile); then 4750 emul=elf 4751 case `$FILECMD conftest.$ac_objext` in 4752 *32-bit*) 4753 emul="${emul}32" 4754 ;; 4755 *64-bit*) 4756 emul="${emul}64" 4757 ;; 4758 esac 4759 case `$FILECMD conftest.$ac_objext` in 4760 *MSB*) 4761 emul="${emul}btsmip" 4762 ;; 4763 *LSB*) 4764 emul="${emul}ltsmip" 4765 ;; 4766 esac 4767 case `$FILECMD conftest.$ac_objext` in 4768 *N32*) 4769 emul="${emul}n32" 4770 ;; 4771 esac 4772 LD="${LD-ld} -m $emul" 4773 fi 4774 rm -rf conftest* 4775 ;; 4776 4777x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4778s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4779 # Find out what ABI is being produced by ac_compile, and set linker 4780 # options accordingly. Note that the listed cases only cover the 4781 # situations where additional linker options are needed (such as when 4782 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4783 # vice versa); the common cases where no linker options are needed do 4784 # not appear in the list. 4785 echo 'int i;' > conftest.$ac_ext 4786 if AC_TRY_EVAL(ac_compile); then 4787 case `$FILECMD conftest.o` in 4788 *32-bit*) 4789 case $host in 4790 x86_64-*kfreebsd*-gnu) 4791 LD="${LD-ld} -m elf_i386_fbsd" 4792 ;; 4793 x86_64-*linux*) 4794 case `$FILECMD conftest.o` in 4795 *x86-64*) 4796 LD="${LD-ld} -m elf32_x86_64" 4797 ;; 4798 *) 4799 LD="${LD-ld} -m elf_i386" 4800 ;; 4801 esac 4802 ;; 4803 powerpc64le-*linux*) 4804 LD="${LD-ld} -m elf32lppclinux" 4805 ;; 4806 powerpc64-*linux*) 4807 LD="${LD-ld} -m elf32ppclinux" 4808 ;; 4809 s390x-*linux*) 4810 LD="${LD-ld} -m elf_s390" 4811 ;; 4812 sparc64-*linux*) 4813 LD="${LD-ld} -m elf32_sparc" 4814 ;; 4815 esac 4816 ;; 4817 *64-bit*) 4818 case $host in 4819 x86_64-*kfreebsd*-gnu) 4820 LD="${LD-ld} -m elf_x86_64_fbsd" 4821 ;; 4822 x86_64-*linux*) 4823 LD="${LD-ld} -m elf_x86_64" 4824 ;; 4825 powerpcle-*linux*) 4826 LD="${LD-ld} -m elf64lppc" 4827 ;; 4828 powerpc-*linux*) 4829 LD="${LD-ld} -m elf64ppc" 4830 ;; 4831 s390*-*linux*|s390*-*tpf*) 4832 LD="${LD-ld} -m elf64_s390" 4833 ;; 4834 sparc*-*linux*) 4835 LD="${LD-ld} -m elf64_sparc" 4836 ;; 4837 esac 4838 ;; 4839 esac 4840 fi 4841 rm -rf conftest* 4842 ;; 4843 4844*-*-sco3.2v5*) 4845 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4846 SAVE_CFLAGS=$CFLAGS 4847 CFLAGS="$CFLAGS -belf" 4848 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4849 [AC_LANG_PUSH(C) 4850 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4851 AC_LANG_POP]) 4852 if test yes != "$lt_cv_cc_needs_belf"; then 4853 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4854 CFLAGS=$SAVE_CFLAGS 4855 fi 4856 ;; 4857*-*solaris*) 4858 # Find out what ABI is being produced by ac_compile, and set linker 4859 # options accordingly. 4860 echo 'int i;' > conftest.$ac_ext 4861 if AC_TRY_EVAL(ac_compile); then 4862 case `$FILECMD conftest.o` in 4863 *64-bit*) 4864 case $lt_cv_prog_gnu_ld in 4865 yes*) 4866 case $host in 4867 i?86-*-solaris*|x86_64-*-solaris*) 4868 LD="${LD-ld} -m elf_x86_64" 4869 ;; 4870 sparc*-*-solaris*) 4871 LD="${LD-ld} -m elf64_sparc" 4872 ;; 4873 esac 4874 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4875 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4876 LD=${LD-ld}_sol2 4877 fi 4878 ;; 4879 *) 4880 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4881 LD="${LD-ld} -64" 4882 fi 4883 ;; 4884 esac 4885 ;; 4886 esac 4887 fi 4888 rm -rf conftest* 4889 ;; 4890esac 4891 4892need_locks=$enable_libtool_lock 4893])# _LT_ENABLE_LOCK 4894 4895 4896# _LT_PROG_AR 4897# ----------- 4898m4_defun([_LT_PROG_AR], 4899[AC_CHECK_TOOLS(AR, [ar], false) 4900: ${AR=ar} 4901_LT_DECL([], [AR], [1], [The archiver]) 4902 4903# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4904# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4905# higher priority because thats what people were doing historically (setting 4906# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4907# variable obsoleted/removed. 4908 4909test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4910lt_ar_flags=$AR_FLAGS 4911_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4912 4913# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4914# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4915_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4916 [Flags to create an archive]) 4917 4918AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4919 [lt_cv_ar_at_file=no 4920 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4921 [echo conftest.$ac_objext > conftest.lst 4922 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4923 AC_TRY_EVAL([lt_ar_try]) 4924 if test 0 -eq "$ac_status"; then 4925 # Ensure the archiver fails upon bogus file names. 4926 rm -f conftest.$ac_objext libconftest.a 4927 AC_TRY_EVAL([lt_ar_try]) 4928 if test 0 -ne "$ac_status"; then 4929 lt_cv_ar_at_file=@ 4930 fi 4931 fi 4932 rm -f conftest.* libconftest.a 4933 ]) 4934 ]) 4935 4936if test no = "$lt_cv_ar_at_file"; then 4937 archiver_list_spec= 4938else 4939 archiver_list_spec=$lt_cv_ar_at_file 4940fi 4941_LT_DECL([], [archiver_list_spec], [1], 4942 [How to feed a file listing to the archiver]) 4943])# _LT_PROG_AR 4944 4945 4946# _LT_CMD_OLD_ARCHIVE 4947# ------------------- 4948m4_defun([_LT_CMD_OLD_ARCHIVE], 4949[_LT_PROG_AR 4950 4951AC_CHECK_TOOL(STRIP, strip, :) 4952test -z "$STRIP" && STRIP=: 4953_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4954 4955AC_CHECK_TOOL(RANLIB, ranlib, :) 4956test -z "$RANLIB" && RANLIB=: 4957_LT_DECL([], [RANLIB], [1], 4958 [Commands used to install an old-style archive]) 4959 4960# Determine commands to create old-style static archives. 4961old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4962old_postinstall_cmds='chmod 644 $oldlib' 4963old_postuninstall_cmds= 4964 4965if test -n "$RANLIB"; then 4966 case $host_os in 4967 bitrig* | openbsd*) 4968 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 4969 ;; 4970 *) 4971 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 4972 ;; 4973 esac 4974 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4975fi 4976 4977case $host_os in 4978 darwin*) 4979 lock_old_archive_extraction=yes ;; 4980 *) 4981 lock_old_archive_extraction=no ;; 4982esac 4983_LT_DECL([], [old_postinstall_cmds], [2]) 4984_LT_DECL([], [old_postuninstall_cmds], [2]) 4985_LT_TAGDECL([], [old_archive_cmds], [2], 4986 [Commands used to build an old-style archive]) 4987_LT_DECL([], [lock_old_archive_extraction], [0], 4988 [Whether to use a lock for old archive extraction]) 4989])# _LT_CMD_OLD_ARCHIVE 4990 4991 4992# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4993# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4994# ---------------------------------------------------------------- 4995# Check whether the given compiler option works 4996AC_DEFUN([_LT_COMPILER_OPTION], 4997[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4998m4_require([_LT_DECL_SED])dnl 4999AC_CACHE_CHECK([$1], [$2], 5000 [$2=no 5001 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5002 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5003 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5004 # Insert the option either (1) after the last *FLAGS variable, or 5005 # (2) before a word containing "conftest.", or (3) at the end. 5006 # Note that $ac_compile itself does not contain backslashes and begins 5007 # with a dollar sign (not a hyphen), so the echo should work correctly. 5008 # The option is referenced via a variable to avoid confusing sed. 5009 lt_compile=`echo "$ac_compile" | $SED \ 5010 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5011 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5012 -e 's:$: $lt_compiler_flag:'` 5013 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5014 (eval "$lt_compile" 2>conftest.err) 5015 ac_status=$? 5016 cat conftest.err >&AS_MESSAGE_LOG_FD 5017 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5018 if (exit $ac_status) && test -s "$ac_outfile"; then 5019 # The compiler can only warn and ignore the option if not recognized 5020 # So say no if there are warnings other than the usual output. 5021 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5022 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5023 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5024 $2=yes 5025 fi 5026 fi 5027 $RM conftest* 5028]) 5029 5030if test yes = "[$]$2"; then 5031 m4_if([$5], , :, [$5]) 5032else 5033 m4_if([$6], , :, [$6]) 5034fi 5035])# _LT_COMPILER_OPTION 5036 5037# Old name: 5038AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5039dnl aclocal-1.4 backwards compatibility: 5040dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5041 5042 5043# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5044# [ACTION-SUCCESS], [ACTION-FAILURE]) 5045# ---------------------------------------------------- 5046# Check whether the given linker option works 5047AC_DEFUN([_LT_LINKER_OPTION], 5048[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5049m4_require([_LT_DECL_SED])dnl 5050AC_CACHE_CHECK([$1], [$2], 5051 [$2=no 5052 save_LDFLAGS=$LDFLAGS 5053 LDFLAGS="$LDFLAGS $3" 5054 echo "$lt_simple_link_test_code" > conftest.$ac_ext 5055 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5056 # The linker can only warn and ignore the option if not recognized 5057 # So say no if there are warnings 5058 if test -s conftest.err; then 5059 # Append any errors to the config.log. 5060 cat conftest.err 1>&AS_MESSAGE_LOG_FD 5061 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5062 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5063 if diff conftest.exp conftest.er2 >/dev/null; then 5064 $2=yes 5065 fi 5066 else 5067 $2=yes 5068 fi 5069 fi 5070 $RM -r conftest* 5071 LDFLAGS=$save_LDFLAGS 5072]) 5073 5074if test yes = "[$]$2"; then 5075 m4_if([$4], , :, [$4]) 5076else 5077 m4_if([$5], , :, [$5]) 5078fi 5079])# _LT_LINKER_OPTION 5080 5081# Old name: 5082AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5083dnl aclocal-1.4 backwards compatibility: 5084dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5085 5086 5087# LT_CMD_MAX_LEN 5088#--------------- 5089AC_DEFUN([LT_CMD_MAX_LEN], 5090[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5091# find the maximum length of command line arguments 5092AC_MSG_CHECKING([the maximum length of command line arguments]) 5093AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5094 i=0 5095 teststring=ABCD 5096 5097 case $build_os in 5098 msdosdjgpp*) 5099 # On DJGPP, this test can blow up pretty badly due to problems in libc 5100 # (any single argument exceeding 2000 bytes causes a buffer overrun 5101 # during glob expansion). Even if it were fixed, the result of this 5102 # check would be larger than it should be. 5103 lt_cv_sys_max_cmd_len=12288; # 12K is about right 5104 ;; 5105 5106 gnu*) 5107 # Under GNU Hurd, this test is not required because there is 5108 # no limit to the length of command line arguments. 5109 # Libtool will interpret -1 as no limit whatsoever 5110 lt_cv_sys_max_cmd_len=-1; 5111 ;; 5112 5113 cygwin* | mingw* | cegcc*) 5114 # On Win9x/ME, this test blows up -- it succeeds, but takes 5115 # about 5 minutes as the teststring grows exponentially. 5116 # Worse, since 9x/ME are not pre-emptively multitasking, 5117 # you end up with a "frozen" computer, even though with patience 5118 # the test eventually succeeds (with a max line length of 256k). 5119 # Instead, let's just punt: use the minimum linelength reported by 5120 # all of the supported platforms: 8192 (on NT/2K/XP). 5121 lt_cv_sys_max_cmd_len=8192; 5122 ;; 5123 5124 mint*) 5125 # On MiNT this can take a long time and run out of memory. 5126 lt_cv_sys_max_cmd_len=8192; 5127 ;; 5128 5129 amigaos*) 5130 # On AmigaOS with pdksh, this test takes hours, literally. 5131 # So we just punt and use a minimum line length of 8192. 5132 lt_cv_sys_max_cmd_len=8192; 5133 ;; 5134 5135 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5136 # This has been around since 386BSD, at least. Likely further. 5137 if test -x /sbin/sysctl; then 5138 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5139 elif test -x /usr/sbin/sysctl; then 5140 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5141 else 5142 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5143 fi 5144 # And add a safety zone 5145 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5146 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5147 ;; 5148 5149 interix*) 5150 # We know the value 262144 and hardcode it with a safety zone (like BSD) 5151 lt_cv_sys_max_cmd_len=196608 5152 ;; 5153 5154 os2*) 5155 # The test takes a long time on OS/2. 5156 lt_cv_sys_max_cmd_len=8192 5157 ;; 5158 5159 osf*) 5160 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5161 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5162 # nice to cause kernel panics so lets avoid the loop below. 5163 # First set a reasonable default. 5164 lt_cv_sys_max_cmd_len=16384 5165 # 5166 if test -x /sbin/sysconfig; then 5167 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5168 *1*) lt_cv_sys_max_cmd_len=-1 ;; 5169 esac 5170 fi 5171 ;; 5172 sco3.2v5*) 5173 lt_cv_sys_max_cmd_len=102400 5174 ;; 5175 sysv5* | sco5v6* | sysv4.2uw2*) 5176 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5177 if test -n "$kargmax"; then 5178 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5179 else 5180 lt_cv_sys_max_cmd_len=32768 5181 fi 5182 ;; 5183 *) 5184 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5185 if test -n "$lt_cv_sys_max_cmd_len" && \ 5186 test undefined != "$lt_cv_sys_max_cmd_len"; then 5187 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5188 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5189 else 5190 # Make teststring a little bigger before we do anything with it. 5191 # a 1K string should be a reasonable start. 5192 for i in 1 2 3 4 5 6 7 8; do 5193 teststring=$teststring$teststring 5194 done 5195 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5196 # If test is not a shell built-in, we'll probably end up computing a 5197 # maximum length that is only half of the actual maximum length, but 5198 # we can't tell. 5199 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5200 = "X$teststring$teststring"; } >/dev/null 2>&1 && 5201 test 17 != "$i" # 1/2 MB should be enough 5202 do 5203 i=`expr $i + 1` 5204 teststring=$teststring$teststring 5205 done 5206 # Only check the string length outside the loop. 5207 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5208 teststring= 5209 # Add a significant safety factor because C++ compilers can tack on 5210 # massive amounts of additional arguments before passing them to the 5211 # linker. It appears as though 1/2 is a usable value. 5212 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5213 fi 5214 ;; 5215 esac 5216]) 5217if test -n "$lt_cv_sys_max_cmd_len"; then 5218 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5219else 5220 AC_MSG_RESULT(none) 5221fi 5222max_cmd_len=$lt_cv_sys_max_cmd_len 5223_LT_DECL([], [max_cmd_len], [0], 5224 [What is the maximum length of a command?]) 5225])# LT_CMD_MAX_LEN 5226 5227# Old name: 5228AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5229dnl aclocal-1.4 backwards compatibility: 5230dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5231 5232 5233# _LT_HEADER_DLFCN 5234# ---------------- 5235m4_defun([_LT_HEADER_DLFCN], 5236[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5237])# _LT_HEADER_DLFCN 5238 5239 5240# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5241# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5242# ---------------------------------------------------------------- 5243m4_defun([_LT_TRY_DLOPEN_SELF], 5244[m4_require([_LT_HEADER_DLFCN])dnl 5245if test yes = "$cross_compiling"; then : 5246 [$4] 5247else 5248 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5249 lt_status=$lt_dlunknown 5250 cat > conftest.$ac_ext <<_LT_EOF 5251[#line $LINENO "configure" 5252#include "confdefs.h" 5253 5254#if HAVE_DLFCN_H 5255#include <dlfcn.h> 5256#endif 5257 5258#include <stdio.h> 5259 5260#ifdef RTLD_GLOBAL 5261# define LT_DLGLOBAL RTLD_GLOBAL 5262#else 5263# ifdef DL_GLOBAL 5264# define LT_DLGLOBAL DL_GLOBAL 5265# else 5266# define LT_DLGLOBAL 0 5267# endif 5268#endif 5269 5270/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5271 find out it does not work in some platform. */ 5272#ifndef LT_DLLAZY_OR_NOW 5273# ifdef RTLD_LAZY 5274# define LT_DLLAZY_OR_NOW RTLD_LAZY 5275# else 5276# ifdef DL_LAZY 5277# define LT_DLLAZY_OR_NOW DL_LAZY 5278# else 5279# ifdef RTLD_NOW 5280# define LT_DLLAZY_OR_NOW RTLD_NOW 5281# else 5282# ifdef DL_NOW 5283# define LT_DLLAZY_OR_NOW DL_NOW 5284# else 5285# define LT_DLLAZY_OR_NOW 0 5286# endif 5287# endif 5288# endif 5289# endif 5290#endif 5291 5292/* When -fvisibility=hidden is used, assume the code has been annotated 5293 correspondingly for the symbols needed. */ 5294#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5295int fnord () __attribute__((visibility("default"))); 5296#endif 5297 5298int fnord () { return 42; } 5299int main () 5300{ 5301 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5302 int status = $lt_dlunknown; 5303 5304 if (self) 5305 { 5306 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5307 else 5308 { 5309 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5310 else puts (dlerror ()); 5311 } 5312 /* dlclose (self); */ 5313 } 5314 else 5315 puts (dlerror ()); 5316 5317 return status; 5318}] 5319_LT_EOF 5320 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5321 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5322 lt_status=$? 5323 case x$lt_status in 5324 x$lt_dlno_uscore) $1 ;; 5325 x$lt_dlneed_uscore) $2 ;; 5326 x$lt_dlunknown|x*) $3 ;; 5327 esac 5328 else : 5329 # compilation failed 5330 $3 5331 fi 5332fi 5333rm -fr conftest* 5334])# _LT_TRY_DLOPEN_SELF 5335 5336 5337# LT_SYS_DLOPEN_SELF 5338# ------------------ 5339AC_DEFUN([LT_SYS_DLOPEN_SELF], 5340[m4_require([_LT_HEADER_DLFCN])dnl 5341if test yes != "$enable_dlopen"; then 5342 enable_dlopen=unknown 5343 enable_dlopen_self=unknown 5344 enable_dlopen_self_static=unknown 5345else 5346 lt_cv_dlopen=no 5347 lt_cv_dlopen_libs= 5348 5349 case $host_os in 5350 beos*) 5351 lt_cv_dlopen=load_add_on 5352 lt_cv_dlopen_libs= 5353 lt_cv_dlopen_self=yes 5354 ;; 5355 5356 mingw* | pw32* | cegcc*) 5357 lt_cv_dlopen=LoadLibrary 5358 lt_cv_dlopen_libs= 5359 ;; 5360 5361 cygwin*) 5362 lt_cv_dlopen=dlopen 5363 lt_cv_dlopen_libs= 5364 ;; 5365 5366 darwin*) 5367 # if libdl is installed we need to link against it 5368 AC_CHECK_LIB([dl], [dlopen], 5369 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5370 lt_cv_dlopen=dyld 5371 lt_cv_dlopen_libs= 5372 lt_cv_dlopen_self=yes 5373 ]) 5374 ;; 5375 5376 tpf*) 5377 # Don't try to run any link tests for TPF. We know it's impossible 5378 # because TPF is a cross-compiler, and we know how we open DSOs. 5379 lt_cv_dlopen=dlopen 5380 lt_cv_dlopen_libs= 5381 lt_cv_dlopen_self=no 5382 ;; 5383 5384 *) 5385 AC_CHECK_FUNC([shl_load], 5386 [lt_cv_dlopen=shl_load], 5387 [AC_CHECK_LIB([dld], [shl_load], 5388 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5389 [AC_CHECK_FUNC([dlopen], 5390 [lt_cv_dlopen=dlopen], 5391 [AC_CHECK_LIB([dl], [dlopen], 5392 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5393 [AC_CHECK_LIB([svld], [dlopen], 5394 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5395 [AC_CHECK_LIB([dld], [dld_link], 5396 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5397 ]) 5398 ]) 5399 ]) 5400 ]) 5401 ]) 5402 ;; 5403 esac 5404 5405 if test no = "$lt_cv_dlopen"; then 5406 enable_dlopen=no 5407 else 5408 enable_dlopen=yes 5409 fi 5410 5411 case $lt_cv_dlopen in 5412 dlopen) 5413 save_CPPFLAGS=$CPPFLAGS 5414 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5415 5416 save_LDFLAGS=$LDFLAGS 5417 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5418 5419 save_LIBS=$LIBS 5420 LIBS="$lt_cv_dlopen_libs $LIBS" 5421 5422 AC_CACHE_CHECK([whether a program can dlopen itself], 5423 lt_cv_dlopen_self, [dnl 5424 _LT_TRY_DLOPEN_SELF( 5425 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5426 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5427 ]) 5428 5429 if test yes = "$lt_cv_dlopen_self"; then 5430 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5431 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5432 lt_cv_dlopen_self_static, [dnl 5433 _LT_TRY_DLOPEN_SELF( 5434 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5435 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5436 ]) 5437 fi 5438 5439 CPPFLAGS=$save_CPPFLAGS 5440 LDFLAGS=$save_LDFLAGS 5441 LIBS=$save_LIBS 5442 ;; 5443 esac 5444 5445 case $lt_cv_dlopen_self in 5446 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5447 *) enable_dlopen_self=unknown ;; 5448 esac 5449 5450 case $lt_cv_dlopen_self_static in 5451 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5452 *) enable_dlopen_self_static=unknown ;; 5453 esac 5454fi 5455_LT_DECL([dlopen_support], [enable_dlopen], [0], 5456 [Whether dlopen is supported]) 5457_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5458 [Whether dlopen of programs is supported]) 5459_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5460 [Whether dlopen of statically linked programs is supported]) 5461])# LT_SYS_DLOPEN_SELF 5462 5463# Old name: 5464AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5465dnl aclocal-1.4 backwards compatibility: 5466dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5467 5468 5469# _LT_COMPILER_C_O([TAGNAME]) 5470# --------------------------- 5471# Check to see if options -c and -o are simultaneously supported by compiler. 5472# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5473m4_defun([_LT_COMPILER_C_O], 5474[m4_require([_LT_DECL_SED])dnl 5475m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5476m4_require([_LT_TAG_COMPILER])dnl 5477AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5478 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5479 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5480 $RM -r conftest 2>/dev/null 5481 mkdir conftest 5482 cd conftest 5483 mkdir out 5484 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5485 5486 lt_compiler_flag="-o out/conftest2.$ac_objext" 5487 # Insert the option either (1) after the last *FLAGS variable, or 5488 # (2) before a word containing "conftest.", or (3) at the end. 5489 # Note that $ac_compile itself does not contain backslashes and begins 5490 # with a dollar sign (not a hyphen), so the echo should work correctly. 5491 lt_compile=`echo "$ac_compile" | $SED \ 5492 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5493 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5494 -e 's:$: $lt_compiler_flag:'` 5495 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5496 (eval "$lt_compile" 2>out/conftest.err) 5497 ac_status=$? 5498 cat out/conftest.err >&AS_MESSAGE_LOG_FD 5499 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5500 if (exit $ac_status) && test -s out/conftest2.$ac_objext 5501 then 5502 # The compiler can only warn and ignore the option if not recognized 5503 # So say no if there are warnings 5504 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5505 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5506 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5507 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5508 fi 5509 fi 5510 chmod u+w . 2>&AS_MESSAGE_LOG_FD 5511 $RM conftest* 5512 # SGI C++ compiler will create directory out/ii_files/ for 5513 # template instantiation 5514 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5515 $RM out/* && rmdir out 5516 cd .. 5517 $RM -r conftest 5518 $RM conftest* 5519]) 5520_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5521 [Does compiler simultaneously support -c and -o options?]) 5522])# _LT_COMPILER_C_O 5523 5524 5525# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5526# ---------------------------------- 5527# Check to see if we can do hard links to lock some files if needed 5528m4_defun([_LT_COMPILER_FILE_LOCKS], 5529[m4_require([_LT_ENABLE_LOCK])dnl 5530m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5531_LT_COMPILER_C_O([$1]) 5532 5533hard_links=nottested 5534if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5535 # do not overwrite the value of need_locks provided by the user 5536 AC_MSG_CHECKING([if we can lock with hard links]) 5537 hard_links=yes 5538 $RM conftest* 5539 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5540 touch conftest.a 5541 ln conftest.a conftest.b 2>&5 || hard_links=no 5542 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5543 AC_MSG_RESULT([$hard_links]) 5544 if test no = "$hard_links"; then 5545 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5546 need_locks=warn 5547 fi 5548else 5549 need_locks=no 5550fi 5551_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5552])# _LT_COMPILER_FILE_LOCKS 5553 5554 5555# _LT_CHECK_OBJDIR 5556# ---------------- 5557m4_defun([_LT_CHECK_OBJDIR], 5558[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5559[rm -f .libs 2>/dev/null 5560mkdir .libs 2>/dev/null 5561if test -d .libs; then 5562 lt_cv_objdir=.libs 5563else 5564 # MS-DOS does not allow filenames that begin with a dot. 5565 lt_cv_objdir=_libs 5566fi 5567rmdir .libs 2>/dev/null]) 5568objdir=$lt_cv_objdir 5569_LT_DECL([], [objdir], [0], 5570 [The name of the directory that contains temporary libtool files])dnl 5571m4_pattern_allow([LT_OBJDIR])dnl 5572AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5573 [Define to the sub-directory where libtool stores uninstalled libraries.]) 5574])# _LT_CHECK_OBJDIR 5575 5576 5577# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5578# -------------------------------------- 5579# Check hardcoding attributes. 5580m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5581[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5582_LT_TAGVAR(hardcode_action, $1)= 5583if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5584 test -n "$_LT_TAGVAR(runpath_var, $1)" || 5585 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5586 5587 # We can hardcode non-existent directories. 5588 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5589 # If the only mechanism to avoid hardcoding is shlibpath_var, we 5590 # have to relink, otherwise we might link with an installed library 5591 # when we should be linking with a yet-to-be-installed one 5592 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5593 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5594 # Linking always hardcodes the temporary library directory. 5595 _LT_TAGVAR(hardcode_action, $1)=relink 5596 else 5597 # We can link without hardcoding, and we can hardcode nonexisting dirs. 5598 _LT_TAGVAR(hardcode_action, $1)=immediate 5599 fi 5600else 5601 # We cannot hardcode anything, or else we can only hardcode existing 5602 # directories. 5603 _LT_TAGVAR(hardcode_action, $1)=unsupported 5604fi 5605AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5606 5607if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5608 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5609 # Fast installation is not supported 5610 enable_fast_install=no 5611elif test yes = "$shlibpath_overrides_runpath" || 5612 test no = "$enable_shared"; then 5613 # Fast installation is not necessary 5614 enable_fast_install=needless 5615fi 5616_LT_TAGDECL([], [hardcode_action], [0], 5617 [How to hardcode a shared library path into an executable]) 5618])# _LT_LINKER_HARDCODE_LIBPATH 5619 5620 5621# _LT_CMD_STRIPLIB 5622# ---------------- 5623m4_defun([_LT_CMD_STRIPLIB], 5624[m4_require([_LT_DECL_EGREP]) 5625striplib= 5626old_striplib= 5627AC_MSG_CHECKING([whether stripping libraries is possible]) 5628if test -z "$STRIP"; then 5629 AC_MSG_RESULT([no]) 5630else 5631 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5632 old_striplib="$STRIP --strip-debug" 5633 striplib="$STRIP --strip-unneeded" 5634 AC_MSG_RESULT([yes]) 5635 else 5636 case $host_os in 5637 darwin*) 5638 # FIXME - insert some real tests, host_os isn't really good enough 5639 striplib="$STRIP -x" 5640 old_striplib="$STRIP -S" 5641 AC_MSG_RESULT([yes]) 5642 ;; 5643 freebsd*) 5644 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5645 old_striplib="$STRIP --strip-debug" 5646 striplib="$STRIP --strip-unneeded" 5647 AC_MSG_RESULT([yes]) 5648 else 5649 AC_MSG_RESULT([no]) 5650 fi 5651 ;; 5652 *) 5653 AC_MSG_RESULT([no]) 5654 ;; 5655 esac 5656 fi 5657fi 5658_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5659_LT_DECL([], [striplib], [1]) 5660])# _LT_CMD_STRIPLIB 5661 5662 5663# _LT_PREPARE_MUNGE_PATH_LIST 5664# --------------------------- 5665# Make sure func_munge_path_list() is defined correctly. 5666m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5667[[# func_munge_path_list VARIABLE PATH 5668# ----------------------------------- 5669# VARIABLE is name of variable containing _space_ separated list of 5670# directories to be munged by the contents of PATH, which is string 5671# having a format: 5672# "DIR[:DIR]:" 5673# string "DIR[ DIR]" will be prepended to VARIABLE 5674# ":DIR[:DIR]" 5675# string "DIR[ DIR]" will be appended to VARIABLE 5676# "DIRP[:DIRP]::[DIRA:]DIRA" 5677# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5678# "DIRA[ DIRA]" will be appended to VARIABLE 5679# "DIR[:DIR]" 5680# VARIABLE will be replaced by "DIR[ DIR]" 5681func_munge_path_list () 5682{ 5683 case x@S|@2 in 5684 x) 5685 ;; 5686 *:) 5687 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5688 ;; 5689 x:*) 5690 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5691 ;; 5692 *::*) 5693 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5694 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5695 ;; 5696 *) 5697 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5698 ;; 5699 esac 5700} 5701]])# _LT_PREPARE_PATH_LIST 5702 5703 5704# _LT_SYS_DYNAMIC_LINKER([TAG]) 5705# ----------------------------- 5706# PORTME Fill in your ld.so characteristics 5707m4_defun([_LT_SYS_DYNAMIC_LINKER], 5708[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5709m4_require([_LT_DECL_EGREP])dnl 5710m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5711m4_require([_LT_DECL_OBJDUMP])dnl 5712m4_require([_LT_DECL_SED])dnl 5713m4_require([_LT_CHECK_SHELL_FEATURES])dnl 5714m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5715AC_MSG_CHECKING([dynamic linker characteristics]) 5716m4_if([$1], 5717 [], [ 5718if test yes = "$GCC"; then 5719 case $host_os in 5720 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5721 *) lt_awk_arg='/^libraries:/' ;; 5722 esac 5723 case $host_os in 5724 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5725 *) lt_sed_strip_eq='s|=/|/|g' ;; 5726 esac 5727 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5728 case $lt_search_path_spec in 5729 *\;*) 5730 # if the path contains ";" then we assume it to be the separator 5731 # otherwise default to the standard path separator (i.e. ":") - it is 5732 # assumed that no part of a normal pathname contains ";" but that should 5733 # okay in the real world where ";" in dirpaths is itself problematic. 5734 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5735 ;; 5736 *) 5737 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5738 ;; 5739 esac 5740 # Ok, now we have the path, separated by spaces, we can step through it 5741 # and add multilib dir if necessary... 5742 lt_tmp_lt_search_path_spec= 5743 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5744 # ...but if some path component already ends with the multilib dir we assume 5745 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5746 case "$lt_multi_os_dir; $lt_search_path_spec " in 5747 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5748 lt_multi_os_dir= 5749 ;; 5750 esac 5751 for lt_sys_path in $lt_search_path_spec; do 5752 if test -d "$lt_sys_path$lt_multi_os_dir"; then 5753 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5754 elif test -n "$lt_multi_os_dir"; then 5755 test -d "$lt_sys_path" && \ 5756 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5757 fi 5758 done 5759 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5760BEGIN {RS = " "; FS = "/|\n";} { 5761 lt_foo = ""; 5762 lt_count = 0; 5763 for (lt_i = NF; lt_i > 0; lt_i--) { 5764 if ($lt_i != "" && $lt_i != ".") { 5765 if ($lt_i == "..") { 5766 lt_count++; 5767 } else { 5768 if (lt_count == 0) { 5769 lt_foo = "/" $lt_i lt_foo; 5770 } else { 5771 lt_count--; 5772 } 5773 } 5774 } 5775 } 5776 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5777 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5778}'` 5779 # AWK program above erroneously prepends '/' to C:/dos/paths 5780 # for these hosts. 5781 case $host_os in 5782 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5783 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5784 esac 5785 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5786else 5787 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5788fi]) 5789library_names_spec= 5790libname_spec='lib$name' 5791soname_spec= 5792shrext_cmds=.so 5793postinstall_cmds= 5794postuninstall_cmds= 5795finish_cmds= 5796finish_eval= 5797shlibpath_var= 5798shlibpath_overrides_runpath=unknown 5799version_type=none 5800dynamic_linker="$host_os ld.so" 5801sys_lib_dlsearch_path_spec="/lib /usr/lib" 5802need_lib_prefix=unknown 5803hardcode_into_libs=no 5804 5805# when you set need_version to no, make sure it does not cause -set_version 5806# flags to be left without arguments 5807need_version=unknown 5808 5809AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5810[User-defined run-time library search path.]) 5811 5812case $host_os in 5813aix3*) 5814 version_type=linux # correct to gnu/linux during the next big refactor 5815 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5816 shlibpath_var=LIBPATH 5817 5818 # AIX 3 has no versioning support, so we append a major version to the name. 5819 soname_spec='$libname$release$shared_ext$major' 5820 ;; 5821 5822aix[[4-9]]*) 5823 version_type=linux # correct to gnu/linux during the next big refactor 5824 need_lib_prefix=no 5825 need_version=no 5826 hardcode_into_libs=yes 5827 if test ia64 = "$host_cpu"; then 5828 # AIX 5 supports IA64 5829 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5830 shlibpath_var=LD_LIBRARY_PATH 5831 else 5832 # With GCC up to 2.95.x, collect2 would create an import file 5833 # for dependence libraries. The import file would start with 5834 # the line '#! .'. This would cause the generated library to 5835 # depend on '.', always an invalid library. This was fixed in 5836 # development snapshots of GCC prior to 3.0. 5837 case $host_os in 5838 aix4 | aix4.[[01]] | aix4.[[01]].*) 5839 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5840 echo ' yes ' 5841 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5842 : 5843 else 5844 can_build_shared=no 5845 fi 5846 ;; 5847 esac 5848 # Using Import Files as archive members, it is possible to support 5849 # filename-based versioning of shared library archives on AIX. While 5850 # this would work for both with and without runtime linking, it will 5851 # prevent static linking of such archives. So we do filename-based 5852 # shared library versioning with .so extension only, which is used 5853 # when both runtime linking and shared linking is enabled. 5854 # Unfortunately, runtime linking may impact performance, so we do 5855 # not want this to be the default eventually. Also, we use the 5856 # versioned .so libs for executables only if there is the -brtl 5857 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5858 # To allow for filename-based versioning support, we need to create 5859 # libNAME.so.V as an archive file, containing: 5860 # *) an Import File, referring to the versioned filename of the 5861 # archive as well as the shared archive member, telling the 5862 # bitwidth (32 or 64) of that shared object, and providing the 5863 # list of exported symbols of that shared object, eventually 5864 # decorated with the 'weak' keyword 5865 # *) the shared object with the F_LOADONLY flag set, to really avoid 5866 # it being seen by the linker. 5867 # At run time we better use the real file rather than another symlink, 5868 # but for link time we create the symlink libNAME.so -> libNAME.so.V 5869 5870 case $with_aix_soname,$aix_use_runtimelinking in 5871 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5872 # soname into executable. Probably we can add versioning support to 5873 # collect2, so additional links can be useful in future. 5874 aix,yes) # traditional libtool 5875 dynamic_linker='AIX unversionable lib.so' 5876 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5877 # instead of lib<name>.a to let people know that these are not 5878 # typical AIX shared libraries. 5879 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5880 ;; 5881 aix,no) # traditional AIX only 5882 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5883 # We preserve .a as extension for shared libraries through AIX4.2 5884 # and later when we are not doing run time linking. 5885 library_names_spec='$libname$release.a $libname.a' 5886 soname_spec='$libname$release$shared_ext$major' 5887 ;; 5888 svr4,*) # full svr4 only 5889 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5890 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5891 # We do not specify a path in Import Files, so LIBPATH fires. 5892 shlibpath_overrides_runpath=yes 5893 ;; 5894 *,yes) # both, prefer svr4 5895 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5896 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5897 # unpreferred sharedlib libNAME.a needs extra handling 5898 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"' 5899 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"' 5900 # We do not specify a path in Import Files, so LIBPATH fires. 5901 shlibpath_overrides_runpath=yes 5902 ;; 5903 *,no) # both, prefer aix 5904 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5905 library_names_spec='$libname$release.a $libname.a' 5906 soname_spec='$libname$release$shared_ext$major' 5907 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5908 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)' 5909 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"' 5910 ;; 5911 esac 5912 shlibpath_var=LIBPATH 5913 fi 5914 ;; 5915 5916amigaos*) 5917 case $host_cpu in 5918 powerpc) 5919 # Since July 2007 AmigaOS4 officially supports .so libraries. 5920 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5922 ;; 5923 m68k) 5924 library_names_spec='$libname.ixlibrary $libname.a' 5925 # Create ${libname}_ixlibrary.a entries in /sys/libs. 5926 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' 5927 ;; 5928 esac 5929 ;; 5930 5931beos*) 5932 library_names_spec='$libname$shared_ext' 5933 dynamic_linker="$host_os ld.so" 5934 shlibpath_var=LIBRARY_PATH 5935 ;; 5936 5937bsdi[[45]]*) 5938 version_type=linux # correct to gnu/linux during the next big refactor 5939 need_version=no 5940 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5941 soname_spec='$libname$release$shared_ext$major' 5942 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5943 shlibpath_var=LD_LIBRARY_PATH 5944 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5945 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5946 # the default ld.so.conf also contains /usr/contrib/lib and 5947 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5948 # libtool to hard-code these into programs 5949 ;; 5950 5951cygwin* | mingw* | pw32* | cegcc*) 5952 version_type=windows 5953 shrext_cmds=.dll 5954 need_version=no 5955 need_lib_prefix=no 5956 5957 case $GCC,$cc_basename in 5958 yes,*) 5959 # gcc 5960 library_names_spec='$libname.dll.a' 5961 # DLL is installed to $(libdir)/../bin by postinstall_cmds 5962 postinstall_cmds='base_file=`basename \$file`~ 5963 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5964 dldir=$destdir/`dirname \$dlpath`~ 5965 test -d \$dldir || mkdir -p \$dldir~ 5966 $install_prog $dir/$dlname \$dldir/$dlname~ 5967 chmod a+x \$dldir/$dlname~ 5968 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5969 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5970 fi' 5971 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5972 dlpath=$dir/\$dldll~ 5973 $RM \$dlpath' 5974 shlibpath_overrides_runpath=yes 5975 5976 case $host_os in 5977 cygwin*) 5978 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5979 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5980m4_if([$1], [],[ 5981 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5982 ;; 5983 mingw* | cegcc*) 5984 # MinGW DLLs use traditional 'lib' prefix 5985 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5986 ;; 5987 pw32*) 5988 # pw32 DLLs use 'pw' prefix rather than 'lib' 5989 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5990 ;; 5991 esac 5992 dynamic_linker='Win32 ld.exe' 5993 ;; 5994 5995 *,cl* | *,icl*) 5996 # Native MSVC or ICC 5997 libname_spec='$name' 5998 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5999 library_names_spec='$libname.dll.lib' 6000 6001 case $build_os in 6002 mingw*) 6003 sys_lib_search_path_spec= 6004 lt_save_ifs=$IFS 6005 IFS=';' 6006 for lt_path in $LIB 6007 do 6008 IFS=$lt_save_ifs 6009 # Let DOS variable expansion print the short 8.3 style file name. 6010 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6011 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6012 done 6013 IFS=$lt_save_ifs 6014 # Convert to MSYS style. 6015 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6016 ;; 6017 cygwin*) 6018 # Convert to unix form, then to dos form, then back to unix form 6019 # but this time dos style (no spaces!) so that the unix form looks 6020 # like /cygdrive/c/PROGRA~1:/cygdr... 6021 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6022 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6023 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6024 ;; 6025 *) 6026 sys_lib_search_path_spec=$LIB 6027 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6028 # It is most probably a Windows format PATH. 6029 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6030 else 6031 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6032 fi 6033 # FIXME: find the short name or the path components, as spaces are 6034 # common. (e.g. "Program Files" -> "PROGRA~1") 6035 ;; 6036 esac 6037 6038 # DLL is installed to $(libdir)/../bin by postinstall_cmds 6039 postinstall_cmds='base_file=`basename \$file`~ 6040 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6041 dldir=$destdir/`dirname \$dlpath`~ 6042 test -d \$dldir || mkdir -p \$dldir~ 6043 $install_prog $dir/$dlname \$dldir/$dlname' 6044 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6045 dlpath=$dir/\$dldll~ 6046 $RM \$dlpath' 6047 shlibpath_overrides_runpath=yes 6048 dynamic_linker='Win32 link.exe' 6049 ;; 6050 6051 *) 6052 # Assume MSVC and ICC wrapper 6053 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6054 dynamic_linker='Win32 ld.exe' 6055 ;; 6056 esac 6057 # FIXME: first we should search . and the directory the executable is in 6058 shlibpath_var=PATH 6059 ;; 6060 6061darwin* | rhapsody*) 6062 dynamic_linker="$host_os dyld" 6063 version_type=darwin 6064 need_lib_prefix=no 6065 need_version=no 6066 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6067 soname_spec='$libname$release$major$shared_ext' 6068 shlibpath_overrides_runpath=yes 6069 shlibpath_var=DYLD_LIBRARY_PATH 6070 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6071m4_if([$1], [],[ 6072 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6073 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6074 ;; 6075 6076dgux*) 6077 version_type=linux # correct to gnu/linux during the next big refactor 6078 need_lib_prefix=no 6079 need_version=no 6080 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6081 soname_spec='$libname$release$shared_ext$major' 6082 shlibpath_var=LD_LIBRARY_PATH 6083 ;; 6084 6085freebsd* | dragonfly* | midnightbsd*) 6086 # DragonFly does not have aout. When/if they implement a new 6087 # versioning mechanism, adjust this. 6088 if test -x /usr/bin/objformat; then 6089 objformat=`/usr/bin/objformat` 6090 else 6091 case $host_os in 6092 freebsd[[23]].*) objformat=aout ;; 6093 *) objformat=elf ;; 6094 esac 6095 fi 6096 version_type=freebsd-$objformat 6097 case $version_type in 6098 freebsd-elf*) 6099 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6100 soname_spec='$libname$release$shared_ext$major' 6101 need_version=no 6102 need_lib_prefix=no 6103 ;; 6104 freebsd-*) 6105 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6106 need_version=yes 6107 ;; 6108 esac 6109 shlibpath_var=LD_LIBRARY_PATH 6110 case $host_os in 6111 freebsd2.*) 6112 shlibpath_overrides_runpath=yes 6113 ;; 6114 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6115 shlibpath_overrides_runpath=yes 6116 hardcode_into_libs=yes 6117 ;; 6118 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6119 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6120 shlibpath_overrides_runpath=no 6121 hardcode_into_libs=yes 6122 ;; 6123 *) # from 4.6 on, and DragonFly 6124 shlibpath_overrides_runpath=yes 6125 hardcode_into_libs=yes 6126 ;; 6127 esac 6128 ;; 6129 6130haiku*) 6131 version_type=linux # correct to gnu/linux during the next big refactor 6132 need_lib_prefix=no 6133 need_version=no 6134 dynamic_linker="$host_os runtime_loader" 6135 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6136 soname_spec='$libname$release$shared_ext$major' 6137 shlibpath_var=LIBRARY_PATH 6138 shlibpath_overrides_runpath=no 6139 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6140 hardcode_into_libs=yes 6141 ;; 6142 6143hpux9* | hpux10* | hpux11*) 6144 # Give a soname corresponding to the major version so that dld.sl refuses to 6145 # link against other versions. 6146 version_type=sunos 6147 need_lib_prefix=no 6148 need_version=no 6149 case $host_cpu in 6150 ia64*) 6151 shrext_cmds='.so' 6152 hardcode_into_libs=yes 6153 dynamic_linker="$host_os dld.so" 6154 shlibpath_var=LD_LIBRARY_PATH 6155 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6156 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6157 soname_spec='$libname$release$shared_ext$major' 6158 if test 32 = "$HPUX_IA64_MODE"; then 6159 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6160 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6161 else 6162 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6163 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6164 fi 6165 ;; 6166 hppa*64*) 6167 shrext_cmds='.sl' 6168 hardcode_into_libs=yes 6169 dynamic_linker="$host_os dld.sl" 6170 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6171 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6172 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6173 soname_spec='$libname$release$shared_ext$major' 6174 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6175 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6176 ;; 6177 *) 6178 shrext_cmds='.sl' 6179 dynamic_linker="$host_os dld.sl" 6180 shlibpath_var=SHLIB_PATH 6181 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6182 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6183 soname_spec='$libname$release$shared_ext$major' 6184 ;; 6185 esac 6186 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6187 postinstall_cmds='chmod 555 $lib' 6188 # or fails outright, so override atomically: 6189 install_override_mode=555 6190 ;; 6191 6192interix[[3-9]]*) 6193 version_type=linux # correct to gnu/linux during the next big refactor 6194 need_lib_prefix=no 6195 need_version=no 6196 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6197 soname_spec='$libname$release$shared_ext$major' 6198 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6199 shlibpath_var=LD_LIBRARY_PATH 6200 shlibpath_overrides_runpath=no 6201 hardcode_into_libs=yes 6202 ;; 6203 6204irix5* | irix6* | nonstopux*) 6205 case $host_os in 6206 nonstopux*) version_type=nonstopux ;; 6207 *) 6208 if test yes = "$lt_cv_prog_gnu_ld"; then 6209 version_type=linux # correct to gnu/linux during the next big refactor 6210 else 6211 version_type=irix 6212 fi ;; 6213 esac 6214 need_lib_prefix=no 6215 need_version=no 6216 soname_spec='$libname$release$shared_ext$major' 6217 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6218 case $host_os in 6219 irix5* | nonstopux*) 6220 libsuff= shlibsuff= 6221 ;; 6222 *) 6223 case $LD in # libtool.m4 will add one of these switches to LD 6224 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6225 libsuff= shlibsuff= libmagic=32-bit;; 6226 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6227 libsuff=32 shlibsuff=N32 libmagic=N32;; 6228 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6229 libsuff=64 shlibsuff=64 libmagic=64-bit;; 6230 *) libsuff= shlibsuff= libmagic=never-match;; 6231 esac 6232 ;; 6233 esac 6234 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6235 shlibpath_overrides_runpath=no 6236 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6237 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6238 hardcode_into_libs=yes 6239 ;; 6240 6241# No shared lib support for Linux oldld, aout, or coff. 6242linux*oldld* | linux*aout* | linux*coff*) 6243 dynamic_linker=no 6244 ;; 6245 6246linux*android*) 6247 version_type=none # Android doesn't support versioned libraries. 6248 need_lib_prefix=no 6249 need_version=no 6250 library_names_spec='$libname$release$shared_ext' 6251 soname_spec='$libname$release$shared_ext' 6252 finish_cmds= 6253 shlibpath_var=LD_LIBRARY_PATH 6254 shlibpath_overrides_runpath=yes 6255 6256 # This implies no fast_install, which is unacceptable. 6257 # Some rework will be needed to allow for fast_install 6258 # before this can be enabled. 6259 hardcode_into_libs=yes 6260 6261 dynamic_linker='Android linker' 6262 # Don't embed -rpath directories since the linker doesn't support them. 6263 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6264 ;; 6265 6266# This must be glibc/ELF. 6267linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6268 version_type=linux # correct to gnu/linux during the next big refactor 6269 need_lib_prefix=no 6270 need_version=no 6271 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6272 soname_spec='$libname$release$shared_ext$major' 6273 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6274 shlibpath_var=LD_LIBRARY_PATH 6275 shlibpath_overrides_runpath=no 6276 6277 # Some binutils ld are patched to set DT_RUNPATH 6278 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6279 [lt_cv_shlibpath_overrides_runpath=no 6280 save_LDFLAGS=$LDFLAGS 6281 save_libdir=$libdir 6282 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6283 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6284 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6285 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6286 [lt_cv_shlibpath_overrides_runpath=yes])]) 6287 LDFLAGS=$save_LDFLAGS 6288 libdir=$save_libdir 6289 ]) 6290 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6291 6292 # This implies no fast_install, which is unacceptable. 6293 # Some rework will be needed to allow for fast_install 6294 # before this can be enabled. 6295 hardcode_into_libs=yes 6296 6297 # Ideally, we could use ldconfig to report *all* directores which are 6298 # searched for libraries, however this is still not possible. Aside from not 6299 # being certain /sbin/ldconfig is available, command 6300 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6301 # even though it is searched at run-time. Try to do the best guess by 6302 # appending ld.so.conf contents (and includes) to the search path. 6303 if test -f /etc/ld.so.conf; then 6304 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' ' '` 6305 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6306 fi 6307 6308 # We used to test for /lib/ld.so.1 and disable shared libraries on 6309 # powerpc, because MkLinux only supported shared libraries with the 6310 # GNU dynamic linker. Since this was broken with cross compilers, 6311 # most powerpc-linux boxes support dynamic linking these days and 6312 # people can always --disable-shared, the test was removed, and we 6313 # assume the GNU/Linux dynamic linker is in use. 6314 dynamic_linker='GNU/Linux ld.so' 6315 ;; 6316 6317netbsd*) 6318 version_type=sunos 6319 need_lib_prefix=no 6320 need_version=no 6321 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6322 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6323 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6324 dynamic_linker='NetBSD (a.out) ld.so' 6325 else 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 dynamic_linker='NetBSD ld.elf_so' 6329 fi 6330 shlibpath_var=LD_LIBRARY_PATH 6331 shlibpath_overrides_runpath=yes 6332 hardcode_into_libs=yes 6333 ;; 6334 6335newsos6) 6336 version_type=linux # correct to gnu/linux during the next big refactor 6337 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6338 shlibpath_var=LD_LIBRARY_PATH 6339 shlibpath_overrides_runpath=yes 6340 ;; 6341 6342*nto* | *qnx*) 6343 version_type=qnx 6344 need_lib_prefix=no 6345 need_version=no 6346 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6347 soname_spec='$libname$release$shared_ext$major' 6348 shlibpath_var=LD_LIBRARY_PATH 6349 shlibpath_overrides_runpath=no 6350 hardcode_into_libs=yes 6351 dynamic_linker='ldqnx.so' 6352 ;; 6353 6354openbsd* | bitrig*) 6355 version_type=sunos 6356 sys_lib_dlsearch_path_spec=/usr/lib 6357 need_lib_prefix=no 6358 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6359 need_version=no 6360 else 6361 need_version=yes 6362 fi 6363 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6364 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6365 shlibpath_var=LD_LIBRARY_PATH 6366 shlibpath_overrides_runpath=yes 6367 ;; 6368 6369os2*) 6370 libname_spec='$name' 6371 version_type=windows 6372 shrext_cmds=.dll 6373 need_version=no 6374 need_lib_prefix=no 6375 # OS/2 can only load a DLL with a base name of 8 characters or less. 6376 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6377 v=$($ECHO $release$versuffix | tr -d .-); 6378 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6379 $ECHO $n$v`$shared_ext' 6380 library_names_spec='${libname}_dll.$libext' 6381 dynamic_linker='OS/2 ld.exe' 6382 shlibpath_var=BEGINLIBPATH 6383 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6384 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6385 postinstall_cmds='base_file=`basename \$file`~ 6386 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6387 dldir=$destdir/`dirname \$dlpath`~ 6388 test -d \$dldir || mkdir -p \$dldir~ 6389 $install_prog $dir/$dlname \$dldir/$dlname~ 6390 chmod a+x \$dldir/$dlname~ 6391 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6392 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6393 fi' 6394 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6395 dlpath=$dir/\$dldll~ 6396 $RM \$dlpath' 6397 ;; 6398 6399osf3* | osf4* | osf5*) 6400 version_type=osf 6401 need_lib_prefix=no 6402 need_version=no 6403 soname_spec='$libname$release$shared_ext$major' 6404 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6405 shlibpath_var=LD_LIBRARY_PATH 6406 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6407 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6408 ;; 6409 6410rdos*) 6411 dynamic_linker=no 6412 ;; 6413 6414solaris*) 6415 version_type=linux # correct to gnu/linux during the next big refactor 6416 need_lib_prefix=no 6417 need_version=no 6418 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6419 soname_spec='$libname$release$shared_ext$major' 6420 shlibpath_var=LD_LIBRARY_PATH 6421 shlibpath_overrides_runpath=yes 6422 hardcode_into_libs=yes 6423 # ldd complains unless libraries are executable 6424 postinstall_cmds='chmod +x $lib' 6425 ;; 6426 6427sunos4*) 6428 version_type=sunos 6429 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6430 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6431 shlibpath_var=LD_LIBRARY_PATH 6432 shlibpath_overrides_runpath=yes 6433 if test yes = "$with_gnu_ld"; then 6434 need_lib_prefix=no 6435 fi 6436 need_version=yes 6437 ;; 6438 6439sysv4 | sysv4.3*) 6440 version_type=linux # correct to gnu/linux during the next big refactor 6441 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6442 soname_spec='$libname$release$shared_ext$major' 6443 shlibpath_var=LD_LIBRARY_PATH 6444 case $host_vendor in 6445 sni) 6446 shlibpath_overrides_runpath=no 6447 need_lib_prefix=no 6448 runpath_var=LD_RUN_PATH 6449 ;; 6450 siemens) 6451 need_lib_prefix=no 6452 ;; 6453 motorola) 6454 need_lib_prefix=no 6455 need_version=no 6456 shlibpath_overrides_runpath=no 6457 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6458 ;; 6459 esac 6460 ;; 6461 6462sysv4*MP*) 6463 if test -d /usr/nec; then 6464 version_type=linux # correct to gnu/linux during the next big refactor 6465 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6466 soname_spec='$libname$shared_ext.$major' 6467 shlibpath_var=LD_LIBRARY_PATH 6468 fi 6469 ;; 6470 6471sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6472 version_type=sco 6473 need_lib_prefix=no 6474 need_version=no 6475 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6476 soname_spec='$libname$release$shared_ext$major' 6477 shlibpath_var=LD_LIBRARY_PATH 6478 shlibpath_overrides_runpath=yes 6479 hardcode_into_libs=yes 6480 if test yes = "$with_gnu_ld"; then 6481 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6482 else 6483 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6484 case $host_os in 6485 sco3.2v5*) 6486 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6487 ;; 6488 esac 6489 fi 6490 sys_lib_dlsearch_path_spec='/usr/lib' 6491 ;; 6492 6493tpf*) 6494 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6495 version_type=linux # correct to gnu/linux during the next big refactor 6496 need_lib_prefix=no 6497 need_version=no 6498 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6499 shlibpath_var=LD_LIBRARY_PATH 6500 shlibpath_overrides_runpath=no 6501 hardcode_into_libs=yes 6502 ;; 6503 6504uts4*) 6505 version_type=linux # correct to gnu/linux during the next big refactor 6506 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6507 soname_spec='$libname$release$shared_ext$major' 6508 shlibpath_var=LD_LIBRARY_PATH 6509 ;; 6510 6511*) 6512 dynamic_linker=no 6513 ;; 6514esac 6515AC_MSG_RESULT([$dynamic_linker]) 6516test no = "$dynamic_linker" && can_build_shared=no 6517 6518variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6519if test yes = "$GCC"; then 6520 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6521fi 6522 6523if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6524 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6525fi 6526 6527if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6528 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6529fi 6530 6531# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6532configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6533 6534# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6535func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6536 6537# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6538configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6539 6540_LT_DECL([], [variables_saved_for_relink], [1], 6541 [Variables whose values should be saved in libtool wrapper scripts and 6542 restored at link time]) 6543_LT_DECL([], [need_lib_prefix], [0], 6544 [Do we need the "lib" prefix for modules?]) 6545_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6546_LT_DECL([], [version_type], [0], [Library versioning type]) 6547_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6548_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6549_LT_DECL([], [shlibpath_overrides_runpath], [0], 6550 [Is shlibpath searched before the hard-coded library search path?]) 6551_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6552_LT_DECL([], [library_names_spec], [1], 6553 [[List of archive names. First name is the real one, the rest are links. 6554 The last name is the one that the linker finds with -lNAME]]) 6555_LT_DECL([], [soname_spec], [1], 6556 [[The coded name of the library, if different from the real name]]) 6557_LT_DECL([], [install_override_mode], [1], 6558 [Permission mode override for installation of shared libraries]) 6559_LT_DECL([], [postinstall_cmds], [2], 6560 [Command to use after installation of a shared archive]) 6561_LT_DECL([], [postuninstall_cmds], [2], 6562 [Command to use after uninstallation of a shared archive]) 6563_LT_DECL([], [finish_cmds], [2], 6564 [Commands used to finish a libtool library installation in a directory]) 6565_LT_DECL([], [finish_eval], [1], 6566 [[As "finish_cmds", except a single script fragment to be evaled but 6567 not shown]]) 6568_LT_DECL([], [hardcode_into_libs], [0], 6569 [Whether we should hardcode library paths into libraries]) 6570_LT_DECL([], [sys_lib_search_path_spec], [2], 6571 [Compile-time system search path for libraries]) 6572_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6573 [Detected run-time system search path for libraries]) 6574_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6575 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6576])# _LT_SYS_DYNAMIC_LINKER 6577 6578 6579# _LT_PATH_TOOL_PREFIX(TOOL) 6580# -------------------------- 6581# find a file program that can recognize shared library 6582AC_DEFUN([_LT_PATH_TOOL_PREFIX], 6583[m4_require([_LT_DECL_EGREP])dnl 6584AC_MSG_CHECKING([for $1]) 6585AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6586[case $MAGIC_CMD in 6587[[\\/*] | ?:[\\/]*]) 6588 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6589 ;; 6590*) 6591 lt_save_MAGIC_CMD=$MAGIC_CMD 6592 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6593dnl $ac_dummy forces splitting on constant user-supplied paths. 6594dnl POSIX.2 word splitting is done only on the output of word expansions, 6595dnl not every word. This closes a longstanding sh security hole. 6596 ac_dummy="m4_if([$2], , $PATH, [$2])" 6597 for ac_dir in $ac_dummy; do 6598 IFS=$lt_save_ifs 6599 test -z "$ac_dir" && ac_dir=. 6600 if test -f "$ac_dir/$1"; then 6601 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6602 if test -n "$file_magic_test_file"; then 6603 case $deplibs_check_method in 6604 "file_magic "*) 6605 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6606 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6607 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6608 $EGREP "$file_magic_regex" > /dev/null; then 6609 : 6610 else 6611 cat <<_LT_EOF 1>&2 6612 6613*** Warning: the command libtool uses to detect shared libraries, 6614*** $file_magic_cmd, produces output that libtool cannot recognize. 6615*** The result is that libtool may fail to recognize shared libraries 6616*** as such. This will affect the creation of libtool libraries that 6617*** depend on shared libraries, but programs linked with such libtool 6618*** libraries will work regardless of this problem. Nevertheless, you 6619*** may want to report the problem to your system manager and/or to 6620*** bug-libtool@gnu.org 6621 6622_LT_EOF 6623 fi ;; 6624 esac 6625 fi 6626 break 6627 fi 6628 done 6629 IFS=$lt_save_ifs 6630 MAGIC_CMD=$lt_save_MAGIC_CMD 6631 ;; 6632esac]) 6633MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6634if test -n "$MAGIC_CMD"; then 6635 AC_MSG_RESULT($MAGIC_CMD) 6636else 6637 AC_MSG_RESULT(no) 6638fi 6639_LT_DECL([], [MAGIC_CMD], [0], 6640 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6641])# _LT_PATH_TOOL_PREFIX 6642 6643# Old name: 6644AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6645dnl aclocal-1.4 backwards compatibility: 6646dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6647 6648 6649# _LT_PATH_MAGIC 6650# -------------- 6651# find a file program that can recognize a shared library 6652m4_defun([_LT_PATH_MAGIC], 6653[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6654if test -z "$lt_cv_path_MAGIC_CMD"; then 6655 if test -n "$ac_tool_prefix"; then 6656 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6657 else 6658 MAGIC_CMD=: 6659 fi 6660fi 6661])# _LT_PATH_MAGIC 6662 6663 6664# LT_PATH_LD 6665# ---------- 6666# find the pathname to the GNU or non-GNU linker 6667AC_DEFUN([LT_PATH_LD], 6668[AC_REQUIRE([AC_PROG_CC])dnl 6669AC_REQUIRE([AC_CANONICAL_HOST])dnl 6670AC_REQUIRE([AC_CANONICAL_BUILD])dnl 6671m4_require([_LT_DECL_SED])dnl 6672m4_require([_LT_DECL_EGREP])dnl 6673m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6674 6675AC_ARG_WITH([gnu-ld], 6676 [AS_HELP_STRING([--with-gnu-ld], 6677 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6678 [test no = "$withval" || with_gnu_ld=yes], 6679 [with_gnu_ld=no])dnl 6680 6681ac_prog=ld 6682if test yes = "$GCC"; then 6683 # Check if gcc -print-prog-name=ld gives a path. 6684 AC_MSG_CHECKING([for ld used by $CC]) 6685 case $host in 6686 *-*-mingw*) 6687 # gcc leaves a trailing carriage return, which upsets mingw 6688 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6689 *) 6690 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6691 esac 6692 case $ac_prog in 6693 # Accept absolute paths. 6694 [[\\/]]* | ?:[[\\/]]*) 6695 re_direlt='/[[^/]][[^/]]*/\.\./' 6696 # Canonicalize the pathname of ld 6697 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6698 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6699 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6700 done 6701 test -z "$LD" && LD=$ac_prog 6702 ;; 6703 "") 6704 # If it fails, then pretend we aren't using GCC. 6705 ac_prog=ld 6706 ;; 6707 *) 6708 # If it is relative, then search for the first ld in PATH. 6709 with_gnu_ld=unknown 6710 ;; 6711 esac 6712elif test yes = "$with_gnu_ld"; then 6713 AC_MSG_CHECKING([for GNU ld]) 6714else 6715 AC_MSG_CHECKING([for non-GNU ld]) 6716fi 6717AC_CACHE_VAL(lt_cv_path_LD, 6718[if test -z "$LD"; then 6719 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6720 for ac_dir in $PATH; do 6721 IFS=$lt_save_ifs 6722 test -z "$ac_dir" && ac_dir=. 6723 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6724 lt_cv_path_LD=$ac_dir/$ac_prog 6725 # Check to see if the program is GNU ld. I'd rather use --version, 6726 # but apparently some variants of GNU ld only accept -v. 6727 # Break only if it was the GNU/non-GNU ld that we prefer. 6728 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6729 *GNU* | *'with BFD'*) 6730 test no != "$with_gnu_ld" && break 6731 ;; 6732 *) 6733 test yes != "$with_gnu_ld" && break 6734 ;; 6735 esac 6736 fi 6737 done 6738 IFS=$lt_save_ifs 6739else 6740 lt_cv_path_LD=$LD # Let the user override the test with a path. 6741fi]) 6742LD=$lt_cv_path_LD 6743if test -n "$LD"; then 6744 AC_MSG_RESULT($LD) 6745else 6746 AC_MSG_RESULT(no) 6747fi 6748test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6749_LT_PATH_LD_GNU 6750AC_SUBST([LD]) 6751 6752_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6753])# LT_PATH_LD 6754 6755# Old names: 6756AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6757AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6758dnl aclocal-1.4 backwards compatibility: 6759dnl AC_DEFUN([AM_PROG_LD], []) 6760dnl AC_DEFUN([AC_PROG_LD], []) 6761 6762 6763# _LT_PATH_LD_GNU 6764#- -------------- 6765m4_defun([_LT_PATH_LD_GNU], 6766[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6767[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6768case `$LD -v 2>&1 </dev/null` in 6769*GNU* | *'with BFD'*) 6770 lt_cv_prog_gnu_ld=yes 6771 ;; 6772*) 6773 lt_cv_prog_gnu_ld=no 6774 ;; 6775esac]) 6776with_gnu_ld=$lt_cv_prog_gnu_ld 6777])# _LT_PATH_LD_GNU 6778 6779 6780# _LT_CMD_RELOAD 6781# -------------- 6782# find reload flag for linker 6783# -- PORTME Some linkers may need a different reload flag. 6784m4_defun([_LT_CMD_RELOAD], 6785[AC_CACHE_CHECK([for $LD option to reload object files], 6786 lt_cv_ld_reload_flag, 6787 [lt_cv_ld_reload_flag='-r']) 6788reload_flag=$lt_cv_ld_reload_flag 6789case $reload_flag in 6790"" | " "*) ;; 6791*) reload_flag=" $reload_flag" ;; 6792esac 6793reload_cmds='$LD$reload_flag -o $output$reload_objs' 6794case $host_os in 6795 cygwin* | mingw* | pw32* | cegcc*) 6796 if test yes != "$GCC"; then 6797 reload_cmds=false 6798 fi 6799 ;; 6800 darwin*) 6801 if test yes = "$GCC"; then 6802 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6803 else 6804 reload_cmds='$LD$reload_flag -o $output$reload_objs' 6805 fi 6806 ;; 6807esac 6808_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6809_LT_TAGDECL([], [reload_cmds], [2])dnl 6810])# _LT_CMD_RELOAD 6811 6812 6813# _LT_PATH_DD 6814# ----------- 6815# find a working dd 6816m4_defun([_LT_PATH_DD], 6817[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6818[printf 0123456789abcdef0123456789abcdef >conftest.i 6819cat conftest.i conftest.i >conftest2.i 6820: ${lt_DD:=$DD} 6821AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6822[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6823 cmp -s conftest.i conftest.out \ 6824 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6825fi]) 6826rm -f conftest.i conftest2.i conftest.out]) 6827])# _LT_PATH_DD 6828 6829 6830# _LT_CMD_TRUNCATE 6831# ---------------- 6832# find command to truncate a binary pipe 6833m4_defun([_LT_CMD_TRUNCATE], 6834[m4_require([_LT_PATH_DD]) 6835AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6836[printf 0123456789abcdef0123456789abcdef >conftest.i 6837cat conftest.i conftest.i >conftest2.i 6838lt_cv_truncate_bin= 6839if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6840 cmp -s conftest.i conftest.out \ 6841 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6842fi 6843rm -f conftest.i conftest2.i conftest.out 6844test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6845_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6846 [Command to truncate a binary pipe]) 6847])# _LT_CMD_TRUNCATE 6848 6849 6850# _LT_CHECK_MAGIC_METHOD 6851# ---------------------- 6852# how to check for library dependencies 6853# -- PORTME fill in with the dynamic library characteristics 6854m4_defun([_LT_CHECK_MAGIC_METHOD], 6855[m4_require([_LT_DECL_EGREP]) 6856m4_require([_LT_DECL_OBJDUMP]) 6857AC_CACHE_CHECK([how to recognize dependent libraries], 6858lt_cv_deplibs_check_method, 6859[lt_cv_file_magic_cmd='$MAGIC_CMD' 6860lt_cv_file_magic_test_file= 6861lt_cv_deplibs_check_method='unknown' 6862# Need to set the preceding variable on all platforms that support 6863# interlibrary dependencies. 6864# 'none' -- dependencies not supported. 6865# 'unknown' -- same as none, but documents that we really don't know. 6866# 'pass_all' -- all dependencies passed with no checks. 6867# 'test_compile' -- check by making test program. 6868# 'file_magic [[regex]]' -- check by looking for files in library path 6869# that responds to the $file_magic_cmd with a given extended regex. 6870# If you have 'file' or equivalent on your system and you're not sure 6871# whether 'pass_all' will *always* work, you probably want this one. 6872 6873case $host_os in 6874aix[[4-9]]*) 6875 lt_cv_deplibs_check_method=pass_all 6876 ;; 6877 6878beos*) 6879 lt_cv_deplibs_check_method=pass_all 6880 ;; 6881 6882bsdi[[45]]*) 6883 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6884 lt_cv_file_magic_cmd='$FILECMD -L' 6885 lt_cv_file_magic_test_file=/shlib/libc.so 6886 ;; 6887 6888cygwin*) 6889 # func_win32_libid is a shell function defined in ltmain.sh 6890 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6891 lt_cv_file_magic_cmd='func_win32_libid' 6892 ;; 6893 6894mingw* | pw32*) 6895 # Base MSYS/MinGW do not provide the 'file' command needed by 6896 # func_win32_libid shell function, so use a weaker test based on 'objdump', 6897 # unless we find 'file', for example because we are cross-compiling. 6898 if ( file / ) >/dev/null 2>&1; then 6899 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6900 lt_cv_file_magic_cmd='func_win32_libid' 6901 else 6902 # Keep this pattern in sync with the one in func_win32_libid. 6903 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6904 lt_cv_file_magic_cmd='$OBJDUMP -f' 6905 fi 6906 ;; 6907 6908cegcc*) 6909 # use the weaker test based on 'objdump'. See mingw*. 6910 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6911 lt_cv_file_magic_cmd='$OBJDUMP -f' 6912 ;; 6913 6914darwin* | rhapsody*) 6915 lt_cv_deplibs_check_method=pass_all 6916 ;; 6917 6918freebsd* | dragonfly* | midnightbsd*) 6919 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6920 case $host_cpu in 6921 i*86 ) 6922 # Not sure whether the presence of OpenBSD here was a mistake. 6923 # Let's accept both of them until this is cleared up. 6924 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6925 lt_cv_file_magic_cmd=$FILECMD 6926 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6927 ;; 6928 esac 6929 else 6930 lt_cv_deplibs_check_method=pass_all 6931 fi 6932 ;; 6933 6934haiku*) 6935 lt_cv_deplibs_check_method=pass_all 6936 ;; 6937 6938hpux10.20* | hpux11*) 6939 lt_cv_file_magic_cmd=$FILECMD 6940 case $host_cpu in 6941 ia64*) 6942 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6943 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6944 ;; 6945 hppa*64*) 6946 [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]'] 6947 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6948 ;; 6949 *) 6950 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6951 lt_cv_file_magic_test_file=/usr/lib/libc.sl 6952 ;; 6953 esac 6954 ;; 6955 6956interix[[3-9]]*) 6957 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6958 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6959 ;; 6960 6961irix5* | irix6* | nonstopux*) 6962 case $LD in 6963 *-32|*"-32 ") libmagic=32-bit;; 6964 *-n32|*"-n32 ") libmagic=N32;; 6965 *-64|*"-64 ") libmagic=64-bit;; 6966 *) libmagic=never-match;; 6967 esac 6968 lt_cv_deplibs_check_method=pass_all 6969 ;; 6970 6971# This must be glibc/ELF. 6972linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6973 lt_cv_deplibs_check_method=pass_all 6974 ;; 6975 6976netbsd*) 6977 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6978 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6979 else 6980 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6981 fi 6982 ;; 6983 6984newos6*) 6985 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6986 lt_cv_file_magic_cmd=$FILECMD 6987 lt_cv_file_magic_test_file=/usr/lib/libnls.so 6988 ;; 6989 6990*nto* | *qnx*) 6991 lt_cv_deplibs_check_method=pass_all 6992 ;; 6993 6994openbsd* | bitrig*) 6995 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6996 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6997 else 6998 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6999 fi 7000 ;; 7001 7002osf3* | osf4* | osf5*) 7003 lt_cv_deplibs_check_method=pass_all 7004 ;; 7005 7006rdos*) 7007 lt_cv_deplibs_check_method=pass_all 7008 ;; 7009 7010solaris*) 7011 lt_cv_deplibs_check_method=pass_all 7012 ;; 7013 7014sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7015 lt_cv_deplibs_check_method=pass_all 7016 ;; 7017 7018sysv4 | sysv4.3*) 7019 case $host_vendor in 7020 motorola) 7021 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]]' 7022 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7023 ;; 7024 ncr) 7025 lt_cv_deplibs_check_method=pass_all 7026 ;; 7027 sequent) 7028 lt_cv_file_magic_cmd='/bin/file' 7029 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7030 ;; 7031 sni) 7032 lt_cv_file_magic_cmd='/bin/file' 7033 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7034 lt_cv_file_magic_test_file=/lib/libc.so 7035 ;; 7036 siemens) 7037 lt_cv_deplibs_check_method=pass_all 7038 ;; 7039 pc) 7040 lt_cv_deplibs_check_method=pass_all 7041 ;; 7042 esac 7043 ;; 7044 7045tpf*) 7046 lt_cv_deplibs_check_method=pass_all 7047 ;; 7048os2*) 7049 lt_cv_deplibs_check_method=pass_all 7050 ;; 7051esac 7052]) 7053 7054file_magic_glob= 7055want_nocaseglob=no 7056if test "$build" = "$host"; then 7057 case $host_os in 7058 mingw* | pw32*) 7059 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7060 want_nocaseglob=yes 7061 else 7062 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7063 fi 7064 ;; 7065 esac 7066fi 7067 7068file_magic_cmd=$lt_cv_file_magic_cmd 7069deplibs_check_method=$lt_cv_deplibs_check_method 7070test -z "$deplibs_check_method" && deplibs_check_method=unknown 7071 7072_LT_DECL([], [deplibs_check_method], [1], 7073 [Method to check whether dependent libraries are shared objects]) 7074_LT_DECL([], [file_magic_cmd], [1], 7075 [Command to use when deplibs_check_method = "file_magic"]) 7076_LT_DECL([], [file_magic_glob], [1], 7077 [How to find potential files when deplibs_check_method = "file_magic"]) 7078_LT_DECL([], [want_nocaseglob], [1], 7079 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7080])# _LT_CHECK_MAGIC_METHOD 7081 7082 7083# LT_PATH_NM 7084# ---------- 7085# find the pathname to a BSD- or MS-compatible name lister 7086AC_DEFUN([LT_PATH_NM], 7087[AC_REQUIRE([AC_PROG_CC])dnl 7088AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7089[if test -n "$NM"; then 7090 # Let the user override the test. 7091 lt_cv_path_NM=$NM 7092else 7093 lt_nm_to_check=${ac_tool_prefix}nm 7094 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7095 lt_nm_to_check="$lt_nm_to_check nm" 7096 fi 7097 for lt_tmp_nm in $lt_nm_to_check; do 7098 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7099 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7100 IFS=$lt_save_ifs 7101 test -z "$ac_dir" && ac_dir=. 7102 tmp_nm=$ac_dir/$lt_tmp_nm 7103 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7104 # Check to see if the nm accepts a BSD-compat flag. 7105 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7106 # nm: unknown option "B" ignored 7107 # Tru64's nm complains that /dev/null is an invalid object file 7108 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7109 case $build_os in 7110 mingw*) lt_bad_file=conftest.nm/nofile ;; 7111 *) lt_bad_file=/dev/null ;; 7112 esac 7113 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7114 *$lt_bad_file* | *'Invalid file or object type'*) 7115 lt_cv_path_NM="$tmp_nm -B" 7116 break 2 7117 ;; 7118 *) 7119 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7120 */dev/null*) 7121 lt_cv_path_NM="$tmp_nm -p" 7122 break 2 7123 ;; 7124 *) 7125 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7126 continue # so that we can try to find one that supports BSD flags 7127 ;; 7128 esac 7129 ;; 7130 esac 7131 fi 7132 done 7133 IFS=$lt_save_ifs 7134 done 7135 : ${lt_cv_path_NM=no} 7136fi]) 7137if test no != "$lt_cv_path_NM"; then 7138 NM=$lt_cv_path_NM 7139else 7140 # Didn't find any BSD compatible name lister, look for dumpbin. 7141 if test -n "$DUMPBIN"; then : 7142 # Let the user override the test. 7143 else 7144 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7145 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7146 *COFF*) 7147 DUMPBIN="$DUMPBIN -symbols -headers" 7148 ;; 7149 *) 7150 DUMPBIN=: 7151 ;; 7152 esac 7153 fi 7154 AC_SUBST([DUMPBIN]) 7155 if test : != "$DUMPBIN"; then 7156 NM=$DUMPBIN 7157 fi 7158fi 7159test -z "$NM" && NM=nm 7160AC_SUBST([NM]) 7161_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7162 7163AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7164 [lt_cv_nm_interface="BSD nm" 7165 echo "int some_variable = 0;" > conftest.$ac_ext 7166 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7167 (eval "$ac_compile" 2>conftest.err) 7168 cat conftest.err >&AS_MESSAGE_LOG_FD 7169 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7170 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7171 cat conftest.err >&AS_MESSAGE_LOG_FD 7172 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7173 cat conftest.out >&AS_MESSAGE_LOG_FD 7174 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7175 lt_cv_nm_interface="MS dumpbin" 7176 fi 7177 rm -f conftest*]) 7178])# LT_PATH_NM 7179 7180# Old names: 7181AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7182AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7183dnl aclocal-1.4 backwards compatibility: 7184dnl AC_DEFUN([AM_PROG_NM], []) 7185dnl AC_DEFUN([AC_PROG_NM], []) 7186 7187# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7188# -------------------------------- 7189# how to determine the name of the shared library 7190# associated with a specific link library. 7191# -- PORTME fill in with the dynamic library characteristics 7192m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7193[m4_require([_LT_DECL_EGREP]) 7194m4_require([_LT_DECL_OBJDUMP]) 7195m4_require([_LT_DECL_DLLTOOL]) 7196AC_CACHE_CHECK([how to associate runtime and link libraries], 7197lt_cv_sharedlib_from_linklib_cmd, 7198[lt_cv_sharedlib_from_linklib_cmd='unknown' 7199 7200case $host_os in 7201cygwin* | mingw* | pw32* | cegcc*) 7202 # two different shell functions defined in ltmain.sh; 7203 # decide which one to use based on capabilities of $DLLTOOL 7204 case `$DLLTOOL --help 2>&1` in 7205 *--identify-strict*) 7206 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7207 ;; 7208 *) 7209 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7210 ;; 7211 esac 7212 ;; 7213*) 7214 # fallback: assume linklib IS sharedlib 7215 lt_cv_sharedlib_from_linklib_cmd=$ECHO 7216 ;; 7217esac 7218]) 7219sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7220test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7221 7222_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7223 [Command to associate shared and link libraries]) 7224])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7225 7226 7227# _LT_PATH_MANIFEST_TOOL 7228# ---------------------- 7229# locate the manifest tool 7230m4_defun([_LT_PATH_MANIFEST_TOOL], 7231[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7232test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7233AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7234 [lt_cv_path_mainfest_tool=no 7235 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7236 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7237 cat conftest.err >&AS_MESSAGE_LOG_FD 7238 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7239 lt_cv_path_mainfest_tool=yes 7240 fi 7241 rm -f conftest*]) 7242if test yes != "$lt_cv_path_mainfest_tool"; then 7243 MANIFEST_TOOL=: 7244fi 7245_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7246])# _LT_PATH_MANIFEST_TOOL 7247 7248 7249# _LT_DLL_DEF_P([FILE]) 7250# --------------------- 7251# True iff FILE is a Windows DLL '.def' file. 7252# Keep in sync with func_dll_def_p in the libtool script 7253AC_DEFUN([_LT_DLL_DEF_P], 7254[dnl 7255 test DEF = "`$SED -n dnl 7256 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7257 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7258 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7259 -e q dnl Only consider the first "real" line 7260 $1`" dnl 7261])# _LT_DLL_DEF_P 7262 7263 7264# LT_LIB_M 7265# -------- 7266# check for math library 7267AC_DEFUN([LT_LIB_M], 7268[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7269LIBM= 7270case $host in 7271*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7272 # These system don't have libm, or don't need it 7273 ;; 7274*-ncr-sysv4.3*) 7275 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7276 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7277 ;; 7278*) 7279 AC_CHECK_LIB(m, cos, LIBM=-lm) 7280 ;; 7281esac 7282AC_SUBST([LIBM]) 7283])# LT_LIB_M 7284 7285# Old name: 7286AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7287dnl aclocal-1.4 backwards compatibility: 7288dnl AC_DEFUN([AC_CHECK_LIBM], []) 7289 7290 7291# _LT_COMPILER_NO_RTTI([TAGNAME]) 7292# ------------------------------- 7293m4_defun([_LT_COMPILER_NO_RTTI], 7294[m4_require([_LT_TAG_COMPILER])dnl 7295 7296_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7297 7298if test yes = "$GCC"; then 7299 case $cc_basename in 7300 nvcc*) 7301 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7302 *) 7303 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7304 esac 7305 7306 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7307 lt_cv_prog_compiler_rtti_exceptions, 7308 [-fno-rtti -fno-exceptions], [], 7309 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7310fi 7311_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7312 [Compiler flag to turn off builtin functions]) 7313])# _LT_COMPILER_NO_RTTI 7314 7315 7316# _LT_CMD_GLOBAL_SYMBOLS 7317# ---------------------- 7318m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7319[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7320AC_REQUIRE([AC_PROG_CC])dnl 7321AC_REQUIRE([AC_PROG_AWK])dnl 7322AC_REQUIRE([LT_PATH_NM])dnl 7323AC_REQUIRE([LT_PATH_LD])dnl 7324m4_require([_LT_DECL_SED])dnl 7325m4_require([_LT_DECL_EGREP])dnl 7326m4_require([_LT_TAG_COMPILER])dnl 7327 7328# Check for command to grab the raw symbol name followed by C symbol from nm. 7329AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7330AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7331[ 7332# These are sane defaults that work on at least a few old systems. 7333# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7334 7335# Character class describing NM global symbol codes. 7336symcode='[[BCDEGRST]]' 7337 7338# Regexp to match symbols that can be accessed directly from C. 7339sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7340 7341# Define system-specific variables. 7342case $host_os in 7343aix*) 7344 symcode='[[BCDT]]' 7345 ;; 7346cygwin* | mingw* | pw32* | cegcc*) 7347 symcode='[[ABCDGISTW]]' 7348 ;; 7349hpux*) 7350 if test ia64 = "$host_cpu"; then 7351 symcode='[[ABCDEGRST]]' 7352 fi 7353 ;; 7354irix* | nonstopux*) 7355 symcode='[[BCDEGRST]]' 7356 ;; 7357osf*) 7358 symcode='[[BCDEGQRST]]' 7359 ;; 7360solaris*) 7361 symcode='[[BDRT]]' 7362 ;; 7363sco3.2v5*) 7364 symcode='[[DT]]' 7365 ;; 7366sysv4.2uw2*) 7367 symcode='[[DT]]' 7368 ;; 7369sysv5* | sco5v6* | unixware* | OpenUNIX*) 7370 symcode='[[ABDT]]' 7371 ;; 7372sysv4) 7373 symcode='[[DFNSTU]]' 7374 ;; 7375esac 7376 7377# If we're using GNU nm, then use its standard symbol codes. 7378case `$NM -V 2>&1` in 7379*GNU* | *'with BFD'*) 7380 symcode='[[ABCDGIRSTW]]' ;; 7381esac 7382 7383if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7384 # Gets list of data symbols to import. 7385 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7386 # Adjust the below global symbol transforms to fixup imported variables. 7387 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7388 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7389 lt_c_name_lib_hook="\ 7390 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7391 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7392else 7393 # Disable hooks by default. 7394 lt_cv_sys_global_symbol_to_import= 7395 lt_cdecl_hook= 7396 lt_c_name_hook= 7397 lt_c_name_lib_hook= 7398fi 7399 7400# Transform an extracted symbol line into a proper C declaration. 7401# Some systems (esp. on ia64) link data and code symbols differently, 7402# so use this general approach. 7403lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7404$lt_cdecl_hook\ 7405" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7406" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7407 7408# Transform an extracted symbol line into symbol name and symbol address 7409lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7410$lt_c_name_hook\ 7411" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7412" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7413 7414# Transform an extracted symbol line into symbol name with lib prefix and 7415# symbol address. 7416lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7417$lt_c_name_lib_hook\ 7418" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7419" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7420" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7421 7422# Handle CRLF in mingw tool chain 7423opt_cr= 7424case $build_os in 7425mingw*) 7426 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7427 ;; 7428esac 7429 7430# Try without a prefix underscore, then with it. 7431for ac_symprfx in "" "_"; do 7432 7433 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7434 symxfrm="\\1 $ac_symprfx\\2 \\2" 7435 7436 # Write the raw and C identifiers. 7437 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7438 # Fake it for dumpbin and say T for any non-static function, 7439 # D for any global variable and I for any imported variable. 7440 # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7441 # which start with @ or ?. 7442 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7443" {last_section=section; section=\$ 3};"\ 7444" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7445" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7446" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7447" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7448" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7449" \$ 0!~/External *\|/{next};"\ 7450" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7451" {if(hide[section]) next};"\ 7452" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7453" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7454" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7455" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7456" ' prfx=^$ac_symprfx]" 7457 else 7458 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7459 fi 7460 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7461 7462 # Check to see that the pipe works correctly. 7463 pipe_works=no 7464 7465 rm -f conftest* 7466 cat > conftest.$ac_ext <<_LT_EOF 7467#ifdef __cplusplus 7468extern "C" { 7469#endif 7470char nm_test_var; 7471void nm_test_func(void); 7472void nm_test_func(void){} 7473#ifdef __cplusplus 7474} 7475#endif 7476int main(){nm_test_var='a';nm_test_func();return(0);} 7477_LT_EOF 7478 7479 if AC_TRY_EVAL(ac_compile); then 7480 # Now try to grab the symbols. 7481 nlist=conftest.nm 7482 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7483 # Try sorting and uniquifying the output. 7484 if sort "$nlist" | uniq > "$nlist"T; then 7485 mv -f "$nlist"T "$nlist" 7486 else 7487 rm -f "$nlist"T 7488 fi 7489 7490 # Make sure that we snagged all the symbols we need. 7491 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7492 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7493 cat <<_LT_EOF > conftest.$ac_ext 7494/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7495#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7496/* DATA imports from DLLs on WIN32 can't be const, because runtime 7497 relocations are performed -- see ld's documentation on pseudo-relocs. */ 7498# define LT@&t@_DLSYM_CONST 7499#elif defined __osf__ 7500/* This system does not cope well with relocations in const data. */ 7501# define LT@&t@_DLSYM_CONST 7502#else 7503# define LT@&t@_DLSYM_CONST const 7504#endif 7505 7506#ifdef __cplusplus 7507extern "C" { 7508#endif 7509 7510_LT_EOF 7511 # Now generate the symbol file. 7512 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7513 7514 cat <<_LT_EOF >> conftest.$ac_ext 7515 7516/* The mapping between symbol names and symbols. */ 7517LT@&t@_DLSYM_CONST struct { 7518 const char *name; 7519 void *address; 7520} 7521lt__PROGRAM__LTX_preloaded_symbols[[]] = 7522{ 7523 { "@PROGRAM@", (void *) 0 }, 7524_LT_EOF 7525 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7526 cat <<\_LT_EOF >> conftest.$ac_ext 7527 {0, (void *) 0} 7528}; 7529 7530/* This works around a problem in FreeBSD linker */ 7531#ifdef FREEBSD_WORKAROUND 7532static const void *lt_preloaded_setup() { 7533 return lt__PROGRAM__LTX_preloaded_symbols; 7534} 7535#endif 7536 7537#ifdef __cplusplus 7538} 7539#endif 7540_LT_EOF 7541 # Now try linking the two files. 7542 mv conftest.$ac_objext conftstm.$ac_objext 7543 lt_globsym_save_LIBS=$LIBS 7544 lt_globsym_save_CFLAGS=$CFLAGS 7545 LIBS=conftstm.$ac_objext 7546 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7547 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7548 pipe_works=yes 7549 fi 7550 LIBS=$lt_globsym_save_LIBS 7551 CFLAGS=$lt_globsym_save_CFLAGS 7552 else 7553 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7554 fi 7555 else 7556 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7557 fi 7558 else 7559 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7560 fi 7561 else 7562 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7563 cat conftest.$ac_ext >&5 7564 fi 7565 rm -rf conftest* conftst* 7566 7567 # Do not use the global_symbol_pipe unless it works. 7568 if test yes = "$pipe_works"; then 7569 break 7570 else 7571 lt_cv_sys_global_symbol_pipe= 7572 fi 7573done 7574]) 7575if test -z "$lt_cv_sys_global_symbol_pipe"; then 7576 lt_cv_sys_global_symbol_to_cdecl= 7577fi 7578if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7579 AC_MSG_RESULT(failed) 7580else 7581 AC_MSG_RESULT(ok) 7582fi 7583 7584# Response file support. 7585if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7586 nm_file_list_spec='@' 7587elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7588 nm_file_list_spec='@' 7589fi 7590 7591_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7592 [Take the output of nm and produce a listing of raw symbols and C names]) 7593_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7594 [Transform the output of nm in a proper C declaration]) 7595_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7596 [Transform the output of nm into a list of symbols to manually relocate]) 7597_LT_DECL([global_symbol_to_c_name_address], 7598 [lt_cv_sys_global_symbol_to_c_name_address], [1], 7599 [Transform the output of nm in a C name address pair]) 7600_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7601 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7602 [Transform the output of nm in a C name address pair when lib prefix is needed]) 7603_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7604 [The name lister interface]) 7605_LT_DECL([], [nm_file_list_spec], [1], 7606 [Specify filename containing input files for $NM]) 7607]) # _LT_CMD_GLOBAL_SYMBOLS 7608 7609 7610# _LT_COMPILER_PIC([TAGNAME]) 7611# --------------------------- 7612m4_defun([_LT_COMPILER_PIC], 7613[m4_require([_LT_TAG_COMPILER])dnl 7614_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7615_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7616_LT_TAGVAR(lt_prog_compiler_static, $1)= 7617 7618m4_if([$1], [CXX], [ 7619 # C++ specific cases for pic, static, wl, etc. 7620 if test yes = "$GXX"; then 7621 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7622 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7623 7624 case $host_os in 7625 aix*) 7626 # All AIX code is PIC. 7627 if test ia64 = "$host_cpu"; then 7628 # AIX 5 now supports IA64 processor 7629 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7630 fi 7631 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7632 ;; 7633 7634 amigaos*) 7635 case $host_cpu in 7636 powerpc) 7637 # see comment about AmigaOS4 .so support 7638 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7639 ;; 7640 m68k) 7641 # FIXME: we need at least 68020 code to build shared libraries, but 7642 # adding the '-m68020' flag to GCC prevents building anything better, 7643 # like '-m68040'. 7644 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7645 ;; 7646 esac 7647 ;; 7648 7649 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7650 # PIC is the default for these OSes. 7651 ;; 7652 mingw* | cygwin* | os2* | pw32* | cegcc*) 7653 # This hack is so that the source file can tell whether it is being 7654 # built for inclusion in a dll (and should export symbols for example). 7655 # Although the cygwin gcc ignores -fPIC, still need this for old-style 7656 # (--disable-auto-import) libraries 7657 m4_if([$1], [GCJ], [], 7658 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7659 case $host_os in 7660 os2*) 7661 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7662 ;; 7663 esac 7664 ;; 7665 darwin* | rhapsody*) 7666 # PIC is the default on this platform 7667 # Common symbols not allowed in MH_DYLIB files 7668 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7669 ;; 7670 *djgpp*) 7671 # DJGPP does not support shared libraries at all 7672 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7673 ;; 7674 haiku*) 7675 # PIC is the default for Haiku. 7676 # The "-static" flag exists, but is broken. 7677 _LT_TAGVAR(lt_prog_compiler_static, $1)= 7678 ;; 7679 interix[[3-9]]*) 7680 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7681 # Instead, we relocate shared libraries at runtime. 7682 ;; 7683 sysv4*MP*) 7684 if test -d /usr/nec; then 7685 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7686 fi 7687 ;; 7688 hpux*) 7689 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7690 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7691 # sets the default TLS model and affects inlining. 7692 case $host_cpu in 7693 hppa*64*) 7694 ;; 7695 *) 7696 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7697 ;; 7698 esac 7699 ;; 7700 *qnx* | *nto*) 7701 # QNX uses GNU C++, but need to define -shared option too, otherwise 7702 # it will coredump. 7703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7704 ;; 7705 *) 7706 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7707 ;; 7708 esac 7709 else 7710 case $host_os in 7711 aix[[4-9]]*) 7712 # All AIX code is PIC. 7713 if test ia64 = "$host_cpu"; then 7714 # AIX 5 now supports IA64 processor 7715 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7716 else 7717 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7718 fi 7719 ;; 7720 chorus*) 7721 case $cc_basename in 7722 cxch68*) 7723 # Green Hills C++ Compiler 7724 # _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" 7725 ;; 7726 esac 7727 ;; 7728 mingw* | cygwin* | os2* | pw32* | cegcc*) 7729 # This hack is so that the source file can tell whether it is being 7730 # built for inclusion in a dll (and should export symbols for example). 7731 m4_if([$1], [GCJ], [], 7732 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7733 ;; 7734 dgux*) 7735 case $cc_basename in 7736 ec++*) 7737 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7738 ;; 7739 ghcx*) 7740 # Green Hills C++ Compiler 7741 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7742 ;; 7743 *) 7744 ;; 7745 esac 7746 ;; 7747 freebsd* | dragonfly* | midnightbsd*) 7748 # FreeBSD uses GNU C++ 7749 ;; 7750 hpux9* | hpux10* | hpux11*) 7751 case $cc_basename in 7752 CC*) 7753 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7754 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7755 if test ia64 != "$host_cpu"; then 7756 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7757 fi 7758 ;; 7759 aCC*) 7760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7761 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7762 case $host_cpu in 7763 hppa*64*|ia64*) 7764 # +Z the default 7765 ;; 7766 *) 7767 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7768 ;; 7769 esac 7770 ;; 7771 *) 7772 ;; 7773 esac 7774 ;; 7775 interix*) 7776 # This is c89, which is MS Visual C++ (no shared libs) 7777 # Anyone wants to do a port? 7778 ;; 7779 irix5* | irix6* | nonstopux*) 7780 case $cc_basename in 7781 CC*) 7782 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7783 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7784 # CC pic flag -KPIC is the default. 7785 ;; 7786 *) 7787 ;; 7788 esac 7789 ;; 7790 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7791 case $cc_basename in 7792 KCC*) 7793 # KAI C++ Compiler 7794 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7796 ;; 7797 ecpc* ) 7798 # old Intel C++ for x86_64, which still supported -KPIC. 7799 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7802 ;; 7803 icpc* ) 7804 # Intel C++, used to be incompatible with GCC. 7805 # ICC 10 doesn't accept -KPIC any more. 7806 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7807 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7809 ;; 7810 pgCC* | pgcpp*) 7811 # Portland Group C++ compiler 7812 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7813 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7814 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7815 ;; 7816 cxx*) 7817 # Compaq C++ 7818 # Make sure the PIC flag is empty. It appears that all Alpha 7819 # Linux and Compaq Tru64 Unix objects are PIC. 7820 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7822 ;; 7823 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7824 # IBM XL 8.0, 9.0 on PPC and BlueGene 7825 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7827 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7828 ;; 7829 *) 7830 case `$CC -V 2>&1 | $SED 5q` in 7831 *Sun\ C*) 7832 # Sun C++ 5.9 7833 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7834 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7836 ;; 7837 esac 7838 ;; 7839 esac 7840 ;; 7841 lynxos*) 7842 ;; 7843 m88k*) 7844 ;; 7845 mvs*) 7846 case $cc_basename in 7847 cxx*) 7848 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7849 ;; 7850 *) 7851 ;; 7852 esac 7853 ;; 7854 netbsd*) 7855 ;; 7856 *qnx* | *nto*) 7857 # QNX uses GNU C++, but need to define -shared option too, otherwise 7858 # it will coredump. 7859 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7860 ;; 7861 osf3* | osf4* | osf5*) 7862 case $cc_basename in 7863 KCC*) 7864 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7865 ;; 7866 RCC*) 7867 # Rational C++ 2.4.1 7868 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7869 ;; 7870 cxx*) 7871 # Digital/Compaq C++ 7872 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7873 # Make sure the PIC flag is empty. It appears that all Alpha 7874 # Linux and Compaq Tru64 Unix objects are PIC. 7875 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7876 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7877 ;; 7878 *) 7879 ;; 7880 esac 7881 ;; 7882 psos*) 7883 ;; 7884 solaris*) 7885 case $cc_basename in 7886 CC* | sunCC*) 7887 # Sun C++ 4.2, 5.x and Centerline C++ 7888 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7890 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7891 ;; 7892 gcx*) 7893 # Green Hills C++ Compiler 7894 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7895 ;; 7896 *) 7897 ;; 7898 esac 7899 ;; 7900 sunos4*) 7901 case $cc_basename in 7902 CC*) 7903 # Sun C++ 4.x 7904 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7905 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7906 ;; 7907 lcc*) 7908 # Lucid 7909 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7910 ;; 7911 *) 7912 ;; 7913 esac 7914 ;; 7915 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7916 case $cc_basename in 7917 CC*) 7918 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7920 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7921 ;; 7922 esac 7923 ;; 7924 tandem*) 7925 case $cc_basename in 7926 NCC*) 7927 # NonStop-UX NCC 3.20 7928 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7929 ;; 7930 *) 7931 ;; 7932 esac 7933 ;; 7934 vxworks*) 7935 ;; 7936 *) 7937 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7938 ;; 7939 esac 7940 fi 7941], 7942[ 7943 if test yes = "$GCC"; then 7944 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7946 7947 case $host_os in 7948 aix*) 7949 # All AIX code is PIC. 7950 if test ia64 = "$host_cpu"; then 7951 # AIX 5 now supports IA64 processor 7952 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7953 fi 7954 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7955 ;; 7956 7957 amigaos*) 7958 case $host_cpu in 7959 powerpc) 7960 # see comment about AmigaOS4 .so support 7961 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7962 ;; 7963 m68k) 7964 # FIXME: we need at least 68020 code to build shared libraries, but 7965 # adding the '-m68020' flag to GCC prevents building anything better, 7966 # like '-m68040'. 7967 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7968 ;; 7969 esac 7970 ;; 7971 7972 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7973 # PIC is the default for these OSes. 7974 ;; 7975 7976 mingw* | cygwin* | pw32* | os2* | cegcc*) 7977 # This hack is so that the source file can tell whether it is being 7978 # built for inclusion in a dll (and should export symbols for example). 7979 # Although the cygwin gcc ignores -fPIC, still need this for old-style 7980 # (--disable-auto-import) libraries 7981 m4_if([$1], [GCJ], [], 7982 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7983 case $host_os in 7984 os2*) 7985 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7986 ;; 7987 esac 7988 ;; 7989 7990 darwin* | rhapsody*) 7991 # PIC is the default on this platform 7992 # Common symbols not allowed in MH_DYLIB files 7993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7994 ;; 7995 7996 haiku*) 7997 # PIC is the default for Haiku. 7998 # The "-static" flag exists, but is broken. 7999 _LT_TAGVAR(lt_prog_compiler_static, $1)= 8000 ;; 8001 8002 hpux*) 8003 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8004 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8005 # sets the default TLS model and affects inlining. 8006 case $host_cpu in 8007 hppa*64*) 8008 # +Z the default 8009 ;; 8010 *) 8011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8012 ;; 8013 esac 8014 ;; 8015 8016 interix[[3-9]]*) 8017 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8018 # Instead, we relocate shared libraries at runtime. 8019 ;; 8020 8021 msdosdjgpp*) 8022 # Just because we use GCC doesn't mean we suddenly get shared libraries 8023 # on systems that don't support them. 8024 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8025 enable_shared=no 8026 ;; 8027 8028 *nto* | *qnx*) 8029 # QNX uses GNU C++, but need to define -shared option too, otherwise 8030 # it will coredump. 8031 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8032 ;; 8033 8034 sysv4*MP*) 8035 if test -d /usr/nec; then 8036 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8037 fi 8038 ;; 8039 8040 *) 8041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8042 ;; 8043 esac 8044 8045 case $cc_basename in 8046 nvcc*) # Cuda Compiler Driver 2.2 8047 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8048 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8049 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8050 fi 8051 ;; 8052 esac 8053 else 8054 # PORTME Check for flag to pass linker flags through the system compiler. 8055 case $host_os in 8056 aix*) 8057 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8058 if test ia64 = "$host_cpu"; then 8059 # AIX 5 now supports IA64 processor 8060 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8061 else 8062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8063 fi 8064 ;; 8065 8066 darwin* | rhapsody*) 8067 # PIC is the default on this platform 8068 # Common symbols not allowed in MH_DYLIB files 8069 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8070 case $cc_basename in 8071 nagfor*) 8072 # NAG Fortran compiler 8073 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8074 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8076 ;; 8077 esac 8078 ;; 8079 8080 mingw* | cygwin* | pw32* | os2* | cegcc*) 8081 # This hack is so that the source file can tell whether it is being 8082 # built for inclusion in a dll (and should export symbols for example). 8083 m4_if([$1], [GCJ], [], 8084 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8085 case $host_os in 8086 os2*) 8087 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8088 ;; 8089 esac 8090 ;; 8091 8092 hpux9* | hpux10* | hpux11*) 8093 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8094 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8095 # not for PA HP-UX. 8096 case $host_cpu in 8097 hppa*64*|ia64*) 8098 # +Z the default 8099 ;; 8100 *) 8101 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8102 ;; 8103 esac 8104 # Is there a better lt_prog_compiler_static that works with the bundled CC? 8105 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8106 ;; 8107 8108 irix5* | irix6* | nonstopux*) 8109 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8110 # PIC (with -KPIC) is the default. 8111 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8112 ;; 8113 8114 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8115 case $cc_basename in 8116 # old Intel for x86_64, which still supported -KPIC. 8117 ecc*) 8118 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8119 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8120 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8121 ;; 8122 # icc used to be incompatible with GCC. 8123 # ICC 10 doesn't accept -KPIC any more. 8124 icc* | ifort*) 8125 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8126 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8127 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8128 ;; 8129 # Lahey Fortran 8.1. 8130 lf95*) 8131 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8132 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8133 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8134 ;; 8135 nagfor*) 8136 # NAG Fortran compiler 8137 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8138 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8139 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8140 ;; 8141 tcc*) 8142 # Fabrice Bellard et al's Tiny C Compiler 8143 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8144 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8145 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8146 ;; 8147 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8148 # Portland Group compilers (*not* the Pentium gcc compiler, 8149 # which looks to be a dead project) 8150 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8151 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8152 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153 ;; 8154 ccc*) 8155 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8156 # All Alpha code is PIC. 8157 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8158 ;; 8159 xl* | bgxl* | bgf* | mpixl*) 8160 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8161 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8162 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8163 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8164 ;; 8165 *) 8166 case `$CC -V 2>&1 | $SED 5q` in 8167 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8168 # Sun Fortran 8.3 passes all unrecognized flags to the linker 8169 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8172 ;; 8173 *Sun\ F* | *Sun*Fortran*) 8174 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8176 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8177 ;; 8178 *Sun\ C*) 8179 # Sun C 5.9 8180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8182 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8183 ;; 8184 *Intel*\ [[CF]]*Compiler*) 8185 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8186 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8187 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8188 ;; 8189 *Portland\ Group*) 8190 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8191 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8192 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8193 ;; 8194 esac 8195 ;; 8196 esac 8197 ;; 8198 8199 newsos6) 8200 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8201 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8202 ;; 8203 8204 *nto* | *qnx*) 8205 # QNX uses GNU C++, but need to define -shared option too, otherwise 8206 # it will coredump. 8207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8208 ;; 8209 8210 osf3* | osf4* | osf5*) 8211 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8212 # All OSF/1 code is PIC. 8213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8214 ;; 8215 8216 rdos*) 8217 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8218 ;; 8219 8220 solaris*) 8221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8223 case $cc_basename in 8224 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8225 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8226 *) 8227 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8228 esac 8229 ;; 8230 8231 sunos4*) 8232 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8233 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8234 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8235 ;; 8236 8237 sysv4 | sysv4.2uw2* | sysv4.3*) 8238 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8239 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8240 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8241 ;; 8242 8243 sysv4*MP*) 8244 if test -d /usr/nec; then 8245 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8246 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8247 fi 8248 ;; 8249 8250 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8251 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8253 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8254 ;; 8255 8256 unicos*) 8257 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8258 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8259 ;; 8260 8261 uts4*) 8262 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8263 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8264 ;; 8265 8266 *) 8267 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8268 ;; 8269 esac 8270 fi 8271]) 8272case $host_os in 8273 # For platforms that do not support PIC, -DPIC is meaningless: 8274 *djgpp*) 8275 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8276 ;; 8277 *) 8278 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8279 ;; 8280esac 8281 8282AC_CACHE_CHECK([for $compiler option to produce PIC], 8283 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8284 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8285_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8286 8287# 8288# Check to make sure the PIC flag actually works. 8289# 8290if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8291 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8292 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8293 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8294 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8295 "" | " "*) ;; 8296 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8297 esac], 8298 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8299 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8300fi 8301_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8302 [Additional compiler flags for building library objects]) 8303 8304_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8305 [How to pass a linker flag through the compiler]) 8306# 8307# Check to make sure the static flag actually works. 8308# 8309wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8310_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8311 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8312 $lt_tmp_static_flag, 8313 [], 8314 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8315_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8316 [Compiler flag to prevent dynamic linking]) 8317])# _LT_COMPILER_PIC 8318 8319 8320# _LT_LINKER_SHLIBS([TAGNAME]) 8321# ---------------------------- 8322# See if the linker supports building shared libraries. 8323m4_defun([_LT_LINKER_SHLIBS], 8324[AC_REQUIRE([LT_PATH_LD])dnl 8325AC_REQUIRE([LT_PATH_NM])dnl 8326m4_require([_LT_PATH_MANIFEST_TOOL])dnl 8327m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8328m4_require([_LT_DECL_EGREP])dnl 8329m4_require([_LT_DECL_SED])dnl 8330m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8331m4_require([_LT_TAG_COMPILER])dnl 8332AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8333m4_if([$1], [CXX], [ 8334 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8335 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8336 case $host_os in 8337 aix[[4-9]]*) 8338 # If we're using GNU nm, then we don't want the "-C" option. 8339 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8340 # Without the "-l" option, or with the "-B" option, AIX nm treats 8341 # weak defined symbols like other global defined symbols, whereas 8342 # GNU nm marks them as "W". 8343 # While the 'weak' keyword is ignored in the Export File, we need 8344 # it in the Import File for the 'aix-soname' feature, so we have 8345 # to replace the "-B" option with "-P" for AIX nm. 8346 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8347 _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' 8348 else 8349 _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' 8350 fi 8351 ;; 8352 pw32*) 8353 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8354 ;; 8355 cygwin* | mingw* | cegcc*) 8356 case $cc_basename in 8357 cl* | icl*) 8358 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8359 ;; 8360 *) 8361 _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' 8362 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8363 ;; 8364 esac 8365 ;; 8366 *) 8367 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8368 ;; 8369 esac 8370], [ 8371 runpath_var= 8372 _LT_TAGVAR(allow_undefined_flag, $1)= 8373 _LT_TAGVAR(always_export_symbols, $1)=no 8374 _LT_TAGVAR(archive_cmds, $1)= 8375 _LT_TAGVAR(archive_expsym_cmds, $1)= 8376 _LT_TAGVAR(compiler_needs_object, $1)=no 8377 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8378 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8379 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8380 _LT_TAGVAR(hardcode_automatic, $1)=no 8381 _LT_TAGVAR(hardcode_direct, $1)=no 8382 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8383 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8384 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8385 _LT_TAGVAR(hardcode_minus_L, $1)=no 8386 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8387 _LT_TAGVAR(inherit_rpath, $1)=no 8388 _LT_TAGVAR(link_all_deplibs, $1)=unknown 8389 _LT_TAGVAR(module_cmds, $1)= 8390 _LT_TAGVAR(module_expsym_cmds, $1)= 8391 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8392 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8393 _LT_TAGVAR(thread_safe_flag_spec, $1)= 8394 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8395 # include_expsyms should be a list of space-separated symbols to be *always* 8396 # included in the symbol list 8397 _LT_TAGVAR(include_expsyms, $1)= 8398 # exclude_expsyms can be an extended regexp of symbols to exclude 8399 # it will be wrapped by ' (' and ')$', so one must not match beginning or 8400 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8401 # as well as any symbol that contains 'd'. 8402 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8403 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8404 # platforms (ab)use it in PIC code, but their linkers get confused if 8405 # the symbol is explicitly referenced. Since portable code cannot 8406 # rely on this symbol name, it's probably fine to never include it in 8407 # preloaded symbol tables. 8408 # Exclude shared library initialization/finalization symbols. 8409dnl Note also adjust exclude_expsyms for C++ above. 8410 extract_expsyms_cmds= 8411 8412 case $host_os in 8413 cygwin* | mingw* | pw32* | cegcc*) 8414 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8415 # When not using gcc, we currently assume that we are using 8416 # Microsoft Visual C++ or Intel C++ Compiler. 8417 if test yes != "$GCC"; then 8418 with_gnu_ld=no 8419 fi 8420 ;; 8421 interix*) 8422 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8423 with_gnu_ld=yes 8424 ;; 8425 openbsd* | bitrig*) 8426 with_gnu_ld=no 8427 ;; 8428 esac 8429 8430 _LT_TAGVAR(ld_shlibs, $1)=yes 8431 8432 # On some targets, GNU ld is compatible enough with the native linker 8433 # that we're better off using the native interface for both. 8434 lt_use_gnu_ld_interface=no 8435 if test yes = "$with_gnu_ld"; then 8436 case $host_os in 8437 aix*) 8438 # The AIX port of GNU ld has always aspired to compatibility 8439 # with the native linker. However, as the warning in the GNU ld 8440 # block says, versions before 2.19.5* couldn't really create working 8441 # shared libraries, regardless of the interface used. 8442 case `$LD -v 2>&1` in 8443 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8444 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8445 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8446 *) 8447 lt_use_gnu_ld_interface=yes 8448 ;; 8449 esac 8450 ;; 8451 *) 8452 lt_use_gnu_ld_interface=yes 8453 ;; 8454 esac 8455 fi 8456 8457 if test yes = "$lt_use_gnu_ld_interface"; then 8458 # If archive_cmds runs LD, not CC, wlarc should be empty 8459 wlarc='$wl' 8460 8461 # Set some defaults for GNU ld with shared library support. These 8462 # are reset later if shared libraries are not supported. Putting them 8463 # here allows them to be overridden if necessary. 8464 runpath_var=LD_RUN_PATH 8465 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8466 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8467 # ancient GNU ld didn't support --whole-archive et. al. 8468 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8469 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8470 else 8471 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8472 fi 8473 supports_anon_versioning=no 8474 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8475 *GNU\ gold*) supports_anon_versioning=yes ;; 8476 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8477 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8478 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8479 *\ 2.11.*) ;; # other 2.11 versions 8480 *) supports_anon_versioning=yes ;; 8481 esac 8482 8483 # See if GNU ld supports shared libraries. 8484 case $host_os in 8485 aix[[3-9]]*) 8486 # On AIX/PPC, the GNU linker is very broken 8487 if test ia64 != "$host_cpu"; then 8488 _LT_TAGVAR(ld_shlibs, $1)=no 8489 cat <<_LT_EOF 1>&2 8490 8491*** Warning: the GNU linker, at least up to release 2.19, is reported 8492*** to be unable to reliably create shared libraries on AIX. 8493*** Therefore, libtool is disabling shared libraries support. If you 8494*** really care for shared libraries, you may want to install binutils 8495*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8496*** You will then need to restart the configuration process. 8497 8498_LT_EOF 8499 fi 8500 ;; 8501 8502 amigaos*) 8503 case $host_cpu in 8504 powerpc) 8505 # see comment about AmigaOS4 .so support 8506 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8507 _LT_TAGVAR(archive_expsym_cmds, $1)='' 8508 ;; 8509 m68k) 8510 _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)' 8511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8512 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8513 ;; 8514 esac 8515 ;; 8516 8517 beos*) 8518 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8519 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8520 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8521 # support --undefined. This deserves some investigation. FIXME 8522 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8523 else 8524 _LT_TAGVAR(ld_shlibs, $1)=no 8525 fi 8526 ;; 8527 8528 cygwin* | mingw* | pw32* | cegcc*) 8529 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8530 # as there is no search path for DLLs. 8531 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8532 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8533 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8534 _LT_TAGVAR(always_export_symbols, $1)=no 8535 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8536 _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' 8537 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8538 8539 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8540 _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' 8541 # If the export-symbols file already is a .def file, use it as 8542 # is; otherwise, prepend EXPORTS... 8543 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8544 cp $export_symbols $output_objdir/$soname.def; 8545 else 8546 echo EXPORTS > $output_objdir/$soname.def; 8547 cat $export_symbols >> $output_objdir/$soname.def; 8548 fi~ 8549 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8550 else 8551 _LT_TAGVAR(ld_shlibs, $1)=no 8552 fi 8553 ;; 8554 8555 haiku*) 8556 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8557 _LT_TAGVAR(link_all_deplibs, $1)=yes 8558 ;; 8559 8560 os2*) 8561 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8562 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8563 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8564 shrext_cmds=.dll 8565 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8566 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8567 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8568 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8569 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8570 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8571 emximp -o $lib $output_objdir/$libname.def' 8572 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8573 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8574 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8575 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8576 prefix_cmds="$SED"~ 8577 if test EXPORTS = "`$SED 1q $export_symbols`"; then 8578 prefix_cmds="$prefix_cmds -e 1d"; 8579 fi~ 8580 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8581 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8582 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8583 emximp -o $lib $output_objdir/$libname.def' 8584 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8585 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8586 _LT_TAGVAR(file_list_spec, $1)='@' 8587 ;; 8588 8589 interix[[3-9]]*) 8590 _LT_TAGVAR(hardcode_direct, $1)=no 8591 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8593 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8594 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8595 # Instead, shared libraries are loaded at an image base (0x10000000 by 8596 # default) and relocated if they conflict, which is a slow very memory 8597 # consuming and fragmenting process. To avoid this, we pick a random, 8598 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8599 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8600 _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' 8601 _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' 8602 ;; 8603 8604 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8605 tmp_diet=no 8606 if test linux-dietlibc = "$host_os"; then 8607 case $cc_basename in 8608 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8609 esac 8610 fi 8611 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8612 && test no = "$tmp_diet" 8613 then 8614 tmp_addflag=' $pic_flag' 8615 tmp_sharedflag='-shared' 8616 case $cc_basename,$host_cpu in 8617 pgcc*) # Portland Group C compiler 8618 _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' 8619 tmp_addflag=' $pic_flag' 8620 ;; 8621 pgf77* | pgf90* | pgf95* | pgfortran*) 8622 # Portland Group f77 and f90 compilers 8623 _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' 8624 tmp_addflag=' $pic_flag -Mnomain' ;; 8625 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8626 tmp_addflag=' -i_dynamic' ;; 8627 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8628 tmp_addflag=' -i_dynamic -nofor_main' ;; 8629 ifc* | ifort*) # Intel Fortran compiler 8630 tmp_addflag=' -nofor_main' ;; 8631 lf95*) # Lahey Fortran 8.1 8632 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8633 tmp_sharedflag='--shared' ;; 8634 nagfor*) # NAGFOR 5.3 8635 tmp_sharedflag='-Wl,-shared' ;; 8636 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8637 tmp_sharedflag='-qmkshrobj' 8638 tmp_addflag= ;; 8639 nvcc*) # Cuda Compiler Driver 2.2 8640 _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' 8641 _LT_TAGVAR(compiler_needs_object, $1)=yes 8642 ;; 8643 esac 8644 case `$CC -V 2>&1 | $SED 5q` in 8645 *Sun\ C*) # Sun C 5.9 8646 _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' 8647 _LT_TAGVAR(compiler_needs_object, $1)=yes 8648 tmp_sharedflag='-G' ;; 8649 *Sun\ F*) # Sun Fortran 8.3 8650 tmp_sharedflag='-G' ;; 8651 esac 8652 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8653 8654 if test yes = "$supports_anon_versioning"; then 8655 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8656 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8657 echo "local: *; };" >> $output_objdir/$libname.ver~ 8658 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8659 fi 8660 8661 case $cc_basename in 8662 tcc*) 8663 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8664 ;; 8665 xlf* | bgf* | bgxlf* | mpixlf*) 8666 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8667 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8668 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8669 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8670 if test yes = "$supports_anon_versioning"; then 8671 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8672 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8673 echo "local: *; };" >> $output_objdir/$libname.ver~ 8674 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8675 fi 8676 ;; 8677 esac 8678 else 8679 _LT_TAGVAR(ld_shlibs, $1)=no 8680 fi 8681 ;; 8682 8683 netbsd*) 8684 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8685 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8686 wlarc= 8687 else 8688 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8689 _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' 8690 fi 8691 ;; 8692 8693 solaris*) 8694 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8695 _LT_TAGVAR(ld_shlibs, $1)=no 8696 cat <<_LT_EOF 1>&2 8697 8698*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8699*** create shared libraries on Solaris systems. Therefore, libtool 8700*** is disabling shared libraries support. We urge you to upgrade GNU 8701*** binutils to release 2.9.1 or newer. Another option is to modify 8702*** your PATH or compiler configuration so that the native linker is 8703*** used, and then restart. 8704 8705_LT_EOF 8706 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8707 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8708 _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' 8709 else 8710 _LT_TAGVAR(ld_shlibs, $1)=no 8711 fi 8712 ;; 8713 8714 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8715 case `$LD -v 2>&1` in 8716 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8717 _LT_TAGVAR(ld_shlibs, $1)=no 8718 cat <<_LT_EOF 1>&2 8719 8720*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8721*** reliably create shared libraries on SCO systems. Therefore, libtool 8722*** is disabling shared libraries support. We urge you to upgrade GNU 8723*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8724*** your PATH or compiler configuration so that the native linker is 8725*** used, and then restart. 8726 8727_LT_EOF 8728 ;; 8729 *) 8730 # For security reasons, it is highly recommended that you always 8731 # use absolute paths for naming shared libraries, and exclude the 8732 # DT_RUNPATH tag from executables and libraries. But doing so 8733 # requires that you compile everything twice, which is a pain. 8734 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8735 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8736 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8737 _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' 8738 else 8739 _LT_TAGVAR(ld_shlibs, $1)=no 8740 fi 8741 ;; 8742 esac 8743 ;; 8744 8745 sunos4*) 8746 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8747 wlarc= 8748 _LT_TAGVAR(hardcode_direct, $1)=yes 8749 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8750 ;; 8751 8752 *) 8753 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8754 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8755 _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' 8756 else 8757 _LT_TAGVAR(ld_shlibs, $1)=no 8758 fi 8759 ;; 8760 esac 8761 8762 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8763 runpath_var= 8764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8765 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8766 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8767 fi 8768 else 8769 # PORTME fill in a description of your system's linker (not GNU ld) 8770 case $host_os in 8771 aix3*) 8772 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8773 _LT_TAGVAR(always_export_symbols, $1)=yes 8774 _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' 8775 # Note: this linker hardcodes the directories in LIBPATH if there 8776 # are no directories specified by -L. 8777 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8778 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8779 # Neither direct hardcoding nor static linking is supported with a 8780 # broken collect2. 8781 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8782 fi 8783 ;; 8784 8785 aix[[4-9]]*) 8786 if test ia64 = "$host_cpu"; then 8787 # On IA64, the linker does run time linking by default, so we don't 8788 # have to do anything special. 8789 aix_use_runtimelinking=no 8790 exp_sym_flag='-Bexport' 8791 no_entry_flag= 8792 else 8793 # If we're using GNU nm, then we don't want the "-C" option. 8794 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8795 # Without the "-l" option, or with the "-B" option, AIX nm treats 8796 # weak defined symbols like other global defined symbols, whereas 8797 # GNU nm marks them as "W". 8798 # While the 'weak' keyword is ignored in the Export File, we need 8799 # it in the Import File for the 'aix-soname' feature, so we have 8800 # to replace the "-B" option with "-P" for AIX nm. 8801 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8802 _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' 8803 else 8804 _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' 8805 fi 8806 aix_use_runtimelinking=no 8807 8808 # Test if we are trying to use run time linking or normal 8809 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8810 # have runtime linking enabled, and use it for executables. 8811 # For shared libraries, we enable/disable runtime linking 8812 # depending on the kind of the shared library created - 8813 # when "with_aix_soname,aix_use_runtimelinking" is: 8814 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8815 # "aix,yes" lib.so shared, rtl:yes, for executables 8816 # lib.a static archive 8817 # "both,no" lib.so.V(shr.o) shared, rtl:yes 8818 # lib.a(lib.so.V) shared, rtl:no, for executables 8819 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8820 # lib.a(lib.so.V) shared, rtl:no 8821 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8822 # lib.a static archive 8823 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8824 for ld_flag in $LDFLAGS; do 8825 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8826 aix_use_runtimelinking=yes 8827 break 8828 fi 8829 done 8830 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8831 # With aix-soname=svr4, we create the lib.so.V shared archives only, 8832 # so we don't have lib.a shared libs to link our executables. 8833 # We have to force runtime linking in this case. 8834 aix_use_runtimelinking=yes 8835 LDFLAGS="$LDFLAGS -Wl,-brtl" 8836 fi 8837 ;; 8838 esac 8839 8840 exp_sym_flag='-bexport' 8841 no_entry_flag='-bnoentry' 8842 fi 8843 8844 # When large executables or shared objects are built, AIX ld can 8845 # have problems creating the table of contents. If linking a library 8846 # or program results in "error TOC overflow" add -mminimal-toc to 8847 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8848 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8849 8850 _LT_TAGVAR(archive_cmds, $1)='' 8851 _LT_TAGVAR(hardcode_direct, $1)=yes 8852 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8853 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8854 _LT_TAGVAR(link_all_deplibs, $1)=yes 8855 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8856 case $with_aix_soname,$aix_use_runtimelinking in 8857 aix,*) ;; # traditional, no import file 8858 svr4,* | *,yes) # use import file 8859 # The Import File defines what to hardcode. 8860 _LT_TAGVAR(hardcode_direct, $1)=no 8861 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8862 ;; 8863 esac 8864 8865 if test yes = "$GCC"; then 8866 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8867 # We only want to do this on AIX 4.2 and lower, the check 8868 # below for broken collect2 doesn't work under 4.3+ 8869 collect2name=`$CC -print-prog-name=collect2` 8870 if test -f "$collect2name" && 8871 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8872 then 8873 # We have reworked collect2 8874 : 8875 else 8876 # We have old collect2 8877 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8878 # It fails to find uninstalled libraries when the uninstalled 8879 # path is not listed in the libpath. Setting hardcode_minus_L 8880 # to unsupported forces relinking 8881 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8882 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8883 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8884 fi 8885 ;; 8886 esac 8887 shared_flag='-shared' 8888 if test yes = "$aix_use_runtimelinking"; then 8889 shared_flag="$shared_flag "'$wl-G' 8890 fi 8891 # Need to ensure runtime linking is disabled for the traditional 8892 # shared library, or the linker may eventually find shared libraries 8893 # /with/ Import File - we do not want to mix them. 8894 shared_flag_aix='-shared' 8895 shared_flag_svr4='-shared $wl-G' 8896 else 8897 # not using gcc 8898 if test ia64 = "$host_cpu"; then 8899 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8900 # chokes on -Wl,-G. The following line is correct: 8901 shared_flag='-G' 8902 else 8903 if test yes = "$aix_use_runtimelinking"; then 8904 shared_flag='$wl-G' 8905 else 8906 shared_flag='$wl-bM:SRE' 8907 fi 8908 shared_flag_aix='$wl-bM:SRE' 8909 shared_flag_svr4='$wl-G' 8910 fi 8911 fi 8912 8913 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8914 # It seems that -bexpall does not export symbols beginning with 8915 # underscore (_), so it is better to generate a list of symbols to export. 8916 _LT_TAGVAR(always_export_symbols, $1)=yes 8917 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8918 # Warning - without using the other runtime loading flags (-brtl), 8919 # -berok will link without error, but may produce a broken library. 8920 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8921 # Determine the default libpath from the value encoded in an 8922 # empty executable. 8923 _LT_SYS_MODULE_PATH_AIX([$1]) 8924 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8925 _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 8926 else 8927 if test ia64 = "$host_cpu"; then 8928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8929 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8930 _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" 8931 else 8932 # Determine the default libpath from the value encoded in an 8933 # empty executable. 8934 _LT_SYS_MODULE_PATH_AIX([$1]) 8935 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8936 # Warning - without using the other run time loading flags, 8937 # -berok will link without error, but may produce a broken library. 8938 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8939 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8940 if test yes = "$with_gnu_ld"; then 8941 # We only use this code for GNU lds that support --whole-archive. 8942 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8943 else 8944 # Exported symbols can be pulled into shared objects from archives 8945 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8946 fi 8947 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8948 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8949 # -brtl affects multiple linker settings, -berok does not and is overridden later 8950 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8951 if test svr4 != "$with_aix_soname"; then 8952 # This is similar to how AIX traditionally builds its shared libraries. 8953 _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' 8954 fi 8955 if test aix != "$with_aix_soname"; then 8956 _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' 8957 else 8958 # used by -dlpreopen to get the symbols 8959 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8960 fi 8961 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8962 fi 8963 fi 8964 ;; 8965 8966 amigaos*) 8967 case $host_cpu in 8968 powerpc) 8969 # see comment about AmigaOS4 .so support 8970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8971 _LT_TAGVAR(archive_expsym_cmds, $1)='' 8972 ;; 8973 m68k) 8974 _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)' 8975 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8976 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8977 ;; 8978 esac 8979 ;; 8980 8981 bsdi[[45]]*) 8982 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8983 ;; 8984 8985 cygwin* | mingw* | pw32* | cegcc*) 8986 # When not using gcc, we currently assume that we are using 8987 # Microsoft Visual C++ or Intel C++ Compiler. 8988 # hardcode_libdir_flag_spec is actually meaningless, as there is 8989 # no search path for DLLs. 8990 case $cc_basename in 8991 cl* | icl*) 8992 # Native MSVC or ICC 8993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8994 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8995 _LT_TAGVAR(always_export_symbols, $1)=yes 8996 _LT_TAGVAR(file_list_spec, $1)='@' 8997 # Tell ltmain to make .lib files, not .a files. 8998 libext=lib 8999 # Tell ltmain to make .dll files, not .so files. 9000 shrext_cmds=.dll 9001 # FIXME: Setting linknames here is a bad hack. 9002 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9003 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9004 cp "$export_symbols" "$output_objdir/$soname.def"; 9005 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9006 else 9007 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9008 fi~ 9009 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9010 linknames=' 9011 # The linker will not automatically build a static lib if we build a DLL. 9012 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9013 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9014 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9015 _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' 9016 # Don't use ranlib 9017 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9018 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9019 lt_tool_outputfile="@TOOL_OUTPUT@"~ 9020 case $lt_outputfile in 9021 *.exe|*.EXE) ;; 9022 *) 9023 lt_outputfile=$lt_outputfile.exe 9024 lt_tool_outputfile=$lt_tool_outputfile.exe 9025 ;; 9026 esac~ 9027 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9028 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9029 $RM "$lt_outputfile.manifest"; 9030 fi' 9031 ;; 9032 *) 9033 # Assume MSVC and ICC wrapper 9034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9035 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9036 # Tell ltmain to make .lib files, not .a files. 9037 libext=lib 9038 # Tell ltmain to make .dll files, not .so files. 9039 shrext_cmds=.dll 9040 # FIXME: Setting linknames here is a bad hack. 9041 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9042 # The linker will automatically build a .lib file if we build a DLL. 9043 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9044 # FIXME: Should let the user specify the lib program. 9045 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9046 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9047 ;; 9048 esac 9049 ;; 9050 9051 darwin* | rhapsody*) 9052 _LT_DARWIN_LINKER_FEATURES($1) 9053 ;; 9054 9055 dgux*) 9056 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9057 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9058 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9059 ;; 9060 9061 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9062 # support. Future versions do this automatically, but an explicit c++rt0.o 9063 # does not break anything, and helps significantly (at the cost of a little 9064 # extra space). 9065 freebsd2.2*) 9066 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9067 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9068 _LT_TAGVAR(hardcode_direct, $1)=yes 9069 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9070 ;; 9071 9072 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9073 freebsd2.*) 9074 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9075 _LT_TAGVAR(hardcode_direct, $1)=yes 9076 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9077 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9078 ;; 9079 9080 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9081 freebsd* | dragonfly* | midnightbsd*) 9082 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9083 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9084 _LT_TAGVAR(hardcode_direct, $1)=yes 9085 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9086 ;; 9087 9088 hpux9*) 9089 if test yes = "$GCC"; then 9090 _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' 9091 else 9092 _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' 9093 fi 9094 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9095 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9096 _LT_TAGVAR(hardcode_direct, $1)=yes 9097 9098 # hardcode_minus_L: Not really in the search PATH, 9099 # but as the default location of the library. 9100 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9101 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9102 ;; 9103 9104 hpux10*) 9105 if test yes,no = "$GCC,$with_gnu_ld"; then 9106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9107 else 9108 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9109 fi 9110 if test no = "$with_gnu_ld"; then 9111 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9112 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9113 _LT_TAGVAR(hardcode_direct, $1)=yes 9114 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9115 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9116 # hardcode_minus_L: Not really in the search PATH, 9117 # but as the default location of the library. 9118 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9119 fi 9120 ;; 9121 9122 hpux11*) 9123 if test yes,no = "$GCC,$with_gnu_ld"; then 9124 case $host_cpu in 9125 hppa*64*) 9126 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9127 ;; 9128 ia64*) 9129 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9130 ;; 9131 *) 9132 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9133 ;; 9134 esac 9135 else 9136 case $host_cpu in 9137 hppa*64*) 9138 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9139 ;; 9140 ia64*) 9141 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9142 ;; 9143 *) 9144 m4_if($1, [], [ 9145 # Older versions of the 11.00 compiler do not understand -b yet 9146 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9147 _LT_LINKER_OPTION([if $CC understands -b], 9148 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9149 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9150 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9151 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9152 ;; 9153 esac 9154 fi 9155 if test no = "$with_gnu_ld"; then 9156 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9157 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9158 9159 case $host_cpu in 9160 hppa*64*|ia64*) 9161 _LT_TAGVAR(hardcode_direct, $1)=no 9162 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9163 ;; 9164 *) 9165 _LT_TAGVAR(hardcode_direct, $1)=yes 9166 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9167 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9168 9169 # hardcode_minus_L: Not really in the search PATH, 9170 # but as the default location of the library. 9171 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9172 ;; 9173 esac 9174 fi 9175 ;; 9176 9177 irix5* | irix6* | nonstopux*) 9178 if test yes = "$GCC"; then 9179 _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' 9180 # Try to use the -exported_symbol ld option, if it does not 9181 # work, assume that -exports_file does not work either and 9182 # implicitly export all symbols. 9183 # This should be the same for all languages, so no per-tag cache variable. 9184 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9185 [lt_cv_irix_exported_symbol], 9186 [save_LDFLAGS=$LDFLAGS 9187 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9188 AC_LINK_IFELSE( 9189 [AC_LANG_SOURCE( 9190 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9191 [C++], [[int foo (void) { return 0; }]], 9192 [Fortran 77], [[ 9193 subroutine foo 9194 end]], 9195 [Fortran], [[ 9196 subroutine foo 9197 end]])])], 9198 [lt_cv_irix_exported_symbol=yes], 9199 [lt_cv_irix_exported_symbol=no]) 9200 LDFLAGS=$save_LDFLAGS]) 9201 if test yes = "$lt_cv_irix_exported_symbol"; then 9202 _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' 9203 fi 9204 else 9205 _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' 9206 _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' 9207 fi 9208 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9209 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9210 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9211 _LT_TAGVAR(inherit_rpath, $1)=yes 9212 _LT_TAGVAR(link_all_deplibs, $1)=yes 9213 ;; 9214 9215 linux*) 9216 case $cc_basename in 9217 tcc*) 9218 # Fabrice Bellard et al's Tiny C Compiler 9219 _LT_TAGVAR(ld_shlibs, $1)=yes 9220 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9221 ;; 9222 esac 9223 ;; 9224 9225 netbsd*) 9226 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9227 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9228 else 9229 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9230 fi 9231 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9232 _LT_TAGVAR(hardcode_direct, $1)=yes 9233 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9234 ;; 9235 9236 newsos6) 9237 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9238 _LT_TAGVAR(hardcode_direct, $1)=yes 9239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9240 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9241 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9242 ;; 9243 9244 *nto* | *qnx*) 9245 ;; 9246 9247 openbsd* | bitrig*) 9248 if test -f /usr/libexec/ld.so; then 9249 _LT_TAGVAR(hardcode_direct, $1)=yes 9250 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9251 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9252 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9253 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9254 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9256 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9257 else 9258 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9260 fi 9261 else 9262 _LT_TAGVAR(ld_shlibs, $1)=no 9263 fi 9264 ;; 9265 9266 os2*) 9267 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9268 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9269 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9270 shrext_cmds=.dll 9271 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9272 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9273 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9274 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9275 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9276 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9277 emximp -o $lib $output_objdir/$libname.def' 9278 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9279 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9280 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9281 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9282 prefix_cmds="$SED"~ 9283 if test EXPORTS = "`$SED 1q $export_symbols`"; then 9284 prefix_cmds="$prefix_cmds -e 1d"; 9285 fi~ 9286 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9287 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9288 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9289 emximp -o $lib $output_objdir/$libname.def' 9290 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9291 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9292 _LT_TAGVAR(file_list_spec, $1)='@' 9293 ;; 9294 9295 osf3*) 9296 if test yes = "$GCC"; then 9297 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9298 _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' 9299 else 9300 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9301 _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' 9302 fi 9303 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9305 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9306 ;; 9307 9308 osf4* | osf5*) # as osf3* with the addition of -msym flag 9309 if test yes = "$GCC"; then 9310 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9311 _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' 9312 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9313 else 9314 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9315 _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' 9316 _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~ 9317 $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' 9318 9319 # Both c and cxx compiler support -rpath directly 9320 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9321 fi 9322 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9323 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9324 ;; 9325 9326 solaris*) 9327 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9328 if test yes = "$GCC"; then 9329 wlarc='$wl' 9330 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9331 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9332 $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' 9333 else 9334 case `$CC -V 2>&1` in 9335 *"Compilers 5.0"*) 9336 wlarc='' 9337 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9338 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9339 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9340 ;; 9341 *) 9342 wlarc='$wl' 9343 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9344 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9345 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9346 ;; 9347 esac 9348 fi 9349 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9350 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9351 case $host_os in 9352 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9353 *) 9354 # The compiler driver will combine and reorder linker options, 9355 # but understands '-z linker_flag'. GCC discards it without '$wl', 9356 # but is careful enough not to reorder. 9357 # Supported since Solaris 2.6 (maybe 2.5.1?) 9358 if test yes = "$GCC"; then 9359 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9360 else 9361 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9362 fi 9363 ;; 9364 esac 9365 _LT_TAGVAR(link_all_deplibs, $1)=yes 9366 ;; 9367 9368 sunos4*) 9369 if test sequent = "$host_vendor"; then 9370 # Use $CC to link under sequent, because it throws in some extra .o 9371 # files that make .init and .fini sections work. 9372 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9373 else 9374 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9375 fi 9376 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9377 _LT_TAGVAR(hardcode_direct, $1)=yes 9378 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9379 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9380 ;; 9381 9382 sysv4) 9383 case $host_vendor in 9384 sni) 9385 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9386 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9387 ;; 9388 siemens) 9389 ## LD is ld it makes a PLAMLIB 9390 ## CC just makes a GrossModule. 9391 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9392 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9393 _LT_TAGVAR(hardcode_direct, $1)=no 9394 ;; 9395 motorola) 9396 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9397 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9398 ;; 9399 esac 9400 runpath_var='LD_RUN_PATH' 9401 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9402 ;; 9403 9404 sysv4.3*) 9405 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9406 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9407 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9408 ;; 9409 9410 sysv4*MP*) 9411 if test -d /usr/nec; then 9412 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9413 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9414 runpath_var=LD_RUN_PATH 9415 hardcode_runpath_var=yes 9416 _LT_TAGVAR(ld_shlibs, $1)=yes 9417 fi 9418 ;; 9419 9420 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9421 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9422 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9423 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9424 runpath_var='LD_RUN_PATH' 9425 9426 if test yes = "$GCC"; then 9427 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9428 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9429 else 9430 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9431 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9432 fi 9433 ;; 9434 9435 sysv5* | sco3.2v5* | sco5v6*) 9436 # Note: We CANNOT use -z defs as we might desire, because we do not 9437 # link with -lc, and that would cause any symbols used from libc to 9438 # always be unresolved, which means just about no library would 9439 # ever link correctly. If we're not using GNU ld we use -z text 9440 # though, which does catch some bad symbols but isn't as heavy-handed 9441 # as -z defs. 9442 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9443 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9444 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9445 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9447 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9448 _LT_TAGVAR(link_all_deplibs, $1)=yes 9449 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9450 runpath_var='LD_RUN_PATH' 9451 9452 if test yes = "$GCC"; then 9453 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9454 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9455 else 9456 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9457 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9458 fi 9459 ;; 9460 9461 uts4*) 9462 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9463 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9464 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9465 ;; 9466 9467 *) 9468 _LT_TAGVAR(ld_shlibs, $1)=no 9469 ;; 9470 esac 9471 9472 if test sni = "$host_vendor"; then 9473 case $host in 9474 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9475 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9476 ;; 9477 esac 9478 fi 9479 fi 9480]) 9481AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9482test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9483 9484_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9485 9486_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9487_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9488_LT_DECL([], [extract_expsyms_cmds], [2], 9489 [The commands to extract the exported symbol list from a shared archive]) 9490 9491# 9492# Do we need to explicitly link libc? 9493# 9494case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9495x|xyes) 9496 # Assume -lc should be added 9497 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9498 9499 if test yes,yes = "$GCC,$enable_shared"; then 9500 case $_LT_TAGVAR(archive_cmds, $1) in 9501 *'~'*) 9502 # FIXME: we may have to deal with multi-command sequences. 9503 ;; 9504 '$CC '*) 9505 # Test whether the compiler implicitly links with -lc since on some 9506 # systems, -lgcc has to come before -lc. If gcc already passes -lc 9507 # to ld, don't add -lc before -lgcc. 9508 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9509 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9510 [$RM conftest* 9511 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9512 9513 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9514 soname=conftest 9515 lib=conftest 9516 libobjs=conftest.$ac_objext 9517 deplibs= 9518 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9519 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9520 compiler_flags=-v 9521 linker_flags=-v 9522 verstring= 9523 output_objdir=. 9524 libname=conftest 9525 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9526 _LT_TAGVAR(allow_undefined_flag, $1)= 9527 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9528 then 9529 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9530 else 9531 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9532 fi 9533 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9534 else 9535 cat conftest.err 1>&5 9536 fi 9537 $RM conftest* 9538 ]) 9539 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9540 ;; 9541 esac 9542 fi 9543 ;; 9544esac 9545 9546_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9547 [Whether or not to add -lc for building shared libraries]) 9548_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9549 [enable_shared_with_static_runtimes], [0], 9550 [Whether or not to disallow shared libs when runtime libs are static]) 9551_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9552 [Compiler flag to allow reflexive dlopens]) 9553_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9554 [Compiler flag to generate shared objects directly from archives]) 9555_LT_TAGDECL([], [compiler_needs_object], [1], 9556 [Whether the compiler copes with passing no objects directly]) 9557_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9558 [Create an old-style archive from a shared archive]) 9559_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9560 [Create a temporary old-style archive to link instead of a shared archive]) 9561_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9562_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9563_LT_TAGDECL([], [module_cmds], [2], 9564 [Commands used to build a loadable module if different from building 9565 a shared archive.]) 9566_LT_TAGDECL([], [module_expsym_cmds], [2]) 9567_LT_TAGDECL([], [with_gnu_ld], [1], 9568 [Whether we are building with GNU ld or not]) 9569_LT_TAGDECL([], [allow_undefined_flag], [1], 9570 [Flag that allows shared libraries with undefined symbols to be built]) 9571_LT_TAGDECL([], [no_undefined_flag], [1], 9572 [Flag that enforces no undefined symbols]) 9573_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9574 [Flag to hardcode $libdir into a binary during linking. 9575 This must work even if $libdir does not exist]) 9576_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9577 [Whether we need a single "-rpath" flag with a separated argument]) 9578_LT_TAGDECL([], [hardcode_direct], [0], 9579 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9580 DIR into the resulting binary]) 9581_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9582 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9583 DIR into the resulting binary and the resulting library dependency is 9584 "absolute", i.e impossible to change by setting $shlibpath_var if the 9585 library is relocated]) 9586_LT_TAGDECL([], [hardcode_minus_L], [0], 9587 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9588 into the resulting binary]) 9589_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9590 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9591 into the resulting binary]) 9592_LT_TAGDECL([], [hardcode_automatic], [0], 9593 [Set to "yes" if building a shared library automatically hardcodes DIR 9594 into the library and all subsequent libraries and executables linked 9595 against it]) 9596_LT_TAGDECL([], [inherit_rpath], [0], 9597 [Set to yes if linker adds runtime paths of dependent libraries 9598 to runtime path list]) 9599_LT_TAGDECL([], [link_all_deplibs], [0], 9600 [Whether libtool must link a program against all its dependency libraries]) 9601_LT_TAGDECL([], [always_export_symbols], [0], 9602 [Set to "yes" if exported symbols are required]) 9603_LT_TAGDECL([], [export_symbols_cmds], [2], 9604 [The commands to list exported symbols]) 9605_LT_TAGDECL([], [exclude_expsyms], [1], 9606 [Symbols that should not be listed in the preloaded symbols]) 9607_LT_TAGDECL([], [include_expsyms], [1], 9608 [Symbols that must always be exported]) 9609_LT_TAGDECL([], [prelink_cmds], [2], 9610 [Commands necessary for linking programs (against libraries) with templates]) 9611_LT_TAGDECL([], [postlink_cmds], [2], 9612 [Commands necessary for finishing linking programs]) 9613_LT_TAGDECL([], [file_list_spec], [1], 9614 [Specify filename containing input files]) 9615dnl FIXME: Not yet implemented 9616dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9617dnl [Compiler flag to generate thread safe objects]) 9618])# _LT_LINKER_SHLIBS 9619 9620 9621# _LT_LANG_C_CONFIG([TAG]) 9622# ------------------------ 9623# Ensure that the configuration variables for a C compiler are suitably 9624# defined. These variables are subsequently used by _LT_CONFIG to write 9625# the compiler configuration to 'libtool'. 9626m4_defun([_LT_LANG_C_CONFIG], 9627[m4_require([_LT_DECL_EGREP])dnl 9628lt_save_CC=$CC 9629AC_LANG_PUSH(C) 9630 9631# Source file extension for C test sources. 9632ac_ext=c 9633 9634# Object file extension for compiled C test sources. 9635objext=o 9636_LT_TAGVAR(objext, $1)=$objext 9637 9638# Code to be used in simple compile tests 9639lt_simple_compile_test_code="int some_variable = 0;" 9640 9641# Code to be used in simple link tests 9642lt_simple_link_test_code='int main(){return(0);}' 9643 9644_LT_TAG_COMPILER 9645# Save the default compiler, since it gets overwritten when the other 9646# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9647compiler_DEFAULT=$CC 9648 9649# save warnings/boilerplate of simple test code 9650_LT_COMPILER_BOILERPLATE 9651_LT_LINKER_BOILERPLATE 9652 9653if test -n "$compiler"; then 9654 _LT_COMPILER_NO_RTTI($1) 9655 _LT_COMPILER_PIC($1) 9656 _LT_COMPILER_C_O($1) 9657 _LT_COMPILER_FILE_LOCKS($1) 9658 _LT_LINKER_SHLIBS($1) 9659 _LT_SYS_DYNAMIC_LINKER($1) 9660 _LT_LINKER_HARDCODE_LIBPATH($1) 9661 LT_SYS_DLOPEN_SELF 9662 _LT_CMD_STRIPLIB 9663 9664 # Report what library types will actually be built 9665 AC_MSG_CHECKING([if libtool supports shared libraries]) 9666 AC_MSG_RESULT([$can_build_shared]) 9667 9668 AC_MSG_CHECKING([whether to build shared libraries]) 9669 test no = "$can_build_shared" && enable_shared=no 9670 9671 # On AIX, shared libraries and static libraries use the same namespace, and 9672 # are all built from PIC. 9673 case $host_os in 9674 aix3*) 9675 test yes = "$enable_shared" && enable_static=no 9676 if test -n "$RANLIB"; then 9677 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9678 postinstall_cmds='$RANLIB $lib' 9679 fi 9680 ;; 9681 9682 aix[[4-9]]*) 9683 if test ia64 != "$host_cpu"; then 9684 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9685 yes,aix,yes) ;; # shared object as lib.so file only 9686 yes,svr4,*) ;; # shared object as lib.so archive member only 9687 yes,*) enable_static=no ;; # shared object in lib.a archive as well 9688 esac 9689 fi 9690 ;; 9691 esac 9692 AC_MSG_RESULT([$enable_shared]) 9693 9694 AC_MSG_CHECKING([whether to build static libraries]) 9695 # Make sure either enable_shared or enable_static is yes. 9696 test yes = "$enable_shared" || enable_static=yes 9697 AC_MSG_RESULT([$enable_static]) 9698 9699 _LT_CONFIG($1) 9700fi 9701AC_LANG_POP 9702CC=$lt_save_CC 9703])# _LT_LANG_C_CONFIG 9704 9705 9706# _LT_LANG_CXX_CONFIG([TAG]) 9707# -------------------------- 9708# Ensure that the configuration variables for a C++ compiler are suitably 9709# defined. These variables are subsequently used by _LT_CONFIG to write 9710# the compiler configuration to 'libtool'. 9711m4_defun([_LT_LANG_CXX_CONFIG], 9712[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9713m4_require([_LT_DECL_EGREP])dnl 9714m4_require([_LT_PATH_MANIFEST_TOOL])dnl 9715if test -n "$CXX" && ( test no != "$CXX" && 9716 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9717 (test g++ != "$CXX"))); then 9718 AC_PROG_CXXCPP 9719else 9720 _lt_caught_CXX_error=yes 9721fi 9722 9723AC_LANG_PUSH(C++) 9724_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9725_LT_TAGVAR(allow_undefined_flag, $1)= 9726_LT_TAGVAR(always_export_symbols, $1)=no 9727_LT_TAGVAR(archive_expsym_cmds, $1)= 9728_LT_TAGVAR(compiler_needs_object, $1)=no 9729_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9730_LT_TAGVAR(hardcode_direct, $1)=no 9731_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9732_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9733_LT_TAGVAR(hardcode_libdir_separator, $1)= 9734_LT_TAGVAR(hardcode_minus_L, $1)=no 9735_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9736_LT_TAGVAR(hardcode_automatic, $1)=no 9737_LT_TAGVAR(inherit_rpath, $1)=no 9738_LT_TAGVAR(module_cmds, $1)= 9739_LT_TAGVAR(module_expsym_cmds, $1)= 9740_LT_TAGVAR(link_all_deplibs, $1)=unknown 9741_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9742_LT_TAGVAR(reload_flag, $1)=$reload_flag 9743_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9744_LT_TAGVAR(no_undefined_flag, $1)= 9745_LT_TAGVAR(whole_archive_flag_spec, $1)= 9746_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9747 9748# Source file extension for C++ test sources. 9749ac_ext=cpp 9750 9751# Object file extension for compiled C++ test sources. 9752objext=o 9753_LT_TAGVAR(objext, $1)=$objext 9754 9755# No sense in running all these tests if we already determined that 9756# the CXX compiler isn't working. Some variables (like enable_shared) 9757# are currently assumed to apply to all compilers on this platform, 9758# and will be corrupted by setting them based on a non-working compiler. 9759if test yes != "$_lt_caught_CXX_error"; then 9760 # Code to be used in simple compile tests 9761 lt_simple_compile_test_code="int some_variable = 0;" 9762 9763 # Code to be used in simple link tests 9764 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9765 9766 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9767 _LT_TAG_COMPILER 9768 9769 # save warnings/boilerplate of simple test code 9770 _LT_COMPILER_BOILERPLATE 9771 _LT_LINKER_BOILERPLATE 9772 9773 # Allow CC to be a program name with arguments. 9774 lt_save_CC=$CC 9775 lt_save_CFLAGS=$CFLAGS 9776 lt_save_LD=$LD 9777 lt_save_GCC=$GCC 9778 GCC=$GXX 9779 lt_save_with_gnu_ld=$with_gnu_ld 9780 lt_save_path_LD=$lt_cv_path_LD 9781 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9782 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9783 else 9784 $as_unset lt_cv_prog_gnu_ld 9785 fi 9786 if test -n "${lt_cv_path_LDCXX+set}"; then 9787 lt_cv_path_LD=$lt_cv_path_LDCXX 9788 else 9789 $as_unset lt_cv_path_LD 9790 fi 9791 test -z "${LDCXX+set}" || LD=$LDCXX 9792 CC=${CXX-"c++"} 9793 CFLAGS=$CXXFLAGS 9794 compiler=$CC 9795 _LT_TAGVAR(compiler, $1)=$CC 9796 _LT_CC_BASENAME([$compiler]) 9797 9798 if test -n "$compiler"; then 9799 # We don't want -fno-exception when compiling C++ code, so set the 9800 # no_builtin_flag separately 9801 if test yes = "$GXX"; then 9802 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9803 else 9804 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9805 fi 9806 9807 if test yes = "$GXX"; then 9808 # Set up default GNU C++ configuration 9809 9810 LT_PATH_LD 9811 9812 # Check if GNU C++ uses GNU ld as the underlying linker, since the 9813 # archiving commands below assume that GNU ld is being used. 9814 if test yes = "$with_gnu_ld"; then 9815 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9816 _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' 9817 9818 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9819 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9820 9821 # If archive_cmds runs LD, not CC, wlarc should be empty 9822 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9823 # investigate it a little bit more. (MM) 9824 wlarc='$wl' 9825 9826 # ancient GNU ld didn't support --whole-archive et. al. 9827 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9828 $GREP 'no-whole-archive' > /dev/null; then 9829 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9830 else 9831 _LT_TAGVAR(whole_archive_flag_spec, $1)= 9832 fi 9833 else 9834 with_gnu_ld=no 9835 wlarc= 9836 9837 # A generic and very simple default shared library creation 9838 # command for GNU C++ for the case where it uses the native 9839 # linker, instead of GNU ld. If possible, this setting should 9840 # overridden to take advantage of the native linker features on 9841 # the platform it is being used on. 9842 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9843 fi 9844 9845 # Commands to make compiler produce verbose output that lists 9846 # what "hidden" libraries, object files and flags are used when 9847 # linking a shared library. 9848 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9849 9850 else 9851 GXX=no 9852 with_gnu_ld=no 9853 wlarc= 9854 fi 9855 9856 # PORTME: fill in a description of your system's C++ link characteristics 9857 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9858 _LT_TAGVAR(ld_shlibs, $1)=yes 9859 case $host_os in 9860 aix3*) 9861 # FIXME: insert proper C++ library support 9862 _LT_TAGVAR(ld_shlibs, $1)=no 9863 ;; 9864 aix[[4-9]]*) 9865 if test ia64 = "$host_cpu"; then 9866 # On IA64, the linker does run time linking by default, so we don't 9867 # have to do anything special. 9868 aix_use_runtimelinking=no 9869 exp_sym_flag='-Bexport' 9870 no_entry_flag= 9871 else 9872 aix_use_runtimelinking=no 9873 9874 # Test if we are trying to use run time linking or normal 9875 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9876 # have runtime linking enabled, and use it for executables. 9877 # For shared libraries, we enable/disable runtime linking 9878 # depending on the kind of the shared library created - 9879 # when "with_aix_soname,aix_use_runtimelinking" is: 9880 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9881 # "aix,yes" lib.so shared, rtl:yes, for executables 9882 # lib.a static archive 9883 # "both,no" lib.so.V(shr.o) shared, rtl:yes 9884 # lib.a(lib.so.V) shared, rtl:no, for executables 9885 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9886 # lib.a(lib.so.V) shared, rtl:no 9887 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9888 # lib.a static archive 9889 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9890 for ld_flag in $LDFLAGS; do 9891 case $ld_flag in 9892 *-brtl*) 9893 aix_use_runtimelinking=yes 9894 break 9895 ;; 9896 esac 9897 done 9898 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9899 # With aix-soname=svr4, we create the lib.so.V shared archives only, 9900 # so we don't have lib.a shared libs to link our executables. 9901 # We have to force runtime linking in this case. 9902 aix_use_runtimelinking=yes 9903 LDFLAGS="$LDFLAGS -Wl,-brtl" 9904 fi 9905 ;; 9906 esac 9907 9908 exp_sym_flag='-bexport' 9909 no_entry_flag='-bnoentry' 9910 fi 9911 9912 # When large executables or shared objects are built, AIX ld can 9913 # have problems creating the table of contents. If linking a library 9914 # or program results in "error TOC overflow" add -mminimal-toc to 9915 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9916 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9917 9918 _LT_TAGVAR(archive_cmds, $1)='' 9919 _LT_TAGVAR(hardcode_direct, $1)=yes 9920 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9921 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9922 _LT_TAGVAR(link_all_deplibs, $1)=yes 9923 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9924 case $with_aix_soname,$aix_use_runtimelinking in 9925 aix,*) ;; # no import file 9926 svr4,* | *,yes) # use import file 9927 # The Import File defines what to hardcode. 9928 _LT_TAGVAR(hardcode_direct, $1)=no 9929 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9930 ;; 9931 esac 9932 9933 if test yes = "$GXX"; then 9934 case $host_os in aix4.[[012]]|aix4.[[012]].*) 9935 # We only want to do this on AIX 4.2 and lower, the check 9936 # below for broken collect2 doesn't work under 4.3+ 9937 collect2name=`$CC -print-prog-name=collect2` 9938 if test -f "$collect2name" && 9939 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9940 then 9941 # We have reworked collect2 9942 : 9943 else 9944 # We have old collect2 9945 _LT_TAGVAR(hardcode_direct, $1)=unsupported 9946 # It fails to find uninstalled libraries when the uninstalled 9947 # path is not listed in the libpath. Setting hardcode_minus_L 9948 # to unsupported forces relinking 9949 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9950 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9951 _LT_TAGVAR(hardcode_libdir_separator, $1)= 9952 fi 9953 esac 9954 shared_flag='-shared' 9955 if test yes = "$aix_use_runtimelinking"; then 9956 shared_flag=$shared_flag' $wl-G' 9957 fi 9958 # Need to ensure runtime linking is disabled for the traditional 9959 # shared library, or the linker may eventually find shared libraries 9960 # /with/ Import File - we do not want to mix them. 9961 shared_flag_aix='-shared' 9962 shared_flag_svr4='-shared $wl-G' 9963 else 9964 # not using gcc 9965 if test ia64 = "$host_cpu"; then 9966 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9967 # chokes on -Wl,-G. The following line is correct: 9968 shared_flag='-G' 9969 else 9970 if test yes = "$aix_use_runtimelinking"; then 9971 shared_flag='$wl-G' 9972 else 9973 shared_flag='$wl-bM:SRE' 9974 fi 9975 shared_flag_aix='$wl-bM:SRE' 9976 shared_flag_svr4='$wl-G' 9977 fi 9978 fi 9979 9980 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9981 # It seems that -bexpall does not export symbols beginning with 9982 # underscore (_), so it is better to generate a list of symbols to 9983 # export. 9984 _LT_TAGVAR(always_export_symbols, $1)=yes 9985 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9986 # Warning - without using the other runtime loading flags (-brtl), 9987 # -berok will link without error, but may produce a broken library. 9988 # The "-G" linker flag allows undefined symbols. 9989 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9990 # Determine the default libpath from the value encoded in an empty 9991 # executable. 9992 _LT_SYS_MODULE_PATH_AIX([$1]) 9993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9994 9995 _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 9996 else 9997 if test ia64 = "$host_cpu"; then 9998 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9999 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10000 _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" 10001 else 10002 # Determine the default libpath from the value encoded in an 10003 # empty executable. 10004 _LT_SYS_MODULE_PATH_AIX([$1]) 10005 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10006 # Warning - without using the other run time loading flags, 10007 # -berok will link without error, but may produce a broken library. 10008 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10009 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10010 if test yes = "$with_gnu_ld"; then 10011 # We only use this code for GNU lds that support --whole-archive. 10012 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10013 else 10014 # Exported symbols can be pulled into shared objects from archives 10015 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10016 fi 10017 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10018 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10019 # -brtl affects multiple linker settings, -berok does not and is overridden later 10020 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10021 if test svr4 != "$with_aix_soname"; then 10022 # This is similar to how AIX traditionally builds its shared 10023 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10024 _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' 10025 fi 10026 if test aix != "$with_aix_soname"; then 10027 _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' 10028 else 10029 # used by -dlpreopen to get the symbols 10030 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10031 fi 10032 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10033 fi 10034 fi 10035 ;; 10036 10037 beos*) 10038 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10039 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10040 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10041 # support --undefined. This deserves some investigation. FIXME 10042 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10043 else 10044 _LT_TAGVAR(ld_shlibs, $1)=no 10045 fi 10046 ;; 10047 10048 chorus*) 10049 case $cc_basename in 10050 *) 10051 # FIXME: insert proper C++ library support 10052 _LT_TAGVAR(ld_shlibs, $1)=no 10053 ;; 10054 esac 10055 ;; 10056 10057 cygwin* | mingw* | pw32* | cegcc*) 10058 case $GXX,$cc_basename in 10059 ,cl* | no,cl* | ,icl* | no,icl*) 10060 # Native MSVC or ICC 10061 # hardcode_libdir_flag_spec is actually meaningless, as there is 10062 # no search path for DLLs. 10063 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10064 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10065 _LT_TAGVAR(always_export_symbols, $1)=yes 10066 _LT_TAGVAR(file_list_spec, $1)='@' 10067 # Tell ltmain to make .lib files, not .a files. 10068 libext=lib 10069 # Tell ltmain to make .dll files, not .so files. 10070 shrext_cmds=.dll 10071 # FIXME: Setting linknames here is a bad hack. 10072 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10073 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10074 cp "$export_symbols" "$output_objdir/$soname.def"; 10075 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10076 else 10077 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10078 fi~ 10079 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10080 linknames=' 10081 # The linker will not automatically build a static lib if we build a DLL. 10082 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10083 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10084 # Don't use ranlib 10085 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10086 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10087 lt_tool_outputfile="@TOOL_OUTPUT@"~ 10088 case $lt_outputfile in 10089 *.exe|*.EXE) ;; 10090 *) 10091 lt_outputfile=$lt_outputfile.exe 10092 lt_tool_outputfile=$lt_tool_outputfile.exe 10093 ;; 10094 esac~ 10095 func_to_tool_file "$lt_outputfile"~ 10096 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10097 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10098 $RM "$lt_outputfile.manifest"; 10099 fi' 10100 ;; 10101 *) 10102 # g++ 10103 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10104 # as there is no search path for DLLs. 10105 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10106 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10107 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10108 _LT_TAGVAR(always_export_symbols, $1)=no 10109 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10110 10111 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10112 _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' 10113 # If the export-symbols file already is a .def file, use it as 10114 # is; otherwise, prepend EXPORTS... 10115 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10116 cp $export_symbols $output_objdir/$soname.def; 10117 else 10118 echo EXPORTS > $output_objdir/$soname.def; 10119 cat $export_symbols >> $output_objdir/$soname.def; 10120 fi~ 10121 $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' 10122 else 10123 _LT_TAGVAR(ld_shlibs, $1)=no 10124 fi 10125 ;; 10126 esac 10127 ;; 10128 darwin* | rhapsody*) 10129 _LT_DARWIN_LINKER_FEATURES($1) 10130 ;; 10131 10132 os2*) 10133 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10134 _LT_TAGVAR(hardcode_minus_L, $1)=yes 10135 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10136 shrext_cmds=.dll 10137 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10138 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10139 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10140 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10141 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10142 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10143 emximp -o $lib $output_objdir/$libname.def' 10144 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10145 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10146 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10147 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10148 prefix_cmds="$SED"~ 10149 if test EXPORTS = "`$SED 1q $export_symbols`"; then 10150 prefix_cmds="$prefix_cmds -e 1d"; 10151 fi~ 10152 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10153 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10154 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10155 emximp -o $lib $output_objdir/$libname.def' 10156 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10157 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10158 _LT_TAGVAR(file_list_spec, $1)='@' 10159 ;; 10160 10161 dgux*) 10162 case $cc_basename in 10163 ec++*) 10164 # FIXME: insert proper C++ library support 10165 _LT_TAGVAR(ld_shlibs, $1)=no 10166 ;; 10167 ghcx*) 10168 # Green Hills C++ Compiler 10169 # FIXME: insert proper C++ library support 10170 _LT_TAGVAR(ld_shlibs, $1)=no 10171 ;; 10172 *) 10173 # FIXME: insert proper C++ library support 10174 _LT_TAGVAR(ld_shlibs, $1)=no 10175 ;; 10176 esac 10177 ;; 10178 10179 freebsd2.*) 10180 # C++ shared libraries reported to be fairly broken before 10181 # switch to ELF 10182 _LT_TAGVAR(ld_shlibs, $1)=no 10183 ;; 10184 10185 freebsd-elf*) 10186 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10187 ;; 10188 10189 freebsd* | dragonfly* | midnightbsd*) 10190 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10191 # conventions 10192 _LT_TAGVAR(ld_shlibs, $1)=yes 10193 ;; 10194 10195 haiku*) 10196 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10197 _LT_TAGVAR(link_all_deplibs, $1)=yes 10198 ;; 10199 10200 hpux9*) 10201 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10202 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10203 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10204 _LT_TAGVAR(hardcode_direct, $1)=yes 10205 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10206 # but as the default 10207 # location of the library. 10208 10209 case $cc_basename in 10210 CC*) 10211 # FIXME: insert proper C++ library support 10212 _LT_TAGVAR(ld_shlibs, $1)=no 10213 ;; 10214 aCC*) 10215 _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' 10216 # Commands to make compiler produce verbose output that lists 10217 # what "hidden" libraries, object files and flags are used when 10218 # linking a shared library. 10219 # 10220 # There doesn't appear to be a way to prevent this compiler from 10221 # explicitly linking system object files so we need to strip them 10222 # from the output so that they don't get included in the library 10223 # dependencies. 10224 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"' 10225 ;; 10226 *) 10227 if test yes = "$GXX"; then 10228 _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' 10229 else 10230 # FIXME: insert proper C++ library support 10231 _LT_TAGVAR(ld_shlibs, $1)=no 10232 fi 10233 ;; 10234 esac 10235 ;; 10236 10237 hpux10*|hpux11*) 10238 if test no = "$with_gnu_ld"; then 10239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10240 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10241 10242 case $host_cpu in 10243 hppa*64*|ia64*) 10244 ;; 10245 *) 10246 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10247 ;; 10248 esac 10249 fi 10250 case $host_cpu in 10251 hppa*64*|ia64*) 10252 _LT_TAGVAR(hardcode_direct, $1)=no 10253 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10254 ;; 10255 *) 10256 _LT_TAGVAR(hardcode_direct, $1)=yes 10257 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10258 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10259 # but as the default 10260 # location of the library. 10261 ;; 10262 esac 10263 10264 case $cc_basename in 10265 CC*) 10266 # FIXME: insert proper C++ library support 10267 _LT_TAGVAR(ld_shlibs, $1)=no 10268 ;; 10269 aCC*) 10270 case $host_cpu in 10271 hppa*64*) 10272 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10273 ;; 10274 ia64*) 10275 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10276 ;; 10277 *) 10278 _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' 10279 ;; 10280 esac 10281 # Commands to make compiler produce verbose output that lists 10282 # what "hidden" libraries, object files and flags are used when 10283 # linking a shared library. 10284 # 10285 # There doesn't appear to be a way to prevent this compiler from 10286 # explicitly linking system object files so we need to strip them 10287 # from the output so that they don't get included in the library 10288 # dependencies. 10289 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"' 10290 ;; 10291 *) 10292 if test yes = "$GXX"; then 10293 if test no = "$with_gnu_ld"; then 10294 case $host_cpu in 10295 hppa*64*) 10296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10297 ;; 10298 ia64*) 10299 _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' 10300 ;; 10301 *) 10302 _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' 10303 ;; 10304 esac 10305 fi 10306 else 10307 # FIXME: insert proper C++ library support 10308 _LT_TAGVAR(ld_shlibs, $1)=no 10309 fi 10310 ;; 10311 esac 10312 ;; 10313 10314 interix[[3-9]]*) 10315 _LT_TAGVAR(hardcode_direct, $1)=no 10316 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10318 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10319 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10320 # Instead, shared libraries are loaded at an image base (0x10000000 by 10321 # default) and relocated if they conflict, which is a slow very memory 10322 # consuming and fragmenting process. To avoid this, we pick a random, 10323 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10324 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10325 _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' 10326 _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' 10327 ;; 10328 irix5* | irix6*) 10329 case $cc_basename in 10330 CC*) 10331 # SGI C++ 10332 _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' 10333 10334 # Archives containing C++ object files must be created using 10335 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10336 # necessary to make sure instantiated templates are included 10337 # in the archive. 10338 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10339 ;; 10340 *) 10341 if test yes = "$GXX"; then 10342 if test no = "$with_gnu_ld"; then 10343 _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' 10344 else 10345 _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' 10346 fi 10347 fi 10348 _LT_TAGVAR(link_all_deplibs, $1)=yes 10349 ;; 10350 esac 10351 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10352 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10353 _LT_TAGVAR(inherit_rpath, $1)=yes 10354 ;; 10355 10356 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10357 case $cc_basename in 10358 KCC*) 10359 # Kuck and Associates, Inc. (KAI) C++ Compiler 10360 10361 # KCC will only create a shared library if the output file 10362 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10363 # to its proper name (with version) after linking. 10364 _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' 10365 _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' 10366 # Commands to make compiler produce verbose output that lists 10367 # what "hidden" libraries, object files and flags are used when 10368 # linking a shared library. 10369 # 10370 # There doesn't appear to be a way to prevent this compiler from 10371 # explicitly linking system object files so we need to strip them 10372 # from the output so that they don't get included in the library 10373 # dependencies. 10374 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"' 10375 10376 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10377 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10378 10379 # Archives containing C++ object files must be created using 10380 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10381 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10382 ;; 10383 icpc* | ecpc* ) 10384 # Intel C++ 10385 with_gnu_ld=yes 10386 # version 8.0 and above of icpc choke on multiply defined symbols 10387 # if we add $predep_objects and $postdep_objects, however 7.1 and 10388 # earlier do not add the objects themselves. 10389 case `$CC -V 2>&1` in 10390 *"Version 7."*) 10391 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10392 _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' 10393 ;; 10394 *) # Version 8.0 or newer 10395 tmp_idyn= 10396 case $host_cpu in 10397 ia64*) tmp_idyn=' -i_dynamic';; 10398 esac 10399 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10400 _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' 10401 ;; 10402 esac 10403 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10404 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10405 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10406 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10407 ;; 10408 pgCC* | pgcpp*) 10409 # Portland Group C++ compiler 10410 case `$CC -V` in 10411 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10412 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10413 rm -rf $tpldir~ 10414 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10415 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10416 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10417 rm -rf $tpldir~ 10418 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10419 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10420 $RANLIB $oldlib' 10421 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10422 rm -rf $tpldir~ 10423 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10424 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10425 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10426 rm -rf $tpldir~ 10427 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10428 $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' 10429 ;; 10430 *) # Version 6 and above use weak symbols 10431 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10432 _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' 10433 ;; 10434 esac 10435 10436 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10437 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10438 _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' 10439 ;; 10440 cxx*) 10441 # Compaq C++ 10442 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10443 _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' 10444 10445 runpath_var=LD_RUN_PATH 10446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10447 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10448 10449 # Commands to make compiler produce verbose output that lists 10450 # what "hidden" libraries, object files and flags are used when 10451 # linking a shared library. 10452 # 10453 # There doesn't appear to be a way to prevent this compiler from 10454 # explicitly linking system object files so we need to strip them 10455 # from the output so that they don't get included in the library 10456 # dependencies. 10457 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' 10458 ;; 10459 xl* | mpixl* | bgxl*) 10460 # IBM XL 8.0 on PPC, with GNU ld 10461 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10462 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10463 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10464 if test yes = "$supports_anon_versioning"; then 10465 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10466 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10467 echo "local: *; };" >> $output_objdir/$libname.ver~ 10468 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10469 fi 10470 ;; 10471 *) 10472 case `$CC -V 2>&1 | $SED 5q` in 10473 *Sun\ C*) 10474 # Sun C++ 5.9 10475 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10476 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10477 _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' 10478 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10479 _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' 10480 _LT_TAGVAR(compiler_needs_object, $1)=yes 10481 10482 # Not sure whether something based on 10483 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10484 # would be better. 10485 output_verbose_link_cmd='func_echo_all' 10486 10487 # Archives containing C++ object files must be created using 10488 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10489 # necessary to make sure instantiated templates are included 10490 # in the archive. 10491 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10492 ;; 10493 esac 10494 ;; 10495 esac 10496 ;; 10497 10498 lynxos*) 10499 # FIXME: insert proper C++ library support 10500 _LT_TAGVAR(ld_shlibs, $1)=no 10501 ;; 10502 10503 m88k*) 10504 # FIXME: insert proper C++ library support 10505 _LT_TAGVAR(ld_shlibs, $1)=no 10506 ;; 10507 10508 mvs*) 10509 case $cc_basename in 10510 cxx*) 10511 # FIXME: insert proper C++ library support 10512 _LT_TAGVAR(ld_shlibs, $1)=no 10513 ;; 10514 *) 10515 # FIXME: insert proper C++ library support 10516 _LT_TAGVAR(ld_shlibs, $1)=no 10517 ;; 10518 esac 10519 ;; 10520 10521 netbsd*) 10522 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10523 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10524 wlarc= 10525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10526 _LT_TAGVAR(hardcode_direct, $1)=yes 10527 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10528 fi 10529 # Workaround some broken pre-1.5 toolchains 10530 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10531 ;; 10532 10533 *nto* | *qnx*) 10534 _LT_TAGVAR(ld_shlibs, $1)=yes 10535 ;; 10536 10537 openbsd* | bitrig*) 10538 if test -f /usr/libexec/ld.so; then 10539 _LT_TAGVAR(hardcode_direct, $1)=yes 10540 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10541 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10542 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10544 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10545 _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' 10546 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10547 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10548 fi 10549 output_verbose_link_cmd=func_echo_all 10550 else 10551 _LT_TAGVAR(ld_shlibs, $1)=no 10552 fi 10553 ;; 10554 10555 osf3* | osf4* | osf5*) 10556 case $cc_basename in 10557 KCC*) 10558 # Kuck and Associates, Inc. (KAI) C++ Compiler 10559 10560 # KCC will only create a shared library if the output file 10561 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10562 # to its proper name (with version) after linking. 10563 _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' 10564 10565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10566 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10567 10568 # Archives containing C++ object files must be created using 10569 # the KAI C++ compiler. 10570 case $host in 10571 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10572 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10573 esac 10574 ;; 10575 RCC*) 10576 # Rational C++ 2.4.1 10577 # FIXME: insert proper C++ library support 10578 _LT_TAGVAR(ld_shlibs, $1)=no 10579 ;; 10580 cxx*) 10581 case $host in 10582 osf3*) 10583 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10584 _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' 10585 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10586 ;; 10587 *) 10588 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10589 _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' 10590 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10591 echo "-hidden">> $lib.exp~ 10592 $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~ 10593 $RM $lib.exp' 10594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10595 ;; 10596 esac 10597 10598 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10599 10600 # Commands to make compiler produce verbose output that lists 10601 # what "hidden" libraries, object files and flags are used when 10602 # linking a shared library. 10603 # 10604 # There doesn't appear to be a way to prevent this compiler from 10605 # explicitly linking system object files so we need to strip them 10606 # from the output so that they don't get included in the library 10607 # dependencies. 10608 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"' 10609 ;; 10610 *) 10611 if test yes,no = "$GXX,$with_gnu_ld"; then 10612 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10613 case $host in 10614 osf3*) 10615 _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' 10616 ;; 10617 *) 10618 _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' 10619 ;; 10620 esac 10621 10622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10623 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10624 10625 # Commands to make compiler produce verbose output that lists 10626 # what "hidden" libraries, object files and flags are used when 10627 # linking a shared library. 10628 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10629 10630 else 10631 # FIXME: insert proper C++ library support 10632 _LT_TAGVAR(ld_shlibs, $1)=no 10633 fi 10634 ;; 10635 esac 10636 ;; 10637 10638 psos*) 10639 # FIXME: insert proper C++ library support 10640 _LT_TAGVAR(ld_shlibs, $1)=no 10641 ;; 10642 10643 sunos4*) 10644 case $cc_basename in 10645 CC*) 10646 # Sun C++ 4.x 10647 # FIXME: insert proper C++ library support 10648 _LT_TAGVAR(ld_shlibs, $1)=no 10649 ;; 10650 lcc*) 10651 # Lucid 10652 # FIXME: insert proper C++ library support 10653 _LT_TAGVAR(ld_shlibs, $1)=no 10654 ;; 10655 *) 10656 # FIXME: insert proper C++ library support 10657 _LT_TAGVAR(ld_shlibs, $1)=no 10658 ;; 10659 esac 10660 ;; 10661 10662 solaris*) 10663 case $cc_basename in 10664 CC* | sunCC*) 10665 # Sun C++ 4.2, 5.x and Centerline C++ 10666 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10667 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10668 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10669 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10670 $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' 10671 10672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10673 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10674 case $host_os in 10675 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10676 *) 10677 # The compiler driver will combine and reorder linker options, 10678 # but understands '-z linker_flag'. 10679 # Supported since Solaris 2.6 (maybe 2.5.1?) 10680 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10681 ;; 10682 esac 10683 _LT_TAGVAR(link_all_deplibs, $1)=yes 10684 10685 output_verbose_link_cmd='func_echo_all' 10686 10687 # Archives containing C++ object files must be created using 10688 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10689 # necessary to make sure instantiated templates are included 10690 # in the archive. 10691 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10692 ;; 10693 gcx*) 10694 # Green Hills C++ Compiler 10695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10696 10697 # The C++ compiler must be used to create the archive. 10698 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10699 ;; 10700 *) 10701 # GNU C++ compiler with Solaris linker 10702 if test yes,no = "$GXX,$with_gnu_ld"; then 10703 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10704 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10706 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10707 $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' 10708 10709 # Commands to make compiler produce verbose output that lists 10710 # what "hidden" libraries, object files and flags are used when 10711 # linking a shared library. 10712 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10713 else 10714 # g++ 2.7 appears to require '-G' NOT '-shared' on this 10715 # platform. 10716 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10717 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10718 $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' 10719 10720 # Commands to make compiler produce verbose output that lists 10721 # what "hidden" libraries, object files and flags are used when 10722 # linking a shared library. 10723 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10724 fi 10725 10726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10727 case $host_os in 10728 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10729 *) 10730 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10731 ;; 10732 esac 10733 fi 10734 ;; 10735 esac 10736 ;; 10737 10738 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10739 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10740 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10741 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10742 runpath_var='LD_RUN_PATH' 10743 10744 case $cc_basename in 10745 CC*) 10746 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10747 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10748 ;; 10749 *) 10750 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10751 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10752 ;; 10753 esac 10754 ;; 10755 10756 sysv5* | sco3.2v5* | sco5v6*) 10757 # Note: We CANNOT use -z defs as we might desire, because we do not 10758 # link with -lc, and that would cause any symbols used from libc to 10759 # always be unresolved, which means just about no library would 10760 # ever link correctly. If we're not using GNU ld we use -z text 10761 # though, which does catch some bad symbols but isn't as heavy-handed 10762 # as -z defs. 10763 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10764 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10765 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10766 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10768 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10769 _LT_TAGVAR(link_all_deplibs, $1)=yes 10770 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10771 runpath_var='LD_RUN_PATH' 10772 10773 case $cc_basename in 10774 CC*) 10775 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10776 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10777 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10778 '"$_LT_TAGVAR(old_archive_cmds, $1)" 10779 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10780 '"$_LT_TAGVAR(reload_cmds, $1)" 10781 ;; 10782 *) 10783 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10784 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10785 ;; 10786 esac 10787 ;; 10788 10789 tandem*) 10790 case $cc_basename in 10791 NCC*) 10792 # NonStop-UX NCC 3.20 10793 # FIXME: insert proper C++ library support 10794 _LT_TAGVAR(ld_shlibs, $1)=no 10795 ;; 10796 *) 10797 # FIXME: insert proper C++ library support 10798 _LT_TAGVAR(ld_shlibs, $1)=no 10799 ;; 10800 esac 10801 ;; 10802 10803 vxworks*) 10804 # FIXME: insert proper C++ library support 10805 _LT_TAGVAR(ld_shlibs, $1)=no 10806 ;; 10807 10808 *) 10809 # FIXME: insert proper C++ library support 10810 _LT_TAGVAR(ld_shlibs, $1)=no 10811 ;; 10812 esac 10813 10814 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10815 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10816 10817 _LT_TAGVAR(GCC, $1)=$GXX 10818 _LT_TAGVAR(LD, $1)=$LD 10819 10820 ## CAVEAT EMPTOR: 10821 ## There is no encapsulation within the following macros, do not change 10822 ## the running order or otherwise move them around unless you know exactly 10823 ## what you are doing... 10824 _LT_SYS_HIDDEN_LIBDEPS($1) 10825 _LT_COMPILER_PIC($1) 10826 _LT_COMPILER_C_O($1) 10827 _LT_COMPILER_FILE_LOCKS($1) 10828 _LT_LINKER_SHLIBS($1) 10829 _LT_SYS_DYNAMIC_LINKER($1) 10830 _LT_LINKER_HARDCODE_LIBPATH($1) 10831 10832 _LT_CONFIG($1) 10833 fi # test -n "$compiler" 10834 10835 CC=$lt_save_CC 10836 CFLAGS=$lt_save_CFLAGS 10837 LDCXX=$LD 10838 LD=$lt_save_LD 10839 GCC=$lt_save_GCC 10840 with_gnu_ld=$lt_save_with_gnu_ld 10841 lt_cv_path_LDCXX=$lt_cv_path_LD 10842 lt_cv_path_LD=$lt_save_path_LD 10843 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10844 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10845fi # test yes != "$_lt_caught_CXX_error" 10846 10847AC_LANG_POP 10848])# _LT_LANG_CXX_CONFIG 10849 10850 10851# _LT_FUNC_STRIPNAME_CNF 10852# ---------------------- 10853# func_stripname_cnf prefix suffix name 10854# strip PREFIX and SUFFIX off of NAME. 10855# PREFIX and SUFFIX must not contain globbing or regex special 10856# characters, hashes, percent signs, but SUFFIX may contain a leading 10857# dot (in which case that matches only a dot). 10858# 10859# This function is identical to the (non-XSI) version of func_stripname, 10860# except this one can be used by m4 code that may be executed by configure, 10861# rather than the libtool script. 10862m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10863AC_REQUIRE([_LT_DECL_SED]) 10864AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10865func_stripname_cnf () 10866{ 10867 case @S|@2 in 10868 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10869 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10870 esac 10871} # func_stripname_cnf 10872])# _LT_FUNC_STRIPNAME_CNF 10873 10874 10875# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10876# --------------------------------- 10877# Figure out "hidden" library dependencies from verbose 10878# compiler output when linking a shared library. 10879# Parse the compiler output and extract the necessary 10880# objects, libraries and library flags. 10881m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10882[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10883AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10884# Dependencies to place before and after the object being linked: 10885_LT_TAGVAR(predep_objects, $1)= 10886_LT_TAGVAR(postdep_objects, $1)= 10887_LT_TAGVAR(predeps, $1)= 10888_LT_TAGVAR(postdeps, $1)= 10889_LT_TAGVAR(compiler_lib_search_path, $1)= 10890 10891dnl we can't use the lt_simple_compile_test_code here, 10892dnl because it contains code intended for an executable, 10893dnl not a library. It's possible we should let each 10894dnl tag define a new lt_????_link_test_code variable, 10895dnl but it's only used here... 10896m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10897int a; 10898void foo (void) { a = 0; } 10899_LT_EOF 10900], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10901class Foo 10902{ 10903public: 10904 Foo (void) { a = 0; } 10905private: 10906 int a; 10907}; 10908_LT_EOF 10909], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10910 subroutine foo 10911 implicit none 10912 integer*4 a 10913 a=0 10914 return 10915 end 10916_LT_EOF 10917], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10918 subroutine foo 10919 implicit none 10920 integer a 10921 a=0 10922 return 10923 end 10924_LT_EOF 10925], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10926public class foo { 10927 private int a; 10928 public void bar (void) { 10929 a = 0; 10930 } 10931}; 10932_LT_EOF 10933], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10934package foo 10935func foo() { 10936} 10937_LT_EOF 10938]) 10939 10940_lt_libdeps_save_CFLAGS=$CFLAGS 10941case "$CC $CFLAGS " in #( 10942*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10943*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10944*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10945esac 10946 10947dnl Parse the compiler output and extract the necessary 10948dnl objects, libraries and library flags. 10949if AC_TRY_EVAL(ac_compile); then 10950 # Parse the compiler output and extract the necessary 10951 # objects, libraries and library flags. 10952 10953 # Sentinel used to keep track of whether or not we are before 10954 # the conftest object file. 10955 pre_test_object_deps_done=no 10956 10957 for p in `eval "$output_verbose_link_cmd"`; do 10958 case $prev$p in 10959 10960 -L* | -R* | -l*) 10961 # Some compilers place space between "-{L,R}" and the path. 10962 # Remove the space. 10963 if test x-L = "$p" || 10964 test x-R = "$p"; then 10965 prev=$p 10966 continue 10967 fi 10968 10969 # Expand the sysroot to ease extracting the directories later. 10970 if test -z "$prev"; then 10971 case $p in 10972 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10973 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10974 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10975 esac 10976 fi 10977 case $p in 10978 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10979 esac 10980 if test no = "$pre_test_object_deps_done"; then 10981 case $prev in 10982 -L | -R) 10983 # Internal compiler library paths should come after those 10984 # provided the user. The postdeps already come after the 10985 # user supplied libs so there is no need to process them. 10986 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10987 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10988 else 10989 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10990 fi 10991 ;; 10992 # The "-l" case would never come before the object being 10993 # linked, so don't bother handling this case. 10994 esac 10995 else 10996 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10997 _LT_TAGVAR(postdeps, $1)=$prev$p 10998 else 10999 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11000 fi 11001 fi 11002 prev= 11003 ;; 11004 11005 *.lto.$objext) ;; # Ignore GCC LTO objects 11006 *.$objext) 11007 # This assumes that the test object file only shows up 11008 # once in the compiler output. 11009 if test "$p" = "conftest.$objext"; then 11010 pre_test_object_deps_done=yes 11011 continue 11012 fi 11013 11014 if test no = "$pre_test_object_deps_done"; then 11015 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11016 _LT_TAGVAR(predep_objects, $1)=$p 11017 else 11018 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11019 fi 11020 else 11021 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11022 _LT_TAGVAR(postdep_objects, $1)=$p 11023 else 11024 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11025 fi 11026 fi 11027 ;; 11028 11029 *) ;; # Ignore the rest. 11030 11031 esac 11032 done 11033 11034 # Clean up. 11035 rm -f a.out a.exe 11036else 11037 echo "libtool.m4: error: problem compiling $1 test program" 11038fi 11039 11040$RM -f confest.$objext 11041CFLAGS=$_lt_libdeps_save_CFLAGS 11042 11043# PORTME: override above test on systems where it is broken 11044m4_if([$1], [CXX], 11045[case $host_os in 11046interix[[3-9]]*) 11047 # Interix 3.5 installs completely hosed .la files for C++, so rather than 11048 # hack all around it, let's just trust "g++" to DTRT. 11049 _LT_TAGVAR(predep_objects,$1)= 11050 _LT_TAGVAR(postdep_objects,$1)= 11051 _LT_TAGVAR(postdeps,$1)= 11052 ;; 11053esac 11054]) 11055 11056case " $_LT_TAGVAR(postdeps, $1) " in 11057*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11058esac 11059 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11060if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11061 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11062fi 11063_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11064 [The directories searched by this compiler when creating a shared library]) 11065_LT_TAGDECL([], [predep_objects], [1], 11066 [Dependencies to place before and after the objects being linked to 11067 create a shared library]) 11068_LT_TAGDECL([], [postdep_objects], [1]) 11069_LT_TAGDECL([], [predeps], [1]) 11070_LT_TAGDECL([], [postdeps], [1]) 11071_LT_TAGDECL([], [compiler_lib_search_path], [1], 11072 [The library search path used internally by the compiler when linking 11073 a shared library]) 11074])# _LT_SYS_HIDDEN_LIBDEPS 11075 11076 11077# _LT_LANG_F77_CONFIG([TAG]) 11078# -------------------------- 11079# Ensure that the configuration variables for a Fortran 77 compiler are 11080# suitably defined. These variables are subsequently used by _LT_CONFIG 11081# to write the compiler configuration to 'libtool'. 11082m4_defun([_LT_LANG_F77_CONFIG], 11083[AC_LANG_PUSH(Fortran 77) 11084if test -z "$F77" || test no = "$F77"; then 11085 _lt_disable_F77=yes 11086fi 11087 11088_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11089_LT_TAGVAR(allow_undefined_flag, $1)= 11090_LT_TAGVAR(always_export_symbols, $1)=no 11091_LT_TAGVAR(archive_expsym_cmds, $1)= 11092_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11093_LT_TAGVAR(hardcode_direct, $1)=no 11094_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11095_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11096_LT_TAGVAR(hardcode_libdir_separator, $1)= 11097_LT_TAGVAR(hardcode_minus_L, $1)=no 11098_LT_TAGVAR(hardcode_automatic, $1)=no 11099_LT_TAGVAR(inherit_rpath, $1)=no 11100_LT_TAGVAR(module_cmds, $1)= 11101_LT_TAGVAR(module_expsym_cmds, $1)= 11102_LT_TAGVAR(link_all_deplibs, $1)=unknown 11103_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11104_LT_TAGVAR(reload_flag, $1)=$reload_flag 11105_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11106_LT_TAGVAR(no_undefined_flag, $1)= 11107_LT_TAGVAR(whole_archive_flag_spec, $1)= 11108_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11109 11110# Source file extension for f77 test sources. 11111ac_ext=f 11112 11113# Object file extension for compiled f77 test sources. 11114objext=o 11115_LT_TAGVAR(objext, $1)=$objext 11116 11117# No sense in running all these tests if we already determined that 11118# the F77 compiler isn't working. Some variables (like enable_shared) 11119# are currently assumed to apply to all compilers on this platform, 11120# and will be corrupted by setting them based on a non-working compiler. 11121if test yes != "$_lt_disable_F77"; then 11122 # Code to be used in simple compile tests 11123 lt_simple_compile_test_code="\ 11124 subroutine t 11125 return 11126 end 11127" 11128 11129 # Code to be used in simple link tests 11130 lt_simple_link_test_code="\ 11131 program t 11132 end 11133" 11134 11135 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11136 _LT_TAG_COMPILER 11137 11138 # save warnings/boilerplate of simple test code 11139 _LT_COMPILER_BOILERPLATE 11140 _LT_LINKER_BOILERPLATE 11141 11142 # Allow CC to be a program name with arguments. 11143 lt_save_CC=$CC 11144 lt_save_GCC=$GCC 11145 lt_save_CFLAGS=$CFLAGS 11146 CC=${F77-"f77"} 11147 CFLAGS=$FFLAGS 11148 compiler=$CC 11149 _LT_TAGVAR(compiler, $1)=$CC 11150 _LT_CC_BASENAME([$compiler]) 11151 GCC=$G77 11152 if test -n "$compiler"; then 11153 AC_MSG_CHECKING([if libtool supports shared libraries]) 11154 AC_MSG_RESULT([$can_build_shared]) 11155 11156 AC_MSG_CHECKING([whether to build shared libraries]) 11157 test no = "$can_build_shared" && enable_shared=no 11158 11159 # On AIX, shared libraries and static libraries use the same namespace, and 11160 # are all built from PIC. 11161 case $host_os in 11162 aix3*) 11163 test yes = "$enable_shared" && enable_static=no 11164 if test -n "$RANLIB"; then 11165 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11166 postinstall_cmds='$RANLIB $lib' 11167 fi 11168 ;; 11169 aix[[4-9]]*) 11170 if test ia64 != "$host_cpu"; then 11171 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11172 yes,aix,yes) ;; # shared object as lib.so file only 11173 yes,svr4,*) ;; # shared object as lib.so archive member only 11174 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11175 esac 11176 fi 11177 ;; 11178 esac 11179 AC_MSG_RESULT([$enable_shared]) 11180 11181 AC_MSG_CHECKING([whether to build static libraries]) 11182 # Make sure either enable_shared or enable_static is yes. 11183 test yes = "$enable_shared" || enable_static=yes 11184 AC_MSG_RESULT([$enable_static]) 11185 11186 _LT_TAGVAR(GCC, $1)=$G77 11187 _LT_TAGVAR(LD, $1)=$LD 11188 11189 ## CAVEAT EMPTOR: 11190 ## There is no encapsulation within the following macros, do not change 11191 ## the running order or otherwise move them around unless you know exactly 11192 ## what you are doing... 11193 _LT_COMPILER_PIC($1) 11194 _LT_COMPILER_C_O($1) 11195 _LT_COMPILER_FILE_LOCKS($1) 11196 _LT_LINKER_SHLIBS($1) 11197 _LT_SYS_DYNAMIC_LINKER($1) 11198 _LT_LINKER_HARDCODE_LIBPATH($1) 11199 11200 _LT_CONFIG($1) 11201 fi # test -n "$compiler" 11202 11203 GCC=$lt_save_GCC 11204 CC=$lt_save_CC 11205 CFLAGS=$lt_save_CFLAGS 11206fi # test yes != "$_lt_disable_F77" 11207 11208AC_LANG_POP 11209])# _LT_LANG_F77_CONFIG 11210 11211 11212# _LT_LANG_FC_CONFIG([TAG]) 11213# ------------------------- 11214# Ensure that the configuration variables for a Fortran compiler are 11215# suitably defined. These variables are subsequently used by _LT_CONFIG 11216# to write the compiler configuration to 'libtool'. 11217m4_defun([_LT_LANG_FC_CONFIG], 11218[AC_LANG_PUSH(Fortran) 11219 11220if test -z "$FC" || test no = "$FC"; then 11221 _lt_disable_FC=yes 11222fi 11223 11224_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11225_LT_TAGVAR(allow_undefined_flag, $1)= 11226_LT_TAGVAR(always_export_symbols, $1)=no 11227_LT_TAGVAR(archive_expsym_cmds, $1)= 11228_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11229_LT_TAGVAR(hardcode_direct, $1)=no 11230_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11231_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11232_LT_TAGVAR(hardcode_libdir_separator, $1)= 11233_LT_TAGVAR(hardcode_minus_L, $1)=no 11234_LT_TAGVAR(hardcode_automatic, $1)=no 11235_LT_TAGVAR(inherit_rpath, $1)=no 11236_LT_TAGVAR(module_cmds, $1)= 11237_LT_TAGVAR(module_expsym_cmds, $1)= 11238_LT_TAGVAR(link_all_deplibs, $1)=unknown 11239_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11240_LT_TAGVAR(reload_flag, $1)=$reload_flag 11241_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11242_LT_TAGVAR(no_undefined_flag, $1)= 11243_LT_TAGVAR(whole_archive_flag_spec, $1)= 11244_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11245 11246# Source file extension for fc test sources. 11247ac_ext=${ac_fc_srcext-f} 11248 11249# Object file extension for compiled fc test sources. 11250objext=o 11251_LT_TAGVAR(objext, $1)=$objext 11252 11253# No sense in running all these tests if we already determined that 11254# the FC compiler isn't working. Some variables (like enable_shared) 11255# are currently assumed to apply to all compilers on this platform, 11256# and will be corrupted by setting them based on a non-working compiler. 11257if test yes != "$_lt_disable_FC"; then 11258 # Code to be used in simple compile tests 11259 lt_simple_compile_test_code="\ 11260 subroutine t 11261 return 11262 end 11263" 11264 11265 # Code to be used in simple link tests 11266 lt_simple_link_test_code="\ 11267 program t 11268 end 11269" 11270 11271 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11272 _LT_TAG_COMPILER 11273 11274 # save warnings/boilerplate of simple test code 11275 _LT_COMPILER_BOILERPLATE 11276 _LT_LINKER_BOILERPLATE 11277 11278 # Allow CC to be a program name with arguments. 11279 lt_save_CC=$CC 11280 lt_save_GCC=$GCC 11281 lt_save_CFLAGS=$CFLAGS 11282 CC=${FC-"f95"} 11283 CFLAGS=$FCFLAGS 11284 compiler=$CC 11285 GCC=$ac_cv_fc_compiler_gnu 11286 11287 _LT_TAGVAR(compiler, $1)=$CC 11288 _LT_CC_BASENAME([$compiler]) 11289 11290 if test -n "$compiler"; then 11291 AC_MSG_CHECKING([if libtool supports shared libraries]) 11292 AC_MSG_RESULT([$can_build_shared]) 11293 11294 AC_MSG_CHECKING([whether to build shared libraries]) 11295 test no = "$can_build_shared" && enable_shared=no 11296 11297 # On AIX, shared libraries and static libraries use the same namespace, and 11298 # are all built from PIC. 11299 case $host_os in 11300 aix3*) 11301 test yes = "$enable_shared" && enable_static=no 11302 if test -n "$RANLIB"; then 11303 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11304 postinstall_cmds='$RANLIB $lib' 11305 fi 11306 ;; 11307 aix[[4-9]]*) 11308 if test ia64 != "$host_cpu"; then 11309 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11310 yes,aix,yes) ;; # shared object as lib.so file only 11311 yes,svr4,*) ;; # shared object as lib.so archive member only 11312 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11313 esac 11314 fi 11315 ;; 11316 esac 11317 AC_MSG_RESULT([$enable_shared]) 11318 11319 AC_MSG_CHECKING([whether to build static libraries]) 11320 # Make sure either enable_shared or enable_static is yes. 11321 test yes = "$enable_shared" || enable_static=yes 11322 AC_MSG_RESULT([$enable_static]) 11323 11324 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11325 _LT_TAGVAR(LD, $1)=$LD 11326 11327 ## CAVEAT EMPTOR: 11328 ## There is no encapsulation within the following macros, do not change 11329 ## the running order or otherwise move them around unless you know exactly 11330 ## what you are doing... 11331 _LT_SYS_HIDDEN_LIBDEPS($1) 11332 _LT_COMPILER_PIC($1) 11333 _LT_COMPILER_C_O($1) 11334 _LT_COMPILER_FILE_LOCKS($1) 11335 _LT_LINKER_SHLIBS($1) 11336 _LT_SYS_DYNAMIC_LINKER($1) 11337 _LT_LINKER_HARDCODE_LIBPATH($1) 11338 11339 _LT_CONFIG($1) 11340 fi # test -n "$compiler" 11341 11342 GCC=$lt_save_GCC 11343 CC=$lt_save_CC 11344 CFLAGS=$lt_save_CFLAGS 11345fi # test yes != "$_lt_disable_FC" 11346 11347AC_LANG_POP 11348])# _LT_LANG_FC_CONFIG 11349 11350 11351# _LT_LANG_GCJ_CONFIG([TAG]) 11352# -------------------------- 11353# Ensure that the configuration variables for the GNU Java Compiler compiler 11354# are suitably defined. These variables are subsequently used by _LT_CONFIG 11355# to write the compiler configuration to 'libtool'. 11356m4_defun([_LT_LANG_GCJ_CONFIG], 11357[AC_REQUIRE([LT_PROG_GCJ])dnl 11358AC_LANG_SAVE 11359 11360# Source file extension for Java test sources. 11361ac_ext=java 11362 11363# Object file extension for compiled Java test sources. 11364objext=o 11365_LT_TAGVAR(objext, $1)=$objext 11366 11367# Code to be used in simple compile tests 11368lt_simple_compile_test_code="class foo {}" 11369 11370# Code to be used in simple link tests 11371lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11372 11373# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11374_LT_TAG_COMPILER 11375 11376# save warnings/boilerplate of simple test code 11377_LT_COMPILER_BOILERPLATE 11378_LT_LINKER_BOILERPLATE 11379 11380# Allow CC to be a program name with arguments. 11381lt_save_CC=$CC 11382lt_save_CFLAGS=$CFLAGS 11383lt_save_GCC=$GCC 11384GCC=yes 11385CC=${GCJ-"gcj"} 11386CFLAGS=$GCJFLAGS 11387compiler=$CC 11388_LT_TAGVAR(compiler, $1)=$CC 11389_LT_TAGVAR(LD, $1)=$LD 11390_LT_CC_BASENAME([$compiler]) 11391 11392# GCJ did not exist at the time GCC didn't implicitly link libc in. 11393_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11394 11395_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11396_LT_TAGVAR(reload_flag, $1)=$reload_flag 11397_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11398 11399if test -n "$compiler"; then 11400 _LT_COMPILER_NO_RTTI($1) 11401 _LT_COMPILER_PIC($1) 11402 _LT_COMPILER_C_O($1) 11403 _LT_COMPILER_FILE_LOCKS($1) 11404 _LT_LINKER_SHLIBS($1) 11405 _LT_LINKER_HARDCODE_LIBPATH($1) 11406 11407 _LT_CONFIG($1) 11408fi 11409 11410AC_LANG_RESTORE 11411 11412GCC=$lt_save_GCC 11413CC=$lt_save_CC 11414CFLAGS=$lt_save_CFLAGS 11415])# _LT_LANG_GCJ_CONFIG 11416 11417 11418# _LT_LANG_GO_CONFIG([TAG]) 11419# -------------------------- 11420# Ensure that the configuration variables for the GNU Go compiler 11421# are suitably defined. These variables are subsequently used by _LT_CONFIG 11422# to write the compiler configuration to 'libtool'. 11423m4_defun([_LT_LANG_GO_CONFIG], 11424[AC_REQUIRE([LT_PROG_GO])dnl 11425AC_LANG_SAVE 11426 11427# Source file extension for Go test sources. 11428ac_ext=go 11429 11430# Object file extension for compiled Go test sources. 11431objext=o 11432_LT_TAGVAR(objext, $1)=$objext 11433 11434# Code to be used in simple compile tests 11435lt_simple_compile_test_code="package main; func main() { }" 11436 11437# Code to be used in simple link tests 11438lt_simple_link_test_code='package main; func main() { }' 11439 11440# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11441_LT_TAG_COMPILER 11442 11443# save warnings/boilerplate of simple test code 11444_LT_COMPILER_BOILERPLATE 11445_LT_LINKER_BOILERPLATE 11446 11447# Allow CC to be a program name with arguments. 11448lt_save_CC=$CC 11449lt_save_CFLAGS=$CFLAGS 11450lt_save_GCC=$GCC 11451GCC=yes 11452CC=${GOC-"gccgo"} 11453CFLAGS=$GOFLAGS 11454compiler=$CC 11455_LT_TAGVAR(compiler, $1)=$CC 11456_LT_TAGVAR(LD, $1)=$LD 11457_LT_CC_BASENAME([$compiler]) 11458 11459# Go did not exist at the time GCC didn't implicitly link libc in. 11460_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11461 11462_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11463_LT_TAGVAR(reload_flag, $1)=$reload_flag 11464_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11465 11466if test -n "$compiler"; then 11467 _LT_COMPILER_NO_RTTI($1) 11468 _LT_COMPILER_PIC($1) 11469 _LT_COMPILER_C_O($1) 11470 _LT_COMPILER_FILE_LOCKS($1) 11471 _LT_LINKER_SHLIBS($1) 11472 _LT_LINKER_HARDCODE_LIBPATH($1) 11473 11474 _LT_CONFIG($1) 11475fi 11476 11477AC_LANG_RESTORE 11478 11479GCC=$lt_save_GCC 11480CC=$lt_save_CC 11481CFLAGS=$lt_save_CFLAGS 11482])# _LT_LANG_GO_CONFIG 11483 11484 11485# _LT_LANG_RC_CONFIG([TAG]) 11486# ------------------------- 11487# Ensure that the configuration variables for the Windows resource compiler 11488# are suitably defined. These variables are subsequently used by _LT_CONFIG 11489# to write the compiler configuration to 'libtool'. 11490m4_defun([_LT_LANG_RC_CONFIG], 11491[AC_REQUIRE([LT_PROG_RC])dnl 11492AC_LANG_SAVE 11493 11494# Source file extension for RC test sources. 11495ac_ext=rc 11496 11497# Object file extension for compiled RC test sources. 11498objext=o 11499_LT_TAGVAR(objext, $1)=$objext 11500 11501# Code to be used in simple compile tests 11502lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11503 11504# Code to be used in simple link tests 11505lt_simple_link_test_code=$lt_simple_compile_test_code 11506 11507# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11508_LT_TAG_COMPILER 11509 11510# save warnings/boilerplate of simple test code 11511_LT_COMPILER_BOILERPLATE 11512_LT_LINKER_BOILERPLATE 11513 11514# Allow CC to be a program name with arguments. 11515lt_save_CC=$CC 11516lt_save_CFLAGS=$CFLAGS 11517lt_save_GCC=$GCC 11518GCC= 11519CC=${RC-"windres"} 11520CFLAGS= 11521compiler=$CC 11522_LT_TAGVAR(compiler, $1)=$CC 11523_LT_CC_BASENAME([$compiler]) 11524_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11525 11526if test -n "$compiler"; then 11527 : 11528 _LT_CONFIG($1) 11529fi 11530 11531GCC=$lt_save_GCC 11532AC_LANG_RESTORE 11533CC=$lt_save_CC 11534CFLAGS=$lt_save_CFLAGS 11535])# _LT_LANG_RC_CONFIG 11536 11537 11538# LT_PROG_GCJ 11539# ----------- 11540AC_DEFUN([LT_PROG_GCJ], 11541[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11542 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11543 [AC_CHECK_TOOL(GCJ, gcj,) 11544 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11545 AC_SUBST(GCJFLAGS)])])[]dnl 11546]) 11547 11548# Old name: 11549AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11550dnl aclocal-1.4 backwards compatibility: 11551dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11552 11553 11554# LT_PROG_GO 11555# ---------- 11556AC_DEFUN([LT_PROG_GO], 11557[AC_CHECK_TOOL(GOC, gccgo,) 11558]) 11559 11560 11561# LT_PROG_RC 11562# ---------- 11563AC_DEFUN([LT_PROG_RC], 11564[AC_CHECK_TOOL(RC, windres,) 11565]) 11566 11567# Old name: 11568AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11569dnl aclocal-1.4 backwards compatibility: 11570dnl AC_DEFUN([LT_AC_PROG_RC], []) 11571 11572 11573# _LT_DECL_EGREP 11574# -------------- 11575# If we don't have a new enough Autoconf to choose the best grep 11576# available, choose the one first in the user's PATH. 11577m4_defun([_LT_DECL_EGREP], 11578[AC_REQUIRE([AC_PROG_EGREP])dnl 11579AC_REQUIRE([AC_PROG_FGREP])dnl 11580test -z "$GREP" && GREP=grep 11581_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11582_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11583_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11584dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11585AC_SUBST([GREP]) 11586]) 11587 11588 11589# _LT_DECL_OBJDUMP 11590# -------------- 11591# If we don't have a new enough Autoconf to choose the best objdump 11592# available, choose the one first in the user's PATH. 11593m4_defun([_LT_DECL_OBJDUMP], 11594[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11595test -z "$OBJDUMP" && OBJDUMP=objdump 11596_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11597AC_SUBST([OBJDUMP]) 11598]) 11599 11600# _LT_DECL_DLLTOOL 11601# ---------------- 11602# Ensure DLLTOOL variable is set. 11603m4_defun([_LT_DECL_DLLTOOL], 11604[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11605test -z "$DLLTOOL" && DLLTOOL=dlltool 11606_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11607AC_SUBST([DLLTOOL]) 11608]) 11609 11610# _LT_DECL_FILECMD 11611# ---------------- 11612# Check for a file(cmd) program that can be used to detect file type and magic 11613m4_defun([_LT_DECL_FILECMD], 11614[AC_CHECK_TOOL([FILECMD], [file], [:]) 11615_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11616])# _LD_DECL_FILECMD 11617 11618# _LT_DECL_SED 11619# ------------ 11620# Check for a fully-functional sed program, that truncates 11621# as few characters as possible. Prefer GNU sed if found. 11622m4_defun([_LT_DECL_SED], 11623[AC_PROG_SED 11624test -z "$SED" && SED=sed 11625Xsed="$SED -e 1s/^X//" 11626_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11627_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11628 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11629])# _LT_DECL_SED 11630 11631m4_ifndef([AC_PROG_SED], [ 11632# NOTE: This macro has been submitted for inclusion into # 11633# GNU Autoconf as AC_PROG_SED. When it is available in # 11634# a released version of Autoconf we should remove this # 11635# macro and use it instead. # 11636 11637m4_defun([AC_PROG_SED], 11638[AC_MSG_CHECKING([for a sed that does not truncate output]) 11639AC_CACHE_VAL(lt_cv_path_SED, 11640[# Loop through the user's path and test for sed and gsed. 11641# Then use that list of sed's as ones to test for truncation. 11642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11643for as_dir in $PATH 11644do 11645 IFS=$as_save_IFS 11646 test -z "$as_dir" && as_dir=. 11647 for lt_ac_prog in sed gsed; do 11648 for ac_exec_ext in '' $ac_executable_extensions; do 11649 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11650 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11651 fi 11652 done 11653 done 11654done 11655IFS=$as_save_IFS 11656lt_ac_max=0 11657lt_ac_count=0 11658# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11659# along with /bin/sed that truncates output. 11660for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11661 test ! -f "$lt_ac_sed" && continue 11662 cat /dev/null > conftest.in 11663 lt_ac_count=0 11664 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11665 # Check for GNU sed and select it if it is found. 11666 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11667 lt_cv_path_SED=$lt_ac_sed 11668 break 11669 fi 11670 while true; do 11671 cat conftest.in conftest.in >conftest.tmp 11672 mv conftest.tmp conftest.in 11673 cp conftest.in conftest.nl 11674 echo >>conftest.nl 11675 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11676 cmp -s conftest.out conftest.nl || break 11677 # 10000 chars as input seems more than enough 11678 test 10 -lt "$lt_ac_count" && break 11679 lt_ac_count=`expr $lt_ac_count + 1` 11680 if test "$lt_ac_count" -gt "$lt_ac_max"; then 11681 lt_ac_max=$lt_ac_count 11682 lt_cv_path_SED=$lt_ac_sed 11683 fi 11684 done 11685done 11686]) 11687SED=$lt_cv_path_SED 11688AC_SUBST([SED]) 11689AC_MSG_RESULT([$SED]) 11690])#AC_PROG_SED 11691])#m4_ifndef 11692 11693# Old name: 11694AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11695dnl aclocal-1.4 backwards compatibility: 11696dnl AC_DEFUN([LT_AC_PROG_SED], []) 11697 11698 11699# _LT_CHECK_SHELL_FEATURES 11700# ------------------------ 11701# Find out whether the shell is Bourne or XSI compatible, 11702# or has some other useful features. 11703m4_defun([_LT_CHECK_SHELL_FEATURES], 11704[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11705 lt_unset=unset 11706else 11707 lt_unset=false 11708fi 11709_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11710 11711# test EBCDIC or ASCII 11712case `echo X|tr X '\101'` in 11713 A) # ASCII based system 11714 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11715 lt_SP2NL='tr \040 \012' 11716 lt_NL2SP='tr \015\012 \040\040' 11717 ;; 11718 *) # EBCDIC based system 11719 lt_SP2NL='tr \100 \n' 11720 lt_NL2SP='tr \r\n \100\100' 11721 ;; 11722esac 11723_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11724_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11725])# _LT_CHECK_SHELL_FEATURES 11726 11727 11728# _LT_PATH_CONVERSION_FUNCTIONS 11729# ----------------------------- 11730# Determine what file name conversion functions should be used by 11731# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11732# for certain cross-compile configurations and native mingw. 11733m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11734[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11735AC_REQUIRE([AC_CANONICAL_BUILD])dnl 11736AC_MSG_CHECKING([how to convert $build file names to $host format]) 11737AC_CACHE_VAL(lt_cv_to_host_file_cmd, 11738[case $host in 11739 *-*-mingw* ) 11740 case $build in 11741 *-*-mingw* ) # actually msys 11742 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11743 ;; 11744 *-*-cygwin* ) 11745 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11746 ;; 11747 * ) # otherwise, assume *nix 11748 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11749 ;; 11750 esac 11751 ;; 11752 *-*-cygwin* ) 11753 case $build in 11754 *-*-mingw* ) # actually msys 11755 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11756 ;; 11757 *-*-cygwin* ) 11758 lt_cv_to_host_file_cmd=func_convert_file_noop 11759 ;; 11760 * ) # otherwise, assume *nix 11761 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11762 ;; 11763 esac 11764 ;; 11765 * ) # unhandled hosts (and "normal" native builds) 11766 lt_cv_to_host_file_cmd=func_convert_file_noop 11767 ;; 11768esac 11769]) 11770to_host_file_cmd=$lt_cv_to_host_file_cmd 11771AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11772_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11773 [0], [convert $build file names to $host format])dnl 11774 11775AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11776AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11777[#assume ordinary cross tools, or native build. 11778lt_cv_to_tool_file_cmd=func_convert_file_noop 11779case $host in 11780 *-*-mingw* ) 11781 case $build in 11782 *-*-mingw* ) # actually msys 11783 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11784 ;; 11785 esac 11786 ;; 11787esac 11788]) 11789to_tool_file_cmd=$lt_cv_to_tool_file_cmd 11790AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11791_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11792 [0], [convert $build files to toolchain format])dnl 11793])# _LT_PATH_CONVERSION_FUNCTIONS 11794 11795# Helper functions for option handling. -*- Autoconf -*- 11796# 11797# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11798# Software Foundation, Inc. 11799# Written by Gary V. Vaughan, 2004 11800# 11801# This file is free software; the Free Software Foundation gives 11802# unlimited permission to copy and/or distribute it, with or without 11803# modifications, as long as this notice is preserved. 11804 11805# serial 8 ltoptions.m4 11806 11807# This is to help aclocal find these macros, as it can't see m4_define. 11808AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11809 11810 11811# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11812# ------------------------------------------ 11813m4_define([_LT_MANGLE_OPTION], 11814[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11815 11816 11817# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11818# --------------------------------------- 11819# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11820# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11821# saved as a flag. 11822m4_define([_LT_SET_OPTION], 11823[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11824m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11825 _LT_MANGLE_DEFUN([$1], [$2]), 11826 [m4_warning([Unknown $1 option '$2'])])[]dnl 11827]) 11828 11829 11830# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11831# ------------------------------------------------------------ 11832# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11833m4_define([_LT_IF_OPTION], 11834[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11835 11836 11837# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11838# ------------------------------------------------------- 11839# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11840# are set. 11841m4_define([_LT_UNLESS_OPTIONS], 11842[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11843 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11844 [m4_define([$0_found])])])[]dnl 11845m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11846])[]dnl 11847]) 11848 11849 11850# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11851# ---------------------------------------- 11852# OPTION-LIST is a space-separated list of Libtool options associated 11853# with MACRO-NAME. If any OPTION has a matching handler declared with 11854# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11855# the unknown option and exit. 11856m4_defun([_LT_SET_OPTIONS], 11857[# Set options 11858m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11859 [_LT_SET_OPTION([$1], _LT_Option)]) 11860 11861m4_if([$1],[LT_INIT],[ 11862 dnl 11863 dnl Simply set some default values (i.e off) if boolean options were not 11864 dnl specified: 11865 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11866 ]) 11867 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11868 ]) 11869 dnl 11870 dnl If no reference was made to various pairs of opposing options, then 11871 dnl we run the default mode handler for the pair. For example, if neither 11872 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11873 dnl archives by default: 11874 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11875 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11876 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11877 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11878 [_LT_ENABLE_FAST_INSTALL]) 11879 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11880 [_LT_WITH_AIX_SONAME([aix])]) 11881 ]) 11882])# _LT_SET_OPTIONS 11883 11884 11885 11886# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11887# ----------------------------------------- 11888m4_define([_LT_MANGLE_DEFUN], 11889[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11890 11891 11892# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11893# ----------------------------------------------- 11894m4_define([LT_OPTION_DEFINE], 11895[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11896])# LT_OPTION_DEFINE 11897 11898 11899# dlopen 11900# ------ 11901LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11902]) 11903 11904AU_DEFUN([AC_LIBTOOL_DLOPEN], 11905[_LT_SET_OPTION([LT_INIT], [dlopen]) 11906AC_DIAGNOSE([obsolete], 11907[$0: Remove this warning and the call to _LT_SET_OPTION when you 11908put the 'dlopen' option into LT_INIT's first parameter.]) 11909]) 11910 11911dnl aclocal-1.4 backwards compatibility: 11912dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11913 11914 11915# win32-dll 11916# --------- 11917# Declare package support for building win32 dll's. 11918LT_OPTION_DEFINE([LT_INIT], [win32-dll], 11919[enable_win32_dll=yes 11920 11921case $host in 11922*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11923 AC_CHECK_TOOL(AS, as, false) 11924 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11925 AC_CHECK_TOOL(OBJDUMP, objdump, false) 11926 ;; 11927esac 11928 11929test -z "$AS" && AS=as 11930_LT_DECL([], [AS], [1], [Assembler program])dnl 11931 11932test -z "$DLLTOOL" && DLLTOOL=dlltool 11933_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11934 11935test -z "$OBJDUMP" && OBJDUMP=objdump 11936_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11937])# win32-dll 11938 11939AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11940[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11941_LT_SET_OPTION([LT_INIT], [win32-dll]) 11942AC_DIAGNOSE([obsolete], 11943[$0: Remove this warning and the call to _LT_SET_OPTION when you 11944put the 'win32-dll' option into LT_INIT's first parameter.]) 11945]) 11946 11947dnl aclocal-1.4 backwards compatibility: 11948dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11949 11950 11951# _LT_ENABLE_SHARED([DEFAULT]) 11952# ---------------------------- 11953# implement the --enable-shared flag, and supports the 'shared' and 11954# 'disable-shared' LT_INIT options. 11955# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11956m4_define([_LT_ENABLE_SHARED], 11957[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11958AC_ARG_ENABLE([shared], 11959 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11960 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11961 [p=${PACKAGE-default} 11962 case $enableval in 11963 yes) enable_shared=yes ;; 11964 no) enable_shared=no ;; 11965 *) 11966 enable_shared=no 11967 # Look at the argument we got. We use all the common list separators. 11968 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11969 for pkg in $enableval; do 11970 IFS=$lt_save_ifs 11971 if test "X$pkg" = "X$p"; then 11972 enable_shared=yes 11973 fi 11974 done 11975 IFS=$lt_save_ifs 11976 ;; 11977 esac], 11978 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11979 11980 _LT_DECL([build_libtool_libs], [enable_shared], [0], 11981 [Whether or not to build shared libraries]) 11982])# _LT_ENABLE_SHARED 11983 11984LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11985LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11986 11987# Old names: 11988AC_DEFUN([AC_ENABLE_SHARED], 11989[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11990]) 11991 11992AC_DEFUN([AC_DISABLE_SHARED], 11993[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11994]) 11995 11996AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11997AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11998 11999dnl aclocal-1.4 backwards compatibility: 12000dnl AC_DEFUN([AM_ENABLE_SHARED], []) 12001dnl AC_DEFUN([AM_DISABLE_SHARED], []) 12002 12003 12004 12005# _LT_ENABLE_STATIC([DEFAULT]) 12006# ---------------------------- 12007# implement the --enable-static flag, and support the 'static' and 12008# 'disable-static' LT_INIT options. 12009# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12010m4_define([_LT_ENABLE_STATIC], 12011[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12012AC_ARG_ENABLE([static], 12013 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12014 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12015 [p=${PACKAGE-default} 12016 case $enableval in 12017 yes) enable_static=yes ;; 12018 no) enable_static=no ;; 12019 *) 12020 enable_static=no 12021 # Look at the argument we got. We use all the common list separators. 12022 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12023 for pkg in $enableval; do 12024 IFS=$lt_save_ifs 12025 if test "X$pkg" = "X$p"; then 12026 enable_static=yes 12027 fi 12028 done 12029 IFS=$lt_save_ifs 12030 ;; 12031 esac], 12032 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12033 12034 _LT_DECL([build_old_libs], [enable_static], [0], 12035 [Whether or not to build static libraries]) 12036])# _LT_ENABLE_STATIC 12037 12038LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12039LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12040 12041# Old names: 12042AC_DEFUN([AC_ENABLE_STATIC], 12043[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12044]) 12045 12046AC_DEFUN([AC_DISABLE_STATIC], 12047[_LT_SET_OPTION([LT_INIT], [disable-static]) 12048]) 12049 12050AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12051AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12052 12053dnl aclocal-1.4 backwards compatibility: 12054dnl AC_DEFUN([AM_ENABLE_STATIC], []) 12055dnl AC_DEFUN([AM_DISABLE_STATIC], []) 12056 12057 12058 12059# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12060# ---------------------------------- 12061# implement the --enable-fast-install flag, and support the 'fast-install' 12062# and 'disable-fast-install' LT_INIT options. 12063# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12064m4_define([_LT_ENABLE_FAST_INSTALL], 12065[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12066AC_ARG_ENABLE([fast-install], 12067 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12068 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12069 [p=${PACKAGE-default} 12070 case $enableval in 12071 yes) enable_fast_install=yes ;; 12072 no) enable_fast_install=no ;; 12073 *) 12074 enable_fast_install=no 12075 # Look at the argument we got. We use all the common list separators. 12076 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12077 for pkg in $enableval; do 12078 IFS=$lt_save_ifs 12079 if test "X$pkg" = "X$p"; then 12080 enable_fast_install=yes 12081 fi 12082 done 12083 IFS=$lt_save_ifs 12084 ;; 12085 esac], 12086 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12087 12088_LT_DECL([fast_install], [enable_fast_install], [0], 12089 [Whether or not to optimize for fast installation])dnl 12090])# _LT_ENABLE_FAST_INSTALL 12091 12092LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12093LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12094 12095# Old names: 12096AU_DEFUN([AC_ENABLE_FAST_INSTALL], 12097[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12098AC_DIAGNOSE([obsolete], 12099[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12100the 'fast-install' option into LT_INIT's first parameter.]) 12101]) 12102 12103AU_DEFUN([AC_DISABLE_FAST_INSTALL], 12104[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12105AC_DIAGNOSE([obsolete], 12106[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12107the 'disable-fast-install' option into LT_INIT's first parameter.]) 12108]) 12109 12110dnl aclocal-1.4 backwards compatibility: 12111dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12112dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12113 12114 12115# _LT_WITH_AIX_SONAME([DEFAULT]) 12116# ---------------------------------- 12117# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12118# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12119# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12120m4_define([_LT_WITH_AIX_SONAME], 12121[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12122shared_archive_member_spec= 12123case $host,$enable_shared in 12124power*-*-aix[[5-9]]*,yes) 12125 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12126 AC_ARG_WITH([aix-soname], 12127 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12128 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12129 [case $withval in 12130 aix|svr4|both) 12131 ;; 12132 *) 12133 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12134 ;; 12135 esac 12136 lt_cv_with_aix_soname=$with_aix_soname], 12137 [AC_CACHE_VAL([lt_cv_with_aix_soname], 12138 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12139 with_aix_soname=$lt_cv_with_aix_soname]) 12140 AC_MSG_RESULT([$with_aix_soname]) 12141 if test aix != "$with_aix_soname"; then 12142 # For the AIX way of multilib, we name the shared archive member 12143 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12144 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12145 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12146 # the AIX toolchain works better with OBJECT_MODE set (default 32). 12147 if test 64 = "${OBJECT_MODE-32}"; then 12148 shared_archive_member_spec=shr_64 12149 else 12150 shared_archive_member_spec=shr 12151 fi 12152 fi 12153 ;; 12154*) 12155 with_aix_soname=aix 12156 ;; 12157esac 12158 12159_LT_DECL([], [shared_archive_member_spec], [0], 12160 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12161])# _LT_WITH_AIX_SONAME 12162 12163LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12164LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12165LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12166 12167 12168# _LT_WITH_PIC([MODE]) 12169# -------------------- 12170# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12171# LT_INIT options. 12172# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12173m4_define([_LT_WITH_PIC], 12174[AC_ARG_WITH([pic], 12175 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12176 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12177 [lt_p=${PACKAGE-default} 12178 case $withval in 12179 yes|no) pic_mode=$withval ;; 12180 *) 12181 pic_mode=default 12182 # Look at the argument we got. We use all the common list separators. 12183 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12184 for lt_pkg in $withval; do 12185 IFS=$lt_save_ifs 12186 if test "X$lt_pkg" = "X$lt_p"; then 12187 pic_mode=yes 12188 fi 12189 done 12190 IFS=$lt_save_ifs 12191 ;; 12192 esac], 12193 [pic_mode=m4_default([$1], [default])]) 12194 12195_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12196])# _LT_WITH_PIC 12197 12198LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12199LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12200 12201# Old name: 12202AU_DEFUN([AC_LIBTOOL_PICMODE], 12203[_LT_SET_OPTION([LT_INIT], [pic-only]) 12204AC_DIAGNOSE([obsolete], 12205[$0: Remove this warning and the call to _LT_SET_OPTION when you 12206put the 'pic-only' option into LT_INIT's first parameter.]) 12207]) 12208 12209dnl aclocal-1.4 backwards compatibility: 12210dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12211 12212 12213m4_define([_LTDL_MODE], []) 12214LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12215 [m4_define([_LTDL_MODE], [nonrecursive])]) 12216LT_OPTION_DEFINE([LTDL_INIT], [recursive], 12217 [m4_define([_LTDL_MODE], [recursive])]) 12218LT_OPTION_DEFINE([LTDL_INIT], [subproject], 12219 [m4_define([_LTDL_MODE], [subproject])]) 12220 12221m4_define([_LTDL_TYPE], []) 12222LT_OPTION_DEFINE([LTDL_INIT], [installable], 12223 [m4_define([_LTDL_TYPE], [installable])]) 12224LT_OPTION_DEFINE([LTDL_INIT], [convenience], 12225 [m4_define([_LTDL_TYPE], [convenience])]) 12226 12227# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12228# 12229# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12230# Foundation, Inc. 12231# Written by Gary V. Vaughan, 2004 12232# 12233# This file is free software; the Free Software Foundation gives 12234# unlimited permission to copy and/or distribute it, with or without 12235# modifications, as long as this notice is preserved. 12236 12237# serial 6 ltsugar.m4 12238 12239# This is to help aclocal find these macros, as it can't see m4_define. 12240AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12241 12242 12243# lt_join(SEP, ARG1, [ARG2...]) 12244# ----------------------------- 12245# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12246# associated separator. 12247# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12248# versions in m4sugar had bugs. 12249m4_define([lt_join], 12250[m4_if([$#], [1], [], 12251 [$#], [2], [[$2]], 12252 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12253m4_define([_lt_join], 12254[m4_if([$#$2], [2], [], 12255 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12256 12257 12258# lt_car(LIST) 12259# lt_cdr(LIST) 12260# ------------ 12261# Manipulate m4 lists. 12262# These macros are necessary as long as will still need to support 12263# Autoconf-2.59, which quotes differently. 12264m4_define([lt_car], [[$1]]) 12265m4_define([lt_cdr], 12266[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12267 [$#], 1, [], 12268 [m4_dquote(m4_shift($@))])]) 12269m4_define([lt_unquote], $1) 12270 12271 12272# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12273# ------------------------------------------ 12274# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12275# Note that neither SEPARATOR nor STRING are expanded; they are appended 12276# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12277# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12278# than defined and empty). 12279# 12280# This macro is needed until we can rely on Autoconf 2.62, since earlier 12281# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12282m4_define([lt_append], 12283[m4_define([$1], 12284 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12285 12286 12287 12288# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12289# ---------------------------------------------------------- 12290# Produce a SEP delimited list of all paired combinations of elements of 12291# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12292# has the form PREFIXmINFIXSUFFIXn. 12293# Needed until we can rely on m4_combine added in Autoconf 2.62. 12294m4_define([lt_combine], 12295[m4_if(m4_eval([$# > 3]), [1], 12296 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12297[[m4_foreach([_Lt_prefix], [$2], 12298 [m4_foreach([_Lt_suffix], 12299 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12300 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12301 12302 12303# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12304# ----------------------------------------------------------------------- 12305# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12306# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12307m4_define([lt_if_append_uniq], 12308[m4_ifdef([$1], 12309 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12310 [lt_append([$1], [$2], [$3])$4], 12311 [$5])], 12312 [lt_append([$1], [$2], [$3])$4])]) 12313 12314 12315# lt_dict_add(DICT, KEY, VALUE) 12316# ----------------------------- 12317m4_define([lt_dict_add], 12318[m4_define([$1($2)], [$3])]) 12319 12320 12321# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12322# -------------------------------------------- 12323m4_define([lt_dict_add_subkey], 12324[m4_define([$1($2:$3)], [$4])]) 12325 12326 12327# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12328# ---------------------------------- 12329m4_define([lt_dict_fetch], 12330[m4_ifval([$3], 12331 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12332 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12333 12334 12335# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12336# ----------------------------------------------------------------- 12337m4_define([lt_if_dict_fetch], 12338[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12339 [$5], 12340 [$6])]) 12341 12342 12343# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12344# -------------------------------------------------------------- 12345m4_define([lt_dict_filter], 12346[m4_if([$5], [], [], 12347 [lt_join(m4_quote(m4_default([$4], [[, ]])), 12348 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12349 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12350]) 12351 12352# ltversion.m4 -- version numbers -*- Autoconf -*- 12353# 12354# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12355# Inc. 12356# Written by Scott James Remnant, 2004 12357# 12358# This file is free software; the Free Software Foundation gives 12359# unlimited permission to copy and/or distribute it, with or without 12360# modifications, as long as this notice is preserved. 12361 12362# @configure_input@ 12363 12364# serial 4245 ltversion.m4 12365# This file is part of GNU Libtool 12366 12367m4_define([LT_PACKAGE_VERSION], [2.4.7]) 12368m4_define([LT_PACKAGE_REVISION], [2.4.7]) 12369 12370AC_DEFUN([LTVERSION_VERSION], 12371[macro_version='2.4.7' 12372macro_revision='2.4.7' 12373_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12374_LT_DECL(, macro_revision, 0) 12375]) 12376 12377# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12378# 12379# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12380# Software Foundation, Inc. 12381# Written by Scott James Remnant, 2004. 12382# 12383# This file is free software; the Free Software Foundation gives 12384# unlimited permission to copy and/or distribute it, with or without 12385# modifications, as long as this notice is preserved. 12386 12387# serial 5 lt~obsolete.m4 12388 12389# These exist entirely to fool aclocal when bootstrapping libtool. 12390# 12391# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12392# which have later been changed to m4_define as they aren't part of the 12393# exported API, or moved to Autoconf or Automake where they belong. 12394# 12395# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12396# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12397# using a macro with the same name in our local m4/libtool.m4 it'll 12398# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12399# and doesn't know about Autoconf macros at all.) 12400# 12401# So we provide this file, which has a silly filename so it's always 12402# included after everything else. This provides aclocal with the 12403# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12404# because those macros already exist, or will be overwritten later. 12405# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12406# 12407# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12408# Yes, that means every name once taken will need to remain here until 12409# we give up compatibility with versions before 1.7, at which point 12410# we need to keep only those names which we still refer to. 12411 12412# This is to help aclocal find these macros, as it can't see m4_define. 12413AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12414 12415m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12416m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12417m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12418m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12419m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12420m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12421m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12422m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12423m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12424m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12425m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12426m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12427m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12428m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12429m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12430m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12431m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12432m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12433m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12434m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12435m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12436m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12437m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12438m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12439m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12440m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12441m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12442m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12443m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12444m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12445m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12446m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12447m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12448m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12449m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12450m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12451m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12452m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12453m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12454m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12455m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12456m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12457m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12458m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12459m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12460m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12461m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12462m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12463m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12464m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12465m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12466m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12467m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12468m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12469m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12470m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12471m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12472m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12473m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12474m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12475m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12476 12477