aclocal.m4 revision da1f2d5d
1# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2 3# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18[m4_warning([this file was generated for autoconf 2.71. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24# 25# This file is free software; the Free Software Foundation 26# gives unlimited permission to copy and/or distribute it, 27# with or without modifications, as long as this notice is preserved. 28 29# AM_AUTOMAKE_VERSION(VERSION) 30# ---------------------------- 31# Automake X.Y traces this macro to ensure aclocal.m4 has been 32# generated from the m4 files accompanying Automake X.Y. 33# (This private macro should not be called outside this file.) 34AC_DEFUN([AM_AUTOMAKE_VERSION], 35[am__api_version='1.16' 36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37dnl require some minimum version. Point them to the right macro. 38m4_if([$1], [1.16.5], [], 39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40]) 41 42# _AM_AUTOCONF_VERSION(VERSION) 43# ----------------------------- 44# aclocal traces this macro to find the Autoconf version. 45# This is a private macro too. Using m4_define simplifies 46# the logic in aclocal, which can simply ignore this definition. 47m4_define([_AM_AUTOCONF_VERSION], []) 48 49# AM_SET_CURRENT_AUTOMAKE_VERSION 50# ------------------------------- 51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54[AM_AUTOMAKE_VERSION([1.16.5])dnl 55m4_ifndef([AC_AUTOCONF_VERSION], 56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58 59# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60 61# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62# 63# This file is free software; the Free Software Foundation 64# gives unlimited permission to copy and/or distribute it, 65# with or without modifications, as long as this notice is preserved. 66 67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70# 71# Of course, Automake must honor this variable whenever it calls a 72# tool from the auxiliary directory. The problem is that $srcdir (and 73# therefore $ac_aux_dir as well) can be either absolute or relative, 74# depending on how configure is run. This is pretty annoying, since 75# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76# source directory, any form will work fine, but in subdirectories a 77# relative path needs to be adjusted first. 78# 79# $ac_aux_dir/missing 80# fails when called from a subdirectory if $ac_aux_dir is relative 81# $top_srcdir/$ac_aux_dir/missing 82# fails if $ac_aux_dir is absolute, 83# fails when called from a subdirectory in a VPATH build with 84# a relative $ac_aux_dir 85# 86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87# are both prefixed by $srcdir. In an in-source build this is usually 88# harmless because $srcdir is '.', but things will broke when you 89# start a VPATH build or use an absolute $srcdir. 90# 91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94# and then we would define $MISSING as 95# MISSING="\${SHELL} $am_aux_dir/missing" 96# This will work as long as MISSING is not called from configure, because 97# unfortunately $(top_srcdir) has no meaning in configure. 98# However there are other variables, like CC, which are often used in 99# configure, and could therefore not use this "fixed" $ac_aux_dir. 100# 101# Another solution, used here, is to always expand $ac_aux_dir to an 102# absolute PATH. The drawback is that using absolute paths prevent a 103# configured tree to be moved without reconfiguration. 104 105AC_DEFUN([AM_AUX_DIR_EXPAND], 106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107# Expand $ac_aux_dir to an absolute path. 108am_aux_dir=`cd "$ac_aux_dir" && pwd` 109]) 110 111# AM_CONDITIONAL -*- Autoconf -*- 112 113# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114# 115# This file is free software; the Free Software Foundation 116# gives unlimited permission to copy and/or distribute it, 117# with or without modifications, as long as this notice is preserved. 118 119# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120# ------------------------------------- 121# Define a conditional. 122AC_DEFUN([AM_CONDITIONAL], 123[AC_PREREQ([2.52])dnl 124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126AC_SUBST([$1_TRUE])dnl 127AC_SUBST([$1_FALSE])dnl 128_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130m4_define([_AM_COND_VALUE_$1], [$2])dnl 131if $2; then 132 $1_TRUE= 133 $1_FALSE='#' 134else 135 $1_TRUE='#' 136 $1_FALSE= 137fi 138AC_CONFIG_COMMANDS_PRE( 139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140 AC_MSG_ERROR([[conditional "$1" was never defined. 141Usually this means the macro was only invoked conditionally.]]) 142fi])]) 143 144# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145# 146# This file is free software; the Free Software Foundation 147# gives unlimited permission to copy and/or distribute it, 148# with or without modifications, as long as this notice is preserved. 149 150 151# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152# written in clear, in which case automake, when reading aclocal.m4, 153# will think it sees a *use*, and therefore will trigger all it's 154# C support machinery. Also note that it means that autoscan, seeing 155# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156 157 158# _AM_DEPENDENCIES(NAME) 159# ---------------------- 160# See how the compiler implements dependency checking. 161# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162# We try a few techniques and use that to set a single cache variable. 163# 164# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166# dependency, and given that the user is not expected to run this macro, 167# just rely on AC_PROG_CC. 168AC_DEFUN([_AM_DEPENDENCIES], 169[AC_REQUIRE([AM_SET_DEPDIR])dnl 170AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171AC_REQUIRE([AM_MAKE_INCLUDE])dnl 172AC_REQUIRE([AM_DEP_TRACK])dnl 173 174m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180 [depcc="$$1" am_compiler_list=]) 181 182AC_CACHE_CHECK([dependency style of $depcc], 183 [am_cv_$1_dependencies_compiler_type], 184[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185 # We make a subdir and do the tests there. Otherwise we can end up 186 # making bogus files that we don't know about and never remove. For 187 # instance it was reported that on HP-UX the gcc test will end up 188 # making a dummy file named 'D' -- because '-MD' means "put the output 189 # in D". 190 rm -rf conftest.dir 191 mkdir conftest.dir 192 # Copy depcomp to subdir because otherwise we won't find it if we're 193 # using a relative directory. 194 cp "$am_depcomp" conftest.dir 195 cd conftest.dir 196 # We will build objects and dependencies in a subdirectory because 197 # it helps to detect inapplicable dependency modes. For instance 198 # both Tru64's cc and ICC support -MD to output dependencies as a 199 # side effect of compilation, but ICC will put the dependencies in 200 # the current directory while Tru64 will put them in the object 201 # directory. 202 mkdir sub 203 204 am_cv_$1_dependencies_compiler_type=none 205 if test "$am_compiler_list" = ""; then 206 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207 fi 208 am__universal=false 209 m4_case([$1], [CC], 210 [case " $depcc " in #( 211 *\ -arch\ *\ -arch\ *) am__universal=true ;; 212 esac], 213 [CXX], 214 [case " $depcc " in #( 215 *\ -arch\ *\ -arch\ *) am__universal=true ;; 216 esac]) 217 218 for depmode in $am_compiler_list; do 219 # Setup a source with many dependencies, because some compilers 220 # like to wrap large dependency lists on column 80 (with \), and 221 # we should not choose a depcomp mode which is confused by this. 222 # 223 # We need to recreate these files for each test, as the compiler may 224 # overwrite some of them when testing with obscure command lines. 225 # This happens at least with the AIX C compiler. 226 : > sub/conftest.c 227 for i in 1 2 3 4 5 6; do 228 echo '#include "conftst'$i'.h"' >> sub/conftest.c 229 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230 # Solaris 10 /bin/sh. 231 echo '/* dummy */' > sub/conftst$i.h 232 done 233 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234 235 # We check with '-c' and '-o' for the sake of the "dashmstdout" 236 # mode. It turns out that the SunPro C++ compiler does not properly 237 # handle '-M -o', and we need to detect this. Also, some Intel 238 # versions had trouble with output in subdirs. 239 am__obj=sub/conftest.${OBJEXT-o} 240 am__minus_obj="-o $am__obj" 241 case $depmode in 242 gcc) 243 # This depmode causes a compiler race in universal mode. 244 test "$am__universal" = false || continue 245 ;; 246 nosideeffect) 247 # After this tag, mechanisms are not by side-effect, so they'll 248 # only be used when explicitly requested. 249 if test "x$enable_dependency_tracking" = xyes; then 250 continue 251 else 252 break 253 fi 254 ;; 255 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256 # This compiler won't grok '-c -o', but also, the minuso test has 257 # not run yet. These depmodes are late enough in the game, and 258 # so weak that their functioning should not be impacted. 259 am__obj=conftest.${OBJEXT-o} 260 am__minus_obj= 261 ;; 262 none) break ;; 263 esac 264 if depmode=$depmode \ 265 source=sub/conftest.c object=$am__obj \ 266 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268 >/dev/null 2>conftest.err && 269 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273 # icc doesn't choke on unknown options, it will just issue warnings 274 # or remarks (even with -Werror). So we grep stderr for any message 275 # that says an option was ignored or not supported. 276 # When given -MP, icc 7.0 and 7.1 complain thusly: 277 # icc: Command line warning: ignoring option '-M'; no argument required 278 # The diagnosis changed in icc 8.0: 279 # icc: Command line remark: option '-MP' not supported 280 if (grep 'ignoring option' conftest.err || 281 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282 am_cv_$1_dependencies_compiler_type=$depmode 283 break 284 fi 285 fi 286 done 287 288 cd .. 289 rm -rf conftest.dir 290else 291 am_cv_$1_dependencies_compiler_type=none 292fi 293]) 294AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295AM_CONDITIONAL([am__fastdep$1], [ 296 test "x$enable_dependency_tracking" != xno \ 297 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298]) 299 300 301# AM_SET_DEPDIR 302# ------------- 303# Choose a directory name for dependency files. 304# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305AC_DEFUN([AM_SET_DEPDIR], 306[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308]) 309 310 311# AM_DEP_TRACK 312# ------------ 313AC_DEFUN([AM_DEP_TRACK], 314[AC_ARG_ENABLE([dependency-tracking], [dnl 315AS_HELP_STRING( 316 [--enable-dependency-tracking], 317 [do not reject slow dependency extractors]) 318AS_HELP_STRING( 319 [--disable-dependency-tracking], 320 [speeds up one-time build])]) 321if test "x$enable_dependency_tracking" != xno; then 322 am_depcomp="$ac_aux_dir/depcomp" 323 AMDEPBACKSLASH='\' 324 am__nodep='_no' 325fi 326AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327AC_SUBST([AMDEPBACKSLASH])dnl 328_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329AC_SUBST([am__nodep])dnl 330_AM_SUBST_NOTMAKE([am__nodep])dnl 331]) 332 333# Generate code to set up dependency tracking. -*- Autoconf -*- 334 335# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336# 337# This file is free software; the Free Software Foundation 338# gives unlimited permission to copy and/or distribute it, 339# with or without modifications, as long as this notice is preserved. 340 341# _AM_OUTPUT_DEPENDENCY_COMMANDS 342# ------------------------------ 343AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344[{ 345 # Older Autoconf quotes --file arguments for eval, but not when files 346 # are listed without --file. Let's play safe and only enable the eval 347 # if we detect the quoting. 348 # TODO: see whether this extra hack can be removed once we start 349 # requiring Autoconf 2.70 or later. 350 AS_CASE([$CONFIG_FILES], 351 [*\'*], [eval set x "$CONFIG_FILES"], 352 [*], [set x $CONFIG_FILES]) 353 shift 354 # Used to flag and report bootstrapping failures. 355 am_rc=0 356 for am_mf 357 do 358 # Strip MF so we end up with the name of the file. 359 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360 # Check whether this is an Automake generated Makefile which includes 361 # dependency-tracking related rules and includes. 362 # Grep'ing the whole file directly is not great: AIX grep has a line 363 # limit of 2048, but all sed's we know have understand at least 4000. 364 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365 || continue 366 am_dirpart=`AS_DIRNAME(["$am_mf"])` 367 am_filepart=`AS_BASENAME(["$am_mf"])` 368 AM_RUN_LOG([cd "$am_dirpart" \ 369 && sed -e '/# am--include-marker/d' "$am_filepart" \ 370 | $MAKE -f - am--depfiles]) || am_rc=$? 371 done 372 if test $am_rc -ne 0; then 373 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374 for automatic dependency tracking. If GNU make was not used, consider 375 re-running the configure script with MAKE="gmake" (or whatever is 376 necessary). You can also try re-running configure with the 377 '--disable-dependency-tracking' option to at least be able to build 378 the package (albeit without support for automatic dependency tracking).]) 379 fi 380 AS_UNSET([am_dirpart]) 381 AS_UNSET([am_filepart]) 382 AS_UNSET([am_mf]) 383 AS_UNSET([am_rc]) 384 rm -f conftest-deps.mk 385} 386])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387 388 389# AM_OUTPUT_DEPENDENCY_COMMANDS 390# ----------------------------- 391# This macro should only be invoked once -- use via AC_REQUIRE. 392# 393# This code is only required when automatic dependency tracking is enabled. 394# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395# order to bootstrap the dependency handling code. 396AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397[AC_CONFIG_COMMANDS([depfiles], 398 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400 401# Do all the work for Automake. -*- Autoconf -*- 402 403# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404# 405# This file is free software; the Free Software Foundation 406# gives unlimited permission to copy and/or distribute it, 407# with or without modifications, as long as this notice is preserved. 408 409# This macro actually does too much. Some checks are only needed if 410# your package does certain things. But this isn't really a big deal. 411 412dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413m4_define([AC_PROG_CC], 414m4_defn([AC_PROG_CC]) 415[_AM_PROG_CC_C_O 416]) 417 418# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419# AM_INIT_AUTOMAKE([OPTIONS]) 420# ----------------------------------------------- 421# The call with PACKAGE and VERSION arguments is the old style 422# call (pre autoconf-2.50), which is being phased out. PACKAGE 423# and VERSION should now be passed to AC_INIT and removed from 424# the call to AM_INIT_AUTOMAKE. 425# We support both call styles for the transition. After 426# the next Automake release, Autoconf can make the AC_INIT 427# arguments mandatory, and then we can depend on a new Autoconf 428# release and drop the old call support. 429AC_DEFUN([AM_INIT_AUTOMAKE], 430[AC_PREREQ([2.65])dnl 431m4_ifdef([_$0_ALREADY_INIT], 432 [m4_fatal([$0 expanded multiple times 433]m4_defn([_$0_ALREADY_INIT]))], 434 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435dnl Autoconf wants to disallow AM_ names. We explicitly allow 436dnl the ones we care about. 437m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439AC_REQUIRE([AC_PROG_INSTALL])dnl 440if test "`cd $srcdir && pwd`" != "`pwd`"; then 441 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442 # is not polluted with repeated "-I." 443 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444 # test to see if srcdir already configured 445 if test -f $srcdir/config.status; then 446 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447 fi 448fi 449 450# test whether we have cygpath 451if test -z "$CYGPATH_W"; then 452 if (cygpath --version) >/dev/null 2>/dev/null; then 453 CYGPATH_W='cygpath -w' 454 else 455 CYGPATH_W=echo 456 fi 457fi 458AC_SUBST([CYGPATH_W]) 459 460# Define the identity of the package. 461dnl Distinguish between old-style and new-style calls. 462m4_ifval([$2], 463[AC_DIAGNOSE([obsolete], 464 [$0: two- and three-arguments forms are deprecated.]) 465m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466 AC_SUBST([PACKAGE], [$1])dnl 467 AC_SUBST([VERSION], [$2])], 468[_AM_SET_OPTIONS([$1])dnl 469dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470m4_if( 471 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472 [ok:ok],, 473 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476 477_AM_IF_OPTION([no-define],, 478[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480 481# Some tools Automake needs. 482AC_REQUIRE([AM_SANITY_CHECK])dnl 483AC_REQUIRE([AC_ARG_PROGRAM])dnl 484AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485AM_MISSING_PROG([AUTOCONF], [autoconf]) 486AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487AM_MISSING_PROG([AUTOHEADER], [autoheader]) 488AM_MISSING_PROG([MAKEINFO], [makeinfo]) 489AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491AC_REQUIRE([AC_PROG_MKDIR_P])dnl 492# For better backward compatibility. To be removed once Automake 1.9.x 493# dies out for good. For more background, see: 494# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497# We need awk for the "check" target (and possibly the TAP driver). The 498# system "awk" is bad on some platforms. 499AC_REQUIRE([AC_PROG_AWK])dnl 500AC_REQUIRE([AC_PROG_MAKE_SET])dnl 501AC_REQUIRE([AM_SET_LEADING_DOT])dnl 502_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504 [_AM_PROG_TAR([v7])])]) 505_AM_IF_OPTION([no-dependencies],, 506[AC_PROVIDE_IFELSE([AC_PROG_CC], 507 [_AM_DEPENDENCIES([CC])], 508 [m4_define([AC_PROG_CC], 509 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510AC_PROVIDE_IFELSE([AC_PROG_CXX], 511 [_AM_DEPENDENCIES([CXX])], 512 [m4_define([AC_PROG_CXX], 513 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514AC_PROVIDE_IFELSE([AC_PROG_OBJC], 515 [_AM_DEPENDENCIES([OBJC])], 516 [m4_define([AC_PROG_OBJC], 517 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519 [_AM_DEPENDENCIES([OBJCXX])], 520 [m4_define([AC_PROG_OBJCXX], 521 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522]) 523# Variables for tags utilities; see am/tags.am 524if test -z "$CTAGS"; then 525 CTAGS=ctags 526fi 527AC_SUBST([CTAGS]) 528if test -z "$ETAGS"; then 529 ETAGS=etags 530fi 531AC_SUBST([ETAGS]) 532if test -z "$CSCOPE"; then 533 CSCOPE=cscope 534fi 535AC_SUBST([CSCOPE]) 536 537AC_REQUIRE([AM_SILENT_RULES])dnl 538dnl The testsuite driver may need to know about EXEEXT, so add the 539dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541AC_CONFIG_COMMANDS_PRE(dnl 542[m4_provide_if([_AM_COMPILER_EXEEXT], 543 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544 545# POSIX will say in a future version that running "rm -f" with no argument 546# is OK; and we want to be able to make that assumption in our Makefile 547# recipes. So use an aggressive probe to check that the usage we want is 548# actually supported "in the wild" to an acceptable degree. 549# See automake bug#10828. 550# To make any issue more visible, cause the running configure to be aborted 551# by default if the 'rm' program in use doesn't match our expectations; the 552# user can still override this though. 553if rm -f && rm -fr && rm -rf; then : OK; else 554 cat >&2 <<'END' 555Oops! 556 557Your 'rm' program seems unable to run without file operands specified 558on the command line, even when the '-f' option is present. This is contrary 559to the behaviour of most rm programs out there, and not conforming with 560the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561 562Please tell bug-automake@gnu.org about your system, including the value 563of your $PATH and any error possibly output before this message. This 564can help us improve future automake versions. 565 566END 567 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568 echo 'Configuration will proceed anyway, since you have set the' >&2 569 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570 echo >&2 571 else 572 cat >&2 <<'END' 573Aborting the configuration process, to ensure you take notice of the issue. 574 575You can download and install GNU coreutils to get an 'rm' implementation 576that behaves properly: <https://www.gnu.org/software/coreutils/>. 577 578If you want to complete the configuration process using your problematic 579'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580to "yes", and re-run configure. 581 582END 583 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584 fi 585fi 586dnl The trailing newline in this macro's definition is deliberate, for 587dnl backward compatibility and to allow trailing 'dnl'-style comments 588dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589]) 590 591dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593dnl mangled by Autoconf and run in a shell conditional statement. 594m4_define([_AC_COMPILER_EXEEXT], 595m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596 597# When config.status generates a header, we must update the stamp-h file. 598# This file resides in the same directory as the config header 599# that is generated. The stamp files are numbered to have different names. 600 601# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602# loop where config.status creates the headers, so we can generate 603# our stamp files there. 604AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605[# Compute $1's index in $config_headers. 606_am_arg=$1 607_am_stamp_count=1 608for _am_header in $config_headers :; do 609 case $_am_header in 610 $_am_arg | $_am_arg:* ) 611 break ;; 612 * ) 613 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614 esac 615done 616echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617 618# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619# 620# This file is free software; the Free Software Foundation 621# gives unlimited permission to copy and/or distribute it, 622# with or without modifications, as long as this notice is preserved. 623 624# AM_PROG_INSTALL_SH 625# ------------------ 626# Define $install_sh. 627AC_DEFUN([AM_PROG_INSTALL_SH], 628[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629if test x"${install_sh+set}" != xset; then 630 case $am_aux_dir in 631 *\ * | *\ *) 632 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633 *) 634 install_sh="\${SHELL} $am_aux_dir/install-sh" 635 esac 636fi 637AC_SUBST([install_sh])]) 638 639# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640# 641# This file is free software; the Free Software Foundation 642# gives unlimited permission to copy and/or distribute it, 643# with or without modifications, as long as this notice is preserved. 644 645# Check whether the underlying file-system supports filenames 646# with a leading dot. For instance MS-DOS doesn't. 647AC_DEFUN([AM_SET_LEADING_DOT], 648[rm -rf .tst 2>/dev/null 649mkdir .tst 2>/dev/null 650if test -d .tst; then 651 am__leading_dot=. 652else 653 am__leading_dot=_ 654fi 655rmdir .tst 2>/dev/null 656AC_SUBST([am__leading_dot])]) 657 658# Check to see how 'make' treats includes. -*- Autoconf -*- 659 660# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661# 662# This file is free software; the Free Software Foundation 663# gives unlimited permission to copy and/or distribute it, 664# with or without modifications, as long as this notice is preserved. 665 666# AM_MAKE_INCLUDE() 667# ----------------- 668# Check whether make has an 'include' directive that can support all 669# the idioms we need for our automatic dependency tracking code. 670AC_DEFUN([AM_MAKE_INCLUDE], 671[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672cat > confinc.mk << 'END' 673am__doit: 674 @echo this is the am__doit target >confinc.out 675.PHONY: am__doit 676END 677am__include="#" 678am__quote= 679# BSD make does it like this. 680echo '.include "confinc.mk" # ignored' > confmf.BSD 681# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682echo 'include confinc.mk # ignored' > confmf.GNU 683_am_result=no 684for s in GNU BSD; do 685 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687 ['0:this is the am__doit target'], 688 [AS_CASE([$s], 689 [BSD], [am__include='.include' am__quote='"'], 690 [am__include='include' am__quote=''])]) 691 if test "$am__include" != "#"; then 692 _am_result="yes ($s style)" 693 break 694 fi 695done 696rm -f confinc.* confmf.* 697AC_MSG_RESULT([${_am_result}]) 698AC_SUBST([am__include])]) 699AC_SUBST([am__quote])]) 700 701# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702 703# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704# 705# This file is free software; the Free Software Foundation 706# gives unlimited permission to copy and/or distribute it, 707# with or without modifications, as long as this notice is preserved. 708 709# AM_MISSING_PROG(NAME, PROGRAM) 710# ------------------------------ 711AC_DEFUN([AM_MISSING_PROG], 712[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713$1=${$1-"${am_missing_run}$2"} 714AC_SUBST($1)]) 715 716# AM_MISSING_HAS_RUN 717# ------------------ 718# Define MISSING if not defined so far and test if it is modern enough. 719# If it is, set am_missing_run to use it, otherwise, to nothing. 720AC_DEFUN([AM_MISSING_HAS_RUN], 721[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722AC_REQUIRE_AUX_FILE([missing])dnl 723if test x"${MISSING+set}" != xset; then 724 MISSING="\${SHELL} '$am_aux_dir/missing'" 725fi 726# Use eval to expand $SHELL 727if eval "$MISSING --is-lightweight"; then 728 am_missing_run="$MISSING " 729else 730 am_missing_run= 731 AC_MSG_WARN(['missing' script is too old or missing]) 732fi 733]) 734 735# Helper functions for option handling. -*- Autoconf -*- 736 737# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738# 739# This file is free software; the Free Software Foundation 740# gives unlimited permission to copy and/or distribute it, 741# with or without modifications, as long as this notice is preserved. 742 743# _AM_MANGLE_OPTION(NAME) 744# ----------------------- 745AC_DEFUN([_AM_MANGLE_OPTION], 746[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747 748# _AM_SET_OPTION(NAME) 749# -------------------- 750# Set option NAME. Presently that only means defining a flag for this option. 751AC_DEFUN([_AM_SET_OPTION], 752[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753 754# _AM_SET_OPTIONS(OPTIONS) 755# ------------------------ 756# OPTIONS is a space-separated list of Automake options. 757AC_DEFUN([_AM_SET_OPTIONS], 758[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759 760# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761# ------------------------------------------- 762# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763AC_DEFUN([_AM_IF_OPTION], 764[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765 766# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767# 768# This file is free software; the Free Software Foundation 769# gives unlimited permission to copy and/or distribute it, 770# with or without modifications, as long as this notice is preserved. 771 772# _AM_PROG_CC_C_O 773# --------------- 774# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775# to automatically call this. 776AC_DEFUN([_AM_PROG_CC_C_O], 777[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778AC_REQUIRE_AUX_FILE([compile])dnl 779AC_LANG_PUSH([C])dnl 780AC_CACHE_CHECK( 781 [whether $CC understands -c and -o together], 782 [am_cv_prog_cc_c_o], 783 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784 # Make sure it works both with $CC and with simple cc. 785 # Following AC_PROG_CC_C_O, we do the test twice because some 786 # compilers refuse to overwrite an existing .o file with -o, 787 # though they will create one. 788 am_cv_prog_cc_c_o=yes 789 for am_i in 1 2; do 790 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791 && test -f conftest2.$ac_objext; then 792 : OK 793 else 794 am_cv_prog_cc_c_o=no 795 break 796 fi 797 done 798 rm -f core conftest* 799 unset am_i]) 800if test "$am_cv_prog_cc_c_o" != yes; then 801 # Losing compiler, so override with the script. 802 # FIXME: It is wrong to rewrite CC. 803 # But if we don't then we get into trouble of one sort or another. 804 # A longer-term fix would be to have automake use am__CC in this case, 805 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806 CC="$am_aux_dir/compile $CC" 807fi 808AC_LANG_POP([C])]) 809 810# For backward compatibility. 811AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812 813# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814# 815# This file is free software; the Free Software Foundation 816# gives unlimited permission to copy and/or distribute it, 817# with or without modifications, as long as this notice is preserved. 818 819# AM_RUN_LOG(COMMAND) 820# ------------------- 821# Run COMMAND, save the exit status in ac_status, and log it. 822# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823AC_DEFUN([AM_RUN_LOG], 824[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826 ac_status=$? 827 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828 (exit $ac_status); }]) 829 830# Check to make sure that the build environment is sane. -*- Autoconf -*- 831 832# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833# 834# This file is free software; the Free Software Foundation 835# gives unlimited permission to copy and/or distribute it, 836# with or without modifications, as long as this notice is preserved. 837 838# AM_SANITY_CHECK 839# --------------- 840AC_DEFUN([AM_SANITY_CHECK], 841[AC_MSG_CHECKING([whether build environment is sane]) 842# Reject unsafe characters in $srcdir or the absolute working directory 843# name. Accept space and tab only in the latter. 844am_lf=' 845' 846case `pwd` in 847 *[[\\\"\#\$\&\'\`$am_lf]]*) 848 AC_MSG_ERROR([unsafe absolute working directory name]);; 849esac 850case $srcdir in 851 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853esac 854 855# Do 'set' in a subshell so we don't clobber the current shell's 856# arguments. Must try -L first in case configure is actually a 857# symlink; some systems play weird games with the mod time of symlinks 858# (eg FreeBSD returns the mod time of the symlink's containing 859# directory). 860if ( 861 am_has_slept=no 862 for am_try in 1 2; do 863 echo "timestamp, slept: $am_has_slept" > conftest.file 864 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865 if test "$[*]" = "X"; then 866 # -L didn't work. 867 set X `ls -t "$srcdir/configure" conftest.file` 868 fi 869 if test "$[*]" != "X $srcdir/configure conftest.file" \ 870 && test "$[*]" != "X conftest.file $srcdir/configure"; then 871 872 # If neither matched, then we have a broken ls. This can happen 873 # if, for instance, CONFIG_SHELL is bash and it inherits a 874 # broken ls alias from the environment. This has actually 875 # happened. Such a system could not be considered "sane". 876 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877 alias in your environment]) 878 fi 879 if test "$[2]" = conftest.file || test $am_try -eq 2; then 880 break 881 fi 882 # Just in case. 883 sleep 1 884 am_has_slept=yes 885 done 886 test "$[2]" = conftest.file 887 ) 888then 889 # Ok. 890 : 891else 892 AC_MSG_ERROR([newly created file is older than distributed files! 893Check your system clock]) 894fi 895AC_MSG_RESULT([yes]) 896# If we didn't sleep, we still need to ensure time stamps of config.status and 897# generated files are strictly newer. 898am_sleep_pid= 899if grep 'slept: no' conftest.file >/dev/null 2>&1; then 900 ( sleep 1 ) & 901 am_sleep_pid=$! 902fi 903AC_CONFIG_COMMANDS_PRE( 904 [AC_MSG_CHECKING([that generated files are newer than configure]) 905 if test -n "$am_sleep_pid"; then 906 # Hide warnings about reused PIDs. 907 wait $am_sleep_pid 2>/dev/null 908 fi 909 AC_MSG_RESULT([done])]) 910rm -f conftest.file 911]) 912 913# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914# 915# This file is free software; the Free Software Foundation 916# gives unlimited permission to copy and/or distribute it, 917# with or without modifications, as long as this notice is preserved. 918 919# AM_SILENT_RULES([DEFAULT]) 920# -------------------------- 921# Enable less verbose build rules; with the default set to DEFAULT 922# ("yes" being less verbose, "no" or empty being verbose). 923AC_DEFUN([AM_SILENT_RULES], 924[AC_ARG_ENABLE([silent-rules], [dnl 925AS_HELP_STRING( 926 [--enable-silent-rules], 927 [less verbose build output (undo: "make V=1")]) 928AS_HELP_STRING( 929 [--disable-silent-rules], 930 [verbose build output (undo: "make V=0")])dnl 931]) 932case $enable_silent_rules in @%:@ ((( 933 yes) AM_DEFAULT_VERBOSITY=0;; 934 no) AM_DEFAULT_VERBOSITY=1;; 935 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936esac 937dnl 938dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939dnl do not support nested variable expansions. 940dnl See automake bug#9928 and bug#10237. 941am_make=${MAKE-make} 942AC_CACHE_CHECK([whether $am_make supports nested variables], 943 [am_cv_make_support_nested_variables], 944 [if AS_ECHO([['TRUE=$(BAR$(V)) 945BAR0=false 946BAR1=true 947V=1 948am__doit: 949 @$(TRUE) 950.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951 am_cv_make_support_nested_variables=yes 952else 953 am_cv_make_support_nested_variables=no 954fi]) 955if test $am_cv_make_support_nested_variables = yes; then 956 dnl Using '$V' instead of '$(V)' breaks IRIX make. 957 AM_V='$(V)' 958 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959else 960 AM_V=$AM_DEFAULT_VERBOSITY 961 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962fi 963AC_SUBST([AM_V])dnl 964AM_SUBST_NOTMAKE([AM_V])dnl 965AC_SUBST([AM_DEFAULT_V])dnl 966AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968AM_BACKSLASH='\' 969AC_SUBST([AM_BACKSLASH])dnl 970_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971]) 972 973# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974# 975# This file is free software; the Free Software Foundation 976# gives unlimited permission to copy and/or distribute it, 977# with or without modifications, as long as this notice is preserved. 978 979# AM_PROG_INSTALL_STRIP 980# --------------------- 981# One issue with vendor 'install' (even GNU) is that you can't 982# specify the program used to strip binaries. This is especially 983# annoying in cross-compiling environments, where the build's strip 984# is unlikely to handle the host's binaries. 985# Fortunately install-sh will honor a STRIPPROG variable, so we 986# always use install-sh in "make install-strip", and initialize 987# STRIPPROG with the value of the STRIP variable (set by the user). 988AC_DEFUN([AM_PROG_INSTALL_STRIP], 989[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990# Installed binaries are usually stripped using 'strip' when the user 991# run "make install-strip". However 'strip' might not be the right 992# tool to use in cross-compilation environments, therefore Automake 993# will honor the 'STRIP' environment variable to overrule this program. 994dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995if test "$cross_compiling" != no; then 996 AC_CHECK_TOOL([STRIP], [strip], :) 997fi 998INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000 1001# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002# 1003# This file is free software; the Free Software Foundation 1004# gives unlimited permission to copy and/or distribute it, 1005# with or without modifications, as long as this notice is preserved. 1006 1007# _AM_SUBST_NOTMAKE(VARIABLE) 1008# --------------------------- 1009# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010# This macro is traced by Automake. 1011AC_DEFUN([_AM_SUBST_NOTMAKE]) 1012 1013# AM_SUBST_NOTMAKE(VARIABLE) 1014# -------------------------- 1015# Public sister of _AM_SUBST_NOTMAKE. 1016AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017 1018# Check how to create a tarball. -*- Autoconf -*- 1019 1020# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021# 1022# This file is free software; the Free Software Foundation 1023# gives unlimited permission to copy and/or distribute it, 1024# with or without modifications, as long as this notice is preserved. 1025 1026# _AM_PROG_TAR(FORMAT) 1027# -------------------- 1028# Check how to create a tarball in format FORMAT. 1029# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030# 1031# Substitute a variable $(am__tar) that is a command 1032# writing to stdout a FORMAT-tarball containing the directory 1033# $tardir. 1034# tardir=directory && $(am__tar) > result.tar 1035# 1036# Substitute a variable $(am__untar) that extract such 1037# a tarball read from stdin. 1038# $(am__untar) < result.tar 1039# 1040AC_DEFUN([_AM_PROG_TAR], 1041[# Always define AMTAR for backward compatibility. Yes, it's still used 1042# in the wild :-( We should find a proper way to deprecate it ... 1043AC_SUBST([AMTAR], ['$${TAR-tar}']) 1044 1045# We'll loop over all known methods to create a tar archive until one works. 1046_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047 1048m4_if([$1], [v7], 1049 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050 1051 [m4_case([$1], 1052 [ustar], 1053 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054 # There is notably a 21 bits limit for the UID and the GID. In fact, 1055 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056 # and bug#13588). 1057 am_max_uid=2097151 # 2^21 - 1 1058 am_max_gid=$am_max_uid 1059 # The $UID and $GID variables are not portable, so we need to resort 1060 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061 # below are definitely unexpected, so allow the users to see them 1062 # (that is, avoid stderr redirection). 1063 am_uid=`id -u || echo unknown` 1064 am_gid=`id -g || echo unknown` 1065 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066 if test $am_uid -le $am_max_uid; then 1067 AC_MSG_RESULT([yes]) 1068 else 1069 AC_MSG_RESULT([no]) 1070 _am_tools=none 1071 fi 1072 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073 if test $am_gid -le $am_max_gid; then 1074 AC_MSG_RESULT([yes]) 1075 else 1076 AC_MSG_RESULT([no]) 1077 _am_tools=none 1078 fi], 1079 1080 [pax], 1081 [], 1082 1083 [m4_fatal([Unknown tar format])]) 1084 1085 AC_MSG_CHECKING([how to create a $1 tar archive]) 1086 1087 # Go ahead even if we have the value already cached. We do so because we 1088 # need to set the values for the 'am__tar' and 'am__untar' variables. 1089 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090 1091 for _am_tool in $_am_tools; do 1092 case $_am_tool in 1093 gnutar) 1094 for _am_tar in tar gnutar gtar; do 1095 AM_RUN_LOG([$_am_tar --version]) && break 1096 done 1097 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099 am__untar="$_am_tar -xf -" 1100 ;; 1101 plaintar) 1102 # Must skip GNU tar: if it does not support --format= it doesn't create 1103 # ustar tarball either. 1104 (tar --version) >/dev/null 2>&1 && continue 1105 am__tar='tar chf - "$$tardir"' 1106 am__tar_='tar chf - "$tardir"' 1107 am__untar='tar xf -' 1108 ;; 1109 pax) 1110 am__tar='pax -L -x $1 -w "$$tardir"' 1111 am__tar_='pax -L -x $1 -w "$tardir"' 1112 am__untar='pax -r' 1113 ;; 1114 cpio) 1115 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117 am__untar='cpio -i -H $1 -d' 1118 ;; 1119 none) 1120 am__tar=false 1121 am__tar_=false 1122 am__untar=false 1123 ;; 1124 esac 1125 1126 # If the value was cached, stop now. We just wanted to have am__tar 1127 # and am__untar set. 1128 test -n "${am_cv_prog_tar_$1}" && break 1129 1130 # tar/untar a dummy directory, and stop if the command works. 1131 rm -rf conftest.dir 1132 mkdir conftest.dir 1133 echo GrepMe > conftest.dir/file 1134 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135 rm -rf conftest.dir 1136 if test -s conftest.tar; then 1137 AM_RUN_LOG([$am__untar <conftest.tar]) 1138 AM_RUN_LOG([cat conftest.dir/file]) 1139 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140 fi 1141 done 1142 rm -rf conftest.dir 1143 1144 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146 1147AC_SUBST([am__tar]) 1148AC_SUBST([am__untar]) 1149]) # _AM_PROG_TAR 1150 1151dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152dnl serial 11 (pkg-config-0.29) 1153dnl 1154dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156dnl 1157dnl This program is free software; you can redistribute it and/or modify 1158dnl it under the terms of the GNU General Public License as published by 1159dnl the Free Software Foundation; either version 2 of the License, or 1160dnl (at your option) any later version. 1161dnl 1162dnl This program is distributed in the hope that it will be useful, but 1163dnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165dnl General Public License for more details. 1166dnl 1167dnl You should have received a copy of the GNU General Public License 1168dnl along with this program; if not, write to the Free Software 1169dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170dnl 02111-1307, USA. 1171dnl 1172dnl As a special exception to the GNU General Public License, if you 1173dnl distribute this file as part of a program that contains a 1174dnl configuration script generated by Autoconf, you may include it under 1175dnl the same distribution terms that you use for the rest of that 1176dnl program. 1177 1178dnl PKG_PREREQ(MIN-VERSION) 1179dnl ----------------------- 1180dnl Since: 0.29 1181dnl 1182dnl Verify that the version of the pkg-config macros are at least 1183dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184dnl installed version of pkg-config, this checks the developer's version 1185dnl of pkg.m4 when generating configure. 1186dnl 1187dnl To ensure that this macro is defined, also add: 1188dnl m4_ifndef([PKG_PREREQ], 1189dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190dnl 1191dnl See the "Since" comment for each macro you use to see what version 1192dnl of the macros you require. 1193m4_defun([PKG_PREREQ], 1194[m4_define([PKG_MACROS_VERSION], [0.29]) 1195m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197])dnl PKG_PREREQ 1198 1199dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200dnl ---------------------------------- 1201dnl Since: 0.16 1202dnl 1203dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204dnl first found in the path. Checks that the version of pkg-config found 1205dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206dnl used since that's the first version where most current features of 1207dnl pkg-config existed. 1208AC_DEFUN([PKG_PROG_PKG_CONFIG], 1209[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1215 1216if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218fi 1219if test -n "$PKG_CONFIG"; then 1220 _pkg_min_version=m4_default([$1], [0.9.0]) 1221 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223 AC_MSG_RESULT([yes]) 1224 else 1225 AC_MSG_RESULT([no]) 1226 PKG_CONFIG="" 1227 fi 1228fi[]dnl 1229])dnl PKG_PROG_PKG_CONFIG 1230 1231dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232dnl ------------------------------------------------------------------- 1233dnl Since: 0.18 1234dnl 1235dnl Check to see whether a particular set of modules exists. Similar to 1236dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237dnl 1238dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239dnl only at the first occurence in configure.ac, so if the first place 1240dnl it's called might be skipped (such as if it is within an "if", you 1241dnl have to call PKG_CHECK_EXISTS manually 1242AC_DEFUN([PKG_CHECK_EXISTS], 1243[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244if test -n "$PKG_CONFIG" && \ 1245 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246 m4_default([$2], [:]) 1247m4_ifvaln([$3], [else 1248 $3])dnl 1249fi]) 1250 1251dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252dnl --------------------------------------------- 1253dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254dnl pkg_failed based on the result. 1255m4_define([_PKG_CONFIG], 1256[if test -n "$$1"; then 1257 pkg_cv_[]$1="$$1" 1258 elif test -n "$PKG_CONFIG"; then 1259 PKG_CHECK_EXISTS([$3], 1260 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261 test "x$?" != "x0" && pkg_failed=yes ], 1262 [pkg_failed=yes]) 1263 else 1264 pkg_failed=untried 1265fi[]dnl 1266])dnl _PKG_CONFIG 1267 1268dnl _PKG_SHORT_ERRORS_SUPPORTED 1269dnl --------------------------- 1270dnl Internal check to see if pkg-config supports short errors. 1271AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274 _pkg_short_errors_supported=yes 1275else 1276 _pkg_short_errors_supported=no 1277fi[]dnl 1278])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279 1280 1281dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282dnl [ACTION-IF-NOT-FOUND]) 1283dnl -------------------------------------------------------------- 1284dnl Since: 0.4.0 1285dnl 1286dnl Note that if there is a possibility the first call to 1287dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289AC_DEFUN([PKG_CHECK_MODULES], 1290[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293 1294pkg_failed=no 1295AC_MSG_CHECKING([for $1]) 1296 1297_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299 1300m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301and $1[]_LIBS to avoid the need to call pkg-config. 1302See the pkg-config man page for more details.]) 1303 1304if test $pkg_failed = yes; then 1305 AC_MSG_RESULT([no]) 1306 _PKG_SHORT_ERRORS_SUPPORTED 1307 if test $_pkg_short_errors_supported = yes; then 1308 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309 else 1310 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311 fi 1312 # Put the nasty error message in config.log where it belongs 1313 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1314 1315 m4_default([$4], [AC_MSG_ERROR( 1316[Package requirements ($2) were not met: 1317 1318$$1_PKG_ERRORS 1319 1320Consider adjusting the PKG_CONFIG_PATH environment variable if you 1321installed software in a non-standard prefix. 1322 1323_PKG_TEXT])[]dnl 1324 ]) 1325elif test $pkg_failed = untried; then 1326 AC_MSG_RESULT([no]) 1327 m4_default([$4], [AC_MSG_FAILURE( 1328[The pkg-config script could not be found or is too old. Make sure it 1329is in your PATH or set the PKG_CONFIG environment variable to the full 1330path to pkg-config. 1331 1332_PKG_TEXT 1333 1334To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335 ]) 1336else 1337 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339 AC_MSG_RESULT([yes]) 1340 $3 1341fi[]dnl 1342])dnl PKG_CHECK_MODULES 1343 1344 1345dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346dnl [ACTION-IF-NOT-FOUND]) 1347dnl --------------------------------------------------------------------- 1348dnl Since: 0.29 1349dnl 1350dnl Checks for existence of MODULES and gathers its build flags with 1351dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352dnl and VARIABLE-PREFIX_LIBS from --libs. 1353dnl 1354dnl Note that if there is a possibility the first call to 1355dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357dnl configure.ac. 1358AC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360_save_PKG_CONFIG=$PKG_CONFIG 1361PKG_CONFIG="$PKG_CONFIG --static" 1362PKG_CHECK_MODULES($@) 1363PKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364])dnl PKG_CHECK_MODULES_STATIC 1365 1366 1367dnl PKG_INSTALLDIR([DIRECTORY]) 1368dnl ------------------------- 1369dnl Since: 0.27 1370dnl 1371dnl Substitutes the variable pkgconfigdir as the location where a module 1372dnl should install pkg-config .pc files. By default the directory is 1373dnl $libdir/pkgconfig, but the default can be changed by passing 1374dnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375dnl parameter. 1376AC_DEFUN([PKG_INSTALLDIR], 1377[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378m4_pushdef([pkg_description], 1379 [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380AC_ARG_WITH([pkgconfigdir], 1381 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382 [with_pkgconfigdir=]pkg_default) 1383AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384m4_popdef([pkg_default]) 1385m4_popdef([pkg_description]) 1386])dnl PKG_INSTALLDIR 1387 1388 1389dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390dnl -------------------------------- 1391dnl Since: 0.27 1392dnl 1393dnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394dnl module should install arch-independent pkg-config .pc files. By 1395dnl default the directory is $datadir/pkgconfig, but the default can be 1396dnl changed by passing DIRECTORY. The user can override through the 1397dnl --with-noarch-pkgconfigdir parameter. 1398AC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400m4_pushdef([pkg_description], 1401 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402AC_ARG_WITH([noarch-pkgconfigdir], 1403 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404 [with_noarch_pkgconfigdir=]pkg_default) 1405AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406m4_popdef([pkg_default]) 1407m4_popdef([pkg_description]) 1408])dnl PKG_NOARCH_INSTALLDIR 1409 1410 1411dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413dnl ------------------------------------------- 1414dnl Since: 0.28 1415dnl 1416dnl Retrieves the value of the pkg-config variable for the given module. 1417AC_DEFUN([PKG_CHECK_VAR], 1418[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1420 1421_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422AS_VAR_COPY([$1], [pkg_cv_][$1]) 1423 1424AS_VAR_IF([$1], [""], [$5], [$4])dnl 1425])dnl PKG_CHECK_VAR 1426 1427dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428dnl 1429dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1430dnl 1431dnl Permission is hereby granted, free of charge, to any person obtaining a 1432dnl copy of this software and associated documentation files (the "Software"), 1433dnl to deal in the Software without restriction, including without limitation 1434dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435dnl and/or sell copies of the Software, and to permit persons to whom the 1436dnl Software is furnished to do so, subject to the following conditions: 1437dnl 1438dnl The above copyright notice and this permission notice (including the next 1439dnl paragraph) shall be included in all copies or substantial portions of the 1440dnl Software. 1441dnl 1442dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448dnl DEALINGS IN THE SOFTWARE. 1449 1450# XORG_MACROS_VERSION(required-version) 1451# ------------------------------------- 1452# Minimum version: 1.1.0 1453# 1454# If you're using a macro added in Version 1.1 or newer, include this in 1455# your configure.ac with the minimum required version, such as: 1456# XORG_MACROS_VERSION(1.1) 1457# 1458# To ensure that this macro is defined, also add: 1459# m4_ifndef([XORG_MACROS_VERSION], 1460# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461# 1462# 1463# See the "minimum version" comment for each macro you use to see what 1464# version you require. 1465m4_defun([XORG_MACROS_VERSION],[ 1466m4_define([vers_have], [1.19.3]) 1467m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469m4_if(m4_cmp(maj_have, maj_needed), 0,, 1470 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471m4_if(m4_version_compare(vers_have, [$1]), -1, 1472 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473m4_undefine([vers_have]) 1474m4_undefine([maj_have]) 1475m4_undefine([maj_needed]) 1476]) # XORG_MACROS_VERSION 1477 1478# XORG_PROG_RAWCPP() 1479# ------------------ 1480# Minimum version: 1.0.0 1481# 1482# Find cpp program and necessary flags for use in pre-processing text files 1483# such as man pages and config files 1484AC_DEFUN([XORG_PROG_RAWCPP],[ 1485AC_REQUIRE([AC_PROG_CPP]) 1486AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488 1489# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490# which is not the best choice for supporting other OS'es, but covers most 1491# of the ones we need for now. 1492AC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495 AC_MSG_RESULT([no]) 1496else 1497 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498 RAWCPPFLAGS=-undef 1499 AC_MSG_RESULT([yes]) 1500 # under Cygwin unix is still defined even with -undef 1501 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502 RAWCPPFLAGS="-undef -ansi" 1503 AC_MSG_RESULT([yes, with -ansi]) 1504 else 1505 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506 fi 1507fi 1508rm -f conftest.$ac_ext 1509 1510AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513 AC_MSG_RESULT([no]) 1514else 1515 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516 TRADITIONALCPPFLAGS="-traditional" 1517 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518 AC_MSG_RESULT([yes]) 1519 else 1520 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521 fi 1522fi 1523rm -f conftest.$ac_ext 1524AC_SUBST(RAWCPPFLAGS) 1525AC_SUBST(TRADITIONALCPPFLAGS) 1526]) # XORG_PROG_RAWCPP 1527 1528# XORG_MANPAGE_SECTIONS() 1529# ----------------------- 1530# Minimum version: 1.0.0 1531# 1532# Determine which sections man pages go in for the different man page types 1533# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534# Not sure if there's any better way than just hardcoding by OS name. 1535# Override default settings by setting environment variables 1536# Added MAN_SUBSTS in version 1.8 1537# Added AC_PROG_SED in version 1.8 1538 1539AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540AC_REQUIRE([AC_CANONICAL_HOST]) 1541AC_REQUIRE([AC_PROG_SED]) 1542 1543case $host_os in 1544 solaris*) 1545 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546 # check for a man page file found in later versions that use 1547 # traditional section numbers instead 1548 AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549 [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550 ;; 1551 *) SYSV_MAN_SECTIONS=false ;; 1552esac 1553 1554if test x$APP_MAN_SUFFIX = x ; then 1555 APP_MAN_SUFFIX=1 1556fi 1557if test x$APP_MAN_DIR = x ; then 1558 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559fi 1560 1561if test x$LIB_MAN_SUFFIX = x ; then 1562 LIB_MAN_SUFFIX=3 1563fi 1564if test x$LIB_MAN_DIR = x ; then 1565 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566fi 1567 1568if test x$FILE_MAN_SUFFIX = x ; then 1569 case $SYSV_MAN_SECTIONS in 1570 true) FILE_MAN_SUFFIX=4 ;; 1571 *) FILE_MAN_SUFFIX=5 ;; 1572 esac 1573fi 1574if test x$FILE_MAN_DIR = x ; then 1575 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576fi 1577 1578if test x$MISC_MAN_SUFFIX = x ; then 1579 case $SYSV_MAN_SECTIONS in 1580 true) MISC_MAN_SUFFIX=5 ;; 1581 *) MISC_MAN_SUFFIX=7 ;; 1582 esac 1583fi 1584if test x$MISC_MAN_DIR = x ; then 1585 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586fi 1587 1588if test x$DRIVER_MAN_SUFFIX = x ; then 1589 case $SYSV_MAN_SECTIONS in 1590 true) DRIVER_MAN_SUFFIX=7 ;; 1591 *) DRIVER_MAN_SUFFIX=4 ;; 1592 esac 1593fi 1594if test x$DRIVER_MAN_DIR = x ; then 1595 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596fi 1597 1598if test x$ADMIN_MAN_SUFFIX = x ; then 1599 case $SYSV_MAN_SECTIONS in 1600 true) ADMIN_MAN_SUFFIX=1m ;; 1601 *) ADMIN_MAN_SUFFIX=8 ;; 1602 esac 1603fi 1604if test x$ADMIN_MAN_DIR = x ; then 1605 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606fi 1607 1608 1609AC_SUBST([APP_MAN_SUFFIX]) 1610AC_SUBST([LIB_MAN_SUFFIX]) 1611AC_SUBST([FILE_MAN_SUFFIX]) 1612AC_SUBST([MISC_MAN_SUFFIX]) 1613AC_SUBST([DRIVER_MAN_SUFFIX]) 1614AC_SUBST([ADMIN_MAN_SUFFIX]) 1615AC_SUBST([APP_MAN_DIR]) 1616AC_SUBST([LIB_MAN_DIR]) 1617AC_SUBST([FILE_MAN_DIR]) 1618AC_SUBST([MISC_MAN_DIR]) 1619AC_SUBST([DRIVER_MAN_DIR]) 1620AC_SUBST([ADMIN_MAN_DIR]) 1621 1622XORG_MAN_PAGE="X Version 11" 1623AC_SUBST([XORG_MAN_PAGE]) 1624MAN_SUBSTS="\ 1625 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627 -e 's|__xservername__|Xorg|g' \ 1628 -e 's|__xconfigfile__|xorg.conf|g' \ 1629 -e 's|__projectroot__|\$(prefix)|g' \ 1630 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637AC_SUBST([MAN_SUBSTS]) 1638 1639]) # XORG_MANPAGE_SECTIONS 1640 1641# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642# ------------------------ 1643# Minimum version: 1.7.0 1644# 1645# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646# provided by xorg-sgml-doctools, if installed. 1647AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649XORG_SGML_PATH= 1650PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652 [m4_ifval([$1],[:], 1653 [if test x"$cross_compiling" != x"yes" ; then 1654 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655 [XORG_SGML_PATH=$prefix/share/sgml]) 1656 fi]) 1657 ]) 1658 1659# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660# the path and the name of the doc stylesheet 1661if test "x$XORG_SGML_PATH" != "x" ; then 1662 AC_MSG_RESULT([$XORG_SGML_PATH]) 1663 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665else 1666 AC_MSG_RESULT([no]) 1667fi 1668 1669AC_SUBST(XORG_SGML_PATH) 1670AC_SUBST(STYLESHEET_SRCDIR) 1671AC_SUBST(XSL_STYLESHEET) 1672AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673]) # XORG_CHECK_SGML_DOCTOOLS 1674 1675# XORG_CHECK_LINUXDOC 1676# ------------------- 1677# Minimum version: 1.0.0 1678# 1679# Defines the variable MAKE_TEXT if the necessary tools and 1680# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681# Whether or not the necessary tools and files are found can be checked 1682# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683AC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685AC_REQUIRE([XORG_WITH_PS2PDF]) 1686 1687AC_PATH_PROG(LINUXDOC, linuxdoc) 1688 1689AC_MSG_CHECKING([whether to build documentation]) 1690 1691if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692 BUILDDOC=yes 1693else 1694 BUILDDOC=no 1695fi 1696 1697AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1698 1699AC_MSG_RESULT([$BUILDDOC]) 1700 1701AC_MSG_CHECKING([whether to build pdf documentation]) 1702 1703if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704 BUILDPDFDOC=yes 1705else 1706 BUILDPDFDOC=no 1707fi 1708 1709AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1710 1711AC_MSG_RESULT([$BUILDPDFDOC]) 1712 1713MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715MAKE_PDF="$PS2PDF" 1716MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1717 1718AC_SUBST(MAKE_TEXT) 1719AC_SUBST(MAKE_PS) 1720AC_SUBST(MAKE_PDF) 1721AC_SUBST(MAKE_HTML) 1722]) # XORG_CHECK_LINUXDOC 1723 1724# XORG_CHECK_DOCBOOK 1725# ------------------- 1726# Minimum version: 1.0.0 1727# 1728# Checks for the ability to build output formats from SGML DocBook source. 1729# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730# indicates whether the necessary tools and files are found and, if set, 1731# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732AC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1734 1735BUILDTXTDOC=no 1736BUILDPDFDOC=no 1737BUILDPSDOC=no 1738BUILDHTMLDOC=no 1739 1740AC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742AC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744 1745AC_MSG_CHECKING([whether to build text documentation]) 1746if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747 test x$BUILD_TXTDOC != xno; then 1748 BUILDTXTDOC=yes 1749fi 1750AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751AC_MSG_RESULT([$BUILDTXTDOC]) 1752 1753AC_MSG_CHECKING([whether to build PDF documentation]) 1754if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755 test x$BUILD_PDFDOC != xno; then 1756 BUILDPDFDOC=yes 1757fi 1758AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759AC_MSG_RESULT([$BUILDPDFDOC]) 1760 1761AC_MSG_CHECKING([whether to build PostScript documentation]) 1762if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763 test x$BUILD_PSDOC != xno; then 1764 BUILDPSDOC=yes 1765fi 1766AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767AC_MSG_RESULT([$BUILDPSDOC]) 1768 1769AC_MSG_CHECKING([whether to build HTML documentation]) 1770if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771 test x$BUILD_HTMLDOC != xno; then 1772 BUILDHTMLDOC=yes 1773fi 1774AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775AC_MSG_RESULT([$BUILDHTMLDOC]) 1776 1777MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781 1782AC_SUBST(MAKE_TEXT) 1783AC_SUBST(MAKE_PS) 1784AC_SUBST(MAKE_PDF) 1785AC_SUBST(MAKE_HTML) 1786]) # XORG_CHECK_DOCBOOK 1787 1788# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789# ---------------- 1790# Minimum version: 1.5.0 1791# Minimum version for optional DEFAULT argument: 1.11.0 1792# 1793# Documentation tools are not always available on all platforms and sometimes 1794# not at the appropriate level. This macro enables a module to test for the 1795# presence of the tool and obtain it's path in separate variables. Coupled with 1796# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798# --with-xmlto assumes 'auto'. 1799# 1800# Interface to module: 1801# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802# XMLTO: returns the path of the xmlto program found 1803# returns the path set by the user in the environment 1804# --with-xmlto: 'yes' user instructs the module to use xmlto 1805# 'no' user instructs the module not to use xmlto 1806# 1807# Added in version 1.10.0 1808# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809# xmlto for text output requires either lynx, links, or w3m browsers 1810# 1811# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812# 1813AC_DEFUN([XORG_WITH_XMLTO],[ 1814AC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815m4_define([_defopt], m4_default([$2], [auto])) 1816AC_ARG_WITH(xmlto, 1817 AS_HELP_STRING([--with-xmlto], 1818 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819 [use_xmlto=$withval], [use_xmlto=]_defopt) 1820m4_undefine([_defopt]) 1821 1822if test "x$use_xmlto" = x"auto"; then 1823 AC_PATH_PROG([XMLTO], [xmlto]) 1824 if test "x$XMLTO" = "x"; then 1825 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826 have_xmlto=no 1827 else 1828 have_xmlto=yes 1829 fi 1830elif test "x$use_xmlto" = x"yes" ; then 1831 AC_PATH_PROG([XMLTO], [xmlto]) 1832 if test "x$XMLTO" = "x"; then 1833 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834 fi 1835 have_xmlto=yes 1836elif test "x$use_xmlto" = x"no" ; then 1837 if test "x$XMLTO" != "x"; then 1838 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839 fi 1840 have_xmlto=no 1841else 1842 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1843fi 1844 1845# Test for a minimum version of xmlto, if provided. 1846m4_ifval([$1], 1847[if test "$have_xmlto" = yes; then 1848 # scrape the xmlto version 1849 AC_MSG_CHECKING([the xmlto version]) 1850 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851 AC_MSG_RESULT([$xmlto_version]) 1852 AS_VERSION_COMPARE([$xmlto_version], [$1], 1853 [if test "x$use_xmlto" = xauto; then 1854 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855 have_xmlto=no 1856 else 1857 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858 fi]) 1859fi]) 1860 1861# Test for the ability of xmlto to generate a text target 1862# 1863# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864# following test for empty XML docbook files. 1865# For compatibility reasons use the following empty XML docbook file and if 1866# it fails try it again with a non-empty XML file. 1867have_xmlto_text=no 1868cat > conftest.xml << "EOF" 1869EOF 1870AS_IF([test "$have_xmlto" = yes], 1871 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872 [have_xmlto_text=yes], 1873 [# Try it again with a non-empty XML file. 1874 cat > conftest.xml << "EOF" 1875<x></x> 1876EOF 1877 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878 [have_xmlto_text=yes], 1879 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880rm -f conftest.xml 1881AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883]) # XORG_WITH_XMLTO 1884 1885# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886# -------------------------------------------- 1887# Minimum version: 1.12.0 1888# Minimum version for optional DEFAULT argument: 1.12.0 1889# 1890# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891# XML-based language used for the transformation of XML documents. 1892# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894# The XSLT processor is often used as a standalone tool for transformations. 1895# It should not be assumed that this tool is used only to work with documnetation. 1896# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897# 1898# Interface to module: 1899# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900# XSLTPROC: returns the path of the xsltproc program found 1901# returns the path set by the user in the environment 1902# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903# 'no' user instructs the module not to use xsltproc 1904# have_xsltproc: returns yes if xsltproc found in PATH or no 1905# 1906# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907# 1908AC_DEFUN([XORG_WITH_XSLTPROC],[ 1909AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910# Preserves the interface, should it be implemented later 1911m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912m4_define([_defopt], m4_default([$2], [auto])) 1913AC_ARG_WITH(xsltproc, 1914 AS_HELP_STRING([--with-xsltproc], 1915 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917m4_undefine([_defopt]) 1918 1919if test "x$use_xsltproc" = x"auto"; then 1920 AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921 if test "x$XSLTPROC" = "x"; then 1922 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923 have_xsltproc=no 1924 else 1925 have_xsltproc=yes 1926 fi 1927elif test "x$use_xsltproc" = x"yes" ; then 1928 AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929 if test "x$XSLTPROC" = "x"; then 1930 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931 fi 1932 have_xsltproc=yes 1933elif test "x$use_xsltproc" = x"no" ; then 1934 if test "x$XSLTPROC" != "x"; then 1935 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936 fi 1937 have_xsltproc=no 1938else 1939 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1940fi 1941 1942AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943]) # XORG_WITH_XSLTPROC 1944 1945# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946# ---------------------------------------- 1947# Minimum version: 1.15.0 1948# 1949# PERL (Practical Extraction and Report Language) is a language optimized for 1950# scanning arbitrary text files, extracting information from those text files, 1951# and printing reports based on that information. 1952# 1953# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954# 1955# Interface to module: 1956# HAVE_PERL: used in makefiles to conditionally scan text files 1957# PERL: returns the path of the perl program found 1958# returns the path set by the user in the environment 1959# --with-perl: 'yes' user instructs the module to use perl 1960# 'no' user instructs the module not to use perl 1961# have_perl: returns yes if perl found in PATH or no 1962# 1963# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964# 1965AC_DEFUN([XORG_WITH_PERL],[ 1966AC_ARG_VAR([PERL], [Path to perl command]) 1967# Preserves the interface, should it be implemented later 1968m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969m4_define([_defopt], m4_default([$2], [auto])) 1970AC_ARG_WITH(perl, 1971 AS_HELP_STRING([--with-perl], 1972 [Use perl for extracting information from files (default: ]_defopt[)]), 1973 [use_perl=$withval], [use_perl=]_defopt) 1974m4_undefine([_defopt]) 1975 1976if test "x$use_perl" = x"auto"; then 1977 AC_PATH_PROG([PERL], [perl]) 1978 if test "x$PERL" = "x"; then 1979 AC_MSG_WARN([perl not found - cannot extract information and report]) 1980 have_perl=no 1981 else 1982 have_perl=yes 1983 fi 1984elif test "x$use_perl" = x"yes" ; then 1985 AC_PATH_PROG([PERL], [perl]) 1986 if test "x$PERL" = "x"; then 1987 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988 fi 1989 have_perl=yes 1990elif test "x$use_perl" = x"no" ; then 1991 if test "x$PERL" != "x"; then 1992 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993 fi 1994 have_perl=no 1995else 1996 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1997fi 1998 1999AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000]) # XORG_WITH_PERL 2001 2002# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003# ---------------- 2004# Minimum version: 1.5.0 2005# Minimum version for optional DEFAULT argument: 1.11.0 2006# 2007# Documentation tools are not always available on all platforms and sometimes 2008# not at the appropriate level. This macro enables a module to test for the 2009# presence of the tool and obtain it's path in separate variables. Coupled with 2010# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012# --with-asciidoc assumes 'auto'. 2013# 2014# Interface to module: 2015# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016# ASCIIDOC: returns the path of the asciidoc program found 2017# returns the path set by the user in the environment 2018# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019# 'no' user instructs the module not to use asciidoc 2020# 2021# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022# 2023AC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025m4_define([_defopt], m4_default([$2], [auto])) 2026AC_ARG_WITH(asciidoc, 2027 AS_HELP_STRING([--with-asciidoc], 2028 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030m4_undefine([_defopt]) 2031 2032if test "x$use_asciidoc" = x"auto"; then 2033 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034 if test "x$ASCIIDOC" = "x"; then 2035 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036 have_asciidoc=no 2037 else 2038 have_asciidoc=yes 2039 fi 2040elif test "x$use_asciidoc" = x"yes" ; then 2041 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042 if test "x$ASCIIDOC" = "x"; then 2043 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044 fi 2045 have_asciidoc=yes 2046elif test "x$use_asciidoc" = x"no" ; then 2047 if test "x$ASCIIDOC" != "x"; then 2048 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049 fi 2050 have_asciidoc=no 2051else 2052 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053fi 2054m4_ifval([$1], 2055[if test "$have_asciidoc" = yes; then 2056 # scrape the asciidoc version 2057 AC_MSG_CHECKING([the asciidoc version]) 2058 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059 AC_MSG_RESULT([$asciidoc_version]) 2060 AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061 [if test "x$use_asciidoc" = xauto; then 2062 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063 have_asciidoc=no 2064 else 2065 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066 fi]) 2067fi]) 2068AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069]) # XORG_WITH_ASCIIDOC 2070 2071# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072# ------------------------------------------- 2073# Minimum version: 1.5.0 2074# Minimum version for optional DEFAULT argument: 1.11.0 2075# Minimum version for optional DOT checking: 1.18.0 2076# 2077# Documentation tools are not always available on all platforms and sometimes 2078# not at the appropriate level. This macro enables a module to test for the 2079# presence of the tool and obtain it's path in separate variables. Coupled with 2080# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082# --with-doxygen assumes 'auto'. 2083# 2084# Interface to module: 2085# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086# DOXYGEN: returns the path of the doxygen program found 2087# returns the path set by the user in the environment 2088# --with-doxygen: 'yes' user instructs the module to use doxygen 2089# 'no' user instructs the module not to use doxygen 2090# 2091# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092# 2093AC_DEFUN([XORG_WITH_DOXYGEN],[ 2094AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096m4_define([_defopt], m4_default([$2], [auto])) 2097AC_ARG_WITH(doxygen, 2098 AS_HELP_STRING([--with-doxygen], 2099 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100 [use_doxygen=$withval], [use_doxygen=]_defopt) 2101m4_undefine([_defopt]) 2102 2103if test "x$use_doxygen" = x"auto"; then 2104 AC_PATH_PROG([DOXYGEN], [doxygen]) 2105 if test "x$DOXYGEN" = "x"; then 2106 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107 have_doxygen=no 2108 else 2109 have_doxygen=yes 2110 fi 2111elif test "x$use_doxygen" = x"yes" ; then 2112 AC_PATH_PROG([DOXYGEN], [doxygen]) 2113 if test "x$DOXYGEN" = "x"; then 2114 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115 fi 2116 have_doxygen=yes 2117elif test "x$use_doxygen" = x"no" ; then 2118 if test "x$DOXYGEN" != "x"; then 2119 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120 fi 2121 have_doxygen=no 2122else 2123 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124fi 2125m4_ifval([$1], 2126[if test "$have_doxygen" = yes; then 2127 # scrape the doxygen version 2128 AC_MSG_CHECKING([the doxygen version]) 2129 doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130 AC_MSG_RESULT([$doxygen_version]) 2131 AS_VERSION_COMPARE([$doxygen_version], [$1], 2132 [if test "x$use_doxygen" = xauto; then 2133 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134 have_doxygen=no 2135 else 2136 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137 fi]) 2138fi]) 2139 2140dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142dnl HAVE_DOT = @HAVE_DOT@ 2143HAVE_DOT=no 2144if test "x$have_doxygen" = "xyes"; then 2145 AC_PATH_PROG([DOT], [dot]) 2146 if test "x$DOT" != "x"; then 2147 HAVE_DOT=yes 2148 fi 2149fi 2150 2151AC_SUBST([HAVE_DOT]) 2152AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154]) # XORG_WITH_DOXYGEN 2155 2156# XORG_WITH_GROFF([DEFAULT]) 2157# ---------------- 2158# Minimum version: 1.6.0 2159# Minimum version for optional DEFAULT argument: 1.11.0 2160# 2161# Documentation tools are not always available on all platforms and sometimes 2162# not at the appropriate level. This macro enables a module to test for the 2163# presence of the tool and obtain it's path in separate variables. Coupled with 2164# the --with-groff option, it allows maximum flexibilty in making decisions 2165# as whether or not to use the groff package. When DEFAULT is not specified, 2166# --with-groff assumes 'auto'. 2167# 2168# Interface to module: 2169# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171# HAVE_GROFF_MS: the -ms macros package 2172# GROFF: returns the path of the groff program found 2173# returns the path set by the user in the environment 2174# --with-groff: 'yes' user instructs the module to use groff 2175# 'no' user instructs the module not to use groff 2176# 2177# Added in version 1.9.0: 2178# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180# psselect from the psutils package. 2181# the ghostcript package. Refer to the grohtml man pages 2182# 2183# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184# 2185# OS and distros often splits groff in a basic and full package, the former 2186# having the groff program and the later having devices, fonts and macros 2187# Checking for the groff executable is not enough. 2188# 2189# If macros are missing, we cannot assume that groff is useless, so we don't 2190# unset HAVE_GROFF or GROFF env variables. 2191# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192# 2193AC_DEFUN([XORG_WITH_GROFF],[ 2194AC_ARG_VAR([GROFF], [Path to groff command]) 2195m4_define([_defopt], m4_default([$1], [auto])) 2196AC_ARG_WITH(groff, 2197 AS_HELP_STRING([--with-groff], 2198 [Use groff to regenerate documentation (default: ]_defopt[)]), 2199 [use_groff=$withval], [use_groff=]_defopt) 2200m4_undefine([_defopt]) 2201 2202if test "x$use_groff" = x"auto"; then 2203 AC_PATH_PROG([GROFF], [groff]) 2204 if test "x$GROFF" = "x"; then 2205 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206 have_groff=no 2207 else 2208 have_groff=yes 2209 fi 2210elif test "x$use_groff" = x"yes" ; then 2211 AC_PATH_PROG([GROFF], [groff]) 2212 if test "x$GROFF" = "x"; then 2213 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214 fi 2215 have_groff=yes 2216elif test "x$use_groff" = x"no" ; then 2217 if test "x$GROFF" != "x"; then 2218 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219 fi 2220 have_groff=no 2221else 2222 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223fi 2224 2225# We have groff, test for the presence of the macro packages 2226if test "x$have_groff" = x"yes"; then 2227 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229 groff_ms_works=yes 2230 else 2231 groff_ms_works=no 2232 fi 2233 AC_MSG_RESULT([$groff_ms_works]) 2234 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236 groff_mm_works=yes 2237 else 2238 groff_mm_works=no 2239 fi 2240 AC_MSG_RESULT([$groff_mm_works]) 2241fi 2242 2243# We have groff, test for HTML dependencies, one command per package 2244if test "x$have_groff" = x"yes"; then 2245 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249 have_groff_html=yes 2250 else 2251 have_groff_html=no 2252 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253 fi 2254fi 2255 2256# Set Automake conditionals for Makefiles 2257AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261]) # XORG_WITH_GROFF 2262 2263# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264# --------------------------------------- 2265# Minimum version: 1.6.0 2266# Minimum version for optional DEFAULT argument: 1.11.0 2267# Minimum version for optional MIN-VERSION argument: 1.15.0 2268# 2269# Documentation tools are not always available on all platforms and sometimes 2270# not at the appropriate level. This macro enables a module to test for the 2271# presence of the tool and obtain it's path in separate variables. Coupled with 2272# the --with-fop option, it allows maximum flexibilty in making decisions 2273# as whether or not to use the fop package. When DEFAULT is not specified, 2274# --with-fop assumes 'auto'. 2275# 2276# Interface to module: 2277# HAVE_FOP: used in makefiles to conditionally generate documentation 2278# FOP: returns the path of the fop program found 2279# returns the path set by the user in the environment 2280# --with-fop: 'yes' user instructs the module to use fop 2281# 'no' user instructs the module not to use fop 2282# 2283# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284# 2285AC_DEFUN([XORG_WITH_FOP],[ 2286AC_ARG_VAR([FOP], [Path to fop command]) 2287m4_define([_defopt], m4_default([$2], [auto])) 2288AC_ARG_WITH(fop, 2289 AS_HELP_STRING([--with-fop], 2290 [Use fop to regenerate documentation (default: ]_defopt[)]), 2291 [use_fop=$withval], [use_fop=]_defopt) 2292m4_undefine([_defopt]) 2293 2294if test "x$use_fop" = x"auto"; then 2295 AC_PATH_PROG([FOP], [fop]) 2296 if test "x$FOP" = "x"; then 2297 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298 have_fop=no 2299 else 2300 have_fop=yes 2301 fi 2302elif test "x$use_fop" = x"yes" ; then 2303 AC_PATH_PROG([FOP], [fop]) 2304 if test "x$FOP" = "x"; then 2305 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306 fi 2307 have_fop=yes 2308elif test "x$use_fop" = x"no" ; then 2309 if test "x$FOP" != "x"; then 2310 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311 fi 2312 have_fop=no 2313else 2314 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315fi 2316 2317# Test for a minimum version of fop, if provided. 2318m4_ifval([$1], 2319[if test "$have_fop" = yes; then 2320 # scrape the fop version 2321 AC_MSG_CHECKING([for fop minimum version]) 2322 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323 AC_MSG_RESULT([$fop_version]) 2324 AS_VERSION_COMPARE([$fop_version], [$1], 2325 [if test "x$use_fop" = xauto; then 2326 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327 have_fop=no 2328 else 2329 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330 fi]) 2331fi]) 2332AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333]) # XORG_WITH_FOP 2334 2335# XORG_WITH_M4([MIN-VERSION]) 2336# --------------------------- 2337# Minimum version: 1.19.0 2338# 2339# This macro attempts to locate an m4 macro processor which supports 2340# -I option and is only useful for modules relying on M4 in order to 2341# expand macros in source code files. 2342# 2343# Interface to module: 2344# M4: returns the path of the m4 program found 2345# returns the path set by the user in the environment 2346# 2347AC_DEFUN([XORG_WITH_M4], [ 2348AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352 [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353 [$PATH:/usr/gnu/bin])]) 2354 2355AC_SUBST([M4], [$ac_cv_path_M4]) 2356]) # XORG_WITH_M4 2357 2358# XORG_WITH_PS2PDF([DEFAULT]) 2359# ---------------- 2360# Minimum version: 1.6.0 2361# Minimum version for optional DEFAULT argument: 1.11.0 2362# 2363# Documentation tools are not always available on all platforms and sometimes 2364# not at the appropriate level. This macro enables a module to test for the 2365# presence of the tool and obtain it's path in separate variables. Coupled with 2366# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368# --with-ps2pdf assumes 'auto'. 2369# 2370# Interface to module: 2371# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372# PS2PDF: returns the path of the ps2pdf program found 2373# returns the path set by the user in the environment 2374# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375# 'no' user instructs the module not to use ps2pdf 2376# 2377# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378# 2379AC_DEFUN([XORG_WITH_PS2PDF],[ 2380AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381m4_define([_defopt], m4_default([$1], [auto])) 2382AC_ARG_WITH(ps2pdf, 2383 AS_HELP_STRING([--with-ps2pdf], 2384 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386m4_undefine([_defopt]) 2387 2388if test "x$use_ps2pdf" = x"auto"; then 2389 AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390 if test "x$PS2PDF" = "x"; then 2391 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392 have_ps2pdf=no 2393 else 2394 have_ps2pdf=yes 2395 fi 2396elif test "x$use_ps2pdf" = x"yes" ; then 2397 AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398 if test "x$PS2PDF" = "x"; then 2399 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400 fi 2401 have_ps2pdf=yes 2402elif test "x$use_ps2pdf" = x"no" ; then 2403 if test "x$PS2PDF" != "x"; then 2404 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405 fi 2406 have_ps2pdf=no 2407else 2408 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409fi 2410AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411]) # XORG_WITH_PS2PDF 2412 2413# XORG_ENABLE_DOCS (enable_docs=yes) 2414# ---------------- 2415# Minimum version: 1.6.0 2416# 2417# Documentation tools are not always available on all platforms and sometimes 2418# not at the appropriate level. This macro enables a builder to skip all 2419# documentation targets except traditional man pages. 2420# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421# maximum flexibilty in controlling documentation building. 2422# Refer to: 2423# XORG_WITH_XMLTO --with-xmlto 2424# XORG_WITH_ASCIIDOC --with-asciidoc 2425# XORG_WITH_DOXYGEN --with-doxygen 2426# XORG_WITH_FOP --with-fop 2427# XORG_WITH_GROFF --with-groff 2428# XORG_WITH_PS2PDF --with-ps2pdf 2429# 2430# Interface to module: 2431# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432# --enable-docs: 'yes' user instructs the module to generate docs 2433# 'no' user instructs the module not to generate docs 2434# parm1: specify the default value, yes or no. 2435# 2436AC_DEFUN([XORG_ENABLE_DOCS],[ 2437m4_define([docs_default], m4_default([$1], [yes])) 2438AC_ARG_ENABLE(docs, 2439 AS_HELP_STRING([--enable-docs], 2440 [Enable building the documentation (default: ]docs_default[)]), 2441 [build_docs=$enableval], [build_docs=]docs_default) 2442m4_undefine([docs_default]) 2443AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444AC_MSG_CHECKING([whether to build documentation]) 2445AC_MSG_RESULT([$build_docs]) 2446]) # XORG_ENABLE_DOCS 2447 2448# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449# ---------------- 2450# Minimum version: 1.6.0 2451# 2452# This macro enables a builder to skip all developer documentation. 2453# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454# maximum flexibilty in controlling documentation building. 2455# Refer to: 2456# XORG_WITH_XMLTO --with-xmlto 2457# XORG_WITH_ASCIIDOC --with-asciidoc 2458# XORG_WITH_DOXYGEN --with-doxygen 2459# XORG_WITH_FOP --with-fop 2460# XORG_WITH_GROFF --with-groff 2461# XORG_WITH_PS2PDF --with-ps2pdf 2462# 2463# Interface to module: 2464# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466# 'no' user instructs the module not to generate developer docs 2467# parm1: specify the default value, yes or no. 2468# 2469AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470m4_define([devel_default], m4_default([$1], [yes])) 2471AC_ARG_ENABLE(devel-docs, 2472 AS_HELP_STRING([--enable-devel-docs], 2473 [Enable building the developer documentation (default: ]devel_default[)]), 2474 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475m4_undefine([devel_default]) 2476AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477AC_MSG_CHECKING([whether to build developer documentation]) 2478AC_MSG_RESULT([$build_devel_docs]) 2479]) # XORG_ENABLE_DEVEL_DOCS 2480 2481# XORG_ENABLE_SPECS (enable_specs=yes) 2482# ---------------- 2483# Minimum version: 1.6.0 2484# 2485# This macro enables a builder to skip all functional specification targets. 2486# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487# maximum flexibilty in controlling documentation building. 2488# Refer to: 2489# XORG_WITH_XMLTO --with-xmlto 2490# XORG_WITH_ASCIIDOC --with-asciidoc 2491# XORG_WITH_DOXYGEN --with-doxygen 2492# XORG_WITH_FOP --with-fop 2493# XORG_WITH_GROFF --with-groff 2494# XORG_WITH_PS2PDF --with-ps2pdf 2495# 2496# Interface to module: 2497# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498# --enable-specs: 'yes' user instructs the module to generate specs 2499# 'no' user instructs the module not to generate specs 2500# parm1: specify the default value, yes or no. 2501# 2502AC_DEFUN([XORG_ENABLE_SPECS],[ 2503m4_define([spec_default], m4_default([$1], [yes])) 2504AC_ARG_ENABLE(specs, 2505 AS_HELP_STRING([--enable-specs], 2506 [Enable building the specs (default: ]spec_default[)]), 2507 [build_specs=$enableval], [build_specs=]spec_default) 2508m4_undefine([spec_default]) 2509AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510AC_MSG_CHECKING([whether to build functional specifications]) 2511AC_MSG_RESULT([$build_specs]) 2512]) # XORG_ENABLE_SPECS 2513 2514# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515# ---------------------------------------------- 2516# Minimum version: 1.13.0 2517# 2518# This macro enables a builder to enable/disable unit testing 2519# It makes no assumption about the test cases implementation 2520# Test cases may or may not use Automake "Support for test suites" 2521# They may or may not use the software utility library GLib 2522# 2523# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525# The variable enable_unit_tests is used by other macros in this file. 2526# 2527# Interface to module: 2528# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529# enable_unit_tests: used in configure.ac for additional configuration 2530# --enable-unit-tests: 'yes' user instructs the module to build tests 2531# 'no' user instructs the module not to build tests 2532# parm1: specify the default value, yes or no. 2533# 2534AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535AC_BEFORE([$0], [XORG_WITH_GLIB]) 2536AC_BEFORE([$0], [XORG_LD_WRAP]) 2537AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538m4_define([_defopt], m4_default([$1], [auto])) 2539AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540 [Enable building unit test cases (default: ]_defopt[)]), 2541 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542m4_undefine([_defopt]) 2543AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544AC_MSG_CHECKING([whether to build unit test cases]) 2545AC_MSG_RESULT([$enable_unit_tests]) 2546]) # XORG_ENABLE_UNIT_TESTS 2547 2548# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549# ------------------------------------------------------ 2550# Minimum version: 1.17.0 2551# 2552# This macro enables a builder to enable/disable integration testing 2553# It makes no assumption about the test cases' implementation 2554# Test cases may or may not use Automake "Support for test suites" 2555# 2556# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557# usually requires less dependencies and may be built and run under less 2558# stringent environments than integration tests. 2559# 2560# Interface to module: 2561# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562# enable_integration_tests: used in configure.ac for additional configuration 2563# --enable-integration-tests: 'yes' user instructs the module to build tests 2564# 'no' user instructs the module not to build tests 2565# parm1: specify the default value, yes or no. 2566# 2567AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569m4_define([_defopt], m4_default([$1], [auto])) 2570AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571 [Enable building integration test cases (default: ]_defopt[)]), 2572 [enable_integration_tests=$enableval], 2573 [enable_integration_tests=]_defopt) 2574m4_undefine([_defopt]) 2575AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576 [test "x$enable_integration_tests" != xno]) 2577AC_MSG_CHECKING([whether to build unit test cases]) 2578AC_MSG_RESULT([$enable_integration_tests]) 2579]) # XORG_ENABLE_INTEGRATION_TESTS 2580 2581# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582# ---------------------------------------- 2583# Minimum version: 1.13.0 2584# 2585# GLib is a library which provides advanced data structures and functions. 2586# This macro enables a module to test for the presence of Glib. 2587# 2588# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589# Otherwise the value of $enable_unit_tests is blank. 2590# 2591# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592# test support usually requires less dependencies and may be built and run under 2593# less stringent environments than integration tests. 2594# 2595# Interface to module: 2596# HAVE_GLIB: used in makefiles to conditionally build targets 2597# with_glib: used in configure.ac to know if GLib has been found 2598# --with-glib: 'yes' user instructs the module to use glib 2599# 'no' user instructs the module not to use glib 2600# 2601AC_DEFUN([XORG_WITH_GLIB],[ 2602AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603m4_define([_defopt], m4_default([$2], [auto])) 2604AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605 [Use GLib library for unit testing (default: ]_defopt[)]), 2606 [with_glib=$withval], [with_glib=]_defopt) 2607m4_undefine([_defopt]) 2608 2609have_glib=no 2610# Do not probe GLib if user explicitly disabled unit testing 2611if test "x$enable_unit_tests" != x"no"; then 2612 # Do not probe GLib if user explicitly disabled it 2613 if test "x$with_glib" != x"no"; then 2614 m4_ifval( 2615 [$1], 2616 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618 ) 2619 fi 2620fi 2621 2622# Not having GLib when unit testing has been explicitly requested is an error 2623if test "x$enable_unit_tests" = x"yes"; then 2624 if test "x$have_glib" = x"no"; then 2625 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626 fi 2627fi 2628 2629# Having unit testing disabled when GLib has been explicitly requested is an error 2630if test "x$enable_unit_tests" = x"no"; then 2631 if test "x$with_glib" = x"yes"; then 2632 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2633 fi 2634fi 2635 2636# Not having GLib when it has been explicitly requested is an error 2637if test "x$with_glib" = x"yes"; then 2638 if test "x$have_glib" = x"no"; then 2639 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640 fi 2641fi 2642 2643AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644]) # XORG_WITH_GLIB 2645 2646# XORG_LD_WRAP([required|optional]) 2647# --------------------------------- 2648# Minimum version: 1.13.0 2649# 2650# Check if linker supports -wrap, passed via compiler flags 2651# 2652# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653# Otherwise the value of $enable_unit_tests is blank. 2654# 2655# Argument added in 1.16.0 - default is "required", to match existing behavior 2656# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657# available, an argument of "optional" allows use when some unit tests require 2658# ld -wrap and others do not. 2659# 2660AC_DEFUN([XORG_LD_WRAP],[ 2661XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662 [AC_LANG_PROGRAM([#include <stdlib.h> 2663 void __wrap_exit(int status) { return; }], 2664 [exit(0);])]) 2665# Not having ld wrap when unit testing has been explicitly requested is an error 2666if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667 if test "x$have_ld_wrap" = x"no"; then 2668 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669 fi 2670fi 2671AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672# 2673]) # XORG_LD_WRAP 2674 2675# XORG_CHECK_LINKER_FLAGS 2676# ----------------------- 2677# SYNOPSIS 2678# 2679# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680# 2681# DESCRIPTION 2682# 2683# Check whether the given linker FLAGS work with the current language's 2684# linker, or whether they give an error. 2685# 2686# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687# success/failure. 2688# 2689# PROGRAM-SOURCE is the program source to link with, if needed 2690# 2691# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692# 2693# LICENSE 2694# 2695# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697# Copyright (c) 2009 Matteo Frigo 2698# 2699# This program is free software: you can redistribute it and/or modify it 2700# under the terms of the GNU General Public License as published by the 2701# Free Software Foundation, either version 3 of the License, or (at your 2702# option) any later version. 2703# 2704# This program is distributed in the hope that it will be useful, but 2705# WITHOUT ANY WARRANTY; without even the implied warranty of 2706# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707# Public License for more details. 2708# 2709# You should have received a copy of the GNU General Public License along 2710# with this program. If not, see <http://www.gnu.org/licenses/>. 2711# 2712# As a special exception, the respective Autoconf Macro's copyright owner 2713# gives unlimited permission to copy, distribute and modify the configure 2714# scripts that are the output of Autoconf when processing the Macro. You 2715# need not follow the terms of the GNU General Public License when using 2716# or distributing such scripts, even though portions of the text of the 2717# Macro appear in them. The GNU General Public License (GPL) does govern 2718# all other use of the material that constitutes the Autoconf Macro. 2719# 2720# This special exception to the GPL applies to versions of the Autoconf 2721# Macro released by the Autoconf Archive. When you make and distribute a 2722# modified version of the Autoconf Macro, you may extend this special 2723# exception to the GPL to apply to your modified version as well.# 2724AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725[AC_MSG_CHECKING([whether the linker accepts $1]) 2726dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727AS_LITERAL_IF([$1], 2728 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729 ax_save_FLAGS=$LDFLAGS 2730 LDFLAGS="$1" 2731 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734 LDFLAGS=$ax_save_FLAGS])], 2735 [ax_save_FLAGS=$LDFLAGS 2736 LDFLAGS="$1" 2737 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740 LDFLAGS=$ax_save_FLAGS]) 2741eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742AC_MSG_RESULT($xorg_check_linker_flags) 2743if test "x$xorg_check_linker_flags" = xyes; then 2744 m4_default([$2], :) 2745else 2746 m4_default([$3], :) 2747fi 2748]) # XORG_CHECK_LINKER_FLAGS 2749 2750# XORG_MEMORY_CHECK_FLAGS 2751# ----------------------- 2752# Minimum version: 1.16.0 2753# 2754# This macro attempts to find appropriate memory checking functionality 2755# for various platforms which unit testing code may use to catch various 2756# forms of memory allocation and access errors in testing. 2757# 2758# Interface to module: 2759# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761# 2762# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763# 2764AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2765 2766AC_REQUIRE([AC_CANONICAL_HOST]) 2767AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768 [Environment variables to enable memory checking in tests]) 2769 2770# Check for different types of support on different platforms 2771case $host_os in 2772 solaris*) 2773 AC_CHECK_LIB([umem], [umem_alloc], 2774 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775 ;; 2776 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777 # both directly and inverted, so should not be 0 or 255. 2778 malloc_debug_env='MALLOC_PERTURB_=15' 2779 ;; 2780 darwin*) 2781 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782 ;; 2783 *bsd*) 2784 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785 ;; 2786esac 2787 2788# User supplied flags override default flags 2789if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2791fi 2792 2793AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794]) # XORG_WITH_LINT 2795 2796# XORG_CHECK_MALLOC_ZERO 2797# ---------------------- 2798# Minimum version: 1.0.0 2799# 2800# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801# malloc(0) returns NULL. Packages should add one of these cflags to 2802# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804AC_ARG_ENABLE(malloc0returnsnull, 2805 AS_HELP_STRING([--enable-malloc0returnsnull], 2806 [malloc(0) returns NULL (default: auto)]), 2807 [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808 [MALLOC_ZERO_RETURNS_NULL=auto]) 2809 2810AC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814#include <stdlib.h> 2815],[ 2816 char *m0, *r0, *c0, *p; 2817 m0 = malloc(0); 2818 p = malloc(10); 2819 r0 = realloc(p,0); 2820 c0 = calloc(0,10); 2821 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822])], 2823 [xorg_cv_malloc0_returns_null=yes], 2824 [xorg_cv_malloc0_returns_null=no])]) 2825MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826fi 2827AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2828 2829if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2833else 2834 MALLOC_ZERO_CFLAGS="" 2835 XMALLOC_ZERO_CFLAGS="" 2836 XTMALLOC_ZERO_CFLAGS="" 2837fi 2838 2839AC_SUBST([MALLOC_ZERO_CFLAGS]) 2840AC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842]) # XORG_CHECK_MALLOC_ZERO 2843 2844# XORG_WITH_LINT() 2845# ---------------- 2846# Minimum version: 1.1.0 2847# 2848# This macro enables the use of a tool that flags some suspicious and 2849# non-portable constructs (likely to be bugs) in C language source code. 2850# It will attempt to locate the tool and use appropriate options. 2851# There are various lint type tools on different platforms. 2852# 2853# Interface to module: 2854# LINT: returns the path to the tool found on the platform 2855# or the value set to LINT on the configure cmd line 2856# also an Automake conditional 2857# LINT_FLAGS: an Automake variable with appropriate flags 2858# 2859# --with-lint: 'yes' user instructs the module to use lint 2860# 'no' user instructs the module not to use lint (default) 2861# 2862# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864# 2865AC_DEFUN([XORG_WITH_LINT],[ 2866 2867AC_ARG_VAR([LINT], [Path to a lint-style command]) 2868AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870 [Use a lint-style source code checker (default: disabled)])], 2871 [use_lint=$withval], [use_lint=no]) 2872 2873# Obtain platform specific info like program name and options 2874# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875case $host_os in 2876 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877 lint_name=splint 2878 lint_options="-badflag" 2879 ;; 2880 *freebsd* | *netbsd*) 2881 lint_name=lint 2882 lint_options="-u -b" 2883 ;; 2884 *solaris*) 2885 lint_name=lint 2886 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887 ;; 2888esac 2889 2890# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891if test "x$use_lint" = x"yes" ; then 2892 AC_PATH_PROG([LINT], [$lint_name]) 2893 if test "x$LINT" = "x"; then 2894 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895 fi 2896elif test "x$use_lint" = x"no" ; then 2897 if test "x$LINT" != "x"; then 2898 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899 fi 2900else 2901 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2902fi 2903 2904# User supplied flags override default flags 2905if test "x$LINT_FLAGS" != "x"; then 2906 lint_options=$LINT_FLAGS 2907fi 2908 2909AC_SUBST([LINT_FLAGS],[$lint_options]) 2910AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911 2912]) # XORG_WITH_LINT 2913 2914# XORG_LINT_LIBRARY(LIBNAME) 2915# -------------------------- 2916# Minimum version: 1.1.0 2917# 2918# Sets up flags for building lint libraries for checking programs that call 2919# functions in the library. 2920# 2921# Interface to module: 2922# LINTLIB - Automake variable with the name of lint library file to make 2923# MAKE_LINT_LIB - Automake conditional 2924# 2925# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926# - 'no' user instructs the module not to create a lint library (default) 2927 2928AC_DEFUN([XORG_LINT_LIBRARY],[ 2929AC_REQUIRE([XORG_WITH_LINT]) 2930AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931 [Create lint library (default: disabled)])], 2932 [make_lint_lib=$enableval], [make_lint_lib=no]) 2933 2934if test "x$make_lint_lib" = x"yes" ; then 2935 LINTLIB=llib-l$1.ln 2936 if test "x$LINT" = "x"; then 2937 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938 fi 2939elif test "x$make_lint_lib" != x"no" ; then 2940 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2941fi 2942 2943AC_SUBST(LINTLIB) 2944AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2945 2946]) # XORG_LINT_LIBRARY 2947 2948# XORG_COMPILER_BRAND 2949# ------------------- 2950# Minimum version: 1.14.0 2951# 2952# Checks for various brands of compilers and sets flags as appropriate: 2953# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955# clang compiler - sets CLANGCC to "yes" 2956# Intel compiler - sets INTELCC to "yes" 2957# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958# 2959AC_DEFUN([XORG_COMPILER_BRAND], [ 2960AC_LANG_CASE( 2961 [C], [ 2962 AC_REQUIRE([AC_PROG_CC_C99]) 2963 ], 2964 [C++], [ 2965 AC_REQUIRE([AC_PROG_CXX]) 2966 ] 2967) 2968AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971]) # XORG_COMPILER_BRAND 2972 2973# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974# --------------- 2975# Minimum version: 1.16.0 2976# 2977# Test if the compiler works when passed the given flag as a command line argument. 2978# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979# next flag in the list until there are no more options. 2980# 2981# Note that this does not guarantee that the compiler supports the flag as some 2982# compilers will simply ignore arguments that they do not understand, but we do 2983# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984# -Werror=unused-command-line-argument 2985# 2986AC_DEFUN([XORG_TESTSET_CFLAG], [ 2987m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2989 2990AC_LANG_COMPILER_REQUIRE 2991 2992AC_LANG_CASE( 2993 [C], [ 2994 AC_REQUIRE([AC_PROG_CC_C99]) 2995 define([PREFIX], [C]) 2996 define([CACHE_PREFIX], [cc]) 2997 define([COMPILER], [$CC]) 2998 ], 2999 [C++], [ 3000 define([PREFIX], [CXX]) 3001 define([CACHE_PREFIX], [cxx]) 3002 define([COMPILER], [$CXX]) 3003 ] 3004) 3005 3006[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3007 3008if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017fi 3018 3019if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022 fi 3023 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031fi 3032 3033found="no" 3034m4_foreach([flag], m4_cdr($@), [ 3035 if test $found = "no" ; then 3036 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038 fi 3039 3040 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042 fi 3043 3044 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3045 3046dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049 AC_CACHE_VAL($cacheid, 3050 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051 [eval $cacheid=yes], 3052 [eval $cacheid=no])]) 3053 3054 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3055 3056 eval supported=\$$cacheid 3057 AC_MSG_RESULT([$supported]) 3058 if test "$supported" = "yes" ; then 3059 $1="$$1 ]flag[" 3060 found="yes" 3061 fi 3062 fi 3063]) 3064]) # XORG_TESTSET_CFLAG 3065 3066# XORG_COMPILER_FLAGS 3067# --------------- 3068# Minimum version: 1.16.0 3069# 3070# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071# arguments supported by the selected compiler which do NOT alter the generated 3072# code. These arguments will cause the compiler to print various warnings 3073# during compilation AND turn a conservative set of warnings into errors. 3074# 3075# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076# future versions of util-macros as options are added to new compilers. 3077# 3078AC_DEFUN([XORG_COMPILER_FLAGS], [ 3079AC_REQUIRE([XORG_COMPILER_BRAND]) 3080 3081AC_ARG_ENABLE(selective-werror, 3082 AS_HELP_STRING([--disable-selective-werror], 3083 [Turn off selective compiler errors. (default: enabled)]), 3084 [SELECTIVE_WERROR=$enableval], 3085 [SELECTIVE_WERROR=yes]) 3086 3087AC_LANG_CASE( 3088 [C], [ 3089 define([PREFIX], [C]) 3090 ], 3091 [C++], [ 3092 define([PREFIX], [CXX]) 3093 ] 3094) 3095# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096if test "x$SUNCC" = "xyes"; then 3097 [BASE_]PREFIX[FLAGS]="-v" 3098else 3099 [BASE_]PREFIX[FLAGS]="" 3100fi 3101 3102# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3107 3108AC_LANG_CASE( 3109 [C], [ 3110 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116 ] 3117) 3118 3119# This chunk adds additional warnings that could catch undesired effects. 3120XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3127 3128# These are currently disabled because they are noisy. They will be enabled 3129# in the future once the codebase is sufficiently modernized to silence 3130# them. For now, I don't want them to drown out the other warnings. 3131# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3134 3135# Turn some warnings into errors, so we don't accidently get successful builds 3136# when there are problems that should be fixed. 3137 3138if test "x$SELECTIVE_WERROR" = "xyes" ; then 3139XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3152else 3153AC_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]) 3154XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3167fi 3168 3169AC_SUBST([BASE_]PREFIX[FLAGS]) 3170]) # XORG_COMPILER_FLAGS 3171 3172# XORG_CWARNFLAGS 3173# --------------- 3174# Minimum version: 1.2.0 3175# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176# 3177# Defines CWARNFLAGS to enable C compiler warnings. 3178# 3179# This function is deprecated because it defines -fno-strict-aliasing 3180# which alters the code generated by the compiler. If -fno-strict-aliasing 3181# is needed, then it should be added explicitly in the module when 3182# it is updated to use BASE_CFLAGS. 3183# 3184AC_DEFUN([XORG_CWARNFLAGS], [ 3185AC_REQUIRE([XORG_COMPILER_FLAGS]) 3186AC_REQUIRE([XORG_COMPILER_BRAND]) 3187AC_LANG_CASE( 3188 [C], [ 3189 CWARNFLAGS="$BASE_CFLAGS" 3190 if test "x$GCC" = xyes ; then 3191 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192 fi 3193 AC_SUBST(CWARNFLAGS) 3194 ] 3195) 3196]) # XORG_CWARNFLAGS 3197 3198# XORG_STRICT_OPTION 3199# ----------------------- 3200# Minimum version: 1.3.0 3201# 3202# Add configure option to enable strict compilation flags, such as treating 3203# warnings as fatal errors. 3204# If --enable-strict-compilation is passed to configure, adds strict flags to 3205# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206# 3207# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208# when strict compilation is unconditionally desired. 3209AC_DEFUN([XORG_STRICT_OPTION], [ 3210AC_REQUIRE([XORG_CWARNFLAGS]) 3211AC_REQUIRE([XORG_COMPILER_FLAGS]) 3212 3213AC_ARG_ENABLE(strict-compilation, 3214 AS_HELP_STRING([--enable-strict-compilation], 3215 [Enable all warnings from compiler and make them errors (default: disabled)]), 3216 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3217 3218AC_LANG_CASE( 3219 [C], [ 3220 define([PREFIX], [C]) 3221 ], 3222 [C++], [ 3223 define([PREFIX], [CXX]) 3224 ] 3225) 3226 3227[STRICT_]PREFIX[FLAGS]="" 3228XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3230 3231# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232# activate it with -Werror, so we add it here explicitly. 3233XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3234 3235if test "x$STRICT_COMPILE" = "xyes"; then 3236 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3238fi 3239AC_SUBST([STRICT_]PREFIX[FLAGS]) 3240AC_SUBST([BASE_]PREFIX[FLAGS]) 3241AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242]) # XORG_STRICT_OPTION 3243 3244# XORG_DEFAULT_OPTIONS 3245# -------------------- 3246# Minimum version: 1.3.0 3247# 3248# Defines default options for X.Org modules. 3249# 3250AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251AC_REQUIRE([AC_PROG_INSTALL]) 3252XORG_COMPILER_FLAGS 3253XORG_CWARNFLAGS 3254XORG_STRICT_OPTION 3255XORG_RELEASE_VERSION 3256XORG_CHANGELOG 3257XORG_INSTALL 3258XORG_MANPAGE_SECTIONS 3259m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261]) # XORG_DEFAULT_OPTIONS 3262 3263# XORG_INSTALL() 3264# ---------------- 3265# Minimum version: 1.4.0 3266# 3267# Defines the variable INSTALL_CMD as the command to copy 3268# INSTALL from $prefix/share/util-macros. 3269# 3270AC_DEFUN([XORG_INSTALL], [ 3271AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276touch \$(top_srcdir)/INSTALL; \ 3277echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278AC_SUBST([INSTALL_CMD]) 3279]) # XORG_INSTALL 3280dnl Copyright 2005 Red Hat, Inc 3281dnl 3282dnl Permission to use, copy, modify, distribute, and sell this software and its 3283dnl documentation for any purpose is hereby granted without fee, provided that 3284dnl the above copyright notice appear in all copies and that both that 3285dnl copyright notice and this permission notice appear in supporting 3286dnl documentation. 3287dnl 3288dnl The above copyright notice and this permission notice shall be included 3289dnl in all copies or substantial portions of the Software. 3290dnl 3291dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297dnl OTHER DEALINGS IN THE SOFTWARE. 3298dnl 3299dnl Except as contained in this notice, the name of the copyright holders shall 3300dnl not be used in advertising or otherwise to promote the sale, use or 3301dnl other dealings in this Software without prior written authorization 3302dnl from the copyright holders. 3303dnl 3304 3305# XORG_RELEASE_VERSION 3306# -------------------- 3307# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3308 3309AC_DEFUN([XORG_RELEASE_VERSION],[ 3310 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312 [Major version of this package]) 3313 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314 if test "x$PVM" = "x"; then 3315 PVM="0" 3316 fi 3317 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318 [$PVM], 3319 [Minor version of this package]) 3320 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321 if test "x$PVP" = "x"; then 3322 PVP="0" 3323 fi 3324 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325 [$PVP], 3326 [Patch version of this package]) 3327]) 3328 3329# XORG_CHANGELOG() 3330# ---------------- 3331# Minimum version: 1.2.0 3332# 3333# Defines the variable CHANGELOG_CMD as the command to generate 3334# ChangeLog from git. 3335# 3336# 3337AC_DEFUN([XORG_CHANGELOG], [ 3338CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341touch \$(top_srcdir)/ChangeLog; \ 3342echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343AC_SUBST([CHANGELOG_CMD]) 3344]) # XORG_CHANGELOG 3345 3346dnl 3347dnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3348dnl 3349dnl Permission is hereby granted, free of charge, to any person obtaining a 3350dnl copy of this software and associated documentation files (the "Software"), 3351dnl to deal in the Software without restriction, including without limitation 3352dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 3353dnl and/or sell copies of the Software, and to permit persons to whom the 3354dnl Software is furnished to do so, subject to the following conditions: 3355dnl 3356dnl The above copyright notice and this permission notice (including the next 3357dnl paragraph) shall be included in all copies or substantial portions of the 3358dnl Software. 3359dnl 3360dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 3361dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 3362dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 3363dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 3364dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 3365dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 3366dnl DEALINGS IN THE SOFTWARE. 3367dnl 3368 3369# XTRANS_TCP_FLAGS() 3370# ------------------ 3371# Find needed libraries for TCP sockets, and check for IPv6 support 3372AC_DEFUN([XTRANS_TCP_FLAGS],[ 3373 # SVR4 hides these in libraries other than libc 3374 AC_SEARCH_LIBS(socket, [socket]) 3375 AC_SEARCH_LIBS(gethostbyname, [nsl]) 3376 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 3377 AC_CHECK_LIB([ws2_32],[main]) 3378 fi 3379 3380 # Needs to come after above checks for libsocket & libnsl for SVR4 systems 3381 AC_ARG_ENABLE(ipv6, 3382 AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 3383 [IPV6CONN=$enableval], 3384 [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 3385 AC_MSG_CHECKING([if IPv6 support should be built]) 3386 if test "$IPV6CONN" = "yes"; then 3387 AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 3388 fi 3389 AC_MSG_RESULT($IPV6CONN) 3390 3391 # 4.3BSD-Reno added a new member to struct sockaddr_in 3392 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 3393 AC_DEFINE([BSD44SOCKETS],1, 3394 [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 3395#include <sys/types.h> 3396#include <sys/socket.h> 3397#include <netinet/in.h> 3398 ]) 3399 3400 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 3401 AC_CHECK_TYPES([socklen_t], [], [], [ 3402AC_INCLUDES_DEFAULT 3403#include <sys/socket.h>]) 3404 3405 # XPG4v2/UNIX95 added msg_control - check to see if we need to define 3406 # _XOPEN_SOURCE to get it (such as on Solaris) 3407 AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], 3408 [ 3409AC_INCLUDES_DEFAULT 3410#include <sys/socket.h> 3411 ]) 3412 # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 3413 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 3414 unset ac_cv_member_struct_msghdr_msg_control 3415 AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) 3416 AC_CHECK_MEMBER([struct msghdr.msg_control], 3417 [AC_DEFINE([_XOPEN_SOURCE], [600], 3418 [Defined if needed to expose struct msghdr.msg_control]) 3419 ], [], [ 3420#define _XOPEN_SOURCE 600 3421AC_INCLUDES_DEFAULT 3422#include <sys/socket.h> 3423 ]) 3424 fi 3425 # If that didn't work, fall back to XPG5/UNIX98 with C89 3426 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 3427 unset ac_cv_member_struct_msghdr_msg_control 3428 AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) 3429 AC_CHECK_MEMBER([struct msghdr.msg_control], 3430 [AC_DEFINE([_XOPEN_SOURCE], [500], 3431 [Defined if needed to expose struct msghdr.msg_control]) 3432 ], [], [ 3433#define _XOPEN_SOURCE 500 3434AC_INCLUDES_DEFAULT 3435#include <sys/socket.h> 3436 ]) 3437 fi 3438 3439 3440]) # XTRANS_TCP_FLAGS 3441 3442# XTRANS_CONNECTION_FLAGS() 3443# ------------------------- 3444# Standard checks for which Xtrans transports to use by the Xorg packages 3445# that use Xtrans functions 3446AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 3447 AC_REQUIRE([AC_CANONICAL_HOST]) 3448 [case $host_os in 3449 mingw*) unixdef="no" ;; 3450 *) unixdef="yes" ;; 3451 esac] 3452 AC_ARG_ENABLE(unix-transport, 3453 AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 3454 [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 3455 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 3456 if test "$UNIXCONN" = "yes"; then 3457 AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 3458 fi 3459 AC_MSG_RESULT($UNIXCONN) 3460 AC_ARG_ENABLE(tcp-transport, 3461 AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 3462 [TCPCONN=$enableval], [TCPCONN=yes]) 3463 AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 3464 AC_MSG_RESULT($TCPCONN) 3465 if test "$TCPCONN" = "yes"; then 3466 AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 3467 XTRANS_TCP_FLAGS 3468 fi 3469 [case $host_os in 3470 solaris*) localdef="yes" ;; 3471 *) localdef="no" ;; 3472 esac] 3473 AC_ARG_ENABLE(local-transport, 3474 AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 3475 [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 3476 AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 3477 AC_MSG_RESULT($LOCALCONN) 3478 if test "$LOCALCONN" = "yes"; then 3479 AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 3480 fi 3481 3482 # Other functions Xtrans may need 3483 AC_CHECK_FUNCS([strcasecmp strlcpy]) 3484 3485]) # XTRANS_CONNECTION_FLAGS 3486 3487 3488# XTRANS_SECURE_RPC_FLAGS() 3489# ------------------------- 3490# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 3491# so that any necessary networking libraries are already found 3492AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 3493[AC_REQUIRE([XTRANS_TCP_FLAGS]) 3494 AC_ARG_ENABLE(secure-rpc, 3495 AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 3496 [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 3497 3498 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 3499 FOUND_SECURE_RPC="no" 3500 AC_CHECK_FUNCS([authdes_seccreate authdes_create], 3501 [FOUND_SECURE_RPC="yes"]) 3502 if test "x$FOUND_SECURE_RPC" = "xno" ; then 3503 if test "x$SECURE_RPC" = "xyes" ; then 3504 AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 3505 fi 3506 SECURE_RPC="no" 3507 else 3508 dnl FreeBSD keeps getsecretkey in librpcsvc 3509 AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 3510 SECURE_RPC="yes" 3511 fi 3512 fi 3513 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 3514 if test "x$SECURE_RPC" = "xyes" ; then 3515 AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 3516 fi 3517 AC_MSG_RESULT($SECURE_RPC) 3518]) # XTRANS_SECURE_RPC_FLAGS 3519 3520 3521# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3522# 3523# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3524# Foundation, Inc. 3525# Written by Gordon Matzigkeit, 1996 3526# 3527# This file is free software; the Free Software Foundation gives 3528# unlimited permission to copy and/or distribute it, with or without 3529# modifications, as long as this notice is preserved. 3530 3531m4_define([_LT_COPYING], [dnl 3532# Copyright (C) 2014 Free Software Foundation, Inc. 3533# This is free software; see the source for copying conditions. There is NO 3534# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3535 3536# GNU Libtool is free software; you can redistribute it and/or modify 3537# it under the terms of the GNU General Public License as published by 3538# the Free Software Foundation; either version 2 of of the License, or 3539# (at your option) any later version. 3540# 3541# As a special exception to the GNU General Public License, if you 3542# distribute this file as part of a program or library that is built 3543# using GNU Libtool, you may include this file under the same 3544# distribution terms that you use for the rest of that program. 3545# 3546# GNU Libtool is distributed in the hope that it will be useful, but 3547# WITHOUT ANY WARRANTY; without even the implied warranty of 3548# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3549# GNU General Public License for more details. 3550# 3551# You should have received a copy of the GNU General Public License 3552# along with this program. If not, see <http://www.gnu.org/licenses/>. 3553]) 3554 3555# serial 59 LT_INIT 3556 3557 3558# LT_PREREQ(VERSION) 3559# ------------------ 3560# Complain and exit if this libtool version is less that VERSION. 3561m4_defun([LT_PREREQ], 3562[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3563 [m4_default([$3], 3564 [m4_fatal([Libtool version $1 or higher is required], 3565 63)])], 3566 [$2])]) 3567 3568 3569# _LT_CHECK_BUILDDIR 3570# ------------------ 3571# Complain if the absolute build directory name contains unusual characters 3572m4_defun([_LT_CHECK_BUILDDIR], 3573[case `pwd` in 3574 *\ * | *\ *) 3575 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3576esac 3577]) 3578 3579 3580# LT_INIT([OPTIONS]) 3581# ------------------ 3582AC_DEFUN([LT_INIT], 3583[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3584AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3585AC_BEFORE([$0], [LT_LANG])dnl 3586AC_BEFORE([$0], [LT_OUTPUT])dnl 3587AC_BEFORE([$0], [LTDL_INIT])dnl 3588m4_require([_LT_CHECK_BUILDDIR])dnl 3589 3590dnl Autoconf doesn't catch unexpanded LT_ macros by default: 3591m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3592m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3593dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3594dnl unless we require an AC_DEFUNed macro: 3595AC_REQUIRE([LTOPTIONS_VERSION])dnl 3596AC_REQUIRE([LTSUGAR_VERSION])dnl 3597AC_REQUIRE([LTVERSION_VERSION])dnl 3598AC_REQUIRE([LTOBSOLETE_VERSION])dnl 3599m4_require([_LT_PROG_LTMAIN])dnl 3600 3601_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3602 3603dnl Parse OPTIONS 3604_LT_SET_OPTIONS([$0], [$1]) 3605 3606# This can be used to rebuild libtool when needed 3607LIBTOOL_DEPS=$ltmain 3608 3609# Always use our own libtool. 3610LIBTOOL='$(SHELL) $(top_builddir)/libtool' 3611AC_SUBST(LIBTOOL)dnl 3612 3613_LT_SETUP 3614 3615# Only expand once: 3616m4_define([LT_INIT]) 3617])# LT_INIT 3618 3619# Old names: 3620AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3621AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3622dnl aclocal-1.4 backwards compatibility: 3623dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3624dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3625 3626 3627# _LT_PREPARE_CC_BASENAME 3628# ----------------------- 3629m4_defun([_LT_PREPARE_CC_BASENAME], [ 3630# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3631func_cc_basename () 3632{ 3633 for cc_temp in @S|@*""; do 3634 case $cc_temp in 3635 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3636 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3637 \-*) ;; 3638 *) break;; 3639 esac 3640 done 3641 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3642} 3643])# _LT_PREPARE_CC_BASENAME 3644 3645 3646# _LT_CC_BASENAME(CC) 3647# ------------------- 3648# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3649# but that macro is also expanded into generated libtool script, which 3650# arranges for $SED and $ECHO to be set by different means. 3651m4_defun([_LT_CC_BASENAME], 3652[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3653AC_REQUIRE([_LT_DECL_SED])dnl 3654AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3655func_cc_basename $1 3656cc_basename=$func_cc_basename_result 3657]) 3658 3659 3660# _LT_FILEUTILS_DEFAULTS 3661# ---------------------- 3662# It is okay to use these file commands and assume they have been set 3663# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3664m4_defun([_LT_FILEUTILS_DEFAULTS], 3665[: ${CP="cp -f"} 3666: ${MV="mv -f"} 3667: ${RM="rm -f"} 3668])# _LT_FILEUTILS_DEFAULTS 3669 3670 3671# _LT_SETUP 3672# --------- 3673m4_defun([_LT_SETUP], 3674[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3675AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3676AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3677AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3678 3679_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3680dnl 3681_LT_DECL([], [host_alias], [0], [The host system])dnl 3682_LT_DECL([], [host], [0])dnl 3683_LT_DECL([], [host_os], [0])dnl 3684dnl 3685_LT_DECL([], [build_alias], [0], [The build system])dnl 3686_LT_DECL([], [build], [0])dnl 3687_LT_DECL([], [build_os], [0])dnl 3688dnl 3689AC_REQUIRE([AC_PROG_CC])dnl 3690AC_REQUIRE([LT_PATH_LD])dnl 3691AC_REQUIRE([LT_PATH_NM])dnl 3692dnl 3693AC_REQUIRE([AC_PROG_LN_S])dnl 3694test -z "$LN_S" && LN_S="ln -s" 3695_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3696dnl 3697AC_REQUIRE([LT_CMD_MAX_LEN])dnl 3698_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3699_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3700dnl 3701m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3702m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3703m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3704m4_require([_LT_CMD_RELOAD])dnl 3705m4_require([_LT_DECL_FILECMD])dnl 3706m4_require([_LT_CHECK_MAGIC_METHOD])dnl 3707m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3708m4_require([_LT_CMD_OLD_ARCHIVE])dnl 3709m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3710m4_require([_LT_WITH_SYSROOT])dnl 3711m4_require([_LT_CMD_TRUNCATE])dnl 3712 3713_LT_CONFIG_LIBTOOL_INIT([ 3714# See if we are running on zsh, and set the options that allow our 3715# commands through without removal of \ escapes INIT. 3716if test -n "\${ZSH_VERSION+set}"; then 3717 setopt NO_GLOB_SUBST 3718fi 3719]) 3720if test -n "${ZSH_VERSION+set}"; then 3721 setopt NO_GLOB_SUBST 3722fi 3723 3724_LT_CHECK_OBJDIR 3725 3726m4_require([_LT_TAG_COMPILER])dnl 3727 3728case $host_os in 3729aix3*) 3730 # AIX sometimes has problems with the GCC collect2 program. For some 3731 # reason, if we set the COLLECT_NAMES environment variable, the problems 3732 # vanish in a puff of smoke. 3733 if test set != "${COLLECT_NAMES+set}"; then 3734 COLLECT_NAMES= 3735 export COLLECT_NAMES 3736 fi 3737 ;; 3738esac 3739 3740# Global variables: 3741ofile=libtool 3742can_build_shared=yes 3743 3744# All known linkers require a '.a' archive for static linking (except MSVC and 3745# ICC, which need '.lib'). 3746libext=a 3747 3748with_gnu_ld=$lt_cv_prog_gnu_ld 3749 3750old_CC=$CC 3751old_CFLAGS=$CFLAGS 3752 3753# Set sane defaults for various variables 3754test -z "$CC" && CC=cc 3755test -z "$LTCC" && LTCC=$CC 3756test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3757test -z "$LD" && LD=ld 3758test -z "$ac_objext" && ac_objext=o 3759 3760_LT_CC_BASENAME([$compiler]) 3761 3762# Only perform the check for file, if the check method requires it 3763test -z "$MAGIC_CMD" && MAGIC_CMD=file 3764case $deplibs_check_method in 3765file_magic*) 3766 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3767 _LT_PATH_MAGIC 3768 fi 3769 ;; 3770esac 3771 3772# Use C for the default configuration in the libtool script 3773LT_SUPPORTED_TAG([CC]) 3774_LT_LANG_C_CONFIG 3775_LT_LANG_DEFAULT_CONFIG 3776_LT_CONFIG_COMMANDS 3777])# _LT_SETUP 3778 3779 3780# _LT_PREPARE_SED_QUOTE_VARS 3781# -------------------------- 3782# Define a few sed substitution that help us do robust quoting. 3783m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3784[# Backslashify metacharacters that are still active within 3785# double-quoted strings. 3786sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3787 3788# Same as above, but do not quote variable references. 3789double_quote_subst='s/\([["`\\]]\)/\\\1/g' 3790 3791# Sed substitution to delay expansion of an escaped shell variable in a 3792# double_quote_subst'ed string. 3793delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3794 3795# Sed substitution to delay expansion of an escaped single quote. 3796delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3797 3798# Sed substitution to avoid accidental globbing in evaled expressions 3799no_glob_subst='s/\*/\\\*/g' 3800]) 3801 3802# _LT_PROG_LTMAIN 3803# --------------- 3804# Note that this code is called both from 'configure', and 'config.status' 3805# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3806# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3807# so we pass a copy along to make sure it has a sensible value anyway. 3808m4_defun([_LT_PROG_LTMAIN], 3809[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3810_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3811ltmain=$ac_aux_dir/ltmain.sh 3812])# _LT_PROG_LTMAIN 3813 3814 3815 3816# So that we can recreate a full libtool script including additional 3817# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3818# in macros and then make a single call at the end using the 'libtool' 3819# label. 3820 3821 3822# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3823# ---------------------------------------- 3824# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3825m4_define([_LT_CONFIG_LIBTOOL_INIT], 3826[m4_ifval([$1], 3827 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3828 [$1 3829])])]) 3830 3831# Initialize. 3832m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3833 3834 3835# _LT_CONFIG_LIBTOOL([COMMANDS]) 3836# ------------------------------ 3837# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3838m4_define([_LT_CONFIG_LIBTOOL], 3839[m4_ifval([$1], 3840 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3841 [$1 3842])])]) 3843 3844# Initialize. 3845m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3846 3847 3848# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3849# ----------------------------------------------------- 3850m4_defun([_LT_CONFIG_SAVE_COMMANDS], 3851[_LT_CONFIG_LIBTOOL([$1]) 3852_LT_CONFIG_LIBTOOL_INIT([$2]) 3853]) 3854 3855 3856# _LT_FORMAT_COMMENT([COMMENT]) 3857# ----------------------------- 3858# Add leading comment marks to the start of each line, and a trailing 3859# full-stop to the whole comment if one is not present already. 3860m4_define([_LT_FORMAT_COMMENT], 3861[m4_ifval([$1], [ 3862m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3863 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3864)]) 3865 3866 3867 3868 3869 3870# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3871# ------------------------------------------------------------------- 3872# CONFIGNAME is the name given to the value in the libtool script. 3873# VARNAME is the (base) name used in the configure script. 3874# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3875# VARNAME. Any other value will be used directly. 3876m4_define([_LT_DECL], 3877[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3878 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3879 [m4_ifval([$1], [$1], [$2])]) 3880 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3881 m4_ifval([$4], 3882 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3883 lt_dict_add_subkey([lt_decl_dict], [$2], 3884 [tagged?], [m4_ifval([$5], [yes], [no])])]) 3885]) 3886 3887 3888# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3889# -------------------------------------------------------- 3890m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3891 3892 3893# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3894# ------------------------------------------------ 3895m4_define([lt_decl_tag_varnames], 3896[_lt_decl_filter([tagged?], [yes], $@)]) 3897 3898 3899# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3900# --------------------------------------------------------- 3901m4_define([_lt_decl_filter], 3902[m4_case([$#], 3903 [0], [m4_fatal([$0: too few arguments: $#])], 3904 [1], [m4_fatal([$0: too few arguments: $#: $1])], 3905 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3906 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3907 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3908]) 3909 3910 3911# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3912# -------------------------------------------------- 3913m4_define([lt_decl_quote_varnames], 3914[_lt_decl_filter([value], [1], $@)]) 3915 3916 3917# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3918# --------------------------------------------------- 3919m4_define([lt_decl_dquote_varnames], 3920[_lt_decl_filter([value], [2], $@)]) 3921 3922 3923# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3924# --------------------------------------------------- 3925m4_define([lt_decl_varnames_tagged], 3926[m4_assert([$# <= 2])dnl 3927_$0(m4_quote(m4_default([$1], [[, ]])), 3928 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3929 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3930m4_define([_lt_decl_varnames_tagged], 3931[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3932 3933 3934# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3935# ------------------------------------------------ 3936m4_define([lt_decl_all_varnames], 3937[_$0(m4_quote(m4_default([$1], [[, ]])), 3938 m4_if([$2], [], 3939 m4_quote(lt_decl_varnames), 3940 m4_quote(m4_shift($@))))[]dnl 3941]) 3942m4_define([_lt_decl_all_varnames], 3943[lt_join($@, lt_decl_varnames_tagged([$1], 3944 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3945]) 3946 3947 3948# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3949# ------------------------------------ 3950# Quote a variable value, and forward it to 'config.status' so that its 3951# declaration there will have the same value as in 'configure'. VARNAME 3952# must have a single quote delimited value for this to work. 3953m4_define([_LT_CONFIG_STATUS_DECLARE], 3954[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3955 3956 3957# _LT_CONFIG_STATUS_DECLARATIONS 3958# ------------------------------ 3959# We delimit libtool config variables with single quotes, so when 3960# we write them to config.status, we have to be sure to quote all 3961# embedded single quotes properly. In configure, this macro expands 3962# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3963# 3964# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3965m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3966[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3967 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3968 3969 3970# _LT_LIBTOOL_TAGS 3971# ---------------- 3972# Output comment and list of tags supported by the script 3973m4_defun([_LT_LIBTOOL_TAGS], 3974[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3975available_tags='_LT_TAGS'dnl 3976]) 3977 3978 3979# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3980# ----------------------------------- 3981# Extract the dictionary values for VARNAME (optionally with TAG) and 3982# expand to a commented shell variable setting: 3983# 3984# # Some comment about what VAR is for. 3985# visible_name=$lt_internal_name 3986m4_define([_LT_LIBTOOL_DECLARE], 3987[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3988 [description])))[]dnl 3989m4_pushdef([_libtool_name], 3990 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3991m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3992 [0], [_libtool_name=[$]$1], 3993 [1], [_libtool_name=$lt_[]$1], 3994 [2], [_libtool_name=$lt_[]$1], 3995 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3996m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3997]) 3998 3999 4000# _LT_LIBTOOL_CONFIG_VARS 4001# ----------------------- 4002# Produce commented declarations of non-tagged libtool config variables 4003# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4004# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4005# section) are produced by _LT_LIBTOOL_TAG_VARS. 4006m4_defun([_LT_LIBTOOL_CONFIG_VARS], 4007[m4_foreach([_lt_var], 4008 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4009 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4010 4011 4012# _LT_LIBTOOL_TAG_VARS(TAG) 4013# ------------------------- 4014m4_define([_LT_LIBTOOL_TAG_VARS], 4015[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4016 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 4017 4018 4019# _LT_TAGVAR(VARNAME, [TAGNAME]) 4020# ------------------------------ 4021m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4022 4023 4024# _LT_CONFIG_COMMANDS 4025# ------------------- 4026# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4027# variables for single and double quote escaping we saved from calls 4028# to _LT_DECL, we can put quote escaped variables declarations 4029# into 'config.status', and then the shell code to quote escape them in 4030# for loops in 'config.status'. Finally, any additional code accumulated 4031# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 4032m4_defun([_LT_CONFIG_COMMANDS], 4033[AC_PROVIDE_IFELSE([LT_OUTPUT], 4034 dnl If the libtool generation code has been placed in $CONFIG_LT, 4035 dnl instead of duplicating it all over again into config.status, 4036 dnl then we will have config.status run $CONFIG_LT later, so it 4037 dnl needs to know what name is stored there: 4038 [AC_CONFIG_COMMANDS([libtool], 4039 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 4040 dnl If the libtool generation code is destined for config.status, 4041 dnl expand the accumulated commands and init code now: 4042 [AC_CONFIG_COMMANDS([libtool], 4043 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 4044])#_LT_CONFIG_COMMANDS 4045 4046 4047# Initialize. 4048m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 4049[ 4050 4051# The HP-UX ksh and POSIX shell print the target directory to stdout 4052# if CDPATH is set. 4053(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4054 4055sed_quote_subst='$sed_quote_subst' 4056double_quote_subst='$double_quote_subst' 4057delay_variable_subst='$delay_variable_subst' 4058_LT_CONFIG_STATUS_DECLARATIONS 4059LTCC='$LTCC' 4060LTCFLAGS='$LTCFLAGS' 4061compiler='$compiler_DEFAULT' 4062 4063# A function that is used when there is no print builtin or printf. 4064func_fallback_echo () 4065{ 4066 eval 'cat <<_LTECHO_EOF 4067\$[]1 4068_LTECHO_EOF' 4069} 4070 4071# Quote evaled strings. 4072for var in lt_decl_all_varnames([[ \ 4073]], lt_decl_quote_varnames); do 4074 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4075 *[[\\\\\\\`\\"\\\$]]*) 4076 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4077 ;; 4078 *) 4079 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4080 ;; 4081 esac 4082done 4083 4084# Double-quote double-evaled strings. 4085for var in lt_decl_all_varnames([[ \ 4086]], lt_decl_dquote_varnames); do 4087 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4088 *[[\\\\\\\`\\"\\\$]]*) 4089 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4090 ;; 4091 *) 4092 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4093 ;; 4094 esac 4095done 4096 4097_LT_OUTPUT_LIBTOOL_INIT 4098]) 4099 4100# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 4101# ------------------------------------ 4102# Generate a child script FILE with all initialization necessary to 4103# reuse the environment learned by the parent script, and make the 4104# file executable. If COMMENT is supplied, it is inserted after the 4105# '#!' sequence but before initialization text begins. After this 4106# macro, additional text can be appended to FILE to form the body of 4107# the child script. The macro ends with non-zero status if the 4108# file could not be fully written (such as if the disk is full). 4109m4_ifdef([AS_INIT_GENERATED], 4110[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4111[m4_defun([_LT_GENERATED_FILE_INIT], 4112[m4_require([AS_PREPARE])]dnl 4113[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4114[lt_write_fail=0 4115cat >$1 <<_ASEOF || lt_write_fail=1 4116#! $SHELL 4117# Generated by $as_me. 4118$2 4119SHELL=\${CONFIG_SHELL-$SHELL} 4120export SHELL 4121_ASEOF 4122cat >>$1 <<\_ASEOF || lt_write_fail=1 4123AS_SHELL_SANITIZE 4124_AS_PREPARE 4125exec AS_MESSAGE_FD>&1 4126_ASEOF 4127test 0 = "$lt_write_fail" && chmod +x $1[]dnl 4128m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4129 4130# LT_OUTPUT 4131# --------- 4132# This macro allows early generation of the libtool script (before 4133# AC_OUTPUT is called), incase it is used in configure for compilation 4134# tests. 4135AC_DEFUN([LT_OUTPUT], 4136[: ${CONFIG_LT=./config.lt} 4137AC_MSG_NOTICE([creating $CONFIG_LT]) 4138_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4139[# Run this file to recreate a libtool stub with the current configuration.]) 4140 4141cat >>"$CONFIG_LT" <<\_LTEOF 4142lt_cl_silent=false 4143exec AS_MESSAGE_LOG_FD>>config.log 4144{ 4145 echo 4146 AS_BOX([Running $as_me.]) 4147} >&AS_MESSAGE_LOG_FD 4148 4149lt_cl_help="\ 4150'$as_me' creates a local libtool stub from the current configuration, 4151for use in further configure time tests before the real libtool is 4152generated. 4153 4154Usage: $[0] [[OPTIONS]] 4155 4156 -h, --help print this help, then exit 4157 -V, --version print version number, then exit 4158 -q, --quiet do not print progress messages 4159 -d, --debug don't remove temporary files 4160 4161Report bugs to <bug-libtool@gnu.org>." 4162 4163lt_cl_version="\ 4164m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4165m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4166configured by $[0], generated by m4_PACKAGE_STRING. 4167 4168Copyright (C) 2011 Free Software Foundation, Inc. 4169This config.lt script is free software; the Free Software Foundation 4170gives unlimited permision to copy, distribute and modify it." 4171 4172while test 0 != $[#] 4173do 4174 case $[1] in 4175 --version | --v* | -V ) 4176 echo "$lt_cl_version"; exit 0 ;; 4177 --help | --h* | -h ) 4178 echo "$lt_cl_help"; exit 0 ;; 4179 --debug | --d* | -d ) 4180 debug=: ;; 4181 --quiet | --q* | --silent | --s* | -q ) 4182 lt_cl_silent=: ;; 4183 4184 -*) AC_MSG_ERROR([unrecognized option: $[1] 4185Try '$[0] --help' for more information.]) ;; 4186 4187 *) AC_MSG_ERROR([unrecognized argument: $[1] 4188Try '$[0] --help' for more information.]) ;; 4189 esac 4190 shift 4191done 4192 4193if $lt_cl_silent; then 4194 exec AS_MESSAGE_FD>/dev/null 4195fi 4196_LTEOF 4197 4198cat >>"$CONFIG_LT" <<_LTEOF 4199_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4200_LTEOF 4201 4202cat >>"$CONFIG_LT" <<\_LTEOF 4203AC_MSG_NOTICE([creating $ofile]) 4204_LT_OUTPUT_LIBTOOL_COMMANDS 4205AS_EXIT(0) 4206_LTEOF 4207chmod +x "$CONFIG_LT" 4208 4209# configure is writing to config.log, but config.lt does its own redirection, 4210# appending to config.log, which fails on DOS, as config.log is still kept 4211# open by configure. Here we exec the FD to /dev/null, effectively closing 4212# config.log, so it can be properly (re)opened and appended to by config.lt. 4213lt_cl_success=: 4214test yes = "$silent" && 4215 lt_config_lt_args="$lt_config_lt_args --quiet" 4216exec AS_MESSAGE_LOG_FD>/dev/null 4217$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4218exec AS_MESSAGE_LOG_FD>>config.log 4219$lt_cl_success || AS_EXIT(1) 4220])# LT_OUTPUT 4221 4222 4223# _LT_CONFIG(TAG) 4224# --------------- 4225# If TAG is the built-in tag, create an initial libtool script with a 4226# default configuration from the untagged config vars. Otherwise add code 4227# to config.status for appending the configuration named by TAG from the 4228# matching tagged config vars. 4229m4_defun([_LT_CONFIG], 4230[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4231_LT_CONFIG_SAVE_COMMANDS([ 4232 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4233 m4_if(_LT_TAG, [C], [ 4234 # See if we are running on zsh, and set the options that allow our 4235 # commands through without removal of \ escapes. 4236 if test -n "${ZSH_VERSION+set}"; then 4237 setopt NO_GLOB_SUBST 4238 fi 4239 4240 cfgfile=${ofile}T 4241 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4242 $RM "$cfgfile" 4243 4244 cat <<_LT_EOF >> "$cfgfile" 4245#! $SHELL 4246# Generated automatically by $as_me ($PACKAGE) $VERSION 4247# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4248# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4249 4250# Provide generalized library-building support services. 4251# Written by Gordon Matzigkeit, 1996 4252 4253_LT_COPYING 4254_LT_LIBTOOL_TAGS 4255 4256# Configured defaults for sys_lib_dlsearch_path munging. 4257: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4258 4259# ### BEGIN LIBTOOL CONFIG 4260_LT_LIBTOOL_CONFIG_VARS 4261_LT_LIBTOOL_TAG_VARS 4262# ### END LIBTOOL CONFIG 4263 4264_LT_EOF 4265 4266 cat <<'_LT_EOF' >> "$cfgfile" 4267 4268# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4269 4270_LT_PREPARE_MUNGE_PATH_LIST 4271_LT_PREPARE_CC_BASENAME 4272 4273# ### END FUNCTIONS SHARED WITH CONFIGURE 4274 4275_LT_EOF 4276 4277 case $host_os in 4278 aix3*) 4279 cat <<\_LT_EOF >> "$cfgfile" 4280# AIX sometimes has problems with the GCC collect2 program. For some 4281# reason, if we set the COLLECT_NAMES environment variable, the problems 4282# vanish in a puff of smoke. 4283if test set != "${COLLECT_NAMES+set}"; then 4284 COLLECT_NAMES= 4285 export COLLECT_NAMES 4286fi 4287_LT_EOF 4288 ;; 4289 esac 4290 4291 _LT_PROG_LTMAIN 4292 4293 # We use sed instead of cat because bash on DJGPP gets confused if 4294 # if finds mixed CR/LF and LF-only lines. Since sed operates in 4295 # text mode, it properly converts lines to CR/LF. This bash problem 4296 # is reportedly fixed, but why not run on old versions too? 4297 $SED '$q' "$ltmain" >> "$cfgfile" \ 4298 || (rm -f "$cfgfile"; exit 1) 4299 4300 mv -f "$cfgfile" "$ofile" || 4301 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4302 chmod +x "$ofile" 4303], 4304[cat <<_LT_EOF >> "$ofile" 4305 4306dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4307dnl in a comment (ie after a #). 4308# ### BEGIN LIBTOOL TAG CONFIG: $1 4309_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4310# ### END LIBTOOL TAG CONFIG: $1 4311_LT_EOF 4312])dnl /m4_if 4313], 4314[m4_if([$1], [], [ 4315 PACKAGE='$PACKAGE' 4316 VERSION='$VERSION' 4317 RM='$RM' 4318 ofile='$ofile'], []) 4319])dnl /_LT_CONFIG_SAVE_COMMANDS 4320])# _LT_CONFIG 4321 4322 4323# LT_SUPPORTED_TAG(TAG) 4324# --------------------- 4325# Trace this macro to discover what tags are supported by the libtool 4326# --tag option, using: 4327# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4328AC_DEFUN([LT_SUPPORTED_TAG], []) 4329 4330 4331# C support is built-in for now 4332m4_define([_LT_LANG_C_enabled], []) 4333m4_define([_LT_TAGS], []) 4334 4335 4336# LT_LANG(LANG) 4337# ------------- 4338# Enable libtool support for the given language if not already enabled. 4339AC_DEFUN([LT_LANG], 4340[AC_BEFORE([$0], [LT_OUTPUT])dnl 4341m4_case([$1], 4342 [C], [_LT_LANG(C)], 4343 [C++], [_LT_LANG(CXX)], 4344 [Go], [_LT_LANG(GO)], 4345 [Java], [_LT_LANG(GCJ)], 4346 [Fortran 77], [_LT_LANG(F77)], 4347 [Fortran], [_LT_LANG(FC)], 4348 [Windows Resource], [_LT_LANG(RC)], 4349 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4350 [_LT_LANG($1)], 4351 [m4_fatal([$0: unsupported language: "$1"])])])dnl 4352])# LT_LANG 4353 4354 4355# _LT_LANG(LANGNAME) 4356# ------------------ 4357m4_defun([_LT_LANG], 4358[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4359 [LT_SUPPORTED_TAG([$1])dnl 4360 m4_append([_LT_TAGS], [$1 ])dnl 4361 m4_define([_LT_LANG_]$1[_enabled], [])dnl 4362 _LT_LANG_$1_CONFIG($1)])dnl 4363])# _LT_LANG 4364 4365 4366m4_ifndef([AC_PROG_GO], [ 4367# NOTE: This macro has been submitted for inclusion into # 4368# GNU Autoconf as AC_PROG_GO. When it is available in # 4369# a released version of Autoconf we should remove this # 4370# macro and use it instead. # 4371m4_defun([AC_PROG_GO], 4372[AC_LANG_PUSH(Go)dnl 4373AC_ARG_VAR([GOC], [Go compiler command])dnl 4374AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4375_AC_ARG_VAR_LDFLAGS()dnl 4376AC_CHECK_TOOL(GOC, gccgo) 4377if test -z "$GOC"; then 4378 if test -n "$ac_tool_prefix"; then 4379 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4380 fi 4381fi 4382if test -z "$GOC"; then 4383 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4384fi 4385])#m4_defun 4386])#m4_ifndef 4387 4388 4389# _LT_LANG_DEFAULT_CONFIG 4390# ----------------------- 4391m4_defun([_LT_LANG_DEFAULT_CONFIG], 4392[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4393 [LT_LANG(CXX)], 4394 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4395 4396AC_PROVIDE_IFELSE([AC_PROG_F77], 4397 [LT_LANG(F77)], 4398 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4399 4400AC_PROVIDE_IFELSE([AC_PROG_FC], 4401 [LT_LANG(FC)], 4402 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4403 4404dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4405dnl pulling things in needlessly. 4406AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4407 [LT_LANG(GCJ)], 4408 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4409 [LT_LANG(GCJ)], 4410 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4411 [LT_LANG(GCJ)], 4412 [m4_ifdef([AC_PROG_GCJ], 4413 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4414 m4_ifdef([A][M_PROG_GCJ], 4415 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4416 m4_ifdef([LT_PROG_GCJ], 4417 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4418 4419AC_PROVIDE_IFELSE([AC_PROG_GO], 4420 [LT_LANG(GO)], 4421 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4422 4423AC_PROVIDE_IFELSE([LT_PROG_RC], 4424 [LT_LANG(RC)], 4425 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4426])# _LT_LANG_DEFAULT_CONFIG 4427 4428# Obsolete macros: 4429AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4430AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4431AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4432AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4433AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4434dnl aclocal-1.4 backwards compatibility: 4435dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4436dnl AC_DEFUN([AC_LIBTOOL_F77], []) 4437dnl AC_DEFUN([AC_LIBTOOL_FC], []) 4438dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4439dnl AC_DEFUN([AC_LIBTOOL_RC], []) 4440 4441 4442# _LT_TAG_COMPILER 4443# ---------------- 4444m4_defun([_LT_TAG_COMPILER], 4445[AC_REQUIRE([AC_PROG_CC])dnl 4446 4447_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4448_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4449_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4450_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4451 4452# If no C compiler was specified, use CC. 4453LTCC=${LTCC-"$CC"} 4454 4455# If no C compiler flags were specified, use CFLAGS. 4456LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4457 4458# Allow CC to be a program name with arguments. 4459compiler=$CC 4460])# _LT_TAG_COMPILER 4461 4462 4463# _LT_COMPILER_BOILERPLATE 4464# ------------------------ 4465# Check for compiler boilerplate output or warnings with 4466# the simple compiler test code. 4467m4_defun([_LT_COMPILER_BOILERPLATE], 4468[m4_require([_LT_DECL_SED])dnl 4469ac_outfile=conftest.$ac_objext 4470echo "$lt_simple_compile_test_code" >conftest.$ac_ext 4471eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4472_lt_compiler_boilerplate=`cat conftest.err` 4473$RM conftest* 4474])# _LT_COMPILER_BOILERPLATE 4475 4476 4477# _LT_LINKER_BOILERPLATE 4478# ---------------------- 4479# Check for linker boilerplate output or warnings with 4480# the simple link test code. 4481m4_defun([_LT_LINKER_BOILERPLATE], 4482[m4_require([_LT_DECL_SED])dnl 4483ac_outfile=conftest.$ac_objext 4484echo "$lt_simple_link_test_code" >conftest.$ac_ext 4485eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4486_lt_linker_boilerplate=`cat conftest.err` 4487$RM -r conftest* 4488])# _LT_LINKER_BOILERPLATE 4489 4490# _LT_REQUIRED_DARWIN_CHECKS 4491# ------------------------- 4492m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4493 case $host_os in 4494 rhapsody* | darwin*) 4495 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4496 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4497 AC_CHECK_TOOL([LIPO], [lipo], [:]) 4498 AC_CHECK_TOOL([OTOOL], [otool], [:]) 4499 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4500 _LT_DECL([], [DSYMUTIL], [1], 4501 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4502 _LT_DECL([], [NMEDIT], [1], 4503 [Tool to change global to local symbols on Mac OS X]) 4504 _LT_DECL([], [LIPO], [1], 4505 [Tool to manipulate fat objects and archives on Mac OS X]) 4506 _LT_DECL([], [OTOOL], [1], 4507 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4508 _LT_DECL([], [OTOOL64], [1], 4509 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4510 4511 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4512 [lt_cv_apple_cc_single_mod=no 4513 if test -z "$LT_MULTI_MODULE"; then 4514 # By default we will add the -single_module flag. You can override 4515 # by either setting the environment variable LT_MULTI_MODULE 4516 # non-empty at configure time, or by adding -multi_module to the 4517 # link flags. 4518 rm -rf libconftest.dylib* 4519 echo "int foo(void){return 1;}" > conftest.c 4520 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4521-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4522 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4523 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4524 _lt_result=$? 4525 # If there is a non-empty error log, and "single_module" 4526 # appears in it, assume the flag caused a linker warning 4527 if test -s conftest.err && $GREP single_module conftest.err; then 4528 cat conftest.err >&AS_MESSAGE_LOG_FD 4529 # Otherwise, if the output was created with a 0 exit code from 4530 # the compiler, it worked. 4531 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4532 lt_cv_apple_cc_single_mod=yes 4533 else 4534 cat conftest.err >&AS_MESSAGE_LOG_FD 4535 fi 4536 rm -rf libconftest.dylib* 4537 rm -f conftest.* 4538 fi]) 4539 4540 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4541 [lt_cv_ld_exported_symbols_list], 4542 [lt_cv_ld_exported_symbols_list=no 4543 save_LDFLAGS=$LDFLAGS 4544 echo "_main" > conftest.sym 4545 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4546 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4547 [lt_cv_ld_exported_symbols_list=yes], 4548 [lt_cv_ld_exported_symbols_list=no]) 4549 LDFLAGS=$save_LDFLAGS 4550 ]) 4551 4552 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4553 [lt_cv_ld_force_load=no 4554 cat > conftest.c << _LT_EOF 4555int forced_loaded() { return 2;} 4556_LT_EOF 4557 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4558 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4559 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4560 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4561 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4562 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4563 cat > conftest.c << _LT_EOF 4564int main() { return 0;} 4565_LT_EOF 4566 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4567 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4568 _lt_result=$? 4569 if test -s conftest.err && $GREP force_load conftest.err; then 4570 cat conftest.err >&AS_MESSAGE_LOG_FD 4571 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4572 lt_cv_ld_force_load=yes 4573 else 4574 cat conftest.err >&AS_MESSAGE_LOG_FD 4575 fi 4576 rm -f conftest.err libconftest.a conftest conftest.c 4577 rm -rf conftest.dSYM 4578 ]) 4579 case $host_os in 4580 rhapsody* | darwin1.[[012]]) 4581 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4582 darwin1.*) 4583 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4584 darwin*) 4585 case $MACOSX_DEPLOYMENT_TARGET,$host in 4586 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4587 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4588 *) 4589 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4590 esac 4591 ;; 4592 esac 4593 if test yes = "$lt_cv_apple_cc_single_mod"; then 4594 _lt_dar_single_mod='$single_module' 4595 fi 4596 if test yes = "$lt_cv_ld_exported_symbols_list"; then 4597 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4598 else 4599 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4600 fi 4601 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4602 _lt_dsymutil='~$DSYMUTIL $lib || :' 4603 else 4604 _lt_dsymutil= 4605 fi 4606 ;; 4607 esac 4608]) 4609 4610 4611# _LT_DARWIN_LINKER_FEATURES([TAG]) 4612# --------------------------------- 4613# Checks for linker and compiler features on darwin 4614m4_defun([_LT_DARWIN_LINKER_FEATURES], 4615[ 4616 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4617 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4618 _LT_TAGVAR(hardcode_direct, $1)=no 4619 _LT_TAGVAR(hardcode_automatic, $1)=yes 4620 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4621 if test yes = "$lt_cv_ld_force_load"; then 4622 _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\"`' 4623 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4624 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4625 else 4626 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4627 fi 4628 _LT_TAGVAR(link_all_deplibs, $1)=yes 4629 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4630 case $cc_basename in 4631 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4632 *) _lt_dar_can_shared=$GCC ;; 4633 esac 4634 if test yes = "$_lt_dar_can_shared"; then 4635 output_verbose_link_cmd=func_echo_all 4636 _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" 4637 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4638 _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" 4639 _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" 4640 m4_if([$1], [CXX], 4641[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4642 _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" 4643 _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" 4644 fi 4645],[]) 4646 else 4647 _LT_TAGVAR(ld_shlibs, $1)=no 4648 fi 4649]) 4650 4651# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4652# ---------------------------------- 4653# Links a minimal program and checks the executable 4654# for the system default hardcoded library path. In most cases, 4655# this is /usr/lib:/lib, but when the MPI compilers are used 4656# the location of the communication and MPI libs are included too. 4657# If we don't find anything, use the default library path according 4658# to the aix ld manual. 4659# Store the results from the different compilers for each TAGNAME. 4660# Allow to override them for all tags through lt_cv_aix_libpath. 4661m4_defun([_LT_SYS_MODULE_PATH_AIX], 4662[m4_require([_LT_DECL_SED])dnl 4663if test set = "${lt_cv_aix_libpath+set}"; then 4664 aix_libpath=$lt_cv_aix_libpath 4665else 4666 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4667 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4668 lt_aix_libpath_sed='[ 4669 /Import File Strings/,/^$/ { 4670 /^0/ { 4671 s/^0 *\([^ ]*\) *$/\1/ 4672 p 4673 } 4674 }]' 4675 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4676 # Check for a 64-bit object if we didn't find anything. 4677 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4678 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4679 fi],[]) 4680 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4681 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4682 fi 4683 ]) 4684 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4685fi 4686])# _LT_SYS_MODULE_PATH_AIX 4687 4688 4689# _LT_SHELL_INIT(ARG) 4690# ------------------- 4691m4_define([_LT_SHELL_INIT], 4692[m4_divert_text([M4SH-INIT], [$1 4693])])# _LT_SHELL_INIT 4694 4695 4696 4697# _LT_PROG_ECHO_BACKSLASH 4698# ----------------------- 4699# Find how we can fake an echo command that does not interpret backslash. 4700# In particular, with Autoconf 2.60 or later we add some code to the start 4701# of the generated configure script that will find a shell with a builtin 4702# printf (that we can use as an echo command). 4703m4_defun([_LT_PROG_ECHO_BACKSLASH], 4704[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4705ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4706ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4707 4708AC_MSG_CHECKING([how to print strings]) 4709# Test print first, because it will be a builtin if present. 4710if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4711 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4712 ECHO='print -r --' 4713elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4714 ECHO='printf %s\n' 4715else 4716 # Use this function as a fallback that always works. 4717 func_fallback_echo () 4718 { 4719 eval 'cat <<_LTECHO_EOF 4720$[]1 4721_LTECHO_EOF' 4722 } 4723 ECHO='func_fallback_echo' 4724fi 4725 4726# func_echo_all arg... 4727# Invoke $ECHO with all args, space-separated. 4728func_echo_all () 4729{ 4730 $ECHO "$*" 4731} 4732 4733case $ECHO in 4734 printf*) AC_MSG_RESULT([printf]) ;; 4735 print*) AC_MSG_RESULT([print -r]) ;; 4736 *) AC_MSG_RESULT([cat]) ;; 4737esac 4738 4739m4_ifdef([_AS_DETECT_SUGGESTED], 4740[_AS_DETECT_SUGGESTED([ 4741 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4742 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4743 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4744 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4745 PATH=/empty FPATH=/empty; export PATH FPATH 4746 test "X`printf %s $ECHO`" = "X$ECHO" \ 4747 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4748 4749_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4750_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4751])# _LT_PROG_ECHO_BACKSLASH 4752 4753 4754# _LT_WITH_SYSROOT 4755# ---------------- 4756AC_DEFUN([_LT_WITH_SYSROOT], 4757[m4_require([_LT_DECL_SED])dnl 4758AC_MSG_CHECKING([for sysroot]) 4759AC_ARG_WITH([sysroot], 4760[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4761 [Search for dependent libraries within DIR (or the compiler's sysroot 4762 if not specified).])], 4763[], [with_sysroot=no]) 4764 4765dnl lt_sysroot will always be passed unquoted. We quote it here 4766dnl in case the user passed a directory name. 4767lt_sysroot= 4768case $with_sysroot in #( 4769 yes) 4770 if test yes = "$GCC"; then 4771 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4772 fi 4773 ;; #( 4774 /*) 4775 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4776 ;; #( 4777 no|'') 4778 ;; #( 4779 *) 4780 AC_MSG_RESULT([$with_sysroot]) 4781 AC_MSG_ERROR([The sysroot must be an absolute path.]) 4782 ;; 4783esac 4784 4785 AC_MSG_RESULT([${lt_sysroot:-no}]) 4786_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4787[dependent libraries, and where our libraries should be installed.])]) 4788 4789# _LT_ENABLE_LOCK 4790# --------------- 4791m4_defun([_LT_ENABLE_LOCK], 4792[AC_ARG_ENABLE([libtool-lock], 4793 [AS_HELP_STRING([--disable-libtool-lock], 4794 [avoid locking (might break parallel builds)])]) 4795test no = "$enable_libtool_lock" || enable_libtool_lock=yes 4796 4797# Some flags need to be propagated to the compiler or linker for good 4798# libtool support. 4799case $host in 4800ia64-*-hpux*) 4801 # Find out what ABI is being produced by ac_compile, and set mode 4802 # options accordingly. 4803 echo 'int i;' > conftest.$ac_ext 4804 if AC_TRY_EVAL(ac_compile); then 4805 case `$FILECMD conftest.$ac_objext` in 4806 *ELF-32*) 4807 HPUX_IA64_MODE=32 4808 ;; 4809 *ELF-64*) 4810 HPUX_IA64_MODE=64 4811 ;; 4812 esac 4813 fi 4814 rm -rf conftest* 4815 ;; 4816*-*-irix6*) 4817 # Find out what ABI is being produced by ac_compile, and set linker 4818 # options accordingly. 4819 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4820 if AC_TRY_EVAL(ac_compile); then 4821 if test yes = "$lt_cv_prog_gnu_ld"; then 4822 case `$FILECMD conftest.$ac_objext` in 4823 *32-bit*) 4824 LD="${LD-ld} -melf32bsmip" 4825 ;; 4826 *N32*) 4827 LD="${LD-ld} -melf32bmipn32" 4828 ;; 4829 *64-bit*) 4830 LD="${LD-ld} -melf64bmip" 4831 ;; 4832 esac 4833 else 4834 case `$FILECMD conftest.$ac_objext` in 4835 *32-bit*) 4836 LD="${LD-ld} -32" 4837 ;; 4838 *N32*) 4839 LD="${LD-ld} -n32" 4840 ;; 4841 *64-bit*) 4842 LD="${LD-ld} -64" 4843 ;; 4844 esac 4845 fi 4846 fi 4847 rm -rf conftest* 4848 ;; 4849 4850mips64*-*linux*) 4851 # Find out what ABI is being produced by ac_compile, and set linker 4852 # options accordingly. 4853 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4854 if AC_TRY_EVAL(ac_compile); then 4855 emul=elf 4856 case `$FILECMD conftest.$ac_objext` in 4857 *32-bit*) 4858 emul="${emul}32" 4859 ;; 4860 *64-bit*) 4861 emul="${emul}64" 4862 ;; 4863 esac 4864 case `$FILECMD conftest.$ac_objext` in 4865 *MSB*) 4866 emul="${emul}btsmip" 4867 ;; 4868 *LSB*) 4869 emul="${emul}ltsmip" 4870 ;; 4871 esac 4872 case `$FILECMD conftest.$ac_objext` in 4873 *N32*) 4874 emul="${emul}n32" 4875 ;; 4876 esac 4877 LD="${LD-ld} -m $emul" 4878 fi 4879 rm -rf conftest* 4880 ;; 4881 4882x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4883s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4884 # Find out what ABI is being produced by ac_compile, and set linker 4885 # options accordingly. Note that the listed cases only cover the 4886 # situations where additional linker options are needed (such as when 4887 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4888 # vice versa); the common cases where no linker options are needed do 4889 # not appear in the list. 4890 echo 'int i;' > conftest.$ac_ext 4891 if AC_TRY_EVAL(ac_compile); then 4892 case `$FILECMD conftest.o` in 4893 *32-bit*) 4894 case $host in 4895 x86_64-*kfreebsd*-gnu) 4896 LD="${LD-ld} -m elf_i386_fbsd" 4897 ;; 4898 x86_64-*linux*) 4899 case `$FILECMD conftest.o` in 4900 *x86-64*) 4901 LD="${LD-ld} -m elf32_x86_64" 4902 ;; 4903 *) 4904 LD="${LD-ld} -m elf_i386" 4905 ;; 4906 esac 4907 ;; 4908 powerpc64le-*linux*) 4909 LD="${LD-ld} -m elf32lppclinux" 4910 ;; 4911 powerpc64-*linux*) 4912 LD="${LD-ld} -m elf32ppclinux" 4913 ;; 4914 s390x-*linux*) 4915 LD="${LD-ld} -m elf_s390" 4916 ;; 4917 sparc64-*linux*) 4918 LD="${LD-ld} -m elf32_sparc" 4919 ;; 4920 esac 4921 ;; 4922 *64-bit*) 4923 case $host in 4924 x86_64-*kfreebsd*-gnu) 4925 LD="${LD-ld} -m elf_x86_64_fbsd" 4926 ;; 4927 x86_64-*linux*) 4928 LD="${LD-ld} -m elf_x86_64" 4929 ;; 4930 powerpcle-*linux*) 4931 LD="${LD-ld} -m elf64lppc" 4932 ;; 4933 powerpc-*linux*) 4934 LD="${LD-ld} -m elf64ppc" 4935 ;; 4936 s390*-*linux*|s390*-*tpf*) 4937 LD="${LD-ld} -m elf64_s390" 4938 ;; 4939 sparc*-*linux*) 4940 LD="${LD-ld} -m elf64_sparc" 4941 ;; 4942 esac 4943 ;; 4944 esac 4945 fi 4946 rm -rf conftest* 4947 ;; 4948 4949*-*-sco3.2v5*) 4950 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4951 SAVE_CFLAGS=$CFLAGS 4952 CFLAGS="$CFLAGS -belf" 4953 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4954 [AC_LANG_PUSH(C) 4955 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4956 AC_LANG_POP]) 4957 if test yes != "$lt_cv_cc_needs_belf"; then 4958 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4959 CFLAGS=$SAVE_CFLAGS 4960 fi 4961 ;; 4962*-*solaris*) 4963 # Find out what ABI is being produced by ac_compile, and set linker 4964 # options accordingly. 4965 echo 'int i;' > conftest.$ac_ext 4966 if AC_TRY_EVAL(ac_compile); then 4967 case `$FILECMD conftest.o` in 4968 *64-bit*) 4969 case $lt_cv_prog_gnu_ld in 4970 yes*) 4971 case $host in 4972 i?86-*-solaris*|x86_64-*-solaris*) 4973 LD="${LD-ld} -m elf_x86_64" 4974 ;; 4975 sparc*-*-solaris*) 4976 LD="${LD-ld} -m elf64_sparc" 4977 ;; 4978 esac 4979 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4980 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4981 LD=${LD-ld}_sol2 4982 fi 4983 ;; 4984 *) 4985 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4986 LD="${LD-ld} -64" 4987 fi 4988 ;; 4989 esac 4990 ;; 4991 esac 4992 fi 4993 rm -rf conftest* 4994 ;; 4995esac 4996 4997need_locks=$enable_libtool_lock 4998])# _LT_ENABLE_LOCK 4999 5000 5001# _LT_PROG_AR 5002# ----------- 5003m4_defun([_LT_PROG_AR], 5004[AC_CHECK_TOOLS(AR, [ar], false) 5005: ${AR=ar} 5006_LT_DECL([], [AR], [1], [The archiver]) 5007 5008# Use ARFLAGS variable as AR's operation code to sync the variable naming with 5009# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 5010# higher priority because thats what people were doing historically (setting 5011# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 5012# variable obsoleted/removed. 5013 5014test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 5015lt_ar_flags=$AR_FLAGS 5016_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 5017 5018# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 5019# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 5020_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 5021 [Flags to create an archive]) 5022 5023AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 5024 [lt_cv_ar_at_file=no 5025 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 5026 [echo conftest.$ac_objext > conftest.lst 5027 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 5028 AC_TRY_EVAL([lt_ar_try]) 5029 if test 0 -eq "$ac_status"; then 5030 # Ensure the archiver fails upon bogus file names. 5031 rm -f conftest.$ac_objext libconftest.a 5032 AC_TRY_EVAL([lt_ar_try]) 5033 if test 0 -ne "$ac_status"; then 5034 lt_cv_ar_at_file=@ 5035 fi 5036 fi 5037 rm -f conftest.* libconftest.a 5038 ]) 5039 ]) 5040 5041if test no = "$lt_cv_ar_at_file"; then 5042 archiver_list_spec= 5043else 5044 archiver_list_spec=$lt_cv_ar_at_file 5045fi 5046_LT_DECL([], [archiver_list_spec], [1], 5047 [How to feed a file listing to the archiver]) 5048])# _LT_PROG_AR 5049 5050 5051# _LT_CMD_OLD_ARCHIVE 5052# ------------------- 5053m4_defun([_LT_CMD_OLD_ARCHIVE], 5054[_LT_PROG_AR 5055 5056AC_CHECK_TOOL(STRIP, strip, :) 5057test -z "$STRIP" && STRIP=: 5058_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 5059 5060AC_CHECK_TOOL(RANLIB, ranlib, :) 5061test -z "$RANLIB" && RANLIB=: 5062_LT_DECL([], [RANLIB], [1], 5063 [Commands used to install an old-style archive]) 5064 5065# Determine commands to create old-style static archives. 5066old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 5067old_postinstall_cmds='chmod 644 $oldlib' 5068old_postuninstall_cmds= 5069 5070if test -n "$RANLIB"; then 5071 case $host_os in 5072 bitrig* | openbsd*) 5073 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 5074 ;; 5075 *) 5076 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 5077 ;; 5078 esac 5079 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 5080fi 5081 5082case $host_os in 5083 darwin*) 5084 lock_old_archive_extraction=yes ;; 5085 *) 5086 lock_old_archive_extraction=no ;; 5087esac 5088_LT_DECL([], [old_postinstall_cmds], [2]) 5089_LT_DECL([], [old_postuninstall_cmds], [2]) 5090_LT_TAGDECL([], [old_archive_cmds], [2], 5091 [Commands used to build an old-style archive]) 5092_LT_DECL([], [lock_old_archive_extraction], [0], 5093 [Whether to use a lock for old archive extraction]) 5094])# _LT_CMD_OLD_ARCHIVE 5095 5096 5097# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5098# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 5099# ---------------------------------------------------------------- 5100# Check whether the given compiler option works 5101AC_DEFUN([_LT_COMPILER_OPTION], 5102[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5103m4_require([_LT_DECL_SED])dnl 5104AC_CACHE_CHECK([$1], [$2], 5105 [$2=no 5106 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5107 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5108 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5109 # Insert the option either (1) after the last *FLAGS variable, or 5110 # (2) before a word containing "conftest.", or (3) at the end. 5111 # Note that $ac_compile itself does not contain backslashes and begins 5112 # with a dollar sign (not a hyphen), so the echo should work correctly. 5113 # The option is referenced via a variable to avoid confusing sed. 5114 lt_compile=`echo "$ac_compile" | $SED \ 5115 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5116 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5117 -e 's:$: $lt_compiler_flag:'` 5118 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5119 (eval "$lt_compile" 2>conftest.err) 5120 ac_status=$? 5121 cat conftest.err >&AS_MESSAGE_LOG_FD 5122 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5123 if (exit $ac_status) && test -s "$ac_outfile"; then 5124 # The compiler can only warn and ignore the option if not recognized 5125 # So say no if there are warnings other than the usual output. 5126 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5127 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5128 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5129 $2=yes 5130 fi 5131 fi 5132 $RM conftest* 5133]) 5134 5135if test yes = "[$]$2"; then 5136 m4_if([$5], , :, [$5]) 5137else 5138 m4_if([$6], , :, [$6]) 5139fi 5140])# _LT_COMPILER_OPTION 5141 5142# Old name: 5143AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5144dnl aclocal-1.4 backwards compatibility: 5145dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5146 5147 5148# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5149# [ACTION-SUCCESS], [ACTION-FAILURE]) 5150# ---------------------------------------------------- 5151# Check whether the given linker option works 5152AC_DEFUN([_LT_LINKER_OPTION], 5153[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5154m4_require([_LT_DECL_SED])dnl 5155AC_CACHE_CHECK([$1], [$2], 5156 [$2=no 5157 save_LDFLAGS=$LDFLAGS 5158 LDFLAGS="$LDFLAGS $3" 5159 echo "$lt_simple_link_test_code" > conftest.$ac_ext 5160 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5161 # The linker can only warn and ignore the option if not recognized 5162 # So say no if there are warnings 5163 if test -s conftest.err; then 5164 # Append any errors to the config.log. 5165 cat conftest.err 1>&AS_MESSAGE_LOG_FD 5166 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5167 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5168 if diff conftest.exp conftest.er2 >/dev/null; then 5169 $2=yes 5170 fi 5171 else 5172 $2=yes 5173 fi 5174 fi 5175 $RM -r conftest* 5176 LDFLAGS=$save_LDFLAGS 5177]) 5178 5179if test yes = "[$]$2"; then 5180 m4_if([$4], , :, [$4]) 5181else 5182 m4_if([$5], , :, [$5]) 5183fi 5184])# _LT_LINKER_OPTION 5185 5186# Old name: 5187AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5188dnl aclocal-1.4 backwards compatibility: 5189dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5190 5191 5192# LT_CMD_MAX_LEN 5193#--------------- 5194AC_DEFUN([LT_CMD_MAX_LEN], 5195[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5196# find the maximum length of command line arguments 5197AC_MSG_CHECKING([the maximum length of command line arguments]) 5198AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5199 i=0 5200 teststring=ABCD 5201 5202 case $build_os in 5203 msdosdjgpp*) 5204 # On DJGPP, this test can blow up pretty badly due to problems in libc 5205 # (any single argument exceeding 2000 bytes causes a buffer overrun 5206 # during glob expansion). Even if it were fixed, the result of this 5207 # check would be larger than it should be. 5208 lt_cv_sys_max_cmd_len=12288; # 12K is about right 5209 ;; 5210 5211 gnu*) 5212 # Under GNU Hurd, this test is not required because there is 5213 # no limit to the length of command line arguments. 5214 # Libtool will interpret -1 as no limit whatsoever 5215 lt_cv_sys_max_cmd_len=-1; 5216 ;; 5217 5218 cygwin* | mingw* | cegcc*) 5219 # On Win9x/ME, this test blows up -- it succeeds, but takes 5220 # about 5 minutes as the teststring grows exponentially. 5221 # Worse, since 9x/ME are not pre-emptively multitasking, 5222 # you end up with a "frozen" computer, even though with patience 5223 # the test eventually succeeds (with a max line length of 256k). 5224 # Instead, let's just punt: use the minimum linelength reported by 5225 # all of the supported platforms: 8192 (on NT/2K/XP). 5226 lt_cv_sys_max_cmd_len=8192; 5227 ;; 5228 5229 mint*) 5230 # On MiNT this can take a long time and run out of memory. 5231 lt_cv_sys_max_cmd_len=8192; 5232 ;; 5233 5234 amigaos*) 5235 # On AmigaOS with pdksh, this test takes hours, literally. 5236 # So we just punt and use a minimum line length of 8192. 5237 lt_cv_sys_max_cmd_len=8192; 5238 ;; 5239 5240 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5241 # This has been around since 386BSD, at least. Likely further. 5242 if test -x /sbin/sysctl; then 5243 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5244 elif test -x /usr/sbin/sysctl; then 5245 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5246 else 5247 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5248 fi 5249 # And add a safety zone 5250 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5251 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5252 ;; 5253 5254 interix*) 5255 # We know the value 262144 and hardcode it with a safety zone (like BSD) 5256 lt_cv_sys_max_cmd_len=196608 5257 ;; 5258 5259 os2*) 5260 # The test takes a long time on OS/2. 5261 lt_cv_sys_max_cmd_len=8192 5262 ;; 5263 5264 osf*) 5265 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5266 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5267 # nice to cause kernel panics so lets avoid the loop below. 5268 # First set a reasonable default. 5269 lt_cv_sys_max_cmd_len=16384 5270 # 5271 if test -x /sbin/sysconfig; then 5272 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5273 *1*) lt_cv_sys_max_cmd_len=-1 ;; 5274 esac 5275 fi 5276 ;; 5277 sco3.2v5*) 5278 lt_cv_sys_max_cmd_len=102400 5279 ;; 5280 sysv5* | sco5v6* | sysv4.2uw2*) 5281 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5282 if test -n "$kargmax"; then 5283 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5284 else 5285 lt_cv_sys_max_cmd_len=32768 5286 fi 5287 ;; 5288 *) 5289 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5290 if test -n "$lt_cv_sys_max_cmd_len" && \ 5291 test undefined != "$lt_cv_sys_max_cmd_len"; then 5292 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5293 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5294 else 5295 # Make teststring a little bigger before we do anything with it. 5296 # a 1K string should be a reasonable start. 5297 for i in 1 2 3 4 5 6 7 8; do 5298 teststring=$teststring$teststring 5299 done 5300 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5301 # If test is not a shell built-in, we'll probably end up computing a 5302 # maximum length that is only half of the actual maximum length, but 5303 # we can't tell. 5304 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5305 = "X$teststring$teststring"; } >/dev/null 2>&1 && 5306 test 17 != "$i" # 1/2 MB should be enough 5307 do 5308 i=`expr $i + 1` 5309 teststring=$teststring$teststring 5310 done 5311 # Only check the string length outside the loop. 5312 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5313 teststring= 5314 # Add a significant safety factor because C++ compilers can tack on 5315 # massive amounts of additional arguments before passing them to the 5316 # linker. It appears as though 1/2 is a usable value. 5317 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5318 fi 5319 ;; 5320 esac 5321]) 5322if test -n "$lt_cv_sys_max_cmd_len"; then 5323 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5324else 5325 AC_MSG_RESULT(none) 5326fi 5327max_cmd_len=$lt_cv_sys_max_cmd_len 5328_LT_DECL([], [max_cmd_len], [0], 5329 [What is the maximum length of a command?]) 5330])# LT_CMD_MAX_LEN 5331 5332# Old name: 5333AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5334dnl aclocal-1.4 backwards compatibility: 5335dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5336 5337 5338# _LT_HEADER_DLFCN 5339# ---------------- 5340m4_defun([_LT_HEADER_DLFCN], 5341[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5342])# _LT_HEADER_DLFCN 5343 5344 5345# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5346# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5347# ---------------------------------------------------------------- 5348m4_defun([_LT_TRY_DLOPEN_SELF], 5349[m4_require([_LT_HEADER_DLFCN])dnl 5350if test yes = "$cross_compiling"; then : 5351 [$4] 5352else 5353 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5354 lt_status=$lt_dlunknown 5355 cat > conftest.$ac_ext <<_LT_EOF 5356[#line $LINENO "configure" 5357#include "confdefs.h" 5358 5359#if HAVE_DLFCN_H 5360#include <dlfcn.h> 5361#endif 5362 5363#include <stdio.h> 5364 5365#ifdef RTLD_GLOBAL 5366# define LT_DLGLOBAL RTLD_GLOBAL 5367#else 5368# ifdef DL_GLOBAL 5369# define LT_DLGLOBAL DL_GLOBAL 5370# else 5371# define LT_DLGLOBAL 0 5372# endif 5373#endif 5374 5375/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5376 find out it does not work in some platform. */ 5377#ifndef LT_DLLAZY_OR_NOW 5378# ifdef RTLD_LAZY 5379# define LT_DLLAZY_OR_NOW RTLD_LAZY 5380# else 5381# ifdef DL_LAZY 5382# define LT_DLLAZY_OR_NOW DL_LAZY 5383# else 5384# ifdef RTLD_NOW 5385# define LT_DLLAZY_OR_NOW RTLD_NOW 5386# else 5387# ifdef DL_NOW 5388# define LT_DLLAZY_OR_NOW DL_NOW 5389# else 5390# define LT_DLLAZY_OR_NOW 0 5391# endif 5392# endif 5393# endif 5394# endif 5395#endif 5396 5397/* When -fvisibility=hidden is used, assume the code has been annotated 5398 correspondingly for the symbols needed. */ 5399#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5400int fnord () __attribute__((visibility("default"))); 5401#endif 5402 5403int fnord () { return 42; } 5404int main () 5405{ 5406 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5407 int status = $lt_dlunknown; 5408 5409 if (self) 5410 { 5411 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5412 else 5413 { 5414 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5415 else puts (dlerror ()); 5416 } 5417 /* dlclose (self); */ 5418 } 5419 else 5420 puts (dlerror ()); 5421 5422 return status; 5423}] 5424_LT_EOF 5425 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5426 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5427 lt_status=$? 5428 case x$lt_status in 5429 x$lt_dlno_uscore) $1 ;; 5430 x$lt_dlneed_uscore) $2 ;; 5431 x$lt_dlunknown|x*) $3 ;; 5432 esac 5433 else : 5434 # compilation failed 5435 $3 5436 fi 5437fi 5438rm -fr conftest* 5439])# _LT_TRY_DLOPEN_SELF 5440 5441 5442# LT_SYS_DLOPEN_SELF 5443# ------------------ 5444AC_DEFUN([LT_SYS_DLOPEN_SELF], 5445[m4_require([_LT_HEADER_DLFCN])dnl 5446if test yes != "$enable_dlopen"; then 5447 enable_dlopen=unknown 5448 enable_dlopen_self=unknown 5449 enable_dlopen_self_static=unknown 5450else 5451 lt_cv_dlopen=no 5452 lt_cv_dlopen_libs= 5453 5454 case $host_os in 5455 beos*) 5456 lt_cv_dlopen=load_add_on 5457 lt_cv_dlopen_libs= 5458 lt_cv_dlopen_self=yes 5459 ;; 5460 5461 mingw* | pw32* | cegcc*) 5462 lt_cv_dlopen=LoadLibrary 5463 lt_cv_dlopen_libs= 5464 ;; 5465 5466 cygwin*) 5467 lt_cv_dlopen=dlopen 5468 lt_cv_dlopen_libs= 5469 ;; 5470 5471 darwin*) 5472 # if libdl is installed we need to link against it 5473 AC_CHECK_LIB([dl], [dlopen], 5474 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5475 lt_cv_dlopen=dyld 5476 lt_cv_dlopen_libs= 5477 lt_cv_dlopen_self=yes 5478 ]) 5479 ;; 5480 5481 tpf*) 5482 # Don't try to run any link tests for TPF. We know it's impossible 5483 # because TPF is a cross-compiler, and we know how we open DSOs. 5484 lt_cv_dlopen=dlopen 5485 lt_cv_dlopen_libs= 5486 lt_cv_dlopen_self=no 5487 ;; 5488 5489 *) 5490 AC_CHECK_FUNC([shl_load], 5491 [lt_cv_dlopen=shl_load], 5492 [AC_CHECK_LIB([dld], [shl_load], 5493 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5494 [AC_CHECK_FUNC([dlopen], 5495 [lt_cv_dlopen=dlopen], 5496 [AC_CHECK_LIB([dl], [dlopen], 5497 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5498 [AC_CHECK_LIB([svld], [dlopen], 5499 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5500 [AC_CHECK_LIB([dld], [dld_link], 5501 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5502 ]) 5503 ]) 5504 ]) 5505 ]) 5506 ]) 5507 ;; 5508 esac 5509 5510 if test no = "$lt_cv_dlopen"; then 5511 enable_dlopen=no 5512 else 5513 enable_dlopen=yes 5514 fi 5515 5516 case $lt_cv_dlopen in 5517 dlopen) 5518 save_CPPFLAGS=$CPPFLAGS 5519 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5520 5521 save_LDFLAGS=$LDFLAGS 5522 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5523 5524 save_LIBS=$LIBS 5525 LIBS="$lt_cv_dlopen_libs $LIBS" 5526 5527 AC_CACHE_CHECK([whether a program can dlopen itself], 5528 lt_cv_dlopen_self, [dnl 5529 _LT_TRY_DLOPEN_SELF( 5530 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5531 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5532 ]) 5533 5534 if test yes = "$lt_cv_dlopen_self"; then 5535 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5536 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5537 lt_cv_dlopen_self_static, [dnl 5538 _LT_TRY_DLOPEN_SELF( 5539 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5540 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5541 ]) 5542 fi 5543 5544 CPPFLAGS=$save_CPPFLAGS 5545 LDFLAGS=$save_LDFLAGS 5546 LIBS=$save_LIBS 5547 ;; 5548 esac 5549 5550 case $lt_cv_dlopen_self in 5551 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5552 *) enable_dlopen_self=unknown ;; 5553 esac 5554 5555 case $lt_cv_dlopen_self_static in 5556 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5557 *) enable_dlopen_self_static=unknown ;; 5558 esac 5559fi 5560_LT_DECL([dlopen_support], [enable_dlopen], [0], 5561 [Whether dlopen is supported]) 5562_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5563 [Whether dlopen of programs is supported]) 5564_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5565 [Whether dlopen of statically linked programs is supported]) 5566])# LT_SYS_DLOPEN_SELF 5567 5568# Old name: 5569AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5570dnl aclocal-1.4 backwards compatibility: 5571dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5572 5573 5574# _LT_COMPILER_C_O([TAGNAME]) 5575# --------------------------- 5576# Check to see if options -c and -o are simultaneously supported by compiler. 5577# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5578m4_defun([_LT_COMPILER_C_O], 5579[m4_require([_LT_DECL_SED])dnl 5580m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5581m4_require([_LT_TAG_COMPILER])dnl 5582AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5583 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5584 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5585 $RM -r conftest 2>/dev/null 5586 mkdir conftest 5587 cd conftest 5588 mkdir out 5589 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5590 5591 lt_compiler_flag="-o out/conftest2.$ac_objext" 5592 # Insert the option either (1) after the last *FLAGS variable, or 5593 # (2) before a word containing "conftest.", or (3) at the end. 5594 # Note that $ac_compile itself does not contain backslashes and begins 5595 # with a dollar sign (not a hyphen), so the echo should work correctly. 5596 lt_compile=`echo "$ac_compile" | $SED \ 5597 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5598 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5599 -e 's:$: $lt_compiler_flag:'` 5600 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5601 (eval "$lt_compile" 2>out/conftest.err) 5602 ac_status=$? 5603 cat out/conftest.err >&AS_MESSAGE_LOG_FD 5604 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5605 if (exit $ac_status) && test -s out/conftest2.$ac_objext 5606 then 5607 # The compiler can only warn and ignore the option if not recognized 5608 # So say no if there are warnings 5609 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5610 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5611 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5612 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5613 fi 5614 fi 5615 chmod u+w . 2>&AS_MESSAGE_LOG_FD 5616 $RM conftest* 5617 # SGI C++ compiler will create directory out/ii_files/ for 5618 # template instantiation 5619 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5620 $RM out/* && rmdir out 5621 cd .. 5622 $RM -r conftest 5623 $RM conftest* 5624]) 5625_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5626 [Does compiler simultaneously support -c and -o options?]) 5627])# _LT_COMPILER_C_O 5628 5629 5630# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5631# ---------------------------------- 5632# Check to see if we can do hard links to lock some files if needed 5633m4_defun([_LT_COMPILER_FILE_LOCKS], 5634[m4_require([_LT_ENABLE_LOCK])dnl 5635m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5636_LT_COMPILER_C_O([$1]) 5637 5638hard_links=nottested 5639if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5640 # do not overwrite the value of need_locks provided by the user 5641 AC_MSG_CHECKING([if we can lock with hard links]) 5642 hard_links=yes 5643 $RM conftest* 5644 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5645 touch conftest.a 5646 ln conftest.a conftest.b 2>&5 || hard_links=no 5647 ln conftest.a conftest.b 2>/dev/null && hard_links=no 5648 AC_MSG_RESULT([$hard_links]) 5649 if test no = "$hard_links"; then 5650 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5651 need_locks=warn 5652 fi 5653else 5654 need_locks=no 5655fi 5656_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5657])# _LT_COMPILER_FILE_LOCKS 5658 5659 5660# _LT_CHECK_OBJDIR 5661# ---------------- 5662m4_defun([_LT_CHECK_OBJDIR], 5663[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5664[rm -f .libs 2>/dev/null 5665mkdir .libs 2>/dev/null 5666if test -d .libs; then 5667 lt_cv_objdir=.libs 5668else 5669 # MS-DOS does not allow filenames that begin with a dot. 5670 lt_cv_objdir=_libs 5671fi 5672rmdir .libs 2>/dev/null]) 5673objdir=$lt_cv_objdir 5674_LT_DECL([], [objdir], [0], 5675 [The name of the directory that contains temporary libtool files])dnl 5676m4_pattern_allow([LT_OBJDIR])dnl 5677AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5678 [Define to the sub-directory where libtool stores uninstalled libraries.]) 5679])# _LT_CHECK_OBJDIR 5680 5681 5682# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5683# -------------------------------------- 5684# Check hardcoding attributes. 5685m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5686[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5687_LT_TAGVAR(hardcode_action, $1)= 5688if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5689 test -n "$_LT_TAGVAR(runpath_var, $1)" || 5690 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5691 5692 # We can hardcode non-existent directories. 5693 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5694 # If the only mechanism to avoid hardcoding is shlibpath_var, we 5695 # have to relink, otherwise we might link with an installed library 5696 # when we should be linking with a yet-to-be-installed one 5697 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5698 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5699 # Linking always hardcodes the temporary library directory. 5700 _LT_TAGVAR(hardcode_action, $1)=relink 5701 else 5702 # We can link without hardcoding, and we can hardcode nonexisting dirs. 5703 _LT_TAGVAR(hardcode_action, $1)=immediate 5704 fi 5705else 5706 # We cannot hardcode anything, or else we can only hardcode existing 5707 # directories. 5708 _LT_TAGVAR(hardcode_action, $1)=unsupported 5709fi 5710AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5711 5712if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5713 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5714 # Fast installation is not supported 5715 enable_fast_install=no 5716elif test yes = "$shlibpath_overrides_runpath" || 5717 test no = "$enable_shared"; then 5718 # Fast installation is not necessary 5719 enable_fast_install=needless 5720fi 5721_LT_TAGDECL([], [hardcode_action], [0], 5722 [How to hardcode a shared library path into an executable]) 5723])# _LT_LINKER_HARDCODE_LIBPATH 5724 5725 5726# _LT_CMD_STRIPLIB 5727# ---------------- 5728m4_defun([_LT_CMD_STRIPLIB], 5729[m4_require([_LT_DECL_EGREP]) 5730striplib= 5731old_striplib= 5732AC_MSG_CHECKING([whether stripping libraries is possible]) 5733if test -z "$STRIP"; then 5734 AC_MSG_RESULT([no]) 5735else 5736 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5737 old_striplib="$STRIP --strip-debug" 5738 striplib="$STRIP --strip-unneeded" 5739 AC_MSG_RESULT([yes]) 5740 else 5741 case $host_os in 5742 darwin*) 5743 # FIXME - insert some real tests, host_os isn't really good enough 5744 striplib="$STRIP -x" 5745 old_striplib="$STRIP -S" 5746 AC_MSG_RESULT([yes]) 5747 ;; 5748 freebsd*) 5749 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5750 old_striplib="$STRIP --strip-debug" 5751 striplib="$STRIP --strip-unneeded" 5752 AC_MSG_RESULT([yes]) 5753 else 5754 AC_MSG_RESULT([no]) 5755 fi 5756 ;; 5757 *) 5758 AC_MSG_RESULT([no]) 5759 ;; 5760 esac 5761 fi 5762fi 5763_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5764_LT_DECL([], [striplib], [1]) 5765])# _LT_CMD_STRIPLIB 5766 5767 5768# _LT_PREPARE_MUNGE_PATH_LIST 5769# --------------------------- 5770# Make sure func_munge_path_list() is defined correctly. 5771m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5772[[# func_munge_path_list VARIABLE PATH 5773# ----------------------------------- 5774# VARIABLE is name of variable containing _space_ separated list of 5775# directories to be munged by the contents of PATH, which is string 5776# having a format: 5777# "DIR[:DIR]:" 5778# string "DIR[ DIR]" will be prepended to VARIABLE 5779# ":DIR[:DIR]" 5780# string "DIR[ DIR]" will be appended to VARIABLE 5781# "DIRP[:DIRP]::[DIRA:]DIRA" 5782# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5783# "DIRA[ DIRA]" will be appended to VARIABLE 5784# "DIR[:DIR]" 5785# VARIABLE will be replaced by "DIR[ DIR]" 5786func_munge_path_list () 5787{ 5788 case x@S|@2 in 5789 x) 5790 ;; 5791 *:) 5792 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5793 ;; 5794 x:*) 5795 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5796 ;; 5797 *::*) 5798 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5799 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5800 ;; 5801 *) 5802 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5803 ;; 5804 esac 5805} 5806]])# _LT_PREPARE_PATH_LIST 5807 5808 5809# _LT_SYS_DYNAMIC_LINKER([TAG]) 5810# ----------------------------- 5811# PORTME Fill in your ld.so characteristics 5812m4_defun([_LT_SYS_DYNAMIC_LINKER], 5813[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5814m4_require([_LT_DECL_EGREP])dnl 5815m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5816m4_require([_LT_DECL_OBJDUMP])dnl 5817m4_require([_LT_DECL_SED])dnl 5818m4_require([_LT_CHECK_SHELL_FEATURES])dnl 5819m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5820AC_MSG_CHECKING([dynamic linker characteristics]) 5821m4_if([$1], 5822 [], [ 5823if test yes = "$GCC"; then 5824 case $host_os in 5825 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5826 *) lt_awk_arg='/^libraries:/' ;; 5827 esac 5828 case $host_os in 5829 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5830 *) lt_sed_strip_eq='s|=/|/|g' ;; 5831 esac 5832 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5833 case $lt_search_path_spec in 5834 *\;*) 5835 # if the path contains ";" then we assume it to be the separator 5836 # otherwise default to the standard path separator (i.e. ":") - it is 5837 # assumed that no part of a normal pathname contains ";" but that should 5838 # okay in the real world where ";" in dirpaths is itself problematic. 5839 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5840 ;; 5841 *) 5842 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5843 ;; 5844 esac 5845 # Ok, now we have the path, separated by spaces, we can step through it 5846 # and add multilib dir if necessary... 5847 lt_tmp_lt_search_path_spec= 5848 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5849 # ...but if some path component already ends with the multilib dir we assume 5850 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5851 case "$lt_multi_os_dir; $lt_search_path_spec " in 5852 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5853 lt_multi_os_dir= 5854 ;; 5855 esac 5856 for lt_sys_path in $lt_search_path_spec; do 5857 if test -d "$lt_sys_path$lt_multi_os_dir"; then 5858 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5859 elif test -n "$lt_multi_os_dir"; then 5860 test -d "$lt_sys_path" && \ 5861 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5862 fi 5863 done 5864 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5865BEGIN {RS = " "; FS = "/|\n";} { 5866 lt_foo = ""; 5867 lt_count = 0; 5868 for (lt_i = NF; lt_i > 0; lt_i--) { 5869 if ($lt_i != "" && $lt_i != ".") { 5870 if ($lt_i == "..") { 5871 lt_count++; 5872 } else { 5873 if (lt_count == 0) { 5874 lt_foo = "/" $lt_i lt_foo; 5875 } else { 5876 lt_count--; 5877 } 5878 } 5879 } 5880 } 5881 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5882 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5883}'` 5884 # AWK program above erroneously prepends '/' to C:/dos/paths 5885 # for these hosts. 5886 case $host_os in 5887 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5888 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5889 esac 5890 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5891else 5892 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5893fi]) 5894library_names_spec= 5895libname_spec='lib$name' 5896soname_spec= 5897shrext_cmds=.so 5898postinstall_cmds= 5899postuninstall_cmds= 5900finish_cmds= 5901finish_eval= 5902shlibpath_var= 5903shlibpath_overrides_runpath=unknown 5904version_type=none 5905dynamic_linker="$host_os ld.so" 5906sys_lib_dlsearch_path_spec="/lib /usr/lib" 5907need_lib_prefix=unknown 5908hardcode_into_libs=no 5909 5910# when you set need_version to no, make sure it does not cause -set_version 5911# flags to be left without arguments 5912need_version=unknown 5913 5914AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5915[User-defined run-time library search path.]) 5916 5917case $host_os in 5918aix3*) 5919 version_type=linux # correct to gnu/linux during the next big refactor 5920 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5921 shlibpath_var=LIBPATH 5922 5923 # AIX 3 has no versioning support, so we append a major version to the name. 5924 soname_spec='$libname$release$shared_ext$major' 5925 ;; 5926 5927aix[[4-9]]*) 5928 version_type=linux # correct to gnu/linux during the next big refactor 5929 need_lib_prefix=no 5930 need_version=no 5931 hardcode_into_libs=yes 5932 if test ia64 = "$host_cpu"; then 5933 # AIX 5 supports IA64 5934 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5935 shlibpath_var=LD_LIBRARY_PATH 5936 else 5937 # With GCC up to 2.95.x, collect2 would create an import file 5938 # for dependence libraries. The import file would start with 5939 # the line '#! .'. This would cause the generated library to 5940 # depend on '.', always an invalid library. This was fixed in 5941 # development snapshots of GCC prior to 3.0. 5942 case $host_os in 5943 aix4 | aix4.[[01]] | aix4.[[01]].*) 5944 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5945 echo ' yes ' 5946 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5947 : 5948 else 5949 can_build_shared=no 5950 fi 5951 ;; 5952 esac 5953 # Using Import Files as archive members, it is possible to support 5954 # filename-based versioning of shared library archives on AIX. While 5955 # this would work for both with and without runtime linking, it will 5956 # prevent static linking of such archives. So we do filename-based 5957 # shared library versioning with .so extension only, which is used 5958 # when both runtime linking and shared linking is enabled. 5959 # Unfortunately, runtime linking may impact performance, so we do 5960 # not want this to be the default eventually. Also, we use the 5961 # versioned .so libs for executables only if there is the -brtl 5962 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5963 # To allow for filename-based versioning support, we need to create 5964 # libNAME.so.V as an archive file, containing: 5965 # *) an Import File, referring to the versioned filename of the 5966 # archive as well as the shared archive member, telling the 5967 # bitwidth (32 or 64) of that shared object, and providing the 5968 # list of exported symbols of that shared object, eventually 5969 # decorated with the 'weak' keyword 5970 # *) the shared object with the F_LOADONLY flag set, to really avoid 5971 # it being seen by the linker. 5972 # At run time we better use the real file rather than another symlink, 5973 # but for link time we create the symlink libNAME.so -> libNAME.so.V 5974 5975 case $with_aix_soname,$aix_use_runtimelinking in 5976 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5977 # soname into executable. Probably we can add versioning support to 5978 # collect2, so additional links can be useful in future. 5979 aix,yes) # traditional libtool 5980 dynamic_linker='AIX unversionable lib.so' 5981 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5982 # instead of lib<name>.a to let people know that these are not 5983 # typical AIX shared libraries. 5984 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5985 ;; 5986 aix,no) # traditional AIX only 5987 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5988 # We preserve .a as extension for shared libraries through AIX4.2 5989 # and later when we are not doing run time linking. 5990 library_names_spec='$libname$release.a $libname.a' 5991 soname_spec='$libname$release$shared_ext$major' 5992 ;; 5993 svr4,*) # full svr4 only 5994 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5995 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5996 # We do not specify a path in Import Files, so LIBPATH fires. 5997 shlibpath_overrides_runpath=yes 5998 ;; 5999 *,yes) # both, prefer svr4 6000 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 6001 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 6002 # unpreferred sharedlib libNAME.a needs extra handling 6003 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"' 6004 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"' 6005 # We do not specify a path in Import Files, so LIBPATH fires. 6006 shlibpath_overrides_runpath=yes 6007 ;; 6008 *,no) # both, prefer aix 6009 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 6010 library_names_spec='$libname$release.a $libname.a' 6011 soname_spec='$libname$release$shared_ext$major' 6012 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 6013 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)' 6014 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"' 6015 ;; 6016 esac 6017 shlibpath_var=LIBPATH 6018 fi 6019 ;; 6020 6021amigaos*) 6022 case $host_cpu in 6023 powerpc) 6024 # Since July 2007 AmigaOS4 officially supports .so libraries. 6025 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 6026 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6027 ;; 6028 m68k) 6029 library_names_spec='$libname.ixlibrary $libname.a' 6030 # Create ${libname}_ixlibrary.a entries in /sys/libs. 6031 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' 6032 ;; 6033 esac 6034 ;; 6035 6036beos*) 6037 library_names_spec='$libname$shared_ext' 6038 dynamic_linker="$host_os ld.so" 6039 shlibpath_var=LIBRARY_PATH 6040 ;; 6041 6042bsdi[[45]]*) 6043 version_type=linux # correct to gnu/linux during the next big refactor 6044 need_version=no 6045 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6046 soname_spec='$libname$release$shared_ext$major' 6047 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 6048 shlibpath_var=LD_LIBRARY_PATH 6049 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 6050 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 6051 # the default ld.so.conf also contains /usr/contrib/lib and 6052 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 6053 # libtool to hard-code these into programs 6054 ;; 6055 6056cygwin* | mingw* | pw32* | cegcc*) 6057 version_type=windows 6058 shrext_cmds=.dll 6059 need_version=no 6060 need_lib_prefix=no 6061 6062 case $GCC,$cc_basename in 6063 yes,*) 6064 # gcc 6065 library_names_spec='$libname.dll.a' 6066 # DLL is installed to $(libdir)/../bin by postinstall_cmds 6067 postinstall_cmds='base_file=`basename \$file`~ 6068 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6069 dldir=$destdir/`dirname \$dlpath`~ 6070 test -d \$dldir || mkdir -p \$dldir~ 6071 $install_prog $dir/$dlname \$dldir/$dlname~ 6072 chmod a+x \$dldir/$dlname~ 6073 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6074 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6075 fi' 6076 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6077 dlpath=$dir/\$dldll~ 6078 $RM \$dlpath' 6079 shlibpath_overrides_runpath=yes 6080 6081 case $host_os in 6082 cygwin*) 6083 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 6084 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6085m4_if([$1], [],[ 6086 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 6087 ;; 6088 mingw* | cegcc*) 6089 # MinGW DLLs use traditional 'lib' prefix 6090 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6091 ;; 6092 pw32*) 6093 # pw32 DLLs use 'pw' prefix rather than 'lib' 6094 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6095 ;; 6096 esac 6097 dynamic_linker='Win32 ld.exe' 6098 ;; 6099 6100 *,cl* | *,icl*) 6101 # Native MSVC or ICC 6102 libname_spec='$name' 6103 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6104 library_names_spec='$libname.dll.lib' 6105 6106 case $build_os in 6107 mingw*) 6108 sys_lib_search_path_spec= 6109 lt_save_ifs=$IFS 6110 IFS=';' 6111 for lt_path in $LIB 6112 do 6113 IFS=$lt_save_ifs 6114 # Let DOS variable expansion print the short 8.3 style file name. 6115 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6116 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6117 done 6118 IFS=$lt_save_ifs 6119 # Convert to MSYS style. 6120 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6121 ;; 6122 cygwin*) 6123 # Convert to unix form, then to dos form, then back to unix form 6124 # but this time dos style (no spaces!) so that the unix form looks 6125 # like /cygdrive/c/PROGRA~1:/cygdr... 6126 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6127 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6128 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6129 ;; 6130 *) 6131 sys_lib_search_path_spec=$LIB 6132 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6133 # It is most probably a Windows format PATH. 6134 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6135 else 6136 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6137 fi 6138 # FIXME: find the short name or the path components, as spaces are 6139 # common. (e.g. "Program Files" -> "PROGRA~1") 6140 ;; 6141 esac 6142 6143 # DLL is installed to $(libdir)/../bin by postinstall_cmds 6144 postinstall_cmds='base_file=`basename \$file`~ 6145 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6146 dldir=$destdir/`dirname \$dlpath`~ 6147 test -d \$dldir || mkdir -p \$dldir~ 6148 $install_prog $dir/$dlname \$dldir/$dlname' 6149 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6150 dlpath=$dir/\$dldll~ 6151 $RM \$dlpath' 6152 shlibpath_overrides_runpath=yes 6153 dynamic_linker='Win32 link.exe' 6154 ;; 6155 6156 *) 6157 # Assume MSVC and ICC wrapper 6158 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6159 dynamic_linker='Win32 ld.exe' 6160 ;; 6161 esac 6162 # FIXME: first we should search . and the directory the executable is in 6163 shlibpath_var=PATH 6164 ;; 6165 6166darwin* | rhapsody*) 6167 dynamic_linker="$host_os dyld" 6168 version_type=darwin 6169 need_lib_prefix=no 6170 need_version=no 6171 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6172 soname_spec='$libname$release$major$shared_ext' 6173 shlibpath_overrides_runpath=yes 6174 shlibpath_var=DYLD_LIBRARY_PATH 6175 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6176m4_if([$1], [],[ 6177 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6178 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6179 ;; 6180 6181dgux*) 6182 version_type=linux # correct to gnu/linux during the next big refactor 6183 need_lib_prefix=no 6184 need_version=no 6185 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6186 soname_spec='$libname$release$shared_ext$major' 6187 shlibpath_var=LD_LIBRARY_PATH 6188 ;; 6189 6190freebsd* | dragonfly* | midnightbsd*) 6191 # DragonFly does not have aout. When/if they implement a new 6192 # versioning mechanism, adjust this. 6193 if test -x /usr/bin/objformat; then 6194 objformat=`/usr/bin/objformat` 6195 else 6196 case $host_os in 6197 freebsd[[23]].*) objformat=aout ;; 6198 *) objformat=elf ;; 6199 esac 6200 fi 6201 version_type=freebsd-$objformat 6202 case $version_type in 6203 freebsd-elf*) 6204 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6205 soname_spec='$libname$release$shared_ext$major' 6206 need_version=no 6207 need_lib_prefix=no 6208 ;; 6209 freebsd-*) 6210 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6211 need_version=yes 6212 ;; 6213 esac 6214 shlibpath_var=LD_LIBRARY_PATH 6215 case $host_os in 6216 freebsd2.*) 6217 shlibpath_overrides_runpath=yes 6218 ;; 6219 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6220 shlibpath_overrides_runpath=yes 6221 hardcode_into_libs=yes 6222 ;; 6223 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6224 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6225 shlibpath_overrides_runpath=no 6226 hardcode_into_libs=yes 6227 ;; 6228 *) # from 4.6 on, and DragonFly 6229 shlibpath_overrides_runpath=yes 6230 hardcode_into_libs=yes 6231 ;; 6232 esac 6233 ;; 6234 6235haiku*) 6236 version_type=linux # correct to gnu/linux during the next big refactor 6237 need_lib_prefix=no 6238 need_version=no 6239 dynamic_linker="$host_os runtime_loader" 6240 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6241 soname_spec='$libname$release$shared_ext$major' 6242 shlibpath_var=LIBRARY_PATH 6243 shlibpath_overrides_runpath=no 6244 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6245 hardcode_into_libs=yes 6246 ;; 6247 6248hpux9* | hpux10* | hpux11*) 6249 # Give a soname corresponding to the major version so that dld.sl refuses to 6250 # link against other versions. 6251 version_type=sunos 6252 need_lib_prefix=no 6253 need_version=no 6254 case $host_cpu in 6255 ia64*) 6256 shrext_cmds='.so' 6257 hardcode_into_libs=yes 6258 dynamic_linker="$host_os dld.so" 6259 shlibpath_var=LD_LIBRARY_PATH 6260 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6261 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6262 soname_spec='$libname$release$shared_ext$major' 6263 if test 32 = "$HPUX_IA64_MODE"; then 6264 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6265 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6266 else 6267 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6268 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6269 fi 6270 ;; 6271 hppa*64*) 6272 shrext_cmds='.sl' 6273 hardcode_into_libs=yes 6274 dynamic_linker="$host_os dld.sl" 6275 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6276 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6277 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6278 soname_spec='$libname$release$shared_ext$major' 6279 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6280 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6281 ;; 6282 *) 6283 shrext_cmds='.sl' 6284 dynamic_linker="$host_os dld.sl" 6285 shlibpath_var=SHLIB_PATH 6286 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6287 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6288 soname_spec='$libname$release$shared_ext$major' 6289 ;; 6290 esac 6291 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6292 postinstall_cmds='chmod 555 $lib' 6293 # or fails outright, so override atomically: 6294 install_override_mode=555 6295 ;; 6296 6297interix[[3-9]]*) 6298 version_type=linux # correct to gnu/linux during the next big refactor 6299 need_lib_prefix=no 6300 need_version=no 6301 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6302 soname_spec='$libname$release$shared_ext$major' 6303 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6304 shlibpath_var=LD_LIBRARY_PATH 6305 shlibpath_overrides_runpath=no 6306 hardcode_into_libs=yes 6307 ;; 6308 6309irix5* | irix6* | nonstopux*) 6310 case $host_os in 6311 nonstopux*) version_type=nonstopux ;; 6312 *) 6313 if test yes = "$lt_cv_prog_gnu_ld"; then 6314 version_type=linux # correct to gnu/linux during the next big refactor 6315 else 6316 version_type=irix 6317 fi ;; 6318 esac 6319 need_lib_prefix=no 6320 need_version=no 6321 soname_spec='$libname$release$shared_ext$major' 6322 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6323 case $host_os in 6324 irix5* | nonstopux*) 6325 libsuff= shlibsuff= 6326 ;; 6327 *) 6328 case $LD in # libtool.m4 will add one of these switches to LD 6329 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6330 libsuff= shlibsuff= libmagic=32-bit;; 6331 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6332 libsuff=32 shlibsuff=N32 libmagic=N32;; 6333 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6334 libsuff=64 shlibsuff=64 libmagic=64-bit;; 6335 *) libsuff= shlibsuff= libmagic=never-match;; 6336 esac 6337 ;; 6338 esac 6339 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6340 shlibpath_overrides_runpath=no 6341 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6342 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6343 hardcode_into_libs=yes 6344 ;; 6345 6346# No shared lib support for Linux oldld, aout, or coff. 6347linux*oldld* | linux*aout* | linux*coff*) 6348 dynamic_linker=no 6349 ;; 6350 6351linux*android*) 6352 version_type=none # Android doesn't support versioned libraries. 6353 need_lib_prefix=no 6354 need_version=no 6355 library_names_spec='$libname$release$shared_ext' 6356 soname_spec='$libname$release$shared_ext' 6357 finish_cmds= 6358 shlibpath_var=LD_LIBRARY_PATH 6359 shlibpath_overrides_runpath=yes 6360 6361 # This implies no fast_install, which is unacceptable. 6362 # Some rework will be needed to allow for fast_install 6363 # before this can be enabled. 6364 hardcode_into_libs=yes 6365 6366 dynamic_linker='Android linker' 6367 # Don't embed -rpath directories since the linker doesn't support them. 6368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6369 ;; 6370 6371# This must be glibc/ELF. 6372linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6373 version_type=linux # correct to gnu/linux during the next big refactor 6374 need_lib_prefix=no 6375 need_version=no 6376 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6377 soname_spec='$libname$release$shared_ext$major' 6378 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6379 shlibpath_var=LD_LIBRARY_PATH 6380 shlibpath_overrides_runpath=no 6381 6382 # Some binutils ld are patched to set DT_RUNPATH 6383 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6384 [lt_cv_shlibpath_overrides_runpath=no 6385 save_LDFLAGS=$LDFLAGS 6386 save_libdir=$libdir 6387 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6388 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6389 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6390 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6391 [lt_cv_shlibpath_overrides_runpath=yes])]) 6392 LDFLAGS=$save_LDFLAGS 6393 libdir=$save_libdir 6394 ]) 6395 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6396 6397 # This implies no fast_install, which is unacceptable. 6398 # Some rework will be needed to allow for fast_install 6399 # before this can be enabled. 6400 hardcode_into_libs=yes 6401 6402 # Ideally, we could use ldconfig to report *all* directores which are 6403 # searched for libraries, however this is still not possible. Aside from not 6404 # being certain /sbin/ldconfig is available, command 6405 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6406 # even though it is searched at run-time. Try to do the best guess by 6407 # appending ld.so.conf contents (and includes) to the search path. 6408 if test -f /etc/ld.so.conf; then 6409 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' ' '` 6410 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6411 fi 6412 6413 # We used to test for /lib/ld.so.1 and disable shared libraries on 6414 # powerpc, because MkLinux only supported shared libraries with the 6415 # GNU dynamic linker. Since this was broken with cross compilers, 6416 # most powerpc-linux boxes support dynamic linking these days and 6417 # people can always --disable-shared, the test was removed, and we 6418 # assume the GNU/Linux dynamic linker is in use. 6419 dynamic_linker='GNU/Linux ld.so' 6420 ;; 6421 6422netbsd*) 6423 version_type=sunos 6424 need_lib_prefix=no 6425 need_version=no 6426 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6427 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6428 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6429 dynamic_linker='NetBSD (a.out) ld.so' 6430 else 6431 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6432 soname_spec='$libname$release$shared_ext$major' 6433 dynamic_linker='NetBSD ld.elf_so' 6434 fi 6435 shlibpath_var=LD_LIBRARY_PATH 6436 shlibpath_overrides_runpath=yes 6437 hardcode_into_libs=yes 6438 ;; 6439 6440newsos6) 6441 version_type=linux # correct to gnu/linux during the next big refactor 6442 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6443 shlibpath_var=LD_LIBRARY_PATH 6444 shlibpath_overrides_runpath=yes 6445 ;; 6446 6447*nto* | *qnx*) 6448 version_type=qnx 6449 need_lib_prefix=no 6450 need_version=no 6451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6452 soname_spec='$libname$release$shared_ext$major' 6453 shlibpath_var=LD_LIBRARY_PATH 6454 shlibpath_overrides_runpath=no 6455 hardcode_into_libs=yes 6456 dynamic_linker='ldqnx.so' 6457 ;; 6458 6459openbsd* | bitrig*) 6460 version_type=sunos 6461 sys_lib_dlsearch_path_spec=/usr/lib 6462 need_lib_prefix=no 6463 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6464 need_version=no 6465 else 6466 need_version=yes 6467 fi 6468 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6469 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6470 shlibpath_var=LD_LIBRARY_PATH 6471 shlibpath_overrides_runpath=yes 6472 ;; 6473 6474os2*) 6475 libname_spec='$name' 6476 version_type=windows 6477 shrext_cmds=.dll 6478 need_version=no 6479 need_lib_prefix=no 6480 # OS/2 can only load a DLL with a base name of 8 characters or less. 6481 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6482 v=$($ECHO $release$versuffix | tr -d .-); 6483 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6484 $ECHO $n$v`$shared_ext' 6485 library_names_spec='${libname}_dll.$libext' 6486 dynamic_linker='OS/2 ld.exe' 6487 shlibpath_var=BEGINLIBPATH 6488 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6489 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6490 postinstall_cmds='base_file=`basename \$file`~ 6491 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6492 dldir=$destdir/`dirname \$dlpath`~ 6493 test -d \$dldir || mkdir -p \$dldir~ 6494 $install_prog $dir/$dlname \$dldir/$dlname~ 6495 chmod a+x \$dldir/$dlname~ 6496 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6497 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6498 fi' 6499 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6500 dlpath=$dir/\$dldll~ 6501 $RM \$dlpath' 6502 ;; 6503 6504osf3* | osf4* | osf5*) 6505 version_type=osf 6506 need_lib_prefix=no 6507 need_version=no 6508 soname_spec='$libname$release$shared_ext$major' 6509 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6510 shlibpath_var=LD_LIBRARY_PATH 6511 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6512 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6513 ;; 6514 6515rdos*) 6516 dynamic_linker=no 6517 ;; 6518 6519solaris*) 6520 version_type=linux # correct to gnu/linux during the next big refactor 6521 need_lib_prefix=no 6522 need_version=no 6523 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6524 soname_spec='$libname$release$shared_ext$major' 6525 shlibpath_var=LD_LIBRARY_PATH 6526 shlibpath_overrides_runpath=yes 6527 hardcode_into_libs=yes 6528 # ldd complains unless libraries are executable 6529 postinstall_cmds='chmod +x $lib' 6530 ;; 6531 6532sunos4*) 6533 version_type=sunos 6534 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6535 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6536 shlibpath_var=LD_LIBRARY_PATH 6537 shlibpath_overrides_runpath=yes 6538 if test yes = "$with_gnu_ld"; then 6539 need_lib_prefix=no 6540 fi 6541 need_version=yes 6542 ;; 6543 6544sysv4 | sysv4.3*) 6545 version_type=linux # correct to gnu/linux during the next big refactor 6546 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6547 soname_spec='$libname$release$shared_ext$major' 6548 shlibpath_var=LD_LIBRARY_PATH 6549 case $host_vendor in 6550 sni) 6551 shlibpath_overrides_runpath=no 6552 need_lib_prefix=no 6553 runpath_var=LD_RUN_PATH 6554 ;; 6555 siemens) 6556 need_lib_prefix=no 6557 ;; 6558 motorola) 6559 need_lib_prefix=no 6560 need_version=no 6561 shlibpath_overrides_runpath=no 6562 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6563 ;; 6564 esac 6565 ;; 6566 6567sysv4*MP*) 6568 if test -d /usr/nec; then 6569 version_type=linux # correct to gnu/linux during the next big refactor 6570 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6571 soname_spec='$libname$shared_ext.$major' 6572 shlibpath_var=LD_LIBRARY_PATH 6573 fi 6574 ;; 6575 6576sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6577 version_type=sco 6578 need_lib_prefix=no 6579 need_version=no 6580 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6581 soname_spec='$libname$release$shared_ext$major' 6582 shlibpath_var=LD_LIBRARY_PATH 6583 shlibpath_overrides_runpath=yes 6584 hardcode_into_libs=yes 6585 if test yes = "$with_gnu_ld"; then 6586 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6587 else 6588 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6589 case $host_os in 6590 sco3.2v5*) 6591 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6592 ;; 6593 esac 6594 fi 6595 sys_lib_dlsearch_path_spec='/usr/lib' 6596 ;; 6597 6598tpf*) 6599 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6600 version_type=linux # correct to gnu/linux during the next big refactor 6601 need_lib_prefix=no 6602 need_version=no 6603 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6604 shlibpath_var=LD_LIBRARY_PATH 6605 shlibpath_overrides_runpath=no 6606 hardcode_into_libs=yes 6607 ;; 6608 6609uts4*) 6610 version_type=linux # correct to gnu/linux during the next big refactor 6611 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6612 soname_spec='$libname$release$shared_ext$major' 6613 shlibpath_var=LD_LIBRARY_PATH 6614 ;; 6615 6616*) 6617 dynamic_linker=no 6618 ;; 6619esac 6620AC_MSG_RESULT([$dynamic_linker]) 6621test no = "$dynamic_linker" && can_build_shared=no 6622 6623variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6624if test yes = "$GCC"; then 6625 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6626fi 6627 6628if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6629 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6630fi 6631 6632if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6633 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6634fi 6635 6636# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6637configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6638 6639# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6640func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6641 6642# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6643configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6644 6645_LT_DECL([], [variables_saved_for_relink], [1], 6646 [Variables whose values should be saved in libtool wrapper scripts and 6647 restored at link time]) 6648_LT_DECL([], [need_lib_prefix], [0], 6649 [Do we need the "lib" prefix for modules?]) 6650_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6651_LT_DECL([], [version_type], [0], [Library versioning type]) 6652_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6653_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6654_LT_DECL([], [shlibpath_overrides_runpath], [0], 6655 [Is shlibpath searched before the hard-coded library search path?]) 6656_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6657_LT_DECL([], [library_names_spec], [1], 6658 [[List of archive names. First name is the real one, the rest are links. 6659 The last name is the one that the linker finds with -lNAME]]) 6660_LT_DECL([], [soname_spec], [1], 6661 [[The coded name of the library, if different from the real name]]) 6662_LT_DECL([], [install_override_mode], [1], 6663 [Permission mode override for installation of shared libraries]) 6664_LT_DECL([], [postinstall_cmds], [2], 6665 [Command to use after installation of a shared archive]) 6666_LT_DECL([], [postuninstall_cmds], [2], 6667 [Command to use after uninstallation of a shared archive]) 6668_LT_DECL([], [finish_cmds], [2], 6669 [Commands used to finish a libtool library installation in a directory]) 6670_LT_DECL([], [finish_eval], [1], 6671 [[As "finish_cmds", except a single script fragment to be evaled but 6672 not shown]]) 6673_LT_DECL([], [hardcode_into_libs], [0], 6674 [Whether we should hardcode library paths into libraries]) 6675_LT_DECL([], [sys_lib_search_path_spec], [2], 6676 [Compile-time system search path for libraries]) 6677_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6678 [Detected run-time system search path for libraries]) 6679_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6680 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6681])# _LT_SYS_DYNAMIC_LINKER 6682 6683 6684# _LT_PATH_TOOL_PREFIX(TOOL) 6685# -------------------------- 6686# find a file program that can recognize shared library 6687AC_DEFUN([_LT_PATH_TOOL_PREFIX], 6688[m4_require([_LT_DECL_EGREP])dnl 6689AC_MSG_CHECKING([for $1]) 6690AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6691[case $MAGIC_CMD in 6692[[\\/*] | ?:[\\/]*]) 6693 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6694 ;; 6695*) 6696 lt_save_MAGIC_CMD=$MAGIC_CMD 6697 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6698dnl $ac_dummy forces splitting on constant user-supplied paths. 6699dnl POSIX.2 word splitting is done only on the output of word expansions, 6700dnl not every word. This closes a longstanding sh security hole. 6701 ac_dummy="m4_if([$2], , $PATH, [$2])" 6702 for ac_dir in $ac_dummy; do 6703 IFS=$lt_save_ifs 6704 test -z "$ac_dir" && ac_dir=. 6705 if test -f "$ac_dir/$1"; then 6706 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6707 if test -n "$file_magic_test_file"; then 6708 case $deplibs_check_method in 6709 "file_magic "*) 6710 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6711 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6712 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6713 $EGREP "$file_magic_regex" > /dev/null; then 6714 : 6715 else 6716 cat <<_LT_EOF 1>&2 6717 6718*** Warning: the command libtool uses to detect shared libraries, 6719*** $file_magic_cmd, produces output that libtool cannot recognize. 6720*** The result is that libtool may fail to recognize shared libraries 6721*** as such. This will affect the creation of libtool libraries that 6722*** depend on shared libraries, but programs linked with such libtool 6723*** libraries will work regardless of this problem. Nevertheless, you 6724*** may want to report the problem to your system manager and/or to 6725*** bug-libtool@gnu.org 6726 6727_LT_EOF 6728 fi ;; 6729 esac 6730 fi 6731 break 6732 fi 6733 done 6734 IFS=$lt_save_ifs 6735 MAGIC_CMD=$lt_save_MAGIC_CMD 6736 ;; 6737esac]) 6738MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6739if test -n "$MAGIC_CMD"; then 6740 AC_MSG_RESULT($MAGIC_CMD) 6741else 6742 AC_MSG_RESULT(no) 6743fi 6744_LT_DECL([], [MAGIC_CMD], [0], 6745 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6746])# _LT_PATH_TOOL_PREFIX 6747 6748# Old name: 6749AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6750dnl aclocal-1.4 backwards compatibility: 6751dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6752 6753 6754# _LT_PATH_MAGIC 6755# -------------- 6756# find a file program that can recognize a shared library 6757m4_defun([_LT_PATH_MAGIC], 6758[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6759if test -z "$lt_cv_path_MAGIC_CMD"; then 6760 if test -n "$ac_tool_prefix"; then 6761 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6762 else 6763 MAGIC_CMD=: 6764 fi 6765fi 6766])# _LT_PATH_MAGIC 6767 6768 6769# LT_PATH_LD 6770# ---------- 6771# find the pathname to the GNU or non-GNU linker 6772AC_DEFUN([LT_PATH_LD], 6773[AC_REQUIRE([AC_PROG_CC])dnl 6774AC_REQUIRE([AC_CANONICAL_HOST])dnl 6775AC_REQUIRE([AC_CANONICAL_BUILD])dnl 6776m4_require([_LT_DECL_SED])dnl 6777m4_require([_LT_DECL_EGREP])dnl 6778m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6779 6780AC_ARG_WITH([gnu-ld], 6781 [AS_HELP_STRING([--with-gnu-ld], 6782 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6783 [test no = "$withval" || with_gnu_ld=yes], 6784 [with_gnu_ld=no])dnl 6785 6786ac_prog=ld 6787if test yes = "$GCC"; then 6788 # Check if gcc -print-prog-name=ld gives a path. 6789 AC_MSG_CHECKING([for ld used by $CC]) 6790 case $host in 6791 *-*-mingw*) 6792 # gcc leaves a trailing carriage return, which upsets mingw 6793 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6794 *) 6795 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6796 esac 6797 case $ac_prog in 6798 # Accept absolute paths. 6799 [[\\/]]* | ?:[[\\/]]*) 6800 re_direlt='/[[^/]][[^/]]*/\.\./' 6801 # Canonicalize the pathname of ld 6802 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6803 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6804 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6805 done 6806 test -z "$LD" && LD=$ac_prog 6807 ;; 6808 "") 6809 # If it fails, then pretend we aren't using GCC. 6810 ac_prog=ld 6811 ;; 6812 *) 6813 # If it is relative, then search for the first ld in PATH. 6814 with_gnu_ld=unknown 6815 ;; 6816 esac 6817elif test yes = "$with_gnu_ld"; then 6818 AC_MSG_CHECKING([for GNU ld]) 6819else 6820 AC_MSG_CHECKING([for non-GNU ld]) 6821fi 6822AC_CACHE_VAL(lt_cv_path_LD, 6823[if test -z "$LD"; then 6824 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6825 for ac_dir in $PATH; do 6826 IFS=$lt_save_ifs 6827 test -z "$ac_dir" && ac_dir=. 6828 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6829 lt_cv_path_LD=$ac_dir/$ac_prog 6830 # Check to see if the program is GNU ld. I'd rather use --version, 6831 # but apparently some variants of GNU ld only accept -v. 6832 # Break only if it was the GNU/non-GNU ld that we prefer. 6833 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6834 *GNU* | *'with BFD'*) 6835 test no != "$with_gnu_ld" && break 6836 ;; 6837 *) 6838 test yes != "$with_gnu_ld" && break 6839 ;; 6840 esac 6841 fi 6842 done 6843 IFS=$lt_save_ifs 6844else 6845 lt_cv_path_LD=$LD # Let the user override the test with a path. 6846fi]) 6847LD=$lt_cv_path_LD 6848if test -n "$LD"; then 6849 AC_MSG_RESULT($LD) 6850else 6851 AC_MSG_RESULT(no) 6852fi 6853test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6854_LT_PATH_LD_GNU 6855AC_SUBST([LD]) 6856 6857_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6858])# LT_PATH_LD 6859 6860# Old names: 6861AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6862AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6863dnl aclocal-1.4 backwards compatibility: 6864dnl AC_DEFUN([AM_PROG_LD], []) 6865dnl AC_DEFUN([AC_PROG_LD], []) 6866 6867 6868# _LT_PATH_LD_GNU 6869#- -------------- 6870m4_defun([_LT_PATH_LD_GNU], 6871[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6872[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6873case `$LD -v 2>&1 </dev/null` in 6874*GNU* | *'with BFD'*) 6875 lt_cv_prog_gnu_ld=yes 6876 ;; 6877*) 6878 lt_cv_prog_gnu_ld=no 6879 ;; 6880esac]) 6881with_gnu_ld=$lt_cv_prog_gnu_ld 6882])# _LT_PATH_LD_GNU 6883 6884 6885# _LT_CMD_RELOAD 6886# -------------- 6887# find reload flag for linker 6888# -- PORTME Some linkers may need a different reload flag. 6889m4_defun([_LT_CMD_RELOAD], 6890[AC_CACHE_CHECK([for $LD option to reload object files], 6891 lt_cv_ld_reload_flag, 6892 [lt_cv_ld_reload_flag='-r']) 6893reload_flag=$lt_cv_ld_reload_flag 6894case $reload_flag in 6895"" | " "*) ;; 6896*) reload_flag=" $reload_flag" ;; 6897esac 6898reload_cmds='$LD$reload_flag -o $output$reload_objs' 6899case $host_os in 6900 cygwin* | mingw* | pw32* | cegcc*) 6901 if test yes != "$GCC"; then 6902 reload_cmds=false 6903 fi 6904 ;; 6905 darwin*) 6906 if test yes = "$GCC"; then 6907 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6908 else 6909 reload_cmds='$LD$reload_flag -o $output$reload_objs' 6910 fi 6911 ;; 6912esac 6913_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6914_LT_TAGDECL([], [reload_cmds], [2])dnl 6915])# _LT_CMD_RELOAD 6916 6917 6918# _LT_PATH_DD 6919# ----------- 6920# find a working dd 6921m4_defun([_LT_PATH_DD], 6922[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6923[printf 0123456789abcdef0123456789abcdef >conftest.i 6924cat conftest.i conftest.i >conftest2.i 6925: ${lt_DD:=$DD} 6926AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6927[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6928 cmp -s conftest.i conftest.out \ 6929 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6930fi]) 6931rm -f conftest.i conftest2.i conftest.out]) 6932])# _LT_PATH_DD 6933 6934 6935# _LT_CMD_TRUNCATE 6936# ---------------- 6937# find command to truncate a binary pipe 6938m4_defun([_LT_CMD_TRUNCATE], 6939[m4_require([_LT_PATH_DD]) 6940AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6941[printf 0123456789abcdef0123456789abcdef >conftest.i 6942cat conftest.i conftest.i >conftest2.i 6943lt_cv_truncate_bin= 6944if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6945 cmp -s conftest.i conftest.out \ 6946 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6947fi 6948rm -f conftest.i conftest2.i conftest.out 6949test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6950_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6951 [Command to truncate a binary pipe]) 6952])# _LT_CMD_TRUNCATE 6953 6954 6955# _LT_CHECK_MAGIC_METHOD 6956# ---------------------- 6957# how to check for library dependencies 6958# -- PORTME fill in with the dynamic library characteristics 6959m4_defun([_LT_CHECK_MAGIC_METHOD], 6960[m4_require([_LT_DECL_EGREP]) 6961m4_require([_LT_DECL_OBJDUMP]) 6962AC_CACHE_CHECK([how to recognize dependent libraries], 6963lt_cv_deplibs_check_method, 6964[lt_cv_file_magic_cmd='$MAGIC_CMD' 6965lt_cv_file_magic_test_file= 6966lt_cv_deplibs_check_method='unknown' 6967# Need to set the preceding variable on all platforms that support 6968# interlibrary dependencies. 6969# 'none' -- dependencies not supported. 6970# 'unknown' -- same as none, but documents that we really don't know. 6971# 'pass_all' -- all dependencies passed with no checks. 6972# 'test_compile' -- check by making test program. 6973# 'file_magic [[regex]]' -- check by looking for files in library path 6974# that responds to the $file_magic_cmd with a given extended regex. 6975# If you have 'file' or equivalent on your system and you're not sure 6976# whether 'pass_all' will *always* work, you probably want this one. 6977 6978case $host_os in 6979aix[[4-9]]*) 6980 lt_cv_deplibs_check_method=pass_all 6981 ;; 6982 6983beos*) 6984 lt_cv_deplibs_check_method=pass_all 6985 ;; 6986 6987bsdi[[45]]*) 6988 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6989 lt_cv_file_magic_cmd='$FILECMD -L' 6990 lt_cv_file_magic_test_file=/shlib/libc.so 6991 ;; 6992 6993cygwin*) 6994 # func_win32_libid is a shell function defined in ltmain.sh 6995 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6996 lt_cv_file_magic_cmd='func_win32_libid' 6997 ;; 6998 6999mingw* | pw32*) 7000 # Base MSYS/MinGW do not provide the 'file' command needed by 7001 # func_win32_libid shell function, so use a weaker test based on 'objdump', 7002 # unless we find 'file', for example because we are cross-compiling. 7003 if ( file / ) >/dev/null 2>&1; then 7004 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 7005 lt_cv_file_magic_cmd='func_win32_libid' 7006 else 7007 # Keep this pattern in sync with the one in func_win32_libid. 7008 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 7009 lt_cv_file_magic_cmd='$OBJDUMP -f' 7010 fi 7011 ;; 7012 7013cegcc*) 7014 # use the weaker test based on 'objdump'. See mingw*. 7015 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 7016 lt_cv_file_magic_cmd='$OBJDUMP -f' 7017 ;; 7018 7019darwin* | rhapsody*) 7020 lt_cv_deplibs_check_method=pass_all 7021 ;; 7022 7023freebsd* | dragonfly* | midnightbsd*) 7024 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7025 case $host_cpu in 7026 i*86 ) 7027 # Not sure whether the presence of OpenBSD here was a mistake. 7028 # Let's accept both of them until this is cleared up. 7029 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 7030 lt_cv_file_magic_cmd=$FILECMD 7031 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 7032 ;; 7033 esac 7034 else 7035 lt_cv_deplibs_check_method=pass_all 7036 fi 7037 ;; 7038 7039haiku*) 7040 lt_cv_deplibs_check_method=pass_all 7041 ;; 7042 7043hpux10.20* | hpux11*) 7044 lt_cv_file_magic_cmd=$FILECMD 7045 case $host_cpu in 7046 ia64*) 7047 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 7048 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 7049 ;; 7050 hppa*64*) 7051 [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]'] 7052 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 7053 ;; 7054 *) 7055 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 7056 lt_cv_file_magic_test_file=/usr/lib/libc.sl 7057 ;; 7058 esac 7059 ;; 7060 7061interix[[3-9]]*) 7062 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 7063 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 7064 ;; 7065 7066irix5* | irix6* | nonstopux*) 7067 case $LD in 7068 *-32|*"-32 ") libmagic=32-bit;; 7069 *-n32|*"-n32 ") libmagic=N32;; 7070 *-64|*"-64 ") libmagic=64-bit;; 7071 *) libmagic=never-match;; 7072 esac 7073 lt_cv_deplibs_check_method=pass_all 7074 ;; 7075 7076# This must be glibc/ELF. 7077linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7078 lt_cv_deplibs_check_method=pass_all 7079 ;; 7080 7081netbsd*) 7082 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7083 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7084 else 7085 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 7086 fi 7087 ;; 7088 7089newos6*) 7090 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7091 lt_cv_file_magic_cmd=$FILECMD 7092 lt_cv_file_magic_test_file=/usr/lib/libnls.so 7093 ;; 7094 7095*nto* | *qnx*) 7096 lt_cv_deplibs_check_method=pass_all 7097 ;; 7098 7099openbsd* | bitrig*) 7100 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7101 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 7102 else 7103 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7104 fi 7105 ;; 7106 7107osf3* | osf4* | osf5*) 7108 lt_cv_deplibs_check_method=pass_all 7109 ;; 7110 7111rdos*) 7112 lt_cv_deplibs_check_method=pass_all 7113 ;; 7114 7115solaris*) 7116 lt_cv_deplibs_check_method=pass_all 7117 ;; 7118 7119sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7120 lt_cv_deplibs_check_method=pass_all 7121 ;; 7122 7123sysv4 | sysv4.3*) 7124 case $host_vendor in 7125 motorola) 7126 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]]' 7127 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7128 ;; 7129 ncr) 7130 lt_cv_deplibs_check_method=pass_all 7131 ;; 7132 sequent) 7133 lt_cv_file_magic_cmd='/bin/file' 7134 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7135 ;; 7136 sni) 7137 lt_cv_file_magic_cmd='/bin/file' 7138 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7139 lt_cv_file_magic_test_file=/lib/libc.so 7140 ;; 7141 siemens) 7142 lt_cv_deplibs_check_method=pass_all 7143 ;; 7144 pc) 7145 lt_cv_deplibs_check_method=pass_all 7146 ;; 7147 esac 7148 ;; 7149 7150tpf*) 7151 lt_cv_deplibs_check_method=pass_all 7152 ;; 7153os2*) 7154 lt_cv_deplibs_check_method=pass_all 7155 ;; 7156esac 7157]) 7158 7159file_magic_glob= 7160want_nocaseglob=no 7161if test "$build" = "$host"; then 7162 case $host_os in 7163 mingw* | pw32*) 7164 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7165 want_nocaseglob=yes 7166 else 7167 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7168 fi 7169 ;; 7170 esac 7171fi 7172 7173file_magic_cmd=$lt_cv_file_magic_cmd 7174deplibs_check_method=$lt_cv_deplibs_check_method 7175test -z "$deplibs_check_method" && deplibs_check_method=unknown 7176 7177_LT_DECL([], [deplibs_check_method], [1], 7178 [Method to check whether dependent libraries are shared objects]) 7179_LT_DECL([], [file_magic_cmd], [1], 7180 [Command to use when deplibs_check_method = "file_magic"]) 7181_LT_DECL([], [file_magic_glob], [1], 7182 [How to find potential files when deplibs_check_method = "file_magic"]) 7183_LT_DECL([], [want_nocaseglob], [1], 7184 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7185])# _LT_CHECK_MAGIC_METHOD 7186 7187 7188# LT_PATH_NM 7189# ---------- 7190# find the pathname to a BSD- or MS-compatible name lister 7191AC_DEFUN([LT_PATH_NM], 7192[AC_REQUIRE([AC_PROG_CC])dnl 7193AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7194[if test -n "$NM"; then 7195 # Let the user override the test. 7196 lt_cv_path_NM=$NM 7197else 7198 lt_nm_to_check=${ac_tool_prefix}nm 7199 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7200 lt_nm_to_check="$lt_nm_to_check nm" 7201 fi 7202 for lt_tmp_nm in $lt_nm_to_check; do 7203 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7204 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7205 IFS=$lt_save_ifs 7206 test -z "$ac_dir" && ac_dir=. 7207 tmp_nm=$ac_dir/$lt_tmp_nm 7208 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7209 # Check to see if the nm accepts a BSD-compat flag. 7210 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7211 # nm: unknown option "B" ignored 7212 # Tru64's nm complains that /dev/null is an invalid object file 7213 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7214 case $build_os in 7215 mingw*) lt_bad_file=conftest.nm/nofile ;; 7216 *) lt_bad_file=/dev/null ;; 7217 esac 7218 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7219 *$lt_bad_file* | *'Invalid file or object type'*) 7220 lt_cv_path_NM="$tmp_nm -B" 7221 break 2 7222 ;; 7223 *) 7224 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7225 */dev/null*) 7226 lt_cv_path_NM="$tmp_nm -p" 7227 break 2 7228 ;; 7229 *) 7230 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7231 continue # so that we can try to find one that supports BSD flags 7232 ;; 7233 esac 7234 ;; 7235 esac 7236 fi 7237 done 7238 IFS=$lt_save_ifs 7239 done 7240 : ${lt_cv_path_NM=no} 7241fi]) 7242if test no != "$lt_cv_path_NM"; then 7243 NM=$lt_cv_path_NM 7244else 7245 # Didn't find any BSD compatible name lister, look for dumpbin. 7246 if test -n "$DUMPBIN"; then : 7247 # Let the user override the test. 7248 else 7249 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7250 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7251 *COFF*) 7252 DUMPBIN="$DUMPBIN -symbols -headers" 7253 ;; 7254 *) 7255 DUMPBIN=: 7256 ;; 7257 esac 7258 fi 7259 AC_SUBST([DUMPBIN]) 7260 if test : != "$DUMPBIN"; then 7261 NM=$DUMPBIN 7262 fi 7263fi 7264test -z "$NM" && NM=nm 7265AC_SUBST([NM]) 7266_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7267 7268AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7269 [lt_cv_nm_interface="BSD nm" 7270 echo "int some_variable = 0;" > conftest.$ac_ext 7271 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7272 (eval "$ac_compile" 2>conftest.err) 7273 cat conftest.err >&AS_MESSAGE_LOG_FD 7274 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7275 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7276 cat conftest.err >&AS_MESSAGE_LOG_FD 7277 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7278 cat conftest.out >&AS_MESSAGE_LOG_FD 7279 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7280 lt_cv_nm_interface="MS dumpbin" 7281 fi 7282 rm -f conftest*]) 7283])# LT_PATH_NM 7284 7285# Old names: 7286AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7287AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7288dnl aclocal-1.4 backwards compatibility: 7289dnl AC_DEFUN([AM_PROG_NM], []) 7290dnl AC_DEFUN([AC_PROG_NM], []) 7291 7292# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7293# -------------------------------- 7294# how to determine the name of the shared library 7295# associated with a specific link library. 7296# -- PORTME fill in with the dynamic library characteristics 7297m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7298[m4_require([_LT_DECL_EGREP]) 7299m4_require([_LT_DECL_OBJDUMP]) 7300m4_require([_LT_DECL_DLLTOOL]) 7301AC_CACHE_CHECK([how to associate runtime and link libraries], 7302lt_cv_sharedlib_from_linklib_cmd, 7303[lt_cv_sharedlib_from_linklib_cmd='unknown' 7304 7305case $host_os in 7306cygwin* | mingw* | pw32* | cegcc*) 7307 # two different shell functions defined in ltmain.sh; 7308 # decide which one to use based on capabilities of $DLLTOOL 7309 case `$DLLTOOL --help 2>&1` in 7310 *--identify-strict*) 7311 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7312 ;; 7313 *) 7314 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7315 ;; 7316 esac 7317 ;; 7318*) 7319 # fallback: assume linklib IS sharedlib 7320 lt_cv_sharedlib_from_linklib_cmd=$ECHO 7321 ;; 7322esac 7323]) 7324sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7325test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7326 7327_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7328 [Command to associate shared and link libraries]) 7329])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7330 7331 7332# _LT_PATH_MANIFEST_TOOL 7333# ---------------------- 7334# locate the manifest tool 7335m4_defun([_LT_PATH_MANIFEST_TOOL], 7336[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7337test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7338AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7339 [lt_cv_path_mainfest_tool=no 7340 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7341 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7342 cat conftest.err >&AS_MESSAGE_LOG_FD 7343 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7344 lt_cv_path_mainfest_tool=yes 7345 fi 7346 rm -f conftest*]) 7347if test yes != "$lt_cv_path_mainfest_tool"; then 7348 MANIFEST_TOOL=: 7349fi 7350_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7351])# _LT_PATH_MANIFEST_TOOL 7352 7353 7354# _LT_DLL_DEF_P([FILE]) 7355# --------------------- 7356# True iff FILE is a Windows DLL '.def' file. 7357# Keep in sync with func_dll_def_p in the libtool script 7358AC_DEFUN([_LT_DLL_DEF_P], 7359[dnl 7360 test DEF = "`$SED -n dnl 7361 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7362 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7363 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7364 -e q dnl Only consider the first "real" line 7365 $1`" dnl 7366])# _LT_DLL_DEF_P 7367 7368 7369# LT_LIB_M 7370# -------- 7371# check for math library 7372AC_DEFUN([LT_LIB_M], 7373[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7374LIBM= 7375case $host in 7376*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7377 # These system don't have libm, or don't need it 7378 ;; 7379*-ncr-sysv4.3*) 7380 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7381 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7382 ;; 7383*) 7384 AC_CHECK_LIB(m, cos, LIBM=-lm) 7385 ;; 7386esac 7387AC_SUBST([LIBM]) 7388])# LT_LIB_M 7389 7390# Old name: 7391AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7392dnl aclocal-1.4 backwards compatibility: 7393dnl AC_DEFUN([AC_CHECK_LIBM], []) 7394 7395 7396# _LT_COMPILER_NO_RTTI([TAGNAME]) 7397# ------------------------------- 7398m4_defun([_LT_COMPILER_NO_RTTI], 7399[m4_require([_LT_TAG_COMPILER])dnl 7400 7401_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7402 7403if test yes = "$GCC"; then 7404 case $cc_basename in 7405 nvcc*) 7406 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7407 *) 7408 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7409 esac 7410 7411 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7412 lt_cv_prog_compiler_rtti_exceptions, 7413 [-fno-rtti -fno-exceptions], [], 7414 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7415fi 7416_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7417 [Compiler flag to turn off builtin functions]) 7418])# _LT_COMPILER_NO_RTTI 7419 7420 7421# _LT_CMD_GLOBAL_SYMBOLS 7422# ---------------------- 7423m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7424[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7425AC_REQUIRE([AC_PROG_CC])dnl 7426AC_REQUIRE([AC_PROG_AWK])dnl 7427AC_REQUIRE([LT_PATH_NM])dnl 7428AC_REQUIRE([LT_PATH_LD])dnl 7429m4_require([_LT_DECL_SED])dnl 7430m4_require([_LT_DECL_EGREP])dnl 7431m4_require([_LT_TAG_COMPILER])dnl 7432 7433# Check for command to grab the raw symbol name followed by C symbol from nm. 7434AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7435AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7436[ 7437# These are sane defaults that work on at least a few old systems. 7438# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7439 7440# Character class describing NM global symbol codes. 7441symcode='[[BCDEGRST]]' 7442 7443# Regexp to match symbols that can be accessed directly from C. 7444sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7445 7446# Define system-specific variables. 7447case $host_os in 7448aix*) 7449 symcode='[[BCDT]]' 7450 ;; 7451cygwin* | mingw* | pw32* | cegcc*) 7452 symcode='[[ABCDGISTW]]' 7453 ;; 7454hpux*) 7455 if test ia64 = "$host_cpu"; then 7456 symcode='[[ABCDEGRST]]' 7457 fi 7458 ;; 7459irix* | nonstopux*) 7460 symcode='[[BCDEGRST]]' 7461 ;; 7462osf*) 7463 symcode='[[BCDEGQRST]]' 7464 ;; 7465solaris*) 7466 symcode='[[BDRT]]' 7467 ;; 7468sco3.2v5*) 7469 symcode='[[DT]]' 7470 ;; 7471sysv4.2uw2*) 7472 symcode='[[DT]]' 7473 ;; 7474sysv5* | sco5v6* | unixware* | OpenUNIX*) 7475 symcode='[[ABDT]]' 7476 ;; 7477sysv4) 7478 symcode='[[DFNSTU]]' 7479 ;; 7480esac 7481 7482# If we're using GNU nm, then use its standard symbol codes. 7483case `$NM -V 2>&1` in 7484*GNU* | *'with BFD'*) 7485 symcode='[[ABCDGIRSTW]]' ;; 7486esac 7487 7488if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7489 # Gets list of data symbols to import. 7490 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7491 # Adjust the below global symbol transforms to fixup imported variables. 7492 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7493 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7494 lt_c_name_lib_hook="\ 7495 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7496 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7497else 7498 # Disable hooks by default. 7499 lt_cv_sys_global_symbol_to_import= 7500 lt_cdecl_hook= 7501 lt_c_name_hook= 7502 lt_c_name_lib_hook= 7503fi 7504 7505# Transform an extracted symbol line into a proper C declaration. 7506# Some systems (esp. on ia64) link data and code symbols differently, 7507# so use this general approach. 7508lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7509$lt_cdecl_hook\ 7510" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7511" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7512 7513# Transform an extracted symbol line into symbol name and symbol address 7514lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7515$lt_c_name_hook\ 7516" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7517" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7518 7519# Transform an extracted symbol line into symbol name with lib prefix and 7520# symbol address. 7521lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7522$lt_c_name_lib_hook\ 7523" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7524" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7525" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7526 7527# Handle CRLF in mingw tool chain 7528opt_cr= 7529case $build_os in 7530mingw*) 7531 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7532 ;; 7533esac 7534 7535# Try without a prefix underscore, then with it. 7536for ac_symprfx in "" "_"; do 7537 7538 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7539 symxfrm="\\1 $ac_symprfx\\2 \\2" 7540 7541 # Write the raw and C identifiers. 7542 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7543 # Fake it for dumpbin and say T for any non-static function, 7544 # D for any global variable and I for any imported variable. 7545 # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7546 # which start with @ or ?. 7547 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7548" {last_section=section; section=\$ 3};"\ 7549" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7550" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7551" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7552" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7553" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7554" \$ 0!~/External *\|/{next};"\ 7555" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7556" {if(hide[section]) next};"\ 7557" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7558" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7559" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7560" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7561" ' prfx=^$ac_symprfx]" 7562 else 7563 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7564 fi 7565 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7566 7567 # Check to see that the pipe works correctly. 7568 pipe_works=no 7569 7570 rm -f conftest* 7571 cat > conftest.$ac_ext <<_LT_EOF 7572#ifdef __cplusplus 7573extern "C" { 7574#endif 7575char nm_test_var; 7576void nm_test_func(void); 7577void nm_test_func(void){} 7578#ifdef __cplusplus 7579} 7580#endif 7581int main(){nm_test_var='a';nm_test_func();return(0);} 7582_LT_EOF 7583 7584 if AC_TRY_EVAL(ac_compile); then 7585 # Now try to grab the symbols. 7586 nlist=conftest.nm 7587 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7588 # Try sorting and uniquifying the output. 7589 if sort "$nlist" | uniq > "$nlist"T; then 7590 mv -f "$nlist"T "$nlist" 7591 else 7592 rm -f "$nlist"T 7593 fi 7594 7595 # Make sure that we snagged all the symbols we need. 7596 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7597 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7598 cat <<_LT_EOF > conftest.$ac_ext 7599/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7600#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7601/* DATA imports from DLLs on WIN32 can't be const, because runtime 7602 relocations are performed -- see ld's documentation on pseudo-relocs. */ 7603# define LT@&t@_DLSYM_CONST 7604#elif defined __osf__ 7605/* This system does not cope well with relocations in const data. */ 7606# define LT@&t@_DLSYM_CONST 7607#else 7608# define LT@&t@_DLSYM_CONST const 7609#endif 7610 7611#ifdef __cplusplus 7612extern "C" { 7613#endif 7614 7615_LT_EOF 7616 # Now generate the symbol file. 7617 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7618 7619 cat <<_LT_EOF >> conftest.$ac_ext 7620 7621/* The mapping between symbol names and symbols. */ 7622LT@&t@_DLSYM_CONST struct { 7623 const char *name; 7624 void *address; 7625} 7626lt__PROGRAM__LTX_preloaded_symbols[[]] = 7627{ 7628 { "@PROGRAM@", (void *) 0 }, 7629_LT_EOF 7630 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7631 cat <<\_LT_EOF >> conftest.$ac_ext 7632 {0, (void *) 0} 7633}; 7634 7635/* This works around a problem in FreeBSD linker */ 7636#ifdef FREEBSD_WORKAROUND 7637static const void *lt_preloaded_setup() { 7638 return lt__PROGRAM__LTX_preloaded_symbols; 7639} 7640#endif 7641 7642#ifdef __cplusplus 7643} 7644#endif 7645_LT_EOF 7646 # Now try linking the two files. 7647 mv conftest.$ac_objext conftstm.$ac_objext 7648 lt_globsym_save_LIBS=$LIBS 7649 lt_globsym_save_CFLAGS=$CFLAGS 7650 LIBS=conftstm.$ac_objext 7651 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7652 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7653 pipe_works=yes 7654 fi 7655 LIBS=$lt_globsym_save_LIBS 7656 CFLAGS=$lt_globsym_save_CFLAGS 7657 else 7658 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7659 fi 7660 else 7661 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7662 fi 7663 else 7664 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7665 fi 7666 else 7667 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7668 cat conftest.$ac_ext >&5 7669 fi 7670 rm -rf conftest* conftst* 7671 7672 # Do not use the global_symbol_pipe unless it works. 7673 if test yes = "$pipe_works"; then 7674 break 7675 else 7676 lt_cv_sys_global_symbol_pipe= 7677 fi 7678done 7679]) 7680if test -z "$lt_cv_sys_global_symbol_pipe"; then 7681 lt_cv_sys_global_symbol_to_cdecl= 7682fi 7683if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7684 AC_MSG_RESULT(failed) 7685else 7686 AC_MSG_RESULT(ok) 7687fi 7688 7689# Response file support. 7690if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7691 nm_file_list_spec='@' 7692elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7693 nm_file_list_spec='@' 7694fi 7695 7696_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7697 [Take the output of nm and produce a listing of raw symbols and C names]) 7698_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7699 [Transform the output of nm in a proper C declaration]) 7700_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7701 [Transform the output of nm into a list of symbols to manually relocate]) 7702_LT_DECL([global_symbol_to_c_name_address], 7703 [lt_cv_sys_global_symbol_to_c_name_address], [1], 7704 [Transform the output of nm in a C name address pair]) 7705_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7706 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7707 [Transform the output of nm in a C name address pair when lib prefix is needed]) 7708_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7709 [The name lister interface]) 7710_LT_DECL([], [nm_file_list_spec], [1], 7711 [Specify filename containing input files for $NM]) 7712]) # _LT_CMD_GLOBAL_SYMBOLS 7713 7714 7715# _LT_COMPILER_PIC([TAGNAME]) 7716# --------------------------- 7717m4_defun([_LT_COMPILER_PIC], 7718[m4_require([_LT_TAG_COMPILER])dnl 7719_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7720_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7721_LT_TAGVAR(lt_prog_compiler_static, $1)= 7722 7723m4_if([$1], [CXX], [ 7724 # C++ specific cases for pic, static, wl, etc. 7725 if test yes = "$GXX"; then 7726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7727 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7728 7729 case $host_os in 7730 aix*) 7731 # All AIX code is PIC. 7732 if test ia64 = "$host_cpu"; then 7733 # AIX 5 now supports IA64 processor 7734 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7735 fi 7736 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7737 ;; 7738 7739 amigaos*) 7740 case $host_cpu in 7741 powerpc) 7742 # see comment about AmigaOS4 .so support 7743 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7744 ;; 7745 m68k) 7746 # FIXME: we need at least 68020 code to build shared libraries, but 7747 # adding the '-m68020' flag to GCC prevents building anything better, 7748 # like '-m68040'. 7749 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7750 ;; 7751 esac 7752 ;; 7753 7754 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7755 # PIC is the default for these OSes. 7756 ;; 7757 mingw* | cygwin* | os2* | pw32* | cegcc*) 7758 # This hack is so that the source file can tell whether it is being 7759 # built for inclusion in a dll (and should export symbols for example). 7760 # Although the cygwin gcc ignores -fPIC, still need this for old-style 7761 # (--disable-auto-import) libraries 7762 m4_if([$1], [GCJ], [], 7763 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7764 case $host_os in 7765 os2*) 7766 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7767 ;; 7768 esac 7769 ;; 7770 darwin* | rhapsody*) 7771 # PIC is the default on this platform 7772 # Common symbols not allowed in MH_DYLIB files 7773 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7774 ;; 7775 *djgpp*) 7776 # DJGPP does not support shared libraries at all 7777 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7778 ;; 7779 haiku*) 7780 # PIC is the default for Haiku. 7781 # The "-static" flag exists, but is broken. 7782 _LT_TAGVAR(lt_prog_compiler_static, $1)= 7783 ;; 7784 interix[[3-9]]*) 7785 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7786 # Instead, we relocate shared libraries at runtime. 7787 ;; 7788 sysv4*MP*) 7789 if test -d /usr/nec; then 7790 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7791 fi 7792 ;; 7793 hpux*) 7794 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7795 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7796 # sets the default TLS model and affects inlining. 7797 case $host_cpu in 7798 hppa*64*) 7799 ;; 7800 *) 7801 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7802 ;; 7803 esac 7804 ;; 7805 *qnx* | *nto*) 7806 # QNX uses GNU C++, but need to define -shared option too, otherwise 7807 # it will coredump. 7808 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7809 ;; 7810 *) 7811 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7812 ;; 7813 esac 7814 else 7815 case $host_os in 7816 aix[[4-9]]*) 7817 # All AIX code is PIC. 7818 if test ia64 = "$host_cpu"; then 7819 # AIX 5 now supports IA64 processor 7820 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7821 else 7822 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7823 fi 7824 ;; 7825 chorus*) 7826 case $cc_basename in 7827 cxch68*) 7828 # Green Hills C++ Compiler 7829 # _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" 7830 ;; 7831 esac 7832 ;; 7833 mingw* | cygwin* | os2* | pw32* | cegcc*) 7834 # This hack is so that the source file can tell whether it is being 7835 # built for inclusion in a dll (and should export symbols for example). 7836 m4_if([$1], [GCJ], [], 7837 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7838 ;; 7839 dgux*) 7840 case $cc_basename in 7841 ec++*) 7842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7843 ;; 7844 ghcx*) 7845 # Green Hills C++ Compiler 7846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7847 ;; 7848 *) 7849 ;; 7850 esac 7851 ;; 7852 freebsd* | dragonfly* | midnightbsd*) 7853 # FreeBSD uses GNU C++ 7854 ;; 7855 hpux9* | hpux10* | hpux11*) 7856 case $cc_basename in 7857 CC*) 7858 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7859 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7860 if test ia64 != "$host_cpu"; then 7861 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7862 fi 7863 ;; 7864 aCC*) 7865 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7866 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7867 case $host_cpu in 7868 hppa*64*|ia64*) 7869 # +Z the default 7870 ;; 7871 *) 7872 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7873 ;; 7874 esac 7875 ;; 7876 *) 7877 ;; 7878 esac 7879 ;; 7880 interix*) 7881 # This is c89, which is MS Visual C++ (no shared libs) 7882 # Anyone wants to do a port? 7883 ;; 7884 irix5* | irix6* | nonstopux*) 7885 case $cc_basename in 7886 CC*) 7887 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7888 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7889 # CC pic flag -KPIC is the default. 7890 ;; 7891 *) 7892 ;; 7893 esac 7894 ;; 7895 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7896 case $cc_basename in 7897 KCC*) 7898 # KAI C++ Compiler 7899 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7900 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7901 ;; 7902 ecpc* ) 7903 # old Intel C++ for x86_64, which still supported -KPIC. 7904 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7905 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7906 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7907 ;; 7908 icpc* ) 7909 # Intel C++, used to be incompatible with GCC. 7910 # ICC 10 doesn't accept -KPIC any more. 7911 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7912 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7913 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7914 ;; 7915 pgCC* | pgcpp*) 7916 # Portland Group C++ compiler 7917 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7918 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7919 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7920 ;; 7921 cxx*) 7922 # Compaq C++ 7923 # Make sure the PIC flag is empty. It appears that all Alpha 7924 # Linux and Compaq Tru64 Unix objects are PIC. 7925 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7926 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7927 ;; 7928 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7929 # IBM XL 8.0, 9.0 on PPC and BlueGene 7930 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7931 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7932 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7933 ;; 7934 *) 7935 case `$CC -V 2>&1 | $SED 5q` in 7936 *Sun\ C*) 7937 # Sun C++ 5.9 7938 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7939 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7940 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7941 ;; 7942 esac 7943 ;; 7944 esac 7945 ;; 7946 lynxos*) 7947 ;; 7948 m88k*) 7949 ;; 7950 mvs*) 7951 case $cc_basename in 7952 cxx*) 7953 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7954 ;; 7955 *) 7956 ;; 7957 esac 7958 ;; 7959 netbsd*) 7960 ;; 7961 *qnx* | *nto*) 7962 # QNX uses GNU C++, but need to define -shared option too, otherwise 7963 # it will coredump. 7964 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7965 ;; 7966 osf3* | osf4* | osf5*) 7967 case $cc_basename in 7968 KCC*) 7969 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7970 ;; 7971 RCC*) 7972 # Rational C++ 2.4.1 7973 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7974 ;; 7975 cxx*) 7976 # Digital/Compaq C++ 7977 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7978 # Make sure the PIC flag is empty. It appears that all Alpha 7979 # Linux and Compaq Tru64 Unix objects are PIC. 7980 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7981 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7982 ;; 7983 *) 7984 ;; 7985 esac 7986 ;; 7987 psos*) 7988 ;; 7989 solaris*) 7990 case $cc_basename in 7991 CC* | sunCC*) 7992 # Sun C++ 4.2, 5.x and Centerline C++ 7993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7994 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7995 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7996 ;; 7997 gcx*) 7998 # Green Hills C++ Compiler 7999 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8000 ;; 8001 *) 8002 ;; 8003 esac 8004 ;; 8005 sunos4*) 8006 case $cc_basename in 8007 CC*) 8008 # Sun C++ 4.x 8009 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8010 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8011 ;; 8012 lcc*) 8013 # Lucid 8014 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8015 ;; 8016 *) 8017 ;; 8018 esac 8019 ;; 8020 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8021 case $cc_basename in 8022 CC*) 8023 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8025 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8026 ;; 8027 esac 8028 ;; 8029 tandem*) 8030 case $cc_basename in 8031 NCC*) 8032 # NonStop-UX NCC 3.20 8033 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8034 ;; 8035 *) 8036 ;; 8037 esac 8038 ;; 8039 vxworks*) 8040 ;; 8041 *) 8042 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8043 ;; 8044 esac 8045 fi 8046], 8047[ 8048 if test yes = "$GCC"; then 8049 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8050 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8051 8052 case $host_os in 8053 aix*) 8054 # All AIX code is PIC. 8055 if test ia64 = "$host_cpu"; then 8056 # AIX 5 now supports IA64 processor 8057 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8058 fi 8059 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8060 ;; 8061 8062 amigaos*) 8063 case $host_cpu in 8064 powerpc) 8065 # see comment about AmigaOS4 .so support 8066 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8067 ;; 8068 m68k) 8069 # FIXME: we need at least 68020 code to build shared libraries, but 8070 # adding the '-m68020' flag to GCC prevents building anything better, 8071 # like '-m68040'. 8072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8073 ;; 8074 esac 8075 ;; 8076 8077 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8078 # PIC is the default for these OSes. 8079 ;; 8080 8081 mingw* | cygwin* | pw32* | os2* | cegcc*) 8082 # This hack is so that the source file can tell whether it is being 8083 # built for inclusion in a dll (and should export symbols for example). 8084 # Although the cygwin gcc ignores -fPIC, still need this for old-style 8085 # (--disable-auto-import) libraries 8086 m4_if([$1], [GCJ], [], 8087 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8088 case $host_os in 8089 os2*) 8090 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8091 ;; 8092 esac 8093 ;; 8094 8095 darwin* | rhapsody*) 8096 # PIC is the default on this platform 8097 # Common symbols not allowed in MH_DYLIB files 8098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8099 ;; 8100 8101 haiku*) 8102 # PIC is the default for Haiku. 8103 # The "-static" flag exists, but is broken. 8104 _LT_TAGVAR(lt_prog_compiler_static, $1)= 8105 ;; 8106 8107 hpux*) 8108 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8109 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8110 # sets the default TLS model and affects inlining. 8111 case $host_cpu in 8112 hppa*64*) 8113 # +Z the default 8114 ;; 8115 *) 8116 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117 ;; 8118 esac 8119 ;; 8120 8121 interix[[3-9]]*) 8122 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8123 # Instead, we relocate shared libraries at runtime. 8124 ;; 8125 8126 msdosdjgpp*) 8127 # Just because we use GCC doesn't mean we suddenly get shared libraries 8128 # on systems that don't support them. 8129 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8130 enable_shared=no 8131 ;; 8132 8133 *nto* | *qnx*) 8134 # QNX uses GNU C++, but need to define -shared option too, otherwise 8135 # it will coredump. 8136 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8137 ;; 8138 8139 sysv4*MP*) 8140 if test -d /usr/nec; then 8141 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8142 fi 8143 ;; 8144 8145 *) 8146 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8147 ;; 8148 esac 8149 8150 case $cc_basename in 8151 nvcc*) # Cuda Compiler Driver 2.2 8152 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8153 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8154 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8155 fi 8156 ;; 8157 esac 8158 else 8159 # PORTME Check for flag to pass linker flags through the system compiler. 8160 case $host_os in 8161 aix*) 8162 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8163 if test ia64 = "$host_cpu"; then 8164 # AIX 5 now supports IA64 processor 8165 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8166 else 8167 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8168 fi 8169 ;; 8170 8171 darwin* | rhapsody*) 8172 # PIC is the default on this platform 8173 # Common symbols not allowed in MH_DYLIB files 8174 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8175 case $cc_basename in 8176 nagfor*) 8177 # NAG Fortran compiler 8178 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8179 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8180 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8181 ;; 8182 esac 8183 ;; 8184 8185 mingw* | cygwin* | pw32* | os2* | cegcc*) 8186 # This hack is so that the source file can tell whether it is being 8187 # built for inclusion in a dll (and should export symbols for example). 8188 m4_if([$1], [GCJ], [], 8189 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8190 case $host_os in 8191 os2*) 8192 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8193 ;; 8194 esac 8195 ;; 8196 8197 hpux9* | hpux10* | hpux11*) 8198 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8199 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8200 # not for PA HP-UX. 8201 case $host_cpu in 8202 hppa*64*|ia64*) 8203 # +Z the default 8204 ;; 8205 *) 8206 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8207 ;; 8208 esac 8209 # Is there a better lt_prog_compiler_static that works with the bundled CC? 8210 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8211 ;; 8212 8213 irix5* | irix6* | nonstopux*) 8214 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8215 # PIC (with -KPIC) is the default. 8216 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8217 ;; 8218 8219 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8220 case $cc_basename in 8221 # old Intel for x86_64, which still supported -KPIC. 8222 ecc*) 8223 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8225 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8226 ;; 8227 # icc used to be incompatible with GCC. 8228 # ICC 10 doesn't accept -KPIC any more. 8229 icc* | ifort*) 8230 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8231 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8232 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8233 ;; 8234 # Lahey Fortran 8.1. 8235 lf95*) 8236 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8237 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8238 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8239 ;; 8240 nagfor*) 8241 # NAG Fortran compiler 8242 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8243 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8244 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8245 ;; 8246 tcc*) 8247 # Fabrice Bellard et al's Tiny C Compiler 8248 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8249 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8250 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8251 ;; 8252 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8253 # Portland Group compilers (*not* the Pentium gcc compiler, 8254 # which looks to be a dead project) 8255 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8256 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8257 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8258 ;; 8259 ccc*) 8260 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8261 # All Alpha code is PIC. 8262 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8263 ;; 8264 xl* | bgxl* | bgf* | mpixl*) 8265 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8266 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8268 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8269 ;; 8270 *) 8271 case `$CC -V 2>&1 | $SED 5q` in 8272 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8273 # Sun Fortran 8.3 passes all unrecognized flags to the linker 8274 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8275 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8276 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8277 ;; 8278 *Sun\ F* | *Sun*Fortran*) 8279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8280 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8281 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8282 ;; 8283 *Sun\ C*) 8284 # Sun C 5.9 8285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8286 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8287 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8288 ;; 8289 *Intel*\ [[CF]]*Compiler*) 8290 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8291 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8292 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8293 ;; 8294 *Portland\ Group*) 8295 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8297 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8298 ;; 8299 esac 8300 ;; 8301 esac 8302 ;; 8303 8304 newsos6) 8305 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8306 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8307 ;; 8308 8309 *nto* | *qnx*) 8310 # QNX uses GNU C++, but need to define -shared option too, otherwise 8311 # it will coredump. 8312 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8313 ;; 8314 8315 osf3* | osf4* | osf5*) 8316 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8317 # All OSF/1 code is PIC. 8318 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8319 ;; 8320 8321 rdos*) 8322 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8323 ;; 8324 8325 solaris*) 8326 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8327 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8328 case $cc_basename in 8329 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8330 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8331 *) 8332 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8333 esac 8334 ;; 8335 8336 sunos4*) 8337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8338 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8339 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8340 ;; 8341 8342 sysv4 | sysv4.2uw2* | sysv4.3*) 8343 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8344 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8345 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8346 ;; 8347 8348 sysv4*MP*) 8349 if test -d /usr/nec; then 8350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8351 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8352 fi 8353 ;; 8354 8355 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8356 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8357 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8358 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8359 ;; 8360 8361 unicos*) 8362 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8363 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8364 ;; 8365 8366 uts4*) 8367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8369 ;; 8370 8371 *) 8372 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8373 ;; 8374 esac 8375 fi 8376]) 8377case $host_os in 8378 # For platforms that do not support PIC, -DPIC is meaningless: 8379 *djgpp*) 8380 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8381 ;; 8382 *) 8383 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8384 ;; 8385esac 8386 8387AC_CACHE_CHECK([for $compiler option to produce PIC], 8388 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8389 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8390_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8391 8392# 8393# Check to make sure the PIC flag actually works. 8394# 8395if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8396 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8397 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8398 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8399 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8400 "" | " "*) ;; 8401 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8402 esac], 8403 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8404 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8405fi 8406_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8407 [Additional compiler flags for building library objects]) 8408 8409_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8410 [How to pass a linker flag through the compiler]) 8411# 8412# Check to make sure the static flag actually works. 8413# 8414wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8415_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8416 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8417 $lt_tmp_static_flag, 8418 [], 8419 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8420_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8421 [Compiler flag to prevent dynamic linking]) 8422])# _LT_COMPILER_PIC 8423 8424 8425# _LT_LINKER_SHLIBS([TAGNAME]) 8426# ---------------------------- 8427# See if the linker supports building shared libraries. 8428m4_defun([_LT_LINKER_SHLIBS], 8429[AC_REQUIRE([LT_PATH_LD])dnl 8430AC_REQUIRE([LT_PATH_NM])dnl 8431m4_require([_LT_PATH_MANIFEST_TOOL])dnl 8432m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8433m4_require([_LT_DECL_EGREP])dnl 8434m4_require([_LT_DECL_SED])dnl 8435m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8436m4_require([_LT_TAG_COMPILER])dnl 8437AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8438m4_if([$1], [CXX], [ 8439 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8440 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8441 case $host_os in 8442 aix[[4-9]]*) 8443 # If we're using GNU nm, then we don't want the "-C" option. 8444 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8445 # Without the "-l" option, or with the "-B" option, AIX nm treats 8446 # weak defined symbols like other global defined symbols, whereas 8447 # GNU nm marks them as "W". 8448 # While the 'weak' keyword is ignored in the Export File, we need 8449 # it in the Import File for the 'aix-soname' feature, so we have 8450 # to replace the "-B" option with "-P" for AIX nm. 8451 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8452 _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' 8453 else 8454 _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' 8455 fi 8456 ;; 8457 pw32*) 8458 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8459 ;; 8460 cygwin* | mingw* | cegcc*) 8461 case $cc_basename in 8462 cl* | icl*) 8463 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8464 ;; 8465 *) 8466 _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' 8467 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8468 ;; 8469 esac 8470 ;; 8471 *) 8472 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8473 ;; 8474 esac 8475], [ 8476 runpath_var= 8477 _LT_TAGVAR(allow_undefined_flag, $1)= 8478 _LT_TAGVAR(always_export_symbols, $1)=no 8479 _LT_TAGVAR(archive_cmds, $1)= 8480 _LT_TAGVAR(archive_expsym_cmds, $1)= 8481 _LT_TAGVAR(compiler_needs_object, $1)=no 8482 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8483 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8484 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8485 _LT_TAGVAR(hardcode_automatic, $1)=no 8486 _LT_TAGVAR(hardcode_direct, $1)=no 8487 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8488 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8489 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8490 _LT_TAGVAR(hardcode_minus_L, $1)=no 8491 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8492 _LT_TAGVAR(inherit_rpath, $1)=no 8493 _LT_TAGVAR(link_all_deplibs, $1)=unknown 8494 _LT_TAGVAR(module_cmds, $1)= 8495 _LT_TAGVAR(module_expsym_cmds, $1)= 8496 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8497 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8498 _LT_TAGVAR(thread_safe_flag_spec, $1)= 8499 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8500 # include_expsyms should be a list of space-separated symbols to be *always* 8501 # included in the symbol list 8502 _LT_TAGVAR(include_expsyms, $1)= 8503 # exclude_expsyms can be an extended regexp of symbols to exclude 8504 # it will be wrapped by ' (' and ')$', so one must not match beginning or 8505 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8506 # as well as any symbol that contains 'd'. 8507 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8508 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8509 # platforms (ab)use it in PIC code, but their linkers get confused if 8510 # the symbol is explicitly referenced. Since portable code cannot 8511 # rely on this symbol name, it's probably fine to never include it in 8512 # preloaded symbol tables. 8513 # Exclude shared library initialization/finalization symbols. 8514dnl Note also adjust exclude_expsyms for C++ above. 8515 extract_expsyms_cmds= 8516 8517 case $host_os in 8518 cygwin* | mingw* | pw32* | cegcc*) 8519 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8520 # When not using gcc, we currently assume that we are using 8521 # Microsoft Visual C++ or Intel C++ Compiler. 8522 if test yes != "$GCC"; then 8523 with_gnu_ld=no 8524 fi 8525 ;; 8526 interix*) 8527 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8528 with_gnu_ld=yes 8529 ;; 8530 openbsd* | bitrig*) 8531 with_gnu_ld=no 8532 ;; 8533 esac 8534 8535 _LT_TAGVAR(ld_shlibs, $1)=yes 8536 8537 # On some targets, GNU ld is compatible enough with the native linker 8538 # that we're better off using the native interface for both. 8539 lt_use_gnu_ld_interface=no 8540 if test yes = "$with_gnu_ld"; then 8541 case $host_os in 8542 aix*) 8543 # The AIX port of GNU ld has always aspired to compatibility 8544 # with the native linker. However, as the warning in the GNU ld 8545 # block says, versions before 2.19.5* couldn't really create working 8546 # shared libraries, regardless of the interface used. 8547 case `$LD -v 2>&1` in 8548 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8549 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8550 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8551 *) 8552 lt_use_gnu_ld_interface=yes 8553 ;; 8554 esac 8555 ;; 8556 *) 8557 lt_use_gnu_ld_interface=yes 8558 ;; 8559 esac 8560 fi 8561 8562 if test yes = "$lt_use_gnu_ld_interface"; then 8563 # If archive_cmds runs LD, not CC, wlarc should be empty 8564 wlarc='$wl' 8565 8566 # Set some defaults for GNU ld with shared library support. These 8567 # are reset later if shared libraries are not supported. Putting them 8568 # here allows them to be overridden if necessary. 8569 runpath_var=LD_RUN_PATH 8570 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8571 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8572 # ancient GNU ld didn't support --whole-archive et. al. 8573 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8574 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8575 else 8576 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8577 fi 8578 supports_anon_versioning=no 8579 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8580 *GNU\ gold*) supports_anon_versioning=yes ;; 8581 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8582 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8583 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8584 *\ 2.11.*) ;; # other 2.11 versions 8585 *) supports_anon_versioning=yes ;; 8586 esac 8587 8588 # See if GNU ld supports shared libraries. 8589 case $host_os in 8590 aix[[3-9]]*) 8591 # On AIX/PPC, the GNU linker is very broken 8592 if test ia64 != "$host_cpu"; then 8593 _LT_TAGVAR(ld_shlibs, $1)=no 8594 cat <<_LT_EOF 1>&2 8595 8596*** Warning: the GNU linker, at least up to release 2.19, is reported 8597*** to be unable to reliably create shared libraries on AIX. 8598*** Therefore, libtool is disabling shared libraries support. If you 8599*** really care for shared libraries, you may want to install binutils 8600*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8601*** You will then need to restart the configuration process. 8602 8603_LT_EOF 8604 fi 8605 ;; 8606 8607 amigaos*) 8608 case $host_cpu in 8609 powerpc) 8610 # see comment about AmigaOS4 .so support 8611 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8612 _LT_TAGVAR(archive_expsym_cmds, $1)='' 8613 ;; 8614 m68k) 8615 _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)' 8616 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8617 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8618 ;; 8619 esac 8620 ;; 8621 8622 beos*) 8623 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8625 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8626 # support --undefined. This deserves some investigation. FIXME 8627 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8628 else 8629 _LT_TAGVAR(ld_shlibs, $1)=no 8630 fi 8631 ;; 8632 8633 cygwin* | mingw* | pw32* | cegcc*) 8634 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8635 # as there is no search path for DLLs. 8636 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8637 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8638 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8639 _LT_TAGVAR(always_export_symbols, $1)=no 8640 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8641 _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' 8642 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8643 8644 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8645 _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' 8646 # If the export-symbols file already is a .def file, use it as 8647 # is; otherwise, prepend EXPORTS... 8648 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8649 cp $export_symbols $output_objdir/$soname.def; 8650 else 8651 echo EXPORTS > $output_objdir/$soname.def; 8652 cat $export_symbols >> $output_objdir/$soname.def; 8653 fi~ 8654 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8655 else 8656 _LT_TAGVAR(ld_shlibs, $1)=no 8657 fi 8658 ;; 8659 8660 haiku*) 8661 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8662 _LT_TAGVAR(link_all_deplibs, $1)=yes 8663 ;; 8664 8665 os2*) 8666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8667 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8668 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8669 shrext_cmds=.dll 8670 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8671 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8672 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8673 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8674 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8675 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8676 emximp -o $lib $output_objdir/$libname.def' 8677 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8678 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8679 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8680 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8681 prefix_cmds="$SED"~ 8682 if test EXPORTS = "`$SED 1q $export_symbols`"; then 8683 prefix_cmds="$prefix_cmds -e 1d"; 8684 fi~ 8685 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8686 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8687 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8688 emximp -o $lib $output_objdir/$libname.def' 8689 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8690 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8691 _LT_TAGVAR(file_list_spec, $1)='@' 8692 ;; 8693 8694 interix[[3-9]]*) 8695 _LT_TAGVAR(hardcode_direct, $1)=no 8696 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8699 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8700 # Instead, shared libraries are loaded at an image base (0x10000000 by 8701 # default) and relocated if they conflict, which is a slow very memory 8702 # consuming and fragmenting process. To avoid this, we pick a random, 8703 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8704 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8705 _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' 8706 _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' 8707 ;; 8708 8709 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8710 tmp_diet=no 8711 if test linux-dietlibc = "$host_os"; then 8712 case $cc_basename in 8713 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8714 esac 8715 fi 8716 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8717 && test no = "$tmp_diet" 8718 then 8719 tmp_addflag=' $pic_flag' 8720 tmp_sharedflag='-shared' 8721 case $cc_basename,$host_cpu in 8722 pgcc*) # Portland Group C compiler 8723 _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' 8724 tmp_addflag=' $pic_flag' 8725 ;; 8726 pgf77* | pgf90* | pgf95* | pgfortran*) 8727 # Portland Group f77 and f90 compilers 8728 _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' 8729 tmp_addflag=' $pic_flag -Mnomain' ;; 8730 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8731 tmp_addflag=' -i_dynamic' ;; 8732 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8733 tmp_addflag=' -i_dynamic -nofor_main' ;; 8734 ifc* | ifort*) # Intel Fortran compiler 8735 tmp_addflag=' -nofor_main' ;; 8736 lf95*) # Lahey Fortran 8.1 8737 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8738 tmp_sharedflag='--shared' ;; 8739 nagfor*) # NAGFOR 5.3 8740 tmp_sharedflag='-Wl,-shared' ;; 8741 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8742 tmp_sharedflag='-qmkshrobj' 8743 tmp_addflag= ;; 8744 nvcc*) # Cuda Compiler Driver 2.2 8745 _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' 8746 _LT_TAGVAR(compiler_needs_object, $1)=yes 8747 ;; 8748 esac 8749 case `$CC -V 2>&1 | $SED 5q` in 8750 *Sun\ C*) # Sun C 5.9 8751 _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' 8752 _LT_TAGVAR(compiler_needs_object, $1)=yes 8753 tmp_sharedflag='-G' ;; 8754 *Sun\ F*) # Sun Fortran 8.3 8755 tmp_sharedflag='-G' ;; 8756 esac 8757 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8758 8759 if test yes = "$supports_anon_versioning"; then 8760 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8761 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8762 echo "local: *; };" >> $output_objdir/$libname.ver~ 8763 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8764 fi 8765 8766 case $cc_basename in 8767 tcc*) 8768 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8769 ;; 8770 xlf* | bgf* | bgxlf* | mpixlf*) 8771 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8772 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8773 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8774 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8775 if test yes = "$supports_anon_versioning"; then 8776 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8777 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8778 echo "local: *; };" >> $output_objdir/$libname.ver~ 8779 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8780 fi 8781 ;; 8782 esac 8783 else 8784 _LT_TAGVAR(ld_shlibs, $1)=no 8785 fi 8786 ;; 8787 8788 netbsd*) 8789 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8790 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8791 wlarc= 8792 else 8793 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8794 _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' 8795 fi 8796 ;; 8797 8798 solaris*) 8799 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8800 _LT_TAGVAR(ld_shlibs, $1)=no 8801 cat <<_LT_EOF 1>&2 8802 8803*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8804*** create shared libraries on Solaris systems. Therefore, libtool 8805*** is disabling shared libraries support. We urge you to upgrade GNU 8806*** binutils to release 2.9.1 or newer. Another option is to modify 8807*** your PATH or compiler configuration so that the native linker is 8808*** used, and then restart. 8809 8810_LT_EOF 8811 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8812 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8813 _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' 8814 else 8815 _LT_TAGVAR(ld_shlibs, $1)=no 8816 fi 8817 ;; 8818 8819 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8820 case `$LD -v 2>&1` in 8821 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8822 _LT_TAGVAR(ld_shlibs, $1)=no 8823 cat <<_LT_EOF 1>&2 8824 8825*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8826*** reliably create shared libraries on SCO systems. Therefore, libtool 8827*** is disabling shared libraries support. We urge you to upgrade GNU 8828*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8829*** your PATH or compiler configuration so that the native linker is 8830*** used, and then restart. 8831 8832_LT_EOF 8833 ;; 8834 *) 8835 # For security reasons, it is highly recommended that you always 8836 # use absolute paths for naming shared libraries, and exclude the 8837 # DT_RUNPATH tag from executables and libraries. But doing so 8838 # requires that you compile everything twice, which is a pain. 8839 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8840 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8841 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8842 _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' 8843 else 8844 _LT_TAGVAR(ld_shlibs, $1)=no 8845 fi 8846 ;; 8847 esac 8848 ;; 8849 8850 sunos4*) 8851 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8852 wlarc= 8853 _LT_TAGVAR(hardcode_direct, $1)=yes 8854 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8855 ;; 8856 8857 *) 8858 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8859 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8860 _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' 8861 else 8862 _LT_TAGVAR(ld_shlibs, $1)=no 8863 fi 8864 ;; 8865 esac 8866 8867 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8868 runpath_var= 8869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8870 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8871 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8872 fi 8873 else 8874 # PORTME fill in a description of your system's linker (not GNU ld) 8875 case $host_os in 8876 aix3*) 8877 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8878 _LT_TAGVAR(always_export_symbols, $1)=yes 8879 _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' 8880 # Note: this linker hardcodes the directories in LIBPATH if there 8881 # are no directories specified by -L. 8882 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8883 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8884 # Neither direct hardcoding nor static linking is supported with a 8885 # broken collect2. 8886 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8887 fi 8888 ;; 8889 8890 aix[[4-9]]*) 8891 if test ia64 = "$host_cpu"; then 8892 # On IA64, the linker does run time linking by default, so we don't 8893 # have to do anything special. 8894 aix_use_runtimelinking=no 8895 exp_sym_flag='-Bexport' 8896 no_entry_flag= 8897 else 8898 # If we're using GNU nm, then we don't want the "-C" option. 8899 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8900 # Without the "-l" option, or with the "-B" option, AIX nm treats 8901 # weak defined symbols like other global defined symbols, whereas 8902 # GNU nm marks them as "W". 8903 # While the 'weak' keyword is ignored in the Export File, we need 8904 # it in the Import File for the 'aix-soname' feature, so we have 8905 # to replace the "-B" option with "-P" for AIX nm. 8906 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8907 _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' 8908 else 8909 _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' 8910 fi 8911 aix_use_runtimelinking=no 8912 8913 # Test if we are trying to use run time linking or normal 8914 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8915 # have runtime linking enabled, and use it for executables. 8916 # For shared libraries, we enable/disable runtime linking 8917 # depending on the kind of the shared library created - 8918 # when "with_aix_soname,aix_use_runtimelinking" is: 8919 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8920 # "aix,yes" lib.so shared, rtl:yes, for executables 8921 # lib.a static archive 8922 # "both,no" lib.so.V(shr.o) shared, rtl:yes 8923 # lib.a(lib.so.V) shared, rtl:no, for executables 8924 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8925 # lib.a(lib.so.V) shared, rtl:no 8926 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8927 # lib.a static archive 8928 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8929 for ld_flag in $LDFLAGS; do 8930 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8931 aix_use_runtimelinking=yes 8932 break 8933 fi 8934 done 8935 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8936 # With aix-soname=svr4, we create the lib.so.V shared archives only, 8937 # so we don't have lib.a shared libs to link our executables. 8938 # We have to force runtime linking in this case. 8939 aix_use_runtimelinking=yes 8940 LDFLAGS="$LDFLAGS -Wl,-brtl" 8941 fi 8942 ;; 8943 esac 8944 8945 exp_sym_flag='-bexport' 8946 no_entry_flag='-bnoentry' 8947 fi 8948 8949 # When large executables or shared objects are built, AIX ld can 8950 # have problems creating the table of contents. If linking a library 8951 # or program results in "error TOC overflow" add -mminimal-toc to 8952 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8953 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8954 8955 _LT_TAGVAR(archive_cmds, $1)='' 8956 _LT_TAGVAR(hardcode_direct, $1)=yes 8957 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8958 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8959 _LT_TAGVAR(link_all_deplibs, $1)=yes 8960 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8961 case $with_aix_soname,$aix_use_runtimelinking in 8962 aix,*) ;; # traditional, no import file 8963 svr4,* | *,yes) # use import file 8964 # The Import File defines what to hardcode. 8965 _LT_TAGVAR(hardcode_direct, $1)=no 8966 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8967 ;; 8968 esac 8969 8970 if test yes = "$GCC"; then 8971 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8972 # We only want to do this on AIX 4.2 and lower, the check 8973 # below for broken collect2 doesn't work under 4.3+ 8974 collect2name=`$CC -print-prog-name=collect2` 8975 if test -f "$collect2name" && 8976 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8977 then 8978 # We have reworked collect2 8979 : 8980 else 8981 # We have old collect2 8982 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8983 # It fails to find uninstalled libraries when the uninstalled 8984 # path is not listed in the libpath. Setting hardcode_minus_L 8985 # to unsupported forces relinking 8986 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8987 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8989 fi 8990 ;; 8991 esac 8992 shared_flag='-shared' 8993 if test yes = "$aix_use_runtimelinking"; then 8994 shared_flag="$shared_flag "'$wl-G' 8995 fi 8996 # Need to ensure runtime linking is disabled for the traditional 8997 # shared library, or the linker may eventually find shared libraries 8998 # /with/ Import File - we do not want to mix them. 8999 shared_flag_aix='-shared' 9000 shared_flag_svr4='-shared $wl-G' 9001 else 9002 # not using gcc 9003 if test ia64 = "$host_cpu"; then 9004 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9005 # chokes on -Wl,-G. The following line is correct: 9006 shared_flag='-G' 9007 else 9008 if test yes = "$aix_use_runtimelinking"; then 9009 shared_flag='$wl-G' 9010 else 9011 shared_flag='$wl-bM:SRE' 9012 fi 9013 shared_flag_aix='$wl-bM:SRE' 9014 shared_flag_svr4='$wl-G' 9015 fi 9016 fi 9017 9018 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9019 # It seems that -bexpall does not export symbols beginning with 9020 # underscore (_), so it is better to generate a list of symbols to export. 9021 _LT_TAGVAR(always_export_symbols, $1)=yes 9022 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9023 # Warning - without using the other runtime loading flags (-brtl), 9024 # -berok will link without error, but may produce a broken library. 9025 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 9026 # Determine the default libpath from the value encoded in an 9027 # empty executable. 9028 _LT_SYS_MODULE_PATH_AIX([$1]) 9029 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9030 _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 9031 else 9032 if test ia64 = "$host_cpu"; then 9033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9034 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9035 _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" 9036 else 9037 # Determine the default libpath from the value encoded in an 9038 # empty executable. 9039 _LT_SYS_MODULE_PATH_AIX([$1]) 9040 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9041 # Warning - without using the other run time loading flags, 9042 # -berok will link without error, but may produce a broken library. 9043 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9044 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9045 if test yes = "$with_gnu_ld"; then 9046 # We only use this code for GNU lds that support --whole-archive. 9047 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9048 else 9049 # Exported symbols can be pulled into shared objects from archives 9050 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9051 fi 9052 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9053 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9054 # -brtl affects multiple linker settings, -berok does not and is overridden later 9055 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9056 if test svr4 != "$with_aix_soname"; then 9057 # This is similar to how AIX traditionally builds its shared libraries. 9058 _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' 9059 fi 9060 if test aix != "$with_aix_soname"; then 9061 _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' 9062 else 9063 # used by -dlpreopen to get the symbols 9064 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9065 fi 9066 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9067 fi 9068 fi 9069 ;; 9070 9071 amigaos*) 9072 case $host_cpu in 9073 powerpc) 9074 # see comment about AmigaOS4 .so support 9075 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9076 _LT_TAGVAR(archive_expsym_cmds, $1)='' 9077 ;; 9078 m68k) 9079 _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)' 9080 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9081 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9082 ;; 9083 esac 9084 ;; 9085 9086 bsdi[[45]]*) 9087 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 9088 ;; 9089 9090 cygwin* | mingw* | pw32* | cegcc*) 9091 # When not using gcc, we currently assume that we are using 9092 # Microsoft Visual C++ or Intel C++ Compiler. 9093 # hardcode_libdir_flag_spec is actually meaningless, as there is 9094 # no search path for DLLs. 9095 case $cc_basename in 9096 cl* | icl*) 9097 # Native MSVC or ICC 9098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9099 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9100 _LT_TAGVAR(always_export_symbols, $1)=yes 9101 _LT_TAGVAR(file_list_spec, $1)='@' 9102 # Tell ltmain to make .lib files, not .a files. 9103 libext=lib 9104 # Tell ltmain to make .dll files, not .so files. 9105 shrext_cmds=.dll 9106 # FIXME: Setting linknames here is a bad hack. 9107 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9108 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9109 cp "$export_symbols" "$output_objdir/$soname.def"; 9110 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9111 else 9112 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9113 fi~ 9114 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9115 linknames=' 9116 # The linker will not automatically build a static lib if we build a DLL. 9117 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9118 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9119 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9120 _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' 9121 # Don't use ranlib 9122 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9123 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9124 lt_tool_outputfile="@TOOL_OUTPUT@"~ 9125 case $lt_outputfile in 9126 *.exe|*.EXE) ;; 9127 *) 9128 lt_outputfile=$lt_outputfile.exe 9129 lt_tool_outputfile=$lt_tool_outputfile.exe 9130 ;; 9131 esac~ 9132 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9133 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9134 $RM "$lt_outputfile.manifest"; 9135 fi' 9136 ;; 9137 *) 9138 # Assume MSVC and ICC wrapper 9139 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9140 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9141 # Tell ltmain to make .lib files, not .a files. 9142 libext=lib 9143 # Tell ltmain to make .dll files, not .so files. 9144 shrext_cmds=.dll 9145 # FIXME: Setting linknames here is a bad hack. 9146 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9147 # The linker will automatically build a .lib file if we build a DLL. 9148 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9149 # FIXME: Should let the user specify the lib program. 9150 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9151 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9152 ;; 9153 esac 9154 ;; 9155 9156 darwin* | rhapsody*) 9157 _LT_DARWIN_LINKER_FEATURES($1) 9158 ;; 9159 9160 dgux*) 9161 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9163 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164 ;; 9165 9166 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9167 # support. Future versions do this automatically, but an explicit c++rt0.o 9168 # does not break anything, and helps significantly (at the cost of a little 9169 # extra space). 9170 freebsd2.2*) 9171 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9172 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9173 _LT_TAGVAR(hardcode_direct, $1)=yes 9174 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9175 ;; 9176 9177 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9178 freebsd2.*) 9179 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9180 _LT_TAGVAR(hardcode_direct, $1)=yes 9181 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9182 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9183 ;; 9184 9185 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9186 freebsd* | dragonfly* | midnightbsd*) 9187 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9188 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9189 _LT_TAGVAR(hardcode_direct, $1)=yes 9190 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9191 ;; 9192 9193 hpux9*) 9194 if test yes = "$GCC"; then 9195 _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' 9196 else 9197 _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' 9198 fi 9199 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9200 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9201 _LT_TAGVAR(hardcode_direct, $1)=yes 9202 9203 # hardcode_minus_L: Not really in the search PATH, 9204 # but as the default location of the library. 9205 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9206 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9207 ;; 9208 9209 hpux10*) 9210 if test yes,no = "$GCC,$with_gnu_ld"; then 9211 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9212 else 9213 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9214 fi 9215 if test no = "$with_gnu_ld"; then 9216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9217 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9218 _LT_TAGVAR(hardcode_direct, $1)=yes 9219 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9220 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9221 # hardcode_minus_L: Not really in the search PATH, 9222 # but as the default location of the library. 9223 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9224 fi 9225 ;; 9226 9227 hpux11*) 9228 if test yes,no = "$GCC,$with_gnu_ld"; then 9229 case $host_cpu in 9230 hppa*64*) 9231 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9232 ;; 9233 ia64*) 9234 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9235 ;; 9236 *) 9237 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9238 ;; 9239 esac 9240 else 9241 case $host_cpu in 9242 hppa*64*) 9243 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9244 ;; 9245 ia64*) 9246 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9247 ;; 9248 *) 9249 m4_if($1, [], [ 9250 # Older versions of the 11.00 compiler do not understand -b yet 9251 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9252 _LT_LINKER_OPTION([if $CC understands -b], 9253 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9254 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9255 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9256 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9257 ;; 9258 esac 9259 fi 9260 if test no = "$with_gnu_ld"; then 9261 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9262 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9263 9264 case $host_cpu in 9265 hppa*64*|ia64*) 9266 _LT_TAGVAR(hardcode_direct, $1)=no 9267 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9268 ;; 9269 *) 9270 _LT_TAGVAR(hardcode_direct, $1)=yes 9271 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9272 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9273 9274 # hardcode_minus_L: Not really in the search PATH, 9275 # but as the default location of the library. 9276 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9277 ;; 9278 esac 9279 fi 9280 ;; 9281 9282 irix5* | irix6* | nonstopux*) 9283 if test yes = "$GCC"; then 9284 _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' 9285 # Try to use the -exported_symbol ld option, if it does not 9286 # work, assume that -exports_file does not work either and 9287 # implicitly export all symbols. 9288 # This should be the same for all languages, so no per-tag cache variable. 9289 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9290 [lt_cv_irix_exported_symbol], 9291 [save_LDFLAGS=$LDFLAGS 9292 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9293 AC_LINK_IFELSE( 9294 [AC_LANG_SOURCE( 9295 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9296 [C++], [[int foo (void) { return 0; }]], 9297 [Fortran 77], [[ 9298 subroutine foo 9299 end]], 9300 [Fortran], [[ 9301 subroutine foo 9302 end]])])], 9303 [lt_cv_irix_exported_symbol=yes], 9304 [lt_cv_irix_exported_symbol=no]) 9305 LDFLAGS=$save_LDFLAGS]) 9306 if test yes = "$lt_cv_irix_exported_symbol"; then 9307 _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' 9308 fi 9309 else 9310 _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' 9311 _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' 9312 fi 9313 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9314 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9315 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9316 _LT_TAGVAR(inherit_rpath, $1)=yes 9317 _LT_TAGVAR(link_all_deplibs, $1)=yes 9318 ;; 9319 9320 linux*) 9321 case $cc_basename in 9322 tcc*) 9323 # Fabrice Bellard et al's Tiny C Compiler 9324 _LT_TAGVAR(ld_shlibs, $1)=yes 9325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9326 ;; 9327 esac 9328 ;; 9329 9330 netbsd*) 9331 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9332 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9333 else 9334 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9335 fi 9336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9337 _LT_TAGVAR(hardcode_direct, $1)=yes 9338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9339 ;; 9340 9341 newsos6) 9342 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343 _LT_TAGVAR(hardcode_direct, $1)=yes 9344 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9345 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9346 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9347 ;; 9348 9349 *nto* | *qnx*) 9350 ;; 9351 9352 openbsd* | bitrig*) 9353 if test -f /usr/libexec/ld.so; then 9354 _LT_TAGVAR(hardcode_direct, $1)=yes 9355 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9356 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9357 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9358 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9359 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9361 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9362 else 9363 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9365 fi 9366 else 9367 _LT_TAGVAR(ld_shlibs, $1)=no 9368 fi 9369 ;; 9370 9371 os2*) 9372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9373 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9374 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9375 shrext_cmds=.dll 9376 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9377 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9378 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9379 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9380 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9381 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9382 emximp -o $lib $output_objdir/$libname.def' 9383 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9384 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9385 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9386 $ECHO EXPORTS >> $output_objdir/$libname.def~ 9387 prefix_cmds="$SED"~ 9388 if test EXPORTS = "`$SED 1q $export_symbols`"; then 9389 prefix_cmds="$prefix_cmds -e 1d"; 9390 fi~ 9391 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9392 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9393 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9394 emximp -o $lib $output_objdir/$libname.def' 9395 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9396 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9397 _LT_TAGVAR(file_list_spec, $1)='@' 9398 ;; 9399 9400 osf3*) 9401 if test yes = "$GCC"; then 9402 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9403 _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' 9404 else 9405 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9406 _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' 9407 fi 9408 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9410 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9411 ;; 9412 9413 osf4* | osf5*) # as osf3* with the addition of -msym flag 9414 if test yes = "$GCC"; then 9415 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9416 _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' 9417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9418 else 9419 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9420 _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' 9421 _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~ 9422 $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' 9423 9424 # Both c and cxx compiler support -rpath directly 9425 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9426 fi 9427 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9428 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9429 ;; 9430 9431 solaris*) 9432 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9433 if test yes = "$GCC"; then 9434 wlarc='$wl' 9435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9436 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9437 $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' 9438 else 9439 case `$CC -V 2>&1` in 9440 *"Compilers 5.0"*) 9441 wlarc='' 9442 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9443 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9444 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9445 ;; 9446 *) 9447 wlarc='$wl' 9448 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9449 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9450 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9451 ;; 9452 esac 9453 fi 9454 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9455 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9456 case $host_os in 9457 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9458 *) 9459 # The compiler driver will combine and reorder linker options, 9460 # but understands '-z linker_flag'. GCC discards it without '$wl', 9461 # but is careful enough not to reorder. 9462 # Supported since Solaris 2.6 (maybe 2.5.1?) 9463 if test yes = "$GCC"; then 9464 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9465 else 9466 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9467 fi 9468 ;; 9469 esac 9470 _LT_TAGVAR(link_all_deplibs, $1)=yes 9471 ;; 9472 9473 sunos4*) 9474 if test sequent = "$host_vendor"; then 9475 # Use $CC to link under sequent, because it throws in some extra .o 9476 # files that make .init and .fini sections work. 9477 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9478 else 9479 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9480 fi 9481 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9482 _LT_TAGVAR(hardcode_direct, $1)=yes 9483 _LT_TAGVAR(hardcode_minus_L, $1)=yes 9484 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9485 ;; 9486 9487 sysv4) 9488 case $host_vendor in 9489 sni) 9490 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9491 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9492 ;; 9493 siemens) 9494 ## LD is ld it makes a PLAMLIB 9495 ## CC just makes a GrossModule. 9496 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9497 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9498 _LT_TAGVAR(hardcode_direct, $1)=no 9499 ;; 9500 motorola) 9501 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9502 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9503 ;; 9504 esac 9505 runpath_var='LD_RUN_PATH' 9506 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9507 ;; 9508 9509 sysv4.3*) 9510 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9511 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9513 ;; 9514 9515 sysv4*MP*) 9516 if test -d /usr/nec; then 9517 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9518 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9519 runpath_var=LD_RUN_PATH 9520 hardcode_runpath_var=yes 9521 _LT_TAGVAR(ld_shlibs, $1)=yes 9522 fi 9523 ;; 9524 9525 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9526 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9527 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9528 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9529 runpath_var='LD_RUN_PATH' 9530 9531 if test yes = "$GCC"; then 9532 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9533 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9534 else 9535 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9536 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9537 fi 9538 ;; 9539 9540 sysv5* | sco3.2v5* | sco5v6*) 9541 # Note: We CANNOT use -z defs as we might desire, because we do not 9542 # link with -lc, and that would cause any symbols used from libc to 9543 # always be unresolved, which means just about no library would 9544 # ever link correctly. If we're not using GNU ld we use -z text 9545 # though, which does catch some bad symbols but isn't as heavy-handed 9546 # as -z defs. 9547 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9548 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9549 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9550 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9551 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9552 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9553 _LT_TAGVAR(link_all_deplibs, $1)=yes 9554 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9555 runpath_var='LD_RUN_PATH' 9556 9557 if test yes = "$GCC"; then 9558 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9559 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9560 else 9561 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9562 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9563 fi 9564 ;; 9565 9566 uts4*) 9567 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9568 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9569 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9570 ;; 9571 9572 *) 9573 _LT_TAGVAR(ld_shlibs, $1)=no 9574 ;; 9575 esac 9576 9577 if test sni = "$host_vendor"; then 9578 case $host in 9579 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9580 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9581 ;; 9582 esac 9583 fi 9584 fi 9585]) 9586AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9587test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9588 9589_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9590 9591_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9592_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9593_LT_DECL([], [extract_expsyms_cmds], [2], 9594 [The commands to extract the exported symbol list from a shared archive]) 9595 9596# 9597# Do we need to explicitly link libc? 9598# 9599case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9600x|xyes) 9601 # Assume -lc should be added 9602 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9603 9604 if test yes,yes = "$GCC,$enable_shared"; then 9605 case $_LT_TAGVAR(archive_cmds, $1) in 9606 *'~'*) 9607 # FIXME: we may have to deal with multi-command sequences. 9608 ;; 9609 '$CC '*) 9610 # Test whether the compiler implicitly links with -lc since on some 9611 # systems, -lgcc has to come before -lc. If gcc already passes -lc 9612 # to ld, don't add -lc before -lgcc. 9613 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9614 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9615 [$RM conftest* 9616 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9617 9618 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9619 soname=conftest 9620 lib=conftest 9621 libobjs=conftest.$ac_objext 9622 deplibs= 9623 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9624 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9625 compiler_flags=-v 9626 linker_flags=-v 9627 verstring= 9628 output_objdir=. 9629 libname=conftest 9630 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9631 _LT_TAGVAR(allow_undefined_flag, $1)= 9632 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9633 then 9634 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9635 else 9636 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9637 fi 9638 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9639 else 9640 cat conftest.err 1>&5 9641 fi 9642 $RM conftest* 9643 ]) 9644 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9645 ;; 9646 esac 9647 fi 9648 ;; 9649esac 9650 9651_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9652 [Whether or not to add -lc for building shared libraries]) 9653_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9654 [enable_shared_with_static_runtimes], [0], 9655 [Whether or not to disallow shared libs when runtime libs are static]) 9656_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9657 [Compiler flag to allow reflexive dlopens]) 9658_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9659 [Compiler flag to generate shared objects directly from archives]) 9660_LT_TAGDECL([], [compiler_needs_object], [1], 9661 [Whether the compiler copes with passing no objects directly]) 9662_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9663 [Create an old-style archive from a shared archive]) 9664_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9665 [Create a temporary old-style archive to link instead of a shared archive]) 9666_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9667_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9668_LT_TAGDECL([], [module_cmds], [2], 9669 [Commands used to build a loadable module if different from building 9670 a shared archive.]) 9671_LT_TAGDECL([], [module_expsym_cmds], [2]) 9672_LT_TAGDECL([], [with_gnu_ld], [1], 9673 [Whether we are building with GNU ld or not]) 9674_LT_TAGDECL([], [allow_undefined_flag], [1], 9675 [Flag that allows shared libraries with undefined symbols to be built]) 9676_LT_TAGDECL([], [no_undefined_flag], [1], 9677 [Flag that enforces no undefined symbols]) 9678_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9679 [Flag to hardcode $libdir into a binary during linking. 9680 This must work even if $libdir does not exist]) 9681_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9682 [Whether we need a single "-rpath" flag with a separated argument]) 9683_LT_TAGDECL([], [hardcode_direct], [0], 9684 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9685 DIR into the resulting binary]) 9686_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9687 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9688 DIR into the resulting binary and the resulting library dependency is 9689 "absolute", i.e impossible to change by setting $shlibpath_var if the 9690 library is relocated]) 9691_LT_TAGDECL([], [hardcode_minus_L], [0], 9692 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9693 into the resulting binary]) 9694_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9695 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9696 into the resulting binary]) 9697_LT_TAGDECL([], [hardcode_automatic], [0], 9698 [Set to "yes" if building a shared library automatically hardcodes DIR 9699 into the library and all subsequent libraries and executables linked 9700 against it]) 9701_LT_TAGDECL([], [inherit_rpath], [0], 9702 [Set to yes if linker adds runtime paths of dependent libraries 9703 to runtime path list]) 9704_LT_TAGDECL([], [link_all_deplibs], [0], 9705 [Whether libtool must link a program against all its dependency libraries]) 9706_LT_TAGDECL([], [always_export_symbols], [0], 9707 [Set to "yes" if exported symbols are required]) 9708_LT_TAGDECL([], [export_symbols_cmds], [2], 9709 [The commands to list exported symbols]) 9710_LT_TAGDECL([], [exclude_expsyms], [1], 9711 [Symbols that should not be listed in the preloaded symbols]) 9712_LT_TAGDECL([], [include_expsyms], [1], 9713 [Symbols that must always be exported]) 9714_LT_TAGDECL([], [prelink_cmds], [2], 9715 [Commands necessary for linking programs (against libraries) with templates]) 9716_LT_TAGDECL([], [postlink_cmds], [2], 9717 [Commands necessary for finishing linking programs]) 9718_LT_TAGDECL([], [file_list_spec], [1], 9719 [Specify filename containing input files]) 9720dnl FIXME: Not yet implemented 9721dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9722dnl [Compiler flag to generate thread safe objects]) 9723])# _LT_LINKER_SHLIBS 9724 9725 9726# _LT_LANG_C_CONFIG([TAG]) 9727# ------------------------ 9728# Ensure that the configuration variables for a C compiler are suitably 9729# defined. These variables are subsequently used by _LT_CONFIG to write 9730# the compiler configuration to 'libtool'. 9731m4_defun([_LT_LANG_C_CONFIG], 9732[m4_require([_LT_DECL_EGREP])dnl 9733lt_save_CC=$CC 9734AC_LANG_PUSH(C) 9735 9736# Source file extension for C test sources. 9737ac_ext=c 9738 9739# Object file extension for compiled C test sources. 9740objext=o 9741_LT_TAGVAR(objext, $1)=$objext 9742 9743# Code to be used in simple compile tests 9744lt_simple_compile_test_code="int some_variable = 0;" 9745 9746# Code to be used in simple link tests 9747lt_simple_link_test_code='int main(){return(0);}' 9748 9749_LT_TAG_COMPILER 9750# Save the default compiler, since it gets overwritten when the other 9751# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9752compiler_DEFAULT=$CC 9753 9754# save warnings/boilerplate of simple test code 9755_LT_COMPILER_BOILERPLATE 9756_LT_LINKER_BOILERPLATE 9757 9758if test -n "$compiler"; then 9759 _LT_COMPILER_NO_RTTI($1) 9760 _LT_COMPILER_PIC($1) 9761 _LT_COMPILER_C_O($1) 9762 _LT_COMPILER_FILE_LOCKS($1) 9763 _LT_LINKER_SHLIBS($1) 9764 _LT_SYS_DYNAMIC_LINKER($1) 9765 _LT_LINKER_HARDCODE_LIBPATH($1) 9766 LT_SYS_DLOPEN_SELF 9767 _LT_CMD_STRIPLIB 9768 9769 # Report what library types will actually be built 9770 AC_MSG_CHECKING([if libtool supports shared libraries]) 9771 AC_MSG_RESULT([$can_build_shared]) 9772 9773 AC_MSG_CHECKING([whether to build shared libraries]) 9774 test no = "$can_build_shared" && enable_shared=no 9775 9776 # On AIX, shared libraries and static libraries use the same namespace, and 9777 # are all built from PIC. 9778 case $host_os in 9779 aix3*) 9780 test yes = "$enable_shared" && enable_static=no 9781 if test -n "$RANLIB"; then 9782 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9783 postinstall_cmds='$RANLIB $lib' 9784 fi 9785 ;; 9786 9787 aix[[4-9]]*) 9788 if test ia64 != "$host_cpu"; then 9789 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9790 yes,aix,yes) ;; # shared object as lib.so file only 9791 yes,svr4,*) ;; # shared object as lib.so archive member only 9792 yes,*) enable_static=no ;; # shared object in lib.a archive as well 9793 esac 9794 fi 9795 ;; 9796 esac 9797 AC_MSG_RESULT([$enable_shared]) 9798 9799 AC_MSG_CHECKING([whether to build static libraries]) 9800 # Make sure either enable_shared or enable_static is yes. 9801 test yes = "$enable_shared" || enable_static=yes 9802 AC_MSG_RESULT([$enable_static]) 9803 9804 _LT_CONFIG($1) 9805fi 9806AC_LANG_POP 9807CC=$lt_save_CC 9808])# _LT_LANG_C_CONFIG 9809 9810 9811# _LT_LANG_CXX_CONFIG([TAG]) 9812# -------------------------- 9813# Ensure that the configuration variables for a C++ compiler are suitably 9814# defined. These variables are subsequently used by _LT_CONFIG to write 9815# the compiler configuration to 'libtool'. 9816m4_defun([_LT_LANG_CXX_CONFIG], 9817[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9818m4_require([_LT_DECL_EGREP])dnl 9819m4_require([_LT_PATH_MANIFEST_TOOL])dnl 9820if test -n "$CXX" && ( test no != "$CXX" && 9821 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9822 (test g++ != "$CXX"))); then 9823 AC_PROG_CXXCPP 9824else 9825 _lt_caught_CXX_error=yes 9826fi 9827 9828AC_LANG_PUSH(C++) 9829_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9830_LT_TAGVAR(allow_undefined_flag, $1)= 9831_LT_TAGVAR(always_export_symbols, $1)=no 9832_LT_TAGVAR(archive_expsym_cmds, $1)= 9833_LT_TAGVAR(compiler_needs_object, $1)=no 9834_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9835_LT_TAGVAR(hardcode_direct, $1)=no 9836_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9837_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9838_LT_TAGVAR(hardcode_libdir_separator, $1)= 9839_LT_TAGVAR(hardcode_minus_L, $1)=no 9840_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9841_LT_TAGVAR(hardcode_automatic, $1)=no 9842_LT_TAGVAR(inherit_rpath, $1)=no 9843_LT_TAGVAR(module_cmds, $1)= 9844_LT_TAGVAR(module_expsym_cmds, $1)= 9845_LT_TAGVAR(link_all_deplibs, $1)=unknown 9846_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9847_LT_TAGVAR(reload_flag, $1)=$reload_flag 9848_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9849_LT_TAGVAR(no_undefined_flag, $1)= 9850_LT_TAGVAR(whole_archive_flag_spec, $1)= 9851_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9852 9853# Source file extension for C++ test sources. 9854ac_ext=cpp 9855 9856# Object file extension for compiled C++ test sources. 9857objext=o 9858_LT_TAGVAR(objext, $1)=$objext 9859 9860# No sense in running all these tests if we already determined that 9861# the CXX compiler isn't working. Some variables (like enable_shared) 9862# are currently assumed to apply to all compilers on this platform, 9863# and will be corrupted by setting them based on a non-working compiler. 9864if test yes != "$_lt_caught_CXX_error"; then 9865 # Code to be used in simple compile tests 9866 lt_simple_compile_test_code="int some_variable = 0;" 9867 9868 # Code to be used in simple link tests 9869 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9870 9871 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9872 _LT_TAG_COMPILER 9873 9874 # save warnings/boilerplate of simple test code 9875 _LT_COMPILER_BOILERPLATE 9876 _LT_LINKER_BOILERPLATE 9877 9878 # Allow CC to be a program name with arguments. 9879 lt_save_CC=$CC 9880 lt_save_CFLAGS=$CFLAGS 9881 lt_save_LD=$LD 9882 lt_save_GCC=$GCC 9883 GCC=$GXX 9884 lt_save_with_gnu_ld=$with_gnu_ld 9885 lt_save_path_LD=$lt_cv_path_LD 9886 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9887 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9888 else 9889 $as_unset lt_cv_prog_gnu_ld 9890 fi 9891 if test -n "${lt_cv_path_LDCXX+set}"; then 9892 lt_cv_path_LD=$lt_cv_path_LDCXX 9893 else 9894 $as_unset lt_cv_path_LD 9895 fi 9896 test -z "${LDCXX+set}" || LD=$LDCXX 9897 CC=${CXX-"c++"} 9898 CFLAGS=$CXXFLAGS 9899 compiler=$CC 9900 _LT_TAGVAR(compiler, $1)=$CC 9901 _LT_CC_BASENAME([$compiler]) 9902 9903 if test -n "$compiler"; then 9904 # We don't want -fno-exception when compiling C++ code, so set the 9905 # no_builtin_flag separately 9906 if test yes = "$GXX"; then 9907 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9908 else 9909 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9910 fi 9911 9912 if test yes = "$GXX"; then 9913 # Set up default GNU C++ configuration 9914 9915 LT_PATH_LD 9916 9917 # Check if GNU C++ uses GNU ld as the underlying linker, since the 9918 # archiving commands below assume that GNU ld is being used. 9919 if test yes = "$with_gnu_ld"; then 9920 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9921 _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' 9922 9923 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9924 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9925 9926 # If archive_cmds runs LD, not CC, wlarc should be empty 9927 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9928 # investigate it a little bit more. (MM) 9929 wlarc='$wl' 9930 9931 # ancient GNU ld didn't support --whole-archive et. al. 9932 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9933 $GREP 'no-whole-archive' > /dev/null; then 9934 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9935 else 9936 _LT_TAGVAR(whole_archive_flag_spec, $1)= 9937 fi 9938 else 9939 with_gnu_ld=no 9940 wlarc= 9941 9942 # A generic and very simple default shared library creation 9943 # command for GNU C++ for the case where it uses the native 9944 # linker, instead of GNU ld. If possible, this setting should 9945 # overridden to take advantage of the native linker features on 9946 # the platform it is being used on. 9947 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9948 fi 9949 9950 # Commands to make compiler produce verbose output that lists 9951 # what "hidden" libraries, object files and flags are used when 9952 # linking a shared library. 9953 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9954 9955 else 9956 GXX=no 9957 with_gnu_ld=no 9958 wlarc= 9959 fi 9960 9961 # PORTME: fill in a description of your system's C++ link characteristics 9962 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9963 _LT_TAGVAR(ld_shlibs, $1)=yes 9964 case $host_os in 9965 aix3*) 9966 # FIXME: insert proper C++ library support 9967 _LT_TAGVAR(ld_shlibs, $1)=no 9968 ;; 9969 aix[[4-9]]*) 9970 if test ia64 = "$host_cpu"; then 9971 # On IA64, the linker does run time linking by default, so we don't 9972 # have to do anything special. 9973 aix_use_runtimelinking=no 9974 exp_sym_flag='-Bexport' 9975 no_entry_flag= 9976 else 9977 aix_use_runtimelinking=no 9978 9979 # Test if we are trying to use run time linking or normal 9980 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9981 # have runtime linking enabled, and use it for executables. 9982 # For shared libraries, we enable/disable runtime linking 9983 # depending on the kind of the shared library created - 9984 # when "with_aix_soname,aix_use_runtimelinking" is: 9985 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9986 # "aix,yes" lib.so shared, rtl:yes, for executables 9987 # lib.a static archive 9988 # "both,no" lib.so.V(shr.o) shared, rtl:yes 9989 # lib.a(lib.so.V) shared, rtl:no, for executables 9990 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9991 # lib.a(lib.so.V) shared, rtl:no 9992 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9993 # lib.a static archive 9994 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9995 for ld_flag in $LDFLAGS; do 9996 case $ld_flag in 9997 *-brtl*) 9998 aix_use_runtimelinking=yes 9999 break 10000 ;; 10001 esac 10002 done 10003 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 10004 # With aix-soname=svr4, we create the lib.so.V shared archives only, 10005 # so we don't have lib.a shared libs to link our executables. 10006 # We have to force runtime linking in this case. 10007 aix_use_runtimelinking=yes 10008 LDFLAGS="$LDFLAGS -Wl,-brtl" 10009 fi 10010 ;; 10011 esac 10012 10013 exp_sym_flag='-bexport' 10014 no_entry_flag='-bnoentry' 10015 fi 10016 10017 # When large executables or shared objects are built, AIX ld can 10018 # have problems creating the table of contents. If linking a library 10019 # or program results in "error TOC overflow" add -mminimal-toc to 10020 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 10021 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 10022 10023 _LT_TAGVAR(archive_cmds, $1)='' 10024 _LT_TAGVAR(hardcode_direct, $1)=yes 10025 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10026 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10027 _LT_TAGVAR(link_all_deplibs, $1)=yes 10028 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 10029 case $with_aix_soname,$aix_use_runtimelinking in 10030 aix,*) ;; # no import file 10031 svr4,* | *,yes) # use import file 10032 # The Import File defines what to hardcode. 10033 _LT_TAGVAR(hardcode_direct, $1)=no 10034 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 10035 ;; 10036 esac 10037 10038 if test yes = "$GXX"; then 10039 case $host_os in aix4.[[012]]|aix4.[[012]].*) 10040 # We only want to do this on AIX 4.2 and lower, the check 10041 # below for broken collect2 doesn't work under 4.3+ 10042 collect2name=`$CC -print-prog-name=collect2` 10043 if test -f "$collect2name" && 10044 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 10045 then 10046 # We have reworked collect2 10047 : 10048 else 10049 # We have old collect2 10050 _LT_TAGVAR(hardcode_direct, $1)=unsupported 10051 # It fails to find uninstalled libraries when the uninstalled 10052 # path is not listed in the libpath. Setting hardcode_minus_L 10053 # to unsupported forces relinking 10054 _LT_TAGVAR(hardcode_minus_L, $1)=yes 10055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10056 _LT_TAGVAR(hardcode_libdir_separator, $1)= 10057 fi 10058 esac 10059 shared_flag='-shared' 10060 if test yes = "$aix_use_runtimelinking"; then 10061 shared_flag=$shared_flag' $wl-G' 10062 fi 10063 # Need to ensure runtime linking is disabled for the traditional 10064 # shared library, or the linker may eventually find shared libraries 10065 # /with/ Import File - we do not want to mix them. 10066 shared_flag_aix='-shared' 10067 shared_flag_svr4='-shared $wl-G' 10068 else 10069 # not using gcc 10070 if test ia64 = "$host_cpu"; then 10071 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10072 # chokes on -Wl,-G. The following line is correct: 10073 shared_flag='-G' 10074 else 10075 if test yes = "$aix_use_runtimelinking"; then 10076 shared_flag='$wl-G' 10077 else 10078 shared_flag='$wl-bM:SRE' 10079 fi 10080 shared_flag_aix='$wl-bM:SRE' 10081 shared_flag_svr4='$wl-G' 10082 fi 10083 fi 10084 10085 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 10086 # It seems that -bexpall does not export symbols beginning with 10087 # underscore (_), so it is better to generate a list of symbols to 10088 # export. 10089 _LT_TAGVAR(always_export_symbols, $1)=yes 10090 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10091 # Warning - without using the other runtime loading flags (-brtl), 10092 # -berok will link without error, but may produce a broken library. 10093 # The "-G" linker flag allows undefined symbols. 10094 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 10095 # Determine the default libpath from the value encoded in an empty 10096 # executable. 10097 _LT_SYS_MODULE_PATH_AIX([$1]) 10098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10099 10100 _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 10101 else 10102 if test ia64 = "$host_cpu"; then 10103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 10104 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10105 _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" 10106 else 10107 # Determine the default libpath from the value encoded in an 10108 # empty executable. 10109 _LT_SYS_MODULE_PATH_AIX([$1]) 10110 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10111 # Warning - without using the other run time loading flags, 10112 # -berok will link without error, but may produce a broken library. 10113 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10114 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10115 if test yes = "$with_gnu_ld"; then 10116 # We only use this code for GNU lds that support --whole-archive. 10117 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10118 else 10119 # Exported symbols can be pulled into shared objects from archives 10120 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10121 fi 10122 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10123 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10124 # -brtl affects multiple linker settings, -berok does not and is overridden later 10125 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10126 if test svr4 != "$with_aix_soname"; then 10127 # This is similar to how AIX traditionally builds its shared 10128 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10129 _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' 10130 fi 10131 if test aix != "$with_aix_soname"; then 10132 _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' 10133 else 10134 # used by -dlpreopen to get the symbols 10135 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10136 fi 10137 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10138 fi 10139 fi 10140 ;; 10141 10142 beos*) 10143 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10144 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10145 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10146 # support --undefined. This deserves some investigation. FIXME 10147 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10148 else 10149 _LT_TAGVAR(ld_shlibs, $1)=no 10150 fi 10151 ;; 10152 10153 chorus*) 10154 case $cc_basename in 10155 *) 10156 # FIXME: insert proper C++ library support 10157 _LT_TAGVAR(ld_shlibs, $1)=no 10158 ;; 10159 esac 10160 ;; 10161 10162 cygwin* | mingw* | pw32* | cegcc*) 10163 case $GXX,$cc_basename in 10164 ,cl* | no,cl* | ,icl* | no,icl*) 10165 # Native MSVC or ICC 10166 # hardcode_libdir_flag_spec is actually meaningless, as there is 10167 # no search path for DLLs. 10168 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10169 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10170 _LT_TAGVAR(always_export_symbols, $1)=yes 10171 _LT_TAGVAR(file_list_spec, $1)='@' 10172 # Tell ltmain to make .lib files, not .a files. 10173 libext=lib 10174 # Tell ltmain to make .dll files, not .so files. 10175 shrext_cmds=.dll 10176 # FIXME: Setting linknames here is a bad hack. 10177 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10178 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10179 cp "$export_symbols" "$output_objdir/$soname.def"; 10180 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10181 else 10182 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10183 fi~ 10184 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10185 linknames=' 10186 # The linker will not automatically build a static lib if we build a DLL. 10187 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10188 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10189 # Don't use ranlib 10190 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10191 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10192 lt_tool_outputfile="@TOOL_OUTPUT@"~ 10193 case $lt_outputfile in 10194 *.exe|*.EXE) ;; 10195 *) 10196 lt_outputfile=$lt_outputfile.exe 10197 lt_tool_outputfile=$lt_tool_outputfile.exe 10198 ;; 10199 esac~ 10200 func_to_tool_file "$lt_outputfile"~ 10201 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10202 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10203 $RM "$lt_outputfile.manifest"; 10204 fi' 10205 ;; 10206 *) 10207 # g++ 10208 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10209 # as there is no search path for DLLs. 10210 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10211 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10212 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10213 _LT_TAGVAR(always_export_symbols, $1)=no 10214 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10215 10216 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10217 _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' 10218 # If the export-symbols file already is a .def file, use it as 10219 # is; otherwise, prepend EXPORTS... 10220 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10221 cp $export_symbols $output_objdir/$soname.def; 10222 else 10223 echo EXPORTS > $output_objdir/$soname.def; 10224 cat $export_symbols >> $output_objdir/$soname.def; 10225 fi~ 10226 $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' 10227 else 10228 _LT_TAGVAR(ld_shlibs, $1)=no 10229 fi 10230 ;; 10231 esac 10232 ;; 10233 darwin* | rhapsody*) 10234 _LT_DARWIN_LINKER_FEATURES($1) 10235 ;; 10236 10237 os2*) 10238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10239 _LT_TAGVAR(hardcode_minus_L, $1)=yes 10240 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10241 shrext_cmds=.dll 10242 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10243 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10244 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10245 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10246 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10247 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10248 emximp -o $lib $output_objdir/$libname.def' 10249 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10250 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10251 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10252 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10253 prefix_cmds="$SED"~ 10254 if test EXPORTS = "`$SED 1q $export_symbols`"; then 10255 prefix_cmds="$prefix_cmds -e 1d"; 10256 fi~ 10257 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10258 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10259 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10260 emximp -o $lib $output_objdir/$libname.def' 10261 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10262 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10263 _LT_TAGVAR(file_list_spec, $1)='@' 10264 ;; 10265 10266 dgux*) 10267 case $cc_basename in 10268 ec++*) 10269 # FIXME: insert proper C++ library support 10270 _LT_TAGVAR(ld_shlibs, $1)=no 10271 ;; 10272 ghcx*) 10273 # Green Hills C++ Compiler 10274 # FIXME: insert proper C++ library support 10275 _LT_TAGVAR(ld_shlibs, $1)=no 10276 ;; 10277 *) 10278 # FIXME: insert proper C++ library support 10279 _LT_TAGVAR(ld_shlibs, $1)=no 10280 ;; 10281 esac 10282 ;; 10283 10284 freebsd2.*) 10285 # C++ shared libraries reported to be fairly broken before 10286 # switch to ELF 10287 _LT_TAGVAR(ld_shlibs, $1)=no 10288 ;; 10289 10290 freebsd-elf*) 10291 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10292 ;; 10293 10294 freebsd* | dragonfly* | midnightbsd*) 10295 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10296 # conventions 10297 _LT_TAGVAR(ld_shlibs, $1)=yes 10298 ;; 10299 10300 haiku*) 10301 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10302 _LT_TAGVAR(link_all_deplibs, $1)=yes 10303 ;; 10304 10305 hpux9*) 10306 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10307 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10308 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10309 _LT_TAGVAR(hardcode_direct, $1)=yes 10310 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10311 # but as the default 10312 # location of the library. 10313 10314 case $cc_basename in 10315 CC*) 10316 # FIXME: insert proper C++ library support 10317 _LT_TAGVAR(ld_shlibs, $1)=no 10318 ;; 10319 aCC*) 10320 _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' 10321 # Commands to make compiler produce verbose output that lists 10322 # what "hidden" libraries, object files and flags are used when 10323 # linking a shared library. 10324 # 10325 # There doesn't appear to be a way to prevent this compiler from 10326 # explicitly linking system object files so we need to strip them 10327 # from the output so that they don't get included in the library 10328 # dependencies. 10329 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"' 10330 ;; 10331 *) 10332 if test yes = "$GXX"; then 10333 _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' 10334 else 10335 # FIXME: insert proper C++ library support 10336 _LT_TAGVAR(ld_shlibs, $1)=no 10337 fi 10338 ;; 10339 esac 10340 ;; 10341 10342 hpux10*|hpux11*) 10343 if test no = "$with_gnu_ld"; then 10344 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10345 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10346 10347 case $host_cpu in 10348 hppa*64*|ia64*) 10349 ;; 10350 *) 10351 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10352 ;; 10353 esac 10354 fi 10355 case $host_cpu in 10356 hppa*64*|ia64*) 10357 _LT_TAGVAR(hardcode_direct, $1)=no 10358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10359 ;; 10360 *) 10361 _LT_TAGVAR(hardcode_direct, $1)=yes 10362 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10363 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10364 # but as the default 10365 # location of the library. 10366 ;; 10367 esac 10368 10369 case $cc_basename in 10370 CC*) 10371 # FIXME: insert proper C++ library support 10372 _LT_TAGVAR(ld_shlibs, $1)=no 10373 ;; 10374 aCC*) 10375 case $host_cpu in 10376 hppa*64*) 10377 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10378 ;; 10379 ia64*) 10380 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10381 ;; 10382 *) 10383 _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' 10384 ;; 10385 esac 10386 # Commands to make compiler produce verbose output that lists 10387 # what "hidden" libraries, object files and flags are used when 10388 # linking a shared library. 10389 # 10390 # There doesn't appear to be a way to prevent this compiler from 10391 # explicitly linking system object files so we need to strip them 10392 # from the output so that they don't get included in the library 10393 # dependencies. 10394 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"' 10395 ;; 10396 *) 10397 if test yes = "$GXX"; then 10398 if test no = "$with_gnu_ld"; then 10399 case $host_cpu in 10400 hppa*64*) 10401 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10402 ;; 10403 ia64*) 10404 _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' 10405 ;; 10406 *) 10407 _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' 10408 ;; 10409 esac 10410 fi 10411 else 10412 # FIXME: insert proper C++ library support 10413 _LT_TAGVAR(ld_shlibs, $1)=no 10414 fi 10415 ;; 10416 esac 10417 ;; 10418 10419 interix[[3-9]]*) 10420 _LT_TAGVAR(hardcode_direct, $1)=no 10421 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10422 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10423 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10424 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10425 # Instead, shared libraries are loaded at an image base (0x10000000 by 10426 # default) and relocated if they conflict, which is a slow very memory 10427 # consuming and fragmenting process. To avoid this, we pick a random, 10428 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10429 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10430 _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' 10431 _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' 10432 ;; 10433 irix5* | irix6*) 10434 case $cc_basename in 10435 CC*) 10436 # SGI C++ 10437 _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' 10438 10439 # Archives containing C++ object files must be created using 10440 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10441 # necessary to make sure instantiated templates are included 10442 # in the archive. 10443 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10444 ;; 10445 *) 10446 if test yes = "$GXX"; then 10447 if test no = "$with_gnu_ld"; then 10448 _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' 10449 else 10450 _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' 10451 fi 10452 fi 10453 _LT_TAGVAR(link_all_deplibs, $1)=yes 10454 ;; 10455 esac 10456 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10457 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10458 _LT_TAGVAR(inherit_rpath, $1)=yes 10459 ;; 10460 10461 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10462 case $cc_basename in 10463 KCC*) 10464 # Kuck and Associates, Inc. (KAI) C++ Compiler 10465 10466 # KCC will only create a shared library if the output file 10467 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10468 # to its proper name (with version) after linking. 10469 _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' 10470 _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' 10471 # Commands to make compiler produce verbose output that lists 10472 # what "hidden" libraries, object files and flags are used when 10473 # linking a shared library. 10474 # 10475 # There doesn't appear to be a way to prevent this compiler from 10476 # explicitly linking system object files so we need to strip them 10477 # from the output so that they don't get included in the library 10478 # dependencies. 10479 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"' 10480 10481 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10482 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10483 10484 # Archives containing C++ object files must be created using 10485 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10486 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10487 ;; 10488 icpc* | ecpc* ) 10489 # Intel C++ 10490 with_gnu_ld=yes 10491 # version 8.0 and above of icpc choke on multiply defined symbols 10492 # if we add $predep_objects and $postdep_objects, however 7.1 and 10493 # earlier do not add the objects themselves. 10494 case `$CC -V 2>&1` in 10495 *"Version 7."*) 10496 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10497 _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' 10498 ;; 10499 *) # Version 8.0 or newer 10500 tmp_idyn= 10501 case $host_cpu in 10502 ia64*) tmp_idyn=' -i_dynamic';; 10503 esac 10504 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10505 _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' 10506 ;; 10507 esac 10508 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10510 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10511 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10512 ;; 10513 pgCC* | pgcpp*) 10514 # Portland Group C++ compiler 10515 case `$CC -V` in 10516 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10517 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10518 rm -rf $tpldir~ 10519 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10520 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10521 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10522 rm -rf $tpldir~ 10523 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10524 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10525 $RANLIB $oldlib' 10526 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10527 rm -rf $tpldir~ 10528 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10529 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10530 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10531 rm -rf $tpldir~ 10532 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10533 $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' 10534 ;; 10535 *) # Version 6 and above use weak symbols 10536 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10537 _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' 10538 ;; 10539 esac 10540 10541 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10542 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10543 _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' 10544 ;; 10545 cxx*) 10546 # Compaq C++ 10547 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10548 _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' 10549 10550 runpath_var=LD_RUN_PATH 10551 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10552 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10553 10554 # Commands to make compiler produce verbose output that lists 10555 # what "hidden" libraries, object files and flags are used when 10556 # linking a shared library. 10557 # 10558 # There doesn't appear to be a way to prevent this compiler from 10559 # explicitly linking system object files so we need to strip them 10560 # from the output so that they don't get included in the library 10561 # dependencies. 10562 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' 10563 ;; 10564 xl* | mpixl* | bgxl*) 10565 # IBM XL 8.0 on PPC, with GNU ld 10566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10567 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10568 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10569 if test yes = "$supports_anon_versioning"; then 10570 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10571 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10572 echo "local: *; };" >> $output_objdir/$libname.ver~ 10573 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10574 fi 10575 ;; 10576 *) 10577 case `$CC -V 2>&1 | $SED 5q` in 10578 *Sun\ C*) 10579 # Sun C++ 5.9 10580 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10581 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10582 _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' 10583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10584 _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' 10585 _LT_TAGVAR(compiler_needs_object, $1)=yes 10586 10587 # Not sure whether something based on 10588 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10589 # would be better. 10590 output_verbose_link_cmd='func_echo_all' 10591 10592 # Archives containing C++ object files must be created using 10593 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10594 # necessary to make sure instantiated templates are included 10595 # in the archive. 10596 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10597 ;; 10598 esac 10599 ;; 10600 esac 10601 ;; 10602 10603 lynxos*) 10604 # FIXME: insert proper C++ library support 10605 _LT_TAGVAR(ld_shlibs, $1)=no 10606 ;; 10607 10608 m88k*) 10609 # FIXME: insert proper C++ library support 10610 _LT_TAGVAR(ld_shlibs, $1)=no 10611 ;; 10612 10613 mvs*) 10614 case $cc_basename in 10615 cxx*) 10616 # FIXME: insert proper C++ library support 10617 _LT_TAGVAR(ld_shlibs, $1)=no 10618 ;; 10619 *) 10620 # FIXME: insert proper C++ library support 10621 _LT_TAGVAR(ld_shlibs, $1)=no 10622 ;; 10623 esac 10624 ;; 10625 10626 netbsd*) 10627 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10628 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10629 wlarc= 10630 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10631 _LT_TAGVAR(hardcode_direct, $1)=yes 10632 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10633 fi 10634 # Workaround some broken pre-1.5 toolchains 10635 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10636 ;; 10637 10638 *nto* | *qnx*) 10639 _LT_TAGVAR(ld_shlibs, $1)=yes 10640 ;; 10641 10642 openbsd* | bitrig*) 10643 if test -f /usr/libexec/ld.so; then 10644 _LT_TAGVAR(hardcode_direct, $1)=yes 10645 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10646 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10647 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10648 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10649 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10650 _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' 10651 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10652 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10653 fi 10654 output_verbose_link_cmd=func_echo_all 10655 else 10656 _LT_TAGVAR(ld_shlibs, $1)=no 10657 fi 10658 ;; 10659 10660 osf3* | osf4* | osf5*) 10661 case $cc_basename in 10662 KCC*) 10663 # Kuck and Associates, Inc. (KAI) C++ Compiler 10664 10665 # KCC will only create a shared library if the output file 10666 # ends with ".so" (or ".sl" for HP-UX), so rename the library 10667 # to its proper name (with version) after linking. 10668 _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' 10669 10670 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10671 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10672 10673 # Archives containing C++ object files must be created using 10674 # the KAI C++ compiler. 10675 case $host in 10676 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10677 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10678 esac 10679 ;; 10680 RCC*) 10681 # Rational C++ 2.4.1 10682 # FIXME: insert proper C++ library support 10683 _LT_TAGVAR(ld_shlibs, $1)=no 10684 ;; 10685 cxx*) 10686 case $host in 10687 osf3*) 10688 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10689 _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' 10690 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10691 ;; 10692 *) 10693 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10694 _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' 10695 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10696 echo "-hidden">> $lib.exp~ 10697 $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~ 10698 $RM $lib.exp' 10699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10700 ;; 10701 esac 10702 10703 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10704 10705 # Commands to make compiler produce verbose output that lists 10706 # what "hidden" libraries, object files and flags are used when 10707 # linking a shared library. 10708 # 10709 # There doesn't appear to be a way to prevent this compiler from 10710 # explicitly linking system object files so we need to strip them 10711 # from the output so that they don't get included in the library 10712 # dependencies. 10713 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"' 10714 ;; 10715 *) 10716 if test yes,no = "$GXX,$with_gnu_ld"; then 10717 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10718 case $host in 10719 osf3*) 10720 _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' 10721 ;; 10722 *) 10723 _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' 10724 ;; 10725 esac 10726 10727 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10728 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10729 10730 # Commands to make compiler produce verbose output that lists 10731 # what "hidden" libraries, object files and flags are used when 10732 # linking a shared library. 10733 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10734 10735 else 10736 # FIXME: insert proper C++ library support 10737 _LT_TAGVAR(ld_shlibs, $1)=no 10738 fi 10739 ;; 10740 esac 10741 ;; 10742 10743 psos*) 10744 # FIXME: insert proper C++ library support 10745 _LT_TAGVAR(ld_shlibs, $1)=no 10746 ;; 10747 10748 sunos4*) 10749 case $cc_basename in 10750 CC*) 10751 # Sun C++ 4.x 10752 # FIXME: insert proper C++ library support 10753 _LT_TAGVAR(ld_shlibs, $1)=no 10754 ;; 10755 lcc*) 10756 # Lucid 10757 # FIXME: insert proper C++ library support 10758 _LT_TAGVAR(ld_shlibs, $1)=no 10759 ;; 10760 *) 10761 # FIXME: insert proper C++ library support 10762 _LT_TAGVAR(ld_shlibs, $1)=no 10763 ;; 10764 esac 10765 ;; 10766 10767 solaris*) 10768 case $cc_basename in 10769 CC* | sunCC*) 10770 # Sun C++ 4.2, 5.x and Centerline C++ 10771 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10772 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10773 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10774 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10775 $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' 10776 10777 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10778 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10779 case $host_os in 10780 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10781 *) 10782 # The compiler driver will combine and reorder linker options, 10783 # but understands '-z linker_flag'. 10784 # Supported since Solaris 2.6 (maybe 2.5.1?) 10785 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10786 ;; 10787 esac 10788 _LT_TAGVAR(link_all_deplibs, $1)=yes 10789 10790 output_verbose_link_cmd='func_echo_all' 10791 10792 # Archives containing C++ object files must be created using 10793 # "CC -xar", where "CC" is the Sun C++ compiler. This is 10794 # necessary to make sure instantiated templates are included 10795 # in the archive. 10796 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10797 ;; 10798 gcx*) 10799 # Green Hills C++ Compiler 10800 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10801 10802 # The C++ compiler must be used to create the archive. 10803 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10804 ;; 10805 *) 10806 # GNU C++ compiler with Solaris linker 10807 if test yes,no = "$GXX,$with_gnu_ld"; then 10808 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10809 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10811 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10812 $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' 10813 10814 # Commands to make compiler produce verbose output that lists 10815 # what "hidden" libraries, object files and flags are used when 10816 # linking a shared library. 10817 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10818 else 10819 # g++ 2.7 appears to require '-G' NOT '-shared' on this 10820 # platform. 10821 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10822 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10823 $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' 10824 10825 # Commands to make compiler produce verbose output that lists 10826 # what "hidden" libraries, object files and flags are used when 10827 # linking a shared library. 10828 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10829 fi 10830 10831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10832 case $host_os in 10833 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10834 *) 10835 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10836 ;; 10837 esac 10838 fi 10839 ;; 10840 esac 10841 ;; 10842 10843 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10844 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10845 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10846 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10847 runpath_var='LD_RUN_PATH' 10848 10849 case $cc_basename in 10850 CC*) 10851 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10852 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10853 ;; 10854 *) 10855 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10856 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10857 ;; 10858 esac 10859 ;; 10860 10861 sysv5* | sco3.2v5* | sco5v6*) 10862 # Note: We CANNOT use -z defs as we might desire, because we do not 10863 # link with -lc, and that would cause any symbols used from libc to 10864 # always be unresolved, which means just about no library would 10865 # ever link correctly. If we're not using GNU ld we use -z text 10866 # though, which does catch some bad symbols but isn't as heavy-handed 10867 # as -z defs. 10868 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10869 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10870 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10871 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10873 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10874 _LT_TAGVAR(link_all_deplibs, $1)=yes 10875 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10876 runpath_var='LD_RUN_PATH' 10877 10878 case $cc_basename in 10879 CC*) 10880 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10881 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10882 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10883 '"$_LT_TAGVAR(old_archive_cmds, $1)" 10884 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10885 '"$_LT_TAGVAR(reload_cmds, $1)" 10886 ;; 10887 *) 10888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10889 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10890 ;; 10891 esac 10892 ;; 10893 10894 tandem*) 10895 case $cc_basename in 10896 NCC*) 10897 # NonStop-UX NCC 3.20 10898 # FIXME: insert proper C++ library support 10899 _LT_TAGVAR(ld_shlibs, $1)=no 10900 ;; 10901 *) 10902 # FIXME: insert proper C++ library support 10903 _LT_TAGVAR(ld_shlibs, $1)=no 10904 ;; 10905 esac 10906 ;; 10907 10908 vxworks*) 10909 # FIXME: insert proper C++ library support 10910 _LT_TAGVAR(ld_shlibs, $1)=no 10911 ;; 10912 10913 *) 10914 # FIXME: insert proper C++ library support 10915 _LT_TAGVAR(ld_shlibs, $1)=no 10916 ;; 10917 esac 10918 10919 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10920 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10921 10922 _LT_TAGVAR(GCC, $1)=$GXX 10923 _LT_TAGVAR(LD, $1)=$LD 10924 10925 ## CAVEAT EMPTOR: 10926 ## There is no encapsulation within the following macros, do not change 10927 ## the running order or otherwise move them around unless you know exactly 10928 ## what you are doing... 10929 _LT_SYS_HIDDEN_LIBDEPS($1) 10930 _LT_COMPILER_PIC($1) 10931 _LT_COMPILER_C_O($1) 10932 _LT_COMPILER_FILE_LOCKS($1) 10933 _LT_LINKER_SHLIBS($1) 10934 _LT_SYS_DYNAMIC_LINKER($1) 10935 _LT_LINKER_HARDCODE_LIBPATH($1) 10936 10937 _LT_CONFIG($1) 10938 fi # test -n "$compiler" 10939 10940 CC=$lt_save_CC 10941 CFLAGS=$lt_save_CFLAGS 10942 LDCXX=$LD 10943 LD=$lt_save_LD 10944 GCC=$lt_save_GCC 10945 with_gnu_ld=$lt_save_with_gnu_ld 10946 lt_cv_path_LDCXX=$lt_cv_path_LD 10947 lt_cv_path_LD=$lt_save_path_LD 10948 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10949 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10950fi # test yes != "$_lt_caught_CXX_error" 10951 10952AC_LANG_POP 10953])# _LT_LANG_CXX_CONFIG 10954 10955 10956# _LT_FUNC_STRIPNAME_CNF 10957# ---------------------- 10958# func_stripname_cnf prefix suffix name 10959# strip PREFIX and SUFFIX off of NAME. 10960# PREFIX and SUFFIX must not contain globbing or regex special 10961# characters, hashes, percent signs, but SUFFIX may contain a leading 10962# dot (in which case that matches only a dot). 10963# 10964# This function is identical to the (non-XSI) version of func_stripname, 10965# except this one can be used by m4 code that may be executed by configure, 10966# rather than the libtool script. 10967m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10968AC_REQUIRE([_LT_DECL_SED]) 10969AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10970func_stripname_cnf () 10971{ 10972 case @S|@2 in 10973 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10974 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10975 esac 10976} # func_stripname_cnf 10977])# _LT_FUNC_STRIPNAME_CNF 10978 10979 10980# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10981# --------------------------------- 10982# Figure out "hidden" library dependencies from verbose 10983# compiler output when linking a shared library. 10984# Parse the compiler output and extract the necessary 10985# objects, libraries and library flags. 10986m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10987[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10988AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10989# Dependencies to place before and after the object being linked: 10990_LT_TAGVAR(predep_objects, $1)= 10991_LT_TAGVAR(postdep_objects, $1)= 10992_LT_TAGVAR(predeps, $1)= 10993_LT_TAGVAR(postdeps, $1)= 10994_LT_TAGVAR(compiler_lib_search_path, $1)= 10995 10996dnl we can't use the lt_simple_compile_test_code here, 10997dnl because it contains code intended for an executable, 10998dnl not a library. It's possible we should let each 10999dnl tag define a new lt_????_link_test_code variable, 11000dnl but it's only used here... 11001m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 11002int a; 11003void foo (void) { a = 0; } 11004_LT_EOF 11005], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 11006class Foo 11007{ 11008public: 11009 Foo (void) { a = 0; } 11010private: 11011 int a; 11012}; 11013_LT_EOF 11014], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 11015 subroutine foo 11016 implicit none 11017 integer*4 a 11018 a=0 11019 return 11020 end 11021_LT_EOF 11022], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 11023 subroutine foo 11024 implicit none 11025 integer a 11026 a=0 11027 return 11028 end 11029_LT_EOF 11030], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 11031public class foo { 11032 private int a; 11033 public void bar (void) { 11034 a = 0; 11035 } 11036}; 11037_LT_EOF 11038], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 11039package foo 11040func foo() { 11041} 11042_LT_EOF 11043]) 11044 11045_lt_libdeps_save_CFLAGS=$CFLAGS 11046case "$CC $CFLAGS " in #( 11047*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 11048*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 11049*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 11050esac 11051 11052dnl Parse the compiler output and extract the necessary 11053dnl objects, libraries and library flags. 11054if AC_TRY_EVAL(ac_compile); then 11055 # Parse the compiler output and extract the necessary 11056 # objects, libraries and library flags. 11057 11058 # Sentinel used to keep track of whether or not we are before 11059 # the conftest object file. 11060 pre_test_object_deps_done=no 11061 11062 for p in `eval "$output_verbose_link_cmd"`; do 11063 case $prev$p in 11064 11065 -L* | -R* | -l*) 11066 # Some compilers place space between "-{L,R}" and the path. 11067 # Remove the space. 11068 if test x-L = "$p" || 11069 test x-R = "$p"; then 11070 prev=$p 11071 continue 11072 fi 11073 11074 # Expand the sysroot to ease extracting the directories later. 11075 if test -z "$prev"; then 11076 case $p in 11077 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 11078 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 11079 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 11080 esac 11081 fi 11082 case $p in 11083 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 11084 esac 11085 if test no = "$pre_test_object_deps_done"; then 11086 case $prev in 11087 -L | -R) 11088 # Internal compiler library paths should come after those 11089 # provided the user. The postdeps already come after the 11090 # user supplied libs so there is no need to process them. 11091 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 11092 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 11093 else 11094 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 11095 fi 11096 ;; 11097 # The "-l" case would never come before the object being 11098 # linked, so don't bother handling this case. 11099 esac 11100 else 11101 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 11102 _LT_TAGVAR(postdeps, $1)=$prev$p 11103 else 11104 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11105 fi 11106 fi 11107 prev= 11108 ;; 11109 11110 *.lto.$objext) ;; # Ignore GCC LTO objects 11111 *.$objext) 11112 # This assumes that the test object file only shows up 11113 # once in the compiler output. 11114 if test "$p" = "conftest.$objext"; then 11115 pre_test_object_deps_done=yes 11116 continue 11117 fi 11118 11119 if test no = "$pre_test_object_deps_done"; then 11120 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11121 _LT_TAGVAR(predep_objects, $1)=$p 11122 else 11123 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11124 fi 11125 else 11126 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11127 _LT_TAGVAR(postdep_objects, $1)=$p 11128 else 11129 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11130 fi 11131 fi 11132 ;; 11133 11134 *) ;; # Ignore the rest. 11135 11136 esac 11137 done 11138 11139 # Clean up. 11140 rm -f a.out a.exe 11141else 11142 echo "libtool.m4: error: problem compiling $1 test program" 11143fi 11144 11145$RM -f confest.$objext 11146CFLAGS=$_lt_libdeps_save_CFLAGS 11147 11148# PORTME: override above test on systems where it is broken 11149m4_if([$1], [CXX], 11150[case $host_os in 11151interix[[3-9]]*) 11152 # Interix 3.5 installs completely hosed .la files for C++, so rather than 11153 # hack all around it, let's just trust "g++" to DTRT. 11154 _LT_TAGVAR(predep_objects,$1)= 11155 _LT_TAGVAR(postdep_objects,$1)= 11156 _LT_TAGVAR(postdeps,$1)= 11157 ;; 11158esac 11159]) 11160 11161case " $_LT_TAGVAR(postdeps, $1) " in 11162*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11163esac 11164 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11165if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11166 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11167fi 11168_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11169 [The directories searched by this compiler when creating a shared library]) 11170_LT_TAGDECL([], [predep_objects], [1], 11171 [Dependencies to place before and after the objects being linked to 11172 create a shared library]) 11173_LT_TAGDECL([], [postdep_objects], [1]) 11174_LT_TAGDECL([], [predeps], [1]) 11175_LT_TAGDECL([], [postdeps], [1]) 11176_LT_TAGDECL([], [compiler_lib_search_path], [1], 11177 [The library search path used internally by the compiler when linking 11178 a shared library]) 11179])# _LT_SYS_HIDDEN_LIBDEPS 11180 11181 11182# _LT_LANG_F77_CONFIG([TAG]) 11183# -------------------------- 11184# Ensure that the configuration variables for a Fortran 77 compiler are 11185# suitably defined. These variables are subsequently used by _LT_CONFIG 11186# to write the compiler configuration to 'libtool'. 11187m4_defun([_LT_LANG_F77_CONFIG], 11188[AC_LANG_PUSH(Fortran 77) 11189if test -z "$F77" || test no = "$F77"; then 11190 _lt_disable_F77=yes 11191fi 11192 11193_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11194_LT_TAGVAR(allow_undefined_flag, $1)= 11195_LT_TAGVAR(always_export_symbols, $1)=no 11196_LT_TAGVAR(archive_expsym_cmds, $1)= 11197_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11198_LT_TAGVAR(hardcode_direct, $1)=no 11199_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11200_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11201_LT_TAGVAR(hardcode_libdir_separator, $1)= 11202_LT_TAGVAR(hardcode_minus_L, $1)=no 11203_LT_TAGVAR(hardcode_automatic, $1)=no 11204_LT_TAGVAR(inherit_rpath, $1)=no 11205_LT_TAGVAR(module_cmds, $1)= 11206_LT_TAGVAR(module_expsym_cmds, $1)= 11207_LT_TAGVAR(link_all_deplibs, $1)=unknown 11208_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11209_LT_TAGVAR(reload_flag, $1)=$reload_flag 11210_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11211_LT_TAGVAR(no_undefined_flag, $1)= 11212_LT_TAGVAR(whole_archive_flag_spec, $1)= 11213_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11214 11215# Source file extension for f77 test sources. 11216ac_ext=f 11217 11218# Object file extension for compiled f77 test sources. 11219objext=o 11220_LT_TAGVAR(objext, $1)=$objext 11221 11222# No sense in running all these tests if we already determined that 11223# the F77 compiler isn't working. Some variables (like enable_shared) 11224# are currently assumed to apply to all compilers on this platform, 11225# and will be corrupted by setting them based on a non-working compiler. 11226if test yes != "$_lt_disable_F77"; then 11227 # Code to be used in simple compile tests 11228 lt_simple_compile_test_code="\ 11229 subroutine t 11230 return 11231 end 11232" 11233 11234 # Code to be used in simple link tests 11235 lt_simple_link_test_code="\ 11236 program t 11237 end 11238" 11239 11240 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11241 _LT_TAG_COMPILER 11242 11243 # save warnings/boilerplate of simple test code 11244 _LT_COMPILER_BOILERPLATE 11245 _LT_LINKER_BOILERPLATE 11246 11247 # Allow CC to be a program name with arguments. 11248 lt_save_CC=$CC 11249 lt_save_GCC=$GCC 11250 lt_save_CFLAGS=$CFLAGS 11251 CC=${F77-"f77"} 11252 CFLAGS=$FFLAGS 11253 compiler=$CC 11254 _LT_TAGVAR(compiler, $1)=$CC 11255 _LT_CC_BASENAME([$compiler]) 11256 GCC=$G77 11257 if test -n "$compiler"; then 11258 AC_MSG_CHECKING([if libtool supports shared libraries]) 11259 AC_MSG_RESULT([$can_build_shared]) 11260 11261 AC_MSG_CHECKING([whether to build shared libraries]) 11262 test no = "$can_build_shared" && enable_shared=no 11263 11264 # On AIX, shared libraries and static libraries use the same namespace, and 11265 # are all built from PIC. 11266 case $host_os in 11267 aix3*) 11268 test yes = "$enable_shared" && enable_static=no 11269 if test -n "$RANLIB"; then 11270 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11271 postinstall_cmds='$RANLIB $lib' 11272 fi 11273 ;; 11274 aix[[4-9]]*) 11275 if test ia64 != "$host_cpu"; then 11276 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11277 yes,aix,yes) ;; # shared object as lib.so file only 11278 yes,svr4,*) ;; # shared object as lib.so archive member only 11279 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11280 esac 11281 fi 11282 ;; 11283 esac 11284 AC_MSG_RESULT([$enable_shared]) 11285 11286 AC_MSG_CHECKING([whether to build static libraries]) 11287 # Make sure either enable_shared or enable_static is yes. 11288 test yes = "$enable_shared" || enable_static=yes 11289 AC_MSG_RESULT([$enable_static]) 11290 11291 _LT_TAGVAR(GCC, $1)=$G77 11292 _LT_TAGVAR(LD, $1)=$LD 11293 11294 ## CAVEAT EMPTOR: 11295 ## There is no encapsulation within the following macros, do not change 11296 ## the running order or otherwise move them around unless you know exactly 11297 ## what you are doing... 11298 _LT_COMPILER_PIC($1) 11299 _LT_COMPILER_C_O($1) 11300 _LT_COMPILER_FILE_LOCKS($1) 11301 _LT_LINKER_SHLIBS($1) 11302 _LT_SYS_DYNAMIC_LINKER($1) 11303 _LT_LINKER_HARDCODE_LIBPATH($1) 11304 11305 _LT_CONFIG($1) 11306 fi # test -n "$compiler" 11307 11308 GCC=$lt_save_GCC 11309 CC=$lt_save_CC 11310 CFLAGS=$lt_save_CFLAGS 11311fi # test yes != "$_lt_disable_F77" 11312 11313AC_LANG_POP 11314])# _LT_LANG_F77_CONFIG 11315 11316 11317# _LT_LANG_FC_CONFIG([TAG]) 11318# ------------------------- 11319# Ensure that the configuration variables for a Fortran compiler are 11320# suitably defined. These variables are subsequently used by _LT_CONFIG 11321# to write the compiler configuration to 'libtool'. 11322m4_defun([_LT_LANG_FC_CONFIG], 11323[AC_LANG_PUSH(Fortran) 11324 11325if test -z "$FC" || test no = "$FC"; then 11326 _lt_disable_FC=yes 11327fi 11328 11329_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11330_LT_TAGVAR(allow_undefined_flag, $1)= 11331_LT_TAGVAR(always_export_symbols, $1)=no 11332_LT_TAGVAR(archive_expsym_cmds, $1)= 11333_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11334_LT_TAGVAR(hardcode_direct, $1)=no 11335_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11336_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11337_LT_TAGVAR(hardcode_libdir_separator, $1)= 11338_LT_TAGVAR(hardcode_minus_L, $1)=no 11339_LT_TAGVAR(hardcode_automatic, $1)=no 11340_LT_TAGVAR(inherit_rpath, $1)=no 11341_LT_TAGVAR(module_cmds, $1)= 11342_LT_TAGVAR(module_expsym_cmds, $1)= 11343_LT_TAGVAR(link_all_deplibs, $1)=unknown 11344_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11345_LT_TAGVAR(reload_flag, $1)=$reload_flag 11346_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11347_LT_TAGVAR(no_undefined_flag, $1)= 11348_LT_TAGVAR(whole_archive_flag_spec, $1)= 11349_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11350 11351# Source file extension for fc test sources. 11352ac_ext=${ac_fc_srcext-f} 11353 11354# Object file extension for compiled fc test sources. 11355objext=o 11356_LT_TAGVAR(objext, $1)=$objext 11357 11358# No sense in running all these tests if we already determined that 11359# the FC compiler isn't working. Some variables (like enable_shared) 11360# are currently assumed to apply to all compilers on this platform, 11361# and will be corrupted by setting them based on a non-working compiler. 11362if test yes != "$_lt_disable_FC"; then 11363 # Code to be used in simple compile tests 11364 lt_simple_compile_test_code="\ 11365 subroutine t 11366 return 11367 end 11368" 11369 11370 # Code to be used in simple link tests 11371 lt_simple_link_test_code="\ 11372 program t 11373 end 11374" 11375 11376 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11377 _LT_TAG_COMPILER 11378 11379 # save warnings/boilerplate of simple test code 11380 _LT_COMPILER_BOILERPLATE 11381 _LT_LINKER_BOILERPLATE 11382 11383 # Allow CC to be a program name with arguments. 11384 lt_save_CC=$CC 11385 lt_save_GCC=$GCC 11386 lt_save_CFLAGS=$CFLAGS 11387 CC=${FC-"f95"} 11388 CFLAGS=$FCFLAGS 11389 compiler=$CC 11390 GCC=$ac_cv_fc_compiler_gnu 11391 11392 _LT_TAGVAR(compiler, $1)=$CC 11393 _LT_CC_BASENAME([$compiler]) 11394 11395 if test -n "$compiler"; then 11396 AC_MSG_CHECKING([if libtool supports shared libraries]) 11397 AC_MSG_RESULT([$can_build_shared]) 11398 11399 AC_MSG_CHECKING([whether to build shared libraries]) 11400 test no = "$can_build_shared" && enable_shared=no 11401 11402 # On AIX, shared libraries and static libraries use the same namespace, and 11403 # are all built from PIC. 11404 case $host_os in 11405 aix3*) 11406 test yes = "$enable_shared" && enable_static=no 11407 if test -n "$RANLIB"; then 11408 archive_cmds="$archive_cmds~\$RANLIB \$lib" 11409 postinstall_cmds='$RANLIB $lib' 11410 fi 11411 ;; 11412 aix[[4-9]]*) 11413 if test ia64 != "$host_cpu"; then 11414 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11415 yes,aix,yes) ;; # shared object as lib.so file only 11416 yes,svr4,*) ;; # shared object as lib.so archive member only 11417 yes,*) enable_static=no ;; # shared object in lib.a archive as well 11418 esac 11419 fi 11420 ;; 11421 esac 11422 AC_MSG_RESULT([$enable_shared]) 11423 11424 AC_MSG_CHECKING([whether to build static libraries]) 11425 # Make sure either enable_shared or enable_static is yes. 11426 test yes = "$enable_shared" || enable_static=yes 11427 AC_MSG_RESULT([$enable_static]) 11428 11429 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11430 _LT_TAGVAR(LD, $1)=$LD 11431 11432 ## CAVEAT EMPTOR: 11433 ## There is no encapsulation within the following macros, do not change 11434 ## the running order or otherwise move them around unless you know exactly 11435 ## what you are doing... 11436 _LT_SYS_HIDDEN_LIBDEPS($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_SYS_DYNAMIC_LINKER($1) 11442 _LT_LINKER_HARDCODE_LIBPATH($1) 11443 11444 _LT_CONFIG($1) 11445 fi # test -n "$compiler" 11446 11447 GCC=$lt_save_GCC 11448 CC=$lt_save_CC 11449 CFLAGS=$lt_save_CFLAGS 11450fi # test yes != "$_lt_disable_FC" 11451 11452AC_LANG_POP 11453])# _LT_LANG_FC_CONFIG 11454 11455 11456# _LT_LANG_GCJ_CONFIG([TAG]) 11457# -------------------------- 11458# Ensure that the configuration variables for the GNU Java Compiler compiler 11459# are suitably defined. These variables are subsequently used by _LT_CONFIG 11460# to write the compiler configuration to 'libtool'. 11461m4_defun([_LT_LANG_GCJ_CONFIG], 11462[AC_REQUIRE([LT_PROG_GCJ])dnl 11463AC_LANG_SAVE 11464 11465# Source file extension for Java test sources. 11466ac_ext=java 11467 11468# Object file extension for compiled Java test sources. 11469objext=o 11470_LT_TAGVAR(objext, $1)=$objext 11471 11472# Code to be used in simple compile tests 11473lt_simple_compile_test_code="class foo {}" 11474 11475# Code to be used in simple link tests 11476lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11477 11478# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11479_LT_TAG_COMPILER 11480 11481# save warnings/boilerplate of simple test code 11482_LT_COMPILER_BOILERPLATE 11483_LT_LINKER_BOILERPLATE 11484 11485# Allow CC to be a program name with arguments. 11486lt_save_CC=$CC 11487lt_save_CFLAGS=$CFLAGS 11488lt_save_GCC=$GCC 11489GCC=yes 11490CC=${GCJ-"gcj"} 11491CFLAGS=$GCJFLAGS 11492compiler=$CC 11493_LT_TAGVAR(compiler, $1)=$CC 11494_LT_TAGVAR(LD, $1)=$LD 11495_LT_CC_BASENAME([$compiler]) 11496 11497# GCJ did not exist at the time GCC didn't implicitly link libc in. 11498_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11499 11500_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11501_LT_TAGVAR(reload_flag, $1)=$reload_flag 11502_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11503 11504if test -n "$compiler"; then 11505 _LT_COMPILER_NO_RTTI($1) 11506 _LT_COMPILER_PIC($1) 11507 _LT_COMPILER_C_O($1) 11508 _LT_COMPILER_FILE_LOCKS($1) 11509 _LT_LINKER_SHLIBS($1) 11510 _LT_LINKER_HARDCODE_LIBPATH($1) 11511 11512 _LT_CONFIG($1) 11513fi 11514 11515AC_LANG_RESTORE 11516 11517GCC=$lt_save_GCC 11518CC=$lt_save_CC 11519CFLAGS=$lt_save_CFLAGS 11520])# _LT_LANG_GCJ_CONFIG 11521 11522 11523# _LT_LANG_GO_CONFIG([TAG]) 11524# -------------------------- 11525# Ensure that the configuration variables for the GNU Go compiler 11526# are suitably defined. These variables are subsequently used by _LT_CONFIG 11527# to write the compiler configuration to 'libtool'. 11528m4_defun([_LT_LANG_GO_CONFIG], 11529[AC_REQUIRE([LT_PROG_GO])dnl 11530AC_LANG_SAVE 11531 11532# Source file extension for Go test sources. 11533ac_ext=go 11534 11535# Object file extension for compiled Go test sources. 11536objext=o 11537_LT_TAGVAR(objext, $1)=$objext 11538 11539# Code to be used in simple compile tests 11540lt_simple_compile_test_code="package main; func main() { }" 11541 11542# Code to be used in simple link tests 11543lt_simple_link_test_code='package main; func main() { }' 11544 11545# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11546_LT_TAG_COMPILER 11547 11548# save warnings/boilerplate of simple test code 11549_LT_COMPILER_BOILERPLATE 11550_LT_LINKER_BOILERPLATE 11551 11552# Allow CC to be a program name with arguments. 11553lt_save_CC=$CC 11554lt_save_CFLAGS=$CFLAGS 11555lt_save_GCC=$GCC 11556GCC=yes 11557CC=${GOC-"gccgo"} 11558CFLAGS=$GOFLAGS 11559compiler=$CC 11560_LT_TAGVAR(compiler, $1)=$CC 11561_LT_TAGVAR(LD, $1)=$LD 11562_LT_CC_BASENAME([$compiler]) 11563 11564# Go did not exist at the time GCC didn't implicitly link libc in. 11565_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11566 11567_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11568_LT_TAGVAR(reload_flag, $1)=$reload_flag 11569_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11570 11571if test -n "$compiler"; then 11572 _LT_COMPILER_NO_RTTI($1) 11573 _LT_COMPILER_PIC($1) 11574 _LT_COMPILER_C_O($1) 11575 _LT_COMPILER_FILE_LOCKS($1) 11576 _LT_LINKER_SHLIBS($1) 11577 _LT_LINKER_HARDCODE_LIBPATH($1) 11578 11579 _LT_CONFIG($1) 11580fi 11581 11582AC_LANG_RESTORE 11583 11584GCC=$lt_save_GCC 11585CC=$lt_save_CC 11586CFLAGS=$lt_save_CFLAGS 11587])# _LT_LANG_GO_CONFIG 11588 11589 11590# _LT_LANG_RC_CONFIG([TAG]) 11591# ------------------------- 11592# Ensure that the configuration variables for the Windows resource compiler 11593# are suitably defined. These variables are subsequently used by _LT_CONFIG 11594# to write the compiler configuration to 'libtool'. 11595m4_defun([_LT_LANG_RC_CONFIG], 11596[AC_REQUIRE([LT_PROG_RC])dnl 11597AC_LANG_SAVE 11598 11599# Source file extension for RC test sources. 11600ac_ext=rc 11601 11602# Object file extension for compiled RC test sources. 11603objext=o 11604_LT_TAGVAR(objext, $1)=$objext 11605 11606# Code to be used in simple compile tests 11607lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11608 11609# Code to be used in simple link tests 11610lt_simple_link_test_code=$lt_simple_compile_test_code 11611 11612# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11613_LT_TAG_COMPILER 11614 11615# save warnings/boilerplate of simple test code 11616_LT_COMPILER_BOILERPLATE 11617_LT_LINKER_BOILERPLATE 11618 11619# Allow CC to be a program name with arguments. 11620lt_save_CC=$CC 11621lt_save_CFLAGS=$CFLAGS 11622lt_save_GCC=$GCC 11623GCC= 11624CC=${RC-"windres"} 11625CFLAGS= 11626compiler=$CC 11627_LT_TAGVAR(compiler, $1)=$CC 11628_LT_CC_BASENAME([$compiler]) 11629_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11630 11631if test -n "$compiler"; then 11632 : 11633 _LT_CONFIG($1) 11634fi 11635 11636GCC=$lt_save_GCC 11637AC_LANG_RESTORE 11638CC=$lt_save_CC 11639CFLAGS=$lt_save_CFLAGS 11640])# _LT_LANG_RC_CONFIG 11641 11642 11643# LT_PROG_GCJ 11644# ----------- 11645AC_DEFUN([LT_PROG_GCJ], 11646[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11647 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11648 [AC_CHECK_TOOL(GCJ, gcj,) 11649 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11650 AC_SUBST(GCJFLAGS)])])[]dnl 11651]) 11652 11653# Old name: 11654AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11655dnl aclocal-1.4 backwards compatibility: 11656dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11657 11658 11659# LT_PROG_GO 11660# ---------- 11661AC_DEFUN([LT_PROG_GO], 11662[AC_CHECK_TOOL(GOC, gccgo,) 11663]) 11664 11665 11666# LT_PROG_RC 11667# ---------- 11668AC_DEFUN([LT_PROG_RC], 11669[AC_CHECK_TOOL(RC, windres,) 11670]) 11671 11672# Old name: 11673AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11674dnl aclocal-1.4 backwards compatibility: 11675dnl AC_DEFUN([LT_AC_PROG_RC], []) 11676 11677 11678# _LT_DECL_EGREP 11679# -------------- 11680# If we don't have a new enough Autoconf to choose the best grep 11681# available, choose the one first in the user's PATH. 11682m4_defun([_LT_DECL_EGREP], 11683[AC_REQUIRE([AC_PROG_EGREP])dnl 11684AC_REQUIRE([AC_PROG_FGREP])dnl 11685test -z "$GREP" && GREP=grep 11686_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11687_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11688_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11689dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11690AC_SUBST([GREP]) 11691]) 11692 11693 11694# _LT_DECL_OBJDUMP 11695# -------------- 11696# If we don't have a new enough Autoconf to choose the best objdump 11697# available, choose the one first in the user's PATH. 11698m4_defun([_LT_DECL_OBJDUMP], 11699[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11700test -z "$OBJDUMP" && OBJDUMP=objdump 11701_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11702AC_SUBST([OBJDUMP]) 11703]) 11704 11705# _LT_DECL_DLLTOOL 11706# ---------------- 11707# Ensure DLLTOOL variable is set. 11708m4_defun([_LT_DECL_DLLTOOL], 11709[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11710test -z "$DLLTOOL" && DLLTOOL=dlltool 11711_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11712AC_SUBST([DLLTOOL]) 11713]) 11714 11715# _LT_DECL_FILECMD 11716# ---------------- 11717# Check for a file(cmd) program that can be used to detect file type and magic 11718m4_defun([_LT_DECL_FILECMD], 11719[AC_CHECK_TOOL([FILECMD], [file], [:]) 11720_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11721])# _LD_DECL_FILECMD 11722 11723# _LT_DECL_SED 11724# ------------ 11725# Check for a fully-functional sed program, that truncates 11726# as few characters as possible. Prefer GNU sed if found. 11727m4_defun([_LT_DECL_SED], 11728[AC_PROG_SED 11729test -z "$SED" && SED=sed 11730Xsed="$SED -e 1s/^X//" 11731_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11732_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11733 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11734])# _LT_DECL_SED 11735 11736m4_ifndef([AC_PROG_SED], [ 11737# NOTE: This macro has been submitted for inclusion into # 11738# GNU Autoconf as AC_PROG_SED. When it is available in # 11739# a released version of Autoconf we should remove this # 11740# macro and use it instead. # 11741 11742m4_defun([AC_PROG_SED], 11743[AC_MSG_CHECKING([for a sed that does not truncate output]) 11744AC_CACHE_VAL(lt_cv_path_SED, 11745[# Loop through the user's path and test for sed and gsed. 11746# Then use that list of sed's as ones to test for truncation. 11747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11748for as_dir in $PATH 11749do 11750 IFS=$as_save_IFS 11751 test -z "$as_dir" && as_dir=. 11752 for lt_ac_prog in sed gsed; do 11753 for ac_exec_ext in '' $ac_executable_extensions; do 11754 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11755 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11756 fi 11757 done 11758 done 11759done 11760IFS=$as_save_IFS 11761lt_ac_max=0 11762lt_ac_count=0 11763# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11764# along with /bin/sed that truncates output. 11765for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11766 test ! -f "$lt_ac_sed" && continue 11767 cat /dev/null > conftest.in 11768 lt_ac_count=0 11769 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11770 # Check for GNU sed and select it if it is found. 11771 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11772 lt_cv_path_SED=$lt_ac_sed 11773 break 11774 fi 11775 while true; do 11776 cat conftest.in conftest.in >conftest.tmp 11777 mv conftest.tmp conftest.in 11778 cp conftest.in conftest.nl 11779 echo >>conftest.nl 11780 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11781 cmp -s conftest.out conftest.nl || break 11782 # 10000 chars as input seems more than enough 11783 test 10 -lt "$lt_ac_count" && break 11784 lt_ac_count=`expr $lt_ac_count + 1` 11785 if test "$lt_ac_count" -gt "$lt_ac_max"; then 11786 lt_ac_max=$lt_ac_count 11787 lt_cv_path_SED=$lt_ac_sed 11788 fi 11789 done 11790done 11791]) 11792SED=$lt_cv_path_SED 11793AC_SUBST([SED]) 11794AC_MSG_RESULT([$SED]) 11795])#AC_PROG_SED 11796])#m4_ifndef 11797 11798# Old name: 11799AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11800dnl aclocal-1.4 backwards compatibility: 11801dnl AC_DEFUN([LT_AC_PROG_SED], []) 11802 11803 11804# _LT_CHECK_SHELL_FEATURES 11805# ------------------------ 11806# Find out whether the shell is Bourne or XSI compatible, 11807# or has some other useful features. 11808m4_defun([_LT_CHECK_SHELL_FEATURES], 11809[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11810 lt_unset=unset 11811else 11812 lt_unset=false 11813fi 11814_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11815 11816# test EBCDIC or ASCII 11817case `echo X|tr X '\101'` in 11818 A) # ASCII based system 11819 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11820 lt_SP2NL='tr \040 \012' 11821 lt_NL2SP='tr \015\012 \040\040' 11822 ;; 11823 *) # EBCDIC based system 11824 lt_SP2NL='tr \100 \n' 11825 lt_NL2SP='tr \r\n \100\100' 11826 ;; 11827esac 11828_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11829_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11830])# _LT_CHECK_SHELL_FEATURES 11831 11832 11833# _LT_PATH_CONVERSION_FUNCTIONS 11834# ----------------------------- 11835# Determine what file name conversion functions should be used by 11836# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11837# for certain cross-compile configurations and native mingw. 11838m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11839[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11840AC_REQUIRE([AC_CANONICAL_BUILD])dnl 11841AC_MSG_CHECKING([how to convert $build file names to $host format]) 11842AC_CACHE_VAL(lt_cv_to_host_file_cmd, 11843[case $host in 11844 *-*-mingw* ) 11845 case $build in 11846 *-*-mingw* ) # actually msys 11847 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11848 ;; 11849 *-*-cygwin* ) 11850 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11851 ;; 11852 * ) # otherwise, assume *nix 11853 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11854 ;; 11855 esac 11856 ;; 11857 *-*-cygwin* ) 11858 case $build in 11859 *-*-mingw* ) # actually msys 11860 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11861 ;; 11862 *-*-cygwin* ) 11863 lt_cv_to_host_file_cmd=func_convert_file_noop 11864 ;; 11865 * ) # otherwise, assume *nix 11866 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11867 ;; 11868 esac 11869 ;; 11870 * ) # unhandled hosts (and "normal" native builds) 11871 lt_cv_to_host_file_cmd=func_convert_file_noop 11872 ;; 11873esac 11874]) 11875to_host_file_cmd=$lt_cv_to_host_file_cmd 11876AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11877_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11878 [0], [convert $build file names to $host format])dnl 11879 11880AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11881AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11882[#assume ordinary cross tools, or native build. 11883lt_cv_to_tool_file_cmd=func_convert_file_noop 11884case $host in 11885 *-*-mingw* ) 11886 case $build in 11887 *-*-mingw* ) # actually msys 11888 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11889 ;; 11890 esac 11891 ;; 11892esac 11893]) 11894to_tool_file_cmd=$lt_cv_to_tool_file_cmd 11895AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11896_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11897 [0], [convert $build files to toolchain format])dnl 11898])# _LT_PATH_CONVERSION_FUNCTIONS 11899 11900# Helper functions for option handling. -*- Autoconf -*- 11901# 11902# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11903# Software Foundation, Inc. 11904# Written by Gary V. Vaughan, 2004 11905# 11906# This file is free software; the Free Software Foundation gives 11907# unlimited permission to copy and/or distribute it, with or without 11908# modifications, as long as this notice is preserved. 11909 11910# serial 8 ltoptions.m4 11911 11912# This is to help aclocal find these macros, as it can't see m4_define. 11913AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11914 11915 11916# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11917# ------------------------------------------ 11918m4_define([_LT_MANGLE_OPTION], 11919[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11920 11921 11922# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11923# --------------------------------------- 11924# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11925# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11926# saved as a flag. 11927m4_define([_LT_SET_OPTION], 11928[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11929m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11930 _LT_MANGLE_DEFUN([$1], [$2]), 11931 [m4_warning([Unknown $1 option '$2'])])[]dnl 11932]) 11933 11934 11935# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11936# ------------------------------------------------------------ 11937# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11938m4_define([_LT_IF_OPTION], 11939[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11940 11941 11942# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11943# ------------------------------------------------------- 11944# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11945# are set. 11946m4_define([_LT_UNLESS_OPTIONS], 11947[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11948 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11949 [m4_define([$0_found])])])[]dnl 11950m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11951])[]dnl 11952]) 11953 11954 11955# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11956# ---------------------------------------- 11957# OPTION-LIST is a space-separated list of Libtool options associated 11958# with MACRO-NAME. If any OPTION has a matching handler declared with 11959# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11960# the unknown option and exit. 11961m4_defun([_LT_SET_OPTIONS], 11962[# Set options 11963m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11964 [_LT_SET_OPTION([$1], _LT_Option)]) 11965 11966m4_if([$1],[LT_INIT],[ 11967 dnl 11968 dnl Simply set some default values (i.e off) if boolean options were not 11969 dnl specified: 11970 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11971 ]) 11972 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11973 ]) 11974 dnl 11975 dnl If no reference was made to various pairs of opposing options, then 11976 dnl we run the default mode handler for the pair. For example, if neither 11977 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11978 dnl archives by default: 11979 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11980 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11981 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11982 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11983 [_LT_ENABLE_FAST_INSTALL]) 11984 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11985 [_LT_WITH_AIX_SONAME([aix])]) 11986 ]) 11987])# _LT_SET_OPTIONS 11988 11989 11990 11991# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11992# ----------------------------------------- 11993m4_define([_LT_MANGLE_DEFUN], 11994[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11995 11996 11997# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11998# ----------------------------------------------- 11999m4_define([LT_OPTION_DEFINE], 12000[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 12001])# LT_OPTION_DEFINE 12002 12003 12004# dlopen 12005# ------ 12006LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 12007]) 12008 12009AU_DEFUN([AC_LIBTOOL_DLOPEN], 12010[_LT_SET_OPTION([LT_INIT], [dlopen]) 12011AC_DIAGNOSE([obsolete], 12012[$0: Remove this warning and the call to _LT_SET_OPTION when you 12013put the 'dlopen' option into LT_INIT's first parameter.]) 12014]) 12015 12016dnl aclocal-1.4 backwards compatibility: 12017dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 12018 12019 12020# win32-dll 12021# --------- 12022# Declare package support for building win32 dll's. 12023LT_OPTION_DEFINE([LT_INIT], [win32-dll], 12024[enable_win32_dll=yes 12025 12026case $host in 12027*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 12028 AC_CHECK_TOOL(AS, as, false) 12029 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 12030 AC_CHECK_TOOL(OBJDUMP, objdump, false) 12031 ;; 12032esac 12033 12034test -z "$AS" && AS=as 12035_LT_DECL([], [AS], [1], [Assembler program])dnl 12036 12037test -z "$DLLTOOL" && DLLTOOL=dlltool 12038_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 12039 12040test -z "$OBJDUMP" && OBJDUMP=objdump 12041_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 12042])# win32-dll 12043 12044AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 12045[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12046_LT_SET_OPTION([LT_INIT], [win32-dll]) 12047AC_DIAGNOSE([obsolete], 12048[$0: Remove this warning and the call to _LT_SET_OPTION when you 12049put the 'win32-dll' option into LT_INIT's first parameter.]) 12050]) 12051 12052dnl aclocal-1.4 backwards compatibility: 12053dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 12054 12055 12056# _LT_ENABLE_SHARED([DEFAULT]) 12057# ---------------------------- 12058# implement the --enable-shared flag, and supports the 'shared' and 12059# 'disable-shared' LT_INIT options. 12060# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12061m4_define([_LT_ENABLE_SHARED], 12062[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 12063AC_ARG_ENABLE([shared], 12064 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 12065 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 12066 [p=${PACKAGE-default} 12067 case $enableval in 12068 yes) enable_shared=yes ;; 12069 no) enable_shared=no ;; 12070 *) 12071 enable_shared=no 12072 # Look at the argument we got. We use all the common list separators. 12073 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12074 for pkg in $enableval; do 12075 IFS=$lt_save_ifs 12076 if test "X$pkg" = "X$p"; then 12077 enable_shared=yes 12078 fi 12079 done 12080 IFS=$lt_save_ifs 12081 ;; 12082 esac], 12083 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 12084 12085 _LT_DECL([build_libtool_libs], [enable_shared], [0], 12086 [Whether or not to build shared libraries]) 12087])# _LT_ENABLE_SHARED 12088 12089LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 12090LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 12091 12092# Old names: 12093AC_DEFUN([AC_ENABLE_SHARED], 12094[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 12095]) 12096 12097AC_DEFUN([AC_DISABLE_SHARED], 12098[_LT_SET_OPTION([LT_INIT], [disable-shared]) 12099]) 12100 12101AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 12102AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 12103 12104dnl aclocal-1.4 backwards compatibility: 12105dnl AC_DEFUN([AM_ENABLE_SHARED], []) 12106dnl AC_DEFUN([AM_DISABLE_SHARED], []) 12107 12108 12109 12110# _LT_ENABLE_STATIC([DEFAULT]) 12111# ---------------------------- 12112# implement the --enable-static flag, and support the 'static' and 12113# 'disable-static' LT_INIT options. 12114# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12115m4_define([_LT_ENABLE_STATIC], 12116[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12117AC_ARG_ENABLE([static], 12118 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12119 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12120 [p=${PACKAGE-default} 12121 case $enableval in 12122 yes) enable_static=yes ;; 12123 no) enable_static=no ;; 12124 *) 12125 enable_static=no 12126 # Look at the argument we got. We use all the common list separators. 12127 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12128 for pkg in $enableval; do 12129 IFS=$lt_save_ifs 12130 if test "X$pkg" = "X$p"; then 12131 enable_static=yes 12132 fi 12133 done 12134 IFS=$lt_save_ifs 12135 ;; 12136 esac], 12137 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12138 12139 _LT_DECL([build_old_libs], [enable_static], [0], 12140 [Whether or not to build static libraries]) 12141])# _LT_ENABLE_STATIC 12142 12143LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12144LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12145 12146# Old names: 12147AC_DEFUN([AC_ENABLE_STATIC], 12148[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12149]) 12150 12151AC_DEFUN([AC_DISABLE_STATIC], 12152[_LT_SET_OPTION([LT_INIT], [disable-static]) 12153]) 12154 12155AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12156AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12157 12158dnl aclocal-1.4 backwards compatibility: 12159dnl AC_DEFUN([AM_ENABLE_STATIC], []) 12160dnl AC_DEFUN([AM_DISABLE_STATIC], []) 12161 12162 12163 12164# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12165# ---------------------------------- 12166# implement the --enable-fast-install flag, and support the 'fast-install' 12167# and 'disable-fast-install' LT_INIT options. 12168# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12169m4_define([_LT_ENABLE_FAST_INSTALL], 12170[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12171AC_ARG_ENABLE([fast-install], 12172 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12173 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12174 [p=${PACKAGE-default} 12175 case $enableval in 12176 yes) enable_fast_install=yes ;; 12177 no) enable_fast_install=no ;; 12178 *) 12179 enable_fast_install=no 12180 # Look at the argument we got. We use all the common list separators. 12181 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12182 for pkg in $enableval; do 12183 IFS=$lt_save_ifs 12184 if test "X$pkg" = "X$p"; then 12185 enable_fast_install=yes 12186 fi 12187 done 12188 IFS=$lt_save_ifs 12189 ;; 12190 esac], 12191 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12192 12193_LT_DECL([fast_install], [enable_fast_install], [0], 12194 [Whether or not to optimize for fast installation])dnl 12195])# _LT_ENABLE_FAST_INSTALL 12196 12197LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12198LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12199 12200# Old names: 12201AU_DEFUN([AC_ENABLE_FAST_INSTALL], 12202[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12203AC_DIAGNOSE([obsolete], 12204[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12205the 'fast-install' option into LT_INIT's first parameter.]) 12206]) 12207 12208AU_DEFUN([AC_DISABLE_FAST_INSTALL], 12209[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12210AC_DIAGNOSE([obsolete], 12211[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12212the 'disable-fast-install' option into LT_INIT's first parameter.]) 12213]) 12214 12215dnl aclocal-1.4 backwards compatibility: 12216dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12217dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12218 12219 12220# _LT_WITH_AIX_SONAME([DEFAULT]) 12221# ---------------------------------- 12222# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12223# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12224# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12225m4_define([_LT_WITH_AIX_SONAME], 12226[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12227shared_archive_member_spec= 12228case $host,$enable_shared in 12229power*-*-aix[[5-9]]*,yes) 12230 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12231 AC_ARG_WITH([aix-soname], 12232 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12233 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12234 [case $withval in 12235 aix|svr4|both) 12236 ;; 12237 *) 12238 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12239 ;; 12240 esac 12241 lt_cv_with_aix_soname=$with_aix_soname], 12242 [AC_CACHE_VAL([lt_cv_with_aix_soname], 12243 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12244 with_aix_soname=$lt_cv_with_aix_soname]) 12245 AC_MSG_RESULT([$with_aix_soname]) 12246 if test aix != "$with_aix_soname"; then 12247 # For the AIX way of multilib, we name the shared archive member 12248 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12249 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12250 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12251 # the AIX toolchain works better with OBJECT_MODE set (default 32). 12252 if test 64 = "${OBJECT_MODE-32}"; then 12253 shared_archive_member_spec=shr_64 12254 else 12255 shared_archive_member_spec=shr 12256 fi 12257 fi 12258 ;; 12259*) 12260 with_aix_soname=aix 12261 ;; 12262esac 12263 12264_LT_DECL([], [shared_archive_member_spec], [0], 12265 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12266])# _LT_WITH_AIX_SONAME 12267 12268LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12269LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12270LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12271 12272 12273# _LT_WITH_PIC([MODE]) 12274# -------------------- 12275# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12276# LT_INIT options. 12277# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12278m4_define([_LT_WITH_PIC], 12279[AC_ARG_WITH([pic], 12280 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12281 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12282 [lt_p=${PACKAGE-default} 12283 case $withval in 12284 yes|no) pic_mode=$withval ;; 12285 *) 12286 pic_mode=default 12287 # Look at the argument we got. We use all the common list separators. 12288 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12289 for lt_pkg in $withval; do 12290 IFS=$lt_save_ifs 12291 if test "X$lt_pkg" = "X$lt_p"; then 12292 pic_mode=yes 12293 fi 12294 done 12295 IFS=$lt_save_ifs 12296 ;; 12297 esac], 12298 [pic_mode=m4_default([$1], [default])]) 12299 12300_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12301])# _LT_WITH_PIC 12302 12303LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12304LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12305 12306# Old name: 12307AU_DEFUN([AC_LIBTOOL_PICMODE], 12308[_LT_SET_OPTION([LT_INIT], [pic-only]) 12309AC_DIAGNOSE([obsolete], 12310[$0: Remove this warning and the call to _LT_SET_OPTION when you 12311put the 'pic-only' option into LT_INIT's first parameter.]) 12312]) 12313 12314dnl aclocal-1.4 backwards compatibility: 12315dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12316 12317 12318m4_define([_LTDL_MODE], []) 12319LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12320 [m4_define([_LTDL_MODE], [nonrecursive])]) 12321LT_OPTION_DEFINE([LTDL_INIT], [recursive], 12322 [m4_define([_LTDL_MODE], [recursive])]) 12323LT_OPTION_DEFINE([LTDL_INIT], [subproject], 12324 [m4_define([_LTDL_MODE], [subproject])]) 12325 12326m4_define([_LTDL_TYPE], []) 12327LT_OPTION_DEFINE([LTDL_INIT], [installable], 12328 [m4_define([_LTDL_TYPE], [installable])]) 12329LT_OPTION_DEFINE([LTDL_INIT], [convenience], 12330 [m4_define([_LTDL_TYPE], [convenience])]) 12331 12332# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12333# 12334# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12335# Foundation, Inc. 12336# Written by Gary V. Vaughan, 2004 12337# 12338# This file is free software; the Free Software Foundation gives 12339# unlimited permission to copy and/or distribute it, with or without 12340# modifications, as long as this notice is preserved. 12341 12342# serial 6 ltsugar.m4 12343 12344# This is to help aclocal find these macros, as it can't see m4_define. 12345AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12346 12347 12348# lt_join(SEP, ARG1, [ARG2...]) 12349# ----------------------------- 12350# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12351# associated separator. 12352# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12353# versions in m4sugar had bugs. 12354m4_define([lt_join], 12355[m4_if([$#], [1], [], 12356 [$#], [2], [[$2]], 12357 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12358m4_define([_lt_join], 12359[m4_if([$#$2], [2], [], 12360 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12361 12362 12363# lt_car(LIST) 12364# lt_cdr(LIST) 12365# ------------ 12366# Manipulate m4 lists. 12367# These macros are necessary as long as will still need to support 12368# Autoconf-2.59, which quotes differently. 12369m4_define([lt_car], [[$1]]) 12370m4_define([lt_cdr], 12371[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12372 [$#], 1, [], 12373 [m4_dquote(m4_shift($@))])]) 12374m4_define([lt_unquote], $1) 12375 12376 12377# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12378# ------------------------------------------ 12379# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12380# Note that neither SEPARATOR nor STRING are expanded; they are appended 12381# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12382# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12383# than defined and empty). 12384# 12385# This macro is needed until we can rely on Autoconf 2.62, since earlier 12386# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12387m4_define([lt_append], 12388[m4_define([$1], 12389 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12390 12391 12392 12393# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12394# ---------------------------------------------------------- 12395# Produce a SEP delimited list of all paired combinations of elements of 12396# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12397# has the form PREFIXmINFIXSUFFIXn. 12398# Needed until we can rely on m4_combine added in Autoconf 2.62. 12399m4_define([lt_combine], 12400[m4_if(m4_eval([$# > 3]), [1], 12401 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12402[[m4_foreach([_Lt_prefix], [$2], 12403 [m4_foreach([_Lt_suffix], 12404 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12405 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12406 12407 12408# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12409# ----------------------------------------------------------------------- 12410# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12411# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12412m4_define([lt_if_append_uniq], 12413[m4_ifdef([$1], 12414 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12415 [lt_append([$1], [$2], [$3])$4], 12416 [$5])], 12417 [lt_append([$1], [$2], [$3])$4])]) 12418 12419 12420# lt_dict_add(DICT, KEY, VALUE) 12421# ----------------------------- 12422m4_define([lt_dict_add], 12423[m4_define([$1($2)], [$3])]) 12424 12425 12426# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12427# -------------------------------------------- 12428m4_define([lt_dict_add_subkey], 12429[m4_define([$1($2:$3)], [$4])]) 12430 12431 12432# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12433# ---------------------------------- 12434m4_define([lt_dict_fetch], 12435[m4_ifval([$3], 12436 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12437 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12438 12439 12440# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12441# ----------------------------------------------------------------- 12442m4_define([lt_if_dict_fetch], 12443[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12444 [$5], 12445 [$6])]) 12446 12447 12448# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12449# -------------------------------------------------------------- 12450m4_define([lt_dict_filter], 12451[m4_if([$5], [], [], 12452 [lt_join(m4_quote(m4_default([$4], [[, ]])), 12453 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12454 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12455]) 12456 12457# ltversion.m4 -- version numbers -*- Autoconf -*- 12458# 12459# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12460# Inc. 12461# Written by Scott James Remnant, 2004 12462# 12463# This file is free software; the Free Software Foundation gives 12464# unlimited permission to copy and/or distribute it, with or without 12465# modifications, as long as this notice is preserved. 12466 12467# @configure_input@ 12468 12469# serial 4245 ltversion.m4 12470# This file is part of GNU Libtool 12471 12472m4_define([LT_PACKAGE_VERSION], [2.4.7]) 12473m4_define([LT_PACKAGE_REVISION], [2.4.7]) 12474 12475AC_DEFUN([LTVERSION_VERSION], 12476[macro_version='2.4.7' 12477macro_revision='2.4.7' 12478_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12479_LT_DECL(, macro_revision, 0) 12480]) 12481 12482# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12483# 12484# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12485# Software Foundation, Inc. 12486# Written by Scott James Remnant, 2004. 12487# 12488# This file is free software; the Free Software Foundation gives 12489# unlimited permission to copy and/or distribute it, with or without 12490# modifications, as long as this notice is preserved. 12491 12492# serial 5 lt~obsolete.m4 12493 12494# These exist entirely to fool aclocal when bootstrapping libtool. 12495# 12496# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12497# which have later been changed to m4_define as they aren't part of the 12498# exported API, or moved to Autoconf or Automake where they belong. 12499# 12500# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12501# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12502# using a macro with the same name in our local m4/libtool.m4 it'll 12503# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12504# and doesn't know about Autoconf macros at all.) 12505# 12506# So we provide this file, which has a silly filename so it's always 12507# included after everything else. This provides aclocal with the 12508# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12509# because those macros already exist, or will be overwritten later. 12510# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12511# 12512# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12513# Yes, that means every name once taken will need to remain here until 12514# we give up compatibility with versions before 1.7, at which point 12515# we need to keep only those names which we still refer to. 12516 12517# This is to help aclocal find these macros, as it can't see m4_define. 12518AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12519 12520m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12521m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12522m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12523m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12524m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12525m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12526m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12527m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12528m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12529m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12530m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12531m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12532m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12533m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12534m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12535m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12536m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12537m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12538m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12539m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12540m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12541m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12542m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12543m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12544m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12545m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12546m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12547m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12548m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12549m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12550m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12551m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12552m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12553m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12554m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12555m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12556m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12557m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12558m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12559m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12560m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12561m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12562m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12563m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12564m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12565m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12566m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12567m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12568m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12569m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12570m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12571m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12572m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12573m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12574m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12575m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12576m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12577m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12578m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12579m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12580m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12581 12582