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# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 659# From Jim Meyering 660 661# Copyright (C) 1996-2021 Free Software Foundation, Inc. 662# 663# This file is free software; the Free Software Foundation 664# gives unlimited permission to copy and/or distribute it, 665# with or without modifications, as long as this notice is preserved. 666 667# AM_MAINTAINER_MODE([DEFAULT-MODE]) 668# ---------------------------------- 669# Control maintainer-specific portions of Makefiles. 670# Default is to disable them, unless 'enable' is passed literally. 671# For symmetry, 'disable' may be passed as well. Anyway, the user 672# can override the default with the --enable/--disable switch. 673AC_DEFUN([AM_MAINTAINER_MODE], 674[m4_case(m4_default([$1], [disable]), 675 [enable], [m4_define([am_maintainer_other], [disable])], 676 [disable], [m4_define([am_maintainer_other], [enable])], 677 [m4_define([am_maintainer_other], [enable]) 678 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 679AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 680 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 681 AC_ARG_ENABLE([maintainer-mode], 682 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 683 am_maintainer_other[ make rules and dependencies not useful 684 (and sometimes confusing) to the casual installer])], 685 [USE_MAINTAINER_MODE=$enableval], 686 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 687 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 688 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 689 MAINT=$MAINTAINER_MODE_TRUE 690 AC_SUBST([MAINT])dnl 691] 692) 693 694# Check to see how 'make' treats includes. -*- Autoconf -*- 695 696# Copyright (C) 2001-2021 Free Software Foundation, Inc. 697# 698# This file is free software; the Free Software Foundation 699# gives unlimited permission to copy and/or distribute it, 700# with or without modifications, as long as this notice is preserved. 701 702# AM_MAKE_INCLUDE() 703# ----------------- 704# Check whether make has an 'include' directive that can support all 705# the idioms we need for our automatic dependency tracking code. 706AC_DEFUN([AM_MAKE_INCLUDE], 707[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 708cat > confinc.mk << 'END' 709am__doit: 710 @echo this is the am__doit target >confinc.out 711.PHONY: am__doit 712END 713am__include="#" 714am__quote= 715# BSD make does it like this. 716echo '.include "confinc.mk" # ignored' > confmf.BSD 717# Other make implementations (GNU, Solaris 10, AIX) do it like this. 718echo 'include confinc.mk # ignored' > confmf.GNU 719_am_result=no 720for s in GNU BSD; do 721 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 722 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 723 ['0:this is the am__doit target'], 724 [AS_CASE([$s], 725 [BSD], [am__include='.include' am__quote='"'], 726 [am__include='include' am__quote=''])]) 727 if test "$am__include" != "#"; then 728 _am_result="yes ($s style)" 729 break 730 fi 731done 732rm -f confinc.* confmf.* 733AC_MSG_RESULT([${_am_result}]) 734AC_SUBST([am__include])]) 735AC_SUBST([am__quote])]) 736 737# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 738 739# Copyright (C) 1997-2021 Free Software Foundation, Inc. 740# 741# This file is free software; the Free Software Foundation 742# gives unlimited permission to copy and/or distribute it, 743# with or without modifications, as long as this notice is preserved. 744 745# AM_MISSING_PROG(NAME, PROGRAM) 746# ------------------------------ 747AC_DEFUN([AM_MISSING_PROG], 748[AC_REQUIRE([AM_MISSING_HAS_RUN]) 749$1=${$1-"${am_missing_run}$2"} 750AC_SUBST($1)]) 751 752# AM_MISSING_HAS_RUN 753# ------------------ 754# Define MISSING if not defined so far and test if it is modern enough. 755# If it is, set am_missing_run to use it, otherwise, to nothing. 756AC_DEFUN([AM_MISSING_HAS_RUN], 757[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 758AC_REQUIRE_AUX_FILE([missing])dnl 759if test x"${MISSING+set}" != xset; then 760 MISSING="\${SHELL} '$am_aux_dir/missing'" 761fi 762# Use eval to expand $SHELL 763if eval "$MISSING --is-lightweight"; then 764 am_missing_run="$MISSING " 765else 766 am_missing_run= 767 AC_MSG_WARN(['missing' script is too old or missing]) 768fi 769]) 770 771# Helper functions for option handling. -*- Autoconf -*- 772 773# Copyright (C) 2001-2021 Free Software Foundation, Inc. 774# 775# This file is free software; the Free Software Foundation 776# gives unlimited permission to copy and/or distribute it, 777# with or without modifications, as long as this notice is preserved. 778 779# _AM_MANGLE_OPTION(NAME) 780# ----------------------- 781AC_DEFUN([_AM_MANGLE_OPTION], 782[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 783 784# _AM_SET_OPTION(NAME) 785# -------------------- 786# Set option NAME. Presently that only means defining a flag for this option. 787AC_DEFUN([_AM_SET_OPTION], 788[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 789 790# _AM_SET_OPTIONS(OPTIONS) 791# ------------------------ 792# OPTIONS is a space-separated list of Automake options. 793AC_DEFUN([_AM_SET_OPTIONS], 794[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 795 796# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 797# ------------------------------------------- 798# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 799AC_DEFUN([_AM_IF_OPTION], 800[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 801 802# Copyright (C) 1999-2021 Free Software Foundation, Inc. 803# 804# This file is free software; the Free Software Foundation 805# gives unlimited permission to copy and/or distribute it, 806# with or without modifications, as long as this notice is preserved. 807 808# _AM_PROG_CC_C_O 809# --------------- 810# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 811# to automatically call this. 812AC_DEFUN([_AM_PROG_CC_C_O], 813[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 814AC_REQUIRE_AUX_FILE([compile])dnl 815AC_LANG_PUSH([C])dnl 816AC_CACHE_CHECK( 817 [whether $CC understands -c and -o together], 818 [am_cv_prog_cc_c_o], 819 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 820 # Make sure it works both with $CC and with simple cc. 821 # Following AC_PROG_CC_C_O, we do the test twice because some 822 # compilers refuse to overwrite an existing .o file with -o, 823 # though they will create one. 824 am_cv_prog_cc_c_o=yes 825 for am_i in 1 2; do 826 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 827 && test -f conftest2.$ac_objext; then 828 : OK 829 else 830 am_cv_prog_cc_c_o=no 831 break 832 fi 833 done 834 rm -f core conftest* 835 unset am_i]) 836if test "$am_cv_prog_cc_c_o" != yes; then 837 # Losing compiler, so override with the script. 838 # FIXME: It is wrong to rewrite CC. 839 # But if we don't then we get into trouble of one sort or another. 840 # A longer-term fix would be to have automake use am__CC in this case, 841 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 842 CC="$am_aux_dir/compile $CC" 843fi 844AC_LANG_POP([C])]) 845 846# For backward compatibility. 847AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 848 849# Copyright (C) 2001-2021 Free Software Foundation, Inc. 850# 851# This file is free software; the Free Software Foundation 852# gives unlimited permission to copy and/or distribute it, 853# with or without modifications, as long as this notice is preserved. 854 855# AM_RUN_LOG(COMMAND) 856# ------------------- 857# Run COMMAND, save the exit status in ac_status, and log it. 858# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 859AC_DEFUN([AM_RUN_LOG], 860[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 861 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 862 ac_status=$? 863 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 864 (exit $ac_status); }]) 865 866# Check to make sure that the build environment is sane. -*- Autoconf -*- 867 868# Copyright (C) 1996-2021 Free Software Foundation, Inc. 869# 870# This file is free software; the Free Software Foundation 871# gives unlimited permission to copy and/or distribute it, 872# with or without modifications, as long as this notice is preserved. 873 874# AM_SANITY_CHECK 875# --------------- 876AC_DEFUN([AM_SANITY_CHECK], 877[AC_MSG_CHECKING([whether build environment is sane]) 878# Reject unsafe characters in $srcdir or the absolute working directory 879# name. Accept space and tab only in the latter. 880am_lf=' 881' 882case `pwd` in 883 *[[\\\"\#\$\&\'\`$am_lf]]*) 884 AC_MSG_ERROR([unsafe absolute working directory name]);; 885esac 886case $srcdir in 887 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 888 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 889esac 890 891# Do 'set' in a subshell so we don't clobber the current shell's 892# arguments. Must try -L first in case configure is actually a 893# symlink; some systems play weird games with the mod time of symlinks 894# (eg FreeBSD returns the mod time of the symlink's containing 895# directory). 896if ( 897 am_has_slept=no 898 for am_try in 1 2; do 899 echo "timestamp, slept: $am_has_slept" > conftest.file 900 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 901 if test "$[*]" = "X"; then 902 # -L didn't work. 903 set X `ls -t "$srcdir/configure" conftest.file` 904 fi 905 if test "$[*]" != "X $srcdir/configure conftest.file" \ 906 && test "$[*]" != "X conftest.file $srcdir/configure"; then 907 908 # If neither matched, then we have a broken ls. This can happen 909 # if, for instance, CONFIG_SHELL is bash and it inherits a 910 # broken ls alias from the environment. This has actually 911 # happened. Such a system could not be considered "sane". 912 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 913 alias in your environment]) 914 fi 915 if test "$[2]" = conftest.file || test $am_try -eq 2; then 916 break 917 fi 918 # Just in case. 919 sleep 1 920 am_has_slept=yes 921 done 922 test "$[2]" = conftest.file 923 ) 924then 925 # Ok. 926 : 927else 928 AC_MSG_ERROR([newly created file is older than distributed files! 929Check your system clock]) 930fi 931AC_MSG_RESULT([yes]) 932# If we didn't sleep, we still need to ensure time stamps of config.status and 933# generated files are strictly newer. 934am_sleep_pid= 935if grep 'slept: no' conftest.file >/dev/null 2>&1; then 936 ( sleep 1 ) & 937 am_sleep_pid=$! 938fi 939AC_CONFIG_COMMANDS_PRE( 940 [AC_MSG_CHECKING([that generated files are newer than configure]) 941 if test -n "$am_sleep_pid"; then 942 # Hide warnings about reused PIDs. 943 wait $am_sleep_pid 2>/dev/null 944 fi 945 AC_MSG_RESULT([done])]) 946rm -f conftest.file 947]) 948 949# Copyright (C) 2009-2021 Free Software Foundation, Inc. 950# 951# This file is free software; the Free Software Foundation 952# gives unlimited permission to copy and/or distribute it, 953# with or without modifications, as long as this notice is preserved. 954 955# AM_SILENT_RULES([DEFAULT]) 956# -------------------------- 957# Enable less verbose build rules; with the default set to DEFAULT 958# ("yes" being less verbose, "no" or empty being verbose). 959AC_DEFUN([AM_SILENT_RULES], 960[AC_ARG_ENABLE([silent-rules], [dnl 961AS_HELP_STRING( 962 [--enable-silent-rules], 963 [less verbose build output (undo: "make V=1")]) 964AS_HELP_STRING( 965 [--disable-silent-rules], 966 [verbose build output (undo: "make V=0")])dnl 967]) 968case $enable_silent_rules in @%:@ ((( 969 yes) AM_DEFAULT_VERBOSITY=0;; 970 no) AM_DEFAULT_VERBOSITY=1;; 971 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 972esac 973dnl 974dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 975dnl do not support nested variable expansions. 976dnl See automake bug#9928 and bug#10237. 977am_make=${MAKE-make} 978AC_CACHE_CHECK([whether $am_make supports nested variables], 979 [am_cv_make_support_nested_variables], 980 [if AS_ECHO([['TRUE=$(BAR$(V)) 981BAR0=false 982BAR1=true 983V=1 984am__doit: 985 @$(TRUE) 986.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 987 am_cv_make_support_nested_variables=yes 988else 989 am_cv_make_support_nested_variables=no 990fi]) 991if test $am_cv_make_support_nested_variables = yes; then 992 dnl Using '$V' instead of '$(V)' breaks IRIX make. 993 AM_V='$(V)' 994 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 995else 996 AM_V=$AM_DEFAULT_VERBOSITY 997 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 998fi 999AC_SUBST([AM_V])dnl 1000AM_SUBST_NOTMAKE([AM_V])dnl 1001AC_SUBST([AM_DEFAULT_V])dnl 1002AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1003AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1004AM_BACKSLASH='\' 1005AC_SUBST([AM_BACKSLASH])dnl 1006_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1007]) 1008 1009# Copyright (C) 2001-2021 Free Software Foundation, Inc. 1010# 1011# This file is free software; the Free Software Foundation 1012# gives unlimited permission to copy and/or distribute it, 1013# with or without modifications, as long as this notice is preserved. 1014 1015# AM_PROG_INSTALL_STRIP 1016# --------------------- 1017# One issue with vendor 'install' (even GNU) is that you can't 1018# specify the program used to strip binaries. This is especially 1019# annoying in cross-compiling environments, where the build's strip 1020# is unlikely to handle the host's binaries. 1021# Fortunately install-sh will honor a STRIPPROG variable, so we 1022# always use install-sh in "make install-strip", and initialize 1023# STRIPPROG with the value of the STRIP variable (set by the user). 1024AC_DEFUN([AM_PROG_INSTALL_STRIP], 1025[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1026# Installed binaries are usually stripped using 'strip' when the user 1027# run "make install-strip". However 'strip' might not be the right 1028# tool to use in cross-compilation environments, therefore Automake 1029# will honor the 'STRIP' environment variable to overrule this program. 1030dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1031if test "$cross_compiling" != no; then 1032 AC_CHECK_TOOL([STRIP], [strip], :) 1033fi 1034INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1035AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1036 1037# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1038# 1039# This file is free software; the Free Software Foundation 1040# gives unlimited permission to copy and/or distribute it, 1041# with or without modifications, as long as this notice is preserved. 1042 1043# _AM_SUBST_NOTMAKE(VARIABLE) 1044# --------------------------- 1045# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1046# This macro is traced by Automake. 1047AC_DEFUN([_AM_SUBST_NOTMAKE]) 1048 1049# AM_SUBST_NOTMAKE(VARIABLE) 1050# -------------------------- 1051# Public sister of _AM_SUBST_NOTMAKE. 1052AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1053 1054# Check how to create a tarball. -*- Autoconf -*- 1055 1056# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1057# 1058# This file is free software; the Free Software Foundation 1059# gives unlimited permission to copy and/or distribute it, 1060# with or without modifications, as long as this notice is preserved. 1061 1062# _AM_PROG_TAR(FORMAT) 1063# -------------------- 1064# Check how to create a tarball in format FORMAT. 1065# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1066# 1067# Substitute a variable $(am__tar) that is a command 1068# writing to stdout a FORMAT-tarball containing the directory 1069# $tardir. 1070# tardir=directory && $(am__tar) > result.tar 1071# 1072# Substitute a variable $(am__untar) that extract such 1073# a tarball read from stdin. 1074# $(am__untar) < result.tar 1075# 1076AC_DEFUN([_AM_PROG_TAR], 1077[# Always define AMTAR for backward compatibility. Yes, it's still used 1078# in the wild :-( We should find a proper way to deprecate it ... 1079AC_SUBST([AMTAR], ['$${TAR-tar}']) 1080 1081# We'll loop over all known methods to create a tar archive until one works. 1082_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1083 1084m4_if([$1], [v7], 1085 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1086 1087 [m4_case([$1], 1088 [ustar], 1089 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1090 # There is notably a 21 bits limit for the UID and the GID. In fact, 1091 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1092 # and bug#13588). 1093 am_max_uid=2097151 # 2^21 - 1 1094 am_max_gid=$am_max_uid 1095 # The $UID and $GID variables are not portable, so we need to resort 1096 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1097 # below are definitely unexpected, so allow the users to see them 1098 # (that is, avoid stderr redirection). 1099 am_uid=`id -u || echo unknown` 1100 am_gid=`id -g || echo unknown` 1101 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1102 if test $am_uid -le $am_max_uid; then 1103 AC_MSG_RESULT([yes]) 1104 else 1105 AC_MSG_RESULT([no]) 1106 _am_tools=none 1107 fi 1108 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1109 if test $am_gid -le $am_max_gid; then 1110 AC_MSG_RESULT([yes]) 1111 else 1112 AC_MSG_RESULT([no]) 1113 _am_tools=none 1114 fi], 1115 1116 [pax], 1117 [], 1118 1119 [m4_fatal([Unknown tar format])]) 1120 1121 AC_MSG_CHECKING([how to create a $1 tar archive]) 1122 1123 # Go ahead even if we have the value already cached. We do so because we 1124 # need to set the values for the 'am__tar' and 'am__untar' variables. 1125 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1126 1127 for _am_tool in $_am_tools; do 1128 case $_am_tool in 1129 gnutar) 1130 for _am_tar in tar gnutar gtar; do 1131 AM_RUN_LOG([$_am_tar --version]) && break 1132 done 1133 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1134 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1135 am__untar="$_am_tar -xf -" 1136 ;; 1137 plaintar) 1138 # Must skip GNU tar: if it does not support --format= it doesn't create 1139 # ustar tarball either. 1140 (tar --version) >/dev/null 2>&1 && continue 1141 am__tar='tar chf - "$$tardir"' 1142 am__tar_='tar chf - "$tardir"' 1143 am__untar='tar xf -' 1144 ;; 1145 pax) 1146 am__tar='pax -L -x $1 -w "$$tardir"' 1147 am__tar_='pax -L -x $1 -w "$tardir"' 1148 am__untar='pax -r' 1149 ;; 1150 cpio) 1151 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1152 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1153 am__untar='cpio -i -H $1 -d' 1154 ;; 1155 none) 1156 am__tar=false 1157 am__tar_=false 1158 am__untar=false 1159 ;; 1160 esac 1161 1162 # If the value was cached, stop now. We just wanted to have am__tar 1163 # and am__untar set. 1164 test -n "${am_cv_prog_tar_$1}" && break 1165 1166 # tar/untar a dummy directory, and stop if the command works. 1167 rm -rf conftest.dir 1168 mkdir conftest.dir 1169 echo GrepMe > conftest.dir/file 1170 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1171 rm -rf conftest.dir 1172 if test -s conftest.tar; then 1173 AM_RUN_LOG([$am__untar <conftest.tar]) 1174 AM_RUN_LOG([cat conftest.dir/file]) 1175 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1176 fi 1177 done 1178 rm -rf conftest.dir 1179 1180 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1181 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1182 1183AC_SUBST([am__tar]) 1184AC_SUBST([am__untar]) 1185]) # _AM_PROG_TAR 1186 1187dnl Copyright 2005 Red Hat, Inc 1188dnl 1189dnl Permission to use, copy, modify, distribute, and sell this software and its 1190dnl documentation for any purpose is hereby granted without fee, provided that 1191dnl the above copyright notice appear in all copies and that both that 1192dnl copyright notice and this permission notice appear in supporting 1193dnl documentation. 1194dnl 1195dnl The above copyright notice and this permission notice shall be included 1196dnl in all copies or substantial portions of the Software. 1197dnl 1198dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1199dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1200dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1201dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1202dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1203dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1204dnl OTHER DEALINGS IN THE SOFTWARE. 1205dnl 1206dnl Except as contained in this notice, the name of the copyright holders shall 1207dnl not be used in advertising or otherwise to promote the sale, use or 1208dnl other dealings in this Software without prior written authorization 1209dnl from the copyright holders. 1210dnl 1211 1212# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 1213# -------------------------- 1214# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1215# is defined, then add the given PROTO to $REQUIRED_MODULES. 1216 1217AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1218 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1219 SAVE_CFLAGS="$CFLAGS" 1220 CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1221 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1222#include "xorg-server.h" 1223#if !defined $1 1224#error $1 not defined 1225#endif 1226 ]])], 1227 [_EXT_CHECK=yes], 1228 [_EXT_CHECK=no]) 1229 CFLAGS="$SAVE_CFLAGS" 1230 AC_MSG_CHECKING([if $1 is defined]) 1231 AC_MSG_RESULT([$_EXT_CHECK]) 1232 if test "$_EXT_CHECK" != no; then 1233 REQUIRED_MODULES="$REQUIRED_MODULES $2" 1234 fi 1235]) 1236 1237dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1238dnl serial 11 (pkg-config-0.29) 1239dnl 1240dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1241dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1242dnl 1243dnl This program is free software; you can redistribute it and/or modify 1244dnl it under the terms of the GNU General Public License as published by 1245dnl the Free Software Foundation; either version 2 of the License, or 1246dnl (at your option) any later version. 1247dnl 1248dnl This program is distributed in the hope that it will be useful, but 1249dnl WITHOUT ANY WARRANTY; without even the implied warranty of 1250dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1251dnl General Public License for more details. 1252dnl 1253dnl You should have received a copy of the GNU General Public License 1254dnl along with this program; if not, write to the Free Software 1255dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1256dnl 02111-1307, USA. 1257dnl 1258dnl As a special exception to the GNU General Public License, if you 1259dnl distribute this file as part of a program that contains a 1260dnl configuration script generated by Autoconf, you may include it under 1261dnl the same distribution terms that you use for the rest of that 1262dnl program. 1263 1264dnl PKG_PREREQ(MIN-VERSION) 1265dnl ----------------------- 1266dnl Since: 0.29 1267dnl 1268dnl Verify that the version of the pkg-config macros are at least 1269dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1270dnl installed version of pkg-config, this checks the developer's version 1271dnl of pkg.m4 when generating configure. 1272dnl 1273dnl To ensure that this macro is defined, also add: 1274dnl m4_ifndef([PKG_PREREQ], 1275dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1276dnl 1277dnl See the "Since" comment for each macro you use to see what version 1278dnl of the macros you require. 1279m4_defun([PKG_PREREQ], 1280[m4_define([PKG_MACROS_VERSION], [0.29]) 1281m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1282 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1283])dnl PKG_PREREQ 1284 1285dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1286dnl ---------------------------------- 1287dnl Since: 0.16 1288dnl 1289dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1290dnl first found in the path. Checks that the version of pkg-config found 1291dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1292dnl used since that's the first version where most current features of 1293dnl pkg-config existed. 1294AC_DEFUN([PKG_PROG_PKG_CONFIG], 1295[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1296m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1297m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1298AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1299AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1300AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1301 1302if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1303 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1304fi 1305if test -n "$PKG_CONFIG"; then 1306 _pkg_min_version=m4_default([$1], [0.9.0]) 1307 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1308 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1309 AC_MSG_RESULT([yes]) 1310 else 1311 AC_MSG_RESULT([no]) 1312 PKG_CONFIG="" 1313 fi 1314fi[]dnl 1315])dnl PKG_PROG_PKG_CONFIG 1316 1317dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1318dnl ------------------------------------------------------------------- 1319dnl Since: 0.18 1320dnl 1321dnl Check to see whether a particular set of modules exists. Similar to 1322dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1323dnl 1324dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1325dnl only at the first occurence in configure.ac, so if the first place 1326dnl it's called might be skipped (such as if it is within an "if", you 1327dnl have to call PKG_CHECK_EXISTS manually 1328AC_DEFUN([PKG_CHECK_EXISTS], 1329[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1330if test -n "$PKG_CONFIG" && \ 1331 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1332 m4_default([$2], [:]) 1333m4_ifvaln([$3], [else 1334 $3])dnl 1335fi]) 1336 1337dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1338dnl --------------------------------------------- 1339dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1340dnl pkg_failed based on the result. 1341m4_define([_PKG_CONFIG], 1342[if test -n "$$1"; then 1343 pkg_cv_[]$1="$$1" 1344 elif test -n "$PKG_CONFIG"; then 1345 PKG_CHECK_EXISTS([$3], 1346 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1347 test "x$?" != "x0" && pkg_failed=yes ], 1348 [pkg_failed=yes]) 1349 else 1350 pkg_failed=untried 1351fi[]dnl 1352])dnl _PKG_CONFIG 1353 1354dnl _PKG_SHORT_ERRORS_SUPPORTED 1355dnl --------------------------- 1356dnl Internal check to see if pkg-config supports short errors. 1357AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1358[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1359if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1360 _pkg_short_errors_supported=yes 1361else 1362 _pkg_short_errors_supported=no 1363fi[]dnl 1364])dnl _PKG_SHORT_ERRORS_SUPPORTED 1365 1366 1367dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1368dnl [ACTION-IF-NOT-FOUND]) 1369dnl -------------------------------------------------------------- 1370dnl Since: 0.4.0 1371dnl 1372dnl Note that if there is a possibility the first call to 1373dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1374dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1375AC_DEFUN([PKG_CHECK_MODULES], 1376[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1377AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1378AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1379 1380pkg_failed=no 1381AC_MSG_CHECKING([for $1]) 1382 1383_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1384_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1385 1386m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1387and $1[]_LIBS to avoid the need to call pkg-config. 1388See the pkg-config man page for more details.]) 1389 1390if test $pkg_failed = yes; then 1391 AC_MSG_RESULT([no]) 1392 _PKG_SHORT_ERRORS_SUPPORTED 1393 if test $_pkg_short_errors_supported = yes; then 1394 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1395 else 1396 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1397 fi 1398 # Put the nasty error message in config.log where it belongs 1399 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1400 1401 m4_default([$4], [AC_MSG_ERROR( 1402[Package requirements ($2) were not met: 1403 1404$$1_PKG_ERRORS 1405 1406Consider adjusting the PKG_CONFIG_PATH environment variable if you 1407installed software in a non-standard prefix. 1408 1409_PKG_TEXT])[]dnl 1410 ]) 1411elif test $pkg_failed = untried; then 1412 AC_MSG_RESULT([no]) 1413 m4_default([$4], [AC_MSG_FAILURE( 1414[The pkg-config script could not be found or is too old. Make sure it 1415is in your PATH or set the PKG_CONFIG environment variable to the full 1416path to pkg-config. 1417 1418_PKG_TEXT 1419 1420To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1421 ]) 1422else 1423 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1424 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1425 AC_MSG_RESULT([yes]) 1426 $3 1427fi[]dnl 1428])dnl PKG_CHECK_MODULES 1429 1430 1431dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1432dnl [ACTION-IF-NOT-FOUND]) 1433dnl --------------------------------------------------------------------- 1434dnl Since: 0.29 1435dnl 1436dnl Checks for existence of MODULES and gathers its build flags with 1437dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1438dnl and VARIABLE-PREFIX_LIBS from --libs. 1439dnl 1440dnl Note that if there is a possibility the first call to 1441dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1442dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1443dnl configure.ac. 1444AC_DEFUN([PKG_CHECK_MODULES_STATIC], 1445[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1446_save_PKG_CONFIG=$PKG_CONFIG 1447PKG_CONFIG="$PKG_CONFIG --static" 1448PKG_CHECK_MODULES($@) 1449PKG_CONFIG=$_save_PKG_CONFIG[]dnl 1450])dnl PKG_CHECK_MODULES_STATIC 1451 1452 1453dnl PKG_INSTALLDIR([DIRECTORY]) 1454dnl ------------------------- 1455dnl Since: 0.27 1456dnl 1457dnl Substitutes the variable pkgconfigdir as the location where a module 1458dnl should install pkg-config .pc files. By default the directory is 1459dnl $libdir/pkgconfig, but the default can be changed by passing 1460dnl DIRECTORY. The user can override through the --with-pkgconfigdir 1461dnl parameter. 1462AC_DEFUN([PKG_INSTALLDIR], 1463[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1464m4_pushdef([pkg_description], 1465 [pkg-config installation directory @<:@]pkg_default[@:>@]) 1466AC_ARG_WITH([pkgconfigdir], 1467 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1468 [with_pkgconfigdir=]pkg_default) 1469AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1470m4_popdef([pkg_default]) 1471m4_popdef([pkg_description]) 1472])dnl PKG_INSTALLDIR 1473 1474 1475dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1476dnl -------------------------------- 1477dnl Since: 0.27 1478dnl 1479dnl Substitutes the variable noarch_pkgconfigdir as the location where a 1480dnl module should install arch-independent pkg-config .pc files. By 1481dnl default the directory is $datadir/pkgconfig, but the default can be 1482dnl changed by passing DIRECTORY. The user can override through the 1483dnl --with-noarch-pkgconfigdir parameter. 1484AC_DEFUN([PKG_NOARCH_INSTALLDIR], 1485[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1486m4_pushdef([pkg_description], 1487 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1488AC_ARG_WITH([noarch-pkgconfigdir], 1489 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1490 [with_noarch_pkgconfigdir=]pkg_default) 1491AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1492m4_popdef([pkg_default]) 1493m4_popdef([pkg_description]) 1494])dnl PKG_NOARCH_INSTALLDIR 1495 1496 1497dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1498dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1499dnl ------------------------------------------- 1500dnl Since: 0.28 1501dnl 1502dnl Retrieves the value of the pkg-config variable for the given module. 1503AC_DEFUN([PKG_CHECK_VAR], 1504[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1505AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1506 1507_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1508AS_VAR_COPY([$1], [pkg_cv_][$1]) 1509 1510AS_VAR_IF([$1], [""], [$5], [$4])dnl 1511])dnl PKG_CHECK_VAR 1512 1513dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1514dnl 1515dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 1516dnl 1517dnl Permission is hereby granted, free of charge, to any person obtaining a 1518dnl copy of this software and associated documentation files (the "Software"), 1519dnl to deal in the Software without restriction, including without limitation 1520dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1521dnl and/or sell copies of the Software, and to permit persons to whom the 1522dnl Software is furnished to do so, subject to the following conditions: 1523dnl 1524dnl The above copyright notice and this permission notice (including the next 1525dnl paragraph) shall be included in all copies or substantial portions of the 1526dnl Software. 1527dnl 1528dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1529dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1530dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1531dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1532dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1533dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1534dnl DEALINGS IN THE SOFTWARE. 1535 1536# XORG_MACROS_VERSION(required-version) 1537# ------------------------------------- 1538# Minimum version: 1.1.0 1539# 1540# If you're using a macro added in Version 1.1 or newer, include this in 1541# your configure.ac with the minimum required version, such as: 1542# XORG_MACROS_VERSION(1.1) 1543# 1544# To ensure that this macro is defined, also add: 1545# m4_ifndef([XORG_MACROS_VERSION], 1546# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1547# 1548# 1549# See the "minimum version" comment for each macro you use to see what 1550# version you require. 1551m4_defun([XORG_MACROS_VERSION],[ 1552m4_define([vers_have], [1.20.0]) 1553m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1554m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1555m4_if(m4_cmp(maj_have, maj_needed), 0,, 1556 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1557m4_if(m4_version_compare(vers_have, [$1]), -1, 1558 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1559m4_undefine([vers_have]) 1560m4_undefine([maj_have]) 1561m4_undefine([maj_needed]) 1562]) # XORG_MACROS_VERSION 1563 1564# XORG_PROG_RAWCPP() 1565# ------------------ 1566# Minimum version: 1.0.0 1567# 1568# Find cpp program and necessary flags for use in pre-processing text files 1569# such as man pages and config files 1570AC_DEFUN([XORG_PROG_RAWCPP],[ 1571AC_REQUIRE([AC_PROG_CPP]) 1572AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1573 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1574 1575# Check for flag to avoid builtin definitions - assumes unix is predefined, 1576# which is not the best choice for supporting other OS'es, but covers most 1577# of the ones we need for now. 1578AC_MSG_CHECKING([if $RAWCPP requires -undef]) 1579AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1580if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1581 AC_MSG_RESULT([no]) 1582else 1583 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1584 RAWCPPFLAGS=-undef 1585 AC_MSG_RESULT([yes]) 1586 # under Cygwin unix is still defined even with -undef 1587 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1588 RAWCPPFLAGS="-undef -ansi" 1589 AC_MSG_RESULT([yes, with -ansi]) 1590 else 1591 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1592 fi 1593fi 1594rm -f conftest.$ac_ext 1595 1596AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1597AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1598if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1599 AC_MSG_RESULT([no]) 1600else 1601 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1602 TRADITIONALCPPFLAGS="-traditional" 1603 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1604 AC_MSG_RESULT([yes]) 1605 else 1606 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1607 fi 1608fi 1609rm -f conftest.$ac_ext 1610AC_SUBST(RAWCPPFLAGS) 1611AC_SUBST(TRADITIONALCPPFLAGS) 1612]) # XORG_PROG_RAWCPP 1613 1614# XORG_MANPAGE_SECTIONS() 1615# ----------------------- 1616# Minimum version: 1.0.0 1617# 1618# Determine which sections man pages go in for the different man page types 1619# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1620# Not sure if there's any better way than just hardcoding by OS name. 1621# Override default settings by setting environment variables 1622# Added MAN_SUBSTS in version 1.8 1623# Added AC_PROG_SED in version 1.8 1624 1625AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1626AC_REQUIRE([AC_CANONICAL_HOST]) 1627AC_REQUIRE([AC_PROG_SED]) 1628 1629case $host_os in 1630 solaris*) 1631 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1632 # check for a man page file found in later versions that use 1633 # traditional section numbers instead 1634 AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1635 [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1636 ;; 1637 *) SYSV_MAN_SECTIONS=false ;; 1638esac 1639 1640if test x$APP_MAN_SUFFIX = x ; then 1641 APP_MAN_SUFFIX=1 1642fi 1643if test x$APP_MAN_DIR = x ; then 1644 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1645fi 1646 1647if test x$LIB_MAN_SUFFIX = x ; then 1648 LIB_MAN_SUFFIX=3 1649fi 1650if test x$LIB_MAN_DIR = x ; then 1651 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1652fi 1653 1654if test x$FILE_MAN_SUFFIX = x ; then 1655 case $SYSV_MAN_SECTIONS in 1656 true) FILE_MAN_SUFFIX=4 ;; 1657 *) FILE_MAN_SUFFIX=5 ;; 1658 esac 1659fi 1660if test x$FILE_MAN_DIR = x ; then 1661 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1662fi 1663 1664if test x$MISC_MAN_SUFFIX = x ; then 1665 case $SYSV_MAN_SECTIONS in 1666 true) MISC_MAN_SUFFIX=5 ;; 1667 *) MISC_MAN_SUFFIX=7 ;; 1668 esac 1669fi 1670if test x$MISC_MAN_DIR = x ; then 1671 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1672fi 1673 1674if test x$DRIVER_MAN_SUFFIX = x ; then 1675 case $SYSV_MAN_SECTIONS in 1676 true) DRIVER_MAN_SUFFIX=7 ;; 1677 *) DRIVER_MAN_SUFFIX=4 ;; 1678 esac 1679fi 1680if test x$DRIVER_MAN_DIR = x ; then 1681 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1682fi 1683 1684if test x$ADMIN_MAN_SUFFIX = x ; then 1685 case $SYSV_MAN_SECTIONS in 1686 true) ADMIN_MAN_SUFFIX=1m ;; 1687 *) ADMIN_MAN_SUFFIX=8 ;; 1688 esac 1689fi 1690if test x$ADMIN_MAN_DIR = x ; then 1691 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1692fi 1693 1694 1695AC_SUBST([APP_MAN_SUFFIX]) 1696AC_SUBST([LIB_MAN_SUFFIX]) 1697AC_SUBST([FILE_MAN_SUFFIX]) 1698AC_SUBST([MISC_MAN_SUFFIX]) 1699AC_SUBST([DRIVER_MAN_SUFFIX]) 1700AC_SUBST([ADMIN_MAN_SUFFIX]) 1701AC_SUBST([APP_MAN_DIR]) 1702AC_SUBST([LIB_MAN_DIR]) 1703AC_SUBST([FILE_MAN_DIR]) 1704AC_SUBST([MISC_MAN_DIR]) 1705AC_SUBST([DRIVER_MAN_DIR]) 1706AC_SUBST([ADMIN_MAN_DIR]) 1707 1708XORG_MAN_PAGE="X Version 11" 1709AC_SUBST([XORG_MAN_PAGE]) 1710MAN_SUBSTS="\ 1711 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1712 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1713 -e 's|__xservername__|Xorg|g' \ 1714 -e 's|__xconfigfile__|xorg.conf|g' \ 1715 -e 's|__projectroot__|\$(prefix)|g' \ 1716 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1717 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1718 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1719 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1720 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1721 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1722 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1723AC_SUBST([MAN_SUBSTS]) 1724 1725]) # XORG_MANPAGE_SECTIONS 1726 1727# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1728# ------------------------ 1729# Minimum version: 1.7.0 1730# 1731# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1732# provided by xorg-sgml-doctools, if installed. 1733AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1734AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1735XORG_SGML_PATH= 1736PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1737 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1738 [m4_ifval([$1],[:], 1739 [if test x"$cross_compiling" != x"yes" ; then 1740 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1741 [XORG_SGML_PATH=$prefix/share/sgml]) 1742 fi]) 1743 ]) 1744 1745# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1746# the path and the name of the doc stylesheet 1747if test "x$XORG_SGML_PATH" != "x" ; then 1748 AC_MSG_RESULT([$XORG_SGML_PATH]) 1749 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1750 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1751else 1752 AC_MSG_RESULT([no]) 1753fi 1754 1755AC_SUBST(XORG_SGML_PATH) 1756AC_SUBST(STYLESHEET_SRCDIR) 1757AC_SUBST(XSL_STYLESHEET) 1758AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1759]) # XORG_CHECK_SGML_DOCTOOLS 1760 1761# XORG_CHECK_LINUXDOC 1762# ------------------- 1763# Minimum version: 1.0.0 1764# 1765# Defines the variable MAKE_TEXT if the necessary tools and 1766# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1767# Whether or not the necessary tools and files are found can be checked 1768# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1769AC_DEFUN([XORG_CHECK_LINUXDOC],[ 1770AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1771AC_REQUIRE([XORG_WITH_PS2PDF]) 1772 1773AC_PATH_PROG(LINUXDOC, linuxdoc) 1774 1775AC_MSG_CHECKING([whether to build documentation]) 1776 1777if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1778 BUILDDOC=yes 1779else 1780 BUILDDOC=no 1781fi 1782 1783AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1784 1785AC_MSG_RESULT([$BUILDDOC]) 1786 1787AC_MSG_CHECKING([whether to build pdf documentation]) 1788 1789if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1790 BUILDPDFDOC=yes 1791else 1792 BUILDPDFDOC=no 1793fi 1794 1795AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1796 1797AC_MSG_RESULT([$BUILDPDFDOC]) 1798 1799MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1800MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1801MAKE_PDF="$PS2PDF" 1802MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1803 1804AC_SUBST(MAKE_TEXT) 1805AC_SUBST(MAKE_PS) 1806AC_SUBST(MAKE_PDF) 1807AC_SUBST(MAKE_HTML) 1808]) # XORG_CHECK_LINUXDOC 1809 1810# XORG_CHECK_DOCBOOK 1811# ------------------- 1812# Minimum version: 1.0.0 1813# 1814# Checks for the ability to build output formats from SGML DocBook source. 1815# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1816# indicates whether the necessary tools and files are found and, if set, 1817# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1818AC_DEFUN([XORG_CHECK_DOCBOOK],[ 1819AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1820 1821BUILDTXTDOC=no 1822BUILDPDFDOC=no 1823BUILDPSDOC=no 1824BUILDHTMLDOC=no 1825 1826AC_PATH_PROG(DOCBOOKPS, docbook2ps) 1827AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1828AC_PATH_PROG(DOCBOOKHTML, docbook2html) 1829AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1830 1831AC_MSG_CHECKING([whether to build text documentation]) 1832if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1833 test x$BUILD_TXTDOC != xno; then 1834 BUILDTXTDOC=yes 1835fi 1836AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1837AC_MSG_RESULT([$BUILDTXTDOC]) 1838 1839AC_MSG_CHECKING([whether to build PDF documentation]) 1840if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1841 test x$BUILD_PDFDOC != xno; then 1842 BUILDPDFDOC=yes 1843fi 1844AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1845AC_MSG_RESULT([$BUILDPDFDOC]) 1846 1847AC_MSG_CHECKING([whether to build PostScript documentation]) 1848if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1849 test x$BUILD_PSDOC != xno; then 1850 BUILDPSDOC=yes 1851fi 1852AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1853AC_MSG_RESULT([$BUILDPSDOC]) 1854 1855AC_MSG_CHECKING([whether to build HTML documentation]) 1856if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1857 test x$BUILD_HTMLDOC != xno; then 1858 BUILDHTMLDOC=yes 1859fi 1860AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1861AC_MSG_RESULT([$BUILDHTMLDOC]) 1862 1863MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1864MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1865MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1866MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1867 1868AC_SUBST(MAKE_TEXT) 1869AC_SUBST(MAKE_PS) 1870AC_SUBST(MAKE_PDF) 1871AC_SUBST(MAKE_HTML) 1872]) # XORG_CHECK_DOCBOOK 1873 1874# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1875# ---------------- 1876# Minimum version: 1.5.0 1877# Minimum version for optional DEFAULT argument: 1.11.0 1878# 1879# Documentation tools are not always available on all platforms and sometimes 1880# not at the appropriate level. This macro enables a module to test for the 1881# presence of the tool and obtain it's path in separate variables. Coupled with 1882# the --with-xmlto option, it allows maximum flexibility in making decisions 1883# as whether or not to use the xmlto package. When DEFAULT is not specified, 1884# --with-xmlto assumes 'auto'. 1885# 1886# Interface to module: 1887# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1888# XMLTO: returns the path of the xmlto program found 1889# returns the path set by the user in the environment 1890# --with-xmlto: 'yes' user instructs the module to use xmlto 1891# 'no' user instructs the module not to use xmlto 1892# 1893# Added in version 1.10.0 1894# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1895# xmlto for text output requires either lynx, links, or w3m browsers 1896# 1897# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1898# 1899AC_DEFUN([XORG_WITH_XMLTO],[ 1900AC_ARG_VAR([XMLTO], [Path to xmlto command]) 1901m4_define([_defopt], m4_default([$2], [auto])) 1902AC_ARG_WITH(xmlto, 1903 AS_HELP_STRING([--with-xmlto], 1904 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1905 [use_xmlto=$withval], [use_xmlto=]_defopt) 1906m4_undefine([_defopt]) 1907 1908if test "x$use_xmlto" = x"auto"; then 1909 AC_PATH_PROG([XMLTO], [xmlto]) 1910 if test "x$XMLTO" = "x"; then 1911 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1912 have_xmlto=no 1913 else 1914 have_xmlto=yes 1915 fi 1916elif test "x$use_xmlto" = x"yes" ; then 1917 AC_PATH_PROG([XMLTO], [xmlto]) 1918 if test "x$XMLTO" = "x"; then 1919 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1920 fi 1921 have_xmlto=yes 1922elif test "x$use_xmlto" = x"no" ; then 1923 if test "x$XMLTO" != "x"; then 1924 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1925 fi 1926 have_xmlto=no 1927else 1928 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1929fi 1930 1931# Test for a minimum version of xmlto, if provided. 1932m4_ifval([$1], 1933[if test "$have_xmlto" = yes; then 1934 # scrape the xmlto version 1935 AC_MSG_CHECKING([the xmlto version]) 1936 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1937 AC_MSG_RESULT([$xmlto_version]) 1938 AS_VERSION_COMPARE([$xmlto_version], [$1], 1939 [if test "x$use_xmlto" = xauto; then 1940 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1941 have_xmlto=no 1942 else 1943 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1944 fi]) 1945fi]) 1946 1947# Test for the ability of xmlto to generate a text target 1948# 1949# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1950# following test for empty XML docbook files. 1951# For compatibility reasons use the following empty XML docbook file and if 1952# it fails try it again with a non-empty XML file. 1953have_xmlto_text=no 1954cat > conftest.xml << "EOF" 1955EOF 1956AS_IF([test "$have_xmlto" = yes], 1957 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1958 [have_xmlto_text=yes], 1959 [# Try it again with a non-empty XML file. 1960 cat > conftest.xml << "EOF" 1961<x></x> 1962EOF 1963 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1964 [have_xmlto_text=yes], 1965 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1966rm -f conftest.xml 1967AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1968AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1969]) # XORG_WITH_XMLTO 1970 1971# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1972# -------------------------------------------- 1973# Minimum version: 1.12.0 1974# Minimum version for optional DEFAULT argument: 1.12.0 1975# 1976# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1977# XML-based language used for the transformation of XML documents. 1978# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1979# It is used under the cover by xmlto to generate html files from DocBook/XML. 1980# The XSLT processor is often used as a standalone tool for transformations. 1981# It should not be assumed that this tool is used only to work with documnetation. 1982# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1983# 1984# Interface to module: 1985# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1986# XSLTPROC: returns the path of the xsltproc program found 1987# returns the path set by the user in the environment 1988# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1989# 'no' user instructs the module not to use xsltproc 1990# have_xsltproc: returns yes if xsltproc found in PATH or no 1991# 1992# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1993# 1994AC_DEFUN([XORG_WITH_XSLTPROC],[ 1995AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1996# Preserves the interface, should it be implemented later 1997m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1998m4_define([_defopt], m4_default([$2], [auto])) 1999AC_ARG_WITH(xsltproc, 2000 AS_HELP_STRING([--with-xsltproc], 2001 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 2002 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 2003m4_undefine([_defopt]) 2004 2005if test "x$use_xsltproc" = x"auto"; then 2006 AC_PATH_PROG([XSLTPROC], [xsltproc]) 2007 if test "x$XSLTPROC" = "x"; then 2008 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 2009 have_xsltproc=no 2010 else 2011 have_xsltproc=yes 2012 fi 2013elif test "x$use_xsltproc" = x"yes" ; then 2014 AC_PATH_PROG([XSLTPROC], [xsltproc]) 2015 if test "x$XSLTPROC" = "x"; then 2016 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 2017 fi 2018 have_xsltproc=yes 2019elif test "x$use_xsltproc" = x"no" ; then 2020 if test "x$XSLTPROC" != "x"; then 2021 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 2022 fi 2023 have_xsltproc=no 2024else 2025 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 2026fi 2027 2028AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 2029]) # XORG_WITH_XSLTPROC 2030 2031# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 2032# ---------------------------------------- 2033# Minimum version: 1.15.0 2034# 2035# PERL (Practical Extraction and Report Language) is a language optimized for 2036# scanning arbitrary text files, extracting information from those text files, 2037# and printing reports based on that information. 2038# 2039# When DEFAULT is not specified, --with-perl assumes 'auto'. 2040# 2041# Interface to module: 2042# HAVE_PERL: used in makefiles to conditionally scan text files 2043# PERL: returns the path of the perl program found 2044# returns the path set by the user in the environment 2045# --with-perl: 'yes' user instructs the module to use perl 2046# 'no' user instructs the module not to use perl 2047# have_perl: returns yes if perl found in PATH or no 2048# 2049# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 2050# 2051AC_DEFUN([XORG_WITH_PERL],[ 2052AC_ARG_VAR([PERL], [Path to perl command]) 2053# Preserves the interface, should it be implemented later 2054m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 2055m4_define([_defopt], m4_default([$2], [auto])) 2056AC_ARG_WITH(perl, 2057 AS_HELP_STRING([--with-perl], 2058 [Use perl for extracting information from files (default: ]_defopt[)]), 2059 [use_perl=$withval], [use_perl=]_defopt) 2060m4_undefine([_defopt]) 2061 2062if test "x$use_perl" = x"auto"; then 2063 AC_PATH_PROG([PERL], [perl]) 2064 if test "x$PERL" = "x"; then 2065 AC_MSG_WARN([perl not found - cannot extract information and report]) 2066 have_perl=no 2067 else 2068 have_perl=yes 2069 fi 2070elif test "x$use_perl" = x"yes" ; then 2071 AC_PATH_PROG([PERL], [perl]) 2072 if test "x$PERL" = "x"; then 2073 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 2074 fi 2075 have_perl=yes 2076elif test "x$use_perl" = x"no" ; then 2077 if test "x$PERL" != "x"; then 2078 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 2079 fi 2080 have_perl=no 2081else 2082 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 2083fi 2084 2085AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2086]) # XORG_WITH_PERL 2087 2088# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2089# ---------------- 2090# Minimum version: 1.5.0 2091# Minimum version for optional DEFAULT argument: 1.11.0 2092# 2093# Documentation tools are not always available on all platforms and sometimes 2094# not at the appropriate level. This macro enables a module to test for the 2095# presence of the tool and obtain it's path in separate variables. Coupled with 2096# the --with-asciidoc option, it allows maximum flexibility in making decisions 2097# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2098# --with-asciidoc assumes 'auto'. 2099# 2100# Interface to module: 2101# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2102# ASCIIDOC: returns the path of the asciidoc program found 2103# returns the path set by the user in the environment 2104# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2105# 'no' user instructs the module not to use asciidoc 2106# 2107# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2108# 2109AC_DEFUN([XORG_WITH_ASCIIDOC],[ 2110AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2111m4_define([_defopt], m4_default([$2], [auto])) 2112AC_ARG_WITH(asciidoc, 2113 AS_HELP_STRING([--with-asciidoc], 2114 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2115 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2116m4_undefine([_defopt]) 2117 2118if test "x$use_asciidoc" = x"auto"; then 2119 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2120 if test "x$ASCIIDOC" = "x"; then 2121 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2122 have_asciidoc=no 2123 else 2124 have_asciidoc=yes 2125 fi 2126elif test "x$use_asciidoc" = x"yes" ; then 2127 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2128 if test "x$ASCIIDOC" = "x"; then 2129 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2130 fi 2131 have_asciidoc=yes 2132elif test "x$use_asciidoc" = x"no" ; then 2133 if test "x$ASCIIDOC" != "x"; then 2134 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2135 fi 2136 have_asciidoc=no 2137else 2138 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2139fi 2140m4_ifval([$1], 2141[if test "$have_asciidoc" = yes; then 2142 # scrape the asciidoc version 2143 AC_MSG_CHECKING([the asciidoc version]) 2144 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2145 AC_MSG_RESULT([$asciidoc_version]) 2146 AS_VERSION_COMPARE([$asciidoc_version], [$1], 2147 [if test "x$use_asciidoc" = xauto; then 2148 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2149 have_asciidoc=no 2150 else 2151 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2152 fi]) 2153fi]) 2154AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2155]) # XORG_WITH_ASCIIDOC 2156 2157# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2158# ------------------------------------------- 2159# Minimum version: 1.5.0 2160# Minimum version for optional DEFAULT argument: 1.11.0 2161# Minimum version for optional DOT checking: 1.18.0 2162# 2163# Documentation tools are not always available on all platforms and sometimes 2164# not at the appropriate level. This macro enables a module to test for the 2165# presence of the tool and obtain it's path in separate variables. Coupled with 2166# the --with-doxygen option, it allows maximum flexibility in making decisions 2167# as whether or not to use the doxygen package. When DEFAULT is not specified, 2168# --with-doxygen assumes 'auto'. 2169# 2170# Interface to module: 2171# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2172# DOXYGEN: returns the path of the doxygen program found 2173# returns the path set by the user in the environment 2174# --with-doxygen: 'yes' user instructs the module to use doxygen 2175# 'no' user instructs the module not to use doxygen 2176# 2177# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2178# 2179AC_DEFUN([XORG_WITH_DOXYGEN],[ 2180AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2181AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2182m4_define([_defopt], m4_default([$2], [auto])) 2183AC_ARG_WITH(doxygen, 2184 AS_HELP_STRING([--with-doxygen], 2185 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2186 [use_doxygen=$withval], [use_doxygen=]_defopt) 2187m4_undefine([_defopt]) 2188 2189if test "x$use_doxygen" = x"auto"; then 2190 AC_PATH_PROG([DOXYGEN], [doxygen]) 2191 if test "x$DOXYGEN" = "x"; then 2192 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2193 have_doxygen=no 2194 else 2195 have_doxygen=yes 2196 fi 2197elif test "x$use_doxygen" = x"yes" ; then 2198 AC_PATH_PROG([DOXYGEN], [doxygen]) 2199 if test "x$DOXYGEN" = "x"; then 2200 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2201 fi 2202 have_doxygen=yes 2203elif test "x$use_doxygen" = x"no" ; then 2204 if test "x$DOXYGEN" != "x"; then 2205 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2206 fi 2207 have_doxygen=no 2208else 2209 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2210fi 2211m4_ifval([$1], 2212[if test "$have_doxygen" = yes; then 2213 # scrape the doxygen version 2214 AC_MSG_CHECKING([the doxygen version]) 2215 doxygen_version=`$DOXYGEN --version 2>/dev/null` 2216 AC_MSG_RESULT([$doxygen_version]) 2217 AS_VERSION_COMPARE([$doxygen_version], [$1], 2218 [if test "x$use_doxygen" = xauto; then 2219 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2220 have_doxygen=no 2221 else 2222 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2223 fi]) 2224fi]) 2225 2226dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2227dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2228dnl HAVE_DOT = @HAVE_DOT@ 2229HAVE_DOT=no 2230if test "x$have_doxygen" = "xyes"; then 2231 AC_PATH_PROG([DOT], [dot]) 2232 if test "x$DOT" != "x"; then 2233 HAVE_DOT=yes 2234 fi 2235fi 2236 2237AC_SUBST([HAVE_DOT]) 2238AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2239AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2240]) # XORG_WITH_DOXYGEN 2241 2242# XORG_WITH_GROFF([DEFAULT]) 2243# ---------------- 2244# Minimum version: 1.6.0 2245# Minimum version for optional DEFAULT argument: 1.11.0 2246# 2247# Documentation tools are not always available on all platforms and sometimes 2248# not at the appropriate level. This macro enables a module to test for the 2249# presence of the tool and obtain it's path in separate variables. Coupled with 2250# the --with-groff option, it allows maximum flexibility in making decisions 2251# as whether or not to use the groff package. When DEFAULT is not specified, 2252# --with-groff assumes 'auto'. 2253# 2254# Interface to module: 2255# HAVE_GROFF: used in makefiles to conditionally generate documentation 2256# HAVE_GROFF_MM: the memorandum macros (-mm) package 2257# HAVE_GROFF_MS: the -ms macros package 2258# GROFF: returns the path of the groff program found 2259# returns the path set by the user in the environment 2260# --with-groff: 'yes' user instructs the module to use groff 2261# 'no' user instructs the module not to use groff 2262# 2263# Added in version 1.9.0: 2264# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2265# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2266# psselect from the psutils package. 2267# the ghostcript package. Refer to the grohtml man pages 2268# 2269# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2270# 2271# OS and distros often splits groff in a basic and full package, the former 2272# having the groff program and the later having devices, fonts and macros 2273# Checking for the groff executable is not enough. 2274# 2275# If macros are missing, we cannot assume that groff is useless, so we don't 2276# unset HAVE_GROFF or GROFF env variables. 2277# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2278# 2279AC_DEFUN([XORG_WITH_GROFF],[ 2280AC_ARG_VAR([GROFF], [Path to groff command]) 2281m4_define([_defopt], m4_default([$1], [auto])) 2282AC_ARG_WITH(groff, 2283 AS_HELP_STRING([--with-groff], 2284 [Use groff to regenerate documentation (default: ]_defopt[)]), 2285 [use_groff=$withval], [use_groff=]_defopt) 2286m4_undefine([_defopt]) 2287 2288if test "x$use_groff" = x"auto"; then 2289 AC_PATH_PROG([GROFF], [groff]) 2290 if test "x$GROFF" = "x"; then 2291 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2292 have_groff=no 2293 else 2294 have_groff=yes 2295 fi 2296elif test "x$use_groff" = x"yes" ; then 2297 AC_PATH_PROG([GROFF], [groff]) 2298 if test "x$GROFF" = "x"; then 2299 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2300 fi 2301 have_groff=yes 2302elif test "x$use_groff" = x"no" ; then 2303 if test "x$GROFF" != "x"; then 2304 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2305 fi 2306 have_groff=no 2307else 2308 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2309fi 2310 2311# We have groff, test for the presence of the macro packages 2312if test "x$have_groff" = x"yes"; then 2313 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2314 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2315 groff_ms_works=yes 2316 else 2317 groff_ms_works=no 2318 fi 2319 AC_MSG_RESULT([$groff_ms_works]) 2320 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2321 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2322 groff_mm_works=yes 2323 else 2324 groff_mm_works=no 2325 fi 2326 AC_MSG_RESULT([$groff_mm_works]) 2327fi 2328 2329# We have groff, test for HTML dependencies, one command per package 2330if test "x$have_groff" = x"yes"; then 2331 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2332 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2333 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2334 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2335 have_groff_html=yes 2336 else 2337 have_groff_html=no 2338 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2339 fi 2340fi 2341 2342# Set Automake conditionals for Makefiles 2343AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2344AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2345AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2346AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2347]) # XORG_WITH_GROFF 2348 2349# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2350# --------------------------------------- 2351# Minimum version: 1.6.0 2352# Minimum version for optional DEFAULT argument: 1.11.0 2353# Minimum version for optional MIN-VERSION argument: 1.15.0 2354# 2355# Documentation tools are not always available on all platforms and sometimes 2356# not at the appropriate level. This macro enables a module to test for the 2357# presence of the tool and obtain it's path in separate variables. Coupled with 2358# the --with-fop option, it allows maximum flexibility in making decisions 2359# as whether or not to use the fop package. When DEFAULT is not specified, 2360# --with-fop assumes 'auto'. 2361# 2362# Interface to module: 2363# HAVE_FOP: used in makefiles to conditionally generate documentation 2364# FOP: returns the path of the fop program found 2365# returns the path set by the user in the environment 2366# --with-fop: 'yes' user instructs the module to use fop 2367# 'no' user instructs the module not to use fop 2368# 2369# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2370# 2371AC_DEFUN([XORG_WITH_FOP],[ 2372AC_ARG_VAR([FOP], [Path to fop command]) 2373m4_define([_defopt], m4_default([$2], [auto])) 2374AC_ARG_WITH(fop, 2375 AS_HELP_STRING([--with-fop], 2376 [Use fop to regenerate documentation (default: ]_defopt[)]), 2377 [use_fop=$withval], [use_fop=]_defopt) 2378m4_undefine([_defopt]) 2379 2380if test "x$use_fop" = x"auto"; then 2381 AC_PATH_PROG([FOP], [fop]) 2382 if test "x$FOP" = "x"; then 2383 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2384 have_fop=no 2385 else 2386 have_fop=yes 2387 fi 2388elif test "x$use_fop" = x"yes" ; then 2389 AC_PATH_PROG([FOP], [fop]) 2390 if test "x$FOP" = "x"; then 2391 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2392 fi 2393 have_fop=yes 2394elif test "x$use_fop" = x"no" ; then 2395 if test "x$FOP" != "x"; then 2396 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2397 fi 2398 have_fop=no 2399else 2400 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2401fi 2402 2403# Test for a minimum version of fop, if provided. 2404m4_ifval([$1], 2405[if test "$have_fop" = yes; then 2406 # scrape the fop version 2407 AC_MSG_CHECKING([for fop minimum version]) 2408 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2409 AC_MSG_RESULT([$fop_version]) 2410 AS_VERSION_COMPARE([$fop_version], [$1], 2411 [if test "x$use_fop" = xauto; then 2412 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2413 have_fop=no 2414 else 2415 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2416 fi]) 2417fi]) 2418AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2419]) # XORG_WITH_FOP 2420 2421# XORG_WITH_M4([MIN-VERSION]) 2422# --------------------------- 2423# Minimum version: 1.19.0 2424# 2425# This macro attempts to locate an m4 macro processor which supports 2426# -I option and is only useful for modules relying on M4 in order to 2427# expand macros in source code files. 2428# 2429# Interface to module: 2430# M4: returns the path of the m4 program found 2431# returns the path set by the user in the environment 2432# 2433AC_DEFUN([XORG_WITH_M4], [ 2434AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2435 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2436 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2437 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2438 [AC_MSG_ERROR([could not find m4 that supports -I option])], 2439 [$PATH:/usr/gnu/bin])]) 2440 2441AC_SUBST([M4], [$ac_cv_path_M4]) 2442]) # XORG_WITH_M4 2443 2444# XORG_WITH_PS2PDF([DEFAULT]) 2445# ---------------- 2446# Minimum version: 1.6.0 2447# Minimum version for optional DEFAULT argument: 1.11.0 2448# 2449# Documentation tools are not always available on all platforms and sometimes 2450# not at the appropriate level. This macro enables a module to test for the 2451# presence of the tool and obtain it's path in separate variables. Coupled with 2452# the --with-ps2pdf option, it allows maximum flexibility in making decisions 2453# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2454# --with-ps2pdf assumes 'auto'. 2455# 2456# Interface to module: 2457# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2458# PS2PDF: returns the path of the ps2pdf program found 2459# returns the path set by the user in the environment 2460# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2461# 'no' user instructs the module not to use ps2pdf 2462# 2463# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2464# 2465AC_DEFUN([XORG_WITH_PS2PDF],[ 2466AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2467m4_define([_defopt], m4_default([$1], [auto])) 2468AC_ARG_WITH(ps2pdf, 2469 AS_HELP_STRING([--with-ps2pdf], 2470 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2471 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2472m4_undefine([_defopt]) 2473 2474if test "x$use_ps2pdf" = x"auto"; then 2475 AC_PATH_PROG([PS2PDF], [ps2pdf]) 2476 if test "x$PS2PDF" = "x"; then 2477 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2478 have_ps2pdf=no 2479 else 2480 have_ps2pdf=yes 2481 fi 2482elif test "x$use_ps2pdf" = x"yes" ; then 2483 AC_PATH_PROG([PS2PDF], [ps2pdf]) 2484 if test "x$PS2PDF" = "x"; then 2485 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2486 fi 2487 have_ps2pdf=yes 2488elif test "x$use_ps2pdf" = x"no" ; then 2489 if test "x$PS2PDF" != "x"; then 2490 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2491 fi 2492 have_ps2pdf=no 2493else 2494 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2495fi 2496AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2497]) # XORG_WITH_PS2PDF 2498 2499# XORG_ENABLE_DOCS (enable_docs=yes) 2500# ---------------- 2501# Minimum version: 1.6.0 2502# 2503# Documentation tools are not always available on all platforms and sometimes 2504# not at the appropriate level. This macro enables a builder to skip all 2505# documentation targets except traditional man pages. 2506# Combined with the specific tool checking macros XORG_WITH_*, it provides 2507# maximum flexibility in controlling documentation building. 2508# Refer to: 2509# XORG_WITH_XMLTO --with-xmlto 2510# XORG_WITH_ASCIIDOC --with-asciidoc 2511# XORG_WITH_DOXYGEN --with-doxygen 2512# XORG_WITH_FOP --with-fop 2513# XORG_WITH_GROFF --with-groff 2514# XORG_WITH_PS2PDF --with-ps2pdf 2515# 2516# Interface to module: 2517# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2518# --enable-docs: 'yes' user instructs the module to generate docs 2519# 'no' user instructs the module not to generate docs 2520# parm1: specify the default value, yes or no. 2521# 2522AC_DEFUN([XORG_ENABLE_DOCS],[ 2523m4_define([docs_default], m4_default([$1], [yes])) 2524AC_ARG_ENABLE(docs, 2525 AS_HELP_STRING([--enable-docs], 2526 [Enable building the documentation (default: ]docs_default[)]), 2527 [build_docs=$enableval], [build_docs=]docs_default) 2528m4_undefine([docs_default]) 2529AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2530AC_MSG_CHECKING([whether to build documentation]) 2531AC_MSG_RESULT([$build_docs]) 2532]) # XORG_ENABLE_DOCS 2533 2534# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2535# ---------------- 2536# Minimum version: 1.6.0 2537# 2538# This macro enables a builder to skip all developer documentation. 2539# Combined with the specific tool checking macros XORG_WITH_*, it provides 2540# maximum flexibility in controlling documentation building. 2541# Refer to: 2542# XORG_WITH_XMLTO --with-xmlto 2543# XORG_WITH_ASCIIDOC --with-asciidoc 2544# XORG_WITH_DOXYGEN --with-doxygen 2545# XORG_WITH_FOP --with-fop 2546# XORG_WITH_GROFF --with-groff 2547# XORG_WITH_PS2PDF --with-ps2pdf 2548# 2549# Interface to module: 2550# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2551# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2552# 'no' user instructs the module not to generate developer docs 2553# parm1: specify the default value, yes or no. 2554# 2555AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2556m4_define([devel_default], m4_default([$1], [yes])) 2557AC_ARG_ENABLE(devel-docs, 2558 AS_HELP_STRING([--enable-devel-docs], 2559 [Enable building the developer documentation (default: ]devel_default[)]), 2560 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2561m4_undefine([devel_default]) 2562AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2563AC_MSG_CHECKING([whether to build developer documentation]) 2564AC_MSG_RESULT([$build_devel_docs]) 2565]) # XORG_ENABLE_DEVEL_DOCS 2566 2567# XORG_ENABLE_SPECS (enable_specs=yes) 2568# ---------------- 2569# Minimum version: 1.6.0 2570# 2571# This macro enables a builder to skip all functional specification targets. 2572# Combined with the specific tool checking macros XORG_WITH_*, it provides 2573# maximum flexibility in controlling documentation building. 2574# Refer to: 2575# XORG_WITH_XMLTO --with-xmlto 2576# XORG_WITH_ASCIIDOC --with-asciidoc 2577# XORG_WITH_DOXYGEN --with-doxygen 2578# XORG_WITH_FOP --with-fop 2579# XORG_WITH_GROFF --with-groff 2580# XORG_WITH_PS2PDF --with-ps2pdf 2581# 2582# Interface to module: 2583# ENABLE_SPECS: used in makefiles to conditionally generate specs 2584# --enable-specs: 'yes' user instructs the module to generate specs 2585# 'no' user instructs the module not to generate specs 2586# parm1: specify the default value, yes or no. 2587# 2588AC_DEFUN([XORG_ENABLE_SPECS],[ 2589m4_define([spec_default], m4_default([$1], [yes])) 2590AC_ARG_ENABLE(specs, 2591 AS_HELP_STRING([--enable-specs], 2592 [Enable building the specs (default: ]spec_default[)]), 2593 [build_specs=$enableval], [build_specs=]spec_default) 2594m4_undefine([spec_default]) 2595AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2596AC_MSG_CHECKING([whether to build functional specifications]) 2597AC_MSG_RESULT([$build_specs]) 2598]) # XORG_ENABLE_SPECS 2599 2600# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2601# ---------------------------------------------- 2602# Minimum version: 1.13.0 2603# 2604# This macro enables a builder to enable/disable unit testing 2605# It makes no assumption about the test cases implementation 2606# Test cases may or may not use Automake "Support for test suites" 2607# They may or may not use the software utility library GLib 2608# 2609# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2610# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2611# The variable enable_unit_tests is used by other macros in this file. 2612# 2613# Interface to module: 2614# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2615# enable_unit_tests: used in configure.ac for additional configuration 2616# --enable-unit-tests: 'yes' user instructs the module to build tests 2617# 'no' user instructs the module not to build tests 2618# parm1: specify the default value, yes or no. 2619# 2620AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2621AC_BEFORE([$0], [XORG_WITH_GLIB]) 2622AC_BEFORE([$0], [XORG_LD_WRAP]) 2623AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2624m4_define([_defopt], m4_default([$1], [auto])) 2625AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2626 [Enable building unit test cases (default: ]_defopt[)]), 2627 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2628m4_undefine([_defopt]) 2629AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2630AC_MSG_CHECKING([whether to build unit test cases]) 2631AC_MSG_RESULT([$enable_unit_tests]) 2632]) # XORG_ENABLE_UNIT_TESTS 2633 2634# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2635# ------------------------------------------------------ 2636# Minimum version: 1.17.0 2637# 2638# This macro enables a builder to enable/disable integration testing 2639# It makes no assumption about the test cases' implementation 2640# Test cases may or may not use Automake "Support for test suites" 2641# 2642# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2643# usually requires less dependencies and may be built and run under less 2644# stringent environments than integration tests. 2645# 2646# Interface to module: 2647# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2648# enable_integration_tests: used in configure.ac for additional configuration 2649# --enable-integration-tests: 'yes' user instructs the module to build tests 2650# 'no' user instructs the module not to build tests 2651# parm1: specify the default value, yes or no. 2652# 2653AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2654AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2655m4_define([_defopt], m4_default([$1], [auto])) 2656AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2657 [Enable building integration test cases (default: ]_defopt[)]), 2658 [enable_integration_tests=$enableval], 2659 [enable_integration_tests=]_defopt) 2660m4_undefine([_defopt]) 2661AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2662 [test "x$enable_integration_tests" != xno]) 2663AC_MSG_CHECKING([whether to build unit test cases]) 2664AC_MSG_RESULT([$enable_integration_tests]) 2665]) # XORG_ENABLE_INTEGRATION_TESTS 2666 2667# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2668# ---------------------------------------- 2669# Minimum version: 1.13.0 2670# 2671# GLib is a library which provides advanced data structures and functions. 2672# This macro enables a module to test for the presence of Glib. 2673# 2674# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2675# Otherwise the value of $enable_unit_tests is blank. 2676# 2677# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2678# test support usually requires less dependencies and may be built and run under 2679# less stringent environments than integration tests. 2680# 2681# Interface to module: 2682# HAVE_GLIB: used in makefiles to conditionally build targets 2683# with_glib: used in configure.ac to know if GLib has been found 2684# --with-glib: 'yes' user instructs the module to use glib 2685# 'no' user instructs the module not to use glib 2686# 2687AC_DEFUN([XORG_WITH_GLIB],[ 2688AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2689m4_define([_defopt], m4_default([$2], [auto])) 2690AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2691 [Use GLib library for unit testing (default: ]_defopt[)]), 2692 [with_glib=$withval], [with_glib=]_defopt) 2693m4_undefine([_defopt]) 2694 2695have_glib=no 2696# Do not probe GLib if user explicitly disabled unit testing 2697if test "x$enable_unit_tests" != x"no"; then 2698 # Do not probe GLib if user explicitly disabled it 2699 if test "x$with_glib" != x"no"; then 2700 m4_ifval( 2701 [$1], 2702 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2703 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2704 ) 2705 fi 2706fi 2707 2708# Not having GLib when unit testing has been explicitly requested is an error 2709if test "x$enable_unit_tests" = x"yes"; then 2710 if test "x$have_glib" = x"no"; then 2711 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2712 fi 2713fi 2714 2715# Having unit testing disabled when GLib has been explicitly requested is an error 2716if test "x$enable_unit_tests" = x"no"; then 2717 if test "x$with_glib" = x"yes"; then 2718 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2719 fi 2720fi 2721 2722# Not having GLib when it has been explicitly requested is an error 2723if test "x$with_glib" = x"yes"; then 2724 if test "x$have_glib" = x"no"; then 2725 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2726 fi 2727fi 2728 2729AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2730]) # XORG_WITH_GLIB 2731 2732# XORG_LD_WRAP([required|optional]) 2733# --------------------------------- 2734# Minimum version: 1.13.0 2735# 2736# Check if linker supports -wrap, passed via compiler flags 2737# 2738# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2739# Otherwise the value of $enable_unit_tests is blank. 2740# 2741# Argument added in 1.16.0 - default is "required", to match existing behavior 2742# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2743# available, an argument of "optional" allows use when some unit tests require 2744# ld -wrap and others do not. 2745# 2746AC_DEFUN([XORG_LD_WRAP],[ 2747XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2748 [AC_LANG_PROGRAM([#include <stdlib.h> 2749 void __wrap_exit(int status) { return; }], 2750 [exit(0);])]) 2751# Not having ld wrap when unit testing has been explicitly requested is an error 2752if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2753 if test "x$have_ld_wrap" = x"no"; then 2754 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2755 fi 2756fi 2757AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2758# 2759]) # XORG_LD_WRAP 2760 2761# XORG_CHECK_LINKER_FLAGS 2762# ----------------------- 2763# SYNOPSIS 2764# 2765# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2766# 2767# DESCRIPTION 2768# 2769# Check whether the given linker FLAGS work with the current language's 2770# linker, or whether they give an error. 2771# 2772# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2773# success/failure. 2774# 2775# PROGRAM-SOURCE is the program source to link with, if needed 2776# 2777# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2778# 2779# LICENSE 2780# 2781# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2782# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2783# Copyright (c) 2009 Matteo Frigo 2784# 2785# This program is free software: you can redistribute it and/or modify it 2786# under the terms of the GNU General Public License as published by the 2787# Free Software Foundation, either version 3 of the License, or (at your 2788# option) any later version. 2789# 2790# This program is distributed in the hope that it will be useful, but 2791# WITHOUT ANY WARRANTY; without even the implied warranty of 2792# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2793# Public License for more details. 2794# 2795# You should have received a copy of the GNU General Public License along 2796# with this program. If not, see <http://www.gnu.org/licenses/>. 2797# 2798# As a special exception, the respective Autoconf Macro's copyright owner 2799# gives unlimited permission to copy, distribute and modify the configure 2800# scripts that are the output of Autoconf when processing the Macro. You 2801# need not follow the terms of the GNU General Public License when using 2802# or distributing such scripts, even though portions of the text of the 2803# Macro appear in them. The GNU General Public License (GPL) does govern 2804# all other use of the material that constitutes the Autoconf Macro. 2805# 2806# This special exception to the GPL applies to versions of the Autoconf 2807# Macro released by the Autoconf Archive. When you make and distribute a 2808# modified version of the Autoconf Macro, you may extend this special 2809# exception to the GPL to apply to your modified version as well.# 2810AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2811[AC_MSG_CHECKING([whether the linker accepts $1]) 2812dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2813AS_LITERAL_IF([$1], 2814 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2815 ax_save_FLAGS=$LDFLAGS 2816 LDFLAGS="$1" 2817 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2818 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2819 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2820 LDFLAGS=$ax_save_FLAGS])], 2821 [ax_save_FLAGS=$LDFLAGS 2822 LDFLAGS="$1" 2823 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2824 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2825 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2826 LDFLAGS=$ax_save_FLAGS]) 2827eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2828AC_MSG_RESULT($xorg_check_linker_flags) 2829if test "x$xorg_check_linker_flags" = xyes; then 2830 m4_default([$2], :) 2831else 2832 m4_default([$3], :) 2833fi 2834]) # XORG_CHECK_LINKER_FLAGS 2835 2836# XORG_MEMORY_CHECK_FLAGS 2837# ----------------------- 2838# Minimum version: 1.16.0 2839# 2840# This macro attempts to find appropriate memory checking functionality 2841# for various platforms which unit testing code may use to catch various 2842# forms of memory allocation and access errors in testing. 2843# 2844# Interface to module: 2845# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2846# Usually added to TESTS_ENVIRONMENT in Makefile.am 2847# 2848# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2849# 2850AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2851 2852AC_REQUIRE([AC_CANONICAL_HOST]) 2853AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2854 [Environment variables to enable memory checking in tests]) 2855 2856# Check for different types of support on different platforms 2857case $host_os in 2858 solaris*) 2859 AC_CHECK_LIB([umem], [umem_alloc], 2860 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2861 ;; 2862 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2863 # both directly and inverted, so should not be 0 or 255. 2864 malloc_debug_env='MALLOC_PERTURB_=15' 2865 ;; 2866 darwin*) 2867 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2868 ;; 2869 *bsd*) 2870 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2871 ;; 2872esac 2873 2874# User supplied flags override default flags 2875if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2876 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2877fi 2878 2879AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2880]) # XORG_WITH_LINT 2881 2882# XORG_CHECK_MALLOC_ZERO 2883# ---------------------- 2884# Minimum version: 1.0.0 2885# 2886# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2887# malloc(0) returns NULL. Packages should add one of these cflags to 2888# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2889AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2890AC_ARG_ENABLE(malloc0returnsnull, 2891 AS_HELP_STRING([--enable-malloc0returnsnull], 2892 [malloc(0) returns NULL (default: auto)]), 2893 [MALLOC_ZERO_RETURNS_NULL=$enableval], 2894 [MALLOC_ZERO_RETURNS_NULL=auto]) 2895 2896AC_MSG_CHECKING([whether malloc(0) returns NULL]) 2897if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2898AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2899 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2900#include <stdlib.h> 2901],[ 2902 char *m0, *r0, *c0, *p; 2903 m0 = malloc(0); 2904 p = malloc(10); 2905 r0 = realloc(p,0); 2906 c0 = calloc(0,10); 2907 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2908])], 2909 [xorg_cv_malloc0_returns_null=yes], 2910 [xorg_cv_malloc0_returns_null=no])]) 2911MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2912fi 2913AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2914 2915if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2916 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2917 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2918 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2919else 2920 MALLOC_ZERO_CFLAGS="" 2921 XMALLOC_ZERO_CFLAGS="" 2922 XTMALLOC_ZERO_CFLAGS="" 2923fi 2924 2925AC_SUBST([MALLOC_ZERO_CFLAGS]) 2926AC_SUBST([XMALLOC_ZERO_CFLAGS]) 2927AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2928]) # XORG_CHECK_MALLOC_ZERO 2929 2930# XORG_WITH_LINT() 2931# ---------------- 2932# Minimum version: 1.1.0 2933# 2934# This macro enables the use of a tool that flags some suspicious and 2935# non-portable constructs (likely to be bugs) in C language source code. 2936# It will attempt to locate the tool and use appropriate options. 2937# There are various lint type tools on different platforms. 2938# 2939# Interface to module: 2940# LINT: returns the path to the tool found on the platform 2941# or the value set to LINT on the configure cmd line 2942# also an Automake conditional 2943# LINT_FLAGS: an Automake variable with appropriate flags 2944# 2945# --with-lint: 'yes' user instructs the module to use lint 2946# 'no' user instructs the module not to use lint (default) 2947# 2948# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2949# If the user sets the value of LINT_FLAGS, they are used verbatim. 2950# 2951AC_DEFUN([XORG_WITH_LINT],[ 2952 2953AC_ARG_VAR([LINT], [Path to a lint-style command]) 2954AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2955AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2956 [Use a lint-style source code checker (default: disabled)])], 2957 [use_lint=$withval], [use_lint=no]) 2958 2959# Obtain platform specific info like program name and options 2960# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2961case $host_os in 2962 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2963 lint_name=splint 2964 lint_options="-badflag" 2965 ;; 2966 *freebsd* | *netbsd*) 2967 lint_name=lint 2968 lint_options="-u -b" 2969 ;; 2970 *solaris*) 2971 lint_name=lint 2972 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2973 ;; 2974esac 2975 2976# Test for the presence of the program (either guessed by the code or spelled out by the user) 2977if test "x$use_lint" = x"yes" ; then 2978 AC_PATH_PROG([LINT], [$lint_name]) 2979 if test "x$LINT" = "x"; then 2980 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2981 fi 2982elif test "x$use_lint" = x"no" ; then 2983 if test "x$LINT" != "x"; then 2984 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2985 fi 2986else 2987 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2988fi 2989 2990# User supplied flags override default flags 2991if test "x$LINT_FLAGS" != "x"; then 2992 lint_options=$LINT_FLAGS 2993fi 2994 2995AC_SUBST([LINT_FLAGS],[$lint_options]) 2996AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2997 2998]) # XORG_WITH_LINT 2999 3000# XORG_LINT_LIBRARY(LIBNAME) 3001# -------------------------- 3002# Minimum version: 1.1.0 3003# 3004# Sets up flags for building lint libraries for checking programs that call 3005# functions in the library. 3006# 3007# Interface to module: 3008# LINTLIB - Automake variable with the name of lint library file to make 3009# MAKE_LINT_LIB - Automake conditional 3010# 3011# --enable-lint-library: - 'yes' user instructs the module to created a lint library 3012# - 'no' user instructs the module not to create a lint library (default) 3013 3014AC_DEFUN([XORG_LINT_LIBRARY],[ 3015AC_REQUIRE([XORG_WITH_LINT]) 3016AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 3017 [Create lint library (default: disabled)])], 3018 [make_lint_lib=$enableval], [make_lint_lib=no]) 3019 3020if test "x$make_lint_lib" = x"yes" ; then 3021 LINTLIB=llib-l$1.ln 3022 if test "x$LINT" = "x"; then 3023 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 3024 fi 3025elif test "x$make_lint_lib" != x"no" ; then 3026 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 3027fi 3028 3029AC_SUBST(LINTLIB) 3030AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 3031 3032]) # XORG_LINT_LIBRARY 3033 3034# XORG_COMPILER_BRAND 3035# ------------------- 3036# Minimum version: 1.14.0 3037# 3038# Checks for various brands of compilers and sets flags as appropriate: 3039# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 3040# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 3041# clang compiler - sets CLANGCC to "yes" 3042# Intel compiler - sets INTELCC to "yes" 3043# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 3044# 3045AC_DEFUN([XORG_COMPILER_BRAND], [ 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 ], 3054 [C++], [ 3055 AC_REQUIRE([AC_PROG_CXX]) 3056 ] 3057) 3058AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 3059AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 3060AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 3061]) # XORG_COMPILER_BRAND 3062 3063# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 3064# --------------- 3065# Minimum version: 1.16.0 3066# 3067# Test if the compiler works when passed the given flag as a command line argument. 3068# If it succeeds, the flag is appended to the given variable. If not, it tries the 3069# next flag in the list until there are no more options. 3070# 3071# Note that this does not guarantee that the compiler supports the flag as some 3072# compilers will simply ignore arguments that they do not understand, but we do 3073# attempt to weed out false positives by using -Werror=unknown-warning-option and 3074# -Werror=unused-command-line-argument 3075# 3076AC_DEFUN([XORG_TESTSET_CFLAG], [ 3077m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3078m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3079 3080AC_LANG_COMPILER_REQUIRE 3081 3082AC_LANG_CASE( 3083 [C], [ 3084 dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3085 dnl and complains that AC_PROG_CC_C99 is obsolete 3086 m4_version_prereq([2.70], 3087 [AC_REQUIRE([AC_PROG_CC])], 3088 [AC_REQUIRE([AC_PROG_CC_C99])]) 3089 define([PREFIX], [C]) 3090 define([CACHE_PREFIX], [cc]) 3091 define([COMPILER], [$CC]) 3092 ], 3093 [C++], [ 3094 define([PREFIX], [CXX]) 3095 define([CACHE_PREFIX], [cxx]) 3096 define([COMPILER], [$CXX]) 3097 ] 3098) 3099 3100[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3101 3102if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3103 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3104 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3105 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3106 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3107 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3108 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3109 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3110 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3111fi 3112 3113if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3114 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3115 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3116 fi 3117 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3118 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3119 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3120 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3121 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3122 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3123 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3124 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3125fi 3126 3127found="no" 3128m4_foreach([flag], m4_cdr($@), [ 3129 if test $found = "no" ; then 3130 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3131 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3132 fi 3133 3134 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3135 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3136 fi 3137 3138 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3139 3140dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3141 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3142 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3143 AC_CACHE_VAL($cacheid, 3144 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3145 [eval $cacheid=yes], 3146 [eval $cacheid=no])]) 3147 3148 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3149 3150 eval supported=\$$cacheid 3151 AC_MSG_RESULT([$supported]) 3152 if test "$supported" = "yes" ; then 3153 $1="$$1 ]flag[" 3154 found="yes" 3155 fi 3156 fi 3157]) 3158]) # XORG_TESTSET_CFLAG 3159 3160# XORG_COMPILER_FLAGS 3161# --------------- 3162# Minimum version: 1.16.0 3163# 3164# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3165# arguments supported by the selected compiler which do NOT alter the generated 3166# code. These arguments will cause the compiler to print various warnings 3167# during compilation AND turn a conservative set of warnings into errors. 3168# 3169# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3170# future versions of util-macros as options are added to new compilers. 3171# 3172AC_DEFUN([XORG_COMPILER_FLAGS], [ 3173AC_REQUIRE([XORG_COMPILER_BRAND]) 3174 3175AC_ARG_ENABLE(selective-werror, 3176 AS_HELP_STRING([--disable-selective-werror], 3177 [Turn off selective compiler errors. (default: enabled)]), 3178 [SELECTIVE_WERROR=$enableval], 3179 [SELECTIVE_WERROR=yes]) 3180 3181AC_LANG_CASE( 3182 [C], [ 3183 define([PREFIX], [C]) 3184 ], 3185 [C++], [ 3186 define([PREFIX], [CXX]) 3187 ] 3188) 3189# -v is too short to test reliably with XORG_TESTSET_CFLAG 3190if test "x$SUNCC" = "xyes"; then 3191 [BASE_]PREFIX[FLAGS]="-v" 3192else 3193 [BASE_]PREFIX[FLAGS]="" 3194fi 3195 3196# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3197XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3198XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3199XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3200XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3201 3202AC_LANG_CASE( 3203 [C], [ 3204 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3205 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3206 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3207 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3208 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3209 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3210 ] 3211) 3212 3213# This chunk adds additional warnings that could catch undesired effects. 3214XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3215XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3216XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3217XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3218XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3219XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3220XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3221 3222# These are currently disabled because they are noisy. They will be enabled 3223# in the future once the codebase is sufficiently modernized to silence 3224# them. For now, I don't want them to drown out the other warnings. 3225# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3226# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3227# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3228 3229# Turn some warnings into errors, so we don't accidentally get successful builds 3230# when there are problems that should be fixed. 3231 3232if test "x$SELECTIVE_WERROR" = "xyes" ; then 3233XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3234XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3235XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3236XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3237XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3238XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3239XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3240XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3241XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3242XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3243XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3244XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3245XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3246else 3247AC_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]) 3248XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3249XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3250XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3251XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3252XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3253XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3254XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3255XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3256XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3257XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3258XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3259XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3260XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3261fi 3262 3263AC_SUBST([BASE_]PREFIX[FLAGS]) 3264]) # XORG_COMPILER_FLAGS 3265 3266# XORG_CWARNFLAGS 3267# --------------- 3268# Minimum version: 1.2.0 3269# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3270# 3271# Defines CWARNFLAGS to enable C compiler warnings. 3272# 3273# This function is deprecated because it defines -fno-strict-aliasing 3274# which alters the code generated by the compiler. If -fno-strict-aliasing 3275# is needed, then it should be added explicitly in the module when 3276# it is updated to use BASE_CFLAGS. 3277# 3278AC_DEFUN([XORG_CWARNFLAGS], [ 3279AC_REQUIRE([XORG_COMPILER_FLAGS]) 3280AC_REQUIRE([XORG_COMPILER_BRAND]) 3281AC_LANG_CASE( 3282 [C], [ 3283 CWARNFLAGS="$BASE_CFLAGS" 3284 if test "x$GCC" = xyes ; then 3285 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3286 fi 3287 AC_SUBST(CWARNFLAGS) 3288 ] 3289) 3290]) # XORG_CWARNFLAGS 3291 3292# XORG_STRICT_OPTION 3293# ----------------------- 3294# Minimum version: 1.3.0 3295# 3296# Add configure option to enable strict compilation flags, such as treating 3297# warnings as fatal errors. 3298# If --enable-strict-compilation is passed to configure, adds strict flags to 3299# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3300# 3301# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3302# when strict compilation is unconditionally desired. 3303AC_DEFUN([XORG_STRICT_OPTION], [ 3304AC_REQUIRE([XORG_CWARNFLAGS]) 3305AC_REQUIRE([XORG_COMPILER_FLAGS]) 3306 3307AC_ARG_ENABLE(strict-compilation, 3308 AS_HELP_STRING([--enable-strict-compilation], 3309 [Enable all warnings from compiler and make them errors (default: disabled)]), 3310 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3311 3312AC_LANG_CASE( 3313 [C], [ 3314 define([PREFIX], [C]) 3315 ], 3316 [C++], [ 3317 define([PREFIX], [CXX]) 3318 ] 3319) 3320 3321[STRICT_]PREFIX[FLAGS]="" 3322XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3323XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3324 3325# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3326# activate it with -Werror, so we add it here explicitly. 3327XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3328 3329if test "x$STRICT_COMPILE" = "xyes"; then 3330 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3331 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3332fi 3333AC_SUBST([STRICT_]PREFIX[FLAGS]) 3334AC_SUBST([BASE_]PREFIX[FLAGS]) 3335AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3336]) # XORG_STRICT_OPTION 3337 3338# XORG_DEFAULT_NOCODE_OPTIONS 3339# --------------------------- 3340# Minimum version: 1.20.0 3341# 3342# Defines default options for X.Org modules which don't compile code, 3343# such as fonts, bitmaps, cursors, and docs. 3344# 3345AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 3346AC_REQUIRE([AC_PROG_INSTALL]) 3347XORG_RELEASE_VERSION 3348XORG_CHANGELOG 3349XORG_INSTALL 3350XORG_MANPAGE_SECTIONS 3351m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3352 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3353]) # XORG_DEFAULT_NOCODE_OPTIONS 3354 3355# XORG_DEFAULT_OPTIONS 3356# -------------------- 3357# Minimum version: 1.3.0 3358# 3359# Defines default options for X.Org modules which compile code. 3360# 3361AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3362AC_REQUIRE([AC_PROG_INSTALL]) 3363XORG_COMPILER_FLAGS 3364XORG_CWARNFLAGS 3365XORG_STRICT_OPTION 3366XORG_DEFAULT_NOCODE_OPTIONS 3367]) # XORG_DEFAULT_OPTIONS 3368 3369# XORG_INSTALL() 3370# ---------------- 3371# Minimum version: 1.4.0 3372# 3373# Defines the variable INSTALL_CMD as the command to copy 3374# INSTALL from $prefix/share/util-macros. 3375# 3376AC_DEFUN([XORG_INSTALL], [ 3377AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3378macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3379INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3380mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3381|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3382touch \$(top_srcdir)/INSTALL; \ 3383echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3384AC_SUBST([INSTALL_CMD]) 3385]) # XORG_INSTALL 3386dnl Copyright 2005 Red Hat, Inc 3387dnl 3388dnl Permission to use, copy, modify, distribute, and sell this software and its 3389dnl documentation for any purpose is hereby granted without fee, provided that 3390dnl the above copyright notice appear in all copies and that both that 3391dnl copyright notice and this permission notice appear in supporting 3392dnl documentation. 3393dnl 3394dnl The above copyright notice and this permission notice shall be included 3395dnl in all copies or substantial portions of the Software. 3396dnl 3397dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3398dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3399dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3400dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3401dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3402dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3403dnl OTHER DEALINGS IN THE SOFTWARE. 3404dnl 3405dnl Except as contained in this notice, the name of the copyright holders shall 3406dnl not be used in advertising or otherwise to promote the sale, use or 3407dnl other dealings in this Software without prior written authorization 3408dnl from the copyright holders. 3409dnl 3410 3411# XORG_RELEASE_VERSION 3412# -------------------- 3413# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3414 3415AC_DEFUN([XORG_RELEASE_VERSION],[ 3416 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3417 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3418 [Major version of this package]) 3419 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3420 if test "x$PVM" = "x"; then 3421 PVM="0" 3422 fi 3423 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3424 [$PVM], 3425 [Minor version of this package]) 3426 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3427 if test "x$PVP" = "x"; then 3428 PVP="0" 3429 fi 3430 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3431 [$PVP], 3432 [Patch version of this package]) 3433]) 3434 3435# XORG_CHANGELOG() 3436# ---------------- 3437# Minimum version: 1.2.0 3438# 3439# Defines the variable CHANGELOG_CMD as the command to generate 3440# ChangeLog from git. 3441# 3442# 3443AC_DEFUN([XORG_CHANGELOG], [ 3444CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3445mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3446|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3447touch \$(top_srcdir)/ChangeLog; \ 3448echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3449AC_SUBST([CHANGELOG_CMD]) 3450]) # XORG_CHANGELOG 3451 3452# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3453# 3454# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3455# Foundation, Inc. 3456# Written by Gordon Matzigkeit, 1996 3457# 3458# This file is free software; the Free Software Foundation gives 3459# unlimited permission to copy and/or distribute it, with or without 3460# modifications, as long as this notice is preserved. 3461 3462m4_define([_LT_COPYING], [dnl 3463# Copyright (C) 2014 Free Software Foundation, Inc. 3464# This is free software; see the source for copying conditions. There is NO 3465# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3466 3467# GNU Libtool is free software; you can redistribute it and/or modify 3468# it under the terms of the GNU General Public License as published by 3469# the Free Software Foundation; either version 2 of of the License, or 3470# (at your option) any later version. 3471# 3472# As a special exception to the GNU General Public License, if you 3473# distribute this file as part of a program or library that is built 3474# using GNU Libtool, you may include this file under the same 3475# distribution terms that you use for the rest of that program. 3476# 3477# GNU Libtool is distributed in the hope that it will be useful, but 3478# WITHOUT ANY WARRANTY; without even the implied warranty of 3479# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3480# GNU General Public License for more details. 3481# 3482# You should have received a copy of the GNU General Public License 3483# along with this program. If not, see <http://www.gnu.org/licenses/>. 3484]) 3485 3486# serial 59 LT_INIT 3487 3488 3489# LT_PREREQ(VERSION) 3490# ------------------ 3491# Complain and exit if this libtool version is less that VERSION. 3492m4_defun([LT_PREREQ], 3493[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3494 [m4_default([$3], 3495 [m4_fatal([Libtool version $1 or higher is required], 3496 63)])], 3497 [$2])]) 3498 3499 3500# _LT_CHECK_BUILDDIR 3501# ------------------ 3502# Complain if the absolute build directory name contains unusual characters 3503m4_defun([_LT_CHECK_BUILDDIR], 3504[case `pwd` in 3505 *\ * | *\ *) 3506 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3507esac 3508]) 3509 3510 3511# LT_INIT([OPTIONS]) 3512# ------------------ 3513AC_DEFUN([LT_INIT], 3514[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3515AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3516AC_BEFORE([$0], [LT_LANG])dnl 3517AC_BEFORE([$0], [LT_OUTPUT])dnl 3518AC_BEFORE([$0], [LTDL_INIT])dnl 3519m4_require([_LT_CHECK_BUILDDIR])dnl 3520 3521dnl Autoconf doesn't catch unexpanded LT_ macros by default: 3522m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3523m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3524dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3525dnl unless we require an AC_DEFUNed macro: 3526AC_REQUIRE([LTOPTIONS_VERSION])dnl 3527AC_REQUIRE([LTSUGAR_VERSION])dnl 3528AC_REQUIRE([LTVERSION_VERSION])dnl 3529AC_REQUIRE([LTOBSOLETE_VERSION])dnl 3530m4_require([_LT_PROG_LTMAIN])dnl 3531 3532_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3533 3534dnl Parse OPTIONS 3535_LT_SET_OPTIONS([$0], [$1]) 3536 3537# This can be used to rebuild libtool when needed 3538LIBTOOL_DEPS=$ltmain 3539 3540# Always use our own libtool. 3541LIBTOOL='$(SHELL) $(top_builddir)/libtool' 3542AC_SUBST(LIBTOOL)dnl 3543 3544_LT_SETUP 3545 3546# Only expand once: 3547m4_define([LT_INIT]) 3548])# LT_INIT 3549 3550# Old names: 3551AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3552AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3553dnl aclocal-1.4 backwards compatibility: 3554dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3555dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3556 3557 3558# _LT_PREPARE_CC_BASENAME 3559# ----------------------- 3560m4_defun([_LT_PREPARE_CC_BASENAME], [ 3561# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3562func_cc_basename () 3563{ 3564 for cc_temp in @S|@*""; do 3565 case $cc_temp in 3566 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3567 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3568 \-*) ;; 3569 *) break;; 3570 esac 3571 done 3572 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3573} 3574])# _LT_PREPARE_CC_BASENAME 3575 3576 3577# _LT_CC_BASENAME(CC) 3578# ------------------- 3579# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3580# but that macro is also expanded into generated libtool script, which 3581# arranges for $SED and $ECHO to be set by different means. 3582m4_defun([_LT_CC_BASENAME], 3583[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3584AC_REQUIRE([_LT_DECL_SED])dnl 3585AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3586func_cc_basename $1 3587cc_basename=$func_cc_basename_result 3588]) 3589 3590 3591# _LT_FILEUTILS_DEFAULTS 3592# ---------------------- 3593# It is okay to use these file commands and assume they have been set 3594# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3595m4_defun([_LT_FILEUTILS_DEFAULTS], 3596[: ${CP="cp -f"} 3597: ${MV="mv -f"} 3598: ${RM="rm -f"} 3599])# _LT_FILEUTILS_DEFAULTS 3600 3601 3602# _LT_SETUP 3603# --------- 3604m4_defun([_LT_SETUP], 3605[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3606AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3607AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3608AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3609 3610_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3611dnl 3612_LT_DECL([], [host_alias], [0], [The host system])dnl 3613_LT_DECL([], [host], [0])dnl 3614_LT_DECL([], [host_os], [0])dnl 3615dnl 3616_LT_DECL([], [build_alias], [0], [The build system])dnl 3617_LT_DECL([], [build], [0])dnl 3618_LT_DECL([], [build_os], [0])dnl 3619dnl 3620AC_REQUIRE([AC_PROG_CC])dnl 3621AC_REQUIRE([LT_PATH_LD])dnl 3622AC_REQUIRE([LT_PATH_NM])dnl 3623dnl 3624AC_REQUIRE([AC_PROG_LN_S])dnl 3625test -z "$LN_S" && LN_S="ln -s" 3626_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3627dnl 3628AC_REQUIRE([LT_CMD_MAX_LEN])dnl 3629_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3630_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3631dnl 3632m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3633m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3634m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3635m4_require([_LT_CMD_RELOAD])dnl 3636m4_require([_LT_DECL_FILECMD])dnl 3637m4_require([_LT_CHECK_MAGIC_METHOD])dnl 3638m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3639m4_require([_LT_CMD_OLD_ARCHIVE])dnl 3640m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3641m4_require([_LT_WITH_SYSROOT])dnl 3642m4_require([_LT_CMD_TRUNCATE])dnl 3643 3644_LT_CONFIG_LIBTOOL_INIT([ 3645# See if we are running on zsh, and set the options that allow our 3646# commands through without removal of \ escapes INIT. 3647if test -n "\${ZSH_VERSION+set}"; then 3648 setopt NO_GLOB_SUBST 3649fi 3650]) 3651if test -n "${ZSH_VERSION+set}"; then 3652 setopt NO_GLOB_SUBST 3653fi 3654 3655_LT_CHECK_OBJDIR 3656 3657m4_require([_LT_TAG_COMPILER])dnl 3658 3659case $host_os in 3660aix3*) 3661 # AIX sometimes has problems with the GCC collect2 program. For some 3662 # reason, if we set the COLLECT_NAMES environment variable, the problems 3663 # vanish in a puff of smoke. 3664 if test set != "${COLLECT_NAMES+set}"; then 3665 COLLECT_NAMES= 3666 export COLLECT_NAMES 3667 fi 3668 ;; 3669esac 3670 3671# Global variables: 3672ofile=libtool 3673can_build_shared=yes 3674 3675# All known linkers require a '.a' archive for static linking (except MSVC and 3676# ICC, which need '.lib'). 3677libext=a 3678 3679with_gnu_ld=$lt_cv_prog_gnu_ld 3680 3681old_CC=$CC 3682old_CFLAGS=$CFLAGS 3683 3684# Set sane defaults for various variables 3685test -z "$CC" && CC=cc 3686test -z "$LTCC" && LTCC=$CC 3687test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3688test -z "$LD" && LD=ld 3689test -z "$ac_objext" && ac_objext=o 3690 3691_LT_CC_BASENAME([$compiler]) 3692 3693# Only perform the check for file, if the check method requires it 3694test -z "$MAGIC_CMD" && MAGIC_CMD=file 3695case $deplibs_check_method in 3696file_magic*) 3697 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3698 _LT_PATH_MAGIC 3699 fi 3700 ;; 3701esac 3702 3703# Use C for the default configuration in the libtool script 3704LT_SUPPORTED_TAG([CC]) 3705_LT_LANG_C_CONFIG 3706_LT_LANG_DEFAULT_CONFIG 3707_LT_CONFIG_COMMANDS 3708])# _LT_SETUP 3709 3710 3711# _LT_PREPARE_SED_QUOTE_VARS 3712# -------------------------- 3713# Define a few sed substitution that help us do robust quoting. 3714m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3715[# Backslashify metacharacters that are still active within 3716# double-quoted strings. 3717sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3718 3719# Same as above, but do not quote variable references. 3720double_quote_subst='s/\([["`\\]]\)/\\\1/g' 3721 3722# Sed substitution to delay expansion of an escaped shell variable in a 3723# double_quote_subst'ed string. 3724delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3725 3726# Sed substitution to delay expansion of an escaped single quote. 3727delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3728 3729# Sed substitution to avoid accidental globbing in evaled expressions 3730no_glob_subst='s/\*/\\\*/g' 3731]) 3732 3733# _LT_PROG_LTMAIN 3734# --------------- 3735# Note that this code is called both from 'configure', and 'config.status' 3736# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3737# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3738# so we pass a copy along to make sure it has a sensible value anyway. 3739m4_defun([_LT_PROG_LTMAIN], 3740[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3741_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3742ltmain=$ac_aux_dir/ltmain.sh 3743])# _LT_PROG_LTMAIN 3744 3745 3746 3747# So that we can recreate a full libtool script including additional 3748# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3749# in macros and then make a single call at the end using the 'libtool' 3750# label. 3751 3752 3753# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3754# ---------------------------------------- 3755# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3756m4_define([_LT_CONFIG_LIBTOOL_INIT], 3757[m4_ifval([$1], 3758 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3759 [$1 3760])])]) 3761 3762# Initialize. 3763m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3764 3765 3766# _LT_CONFIG_LIBTOOL([COMMANDS]) 3767# ------------------------------ 3768# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3769m4_define([_LT_CONFIG_LIBTOOL], 3770[m4_ifval([$1], 3771 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3772 [$1 3773])])]) 3774 3775# Initialize. 3776m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3777 3778 3779# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3780# ----------------------------------------------------- 3781m4_defun([_LT_CONFIG_SAVE_COMMANDS], 3782[_LT_CONFIG_LIBTOOL([$1]) 3783_LT_CONFIG_LIBTOOL_INIT([$2]) 3784]) 3785 3786 3787# _LT_FORMAT_COMMENT([COMMENT]) 3788# ----------------------------- 3789# Add leading comment marks to the start of each line, and a trailing 3790# full-stop to the whole comment if one is not present already. 3791m4_define([_LT_FORMAT_COMMENT], 3792[m4_ifval([$1], [ 3793m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3794 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3795)]) 3796 3797 3798 3799 3800 3801# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3802# ------------------------------------------------------------------- 3803# CONFIGNAME is the name given to the value in the libtool script. 3804# VARNAME is the (base) name used in the configure script. 3805# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3806# VARNAME. Any other value will be used directly. 3807m4_define([_LT_DECL], 3808[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3809 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3810 [m4_ifval([$1], [$1], [$2])]) 3811 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3812 m4_ifval([$4], 3813 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3814 lt_dict_add_subkey([lt_decl_dict], [$2], 3815 [tagged?], [m4_ifval([$5], [yes], [no])])]) 3816]) 3817 3818 3819# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3820# -------------------------------------------------------- 3821m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3822 3823 3824# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3825# ------------------------------------------------ 3826m4_define([lt_decl_tag_varnames], 3827[_lt_decl_filter([tagged?], [yes], $@)]) 3828 3829 3830# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3831# --------------------------------------------------------- 3832m4_define([_lt_decl_filter], 3833[m4_case([$#], 3834 [0], [m4_fatal([$0: too few arguments: $#])], 3835 [1], [m4_fatal([$0: too few arguments: $#: $1])], 3836 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3837 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3838 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3839]) 3840 3841 3842# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3843# -------------------------------------------------- 3844m4_define([lt_decl_quote_varnames], 3845[_lt_decl_filter([value], [1], $@)]) 3846 3847 3848# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3849# --------------------------------------------------- 3850m4_define([lt_decl_dquote_varnames], 3851[_lt_decl_filter([value], [2], $@)]) 3852 3853 3854# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3855# --------------------------------------------------- 3856m4_define([lt_decl_varnames_tagged], 3857[m4_assert([$# <= 2])dnl 3858_$0(m4_quote(m4_default([$1], [[, ]])), 3859 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3860 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3861m4_define([_lt_decl_varnames_tagged], 3862[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3863 3864 3865# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3866# ------------------------------------------------ 3867m4_define([lt_decl_all_varnames], 3868[_$0(m4_quote(m4_default([$1], [[, ]])), 3869 m4_if([$2], [], 3870 m4_quote(lt_decl_varnames), 3871 m4_quote(m4_shift($@))))[]dnl 3872]) 3873m4_define([_lt_decl_all_varnames], 3874[lt_join($@, lt_decl_varnames_tagged([$1], 3875 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3876]) 3877 3878 3879# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3880# ------------------------------------ 3881# Quote a variable value, and forward it to 'config.status' so that its 3882# declaration there will have the same value as in 'configure'. VARNAME 3883# must have a single quote delimited value for this to work. 3884m4_define([_LT_CONFIG_STATUS_DECLARE], 3885[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3886 3887 3888# _LT_CONFIG_STATUS_DECLARATIONS 3889# ------------------------------ 3890# We delimit libtool config variables with single quotes, so when 3891# we write them to config.status, we have to be sure to quote all 3892# embedded single quotes properly. In configure, this macro expands 3893# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3894# 3895# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3896m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3897[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3898 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3899 3900 3901# _LT_LIBTOOL_TAGS 3902# ---------------- 3903# Output comment and list of tags supported by the script 3904m4_defun([_LT_LIBTOOL_TAGS], 3905[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3906available_tags='_LT_TAGS'dnl 3907]) 3908 3909 3910# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3911# ----------------------------------- 3912# Extract the dictionary values for VARNAME (optionally with TAG) and 3913# expand to a commented shell variable setting: 3914# 3915# # Some comment about what VAR is for. 3916# visible_name=$lt_internal_name 3917m4_define([_LT_LIBTOOL_DECLARE], 3918[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3919 [description])))[]dnl 3920m4_pushdef([_libtool_name], 3921 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3922m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3923 [0], [_libtool_name=[$]$1], 3924 [1], [_libtool_name=$lt_[]$1], 3925 [2], [_libtool_name=$lt_[]$1], 3926 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3927m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3928]) 3929 3930 3931# _LT_LIBTOOL_CONFIG_VARS 3932# ----------------------- 3933# Produce commented declarations of non-tagged libtool config variables 3934# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3935# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3936# section) are produced by _LT_LIBTOOL_TAG_VARS. 3937m4_defun([_LT_LIBTOOL_CONFIG_VARS], 3938[m4_foreach([_lt_var], 3939 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3940 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3941 3942 3943# _LT_LIBTOOL_TAG_VARS(TAG) 3944# ------------------------- 3945m4_define([_LT_LIBTOOL_TAG_VARS], 3946[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3947 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3948 3949 3950# _LT_TAGVAR(VARNAME, [TAGNAME]) 3951# ------------------------------ 3952m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3953 3954 3955# _LT_CONFIG_COMMANDS 3956# ------------------- 3957# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3958# variables for single and double quote escaping we saved from calls 3959# to _LT_DECL, we can put quote escaped variables declarations 3960# into 'config.status', and then the shell code to quote escape them in 3961# for loops in 'config.status'. Finally, any additional code accumulated 3962# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3963m4_defun([_LT_CONFIG_COMMANDS], 3964[AC_PROVIDE_IFELSE([LT_OUTPUT], 3965 dnl If the libtool generation code has been placed in $CONFIG_LT, 3966 dnl instead of duplicating it all over again into config.status, 3967 dnl then we will have config.status run $CONFIG_LT later, so it 3968 dnl needs to know what name is stored there: 3969 [AC_CONFIG_COMMANDS([libtool], 3970 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3971 dnl If the libtool generation code is destined for config.status, 3972 dnl expand the accumulated commands and init code now: 3973 [AC_CONFIG_COMMANDS([libtool], 3974 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3975])#_LT_CONFIG_COMMANDS 3976 3977 3978# Initialize. 3979m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3980[ 3981 3982# The HP-UX ksh and POSIX shell print the target directory to stdout 3983# if CDPATH is set. 3984(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3985 3986sed_quote_subst='$sed_quote_subst' 3987double_quote_subst='$double_quote_subst' 3988delay_variable_subst='$delay_variable_subst' 3989_LT_CONFIG_STATUS_DECLARATIONS 3990LTCC='$LTCC' 3991LTCFLAGS='$LTCFLAGS' 3992compiler='$compiler_DEFAULT' 3993 3994# A function that is used when there is no print builtin or printf. 3995func_fallback_echo () 3996{ 3997 eval 'cat <<_LTECHO_EOF 3998\$[]1 3999_LTECHO_EOF' 4000} 4001 4002# Quote evaled strings. 4003for var in lt_decl_all_varnames([[ \ 4004]], lt_decl_quote_varnames); do 4005 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4006 *[[\\\\\\\`\\"\\\$]]*) 4007 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4008 ;; 4009 *) 4010 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4011 ;; 4012 esac 4013done 4014 4015# Double-quote double-evaled strings. 4016for var in lt_decl_all_varnames([[ \ 4017]], lt_decl_dquote_varnames); do 4018 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4019 *[[\\\\\\\`\\"\\\$]]*) 4020 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4021 ;; 4022 *) 4023 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4024 ;; 4025 esac 4026done 4027 4028_LT_OUTPUT_LIBTOOL_INIT 4029]) 4030 4031# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 4032# ------------------------------------ 4033# Generate a child script FILE with all initialization necessary to 4034# reuse the environment learned by the parent script, and make the 4035# file executable. If COMMENT is supplied, it is inserted after the 4036# '#!' sequence but before initialization text begins. After this 4037# macro, additional text can be appended to FILE to form the body of 4038# the child script. The macro ends with non-zero status if the 4039# file could not be fully written (such as if the disk is full). 4040m4_ifdef([AS_INIT_GENERATED], 4041[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4042[m4_defun([_LT_GENERATED_FILE_INIT], 4043[m4_require([AS_PREPARE])]dnl 4044[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4045[lt_write_fail=0 4046cat >$1 <<_ASEOF || lt_write_fail=1 4047#! $SHELL 4048# Generated by $as_me. 4049$2 4050SHELL=\${CONFIG_SHELL-$SHELL} 4051export SHELL 4052_ASEOF 4053cat >>$1 <<\_ASEOF || lt_write_fail=1 4054AS_SHELL_SANITIZE 4055_AS_PREPARE 4056exec AS_MESSAGE_FD>&1 4057_ASEOF 4058test 0 = "$lt_write_fail" && chmod +x $1[]dnl 4059m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4060 4061# LT_OUTPUT 4062# --------- 4063# This macro allows early generation of the libtool script (before 4064# AC_OUTPUT is called), incase it is used in configure for compilation 4065# tests. 4066AC_DEFUN([LT_OUTPUT], 4067[: ${CONFIG_LT=./config.lt} 4068AC_MSG_NOTICE([creating $CONFIG_LT]) 4069_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4070[# Run this file to recreate a libtool stub with the current configuration.]) 4071 4072cat >>"$CONFIG_LT" <<\_LTEOF 4073lt_cl_silent=false 4074exec AS_MESSAGE_LOG_FD>>config.log 4075{ 4076 echo 4077 AS_BOX([Running $as_me.]) 4078} >&AS_MESSAGE_LOG_FD 4079 4080lt_cl_help="\ 4081'$as_me' creates a local libtool stub from the current configuration, 4082for use in further configure time tests before the real libtool is 4083generated. 4084 4085Usage: $[0] [[OPTIONS]] 4086 4087 -h, --help print this help, then exit 4088 -V, --version print version number, then exit 4089 -q, --quiet do not print progress messages 4090 -d, --debug don't remove temporary files 4091 4092Report bugs to <bug-libtool@gnu.org>." 4093 4094lt_cl_version="\ 4095m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4096m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4097configured by $[0], generated by m4_PACKAGE_STRING. 4098 4099Copyright (C) 2011 Free Software Foundation, Inc. 4100This config.lt script is free software; the Free Software Foundation 4101gives unlimited permision to copy, distribute and modify it." 4102 4103while test 0 != $[#] 4104do 4105 case $[1] in 4106 --version | --v* | -V ) 4107 echo "$lt_cl_version"; exit 0 ;; 4108 --help | --h* | -h ) 4109 echo "$lt_cl_help"; exit 0 ;; 4110 --debug | --d* | -d ) 4111 debug=: ;; 4112 --quiet | --q* | --silent | --s* | -q ) 4113 lt_cl_silent=: ;; 4114 4115 -*) AC_MSG_ERROR([unrecognized option: $[1] 4116Try '$[0] --help' for more information.]) ;; 4117 4118 *) AC_MSG_ERROR([unrecognized argument: $[1] 4119Try '$[0] --help' for more information.]) ;; 4120 esac 4121 shift 4122done 4123 4124if $lt_cl_silent; then 4125 exec AS_MESSAGE_FD>/dev/null 4126fi 4127_LTEOF 4128 4129cat >>"$CONFIG_LT" <<_LTEOF 4130_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4131_LTEOF 4132 4133cat >>"$CONFIG_LT" <<\_LTEOF 4134AC_MSG_NOTICE([creating $ofile]) 4135_LT_OUTPUT_LIBTOOL_COMMANDS 4136AS_EXIT(0) 4137_LTEOF 4138chmod +x "$CONFIG_LT" 4139 4140# configure is writing to config.log, but config.lt does its own redirection, 4141# appending to config.log, which fails on DOS, as config.log is still kept 4142# open by configure. Here we exec the FD to /dev/null, effectively closing 4143# config.log, so it can be properly (re)opened and appended to by config.lt. 4144lt_cl_success=: 4145test yes = "$silent" && 4146 lt_config_lt_args="$lt_config_lt_args --quiet" 4147exec AS_MESSAGE_LOG_FD>/dev/null 4148$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4149exec AS_MESSAGE_LOG_FD>>config.log 4150$lt_cl_success || AS_EXIT(1) 4151])# LT_OUTPUT 4152 4153 4154# _LT_CONFIG(TAG) 4155# --------------- 4156# If TAG is the built-in tag, create an initial libtool script with a 4157# default configuration from the untagged config vars. Otherwise add code 4158# to config.status for appending the configuration named by TAG from the 4159# matching tagged config vars. 4160m4_defun([_LT_CONFIG], 4161[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4162_LT_CONFIG_SAVE_COMMANDS([ 4163 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4164 m4_if(_LT_TAG, [C], [ 4165 # See if we are running on zsh, and set the options that allow our 4166 # commands through without removal of \ escapes. 4167 if test -n "${ZSH_VERSION+set}"; then 4168 setopt NO_GLOB_SUBST 4169 fi 4170 4171 cfgfile=${ofile}T 4172 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4173 $RM "$cfgfile" 4174 4175 cat <<_LT_EOF >> "$cfgfile" 4176#! $SHELL 4177# Generated automatically by $as_me ($PACKAGE) $VERSION 4178# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4179# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4180 4181# Provide generalized library-building support services. 4182# Written by Gordon Matzigkeit, 1996 4183 4184_LT_COPYING 4185_LT_LIBTOOL_TAGS 4186 4187# Configured defaults for sys_lib_dlsearch_path munging. 4188: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4189 4190# ### BEGIN LIBTOOL CONFIG 4191_LT_LIBTOOL_CONFIG_VARS 4192_LT_LIBTOOL_TAG_VARS 4193# ### END LIBTOOL CONFIG 4194 4195_LT_EOF 4196 4197 cat <<'_LT_EOF' >> "$cfgfile" 4198 4199# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4200 4201_LT_PREPARE_MUNGE_PATH_LIST 4202_LT_PREPARE_CC_BASENAME 4203 4204# ### END FUNCTIONS SHARED WITH CONFIGURE 4205 4206_LT_EOF 4207 4208 case $host_os in 4209 aix3*) 4210 cat <<\_LT_EOF >> "$cfgfile" 4211# AIX sometimes has problems with the GCC collect2 program. For some 4212# reason, if we set the COLLECT_NAMES environment variable, the problems 4213# vanish in a puff of smoke. 4214if test set != "${COLLECT_NAMES+set}"; then 4215 COLLECT_NAMES= 4216 export COLLECT_NAMES 4217fi 4218_LT_EOF 4219 ;; 4220 esac 4221 4222 _LT_PROG_LTMAIN 4223 4224 # We use sed instead of cat because bash on DJGPP gets confused if 4225 # if finds mixed CR/LF and LF-only lines. Since sed operates in 4226 # text mode, it properly converts lines to CR/LF. This bash problem 4227 # is reportedly fixed, but why not run on old versions too? 4228 $SED '$q' "$ltmain" >> "$cfgfile" \ 4229 || (rm -f "$cfgfile"; exit 1) 4230 4231 mv -f "$cfgfile" "$ofile" || 4232 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4233 chmod +x "$ofile" 4234], 4235[cat <<_LT_EOF >> "$ofile" 4236 4237dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4238dnl in a comment (ie after a #). 4239# ### BEGIN LIBTOOL TAG CONFIG: $1 4240_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4241# ### END LIBTOOL TAG CONFIG: $1 4242_LT_EOF 4243])dnl /m4_if 4244], 4245[m4_if([$1], [], [ 4246 PACKAGE='$PACKAGE' 4247 VERSION='$VERSION' 4248 RM='$RM' 4249 ofile='$ofile'], []) 4250])dnl /_LT_CONFIG_SAVE_COMMANDS 4251])# _LT_CONFIG 4252 4253 4254# LT_SUPPORTED_TAG(TAG) 4255# --------------------- 4256# Trace this macro to discover what tags are supported by the libtool 4257# --tag option, using: 4258# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4259AC_DEFUN([LT_SUPPORTED_TAG], []) 4260 4261 4262# C support is built-in for now 4263m4_define([_LT_LANG_C_enabled], []) 4264m4_define([_LT_TAGS], []) 4265 4266 4267# LT_LANG(LANG) 4268# ------------- 4269# Enable libtool support for the given language if not already enabled. 4270AC_DEFUN([LT_LANG], 4271[AC_BEFORE([$0], [LT_OUTPUT])dnl 4272m4_case([$1], 4273 [C], [_LT_LANG(C)], 4274 [C++], [_LT_LANG(CXX)], 4275 [Go], [_LT_LANG(GO)], 4276 [Java], [_LT_LANG(GCJ)], 4277 [Fortran 77], [_LT_LANG(F77)], 4278 [Fortran], [_LT_LANG(FC)], 4279 [Windows Resource], [_LT_LANG(RC)], 4280 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4281 [_LT_LANG($1)], 4282 [m4_fatal([$0: unsupported language: "$1"])])])dnl 4283])# LT_LANG 4284 4285 4286# _LT_LANG(LANGNAME) 4287# ------------------ 4288m4_defun([_LT_LANG], 4289[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4290 [LT_SUPPORTED_TAG([$1])dnl 4291 m4_append([_LT_TAGS], [$1 ])dnl 4292 m4_define([_LT_LANG_]$1[_enabled], [])dnl 4293 _LT_LANG_$1_CONFIG($1)])dnl 4294])# _LT_LANG 4295 4296 4297m4_ifndef([AC_PROG_GO], [ 4298# NOTE: This macro has been submitted for inclusion into # 4299# GNU Autoconf as AC_PROG_GO. When it is available in # 4300# a released version of Autoconf we should remove this # 4301# macro and use it instead. # 4302m4_defun([AC_PROG_GO], 4303[AC_LANG_PUSH(Go)dnl 4304AC_ARG_VAR([GOC], [Go compiler command])dnl 4305AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4306_AC_ARG_VAR_LDFLAGS()dnl 4307AC_CHECK_TOOL(GOC, gccgo) 4308if test -z "$GOC"; then 4309 if test -n "$ac_tool_prefix"; then 4310 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4311 fi 4312fi 4313if test -z "$GOC"; then 4314 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4315fi 4316])#m4_defun 4317])#m4_ifndef 4318 4319 4320# _LT_LANG_DEFAULT_CONFIG 4321# ----------------------- 4322m4_defun([_LT_LANG_DEFAULT_CONFIG], 4323[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4324 [LT_LANG(CXX)], 4325 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4326 4327AC_PROVIDE_IFELSE([AC_PROG_F77], 4328 [LT_LANG(F77)], 4329 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4330 4331AC_PROVIDE_IFELSE([AC_PROG_FC], 4332 [LT_LANG(FC)], 4333 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4334 4335dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4336dnl pulling things in needlessly. 4337AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4338 [LT_LANG(GCJ)], 4339 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4340 [LT_LANG(GCJ)], 4341 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4342 [LT_LANG(GCJ)], 4343 [m4_ifdef([AC_PROG_GCJ], 4344 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4345 m4_ifdef([A][M_PROG_GCJ], 4346 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4347 m4_ifdef([LT_PROG_GCJ], 4348 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4349 4350AC_PROVIDE_IFELSE([AC_PROG_GO], 4351 [LT_LANG(GO)], 4352 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4353 4354AC_PROVIDE_IFELSE([LT_PROG_RC], 4355 [LT_LANG(RC)], 4356 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4357])# _LT_LANG_DEFAULT_CONFIG 4358 4359# Obsolete macros: 4360AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4361AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4362AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4363AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4364AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4365dnl aclocal-1.4 backwards compatibility: 4366dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4367dnl AC_DEFUN([AC_LIBTOOL_F77], []) 4368dnl AC_DEFUN([AC_LIBTOOL_FC], []) 4369dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4370dnl AC_DEFUN([AC_LIBTOOL_RC], []) 4371 4372 4373# _LT_TAG_COMPILER 4374# ---------------- 4375m4_defun([_LT_TAG_COMPILER], 4376[AC_REQUIRE([AC_PROG_CC])dnl 4377 4378_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4379_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4380_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4381_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4382 4383# If no C compiler was specified, use CC. 4384LTCC=${LTCC-"$CC"} 4385 4386# If no C compiler flags were specified, use CFLAGS. 4387LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4388 4389# Allow CC to be a program name with arguments. 4390compiler=$CC 4391])# _LT_TAG_COMPILER 4392 4393 4394# _LT_COMPILER_BOILERPLATE 4395# ------------------------ 4396# Check for compiler boilerplate output or warnings with 4397# the simple compiler test code. 4398m4_defun([_LT_COMPILER_BOILERPLATE], 4399[m4_require([_LT_DECL_SED])dnl 4400ac_outfile=conftest.$ac_objext 4401echo "$lt_simple_compile_test_code" >conftest.$ac_ext 4402eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4403_lt_compiler_boilerplate=`cat conftest.err` 4404$RM conftest* 4405])# _LT_COMPILER_BOILERPLATE 4406 4407 4408# _LT_LINKER_BOILERPLATE 4409# ---------------------- 4410# Check for linker boilerplate output or warnings with 4411# the simple link test code. 4412m4_defun([_LT_LINKER_BOILERPLATE], 4413[m4_require([_LT_DECL_SED])dnl 4414ac_outfile=conftest.$ac_objext 4415echo "$lt_simple_link_test_code" >conftest.$ac_ext 4416eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4417_lt_linker_boilerplate=`cat conftest.err` 4418$RM -r conftest* 4419])# _LT_LINKER_BOILERPLATE 4420 4421# _LT_REQUIRED_DARWIN_CHECKS 4422# ------------------------- 4423m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4424 case $host_os in 4425 rhapsody* | darwin*) 4426 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4427 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4428 AC_CHECK_TOOL([LIPO], [lipo], [:]) 4429 AC_CHECK_TOOL([OTOOL], [otool], [:]) 4430 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4431 _LT_DECL([], [DSYMUTIL], [1], 4432 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4433 _LT_DECL([], [NMEDIT], [1], 4434 [Tool to change global to local symbols on Mac OS X]) 4435 _LT_DECL([], [LIPO], [1], 4436 [Tool to manipulate fat objects and archives on Mac OS X]) 4437 _LT_DECL([], [OTOOL], [1], 4438 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4439 _LT_DECL([], [OTOOL64], [1], 4440 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4441 4442 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4443 [lt_cv_apple_cc_single_mod=no 4444 if test -z "$LT_MULTI_MODULE"; then 4445 # By default we will add the -single_module flag. You can override 4446 # by either setting the environment variable LT_MULTI_MODULE 4447 # non-empty at configure time, or by adding -multi_module to the 4448 # link flags. 4449 rm -rf libconftest.dylib* 4450 echo "int foo(void){return 1;}" > conftest.c 4451 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4452-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4453 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4454 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4455 _lt_result=$? 4456 # If there is a non-empty error log, and "single_module" 4457 # appears in it, assume the flag caused a linker warning 4458 if test -s conftest.err && $GREP single_module conftest.err; then 4459 cat conftest.err >&AS_MESSAGE_LOG_FD 4460 # Otherwise, if the output was created with a 0 exit code from 4461 # the compiler, it worked. 4462 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4463 lt_cv_apple_cc_single_mod=yes 4464 else 4465 cat conftest.err >&AS_MESSAGE_LOG_FD 4466 fi 4467 rm -rf libconftest.dylib* 4468 rm -f conftest.* 4469 fi]) 4470 4471 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4472 [lt_cv_ld_exported_symbols_list], 4473 [lt_cv_ld_exported_symbols_list=no 4474 save_LDFLAGS=$LDFLAGS 4475 echo "_main" > conftest.sym 4476 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4477 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4478 [lt_cv_ld_exported_symbols_list=yes], 4479 [lt_cv_ld_exported_symbols_list=no]) 4480 LDFLAGS=$save_LDFLAGS 4481 ]) 4482 4483 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4484 [lt_cv_ld_force_load=no 4485 cat > conftest.c << _LT_EOF 4486int forced_loaded() { return 2;} 4487_LT_EOF 4488 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4489 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4490 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4491 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4492 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4493 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4494 cat > conftest.c << _LT_EOF 4495int main() { return 0;} 4496_LT_EOF 4497 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4498 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4499 _lt_result=$? 4500 if test -s conftest.err && $GREP force_load conftest.err; then 4501 cat conftest.err >&AS_MESSAGE_LOG_FD 4502 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4503 lt_cv_ld_force_load=yes 4504 else 4505 cat conftest.err >&AS_MESSAGE_LOG_FD 4506 fi 4507 rm -f conftest.err libconftest.a conftest conftest.c 4508 rm -rf conftest.dSYM 4509 ]) 4510 case $host_os in 4511 rhapsody* | darwin1.[[012]]) 4512 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4513 darwin1.*) 4514 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4515 darwin*) 4516 case $MACOSX_DEPLOYMENT_TARGET,$host in 4517 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4518 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4519 *) 4520 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4521 esac 4522 ;; 4523 esac 4524 if test yes = "$lt_cv_apple_cc_single_mod"; then 4525 _lt_dar_single_mod='$single_module' 4526 fi 4527 if test yes = "$lt_cv_ld_exported_symbols_list"; then 4528 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4529 else 4530 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4531 fi 4532 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4533 _lt_dsymutil='~$DSYMUTIL $lib || :' 4534 else 4535 _lt_dsymutil= 4536 fi 4537 ;; 4538 esac 4539]) 4540 4541 4542# _LT_DARWIN_LINKER_FEATURES([TAG]) 4543# --------------------------------- 4544# Checks for linker and compiler features on darwin 4545m4_defun([_LT_DARWIN_LINKER_FEATURES], 4546[ 4547 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4548 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4549 _LT_TAGVAR(hardcode_direct, $1)=no 4550 _LT_TAGVAR(hardcode_automatic, $1)=yes 4551 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4552 if test yes = "$lt_cv_ld_force_load"; then 4553 _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\"`' 4554 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4555 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4556 else 4557 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4558 fi 4559 _LT_TAGVAR(link_all_deplibs, $1)=yes 4560 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4561 case $cc_basename in 4562 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4563 *) _lt_dar_can_shared=$GCC ;; 4564 esac 4565 if test yes = "$_lt_dar_can_shared"; then 4566 output_verbose_link_cmd=func_echo_all 4567 _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" 4568 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4569 _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" 4570 _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" 4571 m4_if([$1], [CXX], 4572[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4573 _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" 4574 _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" 4575 fi 4576],[]) 4577 else 4578 _LT_TAGVAR(ld_shlibs, $1)=no 4579 fi 4580]) 4581 4582# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4583# ---------------------------------- 4584# Links a minimal program and checks the executable 4585# for the system default hardcoded library path. In most cases, 4586# this is /usr/lib:/lib, but when the MPI compilers are used 4587# the location of the communication and MPI libs are included too. 4588# If we don't find anything, use the default library path according 4589# to the aix ld manual. 4590# Store the results from the different compilers for each TAGNAME. 4591# Allow to override them for all tags through lt_cv_aix_libpath. 4592m4_defun([_LT_SYS_MODULE_PATH_AIX], 4593[m4_require([_LT_DECL_SED])dnl 4594if test set = "${lt_cv_aix_libpath+set}"; then 4595 aix_libpath=$lt_cv_aix_libpath 4596else 4597 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4598 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4599 lt_aix_libpath_sed='[ 4600 /Import File Strings/,/^$/ { 4601 /^0/ { 4602 s/^0 *\([^ ]*\) *$/\1/ 4603 p 4604 } 4605 }]' 4606 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4607 # Check for a 64-bit object if we didn't find anything. 4608 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4609 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4610 fi],[]) 4611 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4612 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4613 fi 4614 ]) 4615 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4616fi 4617])# _LT_SYS_MODULE_PATH_AIX 4618 4619 4620# _LT_SHELL_INIT(ARG) 4621# ------------------- 4622m4_define([_LT_SHELL_INIT], 4623[m4_divert_text([M4SH-INIT], [$1 4624])])# _LT_SHELL_INIT 4625 4626 4627 4628# _LT_PROG_ECHO_BACKSLASH 4629# ----------------------- 4630# Find how we can fake an echo command that does not interpret backslash. 4631# In particular, with Autoconf 2.60 or later we add some code to the start 4632# of the generated configure script that will find a shell with a builtin 4633# printf (that we can use as an echo command). 4634m4_defun([_LT_PROG_ECHO_BACKSLASH], 4635[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4636ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4637ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4638 4639AC_MSG_CHECKING([how to print strings]) 4640# Test print first, because it will be a builtin if present. 4641if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4642 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4643 ECHO='print -r --' 4644elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4645 ECHO='printf %s\n' 4646else 4647 # Use this function as a fallback that always works. 4648 func_fallback_echo () 4649 { 4650 eval 'cat <<_LTECHO_EOF 4651$[]1 4652_LTECHO_EOF' 4653 } 4654 ECHO='func_fallback_echo' 4655fi 4656 4657# func_echo_all arg... 4658# Invoke $ECHO with all args, space-separated. 4659func_echo_all () 4660{ 4661 $ECHO "$*" 4662} 4663 4664case $ECHO in 4665 printf*) AC_MSG_RESULT([printf]) ;; 4666 print*) AC_MSG_RESULT([print -r]) ;; 4667 *) AC_MSG_RESULT([cat]) ;; 4668esac 4669 4670m4_ifdef([_AS_DETECT_SUGGESTED], 4671[_AS_DETECT_SUGGESTED([ 4672 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4673 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4674 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4675 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4676 PATH=/empty FPATH=/empty; export PATH FPATH 4677 test "X`printf %s $ECHO`" = "X$ECHO" \ 4678 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4679 4680_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4681_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4682])# _LT_PROG_ECHO_BACKSLASH 4683 4684 4685# _LT_WITH_SYSROOT 4686# ---------------- 4687AC_DEFUN([_LT_WITH_SYSROOT], 4688[m4_require([_LT_DECL_SED])dnl 4689AC_MSG_CHECKING([for sysroot]) 4690AC_ARG_WITH([sysroot], 4691[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4692 [Search for dependent libraries within DIR (or the compiler's sysroot 4693 if not specified).])], 4694[], [with_sysroot=no]) 4695 4696dnl lt_sysroot will always be passed unquoted. We quote it here 4697dnl in case the user passed a directory name. 4698lt_sysroot= 4699case $with_sysroot in #( 4700 yes) 4701 if test yes = "$GCC"; then 4702 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4703 fi 4704 ;; #( 4705 /*) 4706 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4707 ;; #( 4708 no|'') 4709 ;; #( 4710 *) 4711 AC_MSG_RESULT([$with_sysroot]) 4712 AC_MSG_ERROR([The sysroot must be an absolute path.]) 4713 ;; 4714esac 4715 4716 AC_MSG_RESULT([${lt_sysroot:-no}]) 4717_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4718[dependent libraries, and where our libraries should be installed.])]) 4719 4720# _LT_ENABLE_LOCK 4721# --------------- 4722m4_defun([_LT_ENABLE_LOCK], 4723[AC_ARG_ENABLE([libtool-lock], 4724 [AS_HELP_STRING([--disable-libtool-lock], 4725 [avoid locking (might break parallel builds)])]) 4726test no = "$enable_libtool_lock" || enable_libtool_lock=yes 4727 4728# Some flags need to be propagated to the compiler or linker for good 4729# libtool support. 4730case $host in 4731ia64-*-hpux*) 4732 # Find out what ABI is being produced by ac_compile, and set mode 4733 # options accordingly. 4734 echo 'int i;' > conftest.$ac_ext 4735 if AC_TRY_EVAL(ac_compile); then 4736 case `$FILECMD conftest.$ac_objext` in 4737 *ELF-32*) 4738 HPUX_IA64_MODE=32 4739 ;; 4740 *ELF-64*) 4741 HPUX_IA64_MODE=64 4742 ;; 4743 esac 4744 fi 4745 rm -rf conftest* 4746 ;; 4747*-*-irix6*) 4748 # Find out what ABI is being produced by ac_compile, and set linker 4749 # options accordingly. 4750 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4751 if AC_TRY_EVAL(ac_compile); then 4752 if test yes = "$lt_cv_prog_gnu_ld"; then 4753 case `$FILECMD conftest.$ac_objext` in 4754 *32-bit*) 4755 LD="${LD-ld} -melf32bsmip" 4756 ;; 4757 *N32*) 4758 LD="${LD-ld} -melf32bmipn32" 4759 ;; 4760 *64-bit*) 4761 LD="${LD-ld} -melf64bmip" 4762 ;; 4763 esac 4764 else 4765 case `$FILECMD conftest.$ac_objext` in 4766 *32-bit*) 4767 LD="${LD-ld} -32" 4768 ;; 4769 *N32*) 4770 LD="${LD-ld} -n32" 4771 ;; 4772 *64-bit*) 4773 LD="${LD-ld} -64" 4774 ;; 4775 esac 4776 fi 4777 fi 4778 rm -rf conftest* 4779 ;; 4780 4781mips64*-*linux*) 4782 # Find out what ABI is being produced by ac_compile, and set linker 4783 # options accordingly. 4784 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4785 if AC_TRY_EVAL(ac_compile); then 4786 emul=elf 4787 case `$FILECMD conftest.$ac_objext` in 4788 *32-bit*) 4789 emul="${emul}32" 4790 ;; 4791 *64-bit*) 4792 emul="${emul}64" 4793 ;; 4794 esac 4795 case `$FILECMD conftest.$ac_objext` in 4796 *MSB*) 4797 emul="${emul}btsmip" 4798 ;; 4799 *LSB*) 4800 emul="${emul}ltsmip" 4801 ;; 4802 esac 4803 case `$FILECMD conftest.$ac_objext` in 4804 *N32*) 4805 emul="${emul}n32" 4806 ;; 4807 esac 4808 LD="${LD-ld} -m $emul" 4809 fi 4810 rm -rf conftest* 4811 ;; 4812 4813x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4814s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4815 # Find out what ABI is being produced by ac_compile, and set linker 4816 # options accordingly. Note that the listed cases only cover the 4817 # situations where additional linker options are needed (such as when 4818 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4819 # vice versa); the common cases where no linker options are needed do 4820 # not appear in the list. 4821 echo 'int i;' > conftest.$ac_ext 4822 if AC_TRY_EVAL(ac_compile); then 4823 case `$FILECMD conftest.o` in 4824 *32-bit*) 4825 case $host in 4826 x86_64-*kfreebsd*-gnu) 4827 LD="${LD-ld} -m elf_i386_fbsd" 4828 ;; 4829 x86_64-*linux*) 4830 case `$FILECMD conftest.o` in 4831 *x86-64*) 4832 LD="${LD-ld} -m elf32_x86_64" 4833 ;; 4834 *) 4835 LD="${LD-ld} -m elf_i386" 4836 ;; 4837 esac 4838 ;; 4839 powerpc64le-*linux*) 4840 LD="${LD-ld} -m elf32lppclinux" 4841 ;; 4842 powerpc64-*linux*) 4843 LD="${LD-ld} -m elf32ppclinux" 4844 ;; 4845 s390x-*linux*) 4846 LD="${LD-ld} -m elf_s390" 4847 ;; 4848 sparc64-*linux*) 4849 LD="${LD-ld} -m elf32_sparc" 4850 ;; 4851 esac 4852 ;; 4853 *64-bit*) 4854 case $host in 4855 x86_64-*kfreebsd*-gnu) 4856 LD="${LD-ld} -m elf_x86_64_fbsd" 4857 ;; 4858 x86_64-*linux*) 4859 LD="${LD-ld} -m elf_x86_64" 4860 ;; 4861 powerpcle-*linux*) 4862 LD="${LD-ld} -m elf64lppc" 4863 ;; 4864 powerpc-*linux*) 4865 LD="${LD-ld} -m elf64ppc" 4866 ;; 4867 s390*-*linux*|s390*-*tpf*) 4868 LD="${LD-ld} -m elf64_s390" 4869 ;; 4870 sparc*-*linux*) 4871 LD="${LD-ld} -m elf64_sparc" 4872 ;; 4873 esac 4874 ;; 4875 esac 4876 fi 4877 rm -rf conftest* 4878 ;; 4879 4880*-*-sco3.2v5*) 4881 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4882 SAVE_CFLAGS=$CFLAGS 4883 CFLAGS="$CFLAGS -belf" 4884 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4885 [AC_LANG_PUSH(C) 4886 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4887 AC_LANG_POP]) 4888 if test yes != "$lt_cv_cc_needs_belf"; then 4889 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4890 CFLAGS=$SAVE_CFLAGS 4891 fi 4892 ;; 4893*-*solaris*) 4894 # Find out what ABI is being produced by ac_compile, and set linker 4895 # options accordingly. 4896 echo 'int i;' > conftest.$ac_ext 4897 if AC_TRY_EVAL(ac_compile); then 4898 case `$FILECMD conftest.o` in 4899 *64-bit*) 4900 case $lt_cv_prog_gnu_ld in 4901 yes*) 4902 case $host in 4903 i?86-*-solaris*|x86_64-*-solaris*) 4904 LD="${LD-ld} -m elf_x86_64" 4905 ;; 4906 sparc*-*-solaris*) 4907 LD="${LD-ld} -m elf64_sparc" 4908 ;; 4909 esac 4910 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4911 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4912 LD=${LD-ld}_sol2 4913 fi 4914 ;; 4915 *) 4916 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4917 LD="${LD-ld} -64" 4918 fi 4919 ;; 4920 esac 4921 ;; 4922 esac 4923 fi 4924 rm -rf conftest* 4925 ;; 4926esac 4927 4928need_locks=$enable_libtool_lock 4929])# _LT_ENABLE_LOCK 4930 4931 4932# _LT_PROG_AR 4933# ----------- 4934m4_defun([_LT_PROG_AR], 4935[AC_CHECK_TOOLS(AR, [ar], false) 4936: ${AR=ar} 4937_LT_DECL([], [AR], [1], [The archiver]) 4938 4939# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4940# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4941# higher priority because thats what people were doing historically (setting 4942# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4943# variable obsoleted/removed. 4944 4945test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4946lt_ar_flags=$AR_FLAGS 4947_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4948 4949# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4950# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4951_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4952 [Flags to create an archive]) 4953 4954AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4955 [lt_cv_ar_at_file=no 4956 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4957 [echo conftest.$ac_objext > conftest.lst 4958 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4959 AC_TRY_EVAL([lt_ar_try]) 4960 if test 0 -eq "$ac_status"; then 4961 # Ensure the archiver fails upon bogus file names. 4962 rm -f conftest.$ac_objext libconftest.a 4963 AC_TRY_EVAL([lt_ar_try]) 4964 if test 0 -ne "$ac_status"; then 4965 lt_cv_ar_at_file=@ 4966 fi 4967 fi 4968 rm -f conftest.* libconftest.a 4969 ]) 4970 ]) 4971 4972if test no = "$lt_cv_ar_at_file"; then 4973 archiver_list_spec= 4974else 4975 archiver_list_spec=$lt_cv_ar_at_file 4976fi 4977_LT_DECL([], [archiver_list_spec], [1], 4978 [How to feed a file listing to the archiver]) 4979])# _LT_PROG_AR 4980 4981 4982# _LT_CMD_OLD_ARCHIVE 4983# ------------------- 4984m4_defun([_LT_CMD_OLD_ARCHIVE], 4985[_LT_PROG_AR 4986 4987AC_CHECK_TOOL(STRIP, strip, :) 4988test -z "$STRIP" && STRIP=: 4989_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4990 4991AC_CHECK_TOOL(RANLIB, ranlib, :) 4992test -z "$RANLIB" && RANLIB=: 4993_LT_DECL([], [RANLIB], [1], 4994 [Commands used to install an old-style archive]) 4995 4996# Determine commands to create old-style static archives. 4997old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4998old_postinstall_cmds='chmod 644 $oldlib' 4999old_postuninstall_cmds= 5000 5001if test -n "$RANLIB"; then 5002 case $host_os in 5003 bitrig* | openbsd*) 5004 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 5005 ;; 5006 *) 5007 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 5008 ;; 5009 esac 5010 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 5011fi 5012 5013case $host_os in 5014 darwin*) 5015 lock_old_archive_extraction=yes ;; 5016 *) 5017 lock_old_archive_extraction=no ;; 5018esac 5019_LT_DECL([], [old_postinstall_cmds], [2]) 5020_LT_DECL([], [old_postuninstall_cmds], [2]) 5021_LT_TAGDECL([], [old_archive_cmds], [2], 5022 [Commands used to build an old-style archive]) 5023_LT_DECL([], [lock_old_archive_extraction], [0], 5024 [Whether to use a lock for old archive extraction]) 5025])# _LT_CMD_OLD_ARCHIVE 5026 5027 5028# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5029# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 5030# ---------------------------------------------------------------- 5031# Check whether the given compiler option works 5032AC_DEFUN([_LT_COMPILER_OPTION], 5033[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5034m4_require([_LT_DECL_SED])dnl 5035AC_CACHE_CHECK([$1], [$2], 5036 [$2=no 5037 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5038 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5039 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5040 # Insert the option either (1) after the last *FLAGS variable, or 5041 # (2) before a word containing "conftest.", or (3) at the end. 5042 # Note that $ac_compile itself does not contain backslashes and begins 5043 # with a dollar sign (not a hyphen), so the echo should work correctly. 5044 # The option is referenced via a variable to avoid confusing sed. 5045 lt_compile=`echo "$ac_compile" | $SED \ 5046 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5047 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5048 -e 's:$: $lt_compiler_flag:'` 5049 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5050 (eval "$lt_compile" 2>conftest.err) 5051 ac_status=$? 5052 cat conftest.err >&AS_MESSAGE_LOG_FD 5053 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5054 if (exit $ac_status) && test -s "$ac_outfile"; then 5055 # The compiler can only warn and ignore the option if not recognized 5056 # So say no if there are warnings other than the usual output. 5057 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5058 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5059 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5060 $2=yes 5061 fi 5062 fi 5063 $RM conftest* 5064]) 5065 5066if test yes = "[$]$2"; then 5067 m4_if([$5], , :, [$5]) 5068else 5069 m4_if([$6], , :, [$6]) 5070fi 5071])# _LT_COMPILER_OPTION 5072 5073# Old name: 5074AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5075dnl aclocal-1.4 backwards compatibility: 5076dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5077 5078 5079# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5080# [ACTION-SUCCESS], [ACTION-FAILURE]) 5081# ---------------------------------------------------- 5082# Check whether the given linker option works 5083AC_DEFUN([_LT_LINKER_OPTION], 5084[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5085m4_require([_LT_DECL_SED])dnl 5086AC_CACHE_CHECK([$1], [$2], 5087 [$2=no 5088 save_LDFLAGS=$LDFLAGS 5089 LDFLAGS="$LDFLAGS $3" 5090 echo "$lt_simple_link_test_code" > conftest.$ac_ext 5091 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5092 # The linker can only warn and ignore the option if not recognized 5093 # So say no if there are warnings 5094 if test -s conftest.err; then 5095 # Append any errors to the config.log. 5096 cat conftest.err 1>&AS_MESSAGE_LOG_FD 5097 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5098 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5099 if diff conftest.exp conftest.er2 >/dev/null; then 5100 $2=yes 5101 fi 5102 else 5103 $2=yes 5104 fi 5105 fi 5106 $RM -r conftest* 5107 LDFLAGS=$save_LDFLAGS 5108]) 5109 5110if test yes = "[$]$2"; then 5111 m4_if([$4], , :, [$4]) 5112else 5113 m4_if([$5], , :, [$5]) 5114fi 5115])# _LT_LINKER_OPTION 5116 5117# Old name: 5118AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5119dnl aclocal-1.4 backwards compatibility: 5120dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5121 5122 5123# LT_CMD_MAX_LEN 5124#--------------- 5125AC_DEFUN([LT_CMD_MAX_LEN], 5126[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5127# find the maximum length of command line arguments 5128AC_MSG_CHECKING([the maximum length of command line arguments]) 5129AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5130 i=0 5131 teststring=ABCD 5132 5133 case $build_os in 5134 msdosdjgpp*) 5135 # On DJGPP, this test can blow up pretty badly due to problems in libc 5136 # (any single argument exceeding 2000 bytes causes a buffer overrun 5137 # during glob expansion). Even if it were fixed, the result of this 5138 # check would be larger than it should be. 5139 lt_cv_sys_max_cmd_len=12288; # 12K is about right 5140 ;; 5141 5142 gnu*) 5143 # Under GNU Hurd, this test is not required because there is 5144 # no limit to the length of command line arguments. 5145 # Libtool will interpret -1 as no limit whatsoever 5146 lt_cv_sys_max_cmd_len=-1; 5147 ;; 5148 5149 cygwin* | mingw* | cegcc*) 5150 # On Win9x/ME, this test blows up -- it succeeds, but takes 5151 # about 5 minutes as the teststring grows exponentially. 5152 # Worse, since 9x/ME are not pre-emptively multitasking, 5153 # you end up with a "frozen" computer, even though with patience 5154 # the test eventually succeeds (with a max line length of 256k). 5155 # Instead, let's just punt: use the minimum linelength reported by 5156 # all of the supported platforms: 8192 (on NT/2K/XP). 5157 lt_cv_sys_max_cmd_len=8192; 5158 ;; 5159 5160 mint*) 5161 # On MiNT this can take a long time and run out of memory. 5162 lt_cv_sys_max_cmd_len=8192; 5163 ;; 5164 5165 amigaos*) 5166 # On AmigaOS with pdksh, this test takes hours, literally. 5167 # So we just punt and use a minimum line length of 8192. 5168 lt_cv_sys_max_cmd_len=8192; 5169 ;; 5170 5171 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5172 # This has been around since 386BSD, at least. Likely further. 5173 if test -x /sbin/sysctl; then 5174 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5175 elif test -x /usr/sbin/sysctl; then 5176 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5177 else 5178 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5179 fi 5180 # And add a safety zone 5181 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5182 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5183 ;; 5184 5185 interix*) 5186 # We know the value 262144 and hardcode it with a safety zone (like BSD) 5187 lt_cv_sys_max_cmd_len=196608 5188 ;; 5189 5190 os2*) 5191 # The test takes a long time on OS/2. 5192 lt_cv_sys_max_cmd_len=8192 5193 ;; 5194 5195 osf*) 5196 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5197 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5198 # nice to cause kernel panics so lets avoid the loop below. 5199 # First set a reasonable default. 5200 lt_cv_sys_max_cmd_len=16384 5201 # 5202 if test -x /sbin/sysconfig; then 5203 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5204 *1*) lt_cv_sys_max_cmd_len=-1 ;; 5205 esac 5206 fi 5207 ;; 5208 sco3.2v5*) 5209 lt_cv_sys_max_cmd_len=102400 5210 ;; 5211 sysv5* | sco5v6* | sysv4.2uw2*) 5212 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5213 if test -n "$kargmax"; then 5214 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5215 else 5216 lt_cv_sys_max_cmd_len=32768 5217 fi 5218 ;; 5219 *) 5220 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5221 if test -n "$lt_cv_sys_max_cmd_len" && \ 5222 test undefined != "$lt_cv_sys_max_cmd_len"; then 5223 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5224 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5225 else 5226 # Make teststring a little bigger before we do anything with it. 5227 # a 1K string should be a reasonable start. 5228 for i in 1 2 3 4 5 6 7 8; do 5229 teststring=$teststring$teststring 5230 done 5231 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5232 # If test is not a shell built-in, we'll probably end up computing a 5233 # maximum length that is only half of the actual maximum length, but 5234 # we can't tell. 5235 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5236 = "X$teststring$teststring"; } >/dev/null 2>&1 && 5237 test 17 != "$i" # 1/2 MB should be enough 5238 do 5239 i=`expr $i + 1` 5240 teststring=$teststring$teststring 5241 done 5242 # Only check the string length outside the loop. 5243 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5244 teststring= 5245 # Add a significant safety factor because C++ compilers can tack on 5246 # massive amounts of additional arguments before passing them to the 5247 # linker. It appears as though 1/2 is a usable value. 5248 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5249 fi 5250 ;; 5251 esac 5252]) 5253if test -n "$lt_cv_sys_max_cmd_len"; then 5254 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5255else 5256 AC_MSG_RESULT(none) 5257fi 5258max_cmd_len=$lt_cv_sys_max_cmd_len 5259_LT_DECL([], [max_cmd_len], [0], 5260 [What is the maximum length of a command?]) 5261])# LT_CMD_MAX_LEN 5262 5263# Old name: 5264AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5265dnl aclocal-1.4 backwards compatibility: 5266dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5267 5268 5269# _LT_HEADER_DLFCN 5270# ---------------- 5271m4_defun([_LT_HEADER_DLFCN], 5272[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5273])# _LT_HEADER_DLFCN 5274 5275 5276# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5277# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5278# ---------------------------------------------------------------- 5279m4_defun([_LT_TRY_DLOPEN_SELF], 5280[m4_require([_LT_HEADER_DLFCN])dnl 5281if test yes = "$cross_compiling"; then : 5282 [$4] 5283else 5284 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5285 lt_status=$lt_dlunknown 5286 cat > conftest.$ac_ext <<_LT_EOF 5287[#line $LINENO "configure" 5288#include "confdefs.h" 5289 5290#if HAVE_DLFCN_H 5291#include <dlfcn.h> 5292#endif 5293 5294#include <stdio.h> 5295 5296#ifdef RTLD_GLOBAL 5297# define LT_DLGLOBAL RTLD_GLOBAL 5298#else 5299# ifdef DL_GLOBAL 5300# define LT_DLGLOBAL DL_GLOBAL 5301# else 5302# define LT_DLGLOBAL 0 5303# endif 5304#endif 5305 5306/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5307 find out it does not work in some platform. */ 5308#ifndef LT_DLLAZY_OR_NOW 5309# ifdef RTLD_LAZY 5310# define LT_DLLAZY_OR_NOW RTLD_LAZY 5311# else 5312# ifdef DL_LAZY 5313# define LT_DLLAZY_OR_NOW DL_LAZY 5314# else 5315# ifdef RTLD_NOW 5316# define LT_DLLAZY_OR_NOW RTLD_NOW 5317# else 5318# ifdef DL_NOW 5319# define LT_DLLAZY_OR_NOW DL_NOW 5320# else 5321# define LT_DLLAZY_OR_NOW 0 5322# endif 5323# endif 5324# endif 5325# endif 5326#endif 5327 5328/* When -fvisibility=hidden is used, assume the code has been annotated 5329 correspondingly for the symbols needed. */ 5330#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5331int fnord () __attribute__((visibility("default"))); 5332#endif 5333 5334int fnord () { return 42; } 5335int main () 5336{ 5337 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5338 int status = $lt_dlunknown; 5339 5340 if (self) 5341 { 5342 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5343 else 5344 { 5345 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5346 else puts (dlerror ()); 5347 } 5348 /* dlclose (self); */ 5349 } 5350 else 5351 puts (dlerror ()); 5352 5353 return status; 5354}] 5355_LT_EOF 5356 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5357 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5358 lt_status=$? 5359 case x$lt_status in 5360 x$lt_dlno_uscore) $1 ;; 5361 x$lt_dlneed_uscore) $2 ;; 5362 x$lt_dlunknown|x*) $3 ;; 5363 esac 5364 else : 5365 # compilation failed 5366 $3 5367 fi 5368fi 5369rm -fr conftest* 5370])# _LT_TRY_DLOPEN_SELF 5371 5372 5373# LT_SYS_DLOPEN_SELF 5374# ------------------ 5375AC_DEFUN([LT_SYS_DLOPEN_SELF], 5376[m4_require([_LT_HEADER_DLFCN])dnl 5377if test yes != "$enable_dlopen"; then 5378 enable_dlopen=unknown 5379 enable_dlopen_self=unknown 5380 enable_dlopen_self_static=unknown 5381else 5382 lt_cv_dlopen=no 5383 lt_cv_dlopen_libs= 5384 5385 case $host_os in 5386 beos*) 5387 lt_cv_dlopen=load_add_on 5388 lt_cv_dlopen_libs= 5389 lt_cv_dlopen_self=yes 5390 ;; 5391 5392 mingw* | pw32* | cegcc*) 5393 lt_cv_dlopen=LoadLibrary 5394 lt_cv_dlopen_libs= 5395 ;; 5396 5397 cygwin*) 5398 lt_cv_dlopen=dlopen 5399 lt_cv_dlopen_libs= 5400 ;; 5401 5402 darwin*) 5403 # if libdl is installed we need to link against it 5404 AC_CHECK_LIB([dl], [dlopen], 5405 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5406 lt_cv_dlopen=dyld 5407 lt_cv_dlopen_libs= 5408 lt_cv_dlopen_self=yes 5409 ]) 5410 ;; 5411 5412 tpf*) 5413 # Don't try to run any link tests for TPF. We know it's impossible 5414 # because TPF is a cross-compiler, and we know how we open DSOs. 5415 lt_cv_dlopen=dlopen 5416 lt_cv_dlopen_libs= 5417 lt_cv_dlopen_self=no 5418 ;; 5419 5420 *) 5421 AC_CHECK_FUNC([shl_load], 5422 [lt_cv_dlopen=shl_load], 5423 [AC_CHECK_LIB([dld], [shl_load], 5424 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5425 [AC_CHECK_FUNC([dlopen], 5426 [lt_cv_dlopen=dlopen], 5427 [AC_CHECK_LIB([dl], [dlopen], 5428 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5429 [AC_CHECK_LIB([svld], [dlopen], 5430 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5431 [AC_CHECK_LIB([dld], [dld_link], 5432 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5433 ]) 5434 ]) 5435 ]) 5436 ]) 5437 ]) 5438 ;; 5439 esac 5440 5441 if test no = "$lt_cv_dlopen"; then 5442 enable_dlopen=no 5443 else 5444 enable_dlopen=yes 5445 fi 5446 5447 case $lt_cv_dlopen in 5448 dlopen) 5449 save_CPPFLAGS=$CPPFLAGS 5450 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5451 5452 save_LDFLAGS=$LDFLAGS 5453 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5454 5455 save_LIBS=$LIBS 5456 LIBS="$lt_cv_dlopen_libs $LIBS" 5457 5458 AC_CACHE_CHECK([whether a program can dlopen itself], 5459 lt_cv_dlopen_self, [dnl 5460 _LT_TRY_DLOPEN_SELF( 5461 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5462 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5463 ]) 5464 5465 if test yes = "$lt_cv_dlopen_self"; then 5466 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5467 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5468 lt_cv_dlopen_self_static, [dnl 5469 _LT_TRY_DLOPEN_SELF( 5470 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5471 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5472 ]) 5473 fi 5474 5475 CPPFLAGS=$save_CPPFLAGS 5476 LDFLAGS=$save_LDFLAGS 5477 LIBS=$save_LIBS 5478 ;; 5479 esac 5480 5481 case $lt_cv_dlopen_self in 5482 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5483 *) enable_dlopen_self=unknown ;; 5484 esac 5485 5486 case $lt_cv_dlopen_self_static in 5487 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5488 *) enable_dlopen_self_static=unknown ;; 5489 esac 5490fi 5491_LT_DECL([dlopen_support], [enable_dlopen], [0], 5492 [Whether dlopen is supported]) 5493_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5494 [Whether dlopen of programs is supported]) 5495_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5496 [Whether dlopen of statically linked programs is supported]) 5497])# LT_SYS_DLOPEN_SELF 5498 5499# Old name: 5500AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5501dnl aclocal-1.4 backwards compatibility: 5502dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5503 5504 5505# _LT_COMPILER_C_O([TAGNAME]) 5506# --------------------------- 5507# Check to see if options -c and -o are simultaneously supported by compiler. 5508# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5509m4_defun([_LT_COMPILER_C_O], 5510[m4_require([_LT_DECL_SED])dnl 5511m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5512m4_require([_LT_TAG_COMPILER])dnl 5513AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5514 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5515 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5516 $RM -r conftest 2>/dev/null 5517 mkdir conftest 5518 cd conftest 5519 mkdir out 5520 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5521 5522 lt_compiler_flag="-o out/conftest2.$ac_objext" 5523 # Insert the option either (1) after the last *FLAGS variable, or 5524 # (2) before a word containing "conftest.", or (3) at the end. 5525 # Note that $ac_compile itself does not contain backslashes and begins 5526 # with a dollar sign (not a hyphen), so the echo should work correctly. 5527 lt_compile=`echo "$ac_compile" | $SED \ 5528 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5529 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5530 -e 's:$: $lt_compiler_flag:'` 5531 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5532 (eval "$lt_compile" 2>out/conftest.err) 5533 ac_status=$? 5534 cat out/conftest.err >&AS_MESSAGE_LOG_FD 5535 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5536 if (exit $ac_status) && test -s out/conftest2.$ac_objext 5537 then 5538 # The compiler can only warn and ignore the option if not recognized 5539 # So say no if there are warnings 5540 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5541 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5542 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5543 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5544 fi 5545 fi 5546 chmod u+w . 2>&AS_MESSAGE_LOG_FD 5547 $RM conftest* 5548 # SGI C++ compiler will create directory out/ii_files/ for 5549 # template instantiation 5550 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5551 $RM out/* && rmdir out 5552 cd .. 5553 $RM -r conftest 5554 $RM conftest* 5555]) 5556_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5557 [Does compiler simultaneously support -c and -o options?]) 5558])# _LT_COMPILER_C_O 5559 5560 5561# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5562# ---------------------------------- 5563# Check to see if we can do hard links to lock some files if needed 5564m4_defun([_LT_COMPILER_FILE_LOCKS], 5565[m4_require([_LT_ENABLE_LOCK])dnl 5566m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5567_LT_COMPILER_C_O([$1]) 5568 5569hard_links=nottested 5570if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5571 # do not overwrite the value of need_locks provided by the user 5572 AC_MSG_CHECKING([if we can lock with hard links]) 5573 hard_links=yes 5574 $RM conftest* 5575 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5576 touch conftest.a 5577 ln conftest.a conftest.b 2>&5 || hard_links=no 5578 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5579 AC_MSG_RESULT([$hard_links]) 5580 if test no = "$hard_links"; then 5581 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5582 need_locks=warn 5583 fi 5584else 5585 need_locks=no 5586fi 5587_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5588])# _LT_COMPILER_FILE_LOCKS 5589 5590 5591# _LT_CHECK_OBJDIR 5592# ---------------- 5593m4_defun([_LT_CHECK_OBJDIR], 5594[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5595[rm -f .libs 2>/dev/null 5596mkdir .libs 2>/dev/null 5597if test -d .libs; then 5598 lt_cv_objdir=.libs 5599else 5600 # MS-DOS does not allow filenames that begin with a dot. 5601 lt_cv_objdir=_libs 5602fi 5603rmdir .libs 2>/dev/null]) 5604objdir=$lt_cv_objdir 5605_LT_DECL([], [objdir], [0], 5606 [The name of the directory that contains temporary libtool files])dnl 5607m4_pattern_allow([LT_OBJDIR])dnl 5608AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5609 [Define to the sub-directory where libtool stores uninstalled libraries.]) 5610])# _LT_CHECK_OBJDIR 5611 5612 5613# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5614# -------------------------------------- 5615# Check hardcoding attributes. 5616m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5617[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5618_LT_TAGVAR(hardcode_action, $1)= 5619if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5620 test -n "$_LT_TAGVAR(runpath_var, $1)" || 5621 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5622 5623 # We can hardcode non-existent directories. 5624 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5625 # If the only mechanism to avoid hardcoding is shlibpath_var, we 5626 # have to relink, otherwise we might link with an installed library 5627 # when we should be linking with a yet-to-be-installed one 5628 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5629 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5630 # Linking always hardcodes the temporary library directory. 5631 _LT_TAGVAR(hardcode_action, $1)=relink 5632 else 5633 # We can link without hardcoding, and we can hardcode nonexisting dirs. 5634 _LT_TAGVAR(hardcode_action, $1)=immediate 5635 fi 5636else 5637 # We cannot hardcode anything, or else we can only hardcode existing 5638 # directories. 5639 _LT_TAGVAR(hardcode_action, $1)=unsupported 5640fi 5641AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5642 5643if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5644 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5645 # Fast installation is not supported 5646 enable_fast_install=no 5647elif test yes = "$shlibpath_overrides_runpath" || 5648 test no = "$enable_shared"; then 5649 # Fast installation is not necessary 5650 enable_fast_install=needless 5651fi 5652_LT_TAGDECL([], [hardcode_action], [0], 5653 [How to hardcode a shared library path into an executable]) 5654])# _LT_LINKER_HARDCODE_LIBPATH 5655 5656 5657# _LT_CMD_STRIPLIB 5658# ---------------- 5659m4_defun([_LT_CMD_STRIPLIB], 5660[m4_require([_LT_DECL_EGREP]) 5661striplib= 5662old_striplib= 5663AC_MSG_CHECKING([whether stripping libraries is possible]) 5664if test -z "$STRIP"; then 5665 AC_MSG_RESULT([no]) 5666else 5667 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5668 old_striplib="$STRIP --strip-debug" 5669 striplib="$STRIP --strip-unneeded" 5670 AC_MSG_RESULT([yes]) 5671 else 5672 case $host_os in 5673 darwin*) 5674 # FIXME - insert some real tests, host_os isn't really good enough 5675 striplib="$STRIP -x" 5676 old_striplib="$STRIP -S" 5677 AC_MSG_RESULT([yes]) 5678 ;; 5679 freebsd*) 5680 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5681 old_striplib="$STRIP --strip-debug" 5682 striplib="$STRIP --strip-unneeded" 5683 AC_MSG_RESULT([yes]) 5684 else 5685 AC_MSG_RESULT([no]) 5686 fi 5687 ;; 5688 *) 5689 AC_MSG_RESULT([no]) 5690 ;; 5691 esac 5692 fi 5693fi 5694_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5695_LT_DECL([], [striplib], [1]) 5696])# _LT_CMD_STRIPLIB 5697 5698 5699# _LT_PREPARE_MUNGE_PATH_LIST 5700# --------------------------- 5701# Make sure func_munge_path_list() is defined correctly. 5702m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5703[[# func_munge_path_list VARIABLE PATH 5704# ----------------------------------- 5705# VARIABLE is name of variable containing _space_ separated list of 5706# directories to be munged by the contents of PATH, which is string 5707# having a format: 5708# "DIR[:DIR]:" 5709# string "DIR[ DIR]" will be prepended to VARIABLE 5710# ":DIR[:DIR]" 5711# string "DIR[ DIR]" will be appended to VARIABLE 5712# "DIRP[:DIRP]::[DIRA:]DIRA" 5713# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5714# "DIRA[ DIRA]" will be appended to VARIABLE 5715# "DIR[:DIR]" 5716# VARIABLE will be replaced by "DIR[ DIR]" 5717func_munge_path_list () 5718{ 5719 case x@S|@2 in 5720 x) 5721 ;; 5722 *:) 5723 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5724 ;; 5725 x:*) 5726 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5727 ;; 5728 *::*) 5729 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5730 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5731 ;; 5732 *) 5733 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5734 ;; 5735 esac 5736} 5737]])# _LT_PREPARE_PATH_LIST 5738 5739 5740# _LT_SYS_DYNAMIC_LINKER([TAG]) 5741# ----------------------------- 5742# PORTME Fill in your ld.so characteristics 5743m4_defun([_LT_SYS_DYNAMIC_LINKER], 5744[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5745m4_require([_LT_DECL_EGREP])dnl 5746m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5747m4_require([_LT_DECL_OBJDUMP])dnl 5748m4_require([_LT_DECL_SED])dnl 5749m4_require([_LT_CHECK_SHELL_FEATURES])dnl 5750m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5751AC_MSG_CHECKING([dynamic linker characteristics]) 5752m4_if([$1], 5753 [], [ 5754if test yes = "$GCC"; then 5755 case $host_os in 5756 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5757 *) lt_awk_arg='/^libraries:/' ;; 5758 esac 5759 case $host_os in 5760 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5761 *) lt_sed_strip_eq='s|=/|/|g' ;; 5762 esac 5763 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5764 case $lt_search_path_spec in 5765 *\;*) 5766 # if the path contains ";" then we assume it to be the separator 5767 # otherwise default to the standard path separator (i.e. ":") - it is 5768 # assumed that no part of a normal pathname contains ";" but that should 5769 # okay in the real world where ";" in dirpaths is itself problematic. 5770 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5771 ;; 5772 *) 5773 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5774 ;; 5775 esac 5776 # Ok, now we have the path, separated by spaces, we can step through it 5777 # and add multilib dir if necessary... 5778 lt_tmp_lt_search_path_spec= 5779 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5780 # ...but if some path component already ends with the multilib dir we assume 5781 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5782 case "$lt_multi_os_dir; $lt_search_path_spec " in 5783 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5784 lt_multi_os_dir= 5785 ;; 5786 esac 5787 for lt_sys_path in $lt_search_path_spec; do 5788 if test -d "$lt_sys_path$lt_multi_os_dir"; then 5789 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5790 elif test -n "$lt_multi_os_dir"; then 5791 test -d "$lt_sys_path" && \ 5792 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5793 fi 5794 done 5795 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5796BEGIN {RS = " "; FS = "/|\n";} { 5797 lt_foo = ""; 5798 lt_count = 0; 5799 for (lt_i = NF; lt_i > 0; lt_i--) { 5800 if ($lt_i != "" && $lt_i != ".") { 5801 if ($lt_i == "..") { 5802 lt_count++; 5803 } else { 5804 if (lt_count == 0) { 5805 lt_foo = "/" $lt_i lt_foo; 5806 } else { 5807 lt_count--; 5808 } 5809 } 5810 } 5811 } 5812 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5813 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5814}'` 5815 # AWK program above erroneously prepends '/' to C:/dos/paths 5816 # for these hosts. 5817 case $host_os in 5818 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5819 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5820 esac 5821 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5822else 5823 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5824fi]) 5825library_names_spec= 5826libname_spec='lib$name' 5827soname_spec= 5828shrext_cmds=.so 5829postinstall_cmds= 5830postuninstall_cmds= 5831finish_cmds= 5832finish_eval= 5833shlibpath_var= 5834shlibpath_overrides_runpath=unknown 5835version_type=none 5836dynamic_linker="$host_os ld.so" 5837sys_lib_dlsearch_path_spec="/lib /usr/lib" 5838need_lib_prefix=unknown 5839hardcode_into_libs=no 5840 5841# when you set need_version to no, make sure it does not cause -set_version 5842# flags to be left without arguments 5843need_version=unknown 5844 5845AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5846[User-defined run-time library search path.]) 5847 5848case $host_os in 5849aix3*) 5850 version_type=linux # correct to gnu/linux during the next big refactor 5851 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5852 shlibpath_var=LIBPATH 5853 5854 # AIX 3 has no versioning support, so we append a major version to the name. 5855 soname_spec='$libname$release$shared_ext$major' 5856 ;; 5857 5858aix[[4-9]]*) 5859 version_type=linux # correct to gnu/linux during the next big refactor 5860 need_lib_prefix=no 5861 need_version=no 5862 hardcode_into_libs=yes 5863 if test ia64 = "$host_cpu"; then 5864 # AIX 5 supports IA64 5865 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5866 shlibpath_var=LD_LIBRARY_PATH 5867 else 5868 # With GCC up to 2.95.x, collect2 would create an import file 5869 # for dependence libraries. The import file would start with 5870 # the line '#! .'. This would cause the generated library to 5871 # depend on '.', always an invalid library. This was fixed in 5872 # development snapshots of GCC prior to 3.0. 5873 case $host_os in 5874 aix4 | aix4.[[01]] | aix4.[[01]].*) 5875 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5876 echo ' yes ' 5877 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5878 : 5879 else 5880 can_build_shared=no 5881 fi 5882 ;; 5883 esac 5884 # Using Import Files as archive members, it is possible to support 5885 # filename-based versioning of shared library archives on AIX. While 5886 # this would work for both with and without runtime linking, it will 5887 # prevent static linking of such archives. So we do filename-based 5888 # shared library versioning with .so extension only, which is used 5889 # when both runtime linking and shared linking is enabled. 5890 # Unfortunately, runtime linking may impact performance, so we do 5891 # not want this to be the default eventually. Also, we use the 5892 # versioned .so libs for executables only if there is the -brtl 5893 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5894 # To allow for filename-based versioning support, we need to create 5895 # libNAME.so.V as an archive file, containing: 5896 # *) an Import File, referring to the versioned filename of the 5897 # archive as well as the shared archive member, telling the 5898 # bitwidth (32 or 64) of that shared object, and providing the 5899 # list of exported symbols of that shared object, eventually 5900 # decorated with the 'weak' keyword 5901 # *) the shared object with the F_LOADONLY flag set, to really avoid 5902 # it being seen by the linker. 5903 # At run time we better use the real file rather than another symlink, 5904 # but for link time we create the symlink libNAME.so -> libNAME.so.V 5905 5906 case $with_aix_soname,$aix_use_runtimelinking in 5907 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5908 # soname into executable. Probably we can add versioning support to 5909 # collect2, so additional links can be useful in future. 5910 aix,yes) # traditional libtool 5911 dynamic_linker='AIX unversionable lib.so' 5912 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5913 # instead of lib<name>.a to let people know that these are not 5914 # typical AIX shared libraries. 5915 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5916 ;; 5917 aix,no) # traditional AIX only 5918 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5919 # We preserve .a as extension for shared libraries through AIX4.2 5920 # and later when we are not doing run time linking. 5921 library_names_spec='$libname$release.a $libname.a' 5922 soname_spec='$libname$release$shared_ext$major' 5923 ;; 5924 svr4,*) # full svr4 only 5925 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5926 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5927 # We do not specify a path in Import Files, so LIBPATH fires. 5928 shlibpath_overrides_runpath=yes 5929 ;; 5930 *,yes) # both, prefer svr4 5931 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5932 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5933 # unpreferred sharedlib libNAME.a needs extra handling 5934 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"' 5935 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"' 5936 # We do not specify a path in Import Files, so LIBPATH fires. 5937 shlibpath_overrides_runpath=yes 5938 ;; 5939 *,no) # both, prefer aix 5940 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5941 library_names_spec='$libname$release.a $libname.a' 5942 soname_spec='$libname$release$shared_ext$major' 5943 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5944 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)' 5945 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"' 5946 ;; 5947 esac 5948 shlibpath_var=LIBPATH 5949 fi 5950 ;; 5951 5952amigaos*) 5953 case $host_cpu in 5954 powerpc) 5955 # Since July 2007 AmigaOS4 officially supports .so libraries. 5956 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5957 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5958 ;; 5959 m68k) 5960 library_names_spec='$libname.ixlibrary $libname.a' 5961 # Create ${libname}_ixlibrary.a entries in /sys/libs. 5962 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' 5963 ;; 5964 esac 5965 ;; 5966 5967beos*) 5968 library_names_spec='$libname$shared_ext' 5969 dynamic_linker="$host_os ld.so" 5970 shlibpath_var=LIBRARY_PATH 5971 ;; 5972 5973bsdi[[45]]*) 5974 version_type=linux # correct to gnu/linux during the next big refactor 5975 need_version=no 5976 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5977 soname_spec='$libname$release$shared_ext$major' 5978 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5979 shlibpath_var=LD_LIBRARY_PATH 5980 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5981 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5982 # the default ld.so.conf also contains /usr/contrib/lib and 5983 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5984 # libtool to hard-code these into programs 5985 ;; 5986 5987cygwin* | mingw* | pw32* | cegcc*) 5988 version_type=windows 5989 shrext_cmds=.dll 5990 need_version=no 5991 need_lib_prefix=no 5992 5993 case $GCC,$cc_basename in 5994 yes,*) 5995 # gcc 5996 library_names_spec='$libname.dll.a' 5997 # DLL is installed to $(libdir)/../bin by postinstall_cmds 5998 postinstall_cmds='base_file=`basename \$file`~ 5999 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6000 dldir=$destdir/`dirname \$dlpath`~ 6001 test -d \$dldir || mkdir -p \$dldir~ 6002 $install_prog $dir/$dlname \$dldir/$dlname~ 6003 chmod a+x \$dldir/$dlname~ 6004 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6005 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6006 fi' 6007 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6008 dlpath=$dir/\$dldll~ 6009 $RM \$dlpath' 6010 shlibpath_overrides_runpath=yes 6011 6012 case $host_os in 6013 cygwin*) 6014 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 6015 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6016m4_if([$1], [],[ 6017 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 6018 ;; 6019 mingw* | cegcc*) 6020 # MinGW DLLs use traditional 'lib' prefix 6021 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6022 ;; 6023 pw32*) 6024 # pw32 DLLs use 'pw' prefix rather than 'lib' 6025 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6026 ;; 6027 esac 6028 dynamic_linker='Win32 ld.exe' 6029 ;; 6030 6031 *,cl* | *,icl*) 6032 # Native MSVC or ICC 6033 libname_spec='$name' 6034 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6035 library_names_spec='$libname.dll.lib' 6036 6037 case $build_os in 6038 mingw*) 6039 sys_lib_search_path_spec= 6040 lt_save_ifs=$IFS 6041 IFS=';' 6042 for lt_path in $LIB 6043 do 6044 IFS=$lt_save_ifs 6045 # Let DOS variable expansion print the short 8.3 style file name. 6046 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6047 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6048 done 6049 IFS=$lt_save_ifs 6050 # Convert to MSYS style. 6051 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6052 ;; 6053 cygwin*) 6054 # Convert to unix form, then to dos form, then back to unix form 6055 # but this time dos style (no spaces!) so that the unix form looks 6056 # like /cygdrive/c/PROGRA~1:/cygdr... 6057 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6058 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6059 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6060 ;; 6061 *) 6062 sys_lib_search_path_spec=$LIB 6063 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6064 # It is most probably a Windows format PATH. 6065 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6066 else 6067 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6068 fi 6069 # FIXME: find the short name or the path components, as spaces are 6070 # common. (e.g. "Program Files" -> "PROGRA~1") 6071 ;; 6072 esac 6073 6074 # DLL is installed to $(libdir)/../bin by postinstall_cmds 6075 postinstall_cmds='base_file=`basename \$file`~ 6076 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6077 dldir=$destdir/`dirname \$dlpath`~ 6078 test -d \$dldir || mkdir -p \$dldir~ 6079 $install_prog $dir/$dlname \$dldir/$dlname' 6080 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6081 dlpath=$dir/\$dldll~ 6082 $RM \$dlpath' 6083 shlibpath_overrides_runpath=yes 6084 dynamic_linker='Win32 link.exe' 6085 ;; 6086 6087 *) 6088 # Assume MSVC and ICC wrapper 6089 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6090 dynamic_linker='Win32 ld.exe' 6091 ;; 6092 esac 6093 # FIXME: first we should search . and the directory the executable is in 6094 shlibpath_var=PATH 6095 ;; 6096 6097darwin* | rhapsody*) 6098 dynamic_linker="$host_os dyld" 6099 version_type=darwin 6100 need_lib_prefix=no 6101 need_version=no 6102 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6103 soname_spec='$libname$release$major$shared_ext' 6104 shlibpath_overrides_runpath=yes 6105 shlibpath_var=DYLD_LIBRARY_PATH 6106 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6107m4_if([$1], [],[ 6108 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6109 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6110 ;; 6111 6112dgux*) 6113 version_type=linux # correct to gnu/linux during the next big refactor 6114 need_lib_prefix=no 6115 need_version=no 6116 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6117 soname_spec='$libname$release$shared_ext$major' 6118 shlibpath_var=LD_LIBRARY_PATH 6119 ;; 6120 6121freebsd* | dragonfly* | midnightbsd*) 6122 # DragonFly does not have aout. When/if they implement a new 6123 # versioning mechanism, adjust this. 6124 if test -x /usr/bin/objformat; then 6125 objformat=`/usr/bin/objformat` 6126 else 6127 case $host_os in 6128 freebsd[[23]].*) objformat=aout ;; 6129 *) objformat=elf ;; 6130 esac 6131 fi 6132 version_type=freebsd-$objformat 6133 case $version_type in 6134 freebsd-elf*) 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 need_version=no 6138 need_lib_prefix=no 6139 ;; 6140 freebsd-*) 6141 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6142 need_version=yes 6143 ;; 6144 esac 6145 shlibpath_var=LD_LIBRARY_PATH 6146 case $host_os in 6147 freebsd2.*) 6148 shlibpath_overrides_runpath=yes 6149 ;; 6150 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6151 shlibpath_overrides_runpath=yes 6152 hardcode_into_libs=yes 6153 ;; 6154 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6155 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6156 shlibpath_overrides_runpath=no 6157 hardcode_into_libs=yes 6158 ;; 6159 *) # from 4.6 on, and DragonFly 6160 shlibpath_overrides_runpath=yes 6161 hardcode_into_libs=yes 6162 ;; 6163 esac 6164 ;; 6165 6166haiku*) 6167 version_type=linux # correct to gnu/linux during the next big refactor 6168 need_lib_prefix=no 6169 need_version=no 6170 dynamic_linker="$host_os runtime_loader" 6171 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6172 soname_spec='$libname$release$shared_ext$major' 6173 shlibpath_var=LIBRARY_PATH 6174 shlibpath_overrides_runpath=no 6175 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6176 hardcode_into_libs=yes 6177 ;; 6178 6179hpux9* | hpux10* | hpux11*) 6180 # Give a soname corresponding to the major version so that dld.sl refuses to 6181 # link against other versions. 6182 version_type=sunos 6183 need_lib_prefix=no 6184 need_version=no 6185 case $host_cpu in 6186 ia64*) 6187 shrext_cmds='.so' 6188 hardcode_into_libs=yes 6189 dynamic_linker="$host_os dld.so" 6190 shlibpath_var=LD_LIBRARY_PATH 6191 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6192 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6193 soname_spec='$libname$release$shared_ext$major' 6194 if test 32 = "$HPUX_IA64_MODE"; then 6195 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6196 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6197 else 6198 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6199 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6200 fi 6201 ;; 6202 hppa*64*) 6203 shrext_cmds='.sl' 6204 hardcode_into_libs=yes 6205 dynamic_linker="$host_os dld.sl" 6206 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6207 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6208 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6209 soname_spec='$libname$release$shared_ext$major' 6210 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6211 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6212 ;; 6213 *) 6214 shrext_cmds='.sl' 6215 dynamic_linker="$host_os dld.sl" 6216 shlibpath_var=SHLIB_PATH 6217 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6218 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6219 soname_spec='$libname$release$shared_ext$major' 6220 ;; 6221 esac 6222 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6223 postinstall_cmds='chmod 555 $lib' 6224 # or fails outright, so override atomically: 6225 install_override_mode=555 6226 ;; 6227 6228interix[[3-9]]*) 6229 version_type=linux # correct to gnu/linux during the next big refactor 6230 need_lib_prefix=no 6231 need_version=no 6232 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6233 soname_spec='$libname$release$shared_ext$major' 6234 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6235 shlibpath_var=LD_LIBRARY_PATH 6236 shlibpath_overrides_runpath=no 6237 hardcode_into_libs=yes 6238 ;; 6239 6240irix5* | irix6* | nonstopux*) 6241 case $host_os in 6242 nonstopux*) version_type=nonstopux ;; 6243 *) 6244 if test yes = "$lt_cv_prog_gnu_ld"; then 6245 version_type=linux # correct to gnu/linux during the next big refactor 6246 else 6247 version_type=irix 6248 fi ;; 6249 esac 6250 need_lib_prefix=no 6251 need_version=no 6252 soname_spec='$libname$release$shared_ext$major' 6253 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6254 case $host_os in 6255 irix5* | nonstopux*) 6256 libsuff= shlibsuff= 6257 ;; 6258 *) 6259 case $LD in # libtool.m4 will add one of these switches to LD 6260 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6261 libsuff= shlibsuff= libmagic=32-bit;; 6262 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6263 libsuff=32 shlibsuff=N32 libmagic=N32;; 6264 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6265 libsuff=64 shlibsuff=64 libmagic=64-bit;; 6266 *) libsuff= shlibsuff= libmagic=never-match;; 6267 esac 6268 ;; 6269 esac 6270 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6271 shlibpath_overrides_runpath=no 6272 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6273 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6274 hardcode_into_libs=yes 6275 ;; 6276 6277# No shared lib support for Linux oldld, aout, or coff. 6278linux*oldld* | linux*aout* | linux*coff*) 6279 dynamic_linker=no 6280 ;; 6281 6282linux*android*) 6283 version_type=none # Android doesn't support versioned libraries. 6284 need_lib_prefix=no 6285 need_version=no 6286 library_names_spec='$libname$release$shared_ext' 6287 soname_spec='$libname$release$shared_ext' 6288 finish_cmds= 6289 shlibpath_var=LD_LIBRARY_PATH 6290 shlibpath_overrides_runpath=yes 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 dynamic_linker='Android linker' 6298 # Don't embed -rpath directories since the linker doesn't support them. 6299 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6300 ;; 6301 6302# This must be glibc/ELF. 6303linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6304 version_type=linux # correct to gnu/linux during the next big refactor 6305 need_lib_prefix=no 6306 need_version=no 6307 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6308 soname_spec='$libname$release$shared_ext$major' 6309 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6310 shlibpath_var=LD_LIBRARY_PATH 6311 shlibpath_overrides_runpath=no 6312 6313 # Some binutils ld are patched to set DT_RUNPATH 6314 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6315 [lt_cv_shlibpath_overrides_runpath=no 6316 save_LDFLAGS=$LDFLAGS 6317 save_libdir=$libdir 6318 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6319 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6320 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6321 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6322 [lt_cv_shlibpath_overrides_runpath=yes])]) 6323 LDFLAGS=$save_LDFLAGS 6324 libdir=$save_libdir 6325 ]) 6326 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6327 6328 # This implies no fast_install, which is unacceptable. 6329 # Some rework will be needed to allow for fast_install 6330 # before this can be enabled. 6331 hardcode_into_libs=yes 6332 6333 # Ideally, we could use ldconfig to report *all* directores which are 6334 # searched for libraries, however this is still not possible. Aside from not 6335 # being certain /sbin/ldconfig is available, command 6336 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6337 # even though it is searched at run-time. Try to do the best guess by 6338 # appending ld.so.conf contents (and includes) to the search path. 6339 if test -f /etc/ld.so.conf; then 6340 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' ' '` 6341 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6342 fi 6343 6344 # We used to test for /lib/ld.so.1 and disable shared libraries on 6345 # powerpc, because MkLinux only supported shared libraries with the 6346 # GNU dynamic linker. Since this was broken with cross compilers, 6347 # most powerpc-linux boxes support dynamic linking these days and 6348 # people can always --disable-shared, the test was removed, and we 6349 # assume the GNU/Linux dynamic linker is in use. 6350 dynamic_linker='GNU/Linux ld.so' 6351 ;; 6352 6353netbsd*) 6354 version_type=sunos 6355 need_lib_prefix=no 6356 need_version=no 6357 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6358 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6359 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6360 dynamic_linker='NetBSD (a.out) ld.so' 6361 else 6362 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6363 soname_spec='$libname$release$shared_ext$major' 6364 dynamic_linker='NetBSD ld.elf_so' 6365 fi 6366 shlibpath_var=LD_LIBRARY_PATH 6367 shlibpath_overrides_runpath=yes 6368 hardcode_into_libs=yes 6369 ;; 6370 6371newsos6) 6372 version_type=linux # correct to gnu/linux during the next big refactor 6373 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6374 shlibpath_var=LD_LIBRARY_PATH 6375 shlibpath_overrides_runpath=yes 6376 ;; 6377 6378*nto* | *qnx*) 6379 version_type=qnx 6380 need_lib_prefix=no 6381 need_version=no 6382 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6383 soname_spec='$libname$release$shared_ext$major' 6384 shlibpath_var=LD_LIBRARY_PATH 6385 shlibpath_overrides_runpath=no 6386 hardcode_into_libs=yes 6387 dynamic_linker='ldqnx.so' 6388 ;; 6389 6390openbsd* | bitrig*) 6391 version_type=sunos 6392 sys_lib_dlsearch_path_spec=/usr/lib 6393 need_lib_prefix=no 6394 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6395 need_version=no 6396 else 6397 need_version=yes 6398 fi 6399 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6400 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6401 shlibpath_var=LD_LIBRARY_PATH 6402 shlibpath_overrides_runpath=yes 6403 ;; 6404 6405os2*) 6406 libname_spec='$name' 6407 version_type=windows 6408 shrext_cmds=.dll 6409 need_version=no 6410 need_lib_prefix=no 6411 # OS/2 can only load a DLL with a base name of 8 characters or less. 6412 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6413 v=$($ECHO $release$versuffix | tr -d .-); 6414 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6415 $ECHO $n$v`$shared_ext' 6416 library_names_spec='${libname}_dll.$libext' 6417 dynamic_linker='OS/2 ld.exe' 6418 shlibpath_var=BEGINLIBPATH 6419 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6420 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6421 postinstall_cmds='base_file=`basename \$file`~ 6422 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6423 dldir=$destdir/`dirname \$dlpath`~ 6424 test -d \$dldir || mkdir -p \$dldir~ 6425 $install_prog $dir/$dlname \$dldir/$dlname~ 6426 chmod a+x \$dldir/$dlname~ 6427 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6428 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6429 fi' 6430 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6431 dlpath=$dir/\$dldll~ 6432 $RM \$dlpath' 6433 ;; 6434 6435osf3* | osf4* | osf5*) 6436 version_type=osf 6437 need_lib_prefix=no 6438 need_version=no 6439 soname_spec='$libname$release$shared_ext$major' 6440 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6441 shlibpath_var=LD_LIBRARY_PATH 6442 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6443 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6444 ;; 6445 6446rdos*) 6447 dynamic_linker=no 6448 ;; 6449 6450solaris*) 6451 version_type=linux # correct to gnu/linux during the next big refactor 6452 need_lib_prefix=no 6453 need_version=no 6454 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6455 soname_spec='$libname$release$shared_ext$major' 6456 shlibpath_var=LD_LIBRARY_PATH 6457 shlibpath_overrides_runpath=yes 6458 hardcode_into_libs=yes 6459 # ldd complains unless libraries are executable 6460 postinstall_cmds='chmod +x $lib' 6461 ;; 6462 6463sunos4*) 6464 version_type=sunos 6465 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6466 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6467 shlibpath_var=LD_LIBRARY_PATH 6468 shlibpath_overrides_runpath=yes 6469 if test yes = "$with_gnu_ld"; then 6470 need_lib_prefix=no 6471 fi 6472 need_version=yes 6473 ;; 6474 6475sysv4 | sysv4.3*) 6476 version_type=linux # correct to gnu/linux during the next big refactor 6477 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6478 soname_spec='$libname$release$shared_ext$major' 6479 shlibpath_var=LD_LIBRARY_PATH 6480 case $host_vendor in 6481 sni) 6482 shlibpath_overrides_runpath=no 6483 need_lib_prefix=no 6484 runpath_var=LD_RUN_PATH 6485 ;; 6486 siemens) 6487 need_lib_prefix=no 6488 ;; 6489 motorola) 6490 need_lib_prefix=no 6491 need_version=no 6492 shlibpath_overrides_runpath=no 6493 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6494 ;; 6495 esac 6496 ;; 6497 6498sysv4*MP*) 6499 if test -d /usr/nec; then 6500 version_type=linux # correct to gnu/linux during the next big refactor 6501 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6502 soname_spec='$libname$shared_ext.$major' 6503 shlibpath_var=LD_LIBRARY_PATH 6504 fi 6505 ;; 6506 6507sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6508 version_type=sco 6509 need_lib_prefix=no 6510 need_version=no 6511 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6512 soname_spec='$libname$release$shared_ext$major' 6513 shlibpath_var=LD_LIBRARY_PATH 6514 shlibpath_overrides_runpath=yes 6515 hardcode_into_libs=yes 6516 if test yes = "$with_gnu_ld"; then 6517 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6518 else 6519 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6520 case $host_os in 6521 sco3.2v5*) 6522 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6523 ;; 6524 esac 6525 fi 6526 sys_lib_dlsearch_path_spec='/usr/lib' 6527 ;; 6528 6529tpf*) 6530 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6531 version_type=linux # correct to gnu/linux during the next big refactor 6532 need_lib_prefix=no 6533 need_version=no 6534 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6535 shlibpath_var=LD_LIBRARY_PATH 6536 shlibpath_overrides_runpath=no 6537 hardcode_into_libs=yes 6538 ;; 6539 6540uts4*) 6541 version_type=linux # correct to gnu/linux during the next big refactor 6542 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6543 soname_spec='$libname$release$shared_ext$major' 6544 shlibpath_var=LD_LIBRARY_PATH 6545 ;; 6546 6547*) 6548 dynamic_linker=no 6549 ;; 6550esac 6551AC_MSG_RESULT([$dynamic_linker]) 6552test no = "$dynamic_linker" && can_build_shared=no 6553 6554variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6555if test yes = "$GCC"; then 6556 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6557fi 6558 6559if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6560 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6561fi 6562 6563if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6564 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6565fi 6566 6567# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6568configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6569 6570# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6571func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6572 6573# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6574configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6575 6576_LT_DECL([], [variables_saved_for_relink], [1], 6577 [Variables whose values should be saved in libtool wrapper scripts and 6578 restored at link time]) 6579_LT_DECL([], [need_lib_prefix], [0], 6580 [Do we need the "lib" prefix for modules?]) 6581_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6582_LT_DECL([], [version_type], [0], [Library versioning type]) 6583_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6584_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6585_LT_DECL([], [shlibpath_overrides_runpath], [0], 6586 [Is shlibpath searched before the hard-coded library search path?]) 6587_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6588_LT_DECL([], [library_names_spec], [1], 6589 [[List of archive names. First name is the real one, the rest are links. 6590 The last name is the one that the linker finds with -lNAME]]) 6591_LT_DECL([], [soname_spec], [1], 6592 [[The coded name of the library, if different from the real name]]) 6593_LT_DECL([], [install_override_mode], [1], 6594 [Permission mode override for installation of shared libraries]) 6595_LT_DECL([], [postinstall_cmds], [2], 6596 [Command to use after installation of a shared archive]) 6597_LT_DECL([], [postuninstall_cmds], [2], 6598 [Command to use after uninstallation of a shared archive]) 6599_LT_DECL([], [finish_cmds], [2], 6600 [Commands used to finish a libtool library installation in a directory]) 6601_LT_DECL([], [finish_eval], [1], 6602 [[As "finish_cmds", except a single script fragment to be evaled but 6603 not shown]]) 6604_LT_DECL([], [hardcode_into_libs], [0], 6605 [Whether we should hardcode library paths into libraries]) 6606_LT_DECL([], [sys_lib_search_path_spec], [2], 6607 [Compile-time system search path for libraries]) 6608_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6609 [Detected run-time system search path for libraries]) 6610_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6611 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6612])# _LT_SYS_DYNAMIC_LINKER 6613 6614 6615# _LT_PATH_TOOL_PREFIX(TOOL) 6616# -------------------------- 6617# find a file program that can recognize shared library 6618AC_DEFUN([_LT_PATH_TOOL_PREFIX], 6619[m4_require([_LT_DECL_EGREP])dnl 6620AC_MSG_CHECKING([for $1]) 6621AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6622[case $MAGIC_CMD in 6623[[\\/*] | ?:[\\/]*]) 6624 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6625 ;; 6626*) 6627 lt_save_MAGIC_CMD=$MAGIC_CMD 6628 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6629dnl $ac_dummy forces splitting on constant user-supplied paths. 6630dnl POSIX.2 word splitting is done only on the output of word expansions, 6631dnl not every word. This closes a longstanding sh security hole. 6632 ac_dummy="m4_if([$2], , $PATH, [$2])" 6633 for ac_dir in $ac_dummy; do 6634 IFS=$lt_save_ifs 6635 test -z "$ac_dir" && ac_dir=. 6636 if test -f "$ac_dir/$1"; then 6637 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6638 if test -n "$file_magic_test_file"; then 6639 case $deplibs_check_method in 6640 "file_magic "*) 6641 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6642 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6643 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6644 $EGREP "$file_magic_regex" > /dev/null; then 6645 : 6646 else 6647 cat <<_LT_EOF 1>&2 6648 6649*** Warning: the command libtool uses to detect shared libraries, 6650*** $file_magic_cmd, produces output that libtool cannot recognize. 6651*** The result is that libtool may fail to recognize shared libraries 6652*** as such. This will affect the creation of libtool libraries that 6653*** depend on shared libraries, but programs linked with such libtool 6654*** libraries will work regardless of this problem. Nevertheless, you 6655*** may want to report the problem to your system manager and/or to 6656*** bug-libtool@gnu.org 6657 6658_LT_EOF 6659 fi ;; 6660 esac 6661 fi 6662 break 6663 fi 6664 done 6665 IFS=$lt_save_ifs 6666 MAGIC_CMD=$lt_save_MAGIC_CMD 6667 ;; 6668esac]) 6669MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6670if test -n "$MAGIC_CMD"; then 6671 AC_MSG_RESULT($MAGIC_CMD) 6672else 6673 AC_MSG_RESULT(no) 6674fi 6675_LT_DECL([], [MAGIC_CMD], [0], 6676 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6677])# _LT_PATH_TOOL_PREFIX 6678 6679# Old name: 6680AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6681dnl aclocal-1.4 backwards compatibility: 6682dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6683 6684 6685# _LT_PATH_MAGIC 6686# -------------- 6687# find a file program that can recognize a shared library 6688m4_defun([_LT_PATH_MAGIC], 6689[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6690if test -z "$lt_cv_path_MAGIC_CMD"; then 6691 if test -n "$ac_tool_prefix"; then 6692 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6693 else 6694 MAGIC_CMD=: 6695 fi 6696fi 6697])# _LT_PATH_MAGIC 6698 6699 6700# LT_PATH_LD 6701# ---------- 6702# find the pathname to the GNU or non-GNU linker 6703AC_DEFUN([LT_PATH_LD], 6704[AC_REQUIRE([AC_PROG_CC])dnl 6705AC_REQUIRE([AC_CANONICAL_HOST])dnl 6706AC_REQUIRE([AC_CANONICAL_BUILD])dnl 6707m4_require([_LT_DECL_SED])dnl 6708m4_require([_LT_DECL_EGREP])dnl 6709m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6710 6711AC_ARG_WITH([gnu-ld], 6712 [AS_HELP_STRING([--with-gnu-ld], 6713 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6714 [test no = "$withval" || with_gnu_ld=yes], 6715 [with_gnu_ld=no])dnl 6716 6717ac_prog=ld 6718if test yes = "$GCC"; then 6719 # Check if gcc -print-prog-name=ld gives a path. 6720 AC_MSG_CHECKING([for ld used by $CC]) 6721 case $host in 6722 *-*-mingw*) 6723 # gcc leaves a trailing carriage return, which upsets mingw 6724 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6725 *) 6726 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6727 esac 6728 case $ac_prog in 6729 # Accept absolute paths. 6730 [[\\/]]* | ?:[[\\/]]*) 6731 re_direlt='/[[^/]][[^/]]*/\.\./' 6732 # Canonicalize the pathname of ld 6733 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6734 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6735 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6736 done 6737 test -z "$LD" && LD=$ac_prog 6738 ;; 6739 "") 6740 # If it fails, then pretend we aren't using GCC. 6741 ac_prog=ld 6742 ;; 6743 *) 6744 # If it is relative, then search for the first ld in PATH. 6745 with_gnu_ld=unknown 6746 ;; 6747 esac 6748elif test yes = "$with_gnu_ld"; then 6749 AC_MSG_CHECKING([for GNU ld]) 6750else 6751 AC_MSG_CHECKING([for non-GNU ld]) 6752fi 6753AC_CACHE_VAL(lt_cv_path_LD, 6754[if test -z "$LD"; then 6755 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6756 for ac_dir in $PATH; do 6757 IFS=$lt_save_ifs 6758 test -z "$ac_dir" && ac_dir=. 6759 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6760 lt_cv_path_LD=$ac_dir/$ac_prog 6761 # Check to see if the program is GNU ld. I'd rather use --version, 6762 # but apparently some variants of GNU ld only accept -v. 6763 # Break only if it was the GNU/non-GNU ld that we prefer. 6764 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6765 *GNU* | *'with BFD'*) 6766 test no != "$with_gnu_ld" && break 6767 ;; 6768 *) 6769 test yes != "$with_gnu_ld" && break 6770 ;; 6771 esac 6772 fi 6773 done 6774 IFS=$lt_save_ifs 6775else 6776 lt_cv_path_LD=$LD # Let the user override the test with a path. 6777fi]) 6778LD=$lt_cv_path_LD 6779if test -n "$LD"; then 6780 AC_MSG_RESULT($LD) 6781else 6782 AC_MSG_RESULT(no) 6783fi 6784test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6785_LT_PATH_LD_GNU 6786AC_SUBST([LD]) 6787 6788_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6789])# LT_PATH_LD 6790 6791# Old names: 6792AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6793AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6794dnl aclocal-1.4 backwards compatibility: 6795dnl AC_DEFUN([AM_PROG_LD], []) 6796dnl AC_DEFUN([AC_PROG_LD], []) 6797 6798 6799# _LT_PATH_LD_GNU 6800#- -------------- 6801m4_defun([_LT_PATH_LD_GNU], 6802[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6803[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6804case `$LD -v 2>&1 </dev/null` in 6805*GNU* | *'with BFD'*) 6806 lt_cv_prog_gnu_ld=yes 6807 ;; 6808*) 6809 lt_cv_prog_gnu_ld=no 6810 ;; 6811esac]) 6812with_gnu_ld=$lt_cv_prog_gnu_ld 6813])# _LT_PATH_LD_GNU 6814 6815 6816# _LT_CMD_RELOAD 6817# -------------- 6818# find reload flag for linker 6819# -- PORTME Some linkers may need a different reload flag. 6820m4_defun([_LT_CMD_RELOAD], 6821[AC_CACHE_CHECK([for $LD option to reload object files], 6822 lt_cv_ld_reload_flag, 6823 [lt_cv_ld_reload_flag='-r']) 6824reload_flag=$lt_cv_ld_reload_flag 6825case $reload_flag in 6826"" | " "*) ;; 6827*) reload_flag=" $reload_flag" ;; 6828esac 6829reload_cmds='$LD$reload_flag -o $output$reload_objs' 6830case $host_os in 6831 cygwin* | mingw* | pw32* | cegcc*) 6832 if test yes != "$GCC"; then 6833 reload_cmds=false 6834 fi 6835 ;; 6836 darwin*) 6837 if test yes = "$GCC"; then 6838 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6839 else 6840 reload_cmds='$LD$reload_flag -o $output$reload_objs' 6841 fi 6842 ;; 6843esac 6844_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6845_LT_TAGDECL([], [reload_cmds], [2])dnl 6846])# _LT_CMD_RELOAD 6847 6848 6849# _LT_PATH_DD 6850# ----------- 6851# find a working dd 6852m4_defun([_LT_PATH_DD], 6853[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6854[printf 0123456789abcdef0123456789abcdef >conftest.i 6855cat conftest.i conftest.i >conftest2.i 6856: ${lt_DD:=$DD} 6857AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6858[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6859 cmp -s conftest.i conftest.out \ 6860 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6861fi]) 6862rm -f conftest.i conftest2.i conftest.out]) 6863])# _LT_PATH_DD 6864 6865 6866# _LT_CMD_TRUNCATE 6867# ---------------- 6868# find command to truncate a binary pipe 6869m4_defun([_LT_CMD_TRUNCATE], 6870[m4_require([_LT_PATH_DD]) 6871AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6872[printf 0123456789abcdef0123456789abcdef >conftest.i 6873cat conftest.i conftest.i >conftest2.i 6874lt_cv_truncate_bin= 6875if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6876 cmp -s conftest.i conftest.out \ 6877 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6878fi 6879rm -f conftest.i conftest2.i conftest.out 6880test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6881_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6882 [Command to truncate a binary pipe]) 6883])# _LT_CMD_TRUNCATE 6884 6885 6886# _LT_CHECK_MAGIC_METHOD 6887# ---------------------- 6888# how to check for library dependencies 6889# -- PORTME fill in with the dynamic library characteristics 6890m4_defun([_LT_CHECK_MAGIC_METHOD], 6891[m4_require([_LT_DECL_EGREP]) 6892m4_require([_LT_DECL_OBJDUMP]) 6893AC_CACHE_CHECK([how to recognize dependent libraries], 6894lt_cv_deplibs_check_method, 6895[lt_cv_file_magic_cmd='$MAGIC_CMD' 6896lt_cv_file_magic_test_file= 6897lt_cv_deplibs_check_method='unknown' 6898# Need to set the preceding variable on all platforms that support 6899# interlibrary dependencies. 6900# 'none' -- dependencies not supported. 6901# 'unknown' -- same as none, but documents that we really don't know. 6902# 'pass_all' -- all dependencies passed with no checks. 6903# 'test_compile' -- check by making test program. 6904# 'file_magic [[regex]]' -- check by looking for files in library path 6905# that responds to the $file_magic_cmd with a given extended regex. 6906# If you have 'file' or equivalent on your system and you're not sure 6907# whether 'pass_all' will *always* work, you probably want this one. 6908 6909case $host_os in 6910aix[[4-9]]*) 6911 lt_cv_deplibs_check_method=pass_all 6912 ;; 6913 6914beos*) 6915 lt_cv_deplibs_check_method=pass_all 6916 ;; 6917 6918bsdi[[45]]*) 6919 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6920 lt_cv_file_magic_cmd='$FILECMD -L' 6921 lt_cv_file_magic_test_file=/shlib/libc.so 6922 ;; 6923 6924cygwin*) 6925 # func_win32_libid is a shell function defined in ltmain.sh 6926 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6927 lt_cv_file_magic_cmd='func_win32_libid' 6928 ;; 6929 6930mingw* | pw32*) 6931 # Base MSYS/MinGW do not provide the 'file' command needed by 6932 # func_win32_libid shell function, so use a weaker test based on 'objdump', 6933 # unless we find 'file', for example because we are cross-compiling. 6934 if ( file / ) >/dev/null 2>&1; then 6935 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6936 lt_cv_file_magic_cmd='func_win32_libid' 6937 else 6938 # Keep this pattern in sync with the one in func_win32_libid. 6939 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6940 lt_cv_file_magic_cmd='$OBJDUMP -f' 6941 fi 6942 ;; 6943 6944cegcc*) 6945 # use the weaker test based on 'objdump'. See mingw*. 6946 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6947 lt_cv_file_magic_cmd='$OBJDUMP -f' 6948 ;; 6949 6950darwin* | rhapsody*) 6951 lt_cv_deplibs_check_method=pass_all 6952 ;; 6953 6954freebsd* | dragonfly* | midnightbsd*) 6955 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6956 case $host_cpu in 6957 i*86 ) 6958 # Not sure whether the presence of OpenBSD here was a mistake. 6959 # Let's accept both of them until this is cleared up. 6960 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6961 lt_cv_file_magic_cmd=$FILECMD 6962 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6963 ;; 6964 esac 6965 else 6966 lt_cv_deplibs_check_method=pass_all 6967 fi 6968 ;; 6969 6970haiku*) 6971 lt_cv_deplibs_check_method=pass_all 6972 ;; 6973 6974hpux10.20* | hpux11*) 6975 lt_cv_file_magic_cmd=$FILECMD 6976 case $host_cpu in 6977 ia64*) 6978 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6979 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6980 ;; 6981 hppa*64*) 6982 [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]'] 6983 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6984 ;; 6985 *) 6986 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6987 lt_cv_file_magic_test_file=/usr/lib/libc.sl 6988 ;; 6989 esac 6990 ;; 6991 6992interix[[3-9]]*) 6993 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6994 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6995 ;; 6996 6997irix5* | irix6* | nonstopux*) 6998 case $LD in 6999 *-32|*"-32 ") libmagic=32-bit;; 7000 *-n32|*"-n32 ") libmagic=N32;; 7001 *-64|*"-64 ") libmagic=64-bit;; 7002 *) libmagic=never-match;; 7003 esac 7004 lt_cv_deplibs_check_method=pass_all 7005 ;; 7006 7007# This must be glibc/ELF. 7008linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7009 lt_cv_deplibs_check_method=pass_all 7010 ;; 7011 7012netbsd*) 7013 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7014 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7015 else 7016 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 7017 fi 7018 ;; 7019 7020newos6*) 7021 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7022 lt_cv_file_magic_cmd=$FILECMD 7023 lt_cv_file_magic_test_file=/usr/lib/libnls.so 7024 ;; 7025 7026*nto* | *qnx*) 7027 lt_cv_deplibs_check_method=pass_all 7028 ;; 7029 7030openbsd* | bitrig*) 7031 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7032 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 7033 else 7034 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7035 fi 7036 ;; 7037 7038osf3* | osf4* | osf5*) 7039 lt_cv_deplibs_check_method=pass_all 7040 ;; 7041 7042rdos*) 7043 lt_cv_deplibs_check_method=pass_all 7044 ;; 7045 7046solaris*) 7047 lt_cv_deplibs_check_method=pass_all 7048 ;; 7049 7050sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7051 lt_cv_deplibs_check_method=pass_all 7052 ;; 7053 7054sysv4 | sysv4.3*) 7055 case $host_vendor in 7056 motorola) 7057 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]]' 7058 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7059 ;; 7060 ncr) 7061 lt_cv_deplibs_check_method=pass_all 7062 ;; 7063 sequent) 7064 lt_cv_file_magic_cmd='/bin/file' 7065 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7066 ;; 7067 sni) 7068 lt_cv_file_magic_cmd='/bin/file' 7069 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7070 lt_cv_file_magic_test_file=/lib/libc.so 7071 ;; 7072 siemens) 7073 lt_cv_deplibs_check_method=pass_all 7074 ;; 7075 pc) 7076 lt_cv_deplibs_check_method=pass_all 7077 ;; 7078 esac 7079 ;; 7080 7081tpf*) 7082 lt_cv_deplibs_check_method=pass_all 7083 ;; 7084os2*) 7085 lt_cv_deplibs_check_method=pass_all 7086 ;; 7087esac 7088]) 7089 7090file_magic_glob= 7091want_nocaseglob=no 7092if test "$build" = "$host"; then 7093 case $host_os in 7094 mingw* | pw32*) 7095 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7096 want_nocaseglob=yes 7097 else 7098 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7099 fi 7100 ;; 7101 esac 7102fi 7103 7104file_magic_cmd=$lt_cv_file_magic_cmd 7105deplibs_check_method=$lt_cv_deplibs_check_method 7106test -z "$deplibs_check_method" && deplibs_check_method=unknown 7107 7108_LT_DECL([], [deplibs_check_method], [1], 7109 [Method to check whether dependent libraries are shared objects]) 7110_LT_DECL([], [file_magic_cmd], [1], 7111 [Command to use when deplibs_check_method = "file_magic"]) 7112_LT_DECL([], [file_magic_glob], [1], 7113 [How to find potential files when deplibs_check_method = "file_magic"]) 7114_LT_DECL([], [want_nocaseglob], [1], 7115 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7116])# _LT_CHECK_MAGIC_METHOD 7117 7118 7119# LT_PATH_NM 7120# ---------- 7121# find the pathname to a BSD- or MS-compatible name lister 7122AC_DEFUN([LT_PATH_NM], 7123[AC_REQUIRE([AC_PROG_CC])dnl 7124AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7125[if test -n "$NM"; then 7126 # Let the user override the test. 7127 lt_cv_path_NM=$NM 7128else 7129 lt_nm_to_check=${ac_tool_prefix}nm 7130 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7131 lt_nm_to_check="$lt_nm_to_check nm" 7132 fi 7133 for lt_tmp_nm in $lt_nm_to_check; do 7134 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7135 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7136 IFS=$lt_save_ifs 7137 test -z "$ac_dir" && ac_dir=. 7138 tmp_nm=$ac_dir/$lt_tmp_nm 7139 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7140 # Check to see if the nm accepts a BSD-compat flag. 7141 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7142 # nm: unknown option "B" ignored 7143 # Tru64's nm complains that /dev/null is an invalid object file 7144 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7145 case $build_os in 7146 mingw*) lt_bad_file=conftest.nm/nofile ;; 7147 *) lt_bad_file=/dev/null ;; 7148 esac 7149 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7150 *$lt_bad_file* | *'Invalid file or object type'*) 7151 lt_cv_path_NM="$tmp_nm -B" 7152 break 2 7153 ;; 7154 *) 7155 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7156 */dev/null*) 7157 lt_cv_path_NM="$tmp_nm -p" 7158 break 2 7159 ;; 7160 *) 7161 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7162 continue # so that we can try to find one that supports BSD flags 7163 ;; 7164 esac 7165 ;; 7166 esac 7167 fi 7168 done 7169 IFS=$lt_save_ifs 7170 done 7171 : ${lt_cv_path_NM=no} 7172fi]) 7173if test no != "$lt_cv_path_NM"; then 7174 NM=$lt_cv_path_NM 7175else 7176 # Didn't find any BSD compatible name lister, look for dumpbin. 7177 if test -n "$DUMPBIN"; then : 7178 # Let the user override the test. 7179 else 7180 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7181 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7182 *COFF*) 7183 DUMPBIN="$DUMPBIN -symbols -headers" 7184 ;; 7185 *) 7186 DUMPBIN=: 7187 ;; 7188 esac 7189 fi 7190 AC_SUBST([DUMPBIN]) 7191 if test : != "$DUMPBIN"; then 7192 NM=$DUMPBIN 7193 fi 7194fi 7195test -z "$NM" && NM=nm 7196AC_SUBST([NM]) 7197_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7198 7199AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7200 [lt_cv_nm_interface="BSD nm" 7201 echo "int some_variable = 0;" > conftest.$ac_ext 7202 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7203 (eval "$ac_compile" 2>conftest.err) 7204 cat conftest.err >&AS_MESSAGE_LOG_FD 7205 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7206 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7207 cat conftest.err >&AS_MESSAGE_LOG_FD 7208 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7209 cat conftest.out >&AS_MESSAGE_LOG_FD 7210 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7211 lt_cv_nm_interface="MS dumpbin" 7212 fi 7213 rm -f conftest*]) 7214])# LT_PATH_NM 7215 7216# Old names: 7217AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7218AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7219dnl aclocal-1.4 backwards compatibility: 7220dnl AC_DEFUN([AM_PROG_NM], []) 7221dnl AC_DEFUN([AC_PROG_NM], []) 7222 7223# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7224# -------------------------------- 7225# how to determine the name of the shared library 7226# associated with a specific link library. 7227# -- PORTME fill in with the dynamic library characteristics 7228m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7229[m4_require([_LT_DECL_EGREP]) 7230m4_require([_LT_DECL_OBJDUMP]) 7231m4_require([_LT_DECL_DLLTOOL]) 7232AC_CACHE_CHECK([how to associate runtime and link libraries], 7233lt_cv_sharedlib_from_linklib_cmd, 7234[lt_cv_sharedlib_from_linklib_cmd='unknown' 7235 7236case $host_os in 7237cygwin* | mingw* | pw32* | cegcc*) 7238 # two different shell functions defined in ltmain.sh; 7239 # decide which one to use based on capabilities of $DLLTOOL 7240 case `$DLLTOOL --help 2>&1` in 7241 *--identify-strict*) 7242 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7243 ;; 7244 *) 7245 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7246 ;; 7247 esac 7248 ;; 7249*) 7250 # fallback: assume linklib IS sharedlib 7251 lt_cv_sharedlib_from_linklib_cmd=$ECHO 7252 ;; 7253esac 7254]) 7255sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7256test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7257 7258_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7259 [Command to associate shared and link libraries]) 7260])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7261 7262 7263# _LT_PATH_MANIFEST_TOOL 7264# ---------------------- 7265# locate the manifest tool 7266m4_defun([_LT_PATH_MANIFEST_TOOL], 7267[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7268test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7269AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7270 [lt_cv_path_mainfest_tool=no 7271 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7272 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7273 cat conftest.err >&AS_MESSAGE_LOG_FD 7274 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7275 lt_cv_path_mainfest_tool=yes 7276 fi 7277 rm -f conftest*]) 7278if test yes != "$lt_cv_path_mainfest_tool"; then 7279 MANIFEST_TOOL=: 7280fi 7281_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7282])# _LT_PATH_MANIFEST_TOOL 7283 7284 7285# _LT_DLL_DEF_P([FILE]) 7286# --------------------- 7287# True iff FILE is a Windows DLL '.def' file. 7288# Keep in sync with func_dll_def_p in the libtool script 7289AC_DEFUN([_LT_DLL_DEF_P], 7290[dnl 7291 test DEF = "`$SED -n dnl 7292 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7293 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7294 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7295 -e q dnl Only consider the first "real" line 7296 $1`" dnl 7297])# _LT_DLL_DEF_P 7298 7299 7300# LT_LIB_M 7301# -------- 7302# check for math library 7303AC_DEFUN([LT_LIB_M], 7304[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7305LIBM= 7306case $host in 7307*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7308 # These system don't have libm, or don't need it 7309 ;; 7310*-ncr-sysv4.3*) 7311 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7312 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7313 ;; 7314*) 7315 AC_CHECK_LIB(m, cos, LIBM=-lm) 7316 ;; 7317esac 7318AC_SUBST([LIBM]) 7319])# LT_LIB_M 7320 7321# Old name: 7322AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7323dnl aclocal-1.4 backwards compatibility: 7324dnl AC_DEFUN([AC_CHECK_LIBM], []) 7325 7326 7327# _LT_COMPILER_NO_RTTI([TAGNAME]) 7328# ------------------------------- 7329m4_defun([_LT_COMPILER_NO_RTTI], 7330[m4_require([_LT_TAG_COMPILER])dnl 7331 7332_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7333 7334if test yes = "$GCC"; then 7335 case $cc_basename in 7336 nvcc*) 7337 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7338 *) 7339 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7340 esac 7341 7342 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7343 lt_cv_prog_compiler_rtti_exceptions, 7344 [-fno-rtti -fno-exceptions], [], 7345 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7346fi 7347_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7348 [Compiler flag to turn off builtin functions]) 7349])# _LT_COMPILER_NO_RTTI 7350 7351 7352# _LT_CMD_GLOBAL_SYMBOLS 7353# ---------------------- 7354m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7355[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7356AC_REQUIRE([AC_PROG_CC])dnl 7357AC_REQUIRE([AC_PROG_AWK])dnl 7358AC_REQUIRE([LT_PATH_NM])dnl 7359AC_REQUIRE([LT_PATH_LD])dnl 7360m4_require([_LT_DECL_SED])dnl 7361m4_require([_LT_DECL_EGREP])dnl 7362m4_require([_LT_TAG_COMPILER])dnl 7363 7364# Check for command to grab the raw symbol name followed by C symbol from nm. 7365AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7366AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7367[ 7368# These are sane defaults that work on at least a few old systems. 7369# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7370 7371# Character class describing NM global symbol codes. 7372symcode='[[BCDEGRST]]' 7373 7374# Regexp to match symbols that can be accessed directly from C. 7375sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7376 7377# Define system-specific variables. 7378case $host_os in 7379aix*) 7380 symcode='[[BCDT]]' 7381 ;; 7382cygwin* | mingw* | pw32* | cegcc*) 7383 symcode='[[ABCDGISTW]]' 7384 ;; 7385hpux*) 7386 if test ia64 = "$host_cpu"; then 7387 symcode='[[ABCDEGRST]]' 7388 fi 7389 ;; 7390irix* | nonstopux*) 7391 symcode='[[BCDEGRST]]' 7392 ;; 7393osf*) 7394 symcode='[[BCDEGQRST]]' 7395 ;; 7396solaris*) 7397 symcode='[[BDRT]]' 7398 ;; 7399sco3.2v5*) 7400 symcode='[[DT]]' 7401 ;; 7402sysv4.2uw2*) 7403 symcode='[[DT]]' 7404 ;; 7405sysv5* | sco5v6* | unixware* | OpenUNIX*) 7406 symcode='[[ABDT]]' 7407 ;; 7408sysv4) 7409 symcode='[[DFNSTU]]' 7410 ;; 7411esac 7412 7413# If we're using GNU nm, then use its standard symbol codes. 7414case `$NM -V 2>&1` in 7415*GNU* | *'with BFD'*) 7416 symcode='[[ABCDGIRSTW]]' ;; 7417esac 7418 7419if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7420 # Gets list of data symbols to import. 7421 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7422 # Adjust the below global symbol transforms to fixup imported variables. 7423 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7424 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7425 lt_c_name_lib_hook="\ 7426 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7427 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7428else 7429 # Disable hooks by default. 7430 lt_cv_sys_global_symbol_to_import= 7431 lt_cdecl_hook= 7432 lt_c_name_hook= 7433 lt_c_name_lib_hook= 7434fi 7435 7436# Transform an extracted symbol line into a proper C declaration. 7437# Some systems (esp. on ia64) link data and code symbols differently, 7438# so use this general approach. 7439lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7440$lt_cdecl_hook\ 7441" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7442" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7443 7444# Transform an extracted symbol line into symbol name and symbol address 7445lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7446$lt_c_name_hook\ 7447" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7448" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7449 7450# Transform an extracted symbol line into symbol name with lib prefix and 7451# symbol address. 7452lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7453$lt_c_name_lib_hook\ 7454" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7455" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7456" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7457 7458# Handle CRLF in mingw tool chain 7459opt_cr= 7460case $build_os in 7461mingw*) 7462 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7463 ;; 7464esac 7465 7466# Try without a prefix underscore, then with it. 7467for ac_symprfx in "" "_"; do 7468 7469 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7470 symxfrm="\\1 $ac_symprfx\\2 \\2" 7471 7472 # Write the raw and C identifiers. 7473 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7474 # Fake it for dumpbin and say T for any non-static function, 7475 # D for any global variable and I for any imported variable. 7476 # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7477 # which start with @ or ?. 7478 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7479" {last_section=section; section=\$ 3};"\ 7480" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7481" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7482" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7483" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7484" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7485" \$ 0!~/External *\|/{next};"\ 7486" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7487" {if(hide[section]) next};"\ 7488" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7489" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7490" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7491" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7492" ' prfx=^$ac_symprfx]" 7493 else 7494 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7495 fi 7496 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7497 7498 # Check to see that the pipe works correctly. 7499 pipe_works=no 7500 7501 rm -f conftest* 7502 cat > conftest.$ac_ext <<_LT_EOF 7503#ifdef __cplusplus 7504extern "C" { 7505#endif 7506char nm_test_var; 7507void nm_test_func(void); 7508void nm_test_func(void){} 7509#ifdef __cplusplus 7510} 7511#endif 7512int main(){nm_test_var='a';nm_test_func();return(0);} 7513_LT_EOF 7514 7515 if AC_TRY_EVAL(ac_compile); then 7516 # Now try to grab the symbols. 7517 nlist=conftest.nm 7518 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7519 # Try sorting and uniquifying the output. 7520 if sort "$nlist" | uniq > "$nlist"T; then 7521 mv -f "$nlist"T "$nlist" 7522 else 7523 rm -f "$nlist"T 7524 fi 7525 7526 # Make sure that we snagged all the symbols we need. 7527 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7528 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7529 cat <<_LT_EOF > conftest.$ac_ext 7530/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7531#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7532/* DATA imports from DLLs on WIN32 can't be const, because runtime 7533 relocations are performed -- see ld's documentation on pseudo-relocs. */ 7534# define LT@&t@_DLSYM_CONST 7535#elif defined __osf__ 7536/* This system does not cope well with relocations in const data. */ 7537# define LT@&t@_DLSYM_CONST 7538#else 7539# define LT@&t@_DLSYM_CONST const 7540#endif 7541 7542#ifdef __cplusplus 7543extern "C" { 7544#endif 7545 7546_LT_EOF 7547 # Now generate the symbol file. 7548 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7549 7550 cat <<_LT_EOF >> conftest.$ac_ext 7551 7552/* The mapping between symbol names and symbols. */ 7553LT@&t@_DLSYM_CONST struct { 7554 const char *name; 7555 void *address; 7556} 7557lt__PROGRAM__LTX_preloaded_symbols[[]] = 7558{ 7559 { "@PROGRAM@", (void *) 0 }, 7560_LT_EOF 7561 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7562 cat <<\_LT_EOF >> conftest.$ac_ext 7563 {0, (void *) 0} 7564}; 7565 7566/* This works around a problem in FreeBSD linker */ 7567#ifdef FREEBSD_WORKAROUND 7568static const void *lt_preloaded_setup() { 7569 return lt__PROGRAM__LTX_preloaded_symbols; 7570} 7571#endif 7572 7573#ifdef __cplusplus 7574} 7575#endif 7576_LT_EOF 7577 # Now try linking the two files. 7578 mv conftest.$ac_objext conftstm.$ac_objext 7579 lt_globsym_save_LIBS=$LIBS 7580 lt_globsym_save_CFLAGS=$CFLAGS 7581 LIBS=conftstm.$ac_objext 7582 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7583 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7584 pipe_works=yes 7585 fi 7586 LIBS=$lt_globsym_save_LIBS 7587 CFLAGS=$lt_globsym_save_CFLAGS 7588 else 7589 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7590 fi 7591 else 7592 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7593 fi 7594 else 7595 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7596 fi 7597 else 7598 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7599 cat conftest.$ac_ext >&5 7600 fi 7601 rm -rf conftest* conftst* 7602 7603 # Do not use the global_symbol_pipe unless it works. 7604 if test yes = "$pipe_works"; then 7605 break 7606 else 7607 lt_cv_sys_global_symbol_pipe= 7608 fi 7609done 7610]) 7611if test -z "$lt_cv_sys_global_symbol_pipe"; then 7612 lt_cv_sys_global_symbol_to_cdecl= 7613fi 7614if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7615 AC_MSG_RESULT(failed) 7616else 7617 AC_MSG_RESULT(ok) 7618fi 7619 7620# Response file support. 7621if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7622 nm_file_list_spec='@' 7623elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7624 nm_file_list_spec='@' 7625fi 7626 7627_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7628 [Take the output of nm and produce a listing of raw symbols and C names]) 7629_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7630 [Transform the output of nm in a proper C declaration]) 7631_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7632 [Transform the output of nm into a list of symbols to manually relocate]) 7633_LT_DECL([global_symbol_to_c_name_address], 7634 [lt_cv_sys_global_symbol_to_c_name_address], [1], 7635 [Transform the output of nm in a C name address pair]) 7636_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7637 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7638 [Transform the output of nm in a C name address pair when lib prefix is needed]) 7639_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7640 [The name lister interface]) 7641_LT_DECL([], [nm_file_list_spec], [1], 7642 [Specify filename containing input files for $NM]) 7643]) # _LT_CMD_GLOBAL_SYMBOLS 7644 7645 7646# _LT_COMPILER_PIC([TAGNAME]) 7647# --------------------------- 7648m4_defun([_LT_COMPILER_PIC], 7649[m4_require([_LT_TAG_COMPILER])dnl 7650_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7651_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7652_LT_TAGVAR(lt_prog_compiler_static, $1)= 7653 7654m4_if([$1], [CXX], [ 7655 # C++ specific cases for pic, static, wl, etc. 7656 if test yes = "$GXX"; then 7657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7658 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7659 7660 case $host_os in 7661 aix*) 7662 # All AIX code is PIC. 7663 if test ia64 = "$host_cpu"; then 7664 # AIX 5 now supports IA64 processor 7665 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7666 fi 7667 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7668 ;; 7669 7670 amigaos*) 7671 case $host_cpu in 7672 powerpc) 7673 # see comment about AmigaOS4 .so support 7674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7675 ;; 7676 m68k) 7677 # FIXME: we need at least 68020 code to build shared libraries, but 7678 # adding the '-m68020' flag to GCC prevents building anything better, 7679 # like '-m68040'. 7680 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7681 ;; 7682 esac 7683 ;; 7684 7685 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7686 # PIC is the default for these OSes. 7687 ;; 7688 mingw* | cygwin* | os2* | pw32* | cegcc*) 7689 # This hack is so that the source file can tell whether it is being 7690 # built for inclusion in a dll (and should export symbols for example). 7691 # Although the cygwin gcc ignores -fPIC, still need this for old-style 7692 # (--disable-auto-import) libraries 7693 m4_if([$1], [GCJ], [], 7694 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7695 case $host_os in 7696 os2*) 7697 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7698 ;; 7699 esac 7700 ;; 7701 darwin* | rhapsody*) 7702 # PIC is the default on this platform 7703 # Common symbols not allowed in MH_DYLIB files 7704 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7705 ;; 7706 *djgpp*) 7707 # DJGPP does not support shared libraries at all 7708 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7709 ;; 7710 haiku*) 7711 # PIC is the default for Haiku. 7712 # The "-static" flag exists, but is broken. 7713 _LT_TAGVAR(lt_prog_compiler_static, $1)= 7714 ;; 7715 interix[[3-9]]*) 7716 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7717 # Instead, we relocate shared libraries at runtime. 7718 ;; 7719 sysv4*MP*) 7720 if test -d /usr/nec; then 7721 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7722 fi 7723 ;; 7724 hpux*) 7725 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7726 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7727 # sets the default TLS model and affects inlining. 7728 case $host_cpu in 7729 hppa*64*) 7730 ;; 7731 *) 7732 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7733 ;; 7734 esac 7735 ;; 7736 *qnx* | *nto*) 7737 # QNX uses GNU C++, but need to define -shared option too, otherwise 7738 # it will coredump. 7739 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7740 ;; 7741 *) 7742 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7743 ;; 7744 esac 7745 else 7746 case $host_os in 7747 aix[[4-9]]*) 7748 # All AIX code is PIC. 7749 if test ia64 = "$host_cpu"; then 7750 # AIX 5 now supports IA64 processor 7751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7752 else 7753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7754 fi 7755 ;; 7756 chorus*) 7757 case $cc_basename in 7758 cxch68*) 7759 # Green Hills C++ Compiler 7760 # _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" 7761 ;; 7762 esac 7763 ;; 7764 mingw* | cygwin* | os2* | pw32* | cegcc*) 7765 # This hack is so that the source file can tell whether it is being 7766 # built for inclusion in a dll (and should export symbols for example). 7767 m4_if([$1], [GCJ], [], 7768 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7769 ;; 7770 dgux*) 7771 case $cc_basename in 7772 ec++*) 7773 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7774 ;; 7775 ghcx*) 7776 # Green Hills C++ Compiler 7777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7778 ;; 7779 *) 7780 ;; 7781 esac 7782 ;; 7783 freebsd* | dragonfly* | midnightbsd*) 7784 # FreeBSD uses GNU C++ 7785 ;; 7786 hpux9* | hpux10* | hpux11*) 7787 case $cc_basename in 7788 CC*) 7789 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7790 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7791 if test ia64 != "$host_cpu"; then 7792 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7793 fi 7794 ;; 7795 aCC*) 7796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7797 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7798 case $host_cpu in 7799 hppa*64*|ia64*) 7800 # +Z the default 7801 ;; 7802 *) 7803 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7804 ;; 7805 esac 7806 ;; 7807 *) 7808 ;; 7809 esac 7810 ;; 7811 interix*) 7812 # This is c89, which is MS Visual C++ (no shared libs) 7813 # Anyone wants to do a port? 7814 ;; 7815 irix5* | irix6* | nonstopux*) 7816 case $cc_basename in 7817 CC*) 7818 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7819 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7820 # CC pic flag -KPIC is the default. 7821 ;; 7822 *) 7823 ;; 7824 esac 7825 ;; 7826 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7827 case $cc_basename in 7828 KCC*) 7829 # KAI C++ Compiler 7830 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7831 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7832 ;; 7833 ecpc* ) 7834 # old Intel C++ for x86_64, which still supported -KPIC. 7835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7838 ;; 7839 icpc* ) 7840 # Intel C++, used to be incompatible with GCC. 7841 # ICC 10 doesn't accept -KPIC any more. 7842 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7843 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7844 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7845 ;; 7846 pgCC* | pgcpp*) 7847 # Portland Group C++ compiler 7848 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7850 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851 ;; 7852 cxx*) 7853 # Compaq C++ 7854 # Make sure the PIC flag is empty. It appears that all Alpha 7855 # Linux and Compaq Tru64 Unix objects are PIC. 7856 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7857 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7858 ;; 7859 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7860 # IBM XL 8.0, 9.0 on PPC and BlueGene 7861 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7862 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7863 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7864 ;; 7865 *) 7866 case `$CC -V 2>&1 | $SED 5q` in 7867 *Sun\ C*) 7868 # Sun C++ 5.9 7869 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7870 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7871 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7872 ;; 7873 esac 7874 ;; 7875 esac 7876 ;; 7877 lynxos*) 7878 ;; 7879 m88k*) 7880 ;; 7881 mvs*) 7882 case $cc_basename in 7883 cxx*) 7884 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7885 ;; 7886 *) 7887 ;; 7888 esac 7889 ;; 7890 netbsd*) 7891 ;; 7892 *qnx* | *nto*) 7893 # QNX uses GNU C++, but need to define -shared option too, otherwise 7894 # it will coredump. 7895 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7896 ;; 7897 osf3* | osf4* | osf5*) 7898 case $cc_basename in 7899 KCC*) 7900 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7901 ;; 7902 RCC*) 7903 # Rational C++ 2.4.1 7904 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7905 ;; 7906 cxx*) 7907 # Digital/Compaq C++ 7908 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7909 # Make sure the PIC flag is empty. It appears that all Alpha 7910 # Linux and Compaq Tru64 Unix objects are PIC. 7911 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7912 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7913 ;; 7914 *) 7915 ;; 7916 esac 7917 ;; 7918 psos*) 7919 ;; 7920 solaris*) 7921 case $cc_basename in 7922 CC* | sunCC*) 7923 # Sun C++ 4.2, 5.x and Centerline C++ 7924 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7925 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7926 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7927 ;; 7928 gcx*) 7929 # Green Hills C++ Compiler 7930 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7931 ;; 7932 *) 7933 ;; 7934 esac 7935 ;; 7936 sunos4*) 7937 case $cc_basename in 7938 CC*) 7939 # Sun C++ 4.x 7940 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7941 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7942 ;; 7943 lcc*) 7944 # Lucid 7945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7946 ;; 7947 *) 7948 ;; 7949 esac 7950 ;; 7951 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7952 case $cc_basename in 7953 CC*) 7954 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7955 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7956 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7957 ;; 7958 esac 7959 ;; 7960 tandem*) 7961 case $cc_basename in 7962 NCC*) 7963 # NonStop-UX NCC 3.20 7964 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7965 ;; 7966 *) 7967 ;; 7968 esac 7969 ;; 7970 vxworks*) 7971 ;; 7972 *) 7973 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7974 ;; 7975 esac 7976 fi 7977], 7978[ 7979 if test yes = "$GCC"; then 7980 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7981 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7982 7983 case $host_os in 7984 aix*) 7985 # All AIX code is PIC. 7986 if test ia64 = "$host_cpu"; then 7987 # AIX 5 now supports IA64 processor 7988 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7989 fi 7990 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7991 ;; 7992 7993 amigaos*) 7994 case $host_cpu in 7995 powerpc) 7996 # see comment about AmigaOS4 .so support 7997 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7998 ;; 7999 m68k) 8000 # FIXME: we need at least 68020 code to build shared libraries, but 8001 # adding the '-m68020' flag to GCC prevents building anything better, 8002 # like '-m68040'. 8003 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8004 ;; 8005 esac 8006 ;; 8007 8008 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8009 # PIC is the default for these OSes. 8010 ;; 8011 8012 mingw* | cygwin* | pw32* | os2* | cegcc*) 8013 # This hack is so that the source file can tell whether it is being 8014 # built for inclusion in a dll (and should export symbols for example). 8015 # Although the cygwin gcc ignores -fPIC, still need this for old-style 8016 # (--disable-auto-import) libraries 8017 m4_if([$1], [GCJ], [], 8018 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8019 case $host_os in 8020 os2*) 8021 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8022 ;; 8023 esac 8024 ;; 8025 8026 darwin* | rhapsody*) 8027 # PIC is the default on this platform 8028 # Common symbols not allowed in MH_DYLIB files 8029 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8030 ;; 8031 8032 haiku*) 8033 # PIC is the default for Haiku. 8034 # The "-static" flag exists, but is broken. 8035 _LT_TAGVAR(lt_prog_compiler_static, $1)= 8036 ;; 8037 8038 hpux*) 8039 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8040 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8041 # sets the default TLS model and affects inlining. 8042 case $host_cpu in 8043 hppa*64*) 8044 # +Z the default 8045 ;; 8046 *) 8047 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8048 ;; 8049 esac 8050 ;; 8051 8052 interix[[3-9]]*) 8053 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8054 # Instead, we relocate shared libraries at runtime. 8055 ;; 8056 8057 msdosdjgpp*) 8058 # Just because we use GCC doesn't mean we suddenly get shared libraries 8059 # on systems that don't support them. 8060 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8061 enable_shared=no 8062 ;; 8063 8064 *nto* | *qnx*) 8065 # QNX uses GNU C++, but need to define -shared option too, otherwise 8066 # it will coredump. 8067 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8068 ;; 8069 8070 sysv4*MP*) 8071 if test -d /usr/nec; then 8072 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8073 fi 8074 ;; 8075 8076 *) 8077 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8078 ;; 8079 esac 8080 8081 case $cc_basename in 8082 nvcc*) # Cuda Compiler Driver 2.2 8083 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8084 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8085 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8086 fi 8087 ;; 8088 esac 8089 else 8090 # PORTME Check for flag to pass linker flags through the system compiler. 8091 case $host_os in 8092 aix*) 8093 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8094 if test ia64 = "$host_cpu"; then 8095 # AIX 5 now supports IA64 processor 8096 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8097 else 8098 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8099 fi 8100 ;; 8101 8102 darwin* | rhapsody*) 8103 # PIC is the default on this platform 8104 # Common symbols not allowed in MH_DYLIB files 8105 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8106 case $cc_basename in 8107 nagfor*) 8108 # NAG Fortran compiler 8109 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8110 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8111 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112 ;; 8113 esac 8114 ;; 8115 8116 mingw* | cygwin* | pw32* | os2* | cegcc*) 8117 # This hack is so that the source file can tell whether it is being 8118 # built for inclusion in a dll (and should export symbols for example). 8119 m4_if([$1], [GCJ], [], 8120 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8121 case $host_os in 8122 os2*) 8123 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8124 ;; 8125 esac 8126 ;; 8127 8128 hpux9* | hpux10* | hpux11*) 8129 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8130 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8131 # not for PA HP-UX. 8132 case $host_cpu in 8133 hppa*64*|ia64*) 8134 # +Z the default 8135 ;; 8136 *) 8137 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8138 ;; 8139 esac 8140 # Is there a better lt_prog_compiler_static that works with the bundled CC? 8141 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8142 ;; 8143 8144 irix5* | irix6* | nonstopux*) 8145 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8146 # PIC (with -KPIC) is the default. 8147 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148 ;; 8149 8150 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8151 case $cc_basename in 8152 # old Intel for x86_64, which still supported -KPIC. 8153 ecc*) 8154 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8155 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8156 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8157 ;; 8158 # icc used to be incompatible with GCC. 8159 # ICC 10 doesn't accept -KPIC any more. 8160 icc* | ifort*) 8161 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8162 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8163 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8164 ;; 8165 # Lahey Fortran 8.1. 8166 lf95*) 8167 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8169 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8170 ;; 8171 nagfor*) 8172 # NAG Fortran compiler 8173 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8174 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8176 ;; 8177 tcc*) 8178 # Fabrice Bellard et al's Tiny C Compiler 8179 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8182 ;; 8183 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8184 # Portland Group compilers (*not* the Pentium gcc compiler, 8185 # which looks to be a dead project) 8186 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8187 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8188 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8189 ;; 8190 ccc*) 8191 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8192 # All Alpha code is PIC. 8193 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8194 ;; 8195 xl* | bgxl* | bgf* | mpixl*) 8196 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8197 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8198 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8200 ;; 8201 *) 8202 case `$CC -V 2>&1 | $SED 5q` in 8203 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8204 # Sun Fortran 8.3 passes all unrecognized flags to the linker 8205 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8207 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8208 ;; 8209 *Sun\ F* | *Sun*Fortran*) 8210 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8211 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8212 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8213 ;; 8214 *Sun\ C*) 8215 # Sun C 5.9 8216 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8217 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8218 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8219 ;; 8220 *Intel*\ [[CF]]*Compiler*) 8221 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8223 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8224 ;; 8225 *Portland\ Group*) 8226 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8228 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8229 ;; 8230 esac 8231 ;; 8232 esac 8233 ;; 8234 8235 newsos6) 8236 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8237 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8238 ;; 8239 8240 *nto* | *qnx*) 8241 # QNX uses GNU C++, but need to define -shared option too, otherwise 8242 # it will coredump. 8243 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8244 ;; 8245 8246 osf3* | osf4* | osf5*) 8247 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8248 # All OSF/1 code is PIC. 8249 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8250 ;; 8251 8252 rdos*) 8253 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8254 ;; 8255 8256 solaris*) 8257 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8258 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8259 case $cc_basename in 8260 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8261 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8262 *) 8263 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8264 esac 8265 ;; 8266 8267 sunos4*) 8268 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8269 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8270 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8271 ;; 8272 8273 sysv4 | sysv4.2uw2* | sysv4.3*) 8274 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8275 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8276 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8277 ;; 8278 8279 sysv4*MP*) 8280 if test -d /usr/nec; then 8281 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8282 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8283 fi 8284 ;; 8285 8286 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8287 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8288 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8289 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8290 ;; 8291 8292 unicos*) 8293 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8294 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8295 ;; 8296 8297 uts4*) 8298 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8300 ;; 8301 8302 *) 8303 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8304 ;; 8305 esac 8306 fi 8307]) 8308case $host_os in 8309 # For platforms that do not support PIC, -DPIC is meaningless: 8310 *djgpp*) 8311 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8312 ;; 8313 *) 8314 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8315 ;; 8316esac 8317 8318AC_CACHE_CHECK([for $compiler option to produce PIC], 8319 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8320 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8321_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8322 8323# 8324# Check to make sure the PIC flag actually works. 8325# 8326if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8327 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8328 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8329 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8330 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8331 "" | " "*) ;; 8332 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8333 esac], 8334 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8335 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8336fi 8337_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8338 [Additional compiler flags for building library objects]) 8339 8340_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8341 [How to pass a linker flag through the compiler]) 8342# 8343# Check to make sure the static flag actually works. 8344# 8345wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8346_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8347 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8348 $lt_tmp_static_flag, 8349 [], 8350 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8351_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8352 [Compiler flag to prevent dynamic linking]) 8353])# _LT_COMPILER_PIC 8354 8355 8356# _LT_LINKER_SHLIBS([TAGNAME]) 8357# ---------------------------- 8358# See if the linker supports building shared libraries. 8359m4_defun([_LT_LINKER_SHLIBS], 8360[AC_REQUIRE([LT_PATH_LD])dnl 8361AC_REQUIRE([LT_PATH_NM])dnl 8362m4_require([_LT_PATH_MANIFEST_TOOL])dnl 8363m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8364m4_require([_LT_DECL_EGREP])dnl 8365m4_require([_LT_DECL_SED])dnl 8366m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8367m4_require([_LT_TAG_COMPILER])dnl 8368AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8369m4_if([$1], [CXX], [ 8370 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8371 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8372 case $host_os in 8373 aix[[4-9]]*) 8374 # If we're using GNU nm, then we don't want the "-C" option. 8375 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8376 # Without the "-l" option, or with the "-B" option, AIX nm treats 8377 # weak defined symbols like other global defined symbols, whereas 8378 # GNU nm marks them as "W". 8379 # While the 'weak' keyword is ignored in the Export File, we need 8380 # it in the Import File for the 'aix-soname' feature, so we have 8381 # to replace the "-B" option with "-P" for AIX nm. 8382 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8383 _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' 8384 else 8385 _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' 8386 fi 8387 ;; 8388 pw32*) 8389 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8390 ;; 8391 cygwin* | mingw* | cegcc*) 8392 case $cc_basename in 8393 cl* | icl*) 8394 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8395 ;; 8396 *) 8397 _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' 8398 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8399 ;; 8400 esac 8401 ;; 8402 *) 8403 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8404 ;; 8405 esac 8406], [ 8407 runpath_var= 8408 _LT_TAGVAR(allow_undefined_flag, $1)= 8409 _LT_TAGVAR(always_export_symbols, $1)=no 8410 _LT_TAGVAR(archive_cmds, $1)= 8411 _LT_TAGVAR(archive_expsym_cmds, $1)= 8412 _LT_TAGVAR(compiler_needs_object, $1)=no 8413 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8414 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8415 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8416 _LT_TAGVAR(hardcode_automatic, $1)=no 8417 _LT_TAGVAR(hardcode_direct, $1)=no 8418 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8419 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8420 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8421 _LT_TAGVAR(hardcode_minus_L, $1)=no 8422 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8423 _LT_TAGVAR(inherit_rpath, $1)=no 8424 _LT_TAGVAR(link_all_deplibs, $1)=unknown 8425 _LT_TAGVAR(module_cmds, $1)= 8426 _LT_TAGVAR(module_expsym_cmds, $1)= 8427 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8428 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8429 _LT_TAGVAR(thread_safe_flag_spec, $1)= 8430 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8431 # include_expsyms should be a list of space-separated symbols to be *always* 8432 # included in the symbol list 8433 _LT_TAGVAR(include_expsyms, $1)= 8434 # exclude_expsyms can be an extended regexp of symbols to exclude 8435 # it will be wrapped by ' (' and ')$', so one must not match beginning or 8436 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8437 # as well as any symbol that contains 'd'. 8438 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8439 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8440 # platforms (ab)use it in PIC code, but their linkers get confused if 8441 # the symbol is explicitly referenced. Since portable code cannot 8442 # rely on this symbol name, it's probably fine to never include it in 8443 # preloaded symbol tables. 8444 # Exclude shared library initialization/finalization symbols. 8445dnl Note also adjust exclude_expsyms for C++ above. 8446 extract_expsyms_cmds= 8447 8448 case $host_os in 8449 cygwin* | mingw* | pw32* | cegcc*) 8450 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8451 # When not using gcc, we currently assume that we are using 8452 # Microsoft Visual C++ or Intel C++ Compiler. 8453 if test yes != "$GCC"; then 8454 with_gnu_ld=no 8455 fi 8456 ;; 8457 interix*) 8458 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8459 with_gnu_ld=yes 8460 ;; 8461 openbsd* | bitrig*) 8462 with_gnu_ld=no 8463 ;; 8464 esac 8465 8466 _LT_TAGVAR(ld_shlibs, $1)=yes 8467 8468 # On some targets, GNU ld is compatible enough with the native linker 8469 # that we're better off using the native interface for both. 8470 lt_use_gnu_ld_interface=no 8471 if test yes = "$with_gnu_ld"; then 8472 case $host_os in 8473 aix*) 8474 # The AIX port of GNU ld has always aspired to compatibility 8475 # with the native linker. However, as the warning in the GNU ld 8476 # block says, versions before 2.19.5* couldn't really create working 8477 # shared libraries, regardless of the interface used. 8478 case `$LD -v 2>&1` in 8479 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8480 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8481 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8482 *) 8483 lt_use_gnu_ld_interface=yes 8484 ;; 8485 esac 8486 ;; 8487 *) 8488 lt_use_gnu_ld_interface=yes 8489 ;; 8490 esac 8491 fi 8492 8493 if test yes = "$lt_use_gnu_ld_interface"; then 8494 # If archive_cmds runs LD, not CC, wlarc should be empty 8495 wlarc='$wl' 8496 8497 # Set some defaults for GNU ld with shared library support. These 8498 # are reset later if shared libraries are not supported. Putting them 8499 # here allows them to be overridden if necessary. 8500 runpath_var=LD_RUN_PATH 8501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8503 # ancient GNU ld didn't support --whole-archive et. al. 8504 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8505 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8506 else 8507 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8508 fi 8509 supports_anon_versioning=no 8510 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8511 *GNU\ gold*) supports_anon_versioning=yes ;; 8512 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8513 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8514 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8515 *\ 2.11.*) ;; # other 2.11 versions 8516 *) supports_anon_versioning=yes ;; 8517 esac 8518 8519 # See if GNU ld supports shared libraries. 8520 case $host_os in 8521 aix[[3-9]]*) 8522 # On AIX/PPC, the GNU linker is very broken 8523 if test ia64 != "$host_cpu"; then 8524 _LT_TAGVAR(ld_shlibs, $1)=no 8525 cat <<_LT_EOF 1>&2 8526 8527*** Warning: the GNU linker, at least up to release 2.19, is reported 8528*** to be unable to reliably create shared libraries on AIX. 8529*** Therefore, libtool is disabling shared libraries support. If you 8530*** really care for shared libraries, you may want to install binutils 8531*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8532*** You will then need to restart the configuration process. 8533 8534_LT_EOF 8535 fi 8536 ;; 8537 8538 amigaos*) 8539 case $host_cpu in 8540 powerpc) 8541 # see comment about AmigaOS4 .so support 8542 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8543 _LT_TAGVAR(archive_expsym_cmds, $1)='' 8544 ;; 8545 m68k) 8546 _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)' 8547 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8548 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8549 ;; 8550 esac 8551 ;; 8552 8553 beos*) 8554 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8555 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8556 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8557 # support --undefined. This deserves some investigation. FIXME 8558 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8559 else 8560 _LT_TAGVAR(ld_shlibs, $1)=no 8561 fi 8562 ;; 8563 8564 cygwin* | mingw* | pw32* | cegcc*) 8565 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8566 # as there is no search path for DLLs. 8567 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8568 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8569 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8570 _LT_TAGVAR(always_export_symbols, $1)=no 8571 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8572 _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' 8573 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8574 8575 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8576 _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' 8577 # If the export-symbols file already is a .def file, use it as 8578 # is; otherwise, prepend EXPORTS... 8579 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8580 cp $export_symbols $output_objdir/$soname.def; 8581 else 8582 echo EXPORTS > $output_objdir/$soname.def; 8583 cat $export_symbols >> $output_objdir/$soname.def; 8584 fi~ 8585 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8586 else 8587 _LT_TAGVAR(ld_shlibs, $1)=no 8588 fi 8589 ;; 8590 8591 haiku*) 8592 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8593 _LT_TAGVAR(link_all_deplibs, $1)=yes 8594 ;; 8595 8596 os2*) 8597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8598 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8599 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8600 shrext_cmds=.dll 8601 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8602 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8603 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8604 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8605 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8606 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8607 emximp -o $lib $output_objdir/$libname.def' 8608 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8609 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8610 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8611 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8612 prefix_cmds="$SED"~ 8613 if test EXPORTS = "`$SED 1q $export_symbols`"; then 8614 prefix_cmds="$prefix_cmds -e 1d"; 8615 fi~ 8616 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8617 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8618 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8619 emximp -o $lib $output_objdir/$libname.def' 8620 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8621 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8622 _LT_TAGVAR(file_list_spec, $1)='@' 8623 ;; 8624 8625 interix[[3-9]]*) 8626 _LT_TAGVAR(hardcode_direct, $1)=no 8627 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8628 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8629 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8630 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8631 # Instead, shared libraries are loaded at an image base (0x10000000 by 8632 # default) and relocated if they conflict, which is a slow very memory 8633 # consuming and fragmenting process. To avoid this, we pick a random, 8634 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8635 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8636 _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' 8637 _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' 8638 ;; 8639 8640 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8641 tmp_diet=no 8642 if test linux-dietlibc = "$host_os"; then 8643 case $cc_basename in 8644 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8645 esac 8646 fi 8647 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8648 && test no = "$tmp_diet" 8649 then 8650 tmp_addflag=' $pic_flag' 8651 tmp_sharedflag='-shared' 8652 case $cc_basename,$host_cpu in 8653 pgcc*) # Portland Group C compiler 8654 _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' 8655 tmp_addflag=' $pic_flag' 8656 ;; 8657 pgf77* | pgf90* | pgf95* | pgfortran*) 8658 # Portland Group f77 and f90 compilers 8659 _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' 8660 tmp_addflag=' $pic_flag -Mnomain' ;; 8661 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8662 tmp_addflag=' -i_dynamic' ;; 8663 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8664 tmp_addflag=' -i_dynamic -nofor_main' ;; 8665 ifc* | ifort*) # Intel Fortran compiler 8666 tmp_addflag=' -nofor_main' ;; 8667 lf95*) # Lahey Fortran 8.1 8668 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8669 tmp_sharedflag='--shared' ;; 8670 nagfor*) # NAGFOR 5.3 8671 tmp_sharedflag='-Wl,-shared' ;; 8672 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8673 tmp_sharedflag='-qmkshrobj' 8674 tmp_addflag= ;; 8675 nvcc*) # Cuda Compiler Driver 2.2 8676 _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' 8677 _LT_TAGVAR(compiler_needs_object, $1)=yes 8678 ;; 8679 esac 8680 case `$CC -V 2>&1 | $SED 5q` in 8681 *Sun\ C*) # Sun C 5.9 8682 _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' 8683 _LT_TAGVAR(compiler_needs_object, $1)=yes 8684 tmp_sharedflag='-G' ;; 8685 *Sun\ F*) # Sun Fortran 8.3 8686 tmp_sharedflag='-G' ;; 8687 esac 8688 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8689 8690 if test yes = "$supports_anon_versioning"; then 8691 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8692 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8693 echo "local: *; };" >> $output_objdir/$libname.ver~ 8694 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8695 fi 8696 8697 case $cc_basename in 8698 tcc*) 8699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8700 ;; 8701 xlf* | bgf* | bgxlf* | mpixlf*) 8702 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8703 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8704 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8705 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8706 if test yes = "$supports_anon_versioning"; then 8707 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8708 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8709 echo "local: *; };" >> $output_objdir/$libname.ver~ 8710 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8711 fi 8712 ;; 8713 esac 8714 else 8715 _LT_TAGVAR(ld_shlibs, $1)=no 8716 fi 8717 ;; 8718 8719 netbsd*) 8720 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8721 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8722 wlarc= 8723 else 8724 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8725 _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' 8726 fi 8727 ;; 8728 8729 solaris*) 8730 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8731 _LT_TAGVAR(ld_shlibs, $1)=no 8732 cat <<_LT_EOF 1>&2 8733 8734*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8735*** create shared libraries on Solaris systems. Therefore, libtool 8736*** is disabling shared libraries support. We urge you to upgrade GNU 8737*** binutils to release 2.9.1 or newer. Another option is to modify 8738*** your PATH or compiler configuration so that the native linker is 8739*** used, and then restart. 8740 8741_LT_EOF 8742 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8743 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8744 _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' 8745 else 8746 _LT_TAGVAR(ld_shlibs, $1)=no 8747 fi 8748 ;; 8749 8750 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8751 case `$LD -v 2>&1` in 8752 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8753 _LT_TAGVAR(ld_shlibs, $1)=no 8754 cat <<_LT_EOF 1>&2 8755 8756*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8757*** reliably create shared libraries on SCO systems. Therefore, libtool 8758*** is disabling shared libraries support. We urge you to upgrade GNU 8759*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8760*** your PATH or compiler configuration so that the native linker is 8761*** used, and then restart. 8762 8763_LT_EOF 8764 ;; 8765 *) 8766 # For security reasons, it is highly recommended that you always 8767 # use absolute paths for naming shared libraries, and exclude the 8768 # DT_RUNPATH tag from executables and libraries. But doing so 8769 # requires that you compile everything twice, which is a pain. 8770 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8771 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8773 _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' 8774 else 8775 _LT_TAGVAR(ld_shlibs, $1)=no 8776 fi 8777 ;; 8778 esac 8779 ;; 8780 8781 sunos4*) 8782 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8783 wlarc= 8784 _LT_TAGVAR(hardcode_direct, $1)=yes 8785 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8786 ;; 8787 8788 *) 8789 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8790 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8791 _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' 8792 else 8793 _LT_TAGVAR(ld_shlibs, $1)=no 8794 fi 8795 ;; 8796 esac 8797 8798 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8799 runpath_var= 8800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8801 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8802 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8803 fi 8804 else 8805 # PORTME fill in a description of your system's linker (not GNU ld) 8806 case $host_os in 8807 aix3*) 8808 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8809 _LT_TAGVAR(always_export_symbols, $1)=yes 8810 _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' 8811 # Note: this linker hardcodes the directories in LIBPATH if there 8812 # are no directories specified by -L. 8813 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8814 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8815 # Neither direct hardcoding nor static linking is supported with a 8816 # broken collect2. 8817 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8818 fi 8819 ;; 8820 8821 aix[[4-9]]*) 8822 if test ia64 = "$host_cpu"; then 8823 # On IA64, the linker does run time linking by default, so we don't 8824 # have to do anything special. 8825 aix_use_runtimelinking=no 8826 exp_sym_flag='-Bexport' 8827 no_entry_flag= 8828 else 8829 # If we're using GNU nm, then we don't want the "-C" option. 8830 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8831 # Without the "-l" option, or with the "-B" option, AIX nm treats 8832 # weak defined symbols like other global defined symbols, whereas 8833 # GNU nm marks them as "W". 8834 # While the 'weak' keyword is ignored in the Export File, we need 8835 # it in the Import File for the 'aix-soname' feature, so we have 8836 # to replace the "-B" option with "-P" for AIX nm. 8837 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8838 _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' 8839 else 8840 _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' 8841 fi 8842 aix_use_runtimelinking=no 8843 8844 # Test if we are trying to use run time linking or normal 8845 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8846 # have runtime linking enabled, and use it for executables. 8847 # For shared libraries, we enable/disable runtime linking 8848 # depending on the kind of the shared library created - 8849 # when "with_aix_soname,aix_use_runtimelinking" is: 8850 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8851 # "aix,yes" lib.so shared, rtl:yes, for executables 8852 # lib.a static archive 8853 # "both,no" lib.so.V(shr.o) shared, rtl:yes 8854 # lib.a(lib.so.V) shared, rtl:no, for executables 8855 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8856 # lib.a(lib.so.V) shared, rtl:no 8857 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8858 # lib.a static archive 8859 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8860 for ld_flag in $LDFLAGS; do 8861 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8862 aix_use_runtimelinking=yes 8863 break 8864 fi 8865 done 8866 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8867 # With aix-soname=svr4, we create the lib.so.V shared archives only, 8868 # so we don't have lib.a shared libs to link our executables. 8869 # We have to force runtime linking in this case. 8870 aix_use_runtimelinking=yes 8871 LDFLAGS="$LDFLAGS -Wl,-brtl" 8872 fi 8873 ;; 8874 esac 8875 8876 exp_sym_flag='-bexport' 8877 no_entry_flag='-bnoentry' 8878 fi 8879 8880 # When large executables or shared objects are built, AIX ld can 8881 # have problems creating the table of contents. If linking a library 8882 # or program results in "error TOC overflow" add -mminimal-toc to 8883 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8884 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8885 8886 _LT_TAGVAR(archive_cmds, $1)='' 8887 _LT_TAGVAR(hardcode_direct, $1)=yes 8888 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8889 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8890 _LT_TAGVAR(link_all_deplibs, $1)=yes 8891 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8892 case $with_aix_soname,$aix_use_runtimelinking in 8893 aix,*) ;; # traditional, no import file 8894 svr4,* | *,yes) # use import file 8895 # The Import File defines what to hardcode. 8896 _LT_TAGVAR(hardcode_direct, $1)=no 8897 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8898 ;; 8899 esac 8900 8901 if test yes = "$GCC"; then 8902 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8903 # We only want to do this on AIX 4.2 and lower, the check 8904 # below for broken collect2 doesn't work under 4.3+ 8905 collect2name=`$CC -print-prog-name=collect2` 8906 if test -f "$collect2name" && 8907 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8908 then 8909 # We have reworked collect2 8910 : 8911 else 8912 # We have old collect2 8913 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8914 # It fails to find uninstalled libraries when the uninstalled 8915 # path is not listed in the libpath. Setting hardcode_minus_L 8916 # to unsupported forces relinking 8917 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8919 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8920 fi 8921 ;; 8922 esac 8923 shared_flag='-shared' 8924 if test yes = "$aix_use_runtimelinking"; then 8925 shared_flag="$shared_flag "'$wl-G' 8926 fi 8927 # Need to ensure runtime linking is disabled for the traditional 8928 # shared library, or the linker may eventually find shared libraries 8929 # /with/ Import File - we do not want to mix them. 8930 shared_flag_aix='-shared' 8931 shared_flag_svr4='-shared $wl-G' 8932 else 8933 # not using gcc 8934 if test ia64 = "$host_cpu"; then 8935 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8936 # chokes on -Wl,-G. The following line is correct: 8937 shared_flag='-G' 8938 else 8939 if test yes = "$aix_use_runtimelinking"; then 8940 shared_flag='$wl-G' 8941 else 8942 shared_flag='$wl-bM:SRE' 8943 fi 8944 shared_flag_aix='$wl-bM:SRE' 8945 shared_flag_svr4='$wl-G' 8946 fi 8947 fi 8948 8949 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8950 # It seems that -bexpall does not export symbols beginning with 8951 # underscore (_), so it is better to generate a list of symbols to export. 8952 _LT_TAGVAR(always_export_symbols, $1)=yes 8953 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8954 # Warning - without using the other runtime loading flags (-brtl), 8955 # -berok will link without error, but may produce a broken library. 8956 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8957 # Determine the default libpath from the value encoded in an 8958 # empty executable. 8959 _LT_SYS_MODULE_PATH_AIX([$1]) 8960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8961 _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 8962 else 8963 if test ia64 = "$host_cpu"; then 8964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8965 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8966 _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" 8967 else 8968 # Determine the default libpath from the value encoded in an 8969 # empty executable. 8970 _LT_SYS_MODULE_PATH_AIX([$1]) 8971 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8972 # Warning - without using the other run time loading flags, 8973 # -berok will link without error, but may produce a broken library. 8974 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8975 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8976 if test yes = "$with_gnu_ld"; then 8977 # We only use this code for GNU lds that support --whole-archive. 8978 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8979 else 8980 # Exported symbols can be pulled into shared objects from archives 8981 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8982 fi 8983 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8984 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8985 # -brtl affects multiple linker settings, -berok does not and is overridden later 8986 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8987 if test svr4 != "$with_aix_soname"; then 8988 # This is similar to how AIX traditionally builds its shared libraries. 8989 _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' 8990 fi 8991 if test aix != "$with_aix_soname"; then 8992 _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' 8993 else 8994 # used by -dlpreopen to get the symbols 8995 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8996 fi 8997 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8998 fi 8999 fi 9000 ;; 9001 9002 amigaos*) 9003 case $host_cpu in 9004 powerpc) 9005 # see comment about AmigaOS4 .so support 9006 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9007 _LT_TAGVAR(archive_expsym_cmds, $1)='' 9008 ;; 9009 m68k) 9010 _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)' 9011 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9012 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9013 ;; 9014 esac 9015 ;; 9016 9017 bsdi[[45]]*) 9018 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 9019 ;; 9020 9021 cygwin* | mingw* | pw32* | cegcc*) 9022 # When not using gcc, we currently assume that we are using 9023 # Microsoft Visual C++ or Intel C++ Compiler. 9024 # hardcode_libdir_flag_spec is actually meaningless, as there is 9025 # no search path for DLLs. 9026 case $cc_basename in 9027 cl* | icl*) 9028 # Native MSVC or ICC 9029 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9030 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9031 _LT_TAGVAR(always_export_symbols, $1)=yes 9032 _LT_TAGVAR(file_list_spec, $1)='@' 9033 # Tell ltmain to make .lib files, not .a files. 9034 libext=lib 9035 # Tell ltmain to make .dll files, not .so files. 9036 shrext_cmds=.dll 9037 # FIXME: Setting linknames here is a bad hack. 9038 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9039 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9040 cp "$export_symbols" "$output_objdir/$soname.def"; 9041 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9042 else 9043 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9044 fi~ 9045 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9046 linknames=' 9047 # The linker will not automatically build a static lib if we build a DLL. 9048 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9049 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9050 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9051 _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' 9052 # Don't use ranlib 9053 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9054 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9055 lt_tool_outputfile="@TOOL_OUTPUT@"~ 9056 case $lt_outputfile in 9057 *.exe|*.EXE) ;; 9058 *) 9059 lt_outputfile=$lt_outputfile.exe 9060 lt_tool_outputfile=$lt_tool_outputfile.exe 9061 ;; 9062 esac~ 9063 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9064 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9065 $RM "$lt_outputfile.manifest"; 9066 fi' 9067 ;; 9068 *) 9069 # Assume MSVC and ICC wrapper 9070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9071 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9072 # Tell ltmain to make .lib files, not .a files. 9073 libext=lib 9074 # Tell ltmain to make .dll files, not .so files. 9075 shrext_cmds=.dll 9076 # FIXME: Setting linknames here is a bad hack. 9077 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9078 # The linker will automatically build a .lib file if we build a DLL. 9079 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9080 # FIXME: Should let the user specify the lib program. 9081 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9082 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9083 ;; 9084 esac 9085 ;; 9086 9087 darwin* | rhapsody*) 9088 _LT_DARWIN_LINKER_FEATURES($1) 9089 ;; 9090 9091 dgux*) 9092 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9093 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9094 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9095 ;; 9096 9097 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9098 # support. Future versions do this automatically, but an explicit c++rt0.o 9099 # does not break anything, and helps significantly (at the cost of a little 9100 # extra space). 9101 freebsd2.2*) 9102 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9104 _LT_TAGVAR(hardcode_direct, $1)=yes 9105 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9106 ;; 9107 9108 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9109 freebsd2.*) 9110 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9111 _LT_TAGVAR(hardcode_direct, $1)=yes 9112 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9113 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9114 ;; 9115 9116 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9117 freebsd* | dragonfly* | midnightbsd*) 9118 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9119 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9120 _LT_TAGVAR(hardcode_direct, $1)=yes 9121 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9122 ;; 9123 9124 hpux9*) 9125 if test yes = "$GCC"; then 9126 _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' 9127 else 9128 _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' 9129 fi 9130 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9131 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9132 _LT_TAGVAR(hardcode_direct, $1)=yes 9133 9134 # hardcode_minus_L: Not really in the search PATH, 9135 # but as the default location of the library. 9136 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9137 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9138 ;; 9139 9140 hpux10*) 9141 if test yes,no = "$GCC,$with_gnu_ld"; then 9142 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9143 else 9144 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9145 fi 9146 if test no = "$with_gnu_ld"; then 9147 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9148 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9149 _LT_TAGVAR(hardcode_direct, $1)=yes 9150 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9151 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9152 # hardcode_minus_L: Not really in the search PATH, 9153 # but as the default location of the library. 9154 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9155 fi 9156 ;; 9157 9158 hpux11*) 9159 if test yes,no = "$GCC,$with_gnu_ld"; then 9160 case $host_cpu in 9161 hppa*64*) 9162 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9163 ;; 9164 ia64*) 9165 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9166 ;; 9167 *) 9168 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9169 ;; 9170 esac 9171 else 9172 case $host_cpu in 9173 hppa*64*) 9174 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9175 ;; 9176 ia64*) 9177 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9178 ;; 9179 *) 9180 m4_if($1, [], [ 9181 # Older versions of the 11.00 compiler do not understand -b yet 9182 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9183 _LT_LINKER_OPTION([if $CC understands -b], 9184 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9185 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9186 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9187 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9188 ;; 9189 esac 9190 fi 9191 if test no = "$with_gnu_ld"; then 9192 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9193 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9194 9195 case $host_cpu in 9196 hppa*64*|ia64*) 9197 _LT_TAGVAR(hardcode_direct, $1)=no 9198 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9199 ;; 9200 *) 9201 _LT_TAGVAR(hardcode_direct, $1)=yes 9202 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9203 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9204 9205 # hardcode_minus_L: Not really in the search PATH, 9206 # but as the default location of the library. 9207 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9208 ;; 9209 esac 9210 fi 9211 ;; 9212 9213 irix5* | irix6* | nonstopux*) 9214 if test yes = "$GCC"; then 9215 _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' 9216 # Try to use the -exported_symbol ld option, if it does not 9217 # work, assume that -exports_file does not work either and 9218 # implicitly export all symbols. 9219 # This should be the same for all languages, so no per-tag cache variable. 9220 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9221 [lt_cv_irix_exported_symbol], 9222 [save_LDFLAGS=$LDFLAGS 9223 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9224 AC_LINK_IFELSE( 9225 [AC_LANG_SOURCE( 9226 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9227 [C++], [[int foo (void) { return 0; }]], 9228 [Fortran 77], [[ 9229 subroutine foo 9230 end]], 9231 [Fortran], [[ 9232 subroutine foo 9233 end]])])], 9234 [lt_cv_irix_exported_symbol=yes], 9235 [lt_cv_irix_exported_symbol=no]) 9236 LDFLAGS=$save_LDFLAGS]) 9237 if test yes = "$lt_cv_irix_exported_symbol"; then 9238 _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' 9239 fi 9240 else 9241 _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' 9242 _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' 9243 fi 9244 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9245 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9246 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9247 _LT_TAGVAR(inherit_rpath, $1)=yes 9248 _LT_TAGVAR(link_all_deplibs, $1)=yes 9249 ;; 9250 9251 linux*) 9252 case $cc_basename in 9253 tcc*) 9254 # Fabrice Bellard et al's Tiny C Compiler 9255 _LT_TAGVAR(ld_shlibs, $1)=yes 9256 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9257 ;; 9258 esac 9259 ;; 9260 9261 netbsd*) 9262 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9263 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9264 else 9265 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9266 fi 9267 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9268 _LT_TAGVAR(hardcode_direct, $1)=yes 9269 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9270 ;; 9271 9272 newsos6) 9273 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9274 _LT_TAGVAR(hardcode_direct, $1)=yes 9275 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9276 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9277 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9278 ;; 9279 9280 *nto* | *qnx*) 9281 ;; 9282 9283 openbsd* | bitrig*) 9284 if test -f /usr/libexec/ld.so; then 9285 _LT_TAGVAR(hardcode_direct, $1)=yes 9286 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9287 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9288 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9289 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9290 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9292 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9293 else 9294 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9295 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9296 fi 9297 else 9298 _LT_TAGVAR(ld_shlibs, $1)=no 9299 fi 9300 ;; 9301 9302 os2*) 9303 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9304 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9305 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9306 shrext_cmds=.dll 9307 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9308 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9309 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9310 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9311 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9312 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9313 emximp -o $lib $output_objdir/$libname.def' 9314 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9315 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9316 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9317 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9318 prefix_cmds="$SED"~ 9319 if test EXPORTS = "`$SED 1q $export_symbols`"; then 9320 prefix_cmds="$prefix_cmds -e 1d"; 9321 fi~ 9322 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9323 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9324 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9325 emximp -o $lib $output_objdir/$libname.def' 9326 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9327 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9328 _LT_TAGVAR(file_list_spec, $1)='@' 9329 ;; 9330 9331 osf3*) 9332 if test yes = "$GCC"; then 9333 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9334 _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' 9335 else 9336 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9337 _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' 9338 fi 9339 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9340 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9341 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9342 ;; 9343 9344 osf4* | osf5*) # as osf3* with the addition of -msym flag 9345 if test yes = "$GCC"; then 9346 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9347 _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' 9348 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9349 else 9350 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9351 _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' 9352 _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~ 9353 $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' 9354 9355 # Both c and cxx compiler support -rpath directly 9356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9357 fi 9358 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9359 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9360 ;; 9361 9362 solaris*) 9363 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9364 if test yes = "$GCC"; then 9365 wlarc='$wl' 9366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9367 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9368 $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' 9369 else 9370 case `$CC -V 2>&1` in 9371 *"Compilers 5.0"*) 9372 wlarc='' 9373 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9374 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9375 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9376 ;; 9377 *) 9378 wlarc='$wl' 9379 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9380 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9381 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9382 ;; 9383 esac 9384 fi 9385 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9386 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9387 case $host_os in 9388 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9389 *) 9390 # The compiler driver will combine and reorder linker options, 9391 # but understands '-z linker_flag'. GCC discards it without '$wl', 9392 # but is careful enough not to reorder. 9393 # Supported since Solaris 2.6 (maybe 2.5.1?) 9394 if test yes = "$GCC"; then 9395 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9396 else 9397 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9398 fi 9399 ;; 9400 esac 9401 _LT_TAGVAR(link_all_deplibs, $1)=yes 9402 ;; 9403 9404 sunos4*) 9405 if test sequent = "$host_vendor"; then 9406 # Use $CC to link under sequent, because it throws in some extra .o 9407 # files that make .init and .fini sections work. 9408 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9409 else 9410 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9411 fi 9412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9413 _LT_TAGVAR(hardcode_direct, $1)=yes 9414 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9415 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9416 ;; 9417 9418 sysv4) 9419 case $host_vendor in 9420 sni) 9421 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9422 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9423 ;; 9424 siemens) 9425 ## LD is ld it makes a PLAMLIB 9426 ## CC just makes a GrossModule. 9427 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9428 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9429 _LT_TAGVAR(hardcode_direct, $1)=no 9430 ;; 9431 motorola) 9432 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9433 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9434 ;; 9435 esac 9436 runpath_var='LD_RUN_PATH' 9437 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9438 ;; 9439 9440 sysv4.3*) 9441 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9442 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9443 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9444 ;; 9445 9446 sysv4*MP*) 9447 if test -d /usr/nec; then 9448 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9449 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9450 runpath_var=LD_RUN_PATH 9451 hardcode_runpath_var=yes 9452 _LT_TAGVAR(ld_shlibs, $1)=yes 9453 fi 9454 ;; 9455 9456 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9457 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9458 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9459 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9460 runpath_var='LD_RUN_PATH' 9461 9462 if test yes = "$GCC"; then 9463 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9464 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9465 else 9466 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9467 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9468 fi 9469 ;; 9470 9471 sysv5* | sco3.2v5* | sco5v6*) 9472 # Note: We CANNOT use -z defs as we might desire, because we do not 9473 # link with -lc, and that would cause any symbols used from libc to 9474 # always be unresolved, which means just about no library would 9475 # ever link correctly. If we're not using GNU ld we use -z text 9476 # though, which does catch some bad symbols but isn't as heavy-handed 9477 # as -z defs. 9478 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9479 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9480 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9481 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9482 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9483 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9484 _LT_TAGVAR(link_all_deplibs, $1)=yes 9485 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9486 runpath_var='LD_RUN_PATH' 9487 9488 if test yes = "$GCC"; then 9489 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9490 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9491 else 9492 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9493 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9494 fi 9495 ;; 9496 9497 uts4*) 9498 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9499 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9500 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9501 ;; 9502 9503 *) 9504 _LT_TAGVAR(ld_shlibs, $1)=no 9505 ;; 9506 esac 9507 9508 if test sni = "$host_vendor"; then 9509 case $host in 9510 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9511 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9512 ;; 9513 esac 9514 fi 9515 fi 9516]) 9517AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9518test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9519 9520_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9521 9522_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9523_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9524_LT_DECL([], [extract_expsyms_cmds], [2], 9525 [The commands to extract the exported symbol list from a shared archive]) 9526 9527# 9528# Do we need to explicitly link libc? 9529# 9530case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9531x|xyes) 9532 # Assume -lc should be added 9533 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9534 9535 if test yes,yes = "$GCC,$enable_shared"; then 9536 case $_LT_TAGVAR(archive_cmds, $1) in 9537 *'~'*) 9538 # FIXME: we may have to deal with multi-command sequences. 9539 ;; 9540 '$CC '*) 9541 # Test whether the compiler implicitly links with -lc since on some 9542 # systems, -lgcc has to come before -lc. If gcc already passes -lc 9543 # to ld, don't add -lc before -lgcc. 9544 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9545 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9546 [$RM conftest* 9547 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9548 9549 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9550 soname=conftest 9551 lib=conftest 9552 libobjs=conftest.$ac_objext 9553 deplibs= 9554 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9555 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9556 compiler_flags=-v 9557 linker_flags=-v 9558 verstring= 9559 output_objdir=. 9560 libname=conftest 9561 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9562 _LT_TAGVAR(allow_undefined_flag, $1)= 9563 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9564 then 9565 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9566 else 9567 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9568 fi 9569 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9570 else 9571 cat conftest.err 1>&5 9572 fi 9573 $RM conftest* 9574 ]) 9575 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9576 ;; 9577 esac 9578 fi 9579 ;; 9580esac 9581 9582_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9583 [Whether or not to add -lc for building shared libraries]) 9584_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9585 [enable_shared_with_static_runtimes], [0], 9586 [Whether or not to disallow shared libs when runtime libs are static]) 9587_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9588 [Compiler flag to allow reflexive dlopens]) 9589_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9590 [Compiler flag to generate shared objects directly from archives]) 9591_LT_TAGDECL([], [compiler_needs_object], [1], 9592 [Whether the compiler copes with passing no objects directly]) 9593_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9594 [Create an old-style archive from a shared archive]) 9595_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9596 [Create a temporary old-style archive to link instead of a shared archive]) 9597_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9598_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9599_LT_TAGDECL([], [module_cmds], [2], 9600 [Commands used to build a loadable module if different from building 9601 a shared archive.]) 9602_LT_TAGDECL([], [module_expsym_cmds], [2]) 9603_LT_TAGDECL([], [with_gnu_ld], [1], 9604 [Whether we are building with GNU ld or not]) 9605_LT_TAGDECL([], [allow_undefined_flag], [1], 9606 [Flag that allows shared libraries with undefined symbols to be built]) 9607_LT_TAGDECL([], [no_undefined_flag], [1], 9608 [Flag that enforces no undefined symbols]) 9609_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9610 [Flag to hardcode $libdir into a binary during linking. 9611 This must work even if $libdir does not exist]) 9612_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9613 [Whether we need a single "-rpath" flag with a separated argument]) 9614_LT_TAGDECL([], [hardcode_direct], [0], 9615 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9616 DIR into the resulting binary]) 9617_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9618 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9619 DIR into the resulting binary and the resulting library dependency is 9620 "absolute", i.e impossible to change by setting $shlibpath_var if the 9621 library is relocated]) 9622_LT_TAGDECL([], [hardcode_minus_L], [0], 9623 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9624 into the resulting binary]) 9625_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9626 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9627 into the resulting binary]) 9628_LT_TAGDECL([], [hardcode_automatic], [0], 9629 [Set to "yes" if building a shared library automatically hardcodes DIR 9630 into the library and all subsequent libraries and executables linked 9631 against it]) 9632_LT_TAGDECL([], [inherit_rpath], [0], 9633 [Set to yes if linker adds runtime paths of dependent libraries 9634 to runtime path list]) 9635_LT_TAGDECL([], [link_all_deplibs], [0], 9636 [Whether libtool must link a program against all its dependency libraries]) 9637_LT_TAGDECL([], [always_export_symbols], [0], 9638 [Set to "yes" if exported symbols are required]) 9639_LT_TAGDECL([], [export_symbols_cmds], [2], 9640 [The commands to list exported symbols]) 9641_LT_TAGDECL([], [exclude_expsyms], [1], 9642 [Symbols that should not be listed in the preloaded symbols]) 9643_LT_TAGDECL([], [include_expsyms], [1], 9644 [Symbols that must always be exported]) 9645_LT_TAGDECL([], [prelink_cmds], [2], 9646 [Commands necessary for linking programs (against libraries) with templates]) 9647_LT_TAGDECL([], [postlink_cmds], [2], 9648 [Commands necessary for finishing linking programs]) 9649_LT_TAGDECL([], [file_list_spec], [1], 9650 [Specify filename containing input files]) 9651dnl FIXME: Not yet implemented 9652dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9653dnl [Compiler flag to generate thread safe objects]) 9654])# _LT_LINKER_SHLIBS 9655 9656 9657# _LT_LANG_C_CONFIG([TAG]) 9658# ------------------------ 9659# Ensure that the configuration variables for a C compiler are suitably 9660# defined. These variables are subsequently used by _LT_CONFIG to write 9661# the compiler configuration to 'libtool'. 9662m4_defun([_LT_LANG_C_CONFIG], 9663[m4_require([_LT_DECL_EGREP])dnl 9664lt_save_CC=$CC 9665AC_LANG_PUSH(C) 9666 9667# Source file extension for C test sources. 9668ac_ext=c 9669 9670# Object file extension for compiled C test sources. 9671objext=o 9672_LT_TAGVAR(objext, $1)=$objext 9673 9674# Code to be used in simple compile tests 9675lt_simple_compile_test_code="int some_variable = 0;" 9676 9677# Code to be used in simple link tests 9678lt_simple_link_test_code='int main(){return(0);}' 9679 9680_LT_TAG_COMPILER 9681# Save the default compiler, since it gets overwritten when the other 9682# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9683compiler_DEFAULT=$CC 9684 9685# save warnings/boilerplate of simple test code 9686_LT_COMPILER_BOILERPLATE 9687_LT_LINKER_BOILERPLATE 9688 9689if test -n "$compiler"; then 9690 _LT_COMPILER_NO_RTTI($1) 9691 _LT_COMPILER_PIC($1) 9692 _LT_COMPILER_C_O($1) 9693 _LT_COMPILER_FILE_LOCKS($1) 9694 _LT_LINKER_SHLIBS($1) 9695 _LT_SYS_DYNAMIC_LINKER($1) 9696 _LT_LINKER_HARDCODE_LIBPATH($1) 9697 LT_SYS_DLOPEN_SELF 9698 _LT_CMD_STRIPLIB 9699 9700 # Report what library types will actually be built 9701 AC_MSG_CHECKING([if libtool supports shared libraries]) 9702 AC_MSG_RESULT([$can_build_shared]) 9703 9704 AC_MSG_CHECKING([whether to build shared libraries]) 9705 test no = "$can_build_shared" && enable_shared=no 9706 9707 # On AIX, shared libraries and static libraries use the same namespace, and 9708 # are all built from PIC. 9709 case $host_os in 9710 aix3*) 9711 test yes = "$enable_shared" && enable_static=no 9712 if test -n "$RANLIB"; then 9713 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9714 postinstall_cmds='$RANLIB $lib' 9715 fi 9716 ;; 9717 9718 aix[[4-9]]*) 9719 if test ia64 != "$host_cpu"; then 9720 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9721 yes,aix,yes) ;; # shared object as lib.so file only 9722 yes,svr4,*) ;; # shared object as lib.so archive member only 9723 yes,*) enable_static=no ;; # shared object in lib.a archive as well 9724 esac 9725 fi 9726 ;; 9727 esac 9728 AC_MSG_RESULT([$enable_shared]) 9729 9730 AC_MSG_CHECKING([whether to build static libraries]) 9731 # Make sure either enable_shared or enable_static is yes. 9732 test yes = "$enable_shared" || enable_static=yes 9733 AC_MSG_RESULT([$enable_static]) 9734 9735 _LT_CONFIG($1) 9736fi 9737AC_LANG_POP 9738CC=$lt_save_CC 9739])# _LT_LANG_C_CONFIG 9740 9741 9742# _LT_LANG_CXX_CONFIG([TAG]) 9743# -------------------------- 9744# Ensure that the configuration variables for a C++ compiler are suitably 9745# defined. These variables are subsequently used by _LT_CONFIG to write 9746# the compiler configuration to 'libtool'. 9747m4_defun([_LT_LANG_CXX_CONFIG], 9748[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9749m4_require([_LT_DECL_EGREP])dnl 9750m4_require([_LT_PATH_MANIFEST_TOOL])dnl 9751if test -n "$CXX" && ( test no != "$CXX" && 9752 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9753 (test g++ != "$CXX"))); then 9754 AC_PROG_CXXCPP 9755else 9756 _lt_caught_CXX_error=yes 9757fi 9758 9759AC_LANG_PUSH(C++) 9760_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9761_LT_TAGVAR(allow_undefined_flag, $1)= 9762_LT_TAGVAR(always_export_symbols, $1)=no 9763_LT_TAGVAR(archive_expsym_cmds, $1)= 9764_LT_TAGVAR(compiler_needs_object, $1)=no 9765_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9766_LT_TAGVAR(hardcode_direct, $1)=no 9767_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9768_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9769_LT_TAGVAR(hardcode_libdir_separator, $1)= 9770_LT_TAGVAR(hardcode_minus_L, $1)=no 9771_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9772_LT_TAGVAR(hardcode_automatic, $1)=no 9773_LT_TAGVAR(inherit_rpath, $1)=no 9774_LT_TAGVAR(module_cmds, $1)= 9775_LT_TAGVAR(module_expsym_cmds, $1)= 9776_LT_TAGVAR(link_all_deplibs, $1)=unknown 9777_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9778_LT_TAGVAR(reload_flag, $1)=$reload_flag 9779_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9780_LT_TAGVAR(no_undefined_flag, $1)= 9781_LT_TAGVAR(whole_archive_flag_spec, $1)= 9782_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9783 9784# Source file extension for C++ test sources. 9785ac_ext=cpp 9786 9787# Object file extension for compiled C++ test sources. 9788objext=o 9789_LT_TAGVAR(objext, $1)=$objext 9790 9791# No sense in running all these tests if we already determined that 9792# the CXX compiler isn't working. Some variables (like enable_shared) 9793# are currently assumed to apply to all compilers on this platform, 9794# and will be corrupted by setting them based on a non-working compiler. 9795if test yes != "$_lt_caught_CXX_error"; then 9796 # Code to be used in simple compile tests 9797 lt_simple_compile_test_code="int some_variable = 0;" 9798 9799 # Code to be used in simple link tests 9800 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9801 9802 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9803 _LT_TAG_COMPILER 9804 9805 # save warnings/boilerplate of simple test code 9806 _LT_COMPILER_BOILERPLATE 9807 _LT_LINKER_BOILERPLATE 9808 9809 # Allow CC to be a program name with arguments. 9810 lt_save_CC=$CC 9811 lt_save_CFLAGS=$CFLAGS 9812 lt_save_LD=$LD 9813 lt_save_GCC=$GCC 9814 GCC=$GXX 9815 lt_save_with_gnu_ld=$with_gnu_ld 9816 lt_save_path_LD=$lt_cv_path_LD 9817 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9818 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9819 else 9820 $as_unset lt_cv_prog_gnu_ld 9821 fi 9822 if test -n "${lt_cv_path_LDCXX+set}"; then 9823 lt_cv_path_LD=$lt_cv_path_LDCXX 9824 else 9825 $as_unset lt_cv_path_LD 9826 fi 9827 test -z "${LDCXX+set}" || LD=$LDCXX 9828 CC=${CXX-"c++"} 9829 CFLAGS=$CXXFLAGS 9830 compiler=$CC 9831 _LT_TAGVAR(compiler, $1)=$CC 9832 _LT_CC_BASENAME([$compiler]) 9833 9834 if test -n "$compiler"; then 9835 # We don't want -fno-exception when compiling C++ code, so set the 9836 # no_builtin_flag separately 9837 if test yes = "$GXX"; then 9838 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9839 else 9840 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9841 fi 9842 9843 if test yes = "$GXX"; then 9844 # Set up default GNU C++ configuration 9845 9846 LT_PATH_LD 9847 9848 # Check if GNU C++ uses GNU ld as the underlying linker, since the 9849 # archiving commands below assume that GNU ld is being used. 9850 if test yes = "$with_gnu_ld"; then 9851 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9852 _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' 9853 9854 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9855 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9856 9857 # If archive_cmds runs LD, not CC, wlarc should be empty 9858 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9859 # investigate it a little bit more. (MM) 9860 wlarc='$wl' 9861 9862 # ancient GNU ld didn't support --whole-archive et. al. 9863 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9864 $GREP 'no-whole-archive' > /dev/null; then 9865 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9866 else 9867 _LT_TAGVAR(whole_archive_flag_spec, $1)= 9868 fi 9869 else 9870 with_gnu_ld=no 9871 wlarc= 9872 9873 # A generic and very simple default shared library creation 9874 # command for GNU C++ for the case where it uses the native 9875 # linker, instead of GNU ld. If possible, this setting should 9876 # overridden to take advantage of the native linker features on 9877 # the platform it is being used on. 9878 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9879 fi 9880 9881 # Commands to make compiler produce verbose output that lists 9882 # what "hidden" libraries, object files and flags are used when 9883 # linking a shared library. 9884 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9885 9886 else 9887 GXX=no 9888 with_gnu_ld=no 9889 wlarc= 9890 fi 9891 9892 # PORTME: fill in a description of your system's C++ link characteristics 9893 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9894 _LT_TAGVAR(ld_shlibs, $1)=yes 9895 case $host_os in 9896 aix3*) 9897 # FIXME: insert proper C++ library support 9898 _LT_TAGVAR(ld_shlibs, $1)=no 9899 ;; 9900 aix[[4-9]]*) 9901 if test ia64 = "$host_cpu"; then 9902 # On IA64, the linker does run time linking by default, so we don't 9903 # have to do anything special. 9904 aix_use_runtimelinking=no 9905 exp_sym_flag='-Bexport' 9906 no_entry_flag= 9907 else 9908 aix_use_runtimelinking=no 9909 9910 # Test if we are trying to use run time linking or normal 9911 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9912 # have runtime linking enabled, and use it for executables. 9913 # For shared libraries, we enable/disable runtime linking 9914 # depending on the kind of the shared library created - 9915 # when "with_aix_soname,aix_use_runtimelinking" is: 9916 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9917 # "aix,yes" lib.so shared, rtl:yes, for executables 9918 # lib.a static archive 9919 # "both,no" lib.so.V(shr.o) shared, rtl:yes 9920 # lib.a(lib.so.V) shared, rtl:no, for executables 9921 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9922 # lib.a(lib.so.V) shared, rtl:no 9923 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9924 # lib.a static archive 9925 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9926 for ld_flag in $LDFLAGS; do 9927 case $ld_flag in 9928 *-brtl*) 9929 aix_use_runtimelinking=yes 9930 break 9931 ;; 9932 esac 9933 done 9934 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9935 # With aix-soname=svr4, we create the lib.so.V shared archives only, 9936 # so we don't have lib.a shared libs to link our executables. 9937 # We have to force runtime linking in this case. 9938 aix_use_runtimelinking=yes 9939 LDFLAGS="$LDFLAGS -Wl,-brtl" 9940 fi 9941 ;; 9942 esac 9943 9944 exp_sym_flag='-bexport' 9945 no_entry_flag='-bnoentry' 9946 fi 9947 9948 # When large executables or shared objects are built, AIX ld can 9949 # have problems creating the table of contents. If linking a library 9950 # or program results in "error TOC overflow" add -mminimal-toc to 9951 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9952 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9953 9954 _LT_TAGVAR(archive_cmds, $1)='' 9955 _LT_TAGVAR(hardcode_direct, $1)=yes 9956 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9957 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9958 _LT_TAGVAR(link_all_deplibs, $1)=yes 9959 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9960 case $with_aix_soname,$aix_use_runtimelinking in 9961 aix,*) ;; # no import file 9962 svr4,* | *,yes) # use import file 9963 # The Import File defines what to hardcode. 9964 _LT_TAGVAR(hardcode_direct, $1)=no 9965 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9966 ;; 9967 esac 9968 9969 if test yes = "$GXX"; then 9970 case $host_os in aix4.[[012]]|aix4.[[012]].*) 9971 # We only want to do this on AIX 4.2 and lower, the check 9972 # below for broken collect2 doesn't work under 4.3+ 9973 collect2name=`$CC -print-prog-name=collect2` 9974 if test -f "$collect2name" && 9975 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9976 then 9977 # We have reworked collect2 9978 : 9979 else 9980 # We have old collect2 9981 _LT_TAGVAR(hardcode_direct, $1)=unsupported 9982 # It fails to find uninstalled libraries when the uninstalled 9983 # path is not listed in the libpath. Setting hardcode_minus_L 9984 # to unsupported forces relinking 9985 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9987 _LT_TAGVAR(hardcode_libdir_separator, $1)= 9988 fi 9989 esac 9990 shared_flag='-shared' 9991 if test yes = "$aix_use_runtimelinking"; then 9992 shared_flag=$shared_flag' $wl-G' 9993 fi 9994 # Need to ensure runtime linking is disabled for the traditional 9995 # shared library, or the linker may eventually find shared libraries 9996 # /with/ Import File - we do not want to mix them. 9997 shared_flag_aix='-shared' 9998 shared_flag_svr4='-shared $wl-G' 9999 else 10000 # not using gcc 10001 if test ia64 = "$host_cpu"; then 10002 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10003 # chokes on -Wl,-G. The following line is correct: 10004 shared_flag='-G' 10005 else 10006 if test yes = "$aix_use_runtimelinking"; then 10007 shared_flag='$wl-G' 10008 else 10009 shared_flag='$wl-bM:SRE' 10010 fi 10011 shared_flag_aix='$wl-bM:SRE' 10012 shared_flag_svr4='$wl-G' 10013 fi 10014 fi 10015 10016 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 10017 # It seems that -bexpall does not export symbols beginning with 10018 # underscore (_), so it is better to generate a list of symbols to 10019 # export. 10020 _LT_TAGVAR(always_export_symbols, $1)=yes 10021 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10022 # Warning - without using the other runtime loading flags (-brtl), 10023 # -berok will link without error, but may produce a broken library. 10024 # The "-G" linker flag allows undefined symbols. 10025 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 10026 # Determine the default libpath from the value encoded in an empty 10027 # executable. 10028 _LT_SYS_MODULE_PATH_AIX([$1]) 10029 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10030 10031 _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 10032 else 10033 if test ia64 = "$host_cpu"; then 10034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 10035 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10036 _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" 10037 else 10038 # Determine the default libpath from the value encoded in an 10039 # empty executable. 10040 _LT_SYS_MODULE_PATH_AIX([$1]) 10041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10042 # Warning - without using the other run time loading flags, 10043 # -berok will link without error, but may produce a broken library. 10044 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10045 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10046 if test yes = "$with_gnu_ld"; then 10047 # We only use this code for GNU lds that support --whole-archive. 10048 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10049 else 10050 # Exported symbols can be pulled into shared objects from archives 10051 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10052 fi 10053 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10054 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10055 # -brtl affects multiple linker settings, -berok does not and is overridden later 10056 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10057 if test svr4 != "$with_aix_soname"; then 10058 # This is similar to how AIX traditionally builds its shared 10059 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10060 _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' 10061 fi 10062 if test aix != "$with_aix_soname"; then 10063 _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' 10064 else 10065 # used by -dlpreopen to get the symbols 10066 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10067 fi 10068 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10069 fi 10070 fi 10071 ;; 10072 10073 beos*) 10074 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10075 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10076 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10077 # support --undefined. This deserves some investigation. FIXME 10078 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10079 else 10080 _LT_TAGVAR(ld_shlibs, $1)=no 10081 fi 10082 ;; 10083 10084 chorus*) 10085 case $cc_basename in 10086 *) 10087 # FIXME: insert proper C++ library support 10088 _LT_TAGVAR(ld_shlibs, $1)=no 10089 ;; 10090 esac 10091 ;; 10092 10093 cygwin* | mingw* | pw32* | cegcc*) 10094 case $GXX,$cc_basename in 10095 ,cl* | no,cl* | ,icl* | no,icl*) 10096 # Native MSVC or ICC 10097 # hardcode_libdir_flag_spec is actually meaningless, as there is 10098 # no search path for DLLs. 10099 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10100 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10101 _LT_TAGVAR(always_export_symbols, $1)=yes 10102 _LT_TAGVAR(file_list_spec, $1)='@' 10103 # Tell ltmain to make .lib files, not .a files. 10104 libext=lib 10105 # Tell ltmain to make .dll files, not .so files. 10106 shrext_cmds=.dll 10107 # FIXME: Setting linknames here is a bad hack. 10108 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10109 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10110 cp "$export_symbols" "$output_objdir/$soname.def"; 10111 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10112 else 10113 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10114 fi~ 10115 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10116 linknames=' 10117 # The linker will not automatically build a static lib if we build a DLL. 10118 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10119 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10120 # Don't use ranlib 10121 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10122 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10123 lt_tool_outputfile="@TOOL_OUTPUT@"~ 10124 case $lt_outputfile in 10125 *.exe|*.EXE) ;; 10126 *) 10127 lt_outputfile=$lt_outputfile.exe 10128 lt_tool_outputfile=$lt_tool_outputfile.exe 10129 ;; 10130 esac~ 10131 func_to_tool_file "$lt_outputfile"~ 10132 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10133 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10134 $RM "$lt_outputfile.manifest"; 10135 fi' 10136 ;; 10137 *) 10138 # g++ 10139 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10140 # as there is no search path for DLLs. 10141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10142 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10143 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10144 _LT_TAGVAR(always_export_symbols, $1)=no 10145 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10146 10147 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10148 _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' 10149 # If the export-symbols file already is a .def file, use it as 10150 # is; otherwise, prepend EXPORTS... 10151 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10152 cp $export_symbols $output_objdir/$soname.def; 10153 else 10154 echo EXPORTS > $output_objdir/$soname.def; 10155 cat $export_symbols >> $output_objdir/$soname.def; 10156 fi~ 10157 $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' 10158 else 10159 _LT_TAGVAR(ld_shlibs, $1)=no 10160 fi 10161 ;; 10162 esac 10163 ;; 10164 darwin* | rhapsody*) 10165 _LT_DARWIN_LINKER_FEATURES($1) 10166 ;; 10167 10168 os2*) 10169 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10170 _LT_TAGVAR(hardcode_minus_L, $1)=yes 10171 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10172 shrext_cmds=.dll 10173 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10174 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10175 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10176 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10177 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10178 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10179 emximp -o $lib $output_objdir/$libname.def' 10180 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10181 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10182 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10183 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10184 prefix_cmds="$SED"~ 10185 if test EXPORTS = "`$SED 1q $export_symbols`"; then 10186 prefix_cmds="$prefix_cmds -e 1d"; 10187 fi~ 10188 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10189 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10190 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10191 emximp -o $lib $output_objdir/$libname.def' 10192 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10193 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10194 _LT_TAGVAR(file_list_spec, $1)='@' 10195 ;; 10196 10197 dgux*) 10198 case $cc_basename in 10199 ec++*) 10200 # FIXME: insert proper C++ library support 10201 _LT_TAGVAR(ld_shlibs, $1)=no 10202 ;; 10203 ghcx*) 10204 # Green Hills C++ Compiler 10205 # FIXME: insert proper C++ library support 10206 _LT_TAGVAR(ld_shlibs, $1)=no 10207 ;; 10208 *) 10209 # FIXME: insert proper C++ library support 10210 _LT_TAGVAR(ld_shlibs, $1)=no 10211 ;; 10212 esac 10213 ;; 10214 10215 freebsd2.*) 10216 # C++ shared libraries reported to be fairly broken before 10217 # switch to ELF 10218 _LT_TAGVAR(ld_shlibs, $1)=no 10219 ;; 10220 10221 freebsd-elf*) 10222 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10223 ;; 10224 10225 freebsd* | dragonfly* | midnightbsd*) 10226 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10227 # conventions 10228 _LT_TAGVAR(ld_shlibs, $1)=yes 10229 ;; 10230 10231 haiku*) 10232 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10233 _LT_TAGVAR(link_all_deplibs, $1)=yes 10234 ;; 10235 10236 hpux9*) 10237 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10238 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10239 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10240 _LT_TAGVAR(hardcode_direct, $1)=yes 10241 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10242 # but as the default 10243 # location of the library. 10244 10245 case $cc_basename in 10246 CC*) 10247 # FIXME: insert proper C++ library support 10248 _LT_TAGVAR(ld_shlibs, $1)=no 10249 ;; 10250 aCC*) 10251 _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' 10252 # Commands to make compiler produce verbose output that lists 10253 # what "hidden" libraries, object files and flags are used when 10254 # linking a shared library. 10255 # 10256 # There doesn't appear to be a way to prevent this compiler from 10257 # explicitly linking system object files so we need to strip them 10258 # from the output so that they don't get included in the library 10259 # dependencies. 10260 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"' 10261 ;; 10262 *) 10263 if test yes = "$GXX"; then 10264 _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' 10265 else 10266 # FIXME: insert proper C++ library support 10267 _LT_TAGVAR(ld_shlibs, $1)=no 10268 fi 10269 ;; 10270 esac 10271 ;; 10272 10273 hpux10*|hpux11*) 10274 if test no = "$with_gnu_ld"; then 10275 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10276 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10277 10278 case $host_cpu in 10279 hppa*64*|ia64*) 10280 ;; 10281 *) 10282 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10283 ;; 10284 esac 10285 fi 10286 case $host_cpu in 10287 hppa*64*|ia64*) 10288 _LT_TAGVAR(hardcode_direct, $1)=no 10289 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10290 ;; 10291 *) 10292 _LT_TAGVAR(hardcode_direct, $1)=yes 10293 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10294 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10295 # but as the default 10296 # location of the library. 10297 ;; 10298 esac 10299 10300 case $cc_basename in 10301 CC*) 10302 # FIXME: insert proper C++ library support 10303 _LT_TAGVAR(ld_shlibs, $1)=no 10304 ;; 10305 aCC*) 10306 case $host_cpu in 10307 hppa*64*) 10308 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10309 ;; 10310 ia64*) 10311 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10312 ;; 10313 *) 10314 _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' 10315 ;; 10316 esac 10317 # Commands to make compiler produce verbose output that lists 10318 # what "hidden" libraries, object files and flags are used when 10319 # linking a shared library. 10320 # 10321 # There doesn't appear to be a way to prevent this compiler from 10322 # explicitly linking system object files so we need to strip them 10323 # from the output so that they don't get included in the library 10324 # dependencies. 10325 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"' 10326 ;; 10327 *) 10328 if test yes = "$GXX"; then 10329 if test no = "$with_gnu_ld"; then 10330 case $host_cpu in 10331 hppa*64*) 10332 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10333 ;; 10334 ia64*) 10335 _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' 10336 ;; 10337 *) 10338 _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' 10339 ;; 10340 esac 10341 fi 10342 else 10343 # FIXME: insert proper C++ library support 10344 _LT_TAGVAR(ld_shlibs, $1)=no 10345 fi 10346 ;; 10347 esac 10348 ;; 10349 10350 interix[[3-9]]*) 10351 _LT_TAGVAR(hardcode_direct, $1)=no 10352 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10354 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10355 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10356 # Instead, shared libraries are loaded at an image base (0x10000000 by 10357 # default) and relocated if they conflict, which is a slow very memory 10358 # consuming and fragmenting process. To avoid this, we pick a random, 10359 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10360 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10361 _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' 10362 _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' 10363 ;; 10364 irix5* | irix6*) 10365 case $cc_basename in 10366 CC*) 10367 # SGI C++ 10368 _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' 10369 10370 # Archives containing C++ object files must be created using 10371 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10372 # necessary to make sure instantiated templates are included 10373 # in the archive. 10374 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10375 ;; 10376 *) 10377 if test yes = "$GXX"; then 10378 if test no = "$with_gnu_ld"; then 10379 _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' 10380 else 10381 _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' 10382 fi 10383 fi 10384 _LT_TAGVAR(link_all_deplibs, $1)=yes 10385 ;; 10386 esac 10387 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10388 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10389 _LT_TAGVAR(inherit_rpath, $1)=yes 10390 ;; 10391 10392 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10393 case $cc_basename in 10394 KCC*) 10395 # Kuck and Associates, Inc. (KAI) C++ Compiler 10396 10397 # KCC will only create a shared library if the output file 10398 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10399 # to its proper name (with version) after linking. 10400 _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' 10401 _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' 10402 # Commands to make compiler produce verbose output that lists 10403 # what "hidden" libraries, object files and flags are used when 10404 # linking a shared library. 10405 # 10406 # There doesn't appear to be a way to prevent this compiler from 10407 # explicitly linking system object files so we need to strip them 10408 # from the output so that they don't get included in the library 10409 # dependencies. 10410 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"' 10411 10412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10413 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10414 10415 # Archives containing C++ object files must be created using 10416 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10417 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10418 ;; 10419 icpc* | ecpc* ) 10420 # Intel C++ 10421 with_gnu_ld=yes 10422 # version 8.0 and above of icpc choke on multiply defined symbols 10423 # if we add $predep_objects and $postdep_objects, however 7.1 and 10424 # earlier do not add the objects themselves. 10425 case `$CC -V 2>&1` in 10426 *"Version 7."*) 10427 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10428 _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' 10429 ;; 10430 *) # Version 8.0 or newer 10431 tmp_idyn= 10432 case $host_cpu in 10433 ia64*) tmp_idyn=' -i_dynamic';; 10434 esac 10435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10436 _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' 10437 ;; 10438 esac 10439 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10440 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10441 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10442 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10443 ;; 10444 pgCC* | pgcpp*) 10445 # Portland Group C++ compiler 10446 case `$CC -V` in 10447 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10448 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10449 rm -rf $tpldir~ 10450 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10451 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10452 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10453 rm -rf $tpldir~ 10454 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10455 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10456 $RANLIB $oldlib' 10457 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10458 rm -rf $tpldir~ 10459 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10460 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10461 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10462 rm -rf $tpldir~ 10463 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10464 $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' 10465 ;; 10466 *) # Version 6 and above use weak symbols 10467 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10468 _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' 10469 ;; 10470 esac 10471 10472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10473 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10474 _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' 10475 ;; 10476 cxx*) 10477 # Compaq C++ 10478 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10479 _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' 10480 10481 runpath_var=LD_RUN_PATH 10482 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10483 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10484 10485 # Commands to make compiler produce verbose output that lists 10486 # what "hidden" libraries, object files and flags are used when 10487 # linking a shared library. 10488 # 10489 # There doesn't appear to be a way to prevent this compiler from 10490 # explicitly linking system object files so we need to strip them 10491 # from the output so that they don't get included in the library 10492 # dependencies. 10493 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' 10494 ;; 10495 xl* | mpixl* | bgxl*) 10496 # IBM XL 8.0 on PPC, with GNU ld 10497 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10498 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10499 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10500 if test yes = "$supports_anon_versioning"; then 10501 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10502 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10503 echo "local: *; };" >> $output_objdir/$libname.ver~ 10504 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10505 fi 10506 ;; 10507 *) 10508 case `$CC -V 2>&1 | $SED 5q` in 10509 *Sun\ C*) 10510 # Sun C++ 5.9 10511 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10512 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10513 _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' 10514 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10515 _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' 10516 _LT_TAGVAR(compiler_needs_object, $1)=yes 10517 10518 # Not sure whether something based on 10519 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10520 # would be better. 10521 output_verbose_link_cmd='func_echo_all' 10522 10523 # Archives containing C++ object files must be created using 10524 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10525 # necessary to make sure instantiated templates are included 10526 # in the archive. 10527 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10528 ;; 10529 esac 10530 ;; 10531 esac 10532 ;; 10533 10534 lynxos*) 10535 # FIXME: insert proper C++ library support 10536 _LT_TAGVAR(ld_shlibs, $1)=no 10537 ;; 10538 10539 m88k*) 10540 # FIXME: insert proper C++ library support 10541 _LT_TAGVAR(ld_shlibs, $1)=no 10542 ;; 10543 10544 mvs*) 10545 case $cc_basename in 10546 cxx*) 10547 # FIXME: insert proper C++ library support 10548 _LT_TAGVAR(ld_shlibs, $1)=no 10549 ;; 10550 *) 10551 # FIXME: insert proper C++ library support 10552 _LT_TAGVAR(ld_shlibs, $1)=no 10553 ;; 10554 esac 10555 ;; 10556 10557 netbsd*) 10558 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10559 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10560 wlarc= 10561 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10562 _LT_TAGVAR(hardcode_direct, $1)=yes 10563 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10564 fi 10565 # Workaround some broken pre-1.5 toolchains 10566 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10567 ;; 10568 10569 *nto* | *qnx*) 10570 _LT_TAGVAR(ld_shlibs, $1)=yes 10571 ;; 10572 10573 openbsd* | bitrig*) 10574 if test -f /usr/libexec/ld.so; then 10575 _LT_TAGVAR(hardcode_direct, $1)=yes 10576 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10577 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10578 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10580 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10581 _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' 10582 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10583 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10584 fi 10585 output_verbose_link_cmd=func_echo_all 10586 else 10587 _LT_TAGVAR(ld_shlibs, $1)=no 10588 fi 10589 ;; 10590 10591 osf3* | osf4* | osf5*) 10592 case $cc_basename in 10593 KCC*) 10594 # Kuck and Associates, Inc. (KAI) C++ Compiler 10595 10596 # KCC will only create a shared library if the output file 10597 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10598 # to its proper name (with version) after linking. 10599 _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' 10600 10601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10602 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10603 10604 # Archives containing C++ object files must be created using 10605 # the KAI C++ compiler. 10606 case $host in 10607 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10608 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10609 esac 10610 ;; 10611 RCC*) 10612 # Rational C++ 2.4.1 10613 # FIXME: insert proper C++ library support 10614 _LT_TAGVAR(ld_shlibs, $1)=no 10615 ;; 10616 cxx*) 10617 case $host in 10618 osf3*) 10619 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10620 _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' 10621 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10622 ;; 10623 *) 10624 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10625 _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' 10626 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10627 echo "-hidden">> $lib.exp~ 10628 $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~ 10629 $RM $lib.exp' 10630 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10631 ;; 10632 esac 10633 10634 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10635 10636 # Commands to make compiler produce verbose output that lists 10637 # what "hidden" libraries, object files and flags are used when 10638 # linking a shared library. 10639 # 10640 # There doesn't appear to be a way to prevent this compiler from 10641 # explicitly linking system object files so we need to strip them 10642 # from the output so that they don't get included in the library 10643 # dependencies. 10644 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"' 10645 ;; 10646 *) 10647 if test yes,no = "$GXX,$with_gnu_ld"; then 10648 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10649 case $host in 10650 osf3*) 10651 _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' 10652 ;; 10653 *) 10654 _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' 10655 ;; 10656 esac 10657 10658 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10659 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10660 10661 # Commands to make compiler produce verbose output that lists 10662 # what "hidden" libraries, object files and flags are used when 10663 # linking a shared library. 10664 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10665 10666 else 10667 # FIXME: insert proper C++ library support 10668 _LT_TAGVAR(ld_shlibs, $1)=no 10669 fi 10670 ;; 10671 esac 10672 ;; 10673 10674 psos*) 10675 # FIXME: insert proper C++ library support 10676 _LT_TAGVAR(ld_shlibs, $1)=no 10677 ;; 10678 10679 sunos4*) 10680 case $cc_basename in 10681 CC*) 10682 # Sun C++ 4.x 10683 # FIXME: insert proper C++ library support 10684 _LT_TAGVAR(ld_shlibs, $1)=no 10685 ;; 10686 lcc*) 10687 # Lucid 10688 # FIXME: insert proper C++ library support 10689 _LT_TAGVAR(ld_shlibs, $1)=no 10690 ;; 10691 *) 10692 # FIXME: insert proper C++ library support 10693 _LT_TAGVAR(ld_shlibs, $1)=no 10694 ;; 10695 esac 10696 ;; 10697 10698 solaris*) 10699 case $cc_basename in 10700 CC* | sunCC*) 10701 # Sun C++ 4.2, 5.x and Centerline C++ 10702 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10703 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10704 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10705 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10706 $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' 10707 10708 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10709 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10710 case $host_os in 10711 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10712 *) 10713 # The compiler driver will combine and reorder linker options, 10714 # but understands '-z linker_flag'. 10715 # Supported since Solaris 2.6 (maybe 2.5.1?) 10716 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10717 ;; 10718 esac 10719 _LT_TAGVAR(link_all_deplibs, $1)=yes 10720 10721 output_verbose_link_cmd='func_echo_all' 10722 10723 # Archives containing C++ object files must be created using 10724 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10725 # necessary to make sure instantiated templates are included 10726 # in the archive. 10727 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10728 ;; 10729 gcx*) 10730 # Green Hills C++ Compiler 10731 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10732 10733 # The C++ compiler must be used to create the archive. 10734 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10735 ;; 10736 *) 10737 # GNU C++ compiler with Solaris linker 10738 if test yes,no = "$GXX,$with_gnu_ld"; then 10739 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10740 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10741 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10742 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10743 $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' 10744 10745 # Commands to make compiler produce verbose output that lists 10746 # what "hidden" libraries, object files and flags are used when 10747 # linking a shared library. 10748 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10749 else 10750 # g++ 2.7 appears to require '-G' NOT '-shared' on this 10751 # platform. 10752 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10753 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10754 $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' 10755 10756 # Commands to make compiler produce verbose output that lists 10757 # what "hidden" libraries, object files and flags are used when 10758 # linking a shared library. 10759 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10760 fi 10761 10762 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10763 case $host_os in 10764 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10765 *) 10766 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10767 ;; 10768 esac 10769 fi 10770 ;; 10771 esac 10772 ;; 10773 10774 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10775 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10776 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10777 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10778 runpath_var='LD_RUN_PATH' 10779 10780 case $cc_basename in 10781 CC*) 10782 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10783 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10784 ;; 10785 *) 10786 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10787 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10788 ;; 10789 esac 10790 ;; 10791 10792 sysv5* | sco3.2v5* | sco5v6*) 10793 # Note: We CANNOT use -z defs as we might desire, because we do not 10794 # link with -lc, and that would cause any symbols used from libc to 10795 # always be unresolved, which means just about no library would 10796 # ever link correctly. If we're not using GNU ld we use -z text 10797 # though, which does catch some bad symbols but isn't as heavy-handed 10798 # as -z defs. 10799 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10800 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10801 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10802 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10803 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10804 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10805 _LT_TAGVAR(link_all_deplibs, $1)=yes 10806 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10807 runpath_var='LD_RUN_PATH' 10808 10809 case $cc_basename in 10810 CC*) 10811 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10812 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10813 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10814 '"$_LT_TAGVAR(old_archive_cmds, $1)" 10815 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10816 '"$_LT_TAGVAR(reload_cmds, $1)" 10817 ;; 10818 *) 10819 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10820 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10821 ;; 10822 esac 10823 ;; 10824 10825 tandem*) 10826 case $cc_basename in 10827 NCC*) 10828 # NonStop-UX NCC 3.20 10829 # FIXME: insert proper C++ library support 10830 _LT_TAGVAR(ld_shlibs, $1)=no 10831 ;; 10832 *) 10833 # FIXME: insert proper C++ library support 10834 _LT_TAGVAR(ld_shlibs, $1)=no 10835 ;; 10836 esac 10837 ;; 10838 10839 vxworks*) 10840 # FIXME: insert proper C++ library support 10841 _LT_TAGVAR(ld_shlibs, $1)=no 10842 ;; 10843 10844 *) 10845 # FIXME: insert proper C++ library support 10846 _LT_TAGVAR(ld_shlibs, $1)=no 10847 ;; 10848 esac 10849 10850 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10851 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10852 10853 _LT_TAGVAR(GCC, $1)=$GXX 10854 _LT_TAGVAR(LD, $1)=$LD 10855 10856 ## CAVEAT EMPTOR: 10857 ## There is no encapsulation within the following macros, do not change 10858 ## the running order or otherwise move them around unless you know exactly 10859 ## what you are doing... 10860 _LT_SYS_HIDDEN_LIBDEPS($1) 10861 _LT_COMPILER_PIC($1) 10862 _LT_COMPILER_C_O($1) 10863 _LT_COMPILER_FILE_LOCKS($1) 10864 _LT_LINKER_SHLIBS($1) 10865 _LT_SYS_DYNAMIC_LINKER($1) 10866 _LT_LINKER_HARDCODE_LIBPATH($1) 10867 10868 _LT_CONFIG($1) 10869 fi # test -n "$compiler" 10870 10871 CC=$lt_save_CC 10872 CFLAGS=$lt_save_CFLAGS 10873 LDCXX=$LD 10874 LD=$lt_save_LD 10875 GCC=$lt_save_GCC 10876 with_gnu_ld=$lt_save_with_gnu_ld 10877 lt_cv_path_LDCXX=$lt_cv_path_LD 10878 lt_cv_path_LD=$lt_save_path_LD 10879 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10880 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10881fi # test yes != "$_lt_caught_CXX_error" 10882 10883AC_LANG_POP 10884])# _LT_LANG_CXX_CONFIG 10885 10886 10887# _LT_FUNC_STRIPNAME_CNF 10888# ---------------------- 10889# func_stripname_cnf prefix suffix name 10890# strip PREFIX and SUFFIX off of NAME. 10891# PREFIX and SUFFIX must not contain globbing or regex special 10892# characters, hashes, percent signs, but SUFFIX may contain a leading 10893# dot (in which case that matches only a dot). 10894# 10895# This function is identical to the (non-XSI) version of func_stripname, 10896# except this one can be used by m4 code that may be executed by configure, 10897# rather than the libtool script. 10898m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10899AC_REQUIRE([_LT_DECL_SED]) 10900AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10901func_stripname_cnf () 10902{ 10903 case @S|@2 in 10904 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10905 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10906 esac 10907} # func_stripname_cnf 10908])# _LT_FUNC_STRIPNAME_CNF 10909 10910 10911# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10912# --------------------------------- 10913# Figure out "hidden" library dependencies from verbose 10914# compiler output when linking a shared library. 10915# Parse the compiler output and extract the necessary 10916# objects, libraries and library flags. 10917m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10918[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10919AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10920# Dependencies to place before and after the object being linked: 10921_LT_TAGVAR(predep_objects, $1)= 10922_LT_TAGVAR(postdep_objects, $1)= 10923_LT_TAGVAR(predeps, $1)= 10924_LT_TAGVAR(postdeps, $1)= 10925_LT_TAGVAR(compiler_lib_search_path, $1)= 10926 10927dnl we can't use the lt_simple_compile_test_code here, 10928dnl because it contains code intended for an executable, 10929dnl not a library. It's possible we should let each 10930dnl tag define a new lt_????_link_test_code variable, 10931dnl but it's only used here... 10932m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10933int a; 10934void foo (void) { a = 0; } 10935_LT_EOF 10936], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10937class Foo 10938{ 10939public: 10940 Foo (void) { a = 0; } 10941private: 10942 int a; 10943}; 10944_LT_EOF 10945], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10946 subroutine foo 10947 implicit none 10948 integer*4 a 10949 a=0 10950 return 10951 end 10952_LT_EOF 10953], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10954 subroutine foo 10955 implicit none 10956 integer a 10957 a=0 10958 return 10959 end 10960_LT_EOF 10961], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10962public class foo { 10963 private int a; 10964 public void bar (void) { 10965 a = 0; 10966 } 10967}; 10968_LT_EOF 10969], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10970package foo 10971func foo() { 10972} 10973_LT_EOF 10974]) 10975 10976_lt_libdeps_save_CFLAGS=$CFLAGS 10977case "$CC $CFLAGS " in #( 10978*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10979*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10980*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10981esac 10982 10983dnl Parse the compiler output and extract the necessary 10984dnl objects, libraries and library flags. 10985if AC_TRY_EVAL(ac_compile); then 10986 # Parse the compiler output and extract the necessary 10987 # objects, libraries and library flags. 10988 10989 # Sentinel used to keep track of whether or not we are before 10990 # the conftest object file. 10991 pre_test_object_deps_done=no 10992 10993 for p in `eval "$output_verbose_link_cmd"`; do 10994 case $prev$p in 10995 10996 -L* | -R* | -l*) 10997 # Some compilers place space between "-{L,R}" and the path. 10998 # Remove the space. 10999 if test x-L = "$p" || 11000 test x-R = "$p"; then 11001 prev=$p 11002 continue 11003 fi 11004 11005 # Expand the sysroot to ease extracting the directories later. 11006 if test -z "$prev"; then 11007 case $p in 11008 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 11009 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 11010 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 11011 esac 11012 fi 11013 case $p in 11014 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 11015 esac 11016 if test no = "$pre_test_object_deps_done"; then 11017 case $prev in 11018 -L | -R) 11019 # Internal compiler library paths should come after those 11020 # provided the user. The postdeps already come after the 11021 # user supplied libs so there is no need to process them. 11022 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 11023 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 11024 else 11025 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 11026 fi 11027 ;; 11028 # The "-l" case would never come before the object being 11029 # linked, so don't bother handling this case. 11030 esac 11031 else 11032 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 11033 _LT_TAGVAR(postdeps, $1)=$prev$p 11034 else 11035 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11036 fi 11037 fi 11038 prev= 11039 ;; 11040 11041 *.lto.$objext) ;; # Ignore GCC LTO objects 11042 *.$objext) 11043 # This assumes that the test object file only shows up 11044 # once in the compiler output. 11045 if test "$p" = "conftest.$objext"; then 11046 pre_test_object_deps_done=yes 11047 continue 11048 fi 11049 11050 if test no = "$pre_test_object_deps_done"; then 11051 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11052 _LT_TAGVAR(predep_objects, $1)=$p 11053 else 11054 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11055 fi 11056 else 11057 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11058 _LT_TAGVAR(postdep_objects, $1)=$p 11059 else 11060 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11061 fi 11062 fi 11063 ;; 11064 11065 *) ;; # Ignore the rest. 11066 11067 esac 11068 done 11069 11070 # Clean up. 11071 rm -f a.out a.exe 11072else 11073 echo "libtool.m4: error: problem compiling $1 test program" 11074fi 11075 11076$RM -f confest.$objext 11077CFLAGS=$_lt_libdeps_save_CFLAGS 11078 11079# PORTME: override above test on systems where it is broken 11080m4_if([$1], [CXX], 11081[case $host_os in 11082interix[[3-9]]*) 11083 # Interix 3.5 installs completely hosed .la files for C++, so rather than 11084 # hack all around it, let's just trust "g++" to DTRT. 11085 _LT_TAGVAR(predep_objects,$1)= 11086 _LT_TAGVAR(postdep_objects,$1)= 11087 _LT_TAGVAR(postdeps,$1)= 11088 ;; 11089esac 11090]) 11091 11092case " $_LT_TAGVAR(postdeps, $1) " in 11093*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11094esac 11095 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11096if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11097 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11098fi 11099_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11100 [The directories searched by this compiler when creating a shared library]) 11101_LT_TAGDECL([], [predep_objects], [1], 11102 [Dependencies to place before and after the objects being linked to 11103 create a shared library]) 11104_LT_TAGDECL([], [postdep_objects], [1]) 11105_LT_TAGDECL([], [predeps], [1]) 11106_LT_TAGDECL([], [postdeps], [1]) 11107_LT_TAGDECL([], [compiler_lib_search_path], [1], 11108 [The library search path used internally by the compiler when linking 11109 a shared library]) 11110])# _LT_SYS_HIDDEN_LIBDEPS 11111 11112 11113# _LT_LANG_F77_CONFIG([TAG]) 11114# -------------------------- 11115# Ensure that the configuration variables for a Fortran 77 compiler are 11116# suitably defined. These variables are subsequently used by _LT_CONFIG 11117# to write the compiler configuration to 'libtool'. 11118m4_defun([_LT_LANG_F77_CONFIG], 11119[AC_LANG_PUSH(Fortran 77) 11120if test -z "$F77" || test no = "$F77"; then 11121 _lt_disable_F77=yes 11122fi 11123 11124_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11125_LT_TAGVAR(allow_undefined_flag, $1)= 11126_LT_TAGVAR(always_export_symbols, $1)=no 11127_LT_TAGVAR(archive_expsym_cmds, $1)= 11128_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11129_LT_TAGVAR(hardcode_direct, $1)=no 11130_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11131_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11132_LT_TAGVAR(hardcode_libdir_separator, $1)= 11133_LT_TAGVAR(hardcode_minus_L, $1)=no 11134_LT_TAGVAR(hardcode_automatic, $1)=no 11135_LT_TAGVAR(inherit_rpath, $1)=no 11136_LT_TAGVAR(module_cmds, $1)= 11137_LT_TAGVAR(module_expsym_cmds, $1)= 11138_LT_TAGVAR(link_all_deplibs, $1)=unknown 11139_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11140_LT_TAGVAR(reload_flag, $1)=$reload_flag 11141_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11142_LT_TAGVAR(no_undefined_flag, $1)= 11143_LT_TAGVAR(whole_archive_flag_spec, $1)= 11144_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11145 11146# Source file extension for f77 test sources. 11147ac_ext=f 11148 11149# Object file extension for compiled f77 test sources. 11150objext=o 11151_LT_TAGVAR(objext, $1)=$objext 11152 11153# No sense in running all these tests if we already determined that 11154# the F77 compiler isn't working. Some variables (like enable_shared) 11155# are currently assumed to apply to all compilers on this platform, 11156# and will be corrupted by setting them based on a non-working compiler. 11157if test yes != "$_lt_disable_F77"; then 11158 # Code to be used in simple compile tests 11159 lt_simple_compile_test_code="\ 11160 subroutine t 11161 return 11162 end 11163" 11164 11165 # Code to be used in simple link tests 11166 lt_simple_link_test_code="\ 11167 program t 11168 end 11169" 11170 11171 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11172 _LT_TAG_COMPILER 11173 11174 # save warnings/boilerplate of simple test code 11175 _LT_COMPILER_BOILERPLATE 11176 _LT_LINKER_BOILERPLATE 11177 11178 # Allow CC to be a program name with arguments. 11179 lt_save_CC=$CC 11180 lt_save_GCC=$GCC 11181 lt_save_CFLAGS=$CFLAGS 11182 CC=${F77-"f77"} 11183 CFLAGS=$FFLAGS 11184 compiler=$CC 11185 _LT_TAGVAR(compiler, $1)=$CC 11186 _LT_CC_BASENAME([$compiler]) 11187 GCC=$G77 11188 if test -n "$compiler"; then 11189 AC_MSG_CHECKING([if libtool supports shared libraries]) 11190 AC_MSG_RESULT([$can_build_shared]) 11191 11192 AC_MSG_CHECKING([whether to build shared libraries]) 11193 test no = "$can_build_shared" && enable_shared=no 11194 11195 # On AIX, shared libraries and static libraries use the same namespace, and 11196 # are all built from PIC. 11197 case $host_os in 11198 aix3*) 11199 test yes = "$enable_shared" && enable_static=no 11200 if test -n "$RANLIB"; then 11201 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11202 postinstall_cmds='$RANLIB $lib' 11203 fi 11204 ;; 11205 aix[[4-9]]*) 11206 if test ia64 != "$host_cpu"; then 11207 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11208 yes,aix,yes) ;; # shared object as lib.so file only 11209 yes,svr4,*) ;; # shared object as lib.so archive member only 11210 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11211 esac 11212 fi 11213 ;; 11214 esac 11215 AC_MSG_RESULT([$enable_shared]) 11216 11217 AC_MSG_CHECKING([whether to build static libraries]) 11218 # Make sure either enable_shared or enable_static is yes. 11219 test yes = "$enable_shared" || enable_static=yes 11220 AC_MSG_RESULT([$enable_static]) 11221 11222 _LT_TAGVAR(GCC, $1)=$G77 11223 _LT_TAGVAR(LD, $1)=$LD 11224 11225 ## CAVEAT EMPTOR: 11226 ## There is no encapsulation within the following macros, do not change 11227 ## the running order or otherwise move them around unless you know exactly 11228 ## what you are doing... 11229 _LT_COMPILER_PIC($1) 11230 _LT_COMPILER_C_O($1) 11231 _LT_COMPILER_FILE_LOCKS($1) 11232 _LT_LINKER_SHLIBS($1) 11233 _LT_SYS_DYNAMIC_LINKER($1) 11234 _LT_LINKER_HARDCODE_LIBPATH($1) 11235 11236 _LT_CONFIG($1) 11237 fi # test -n "$compiler" 11238 11239 GCC=$lt_save_GCC 11240 CC=$lt_save_CC 11241 CFLAGS=$lt_save_CFLAGS 11242fi # test yes != "$_lt_disable_F77" 11243 11244AC_LANG_POP 11245])# _LT_LANG_F77_CONFIG 11246 11247 11248# _LT_LANG_FC_CONFIG([TAG]) 11249# ------------------------- 11250# Ensure that the configuration variables for a Fortran compiler are 11251# suitably defined. These variables are subsequently used by _LT_CONFIG 11252# to write the compiler configuration to 'libtool'. 11253m4_defun([_LT_LANG_FC_CONFIG], 11254[AC_LANG_PUSH(Fortran) 11255 11256if test -z "$FC" || test no = "$FC"; then 11257 _lt_disable_FC=yes 11258fi 11259 11260_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11261_LT_TAGVAR(allow_undefined_flag, $1)= 11262_LT_TAGVAR(always_export_symbols, $1)=no 11263_LT_TAGVAR(archive_expsym_cmds, $1)= 11264_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11265_LT_TAGVAR(hardcode_direct, $1)=no 11266_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11267_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11268_LT_TAGVAR(hardcode_libdir_separator, $1)= 11269_LT_TAGVAR(hardcode_minus_L, $1)=no 11270_LT_TAGVAR(hardcode_automatic, $1)=no 11271_LT_TAGVAR(inherit_rpath, $1)=no 11272_LT_TAGVAR(module_cmds, $1)= 11273_LT_TAGVAR(module_expsym_cmds, $1)= 11274_LT_TAGVAR(link_all_deplibs, $1)=unknown 11275_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11276_LT_TAGVAR(reload_flag, $1)=$reload_flag 11277_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11278_LT_TAGVAR(no_undefined_flag, $1)= 11279_LT_TAGVAR(whole_archive_flag_spec, $1)= 11280_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11281 11282# Source file extension for fc test sources. 11283ac_ext=${ac_fc_srcext-f} 11284 11285# Object file extension for compiled fc test sources. 11286objext=o 11287_LT_TAGVAR(objext, $1)=$objext 11288 11289# No sense in running all these tests if we already determined that 11290# the FC compiler isn't working. Some variables (like enable_shared) 11291# are currently assumed to apply to all compilers on this platform, 11292# and will be corrupted by setting them based on a non-working compiler. 11293if test yes != "$_lt_disable_FC"; then 11294 # Code to be used in simple compile tests 11295 lt_simple_compile_test_code="\ 11296 subroutine t 11297 return 11298 end 11299" 11300 11301 # Code to be used in simple link tests 11302 lt_simple_link_test_code="\ 11303 program t 11304 end 11305" 11306 11307 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11308 _LT_TAG_COMPILER 11309 11310 # save warnings/boilerplate of simple test code 11311 _LT_COMPILER_BOILERPLATE 11312 _LT_LINKER_BOILERPLATE 11313 11314 # Allow CC to be a program name with arguments. 11315 lt_save_CC=$CC 11316 lt_save_GCC=$GCC 11317 lt_save_CFLAGS=$CFLAGS 11318 CC=${FC-"f95"} 11319 CFLAGS=$FCFLAGS 11320 compiler=$CC 11321 GCC=$ac_cv_fc_compiler_gnu 11322 11323 _LT_TAGVAR(compiler, $1)=$CC 11324 _LT_CC_BASENAME([$compiler]) 11325 11326 if test -n "$compiler"; then 11327 AC_MSG_CHECKING([if libtool supports shared libraries]) 11328 AC_MSG_RESULT([$can_build_shared]) 11329 11330 AC_MSG_CHECKING([whether to build shared libraries]) 11331 test no = "$can_build_shared" && enable_shared=no 11332 11333 # On AIX, shared libraries and static libraries use the same namespace, and 11334 # are all built from PIC. 11335 case $host_os in 11336 aix3*) 11337 test yes = "$enable_shared" && enable_static=no 11338 if test -n "$RANLIB"; then 11339 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11340 postinstall_cmds='$RANLIB $lib' 11341 fi 11342 ;; 11343 aix[[4-9]]*) 11344 if test ia64 != "$host_cpu"; then 11345 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11346 yes,aix,yes) ;; # shared object as lib.so file only 11347 yes,svr4,*) ;; # shared object as lib.so archive member only 11348 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11349 esac 11350 fi 11351 ;; 11352 esac 11353 AC_MSG_RESULT([$enable_shared]) 11354 11355 AC_MSG_CHECKING([whether to build static libraries]) 11356 # Make sure either enable_shared or enable_static is yes. 11357 test yes = "$enable_shared" || enable_static=yes 11358 AC_MSG_RESULT([$enable_static]) 11359 11360 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11361 _LT_TAGVAR(LD, $1)=$LD 11362 11363 ## CAVEAT EMPTOR: 11364 ## There is no encapsulation within the following macros, do not change 11365 ## the running order or otherwise move them around unless you know exactly 11366 ## what you are doing... 11367 _LT_SYS_HIDDEN_LIBDEPS($1) 11368 _LT_COMPILER_PIC($1) 11369 _LT_COMPILER_C_O($1) 11370 _LT_COMPILER_FILE_LOCKS($1) 11371 _LT_LINKER_SHLIBS($1) 11372 _LT_SYS_DYNAMIC_LINKER($1) 11373 _LT_LINKER_HARDCODE_LIBPATH($1) 11374 11375 _LT_CONFIG($1) 11376 fi # test -n "$compiler" 11377 11378 GCC=$lt_save_GCC 11379 CC=$lt_save_CC 11380 CFLAGS=$lt_save_CFLAGS 11381fi # test yes != "$_lt_disable_FC" 11382 11383AC_LANG_POP 11384])# _LT_LANG_FC_CONFIG 11385 11386 11387# _LT_LANG_GCJ_CONFIG([TAG]) 11388# -------------------------- 11389# Ensure that the configuration variables for the GNU Java Compiler compiler 11390# are suitably defined. These variables are subsequently used by _LT_CONFIG 11391# to write the compiler configuration to 'libtool'. 11392m4_defun([_LT_LANG_GCJ_CONFIG], 11393[AC_REQUIRE([LT_PROG_GCJ])dnl 11394AC_LANG_SAVE 11395 11396# Source file extension for Java test sources. 11397ac_ext=java 11398 11399# Object file extension for compiled Java test sources. 11400objext=o 11401_LT_TAGVAR(objext, $1)=$objext 11402 11403# Code to be used in simple compile tests 11404lt_simple_compile_test_code="class foo {}" 11405 11406# Code to be used in simple link tests 11407lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11408 11409# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11410_LT_TAG_COMPILER 11411 11412# save warnings/boilerplate of simple test code 11413_LT_COMPILER_BOILERPLATE 11414_LT_LINKER_BOILERPLATE 11415 11416# Allow CC to be a program name with arguments. 11417lt_save_CC=$CC 11418lt_save_CFLAGS=$CFLAGS 11419lt_save_GCC=$GCC 11420GCC=yes 11421CC=${GCJ-"gcj"} 11422CFLAGS=$GCJFLAGS 11423compiler=$CC 11424_LT_TAGVAR(compiler, $1)=$CC 11425_LT_TAGVAR(LD, $1)=$LD 11426_LT_CC_BASENAME([$compiler]) 11427 11428# GCJ did not exist at the time GCC didn't implicitly link libc in. 11429_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11430 11431_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11432_LT_TAGVAR(reload_flag, $1)=$reload_flag 11433_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11434 11435if test -n "$compiler"; then 11436 _LT_COMPILER_NO_RTTI($1) 11437 _LT_COMPILER_PIC($1) 11438 _LT_COMPILER_C_O($1) 11439 _LT_COMPILER_FILE_LOCKS($1) 11440 _LT_LINKER_SHLIBS($1) 11441 _LT_LINKER_HARDCODE_LIBPATH($1) 11442 11443 _LT_CONFIG($1) 11444fi 11445 11446AC_LANG_RESTORE 11447 11448GCC=$lt_save_GCC 11449CC=$lt_save_CC 11450CFLAGS=$lt_save_CFLAGS 11451])# _LT_LANG_GCJ_CONFIG 11452 11453 11454# _LT_LANG_GO_CONFIG([TAG]) 11455# -------------------------- 11456# Ensure that the configuration variables for the GNU Go compiler 11457# are suitably defined. These variables are subsequently used by _LT_CONFIG 11458# to write the compiler configuration to 'libtool'. 11459m4_defun([_LT_LANG_GO_CONFIG], 11460[AC_REQUIRE([LT_PROG_GO])dnl 11461AC_LANG_SAVE 11462 11463# Source file extension for Go test sources. 11464ac_ext=go 11465 11466# Object file extension for compiled Go test sources. 11467objext=o 11468_LT_TAGVAR(objext, $1)=$objext 11469 11470# Code to be used in simple compile tests 11471lt_simple_compile_test_code="package main; func main() { }" 11472 11473# Code to be used in simple link tests 11474lt_simple_link_test_code='package main; func main() { }' 11475 11476# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11477_LT_TAG_COMPILER 11478 11479# save warnings/boilerplate of simple test code 11480_LT_COMPILER_BOILERPLATE 11481_LT_LINKER_BOILERPLATE 11482 11483# Allow CC to be a program name with arguments. 11484lt_save_CC=$CC 11485lt_save_CFLAGS=$CFLAGS 11486lt_save_GCC=$GCC 11487GCC=yes 11488CC=${GOC-"gccgo"} 11489CFLAGS=$GOFLAGS 11490compiler=$CC 11491_LT_TAGVAR(compiler, $1)=$CC 11492_LT_TAGVAR(LD, $1)=$LD 11493_LT_CC_BASENAME([$compiler]) 11494 11495# Go did not exist at the time GCC didn't implicitly link libc in. 11496_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11497 11498_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11499_LT_TAGVAR(reload_flag, $1)=$reload_flag 11500_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11501 11502if test -n "$compiler"; then 11503 _LT_COMPILER_NO_RTTI($1) 11504 _LT_COMPILER_PIC($1) 11505 _LT_COMPILER_C_O($1) 11506 _LT_COMPILER_FILE_LOCKS($1) 11507 _LT_LINKER_SHLIBS($1) 11508 _LT_LINKER_HARDCODE_LIBPATH($1) 11509 11510 _LT_CONFIG($1) 11511fi 11512 11513AC_LANG_RESTORE 11514 11515GCC=$lt_save_GCC 11516CC=$lt_save_CC 11517CFLAGS=$lt_save_CFLAGS 11518])# _LT_LANG_GO_CONFIG 11519 11520 11521# _LT_LANG_RC_CONFIG([TAG]) 11522# ------------------------- 11523# Ensure that the configuration variables for the Windows resource compiler 11524# are suitably defined. These variables are subsequently used by _LT_CONFIG 11525# to write the compiler configuration to 'libtool'. 11526m4_defun([_LT_LANG_RC_CONFIG], 11527[AC_REQUIRE([LT_PROG_RC])dnl 11528AC_LANG_SAVE 11529 11530# Source file extension for RC test sources. 11531ac_ext=rc 11532 11533# Object file extension for compiled RC test sources. 11534objext=o 11535_LT_TAGVAR(objext, $1)=$objext 11536 11537# Code to be used in simple compile tests 11538lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11539 11540# Code to be used in simple link tests 11541lt_simple_link_test_code=$lt_simple_compile_test_code 11542 11543# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11544_LT_TAG_COMPILER 11545 11546# save warnings/boilerplate of simple test code 11547_LT_COMPILER_BOILERPLATE 11548_LT_LINKER_BOILERPLATE 11549 11550# Allow CC to be a program name with arguments. 11551lt_save_CC=$CC 11552lt_save_CFLAGS=$CFLAGS 11553lt_save_GCC=$GCC 11554GCC= 11555CC=${RC-"windres"} 11556CFLAGS= 11557compiler=$CC 11558_LT_TAGVAR(compiler, $1)=$CC 11559_LT_CC_BASENAME([$compiler]) 11560_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11561 11562if test -n "$compiler"; then 11563 : 11564 _LT_CONFIG($1) 11565fi 11566 11567GCC=$lt_save_GCC 11568AC_LANG_RESTORE 11569CC=$lt_save_CC 11570CFLAGS=$lt_save_CFLAGS 11571])# _LT_LANG_RC_CONFIG 11572 11573 11574# LT_PROG_GCJ 11575# ----------- 11576AC_DEFUN([LT_PROG_GCJ], 11577[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11578 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11579 [AC_CHECK_TOOL(GCJ, gcj,) 11580 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11581 AC_SUBST(GCJFLAGS)])])[]dnl 11582]) 11583 11584# Old name: 11585AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11586dnl aclocal-1.4 backwards compatibility: 11587dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11588 11589 11590# LT_PROG_GO 11591# ---------- 11592AC_DEFUN([LT_PROG_GO], 11593[AC_CHECK_TOOL(GOC, gccgo,) 11594]) 11595 11596 11597# LT_PROG_RC 11598# ---------- 11599AC_DEFUN([LT_PROG_RC], 11600[AC_CHECK_TOOL(RC, windres,) 11601]) 11602 11603# Old name: 11604AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11605dnl aclocal-1.4 backwards compatibility: 11606dnl AC_DEFUN([LT_AC_PROG_RC], []) 11607 11608 11609# _LT_DECL_EGREP 11610# -------------- 11611# If we don't have a new enough Autoconf to choose the best grep 11612# available, choose the one first in the user's PATH. 11613m4_defun([_LT_DECL_EGREP], 11614[AC_REQUIRE([AC_PROG_EGREP])dnl 11615AC_REQUIRE([AC_PROG_FGREP])dnl 11616test -z "$GREP" && GREP=grep 11617_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11618_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11619_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11620dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11621AC_SUBST([GREP]) 11622]) 11623 11624 11625# _LT_DECL_OBJDUMP 11626# -------------- 11627# If we don't have a new enough Autoconf to choose the best objdump 11628# available, choose the one first in the user's PATH. 11629m4_defun([_LT_DECL_OBJDUMP], 11630[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11631test -z "$OBJDUMP" && OBJDUMP=objdump 11632_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11633AC_SUBST([OBJDUMP]) 11634]) 11635 11636# _LT_DECL_DLLTOOL 11637# ---------------- 11638# Ensure DLLTOOL variable is set. 11639m4_defun([_LT_DECL_DLLTOOL], 11640[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11641test -z "$DLLTOOL" && DLLTOOL=dlltool 11642_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11643AC_SUBST([DLLTOOL]) 11644]) 11645 11646# _LT_DECL_FILECMD 11647# ---------------- 11648# Check for a file(cmd) program that can be used to detect file type and magic 11649m4_defun([_LT_DECL_FILECMD], 11650[AC_CHECK_TOOL([FILECMD], [file], [:]) 11651_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11652])# _LD_DECL_FILECMD 11653 11654# _LT_DECL_SED 11655# ------------ 11656# Check for a fully-functional sed program, that truncates 11657# as few characters as possible. Prefer GNU sed if found. 11658m4_defun([_LT_DECL_SED], 11659[AC_PROG_SED 11660test -z "$SED" && SED=sed 11661Xsed="$SED -e 1s/^X//" 11662_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11663_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11664 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11665])# _LT_DECL_SED 11666 11667m4_ifndef([AC_PROG_SED], [ 11668# NOTE: This macro has been submitted for inclusion into # 11669# GNU Autoconf as AC_PROG_SED. When it is available in # 11670# a released version of Autoconf we should remove this # 11671# macro and use it instead. # 11672 11673m4_defun([AC_PROG_SED], 11674[AC_MSG_CHECKING([for a sed that does not truncate output]) 11675AC_CACHE_VAL(lt_cv_path_SED, 11676[# Loop through the user's path and test for sed and gsed. 11677# Then use that list of sed's as ones to test for truncation. 11678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11679for as_dir in $PATH 11680do 11681 IFS=$as_save_IFS 11682 test -z "$as_dir" && as_dir=. 11683 for lt_ac_prog in sed gsed; do 11684 for ac_exec_ext in '' $ac_executable_extensions; do 11685 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11686 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11687 fi 11688 done 11689 done 11690done 11691IFS=$as_save_IFS 11692lt_ac_max=0 11693lt_ac_count=0 11694# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11695# along with /bin/sed that truncates output. 11696for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11697 test ! -f "$lt_ac_sed" && continue 11698 cat /dev/null > conftest.in 11699 lt_ac_count=0 11700 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11701 # Check for GNU sed and select it if it is found. 11702 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11703 lt_cv_path_SED=$lt_ac_sed 11704 break 11705 fi 11706 while true; do 11707 cat conftest.in conftest.in >conftest.tmp 11708 mv conftest.tmp conftest.in 11709 cp conftest.in conftest.nl 11710 echo >>conftest.nl 11711 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11712 cmp -s conftest.out conftest.nl || break 11713 # 10000 chars as input seems more than enough 11714 test 10 -lt "$lt_ac_count" && break 11715 lt_ac_count=`expr $lt_ac_count + 1` 11716 if test "$lt_ac_count" -gt "$lt_ac_max"; then 11717 lt_ac_max=$lt_ac_count 11718 lt_cv_path_SED=$lt_ac_sed 11719 fi 11720 done 11721done 11722]) 11723SED=$lt_cv_path_SED 11724AC_SUBST([SED]) 11725AC_MSG_RESULT([$SED]) 11726])#AC_PROG_SED 11727])#m4_ifndef 11728 11729# Old name: 11730AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11731dnl aclocal-1.4 backwards compatibility: 11732dnl AC_DEFUN([LT_AC_PROG_SED], []) 11733 11734 11735# _LT_CHECK_SHELL_FEATURES 11736# ------------------------ 11737# Find out whether the shell is Bourne or XSI compatible, 11738# or has some other useful features. 11739m4_defun([_LT_CHECK_SHELL_FEATURES], 11740[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11741 lt_unset=unset 11742else 11743 lt_unset=false 11744fi 11745_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11746 11747# test EBCDIC or ASCII 11748case `echo X|tr X '\101'` in 11749 A) # ASCII based system 11750 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11751 lt_SP2NL='tr \040 \012' 11752 lt_NL2SP='tr \015\012 \040\040' 11753 ;; 11754 *) # EBCDIC based system 11755 lt_SP2NL='tr \100 \n' 11756 lt_NL2SP='tr \r\n \100\100' 11757 ;; 11758esac 11759_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11760_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11761])# _LT_CHECK_SHELL_FEATURES 11762 11763 11764# _LT_PATH_CONVERSION_FUNCTIONS 11765# ----------------------------- 11766# Determine what file name conversion functions should be used by 11767# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11768# for certain cross-compile configurations and native mingw. 11769m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11770[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11771AC_REQUIRE([AC_CANONICAL_BUILD])dnl 11772AC_MSG_CHECKING([how to convert $build file names to $host format]) 11773AC_CACHE_VAL(lt_cv_to_host_file_cmd, 11774[case $host in 11775 *-*-mingw* ) 11776 case $build in 11777 *-*-mingw* ) # actually msys 11778 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11779 ;; 11780 *-*-cygwin* ) 11781 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11782 ;; 11783 * ) # otherwise, assume *nix 11784 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11785 ;; 11786 esac 11787 ;; 11788 *-*-cygwin* ) 11789 case $build in 11790 *-*-mingw* ) # actually msys 11791 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11792 ;; 11793 *-*-cygwin* ) 11794 lt_cv_to_host_file_cmd=func_convert_file_noop 11795 ;; 11796 * ) # otherwise, assume *nix 11797 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11798 ;; 11799 esac 11800 ;; 11801 * ) # unhandled hosts (and "normal" native builds) 11802 lt_cv_to_host_file_cmd=func_convert_file_noop 11803 ;; 11804esac 11805]) 11806to_host_file_cmd=$lt_cv_to_host_file_cmd 11807AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11808_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11809 [0], [convert $build file names to $host format])dnl 11810 11811AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11812AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11813[#assume ordinary cross tools, or native build. 11814lt_cv_to_tool_file_cmd=func_convert_file_noop 11815case $host in 11816 *-*-mingw* ) 11817 case $build in 11818 *-*-mingw* ) # actually msys 11819 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11820 ;; 11821 esac 11822 ;; 11823esac 11824]) 11825to_tool_file_cmd=$lt_cv_to_tool_file_cmd 11826AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11827_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11828 [0], [convert $build files to toolchain format])dnl 11829])# _LT_PATH_CONVERSION_FUNCTIONS 11830 11831# Helper functions for option handling. -*- Autoconf -*- 11832# 11833# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11834# Software Foundation, Inc. 11835# Written by Gary V. Vaughan, 2004 11836# 11837# This file is free software; the Free Software Foundation gives 11838# unlimited permission to copy and/or distribute it, with or without 11839# modifications, as long as this notice is preserved. 11840 11841# serial 8 ltoptions.m4 11842 11843# This is to help aclocal find these macros, as it can't see m4_define. 11844AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11845 11846 11847# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11848# ------------------------------------------ 11849m4_define([_LT_MANGLE_OPTION], 11850[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11851 11852 11853# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11854# --------------------------------------- 11855# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11856# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11857# saved as a flag. 11858m4_define([_LT_SET_OPTION], 11859[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11860m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11861 _LT_MANGLE_DEFUN([$1], [$2]), 11862 [m4_warning([Unknown $1 option '$2'])])[]dnl 11863]) 11864 11865 11866# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11867# ------------------------------------------------------------ 11868# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11869m4_define([_LT_IF_OPTION], 11870[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11871 11872 11873# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11874# ------------------------------------------------------- 11875# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11876# are set. 11877m4_define([_LT_UNLESS_OPTIONS], 11878[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11879 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11880 [m4_define([$0_found])])])[]dnl 11881m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11882])[]dnl 11883]) 11884 11885 11886# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11887# ---------------------------------------- 11888# OPTION-LIST is a space-separated list of Libtool options associated 11889# with MACRO-NAME. If any OPTION has a matching handler declared with 11890# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11891# the unknown option and exit. 11892m4_defun([_LT_SET_OPTIONS], 11893[# Set options 11894m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11895 [_LT_SET_OPTION([$1], _LT_Option)]) 11896 11897m4_if([$1],[LT_INIT],[ 11898 dnl 11899 dnl Simply set some default values (i.e off) if boolean options were not 11900 dnl specified: 11901 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11902 ]) 11903 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11904 ]) 11905 dnl 11906 dnl If no reference was made to various pairs of opposing options, then 11907 dnl we run the default mode handler for the pair. For example, if neither 11908 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11909 dnl archives by default: 11910 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11911 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11912 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11913 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11914 [_LT_ENABLE_FAST_INSTALL]) 11915 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11916 [_LT_WITH_AIX_SONAME([aix])]) 11917 ]) 11918])# _LT_SET_OPTIONS 11919 11920 11921 11922# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11923# ----------------------------------------- 11924m4_define([_LT_MANGLE_DEFUN], 11925[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11926 11927 11928# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11929# ----------------------------------------------- 11930m4_define([LT_OPTION_DEFINE], 11931[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11932])# LT_OPTION_DEFINE 11933 11934 11935# dlopen 11936# ------ 11937LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11938]) 11939 11940AU_DEFUN([AC_LIBTOOL_DLOPEN], 11941[_LT_SET_OPTION([LT_INIT], [dlopen]) 11942AC_DIAGNOSE([obsolete], 11943[$0: Remove this warning and the call to _LT_SET_OPTION when you 11944put the 'dlopen' option into LT_INIT's first parameter.]) 11945]) 11946 11947dnl aclocal-1.4 backwards compatibility: 11948dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11949 11950 11951# win32-dll 11952# --------- 11953# Declare package support for building win32 dll's. 11954LT_OPTION_DEFINE([LT_INIT], [win32-dll], 11955[enable_win32_dll=yes 11956 11957case $host in 11958*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11959 AC_CHECK_TOOL(AS, as, false) 11960 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11961 AC_CHECK_TOOL(OBJDUMP, objdump, false) 11962 ;; 11963esac 11964 11965test -z "$AS" && AS=as 11966_LT_DECL([], [AS], [1], [Assembler program])dnl 11967 11968test -z "$DLLTOOL" && DLLTOOL=dlltool 11969_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11970 11971test -z "$OBJDUMP" && OBJDUMP=objdump 11972_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11973])# win32-dll 11974 11975AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11976[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11977_LT_SET_OPTION([LT_INIT], [win32-dll]) 11978AC_DIAGNOSE([obsolete], 11979[$0: Remove this warning and the call to _LT_SET_OPTION when you 11980put the 'win32-dll' option into LT_INIT's first parameter.]) 11981]) 11982 11983dnl aclocal-1.4 backwards compatibility: 11984dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11985 11986 11987# _LT_ENABLE_SHARED([DEFAULT]) 11988# ---------------------------- 11989# implement the --enable-shared flag, and supports the 'shared' and 11990# 'disable-shared' LT_INIT options. 11991# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11992m4_define([_LT_ENABLE_SHARED], 11993[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11994AC_ARG_ENABLE([shared], 11995 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11996 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11997 [p=${PACKAGE-default} 11998 case $enableval in 11999 yes) enable_shared=yes ;; 12000 no) enable_shared=no ;; 12001 *) 12002 enable_shared=no 12003 # Look at the argument we got. We use all the common list separators. 12004 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12005 for pkg in $enableval; do 12006 IFS=$lt_save_ifs 12007 if test "X$pkg" = "X$p"; then 12008 enable_shared=yes 12009 fi 12010 done 12011 IFS=$lt_save_ifs 12012 ;; 12013 esac], 12014 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 12015 12016 _LT_DECL([build_libtool_libs], [enable_shared], [0], 12017 [Whether or not to build shared libraries]) 12018])# _LT_ENABLE_SHARED 12019 12020LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 12021LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 12022 12023# Old names: 12024AC_DEFUN([AC_ENABLE_SHARED], 12025[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 12026]) 12027 12028AC_DEFUN([AC_DISABLE_SHARED], 12029[_LT_SET_OPTION([LT_INIT], [disable-shared]) 12030]) 12031 12032AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 12033AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 12034 12035dnl aclocal-1.4 backwards compatibility: 12036dnl AC_DEFUN([AM_ENABLE_SHARED], []) 12037dnl AC_DEFUN([AM_DISABLE_SHARED], []) 12038 12039 12040 12041# _LT_ENABLE_STATIC([DEFAULT]) 12042# ---------------------------- 12043# implement the --enable-static flag, and support the 'static' and 12044# 'disable-static' LT_INIT options. 12045# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12046m4_define([_LT_ENABLE_STATIC], 12047[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12048AC_ARG_ENABLE([static], 12049 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12050 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12051 [p=${PACKAGE-default} 12052 case $enableval in 12053 yes) enable_static=yes ;; 12054 no) enable_static=no ;; 12055 *) 12056 enable_static=no 12057 # Look at the argument we got. We use all the common list separators. 12058 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12059 for pkg in $enableval; do 12060 IFS=$lt_save_ifs 12061 if test "X$pkg" = "X$p"; then 12062 enable_static=yes 12063 fi 12064 done 12065 IFS=$lt_save_ifs 12066 ;; 12067 esac], 12068 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12069 12070 _LT_DECL([build_old_libs], [enable_static], [0], 12071 [Whether or not to build static libraries]) 12072])# _LT_ENABLE_STATIC 12073 12074LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12075LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12076 12077# Old names: 12078AC_DEFUN([AC_ENABLE_STATIC], 12079[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12080]) 12081 12082AC_DEFUN([AC_DISABLE_STATIC], 12083[_LT_SET_OPTION([LT_INIT], [disable-static]) 12084]) 12085 12086AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12087AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12088 12089dnl aclocal-1.4 backwards compatibility: 12090dnl AC_DEFUN([AM_ENABLE_STATIC], []) 12091dnl AC_DEFUN([AM_DISABLE_STATIC], []) 12092 12093 12094 12095# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12096# ---------------------------------- 12097# implement the --enable-fast-install flag, and support the 'fast-install' 12098# and 'disable-fast-install' LT_INIT options. 12099# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12100m4_define([_LT_ENABLE_FAST_INSTALL], 12101[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12102AC_ARG_ENABLE([fast-install], 12103 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12104 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12105 [p=${PACKAGE-default} 12106 case $enableval in 12107 yes) enable_fast_install=yes ;; 12108 no) enable_fast_install=no ;; 12109 *) 12110 enable_fast_install=no 12111 # Look at the argument we got. We use all the common list separators. 12112 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12113 for pkg in $enableval; do 12114 IFS=$lt_save_ifs 12115 if test "X$pkg" = "X$p"; then 12116 enable_fast_install=yes 12117 fi 12118 done 12119 IFS=$lt_save_ifs 12120 ;; 12121 esac], 12122 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12123 12124_LT_DECL([fast_install], [enable_fast_install], [0], 12125 [Whether or not to optimize for fast installation])dnl 12126])# _LT_ENABLE_FAST_INSTALL 12127 12128LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12129LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12130 12131# Old names: 12132AU_DEFUN([AC_ENABLE_FAST_INSTALL], 12133[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12134AC_DIAGNOSE([obsolete], 12135[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12136the 'fast-install' option into LT_INIT's first parameter.]) 12137]) 12138 12139AU_DEFUN([AC_DISABLE_FAST_INSTALL], 12140[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12141AC_DIAGNOSE([obsolete], 12142[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12143the 'disable-fast-install' option into LT_INIT's first parameter.]) 12144]) 12145 12146dnl aclocal-1.4 backwards compatibility: 12147dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12148dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12149 12150 12151# _LT_WITH_AIX_SONAME([DEFAULT]) 12152# ---------------------------------- 12153# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12154# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12155# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12156m4_define([_LT_WITH_AIX_SONAME], 12157[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12158shared_archive_member_spec= 12159case $host,$enable_shared in 12160power*-*-aix[[5-9]]*,yes) 12161 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12162 AC_ARG_WITH([aix-soname], 12163 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12164 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12165 [case $withval in 12166 aix|svr4|both) 12167 ;; 12168 *) 12169 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12170 ;; 12171 esac 12172 lt_cv_with_aix_soname=$with_aix_soname], 12173 [AC_CACHE_VAL([lt_cv_with_aix_soname], 12174 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12175 with_aix_soname=$lt_cv_with_aix_soname]) 12176 AC_MSG_RESULT([$with_aix_soname]) 12177 if test aix != "$with_aix_soname"; then 12178 # For the AIX way of multilib, we name the shared archive member 12179 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12180 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12181 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12182 # the AIX toolchain works better with OBJECT_MODE set (default 32). 12183 if test 64 = "${OBJECT_MODE-32}"; then 12184 shared_archive_member_spec=shr_64 12185 else 12186 shared_archive_member_spec=shr 12187 fi 12188 fi 12189 ;; 12190*) 12191 with_aix_soname=aix 12192 ;; 12193esac 12194 12195_LT_DECL([], [shared_archive_member_spec], [0], 12196 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12197])# _LT_WITH_AIX_SONAME 12198 12199LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12200LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12201LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12202 12203 12204# _LT_WITH_PIC([MODE]) 12205# -------------------- 12206# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12207# LT_INIT options. 12208# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12209m4_define([_LT_WITH_PIC], 12210[AC_ARG_WITH([pic], 12211 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12212 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12213 [lt_p=${PACKAGE-default} 12214 case $withval in 12215 yes|no) pic_mode=$withval ;; 12216 *) 12217 pic_mode=default 12218 # Look at the argument we got. We use all the common list separators. 12219 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12220 for lt_pkg in $withval; do 12221 IFS=$lt_save_ifs 12222 if test "X$lt_pkg" = "X$lt_p"; then 12223 pic_mode=yes 12224 fi 12225 done 12226 IFS=$lt_save_ifs 12227 ;; 12228 esac], 12229 [pic_mode=m4_default([$1], [default])]) 12230 12231_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12232])# _LT_WITH_PIC 12233 12234LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12235LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12236 12237# Old name: 12238AU_DEFUN([AC_LIBTOOL_PICMODE], 12239[_LT_SET_OPTION([LT_INIT], [pic-only]) 12240AC_DIAGNOSE([obsolete], 12241[$0: Remove this warning and the call to _LT_SET_OPTION when you 12242put the 'pic-only' option into LT_INIT's first parameter.]) 12243]) 12244 12245dnl aclocal-1.4 backwards compatibility: 12246dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12247 12248 12249m4_define([_LTDL_MODE], []) 12250LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12251 [m4_define([_LTDL_MODE], [nonrecursive])]) 12252LT_OPTION_DEFINE([LTDL_INIT], [recursive], 12253 [m4_define([_LTDL_MODE], [recursive])]) 12254LT_OPTION_DEFINE([LTDL_INIT], [subproject], 12255 [m4_define([_LTDL_MODE], [subproject])]) 12256 12257m4_define([_LTDL_TYPE], []) 12258LT_OPTION_DEFINE([LTDL_INIT], [installable], 12259 [m4_define([_LTDL_TYPE], [installable])]) 12260LT_OPTION_DEFINE([LTDL_INIT], [convenience], 12261 [m4_define([_LTDL_TYPE], [convenience])]) 12262 12263# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12264# 12265# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12266# Foundation, Inc. 12267# Written by Gary V. Vaughan, 2004 12268# 12269# This file is free software; the Free Software Foundation gives 12270# unlimited permission to copy and/or distribute it, with or without 12271# modifications, as long as this notice is preserved. 12272 12273# serial 6 ltsugar.m4 12274 12275# This is to help aclocal find these macros, as it can't see m4_define. 12276AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12277 12278 12279# lt_join(SEP, ARG1, [ARG2...]) 12280# ----------------------------- 12281# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12282# associated separator. 12283# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12284# versions in m4sugar had bugs. 12285m4_define([lt_join], 12286[m4_if([$#], [1], [], 12287 [$#], [2], [[$2]], 12288 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12289m4_define([_lt_join], 12290[m4_if([$#$2], [2], [], 12291 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12292 12293 12294# lt_car(LIST) 12295# lt_cdr(LIST) 12296# ------------ 12297# Manipulate m4 lists. 12298# These macros are necessary as long as will still need to support 12299# Autoconf-2.59, which quotes differently. 12300m4_define([lt_car], [[$1]]) 12301m4_define([lt_cdr], 12302[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12303 [$#], 1, [], 12304 [m4_dquote(m4_shift($@))])]) 12305m4_define([lt_unquote], $1) 12306 12307 12308# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12309# ------------------------------------------ 12310# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12311# Note that neither SEPARATOR nor STRING are expanded; they are appended 12312# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12313# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12314# than defined and empty). 12315# 12316# This macro is needed until we can rely on Autoconf 2.62, since earlier 12317# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12318m4_define([lt_append], 12319[m4_define([$1], 12320 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12321 12322 12323 12324# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12325# ---------------------------------------------------------- 12326# Produce a SEP delimited list of all paired combinations of elements of 12327# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12328# has the form PREFIXmINFIXSUFFIXn. 12329# Needed until we can rely on m4_combine added in Autoconf 2.62. 12330m4_define([lt_combine], 12331[m4_if(m4_eval([$# > 3]), [1], 12332 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12333[[m4_foreach([_Lt_prefix], [$2], 12334 [m4_foreach([_Lt_suffix], 12335 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12336 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12337 12338 12339# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12340# ----------------------------------------------------------------------- 12341# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12342# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12343m4_define([lt_if_append_uniq], 12344[m4_ifdef([$1], 12345 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12346 [lt_append([$1], [$2], [$3])$4], 12347 [$5])], 12348 [lt_append([$1], [$2], [$3])$4])]) 12349 12350 12351# lt_dict_add(DICT, KEY, VALUE) 12352# ----------------------------- 12353m4_define([lt_dict_add], 12354[m4_define([$1($2)], [$3])]) 12355 12356 12357# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12358# -------------------------------------------- 12359m4_define([lt_dict_add_subkey], 12360[m4_define([$1($2:$3)], [$4])]) 12361 12362 12363# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12364# ---------------------------------- 12365m4_define([lt_dict_fetch], 12366[m4_ifval([$3], 12367 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12368 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12369 12370 12371# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12372# ----------------------------------------------------------------- 12373m4_define([lt_if_dict_fetch], 12374[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12375 [$5], 12376 [$6])]) 12377 12378 12379# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12380# -------------------------------------------------------------- 12381m4_define([lt_dict_filter], 12382[m4_if([$5], [], [], 12383 [lt_join(m4_quote(m4_default([$4], [[, ]])), 12384 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12385 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12386]) 12387 12388# ltversion.m4 -- version numbers -*- Autoconf -*- 12389# 12390# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12391# Inc. 12392# Written by Scott James Remnant, 2004 12393# 12394# This file is free software; the Free Software Foundation gives 12395# unlimited permission to copy and/or distribute it, with or without 12396# modifications, as long as this notice is preserved. 12397 12398# @configure_input@ 12399 12400# serial 4245 ltversion.m4 12401# This file is part of GNU Libtool 12402 12403m4_define([LT_PACKAGE_VERSION], [2.4.7]) 12404m4_define([LT_PACKAGE_REVISION], [2.4.7]) 12405 12406AC_DEFUN([LTVERSION_VERSION], 12407[macro_version='2.4.7' 12408macro_revision='2.4.7' 12409_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12410_LT_DECL(, macro_revision, 0) 12411]) 12412 12413# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12414# 12415# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12416# Software Foundation, Inc. 12417# Written by Scott James Remnant, 2004. 12418# 12419# This file is free software; the Free Software Foundation gives 12420# unlimited permission to copy and/or distribute it, with or without 12421# modifications, as long as this notice is preserved. 12422 12423# serial 5 lt~obsolete.m4 12424 12425# These exist entirely to fool aclocal when bootstrapping libtool. 12426# 12427# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12428# which have later been changed to m4_define as they aren't part of the 12429# exported API, or moved to Autoconf or Automake where they belong. 12430# 12431# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12432# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12433# using a macro with the same name in our local m4/libtool.m4 it'll 12434# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12435# and doesn't know about Autoconf macros at all.) 12436# 12437# So we provide this file, which has a silly filename so it's always 12438# included after everything else. This provides aclocal with the 12439# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12440# because those macros already exist, or will be overwritten later. 12441# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12442# 12443# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12444# Yes, that means every name once taken will need to remain here until 12445# we give up compatibility with versions before 1.7, at which point 12446# we need to keep only those names which we still refer to. 12447 12448# This is to help aclocal find these macros, as it can't see m4_define. 12449AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12450 12451m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12452m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12453m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12454m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12455m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12456m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12457m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12458m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12459m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12460m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12461m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12462m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12463m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12464m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12465m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12466m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12467m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12468m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12469m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12470m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12471m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12472m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12473m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12474m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12475m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12476m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12477m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12478m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12479m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12480m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12481m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12482m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12483m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12484m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12485m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12486m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12487m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12488m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12489m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12490m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12491m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12492m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12493m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12494m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12495m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12496m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12497m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12498m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12499m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12500m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12501m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12502m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12503m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12504m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12505m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12506m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12507m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12508m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12509m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12510m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12511m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12512 12513