aclocal.m4 revision fc544a13
1# generated automatically by aclocal 1.15 -*- Autoconf -*- 2 3# Copyright (C) 1996-2014 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.69],, 18[m4_warning([this file was generated for autoconf 2.69. 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-2014 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.15' 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.15], [], 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.15])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-2014 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-2014 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-2014 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-2014 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 342# _AM_OUTPUT_DEPENDENCY_COMMANDS 343# ------------------------------ 344AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 345[{ 346 # Older Autoconf quotes --file arguments for eval, but not when files 347 # are listed without --file. Let's play safe and only enable the eval 348 # if we detect the quoting. 349 case $CONFIG_FILES in 350 *\'*) eval set x "$CONFIG_FILES" ;; 351 *) set x $CONFIG_FILES ;; 352 esac 353 shift 354 for mf 355 do 356 # Strip MF so we end up with the name of the file. 357 mf=`echo "$mf" | sed -e 's/:.*$//'` 358 # Check whether this is an Automake generated Makefile or not. 359 # We used to match only the files named 'Makefile.in', but 360 # some people rename them; so instead we look at the file content. 361 # Grep'ing the first line is not enough: some people post-process 362 # each Makefile.in and add a new line on top of each file to say so. 363 # Grep'ing the whole file is not good either: AIX grep has a line 364 # limit of 2048, but all sed's we know have understand at least 4000. 365 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 366 dirpart=`AS_DIRNAME("$mf")` 367 else 368 continue 369 fi 370 # Extract the definition of DEPDIR, am__include, and am__quote 371 # from the Makefile without running 'make'. 372 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 373 test -z "$DEPDIR" && continue 374 am__include=`sed -n 's/^am__include = //p' < "$mf"` 375 test -z "$am__include" && continue 376 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 377 # Find all dependency output files, they are included files with 378 # $(DEPDIR) in their names. We invoke sed twice because it is the 379 # simplest approach to changing $(DEPDIR) to its actual value in the 380 # expansion. 381 for file in `sed -n " 382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 384 # Make sure the directory exists. 385 test -f "$dirpart/$file" && continue 386 fdir=`AS_DIRNAME(["$file"])` 387 AS_MKDIR_P([$dirpart/$fdir]) 388 # echo "creating $dirpart/$file" 389 echo '# dummy' > "$dirpart/$file" 390 done 391 done 392} 393])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394 395 396# AM_OUTPUT_DEPENDENCY_COMMANDS 397# ----------------------------- 398# This macro should only be invoked once -- use via AC_REQUIRE. 399# 400# This code is only required when automatic dependency tracking 401# is enabled. FIXME. This creates each '.P' file that we will 402# need in order to bootstrap the dependency handling code. 403AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404[AC_CONFIG_COMMANDS([depfiles], 405 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407]) 408 409# Do all the work for Automake. -*- Autoconf -*- 410 411# Copyright (C) 1996-2014 Free Software Foundation, Inc. 412# 413# This file is free software; the Free Software Foundation 414# gives unlimited permission to copy and/or distribute it, 415# with or without modifications, as long as this notice is preserved. 416 417# This macro actually does too much. Some checks are only needed if 418# your package does certain things. But this isn't really a big deal. 419 420dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 421m4_define([AC_PROG_CC], 422m4_defn([AC_PROG_CC]) 423[_AM_PROG_CC_C_O 424]) 425 426# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 427# AM_INIT_AUTOMAKE([OPTIONS]) 428# ----------------------------------------------- 429# The call with PACKAGE and VERSION arguments is the old style 430# call (pre autoconf-2.50), which is being phased out. PACKAGE 431# and VERSION should now be passed to AC_INIT and removed from 432# the call to AM_INIT_AUTOMAKE. 433# We support both call styles for the transition. After 434# the next Automake release, Autoconf can make the AC_INIT 435# arguments mandatory, and then we can depend on a new Autoconf 436# release and drop the old call support. 437AC_DEFUN([AM_INIT_AUTOMAKE], 438[AC_PREREQ([2.65])dnl 439dnl Autoconf wants to disallow AM_ names. We explicitly allow 440dnl the ones we care about. 441m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 442AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 443AC_REQUIRE([AC_PROG_INSTALL])dnl 444if test "`cd $srcdir && pwd`" != "`pwd`"; then 445 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 446 # is not polluted with repeated "-I." 447 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 448 # test to see if srcdir already configured 449 if test -f $srcdir/config.status; then 450 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 451 fi 452fi 453 454# test whether we have cygpath 455if test -z "$CYGPATH_W"; then 456 if (cygpath --version) >/dev/null 2>/dev/null; then 457 CYGPATH_W='cygpath -w' 458 else 459 CYGPATH_W=echo 460 fi 461fi 462AC_SUBST([CYGPATH_W]) 463 464# Define the identity of the package. 465dnl Distinguish between old-style and new-style calls. 466m4_ifval([$2], 467[AC_DIAGNOSE([obsolete], 468 [$0: two- and three-arguments forms are deprecated.]) 469m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 470 AC_SUBST([PACKAGE], [$1])dnl 471 AC_SUBST([VERSION], [$2])], 472[_AM_SET_OPTIONS([$1])dnl 473dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 474m4_if( 475 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 476 [ok:ok],, 477 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 478 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 479 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 480 481_AM_IF_OPTION([no-define],, 482[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 483 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 484 485# Some tools Automake needs. 486AC_REQUIRE([AM_SANITY_CHECK])dnl 487AC_REQUIRE([AC_ARG_PROGRAM])dnl 488AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 489AM_MISSING_PROG([AUTOCONF], [autoconf]) 490AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 491AM_MISSING_PROG([AUTOHEADER], [autoheader]) 492AM_MISSING_PROG([MAKEINFO], [makeinfo]) 493AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 494AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 495AC_REQUIRE([AC_PROG_MKDIR_P])dnl 496# For better backward compatibility. To be removed once Automake 1.9.x 497# dies out for good. For more background, see: 498# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 499# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 500AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 501# We need awk for the "check" target (and possibly the TAP driver). The 502# system "awk" is bad on some platforms. 503AC_REQUIRE([AC_PROG_AWK])dnl 504AC_REQUIRE([AC_PROG_MAKE_SET])dnl 505AC_REQUIRE([AM_SET_LEADING_DOT])dnl 506_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508 [_AM_PROG_TAR([v7])])]) 509_AM_IF_OPTION([no-dependencies],, 510[AC_PROVIDE_IFELSE([AC_PROG_CC], 511 [_AM_DEPENDENCIES([CC])], 512 [m4_define([AC_PROG_CC], 513 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 514AC_PROVIDE_IFELSE([AC_PROG_CXX], 515 [_AM_DEPENDENCIES([CXX])], 516 [m4_define([AC_PROG_CXX], 517 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 518AC_PROVIDE_IFELSE([AC_PROG_OBJC], 519 [_AM_DEPENDENCIES([OBJC])], 520 [m4_define([AC_PROG_OBJC], 521 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 522AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 523 [_AM_DEPENDENCIES([OBJCXX])], 524 [m4_define([AC_PROG_OBJCXX], 525 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 526]) 527AC_REQUIRE([AM_SILENT_RULES])dnl 528dnl The testsuite driver may need to know about EXEEXT, so add the 529dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 530dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 531AC_CONFIG_COMMANDS_PRE(dnl 532[m4_provide_if([_AM_COMPILER_EXEEXT], 533 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 534 535# POSIX will say in a future version that running "rm -f" with no argument 536# is OK; and we want to be able to make that assumption in our Makefile 537# recipes. So use an aggressive probe to check that the usage we want is 538# actually supported "in the wild" to an acceptable degree. 539# See automake bug#10828. 540# To make any issue more visible, cause the running configure to be aborted 541# by default if the 'rm' program in use doesn't match our expectations; the 542# user can still override this though. 543if rm -f && rm -fr && rm -rf; then : OK; else 544 cat >&2 <<'END' 545Oops! 546 547Your 'rm' program seems unable to run without file operands specified 548on the command line, even when the '-f' option is present. This is contrary 549to the behaviour of most rm programs out there, and not conforming with 550the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 551 552Please tell bug-automake@gnu.org about your system, including the value 553of your $PATH and any error possibly output before this message. This 554can help us improve future automake versions. 555 556END 557 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 558 echo 'Configuration will proceed anyway, since you have set the' >&2 559 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 560 echo >&2 561 else 562 cat >&2 <<'END' 563Aborting the configuration process, to ensure you take notice of the issue. 564 565You can download and install GNU coreutils to get an 'rm' implementation 566that behaves properly: <http://www.gnu.org/software/coreutils/>. 567 568If you want to complete the configuration process using your problematic 569'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 570to "yes", and re-run configure. 571 572END 573 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 574 fi 575fi 576dnl The trailing newline in this macro's definition is deliberate, for 577dnl backward compatibility and to allow trailing 'dnl'-style comments 578dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 579]) 580 581dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 582dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 583dnl mangled by Autoconf and run in a shell conditional statement. 584m4_define([_AC_COMPILER_EXEEXT], 585m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 586 587# When config.status generates a header, we must update the stamp-h file. 588# This file resides in the same directory as the config header 589# that is generated. The stamp files are numbered to have different names. 590 591# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 592# loop where config.status creates the headers, so we can generate 593# our stamp files there. 594AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 595[# Compute $1's index in $config_headers. 596_am_arg=$1 597_am_stamp_count=1 598for _am_header in $config_headers :; do 599 case $_am_header in 600 $_am_arg | $_am_arg:* ) 601 break ;; 602 * ) 603 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 604 esac 605done 606echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 607 608# Copyright (C) 2001-2014 Free Software Foundation, Inc. 609# 610# This file is free software; the Free Software Foundation 611# gives unlimited permission to copy and/or distribute it, 612# with or without modifications, as long as this notice is preserved. 613 614# AM_PROG_INSTALL_SH 615# ------------------ 616# Define $install_sh. 617AC_DEFUN([AM_PROG_INSTALL_SH], 618[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 619if test x"${install_sh+set}" != xset; then 620 case $am_aux_dir in 621 *\ * | *\ *) 622 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 623 *) 624 install_sh="\${SHELL} $am_aux_dir/install-sh" 625 esac 626fi 627AC_SUBST([install_sh])]) 628 629# Copyright (C) 2003-2014 Free Software Foundation, Inc. 630# 631# This file is free software; the Free Software Foundation 632# gives unlimited permission to copy and/or distribute it, 633# with or without modifications, as long as this notice is preserved. 634 635# Check whether the underlying file-system supports filenames 636# with a leading dot. For instance MS-DOS doesn't. 637AC_DEFUN([AM_SET_LEADING_DOT], 638[rm -rf .tst 2>/dev/null 639mkdir .tst 2>/dev/null 640if test -d .tst; then 641 am__leading_dot=. 642else 643 am__leading_dot=_ 644fi 645rmdir .tst 2>/dev/null 646AC_SUBST([am__leading_dot])]) 647 648# Check to see how 'make' treats includes. -*- Autoconf -*- 649 650# Copyright (C) 2001-2014 Free Software Foundation, Inc. 651# 652# This file is free software; the Free Software Foundation 653# gives unlimited permission to copy and/or distribute it, 654# with or without modifications, as long as this notice is preserved. 655 656# AM_MAKE_INCLUDE() 657# ----------------- 658# Check to see how make treats includes. 659AC_DEFUN([AM_MAKE_INCLUDE], 660[am_make=${MAKE-make} 661cat > confinc << 'END' 662am__doit: 663 @echo this is the am__doit target 664.PHONY: am__doit 665END 666# If we don't find an include directive, just comment out the code. 667AC_MSG_CHECKING([for style of include used by $am_make]) 668am__include="#" 669am__quote= 670_am_result=none 671# First try GNU make style include. 672echo "include confinc" > confmf 673# Ignore all kinds of additional output from 'make'. 674case `$am_make -s -f confmf 2> /dev/null` in #( 675*the\ am__doit\ target*) 676 am__include=include 677 am__quote= 678 _am_result=GNU 679 ;; 680esac 681# Now try BSD make style include. 682if test "$am__include" = "#"; then 683 echo '.include "confinc"' > confmf 684 case `$am_make -s -f confmf 2> /dev/null` in #( 685 *the\ am__doit\ target*) 686 am__include=.include 687 am__quote="\"" 688 _am_result=BSD 689 ;; 690 esac 691fi 692AC_SUBST([am__include]) 693AC_SUBST([am__quote]) 694AC_MSG_RESULT([$_am_result]) 695rm -f confinc confmf 696]) 697 698# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 699 700# Copyright (C) 1997-2014 Free Software Foundation, Inc. 701# 702# This file is free software; the Free Software Foundation 703# gives unlimited permission to copy and/or distribute it, 704# with or without modifications, as long as this notice is preserved. 705 706# AM_MISSING_PROG(NAME, PROGRAM) 707# ------------------------------ 708AC_DEFUN([AM_MISSING_PROG], 709[AC_REQUIRE([AM_MISSING_HAS_RUN]) 710$1=${$1-"${am_missing_run}$2"} 711AC_SUBST($1)]) 712 713# AM_MISSING_HAS_RUN 714# ------------------ 715# Define MISSING if not defined so far and test if it is modern enough. 716# If it is, set am_missing_run to use it, otherwise, to nothing. 717AC_DEFUN([AM_MISSING_HAS_RUN], 718[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719AC_REQUIRE_AUX_FILE([missing])dnl 720if test x"${MISSING+set}" != xset; then 721 case $am_aux_dir in 722 *\ * | *\ *) 723 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724 *) 725 MISSING="\${SHELL} $am_aux_dir/missing" ;; 726 esac 727fi 728# Use eval to expand $SHELL 729if eval "$MISSING --is-lightweight"; then 730 am_missing_run="$MISSING " 731else 732 am_missing_run= 733 AC_MSG_WARN(['missing' script is too old or missing]) 734fi 735]) 736 737# Helper functions for option handling. -*- Autoconf -*- 738 739# Copyright (C) 2001-2014 Free Software Foundation, Inc. 740# 741# This file is free software; the Free Software Foundation 742# gives unlimited permission to copy and/or distribute it, 743# with or without modifications, as long as this notice is preserved. 744 745# _AM_MANGLE_OPTION(NAME) 746# ----------------------- 747AC_DEFUN([_AM_MANGLE_OPTION], 748[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 749 750# _AM_SET_OPTION(NAME) 751# -------------------- 752# Set option NAME. Presently that only means defining a flag for this option. 753AC_DEFUN([_AM_SET_OPTION], 754[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 755 756# _AM_SET_OPTIONS(OPTIONS) 757# ------------------------ 758# OPTIONS is a space-separated list of Automake options. 759AC_DEFUN([_AM_SET_OPTIONS], 760[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 761 762# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 763# ------------------------------------------- 764# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 765AC_DEFUN([_AM_IF_OPTION], 766[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 767 768# Copyright (C) 1999-2014 Free Software Foundation, Inc. 769# 770# This file is free software; the Free Software Foundation 771# gives unlimited permission to copy and/or distribute it, 772# with or without modifications, as long as this notice is preserved. 773 774# _AM_PROG_CC_C_O 775# --------------- 776# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 777# to automatically call this. 778AC_DEFUN([_AM_PROG_CC_C_O], 779[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 780AC_REQUIRE_AUX_FILE([compile])dnl 781AC_LANG_PUSH([C])dnl 782AC_CACHE_CHECK( 783 [whether $CC understands -c and -o together], 784 [am_cv_prog_cc_c_o], 785 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 786 # Make sure it works both with $CC and with simple cc. 787 # Following AC_PROG_CC_C_O, we do the test twice because some 788 # compilers refuse to overwrite an existing .o file with -o, 789 # though they will create one. 790 am_cv_prog_cc_c_o=yes 791 for am_i in 1 2; do 792 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 793 && test -f conftest2.$ac_objext; then 794 : OK 795 else 796 am_cv_prog_cc_c_o=no 797 break 798 fi 799 done 800 rm -f core conftest* 801 unset am_i]) 802if test "$am_cv_prog_cc_c_o" != yes; then 803 # Losing compiler, so override with the script. 804 # FIXME: It is wrong to rewrite CC. 805 # But if we don't then we get into trouble of one sort or another. 806 # A longer-term fix would be to have automake use am__CC in this case, 807 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 808 CC="$am_aux_dir/compile $CC" 809fi 810AC_LANG_POP([C])]) 811 812# For backward compatibility. 813AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 814 815# Copyright (C) 2001-2014 Free Software Foundation, Inc. 816# 817# This file is free software; the Free Software Foundation 818# gives unlimited permission to copy and/or distribute it, 819# with or without modifications, as long as this notice is preserved. 820 821# AM_RUN_LOG(COMMAND) 822# ------------------- 823# Run COMMAND, save the exit status in ac_status, and log it. 824# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 825AC_DEFUN([AM_RUN_LOG], 826[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 827 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 828 ac_status=$? 829 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 830 (exit $ac_status); }]) 831 832# Check to make sure that the build environment is sane. -*- Autoconf -*- 833 834# Copyright (C) 1996-2014 Free Software Foundation, Inc. 835# 836# This file is free software; the Free Software Foundation 837# gives unlimited permission to copy and/or distribute it, 838# with or without modifications, as long as this notice is preserved. 839 840# AM_SANITY_CHECK 841# --------------- 842AC_DEFUN([AM_SANITY_CHECK], 843[AC_MSG_CHECKING([whether build environment is sane]) 844# Reject unsafe characters in $srcdir or the absolute working directory 845# name. Accept space and tab only in the latter. 846am_lf=' 847' 848case `pwd` in 849 *[[\\\"\#\$\&\'\`$am_lf]]*) 850 AC_MSG_ERROR([unsafe absolute working directory name]);; 851esac 852case $srcdir in 853 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 854 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 855esac 856 857# Do 'set' in a subshell so we don't clobber the current shell's 858# arguments. Must try -L first in case configure is actually a 859# symlink; some systems play weird games with the mod time of symlinks 860# (eg FreeBSD returns the mod time of the symlink's containing 861# directory). 862if ( 863 am_has_slept=no 864 for am_try in 1 2; do 865 echo "timestamp, slept: $am_has_slept" > conftest.file 866 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 867 if test "$[*]" = "X"; then 868 # -L didn't work. 869 set X `ls -t "$srcdir/configure" conftest.file` 870 fi 871 if test "$[*]" != "X $srcdir/configure conftest.file" \ 872 && test "$[*]" != "X conftest.file $srcdir/configure"; then 873 874 # If neither matched, then we have a broken ls. This can happen 875 # if, for instance, CONFIG_SHELL is bash and it inherits a 876 # broken ls alias from the environment. This has actually 877 # happened. Such a system could not be considered "sane". 878 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 879 alias in your environment]) 880 fi 881 if test "$[2]" = conftest.file || test $am_try -eq 2; then 882 break 883 fi 884 # Just in case. 885 sleep 1 886 am_has_slept=yes 887 done 888 test "$[2]" = conftest.file 889 ) 890then 891 # Ok. 892 : 893else 894 AC_MSG_ERROR([newly created file is older than distributed files! 895Check your system clock]) 896fi 897AC_MSG_RESULT([yes]) 898# If we didn't sleep, we still need to ensure time stamps of config.status and 899# generated files are strictly newer. 900am_sleep_pid= 901if grep 'slept: no' conftest.file >/dev/null 2>&1; then 902 ( sleep 1 ) & 903 am_sleep_pid=$! 904fi 905AC_CONFIG_COMMANDS_PRE( 906 [AC_MSG_CHECKING([that generated files are newer than configure]) 907 if test -n "$am_sleep_pid"; then 908 # Hide warnings about reused PIDs. 909 wait $am_sleep_pid 2>/dev/null 910 fi 911 AC_MSG_RESULT([done])]) 912rm -f conftest.file 913]) 914 915# Copyright (C) 2009-2014 Free Software Foundation, Inc. 916# 917# This file is free software; the Free Software Foundation 918# gives unlimited permission to copy and/or distribute it, 919# with or without modifications, as long as this notice is preserved. 920 921# AM_SILENT_RULES([DEFAULT]) 922# -------------------------- 923# Enable less verbose build rules; with the default set to DEFAULT 924# ("yes" being less verbose, "no" or empty being verbose). 925AC_DEFUN([AM_SILENT_RULES], 926[AC_ARG_ENABLE([silent-rules], [dnl 927AS_HELP_STRING( 928 [--enable-silent-rules], 929 [less verbose build output (undo: "make V=1")]) 930AS_HELP_STRING( 931 [--disable-silent-rules], 932 [verbose build output (undo: "make V=0")])dnl 933]) 934case $enable_silent_rules in @%:@ ((( 935 yes) AM_DEFAULT_VERBOSITY=0;; 936 no) AM_DEFAULT_VERBOSITY=1;; 937 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 938esac 939dnl 940dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 941dnl do not support nested variable expansions. 942dnl See automake bug#9928 and bug#10237. 943am_make=${MAKE-make} 944AC_CACHE_CHECK([whether $am_make supports nested variables], 945 [am_cv_make_support_nested_variables], 946 [if AS_ECHO([['TRUE=$(BAR$(V)) 947BAR0=false 948BAR1=true 949V=1 950am__doit: 951 @$(TRUE) 952.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 953 am_cv_make_support_nested_variables=yes 954else 955 am_cv_make_support_nested_variables=no 956fi]) 957if test $am_cv_make_support_nested_variables = yes; then 958 dnl Using '$V' instead of '$(V)' breaks IRIX make. 959 AM_V='$(V)' 960 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 961else 962 AM_V=$AM_DEFAULT_VERBOSITY 963 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 964fi 965AC_SUBST([AM_V])dnl 966AM_SUBST_NOTMAKE([AM_V])dnl 967AC_SUBST([AM_DEFAULT_V])dnl 968AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 969AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 970AM_BACKSLASH='\' 971AC_SUBST([AM_BACKSLASH])dnl 972_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 973]) 974 975# Copyright (C) 2001-2014 Free Software Foundation, Inc. 976# 977# This file is free software; the Free Software Foundation 978# gives unlimited permission to copy and/or distribute it, 979# with or without modifications, as long as this notice is preserved. 980 981# AM_PROG_INSTALL_STRIP 982# --------------------- 983# One issue with vendor 'install' (even GNU) is that you can't 984# specify the program used to strip binaries. This is especially 985# annoying in cross-compiling environments, where the build's strip 986# is unlikely to handle the host's binaries. 987# Fortunately install-sh will honor a STRIPPROG variable, so we 988# always use install-sh in "make install-strip", and initialize 989# STRIPPROG with the value of the STRIP variable (set by the user). 990AC_DEFUN([AM_PROG_INSTALL_STRIP], 991[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 992# Installed binaries are usually stripped using 'strip' when the user 993# run "make install-strip". However 'strip' might not be the right 994# tool to use in cross-compilation environments, therefore Automake 995# will honor the 'STRIP' environment variable to overrule this program. 996dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 997if test "$cross_compiling" != no; then 998 AC_CHECK_TOOL([STRIP], [strip], :) 999fi 1000INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1001AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1002 1003# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1004# 1005# This file is free software; the Free Software Foundation 1006# gives unlimited permission to copy and/or distribute it, 1007# with or without modifications, as long as this notice is preserved. 1008 1009# _AM_SUBST_NOTMAKE(VARIABLE) 1010# --------------------------- 1011# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1012# This macro is traced by Automake. 1013AC_DEFUN([_AM_SUBST_NOTMAKE]) 1014 1015# AM_SUBST_NOTMAKE(VARIABLE) 1016# -------------------------- 1017# Public sister of _AM_SUBST_NOTMAKE. 1018AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1019 1020# Check how to create a tarball. -*- Autoconf -*- 1021 1022# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1023# 1024# This file is free software; the Free Software Foundation 1025# gives unlimited permission to copy and/or distribute it, 1026# with or without modifications, as long as this notice is preserved. 1027 1028# _AM_PROG_TAR(FORMAT) 1029# -------------------- 1030# Check how to create a tarball in format FORMAT. 1031# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1032# 1033# Substitute a variable $(am__tar) that is a command 1034# writing to stdout a FORMAT-tarball containing the directory 1035# $tardir. 1036# tardir=directory && $(am__tar) > result.tar 1037# 1038# Substitute a variable $(am__untar) that extract such 1039# a tarball read from stdin. 1040# $(am__untar) < result.tar 1041# 1042AC_DEFUN([_AM_PROG_TAR], 1043[# Always define AMTAR for backward compatibility. Yes, it's still used 1044# in the wild :-( We should find a proper way to deprecate it ... 1045AC_SUBST([AMTAR], ['$${TAR-tar}']) 1046 1047# We'll loop over all known methods to create a tar archive until one works. 1048_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1049 1050m4_if([$1], [v7], 1051 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1052 1053 [m4_case([$1], 1054 [ustar], 1055 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1056 # There is notably a 21 bits limit for the UID and the GID. In fact, 1057 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1058 # and bug#13588). 1059 am_max_uid=2097151 # 2^21 - 1 1060 am_max_gid=$am_max_uid 1061 # The $UID and $GID variables are not portable, so we need to resort 1062 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1063 # below are definitely unexpected, so allow the users to see them 1064 # (that is, avoid stderr redirection). 1065 am_uid=`id -u || echo unknown` 1066 am_gid=`id -g || echo unknown` 1067 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1068 if test $am_uid -le $am_max_uid; then 1069 AC_MSG_RESULT([yes]) 1070 else 1071 AC_MSG_RESULT([no]) 1072 _am_tools=none 1073 fi 1074 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1075 if test $am_gid -le $am_max_gid; then 1076 AC_MSG_RESULT([yes]) 1077 else 1078 AC_MSG_RESULT([no]) 1079 _am_tools=none 1080 fi], 1081 1082 [pax], 1083 [], 1084 1085 [m4_fatal([Unknown tar format])]) 1086 1087 AC_MSG_CHECKING([how to create a $1 tar archive]) 1088 1089 # Go ahead even if we have the value already cached. We do so because we 1090 # need to set the values for the 'am__tar' and 'am__untar' variables. 1091 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1092 1093 for _am_tool in $_am_tools; do 1094 case $_am_tool in 1095 gnutar) 1096 for _am_tar in tar gnutar gtar; do 1097 AM_RUN_LOG([$_am_tar --version]) && break 1098 done 1099 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1100 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1101 am__untar="$_am_tar -xf -" 1102 ;; 1103 plaintar) 1104 # Must skip GNU tar: if it does not support --format= it doesn't create 1105 # ustar tarball either. 1106 (tar --version) >/dev/null 2>&1 && continue 1107 am__tar='tar chf - "$$tardir"' 1108 am__tar_='tar chf - "$tardir"' 1109 am__untar='tar xf -' 1110 ;; 1111 pax) 1112 am__tar='pax -L -x $1 -w "$$tardir"' 1113 am__tar_='pax -L -x $1 -w "$tardir"' 1114 am__untar='pax -r' 1115 ;; 1116 cpio) 1117 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1118 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1119 am__untar='cpio -i -H $1 -d' 1120 ;; 1121 none) 1122 am__tar=false 1123 am__tar_=false 1124 am__untar=false 1125 ;; 1126 esac 1127 1128 # If the value was cached, stop now. We just wanted to have am__tar 1129 # and am__untar set. 1130 test -n "${am_cv_prog_tar_$1}" && break 1131 1132 # tar/untar a dummy directory, and stop if the command works. 1133 rm -rf conftest.dir 1134 mkdir conftest.dir 1135 echo GrepMe > conftest.dir/file 1136 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1137 rm -rf conftest.dir 1138 if test -s conftest.tar; then 1139 AM_RUN_LOG([$am__untar <conftest.tar]) 1140 AM_RUN_LOG([cat conftest.dir/file]) 1141 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1142 fi 1143 done 1144 rm -rf conftest.dir 1145 1146 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1147 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1148 1149AC_SUBST([am__tar]) 1150AC_SUBST([am__untar]) 1151]) # _AM_PROG_TAR 1152 1153# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1154# 1155# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1156# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1157# Foundation, Inc. 1158# Written by Gordon Matzigkeit, 1996 1159# 1160# This file is free software; the Free Software Foundation gives 1161# unlimited permission to copy and/or distribute it, with or without 1162# modifications, as long as this notice is preserved. 1163 1164m4_define([_LT_COPYING], [dnl 1165# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1166# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1167# Foundation, Inc. 1168# Written by Gordon Matzigkeit, 1996 1169# 1170# This file is part of GNU Libtool. 1171# 1172# GNU Libtool is free software; you can redistribute it and/or 1173# modify it under the terms of the GNU General Public License as 1174# published by the Free Software Foundation; either version 2 of 1175# the License, or (at your option) any later version. 1176# 1177# As a special exception to the GNU General Public License, 1178# if you distribute this file as part of a program or library that 1179# is built using GNU Libtool, you may include this file under the 1180# same distribution terms that you use for the rest of that program. 1181# 1182# GNU Libtool is distributed in the hope that it will be useful, 1183# but WITHOUT ANY WARRANTY; without even the implied warranty of 1184# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1185# GNU General Public License for more details. 1186# 1187# You should have received a copy of the GNU General Public License 1188# along with GNU Libtool; see the file COPYING. If not, a copy 1189# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1190# obtained by writing to the Free Software Foundation, Inc., 1191# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1192]) 1193 1194# serial 57 LT_INIT 1195 1196 1197# LT_PREREQ(VERSION) 1198# ------------------ 1199# Complain and exit if this libtool version is less that VERSION. 1200m4_defun([LT_PREREQ], 1201[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1202 [m4_default([$3], 1203 [m4_fatal([Libtool version $1 or higher is required], 1204 63)])], 1205 [$2])]) 1206 1207 1208# _LT_CHECK_BUILDDIR 1209# ------------------ 1210# Complain if the absolute build directory name contains unusual characters 1211m4_defun([_LT_CHECK_BUILDDIR], 1212[case `pwd` in 1213 *\ * | *\ *) 1214 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1215esac 1216]) 1217 1218 1219# LT_INIT([OPTIONS]) 1220# ------------------ 1221AC_DEFUN([LT_INIT], 1222[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1223AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1224AC_BEFORE([$0], [LT_LANG])dnl 1225AC_BEFORE([$0], [LT_OUTPUT])dnl 1226AC_BEFORE([$0], [LTDL_INIT])dnl 1227m4_require([_LT_CHECK_BUILDDIR])dnl 1228 1229dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1230m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1231m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1232dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1233dnl unless we require an AC_DEFUNed macro: 1234AC_REQUIRE([LTOPTIONS_VERSION])dnl 1235AC_REQUIRE([LTSUGAR_VERSION])dnl 1236AC_REQUIRE([LTVERSION_VERSION])dnl 1237AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1238m4_require([_LT_PROG_LTMAIN])dnl 1239 1240_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1241 1242dnl Parse OPTIONS 1243_LT_SET_OPTIONS([$0], [$1]) 1244 1245# This can be used to rebuild libtool when needed 1246LIBTOOL_DEPS="$ltmain" 1247 1248# Always use our own libtool. 1249LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1250AC_SUBST(LIBTOOL)dnl 1251 1252_LT_SETUP 1253 1254# Only expand once: 1255m4_define([LT_INIT]) 1256])# LT_INIT 1257 1258# Old names: 1259AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1260AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1261dnl aclocal-1.4 backwards compatibility: 1262dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1263dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1264 1265 1266# _LT_CC_BASENAME(CC) 1267# ------------------- 1268# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1269m4_defun([_LT_CC_BASENAME], 1270[for cc_temp in $1""; do 1271 case $cc_temp in 1272 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1273 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1274 \-*) ;; 1275 *) break;; 1276 esac 1277done 1278cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1279]) 1280 1281 1282# _LT_FILEUTILS_DEFAULTS 1283# ---------------------- 1284# It is okay to use these file commands and assume they have been set 1285# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1286m4_defun([_LT_FILEUTILS_DEFAULTS], 1287[: ${CP="cp -f"} 1288: ${MV="mv -f"} 1289: ${RM="rm -f"} 1290])# _LT_FILEUTILS_DEFAULTS 1291 1292 1293# _LT_SETUP 1294# --------- 1295m4_defun([_LT_SETUP], 1296[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1297AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1298AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1299AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1300 1301_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1302dnl 1303_LT_DECL([], [host_alias], [0], [The host system])dnl 1304_LT_DECL([], [host], [0])dnl 1305_LT_DECL([], [host_os], [0])dnl 1306dnl 1307_LT_DECL([], [build_alias], [0], [The build system])dnl 1308_LT_DECL([], [build], [0])dnl 1309_LT_DECL([], [build_os], [0])dnl 1310dnl 1311AC_REQUIRE([AC_PROG_CC])dnl 1312AC_REQUIRE([LT_PATH_LD])dnl 1313AC_REQUIRE([LT_PATH_NM])dnl 1314dnl 1315AC_REQUIRE([AC_PROG_LN_S])dnl 1316test -z "$LN_S" && LN_S="ln -s" 1317_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1318dnl 1319AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1320_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1321_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1322dnl 1323m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1324m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1325m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1326m4_require([_LT_CMD_RELOAD])dnl 1327m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1328m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1329m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1330m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1331m4_require([_LT_WITH_SYSROOT])dnl 1332 1333_LT_CONFIG_LIBTOOL_INIT([ 1334# See if we are running on zsh, and set the options which allow our 1335# commands through without removal of \ escapes INIT. 1336if test -n "\${ZSH_VERSION+set}" ; then 1337 setopt NO_GLOB_SUBST 1338fi 1339]) 1340if test -n "${ZSH_VERSION+set}" ; then 1341 setopt NO_GLOB_SUBST 1342fi 1343 1344_LT_CHECK_OBJDIR 1345 1346m4_require([_LT_TAG_COMPILER])dnl 1347 1348case $host_os in 1349aix3*) 1350 # AIX sometimes has problems with the GCC collect2 program. For some 1351 # reason, if we set the COLLECT_NAMES environment variable, the problems 1352 # vanish in a puff of smoke. 1353 if test "X${COLLECT_NAMES+set}" != Xset; then 1354 COLLECT_NAMES= 1355 export COLLECT_NAMES 1356 fi 1357 ;; 1358esac 1359 1360# Global variables: 1361ofile=libtool 1362can_build_shared=yes 1363 1364# All known linkers require a `.a' archive for static linking (except MSVC, 1365# which needs '.lib'). 1366libext=a 1367 1368with_gnu_ld="$lt_cv_prog_gnu_ld" 1369 1370old_CC="$CC" 1371old_CFLAGS="$CFLAGS" 1372 1373# Set sane defaults for various variables 1374test -z "$CC" && CC=cc 1375test -z "$LTCC" && LTCC=$CC 1376test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1377test -z "$LD" && LD=ld 1378test -z "$ac_objext" && ac_objext=o 1379 1380_LT_CC_BASENAME([$compiler]) 1381 1382# Only perform the check for file, if the check method requires it 1383test -z "$MAGIC_CMD" && MAGIC_CMD=file 1384case $deplibs_check_method in 1385file_magic*) 1386 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1387 _LT_PATH_MAGIC 1388 fi 1389 ;; 1390esac 1391 1392# Use C for the default configuration in the libtool script 1393LT_SUPPORTED_TAG([CC]) 1394_LT_LANG_C_CONFIG 1395_LT_LANG_DEFAULT_CONFIG 1396_LT_CONFIG_COMMANDS 1397])# _LT_SETUP 1398 1399 1400# _LT_PREPARE_SED_QUOTE_VARS 1401# -------------------------- 1402# Define a few sed substitution that help us do robust quoting. 1403m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1404[# Backslashify metacharacters that are still active within 1405# double-quoted strings. 1406sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1407 1408# Same as above, but do not quote variable references. 1409double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1410 1411# Sed substitution to delay expansion of an escaped shell variable in a 1412# double_quote_subst'ed string. 1413delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1414 1415# Sed substitution to delay expansion of an escaped single quote. 1416delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1417 1418# Sed substitution to avoid accidental globbing in evaled expressions 1419no_glob_subst='s/\*/\\\*/g' 1420]) 1421 1422# _LT_PROG_LTMAIN 1423# --------------- 1424# Note that this code is called both from `configure', and `config.status' 1425# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1426# `config.status' has no value for ac_aux_dir unless we are using Automake, 1427# so we pass a copy along to make sure it has a sensible value anyway. 1428m4_defun([_LT_PROG_LTMAIN], 1429[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1430_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1431ltmain="$ac_aux_dir/ltmain.sh" 1432])# _LT_PROG_LTMAIN 1433 1434 1435 1436# So that we can recreate a full libtool script including additional 1437# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1438# in macros and then make a single call at the end using the `libtool' 1439# label. 1440 1441 1442# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1443# ---------------------------------------- 1444# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1445m4_define([_LT_CONFIG_LIBTOOL_INIT], 1446[m4_ifval([$1], 1447 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1448 [$1 1449])])]) 1450 1451# Initialize. 1452m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1453 1454 1455# _LT_CONFIG_LIBTOOL([COMMANDS]) 1456# ------------------------------ 1457# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1458m4_define([_LT_CONFIG_LIBTOOL], 1459[m4_ifval([$1], 1460 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1461 [$1 1462])])]) 1463 1464# Initialize. 1465m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1466 1467 1468# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1469# ----------------------------------------------------- 1470m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1471[_LT_CONFIG_LIBTOOL([$1]) 1472_LT_CONFIG_LIBTOOL_INIT([$2]) 1473]) 1474 1475 1476# _LT_FORMAT_COMMENT([COMMENT]) 1477# ----------------------------- 1478# Add leading comment marks to the start of each line, and a trailing 1479# full-stop to the whole comment if one is not present already. 1480m4_define([_LT_FORMAT_COMMENT], 1481[m4_ifval([$1], [ 1482m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1483 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1484)]) 1485 1486 1487 1488 1489 1490# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1491# ------------------------------------------------------------------- 1492# CONFIGNAME is the name given to the value in the libtool script. 1493# VARNAME is the (base) name used in the configure script. 1494# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1495# VARNAME. Any other value will be used directly. 1496m4_define([_LT_DECL], 1497[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1498 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1499 [m4_ifval([$1], [$1], [$2])]) 1500 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1501 m4_ifval([$4], 1502 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1503 lt_dict_add_subkey([lt_decl_dict], [$2], 1504 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1505]) 1506 1507 1508# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1509# -------------------------------------------------------- 1510m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1511 1512 1513# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1514# ------------------------------------------------ 1515m4_define([lt_decl_tag_varnames], 1516[_lt_decl_filter([tagged?], [yes], $@)]) 1517 1518 1519# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1520# --------------------------------------------------------- 1521m4_define([_lt_decl_filter], 1522[m4_case([$#], 1523 [0], [m4_fatal([$0: too few arguments: $#])], 1524 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1525 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1526 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1527 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1528]) 1529 1530 1531# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1532# -------------------------------------------------- 1533m4_define([lt_decl_quote_varnames], 1534[_lt_decl_filter([value], [1], $@)]) 1535 1536 1537# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1538# --------------------------------------------------- 1539m4_define([lt_decl_dquote_varnames], 1540[_lt_decl_filter([value], [2], $@)]) 1541 1542 1543# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1544# --------------------------------------------------- 1545m4_define([lt_decl_varnames_tagged], 1546[m4_assert([$# <= 2])dnl 1547_$0(m4_quote(m4_default([$1], [[, ]])), 1548 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1549 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1550m4_define([_lt_decl_varnames_tagged], 1551[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1552 1553 1554# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1555# ------------------------------------------------ 1556m4_define([lt_decl_all_varnames], 1557[_$0(m4_quote(m4_default([$1], [[, ]])), 1558 m4_if([$2], [], 1559 m4_quote(lt_decl_varnames), 1560 m4_quote(m4_shift($@))))[]dnl 1561]) 1562m4_define([_lt_decl_all_varnames], 1563[lt_join($@, lt_decl_varnames_tagged([$1], 1564 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1565]) 1566 1567 1568# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1569# ------------------------------------ 1570# Quote a variable value, and forward it to `config.status' so that its 1571# declaration there will have the same value as in `configure'. VARNAME 1572# must have a single quote delimited value for this to work. 1573m4_define([_LT_CONFIG_STATUS_DECLARE], 1574[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1575 1576 1577# _LT_CONFIG_STATUS_DECLARATIONS 1578# ------------------------------ 1579# We delimit libtool config variables with single quotes, so when 1580# we write them to config.status, we have to be sure to quote all 1581# embedded single quotes properly. In configure, this macro expands 1582# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1583# 1584# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1585m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1586[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1587 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1588 1589 1590# _LT_LIBTOOL_TAGS 1591# ---------------- 1592# Output comment and list of tags supported by the script 1593m4_defun([_LT_LIBTOOL_TAGS], 1594[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1595available_tags="_LT_TAGS"dnl 1596]) 1597 1598 1599# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1600# ----------------------------------- 1601# Extract the dictionary values for VARNAME (optionally with TAG) and 1602# expand to a commented shell variable setting: 1603# 1604# # Some comment about what VAR is for. 1605# visible_name=$lt_internal_name 1606m4_define([_LT_LIBTOOL_DECLARE], 1607[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1608 [description])))[]dnl 1609m4_pushdef([_libtool_name], 1610 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1611m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1612 [0], [_libtool_name=[$]$1], 1613 [1], [_libtool_name=$lt_[]$1], 1614 [2], [_libtool_name=$lt_[]$1], 1615 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1616m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1617]) 1618 1619 1620# _LT_LIBTOOL_CONFIG_VARS 1621# ----------------------- 1622# Produce commented declarations of non-tagged libtool config variables 1623# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1624# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1625# section) are produced by _LT_LIBTOOL_TAG_VARS. 1626m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1627[m4_foreach([_lt_var], 1628 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1629 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1630 1631 1632# _LT_LIBTOOL_TAG_VARS(TAG) 1633# ------------------------- 1634m4_define([_LT_LIBTOOL_TAG_VARS], 1635[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1636 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1637 1638 1639# _LT_TAGVAR(VARNAME, [TAGNAME]) 1640# ------------------------------ 1641m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1642 1643 1644# _LT_CONFIG_COMMANDS 1645# ------------------- 1646# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1647# variables for single and double quote escaping we saved from calls 1648# to _LT_DECL, we can put quote escaped variables declarations 1649# into `config.status', and then the shell code to quote escape them in 1650# for loops in `config.status'. Finally, any additional code accumulated 1651# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1652m4_defun([_LT_CONFIG_COMMANDS], 1653[AC_PROVIDE_IFELSE([LT_OUTPUT], 1654 dnl If the libtool generation code has been placed in $CONFIG_LT, 1655 dnl instead of duplicating it all over again into config.status, 1656 dnl then we will have config.status run $CONFIG_LT later, so it 1657 dnl needs to know what name is stored there: 1658 [AC_CONFIG_COMMANDS([libtool], 1659 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1660 dnl If the libtool generation code is destined for config.status, 1661 dnl expand the accumulated commands and init code now: 1662 [AC_CONFIG_COMMANDS([libtool], 1663 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1664])#_LT_CONFIG_COMMANDS 1665 1666 1667# Initialize. 1668m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1669[ 1670 1671# The HP-UX ksh and POSIX shell print the target directory to stdout 1672# if CDPATH is set. 1673(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1674 1675sed_quote_subst='$sed_quote_subst' 1676double_quote_subst='$double_quote_subst' 1677delay_variable_subst='$delay_variable_subst' 1678_LT_CONFIG_STATUS_DECLARATIONS 1679LTCC='$LTCC' 1680LTCFLAGS='$LTCFLAGS' 1681compiler='$compiler_DEFAULT' 1682 1683# A function that is used when there is no print builtin or printf. 1684func_fallback_echo () 1685{ 1686 eval 'cat <<_LTECHO_EOF 1687\$[]1 1688_LTECHO_EOF' 1689} 1690 1691# Quote evaled strings. 1692for var in lt_decl_all_varnames([[ \ 1693]], lt_decl_quote_varnames); do 1694 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1695 *[[\\\\\\\`\\"\\\$]]*) 1696 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1697 ;; 1698 *) 1699 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1700 ;; 1701 esac 1702done 1703 1704# Double-quote double-evaled strings. 1705for var in lt_decl_all_varnames([[ \ 1706]], lt_decl_dquote_varnames); do 1707 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1708 *[[\\\\\\\`\\"\\\$]]*) 1709 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1710 ;; 1711 *) 1712 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1713 ;; 1714 esac 1715done 1716 1717_LT_OUTPUT_LIBTOOL_INIT 1718]) 1719 1720# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1721# ------------------------------------ 1722# Generate a child script FILE with all initialization necessary to 1723# reuse the environment learned by the parent script, and make the 1724# file executable. If COMMENT is supplied, it is inserted after the 1725# `#!' sequence but before initialization text begins. After this 1726# macro, additional text can be appended to FILE to form the body of 1727# the child script. The macro ends with non-zero status if the 1728# file could not be fully written (such as if the disk is full). 1729m4_ifdef([AS_INIT_GENERATED], 1730[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1731[m4_defun([_LT_GENERATED_FILE_INIT], 1732[m4_require([AS_PREPARE])]dnl 1733[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1734[lt_write_fail=0 1735cat >$1 <<_ASEOF || lt_write_fail=1 1736#! $SHELL 1737# Generated by $as_me. 1738$2 1739SHELL=\${CONFIG_SHELL-$SHELL} 1740export SHELL 1741_ASEOF 1742cat >>$1 <<\_ASEOF || lt_write_fail=1 1743AS_SHELL_SANITIZE 1744_AS_PREPARE 1745exec AS_MESSAGE_FD>&1 1746_ASEOF 1747test $lt_write_fail = 0 && chmod +x $1[]dnl 1748m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1749 1750# LT_OUTPUT 1751# --------- 1752# This macro allows early generation of the libtool script (before 1753# AC_OUTPUT is called), incase it is used in configure for compilation 1754# tests. 1755AC_DEFUN([LT_OUTPUT], 1756[: ${CONFIG_LT=./config.lt} 1757AC_MSG_NOTICE([creating $CONFIG_LT]) 1758_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1759[# Run this file to recreate a libtool stub with the current configuration.]) 1760 1761cat >>"$CONFIG_LT" <<\_LTEOF 1762lt_cl_silent=false 1763exec AS_MESSAGE_LOG_FD>>config.log 1764{ 1765 echo 1766 AS_BOX([Running $as_me.]) 1767} >&AS_MESSAGE_LOG_FD 1768 1769lt_cl_help="\ 1770\`$as_me' creates a local libtool stub from the current configuration, 1771for use in further configure time tests before the real libtool is 1772generated. 1773 1774Usage: $[0] [[OPTIONS]] 1775 1776 -h, --help print this help, then exit 1777 -V, --version print version number, then exit 1778 -q, --quiet do not print progress messages 1779 -d, --debug don't remove temporary files 1780 1781Report bugs to <bug-libtool@gnu.org>." 1782 1783lt_cl_version="\ 1784m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1785m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1786configured by $[0], generated by m4_PACKAGE_STRING. 1787 1788Copyright (C) 2011 Free Software Foundation, Inc. 1789This config.lt script is free software; the Free Software Foundation 1790gives unlimited permision to copy, distribute and modify it." 1791 1792while test $[#] != 0 1793do 1794 case $[1] in 1795 --version | --v* | -V ) 1796 echo "$lt_cl_version"; exit 0 ;; 1797 --help | --h* | -h ) 1798 echo "$lt_cl_help"; exit 0 ;; 1799 --debug | --d* | -d ) 1800 debug=: ;; 1801 --quiet | --q* | --silent | --s* | -q ) 1802 lt_cl_silent=: ;; 1803 1804 -*) AC_MSG_ERROR([unrecognized option: $[1] 1805Try \`$[0] --help' for more information.]) ;; 1806 1807 *) AC_MSG_ERROR([unrecognized argument: $[1] 1808Try \`$[0] --help' for more information.]) ;; 1809 esac 1810 shift 1811done 1812 1813if $lt_cl_silent; then 1814 exec AS_MESSAGE_FD>/dev/null 1815fi 1816_LTEOF 1817 1818cat >>"$CONFIG_LT" <<_LTEOF 1819_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1820_LTEOF 1821 1822cat >>"$CONFIG_LT" <<\_LTEOF 1823AC_MSG_NOTICE([creating $ofile]) 1824_LT_OUTPUT_LIBTOOL_COMMANDS 1825AS_EXIT(0) 1826_LTEOF 1827chmod +x "$CONFIG_LT" 1828 1829# configure is writing to config.log, but config.lt does its own redirection, 1830# appending to config.log, which fails on DOS, as config.log is still kept 1831# open by configure. Here we exec the FD to /dev/null, effectively closing 1832# config.log, so it can be properly (re)opened and appended to by config.lt. 1833lt_cl_success=: 1834test "$silent" = yes && 1835 lt_config_lt_args="$lt_config_lt_args --quiet" 1836exec AS_MESSAGE_LOG_FD>/dev/null 1837$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1838exec AS_MESSAGE_LOG_FD>>config.log 1839$lt_cl_success || AS_EXIT(1) 1840])# LT_OUTPUT 1841 1842 1843# _LT_CONFIG(TAG) 1844# --------------- 1845# If TAG is the built-in tag, create an initial libtool script with a 1846# default configuration from the untagged config vars. Otherwise add code 1847# to config.status for appending the configuration named by TAG from the 1848# matching tagged config vars. 1849m4_defun([_LT_CONFIG], 1850[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1851_LT_CONFIG_SAVE_COMMANDS([ 1852 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1853 m4_if(_LT_TAG, [C], [ 1854 # See if we are running on zsh, and set the options which allow our 1855 # commands through without removal of \ escapes. 1856 if test -n "${ZSH_VERSION+set}" ; then 1857 setopt NO_GLOB_SUBST 1858 fi 1859 1860 cfgfile="${ofile}T" 1861 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1862 $RM "$cfgfile" 1863 1864 cat <<_LT_EOF >> "$cfgfile" 1865#! $SHELL 1866 1867# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1868# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1869# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1870# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1871# 1872_LT_COPYING 1873_LT_LIBTOOL_TAGS 1874 1875# ### BEGIN LIBTOOL CONFIG 1876_LT_LIBTOOL_CONFIG_VARS 1877_LT_LIBTOOL_TAG_VARS 1878# ### END LIBTOOL CONFIG 1879 1880_LT_EOF 1881 1882 case $host_os in 1883 aix3*) 1884 cat <<\_LT_EOF >> "$cfgfile" 1885# AIX sometimes has problems with the GCC collect2 program. For some 1886# reason, if we set the COLLECT_NAMES environment variable, the problems 1887# vanish in a puff of smoke. 1888if test "X${COLLECT_NAMES+set}" != Xset; then 1889 COLLECT_NAMES= 1890 export COLLECT_NAMES 1891fi 1892_LT_EOF 1893 ;; 1894 esac 1895 1896 _LT_PROG_LTMAIN 1897 1898 # We use sed instead of cat because bash on DJGPP gets confused if 1899 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1900 # text mode, it properly converts lines to CR/LF. This bash problem 1901 # is reportedly fixed, but why not run on old versions too? 1902 sed '$q' "$ltmain" >> "$cfgfile" \ 1903 || (rm -f "$cfgfile"; exit 1) 1904 1905 _LT_PROG_REPLACE_SHELLFNS 1906 1907 mv -f "$cfgfile" "$ofile" || 1908 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1909 chmod +x "$ofile" 1910], 1911[cat <<_LT_EOF >> "$ofile" 1912 1913dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1914dnl in a comment (ie after a #). 1915# ### BEGIN LIBTOOL TAG CONFIG: $1 1916_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1917# ### END LIBTOOL TAG CONFIG: $1 1918_LT_EOF 1919])dnl /m4_if 1920], 1921[m4_if([$1], [], [ 1922 PACKAGE='$PACKAGE' 1923 VERSION='$VERSION' 1924 TIMESTAMP='$TIMESTAMP' 1925 RM='$RM' 1926 ofile='$ofile'], []) 1927])dnl /_LT_CONFIG_SAVE_COMMANDS 1928])# _LT_CONFIG 1929 1930 1931# LT_SUPPORTED_TAG(TAG) 1932# --------------------- 1933# Trace this macro to discover what tags are supported by the libtool 1934# --tag option, using: 1935# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1936AC_DEFUN([LT_SUPPORTED_TAG], []) 1937 1938 1939# C support is built-in for now 1940m4_define([_LT_LANG_C_enabled], []) 1941m4_define([_LT_TAGS], []) 1942 1943 1944# LT_LANG(LANG) 1945# ------------- 1946# Enable libtool support for the given language if not already enabled. 1947AC_DEFUN([LT_LANG], 1948[AC_BEFORE([$0], [LT_OUTPUT])dnl 1949m4_case([$1], 1950 [C], [_LT_LANG(C)], 1951 [C++], [_LT_LANG(CXX)], 1952 [Go], [_LT_LANG(GO)], 1953 [Java], [_LT_LANG(GCJ)], 1954 [Fortran 77], [_LT_LANG(F77)], 1955 [Fortran], [_LT_LANG(FC)], 1956 [Windows Resource], [_LT_LANG(RC)], 1957 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1958 [_LT_LANG($1)], 1959 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1960])# LT_LANG 1961 1962 1963# _LT_LANG(LANGNAME) 1964# ------------------ 1965m4_defun([_LT_LANG], 1966[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1967 [LT_SUPPORTED_TAG([$1])dnl 1968 m4_append([_LT_TAGS], [$1 ])dnl 1969 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1970 _LT_LANG_$1_CONFIG($1)])dnl 1971])# _LT_LANG 1972 1973 1974m4_ifndef([AC_PROG_GO], [ 1975# NOTE: This macro has been submitted for inclusion into # 1976# GNU Autoconf as AC_PROG_GO. When it is available in # 1977# a released version of Autoconf we should remove this # 1978# macro and use it instead. # 1979m4_defun([AC_PROG_GO], 1980[AC_LANG_PUSH(Go)dnl 1981AC_ARG_VAR([GOC], [Go compiler command])dnl 1982AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1983_AC_ARG_VAR_LDFLAGS()dnl 1984AC_CHECK_TOOL(GOC, gccgo) 1985if test -z "$GOC"; then 1986 if test -n "$ac_tool_prefix"; then 1987 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1988 fi 1989fi 1990if test -z "$GOC"; then 1991 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1992fi 1993])#m4_defun 1994])#m4_ifndef 1995 1996 1997# _LT_LANG_DEFAULT_CONFIG 1998# ----------------------- 1999m4_defun([_LT_LANG_DEFAULT_CONFIG], 2000[AC_PROVIDE_IFELSE([AC_PROG_CXX], 2001 [LT_LANG(CXX)], 2002 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2003 2004AC_PROVIDE_IFELSE([AC_PROG_F77], 2005 [LT_LANG(F77)], 2006 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2007 2008AC_PROVIDE_IFELSE([AC_PROG_FC], 2009 [LT_LANG(FC)], 2010 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2011 2012dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 2013dnl pulling things in needlessly. 2014AC_PROVIDE_IFELSE([AC_PROG_GCJ], 2015 [LT_LANG(GCJ)], 2016 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2017 [LT_LANG(GCJ)], 2018 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 2019 [LT_LANG(GCJ)], 2020 [m4_ifdef([AC_PROG_GCJ], 2021 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 2022 m4_ifdef([A][M_PROG_GCJ], 2023 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 2024 m4_ifdef([LT_PROG_GCJ], 2025 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2026 2027AC_PROVIDE_IFELSE([AC_PROG_GO], 2028 [LT_LANG(GO)], 2029 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2030 2031AC_PROVIDE_IFELSE([LT_PROG_RC], 2032 [LT_LANG(RC)], 2033 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 2034])# _LT_LANG_DEFAULT_CONFIG 2035 2036# Obsolete macros: 2037AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 2038AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 2039AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 2040AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 2041AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 2042dnl aclocal-1.4 backwards compatibility: 2043dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 2044dnl AC_DEFUN([AC_LIBTOOL_F77], []) 2045dnl AC_DEFUN([AC_LIBTOOL_FC], []) 2046dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 2047dnl AC_DEFUN([AC_LIBTOOL_RC], []) 2048 2049 2050# _LT_TAG_COMPILER 2051# ---------------- 2052m4_defun([_LT_TAG_COMPILER], 2053[AC_REQUIRE([AC_PROG_CC])dnl 2054 2055_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 2056_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 2057_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 2058_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2059 2060# If no C compiler was specified, use CC. 2061LTCC=${LTCC-"$CC"} 2062 2063# If no C compiler flags were specified, use CFLAGS. 2064LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2065 2066# Allow CC to be a program name with arguments. 2067compiler=$CC 2068])# _LT_TAG_COMPILER 2069 2070 2071# _LT_COMPILER_BOILERPLATE 2072# ------------------------ 2073# Check for compiler boilerplate output or warnings with 2074# the simple compiler test code. 2075m4_defun([_LT_COMPILER_BOILERPLATE], 2076[m4_require([_LT_DECL_SED])dnl 2077ac_outfile=conftest.$ac_objext 2078echo "$lt_simple_compile_test_code" >conftest.$ac_ext 2079eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2080_lt_compiler_boilerplate=`cat conftest.err` 2081$RM conftest* 2082])# _LT_COMPILER_BOILERPLATE 2083 2084 2085# _LT_LINKER_BOILERPLATE 2086# ---------------------- 2087# Check for linker boilerplate output or warnings with 2088# the simple link test code. 2089m4_defun([_LT_LINKER_BOILERPLATE], 2090[m4_require([_LT_DECL_SED])dnl 2091ac_outfile=conftest.$ac_objext 2092echo "$lt_simple_link_test_code" >conftest.$ac_ext 2093eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2094_lt_linker_boilerplate=`cat conftest.err` 2095$RM -r conftest* 2096])# _LT_LINKER_BOILERPLATE 2097 2098# _LT_REQUIRED_DARWIN_CHECKS 2099# ------------------------- 2100m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2101 case $host_os in 2102 rhapsody* | darwin*) 2103 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2104 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2105 AC_CHECK_TOOL([LIPO], [lipo], [:]) 2106 AC_CHECK_TOOL([OTOOL], [otool], [:]) 2107 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2108 _LT_DECL([], [DSYMUTIL], [1], 2109 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2110 _LT_DECL([], [NMEDIT], [1], 2111 [Tool to change global to local symbols on Mac OS X]) 2112 _LT_DECL([], [LIPO], [1], 2113 [Tool to manipulate fat objects and archives on Mac OS X]) 2114 _LT_DECL([], [OTOOL], [1], 2115 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2116 _LT_DECL([], [OTOOL64], [1], 2117 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2118 2119 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2120 [lt_cv_apple_cc_single_mod=no 2121 if test -z "${LT_MULTI_MODULE}"; then 2122 # By default we will add the -single_module flag. You can override 2123 # by either setting the environment variable LT_MULTI_MODULE 2124 # non-empty at configure time, or by adding -multi_module to the 2125 # link flags. 2126 rm -rf libconftest.dylib* 2127 echo "int foo(void){return 1;}" > conftest.c 2128 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2129-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2130 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2131 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2132 _lt_result=$? 2133 # If there is a non-empty error log, and "single_module" 2134 # appears in it, assume the flag caused a linker warning 2135 if test -s conftest.err && $GREP single_module conftest.err; then 2136 cat conftest.err >&AS_MESSAGE_LOG_FD 2137 # Otherwise, if the output was created with a 0 exit code from 2138 # the compiler, it worked. 2139 elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2140 lt_cv_apple_cc_single_mod=yes 2141 else 2142 cat conftest.err >&AS_MESSAGE_LOG_FD 2143 fi 2144 rm -rf libconftest.dylib* 2145 rm -f conftest.* 2146 fi]) 2147 2148 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2149 [lt_cv_ld_exported_symbols_list], 2150 [lt_cv_ld_exported_symbols_list=no 2151 save_LDFLAGS=$LDFLAGS 2152 echo "_main" > conftest.sym 2153 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2154 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2155 [lt_cv_ld_exported_symbols_list=yes], 2156 [lt_cv_ld_exported_symbols_list=no]) 2157 LDFLAGS="$save_LDFLAGS" 2158 ]) 2159 2160 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2161 [lt_cv_ld_force_load=no 2162 cat > conftest.c << _LT_EOF 2163int forced_loaded() { return 2;} 2164_LT_EOF 2165 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2166 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2167 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2168 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2169 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2170 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2171 cat > conftest.c << _LT_EOF 2172int main() { return 0;} 2173_LT_EOF 2174 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2175 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2176 _lt_result=$? 2177 if test -s conftest.err && $GREP force_load conftest.err; then 2178 cat conftest.err >&AS_MESSAGE_LOG_FD 2179 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2180 lt_cv_ld_force_load=yes 2181 else 2182 cat conftest.err >&AS_MESSAGE_LOG_FD 2183 fi 2184 rm -f conftest.err libconftest.a conftest conftest.c 2185 rm -rf conftest.dSYM 2186 ]) 2187 case $host_os in 2188 rhapsody* | darwin1.[[012]]) 2189 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2190 darwin1.*) 2191 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2192 darwin*) # darwin 5.x on 2193 # if running on 10.5 or later, the deployment target defaults 2194 # to the OS version, if on x86, and 10.4, the deployment 2195 # target defaults to 10.4. Don't you love it? 2196 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2197 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2198 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2199 10.[[012]]*) 2200 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2201 10.*) 2202 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2203 esac 2204 ;; 2205 esac 2206 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2207 _lt_dar_single_mod='$single_module' 2208 fi 2209 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2210 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2211 else 2212 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2213 fi 2214 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2215 _lt_dsymutil='~$DSYMUTIL $lib || :' 2216 else 2217 _lt_dsymutil= 2218 fi 2219 ;; 2220 esac 2221]) 2222 2223 2224# _LT_DARWIN_LINKER_FEATURES([TAG]) 2225# --------------------------------- 2226# Checks for linker and compiler features on darwin 2227m4_defun([_LT_DARWIN_LINKER_FEATURES], 2228[ 2229 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2230 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2231 _LT_TAGVAR(hardcode_direct, $1)=no 2232 _LT_TAGVAR(hardcode_automatic, $1)=yes 2233 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2234 if test "$lt_cv_ld_force_load" = "yes"; then 2235 _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\"`' 2236 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2237 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2238 else 2239 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2240 fi 2241 _LT_TAGVAR(link_all_deplibs, $1)=yes 2242 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2243 case $cc_basename in 2244 ifort*) _lt_dar_can_shared=yes ;; 2245 *) _lt_dar_can_shared=$GCC ;; 2246 esac 2247 if test "$_lt_dar_can_shared" = "yes"; then 2248 output_verbose_link_cmd=func_echo_all 2249 _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}" 2250 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2251 _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}" 2252 _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}" 2253 m4_if([$1], [CXX], 2254[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2255 _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}" 2256 _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}" 2257 fi 2258],[]) 2259 else 2260 _LT_TAGVAR(ld_shlibs, $1)=no 2261 fi 2262]) 2263 2264# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2265# ---------------------------------- 2266# Links a minimal program and checks the executable 2267# for the system default hardcoded library path. In most cases, 2268# this is /usr/lib:/lib, but when the MPI compilers are used 2269# the location of the communication and MPI libs are included too. 2270# If we don't find anything, use the default library path according 2271# to the aix ld manual. 2272# Store the results from the different compilers for each TAGNAME. 2273# Allow to override them for all tags through lt_cv_aix_libpath. 2274m4_defun([_LT_SYS_MODULE_PATH_AIX], 2275[m4_require([_LT_DECL_SED])dnl 2276if test "${lt_cv_aix_libpath+set}" = set; then 2277 aix_libpath=$lt_cv_aix_libpath 2278else 2279 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2280 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2281 lt_aix_libpath_sed='[ 2282 /Import File Strings/,/^$/ { 2283 /^0/ { 2284 s/^0 *\([^ ]*\) *$/\1/ 2285 p 2286 } 2287 }]' 2288 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2289 # Check for a 64-bit object if we didn't find anything. 2290 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2291 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2292 fi],[]) 2293 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2294 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2295 fi 2296 ]) 2297 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2298fi 2299])# _LT_SYS_MODULE_PATH_AIX 2300 2301 2302# _LT_SHELL_INIT(ARG) 2303# ------------------- 2304m4_define([_LT_SHELL_INIT], 2305[m4_divert_text([M4SH-INIT], [$1 2306])])# _LT_SHELL_INIT 2307 2308 2309 2310# _LT_PROG_ECHO_BACKSLASH 2311# ----------------------- 2312# Find how we can fake an echo command that does not interpret backslash. 2313# In particular, with Autoconf 2.60 or later we add some code to the start 2314# of the generated configure script which will find a shell with a builtin 2315# printf (which we can use as an echo command). 2316m4_defun([_LT_PROG_ECHO_BACKSLASH], 2317[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2318ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2319ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2320 2321AC_MSG_CHECKING([how to print strings]) 2322# Test print first, because it will be a builtin if present. 2323if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2324 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2325 ECHO='print -r --' 2326elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2327 ECHO='printf %s\n' 2328else 2329 # Use this function as a fallback that always works. 2330 func_fallback_echo () 2331 { 2332 eval 'cat <<_LTECHO_EOF 2333$[]1 2334_LTECHO_EOF' 2335 } 2336 ECHO='func_fallback_echo' 2337fi 2338 2339# func_echo_all arg... 2340# Invoke $ECHO with all args, space-separated. 2341func_echo_all () 2342{ 2343 $ECHO "$*" 2344} 2345 2346case "$ECHO" in 2347 printf*) AC_MSG_RESULT([printf]) ;; 2348 print*) AC_MSG_RESULT([print -r]) ;; 2349 *) AC_MSG_RESULT([cat]) ;; 2350esac 2351 2352m4_ifdef([_AS_DETECT_SUGGESTED], 2353[_AS_DETECT_SUGGESTED([ 2354 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2355 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2356 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2357 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2358 PATH=/empty FPATH=/empty; export PATH FPATH 2359 test "X`printf %s $ECHO`" = "X$ECHO" \ 2360 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2361 2362_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2363_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2364])# _LT_PROG_ECHO_BACKSLASH 2365 2366 2367# _LT_WITH_SYSROOT 2368# ---------------- 2369AC_DEFUN([_LT_WITH_SYSROOT], 2370[AC_MSG_CHECKING([for sysroot]) 2371AC_ARG_WITH([sysroot], 2372[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2373 (or the compiler's sysroot if not specified).], 2374[], [with_sysroot=no]) 2375 2376dnl lt_sysroot will always be passed unquoted. We quote it here 2377dnl in case the user passed a directory name. 2378lt_sysroot= 2379case ${with_sysroot} in #( 2380 yes) 2381 if test "$GCC" = yes; then 2382 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2383 fi 2384 ;; #( 2385 /*) 2386 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2387 ;; #( 2388 no|'') 2389 ;; #( 2390 *) 2391 AC_MSG_RESULT([${with_sysroot}]) 2392 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2393 ;; 2394esac 2395 2396 AC_MSG_RESULT([${lt_sysroot:-no}]) 2397_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2398[dependent libraries, and in which our libraries should be installed.])]) 2399 2400# _LT_ENABLE_LOCK 2401# --------------- 2402m4_defun([_LT_ENABLE_LOCK], 2403[AC_ARG_ENABLE([libtool-lock], 2404 [AS_HELP_STRING([--disable-libtool-lock], 2405 [avoid locking (might break parallel builds)])]) 2406test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2407 2408# Some flags need to be propagated to the compiler or linker for good 2409# libtool support. 2410case $host in 2411ia64-*-hpux*) 2412 # Find out which ABI we are using. 2413 echo 'int i;' > conftest.$ac_ext 2414 if AC_TRY_EVAL(ac_compile); then 2415 case `/usr/bin/file conftest.$ac_objext` in 2416 *ELF-32*) 2417 HPUX_IA64_MODE="32" 2418 ;; 2419 *ELF-64*) 2420 HPUX_IA64_MODE="64" 2421 ;; 2422 esac 2423 fi 2424 rm -rf conftest* 2425 ;; 2426*-*-irix6*) 2427 # Find out which ABI we are using. 2428 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2429 if AC_TRY_EVAL(ac_compile); then 2430 if test "$lt_cv_prog_gnu_ld" = yes; then 2431 case `/usr/bin/file conftest.$ac_objext` in 2432 *32-bit*) 2433 LD="${LD-ld} -melf32bsmip" 2434 ;; 2435 *N32*) 2436 LD="${LD-ld} -melf32bmipn32" 2437 ;; 2438 *64-bit*) 2439 LD="${LD-ld} -melf64bmip" 2440 ;; 2441 esac 2442 else 2443 case `/usr/bin/file conftest.$ac_objext` in 2444 *32-bit*) 2445 LD="${LD-ld} -32" 2446 ;; 2447 *N32*) 2448 LD="${LD-ld} -n32" 2449 ;; 2450 *64-bit*) 2451 LD="${LD-ld} -64" 2452 ;; 2453 esac 2454 fi 2455 fi 2456 rm -rf conftest* 2457 ;; 2458 2459x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2460s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2461 # Find out which ABI we are using. 2462 echo 'int i;' > conftest.$ac_ext 2463 if AC_TRY_EVAL(ac_compile); then 2464 case `/usr/bin/file conftest.o` in 2465 *32-bit*) 2466 case $host in 2467 x86_64-*kfreebsd*-gnu) 2468 LD="${LD-ld} -m elf_i386_fbsd" 2469 ;; 2470 x86_64-*linux*) 2471 LD="${LD-ld} -m elf_i386" 2472 ;; 2473 ppc64-*linux*|powerpc64-*linux*) 2474 LD="${LD-ld} -m elf32ppclinux" 2475 ;; 2476 s390x-*linux*) 2477 LD="${LD-ld} -m elf_s390" 2478 ;; 2479 sparc64-*linux*) 2480 LD="${LD-ld} -m elf32_sparc" 2481 ;; 2482 esac 2483 ;; 2484 *64-bit*) 2485 case $host in 2486 x86_64-*kfreebsd*-gnu) 2487 LD="${LD-ld} -m elf_x86_64_fbsd" 2488 ;; 2489 x86_64-*linux*) 2490 LD="${LD-ld} -m elf_x86_64" 2491 ;; 2492 ppc*-*linux*|powerpc*-*linux*) 2493 LD="${LD-ld} -m elf64ppc" 2494 ;; 2495 s390*-*linux*|s390*-*tpf*) 2496 LD="${LD-ld} -m elf64_s390" 2497 ;; 2498 sparc*-*linux*) 2499 LD="${LD-ld} -m elf64_sparc" 2500 ;; 2501 esac 2502 ;; 2503 esac 2504 fi 2505 rm -rf conftest* 2506 ;; 2507 2508*-*-sco3.2v5*) 2509 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2510 SAVE_CFLAGS="$CFLAGS" 2511 CFLAGS="$CFLAGS -belf" 2512 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2513 [AC_LANG_PUSH(C) 2514 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2515 AC_LANG_POP]) 2516 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2517 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2518 CFLAGS="$SAVE_CFLAGS" 2519 fi 2520 ;; 2521*-*solaris*) 2522 # Find out which ABI we are using. 2523 echo 'int i;' > conftest.$ac_ext 2524 if AC_TRY_EVAL(ac_compile); then 2525 case `/usr/bin/file conftest.o` in 2526 *64-bit*) 2527 case $lt_cv_prog_gnu_ld in 2528 yes*) 2529 case $host in 2530 i?86-*-solaris*) 2531 LD="${LD-ld} -m elf_x86_64" 2532 ;; 2533 sparc*-*-solaris*) 2534 LD="${LD-ld} -m elf64_sparc" 2535 ;; 2536 esac 2537 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2538 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2539 LD="${LD-ld}_sol2" 2540 fi 2541 ;; 2542 *) 2543 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2544 LD="${LD-ld} -64" 2545 fi 2546 ;; 2547 esac 2548 ;; 2549 esac 2550 fi 2551 rm -rf conftest* 2552 ;; 2553esac 2554 2555need_locks="$enable_libtool_lock" 2556])# _LT_ENABLE_LOCK 2557 2558 2559# _LT_PROG_AR 2560# ----------- 2561m4_defun([_LT_PROG_AR], 2562[AC_CHECK_TOOLS(AR, [ar], false) 2563: ${AR=ar} 2564: ${AR_FLAGS=cru} 2565_LT_DECL([], [AR], [1], [The archiver]) 2566_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2567 2568AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2569 [lt_cv_ar_at_file=no 2570 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2571 [echo conftest.$ac_objext > conftest.lst 2572 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2573 AC_TRY_EVAL([lt_ar_try]) 2574 if test "$ac_status" -eq 0; then 2575 # Ensure the archiver fails upon bogus file names. 2576 rm -f conftest.$ac_objext libconftest.a 2577 AC_TRY_EVAL([lt_ar_try]) 2578 if test "$ac_status" -ne 0; then 2579 lt_cv_ar_at_file=@ 2580 fi 2581 fi 2582 rm -f conftest.* libconftest.a 2583 ]) 2584 ]) 2585 2586if test "x$lt_cv_ar_at_file" = xno; then 2587 archiver_list_spec= 2588else 2589 archiver_list_spec=$lt_cv_ar_at_file 2590fi 2591_LT_DECL([], [archiver_list_spec], [1], 2592 [How to feed a file listing to the archiver]) 2593])# _LT_PROG_AR 2594 2595 2596# _LT_CMD_OLD_ARCHIVE 2597# ------------------- 2598m4_defun([_LT_CMD_OLD_ARCHIVE], 2599[_LT_PROG_AR 2600 2601AC_CHECK_TOOL(STRIP, strip, :) 2602test -z "$STRIP" && STRIP=: 2603_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2604 2605AC_CHECK_TOOL(RANLIB, ranlib, :) 2606test -z "$RANLIB" && RANLIB=: 2607_LT_DECL([], [RANLIB], [1], 2608 [Commands used to install an old-style archive]) 2609 2610# Determine commands to create old-style static archives. 2611old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2612old_postinstall_cmds='chmod 644 $oldlib' 2613old_postuninstall_cmds= 2614 2615if test -n "$RANLIB"; then 2616 case $host_os in 2617 openbsd*) 2618 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2619 ;; 2620 *) 2621 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2622 ;; 2623 esac 2624 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2625fi 2626 2627case $host_os in 2628 darwin*) 2629 lock_old_archive_extraction=yes ;; 2630 *) 2631 lock_old_archive_extraction=no ;; 2632esac 2633_LT_DECL([], [old_postinstall_cmds], [2]) 2634_LT_DECL([], [old_postuninstall_cmds], [2]) 2635_LT_TAGDECL([], [old_archive_cmds], [2], 2636 [Commands used to build an old-style archive]) 2637_LT_DECL([], [lock_old_archive_extraction], [0], 2638 [Whether to use a lock for old archive extraction]) 2639])# _LT_CMD_OLD_ARCHIVE 2640 2641 2642# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2643# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2644# ---------------------------------------------------------------- 2645# Check whether the given compiler option works 2646AC_DEFUN([_LT_COMPILER_OPTION], 2647[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2648m4_require([_LT_DECL_SED])dnl 2649AC_CACHE_CHECK([$1], [$2], 2650 [$2=no 2651 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2652 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2653 lt_compiler_flag="$3" 2654 # Insert the option either (1) after the last *FLAGS variable, or 2655 # (2) before a word containing "conftest.", or (3) at the end. 2656 # Note that $ac_compile itself does not contain backslashes and begins 2657 # with a dollar sign (not a hyphen), so the echo should work correctly. 2658 # The option is referenced via a variable to avoid confusing sed. 2659 lt_compile=`echo "$ac_compile" | $SED \ 2660 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2661 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2662 -e 's:$: $lt_compiler_flag:'` 2663 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2664 (eval "$lt_compile" 2>conftest.err) 2665 ac_status=$? 2666 cat conftest.err >&AS_MESSAGE_LOG_FD 2667 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2668 if (exit $ac_status) && test -s "$ac_outfile"; then 2669 # The compiler can only warn and ignore the option if not recognized 2670 # So say no if there are warnings other than the usual output. 2671 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2672 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2673 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2674 $2=yes 2675 fi 2676 fi 2677 $RM conftest* 2678]) 2679 2680if test x"[$]$2" = xyes; then 2681 m4_if([$5], , :, [$5]) 2682else 2683 m4_if([$6], , :, [$6]) 2684fi 2685])# _LT_COMPILER_OPTION 2686 2687# Old name: 2688AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2689dnl aclocal-1.4 backwards compatibility: 2690dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2691 2692 2693# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2694# [ACTION-SUCCESS], [ACTION-FAILURE]) 2695# ---------------------------------------------------- 2696# Check whether the given linker option works 2697AC_DEFUN([_LT_LINKER_OPTION], 2698[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2699m4_require([_LT_DECL_SED])dnl 2700AC_CACHE_CHECK([$1], [$2], 2701 [$2=no 2702 save_LDFLAGS="$LDFLAGS" 2703 LDFLAGS="$LDFLAGS $3" 2704 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2705 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2706 # The linker can only warn and ignore the option if not recognized 2707 # So say no if there are warnings 2708 if test -s conftest.err; then 2709 # Append any errors to the config.log. 2710 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2711 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2712 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2713 if diff conftest.exp conftest.er2 >/dev/null; then 2714 $2=yes 2715 fi 2716 else 2717 $2=yes 2718 fi 2719 fi 2720 $RM -r conftest* 2721 LDFLAGS="$save_LDFLAGS" 2722]) 2723 2724if test x"[$]$2" = xyes; then 2725 m4_if([$4], , :, [$4]) 2726else 2727 m4_if([$5], , :, [$5]) 2728fi 2729])# _LT_LINKER_OPTION 2730 2731# Old name: 2732AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2733dnl aclocal-1.4 backwards compatibility: 2734dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2735 2736 2737# LT_CMD_MAX_LEN 2738#--------------- 2739AC_DEFUN([LT_CMD_MAX_LEN], 2740[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2741# find the maximum length of command line arguments 2742AC_MSG_CHECKING([the maximum length of command line arguments]) 2743AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2744 i=0 2745 teststring="ABCD" 2746 2747 case $build_os in 2748 msdosdjgpp*) 2749 # On DJGPP, this test can blow up pretty badly due to problems in libc 2750 # (any single argument exceeding 2000 bytes causes a buffer overrun 2751 # during glob expansion). Even if it were fixed, the result of this 2752 # check would be larger than it should be. 2753 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2754 ;; 2755 2756 gnu*) 2757 # Under GNU Hurd, this test is not required because there is 2758 # no limit to the length of command line arguments. 2759 # Libtool will interpret -1 as no limit whatsoever 2760 lt_cv_sys_max_cmd_len=-1; 2761 ;; 2762 2763 cygwin* | mingw* | cegcc*) 2764 # On Win9x/ME, this test blows up -- it succeeds, but takes 2765 # about 5 minutes as the teststring grows exponentially. 2766 # Worse, since 9x/ME are not pre-emptively multitasking, 2767 # you end up with a "frozen" computer, even though with patience 2768 # the test eventually succeeds (with a max line length of 256k). 2769 # Instead, let's just punt: use the minimum linelength reported by 2770 # all of the supported platforms: 8192 (on NT/2K/XP). 2771 lt_cv_sys_max_cmd_len=8192; 2772 ;; 2773 2774 mint*) 2775 # On MiNT this can take a long time and run out of memory. 2776 lt_cv_sys_max_cmd_len=8192; 2777 ;; 2778 2779 amigaos*) 2780 # On AmigaOS with pdksh, this test takes hours, literally. 2781 # So we just punt and use a minimum line length of 8192. 2782 lt_cv_sys_max_cmd_len=8192; 2783 ;; 2784 2785 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2786 # This has been around since 386BSD, at least. Likely further. 2787 if test -x /sbin/sysctl; then 2788 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2789 elif test -x /usr/sbin/sysctl; then 2790 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2791 else 2792 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2793 fi 2794 # And add a safety zone 2795 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2796 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2797 ;; 2798 2799 interix*) 2800 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2801 lt_cv_sys_max_cmd_len=196608 2802 ;; 2803 2804 os2*) 2805 # The test takes a long time on OS/2. 2806 lt_cv_sys_max_cmd_len=8192 2807 ;; 2808 2809 osf*) 2810 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2811 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2812 # nice to cause kernel panics so lets avoid the loop below. 2813 # First set a reasonable default. 2814 lt_cv_sys_max_cmd_len=16384 2815 # 2816 if test -x /sbin/sysconfig; then 2817 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2818 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2819 esac 2820 fi 2821 ;; 2822 sco3.2v5*) 2823 lt_cv_sys_max_cmd_len=102400 2824 ;; 2825 sysv5* | sco5v6* | sysv4.2uw2*) 2826 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2827 if test -n "$kargmax"; then 2828 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2829 else 2830 lt_cv_sys_max_cmd_len=32768 2831 fi 2832 ;; 2833 *) 2834 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2835 if test -n "$lt_cv_sys_max_cmd_len"; then 2836 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2837 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2838 else 2839 # Make teststring a little bigger before we do anything with it. 2840 # a 1K string should be a reasonable start. 2841 for i in 1 2 3 4 5 6 7 8 ; do 2842 teststring=$teststring$teststring 2843 done 2844 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2845 # If test is not a shell built-in, we'll probably end up computing a 2846 # maximum length that is only half of the actual maximum length, but 2847 # we can't tell. 2848 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2849 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2850 test $i != 17 # 1/2 MB should be enough 2851 do 2852 i=`expr $i + 1` 2853 teststring=$teststring$teststring 2854 done 2855 # Only check the string length outside the loop. 2856 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2857 teststring= 2858 # Add a significant safety factor because C++ compilers can tack on 2859 # massive amounts of additional arguments before passing them to the 2860 # linker. It appears as though 1/2 is a usable value. 2861 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2862 fi 2863 ;; 2864 esac 2865]) 2866if test -n $lt_cv_sys_max_cmd_len ; then 2867 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2868else 2869 AC_MSG_RESULT(none) 2870fi 2871max_cmd_len=$lt_cv_sys_max_cmd_len 2872_LT_DECL([], [max_cmd_len], [0], 2873 [What is the maximum length of a command?]) 2874])# LT_CMD_MAX_LEN 2875 2876# Old name: 2877AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2878dnl aclocal-1.4 backwards compatibility: 2879dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2880 2881 2882# _LT_HEADER_DLFCN 2883# ---------------- 2884m4_defun([_LT_HEADER_DLFCN], 2885[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2886])# _LT_HEADER_DLFCN 2887 2888 2889# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2890# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2891# ---------------------------------------------------------------- 2892m4_defun([_LT_TRY_DLOPEN_SELF], 2893[m4_require([_LT_HEADER_DLFCN])dnl 2894if test "$cross_compiling" = yes; then : 2895 [$4] 2896else 2897 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2898 lt_status=$lt_dlunknown 2899 cat > conftest.$ac_ext <<_LT_EOF 2900[#line $LINENO "configure" 2901#include "confdefs.h" 2902 2903#if HAVE_DLFCN_H 2904#include <dlfcn.h> 2905#endif 2906 2907#include <stdio.h> 2908 2909#ifdef RTLD_GLOBAL 2910# define LT_DLGLOBAL RTLD_GLOBAL 2911#else 2912# ifdef DL_GLOBAL 2913# define LT_DLGLOBAL DL_GLOBAL 2914# else 2915# define LT_DLGLOBAL 0 2916# endif 2917#endif 2918 2919/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2920 find out it does not work in some platform. */ 2921#ifndef LT_DLLAZY_OR_NOW 2922# ifdef RTLD_LAZY 2923# define LT_DLLAZY_OR_NOW RTLD_LAZY 2924# else 2925# ifdef DL_LAZY 2926# define LT_DLLAZY_OR_NOW DL_LAZY 2927# else 2928# ifdef RTLD_NOW 2929# define LT_DLLAZY_OR_NOW RTLD_NOW 2930# else 2931# ifdef DL_NOW 2932# define LT_DLLAZY_OR_NOW DL_NOW 2933# else 2934# define LT_DLLAZY_OR_NOW 0 2935# endif 2936# endif 2937# endif 2938# endif 2939#endif 2940 2941/* When -fvisbility=hidden is used, assume the code has been annotated 2942 correspondingly for the symbols needed. */ 2943#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2944int fnord () __attribute__((visibility("default"))); 2945#endif 2946 2947int fnord () { return 42; } 2948int main () 2949{ 2950 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2951 int status = $lt_dlunknown; 2952 2953 if (self) 2954 { 2955 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2956 else 2957 { 2958 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2959 else puts (dlerror ()); 2960 } 2961 /* dlclose (self); */ 2962 } 2963 else 2964 puts (dlerror ()); 2965 2966 return status; 2967}] 2968_LT_EOF 2969 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2970 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2971 lt_status=$? 2972 case x$lt_status in 2973 x$lt_dlno_uscore) $1 ;; 2974 x$lt_dlneed_uscore) $2 ;; 2975 x$lt_dlunknown|x*) $3 ;; 2976 esac 2977 else : 2978 # compilation failed 2979 $3 2980 fi 2981fi 2982rm -fr conftest* 2983])# _LT_TRY_DLOPEN_SELF 2984 2985 2986# LT_SYS_DLOPEN_SELF 2987# ------------------ 2988AC_DEFUN([LT_SYS_DLOPEN_SELF], 2989[m4_require([_LT_HEADER_DLFCN])dnl 2990if test "x$enable_dlopen" != xyes; then 2991 enable_dlopen=unknown 2992 enable_dlopen_self=unknown 2993 enable_dlopen_self_static=unknown 2994else 2995 lt_cv_dlopen=no 2996 lt_cv_dlopen_libs= 2997 2998 case $host_os in 2999 beos*) 3000 lt_cv_dlopen="load_add_on" 3001 lt_cv_dlopen_libs= 3002 lt_cv_dlopen_self=yes 3003 ;; 3004 3005 mingw* | pw32* | cegcc*) 3006 lt_cv_dlopen="LoadLibrary" 3007 lt_cv_dlopen_libs= 3008 ;; 3009 3010 cygwin*) 3011 lt_cv_dlopen="dlopen" 3012 lt_cv_dlopen_libs= 3013 ;; 3014 3015 darwin*) 3016 # if libdl is installed we need to link against it 3017 AC_CHECK_LIB([dl], [dlopen], 3018 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3019 lt_cv_dlopen="dyld" 3020 lt_cv_dlopen_libs= 3021 lt_cv_dlopen_self=yes 3022 ]) 3023 ;; 3024 3025 *) 3026 AC_CHECK_FUNC([shl_load], 3027 [lt_cv_dlopen="shl_load"], 3028 [AC_CHECK_LIB([dld], [shl_load], 3029 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 3030 [AC_CHECK_FUNC([dlopen], 3031 [lt_cv_dlopen="dlopen"], 3032 [AC_CHECK_LIB([dl], [dlopen], 3033 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3034 [AC_CHECK_LIB([svld], [dlopen], 3035 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3036 [AC_CHECK_LIB([dld], [dld_link], 3037 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 3038 ]) 3039 ]) 3040 ]) 3041 ]) 3042 ]) 3043 ;; 3044 esac 3045 3046 if test "x$lt_cv_dlopen" != xno; then 3047 enable_dlopen=yes 3048 else 3049 enable_dlopen=no 3050 fi 3051 3052 case $lt_cv_dlopen in 3053 dlopen) 3054 save_CPPFLAGS="$CPPFLAGS" 3055 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3056 3057 save_LDFLAGS="$LDFLAGS" 3058 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3059 3060 save_LIBS="$LIBS" 3061 LIBS="$lt_cv_dlopen_libs $LIBS" 3062 3063 AC_CACHE_CHECK([whether a program can dlopen itself], 3064 lt_cv_dlopen_self, [dnl 3065 _LT_TRY_DLOPEN_SELF( 3066 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3067 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3068 ]) 3069 3070 if test "x$lt_cv_dlopen_self" = xyes; then 3071 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3072 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3073 lt_cv_dlopen_self_static, [dnl 3074 _LT_TRY_DLOPEN_SELF( 3075 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3076 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3077 ]) 3078 fi 3079 3080 CPPFLAGS="$save_CPPFLAGS" 3081 LDFLAGS="$save_LDFLAGS" 3082 LIBS="$save_LIBS" 3083 ;; 3084 esac 3085 3086 case $lt_cv_dlopen_self in 3087 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3088 *) enable_dlopen_self=unknown ;; 3089 esac 3090 3091 case $lt_cv_dlopen_self_static in 3092 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3093 *) enable_dlopen_self_static=unknown ;; 3094 esac 3095fi 3096_LT_DECL([dlopen_support], [enable_dlopen], [0], 3097 [Whether dlopen is supported]) 3098_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3099 [Whether dlopen of programs is supported]) 3100_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3101 [Whether dlopen of statically linked programs is supported]) 3102])# LT_SYS_DLOPEN_SELF 3103 3104# Old name: 3105AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3106dnl aclocal-1.4 backwards compatibility: 3107dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3108 3109 3110# _LT_COMPILER_C_O([TAGNAME]) 3111# --------------------------- 3112# Check to see if options -c and -o are simultaneously supported by compiler. 3113# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3114m4_defun([_LT_COMPILER_C_O], 3115[m4_require([_LT_DECL_SED])dnl 3116m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3117m4_require([_LT_TAG_COMPILER])dnl 3118AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3119 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3120 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3121 $RM -r conftest 2>/dev/null 3122 mkdir conftest 3123 cd conftest 3124 mkdir out 3125 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3126 3127 lt_compiler_flag="-o out/conftest2.$ac_objext" 3128 # Insert the option either (1) after the last *FLAGS variable, or 3129 # (2) before a word containing "conftest.", or (3) at the end. 3130 # Note that $ac_compile itself does not contain backslashes and begins 3131 # with a dollar sign (not a hyphen), so the echo should work correctly. 3132 lt_compile=`echo "$ac_compile" | $SED \ 3133 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3134 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3135 -e 's:$: $lt_compiler_flag:'` 3136 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3137 (eval "$lt_compile" 2>out/conftest.err) 3138 ac_status=$? 3139 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3140 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3141 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3142 then 3143 # The compiler can only warn and ignore the option if not recognized 3144 # So say no if there are warnings 3145 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3146 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3147 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3148 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3149 fi 3150 fi 3151 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3152 $RM conftest* 3153 # SGI C++ compiler will create directory out/ii_files/ for 3154 # template instantiation 3155 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3156 $RM out/* && rmdir out 3157 cd .. 3158 $RM -r conftest 3159 $RM conftest* 3160]) 3161_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3162 [Does compiler simultaneously support -c and -o options?]) 3163])# _LT_COMPILER_C_O 3164 3165 3166# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3167# ---------------------------------- 3168# Check to see if we can do hard links to lock some files if needed 3169m4_defun([_LT_COMPILER_FILE_LOCKS], 3170[m4_require([_LT_ENABLE_LOCK])dnl 3171m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3172_LT_COMPILER_C_O([$1]) 3173 3174hard_links="nottested" 3175if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3176 # do not overwrite the value of need_locks provided by the user 3177 AC_MSG_CHECKING([if we can lock with hard links]) 3178 hard_links=yes 3179 $RM conftest* 3180 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3181 touch conftest.a 3182 ln conftest.a conftest.b 2>&5 || hard_links=no 3183 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3184 AC_MSG_RESULT([$hard_links]) 3185 if test "$hard_links" = no; then 3186 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3187 need_locks=warn 3188 fi 3189else 3190 need_locks=no 3191fi 3192_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3193])# _LT_COMPILER_FILE_LOCKS 3194 3195 3196# _LT_CHECK_OBJDIR 3197# ---------------- 3198m4_defun([_LT_CHECK_OBJDIR], 3199[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3200[rm -f .libs 2>/dev/null 3201mkdir .libs 2>/dev/null 3202if test -d .libs; then 3203 lt_cv_objdir=.libs 3204else 3205 # MS-DOS does not allow filenames that begin with a dot. 3206 lt_cv_objdir=_libs 3207fi 3208rmdir .libs 2>/dev/null]) 3209objdir=$lt_cv_objdir 3210_LT_DECL([], [objdir], [0], 3211 [The name of the directory that contains temporary libtool files])dnl 3212m4_pattern_allow([LT_OBJDIR])dnl 3213AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3214 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3215])# _LT_CHECK_OBJDIR 3216 3217 3218# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3219# -------------------------------------- 3220# Check hardcoding attributes. 3221m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3222[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3223_LT_TAGVAR(hardcode_action, $1)= 3224if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3225 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3226 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3227 3228 # We can hardcode non-existent directories. 3229 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3230 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3231 # have to relink, otherwise we might link with an installed library 3232 # when we should be linking with a yet-to-be-installed one 3233 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3234 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3235 # Linking always hardcodes the temporary library directory. 3236 _LT_TAGVAR(hardcode_action, $1)=relink 3237 else 3238 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3239 _LT_TAGVAR(hardcode_action, $1)=immediate 3240 fi 3241else 3242 # We cannot hardcode anything, or else we can only hardcode existing 3243 # directories. 3244 _LT_TAGVAR(hardcode_action, $1)=unsupported 3245fi 3246AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3247 3248if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3249 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3250 # Fast installation is not supported 3251 enable_fast_install=no 3252elif test "$shlibpath_overrides_runpath" = yes || 3253 test "$enable_shared" = no; then 3254 # Fast installation is not necessary 3255 enable_fast_install=needless 3256fi 3257_LT_TAGDECL([], [hardcode_action], [0], 3258 [How to hardcode a shared library path into an executable]) 3259])# _LT_LINKER_HARDCODE_LIBPATH 3260 3261 3262# _LT_CMD_STRIPLIB 3263# ---------------- 3264m4_defun([_LT_CMD_STRIPLIB], 3265[m4_require([_LT_DECL_EGREP]) 3266striplib= 3267old_striplib= 3268AC_MSG_CHECKING([whether stripping libraries is possible]) 3269if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3270 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3271 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3272 AC_MSG_RESULT([yes]) 3273else 3274# FIXME - insert some real tests, host_os isn't really good enough 3275 case $host_os in 3276 darwin*) 3277 if test -n "$STRIP" ; then 3278 striplib="$STRIP -x" 3279 old_striplib="$STRIP -S" 3280 AC_MSG_RESULT([yes]) 3281 else 3282 AC_MSG_RESULT([no]) 3283 fi 3284 ;; 3285 *) 3286 AC_MSG_RESULT([no]) 3287 ;; 3288 esac 3289fi 3290_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3291_LT_DECL([], [striplib], [1]) 3292])# _LT_CMD_STRIPLIB 3293 3294 3295# _LT_SYS_DYNAMIC_LINKER([TAG]) 3296# ----------------------------- 3297# PORTME Fill in your ld.so characteristics 3298m4_defun([_LT_SYS_DYNAMIC_LINKER], 3299[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3300m4_require([_LT_DECL_EGREP])dnl 3301m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3302m4_require([_LT_DECL_OBJDUMP])dnl 3303m4_require([_LT_DECL_SED])dnl 3304m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3305AC_MSG_CHECKING([dynamic linker characteristics]) 3306m4_if([$1], 3307 [], [ 3308if test "$GCC" = yes; then 3309 case $host_os in 3310 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3311 *) lt_awk_arg="/^libraries:/" ;; 3312 esac 3313 case $host_os in 3314 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3315 *) lt_sed_strip_eq="s,=/,/,g" ;; 3316 esac 3317 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3318 case $lt_search_path_spec in 3319 *\;*) 3320 # if the path contains ";" then we assume it to be the separator 3321 # otherwise default to the standard path separator (i.e. ":") - it is 3322 # assumed that no part of a normal pathname contains ";" but that should 3323 # okay in the real world where ";" in dirpaths is itself problematic. 3324 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3325 ;; 3326 *) 3327 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3328 ;; 3329 esac 3330 # Ok, now we have the path, separated by spaces, we can step through it 3331 # and add multilib dir if necessary. 3332 lt_tmp_lt_search_path_spec= 3333 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3334 for lt_sys_path in $lt_search_path_spec; do 3335 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3336 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3337 else 3338 test -d "$lt_sys_path" && \ 3339 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3340 fi 3341 done 3342 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3343BEGIN {RS=" "; FS="/|\n";} { 3344 lt_foo=""; 3345 lt_count=0; 3346 for (lt_i = NF; lt_i > 0; lt_i--) { 3347 if ($lt_i != "" && $lt_i != ".") { 3348 if ($lt_i == "..") { 3349 lt_count++; 3350 } else { 3351 if (lt_count == 0) { 3352 lt_foo="/" $lt_i lt_foo; 3353 } else { 3354 lt_count--; 3355 } 3356 } 3357 } 3358 } 3359 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3360 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3361}'` 3362 # AWK program above erroneously prepends '/' to C:/dos/paths 3363 # for these hosts. 3364 case $host_os in 3365 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3366 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3367 esac 3368 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3369else 3370 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3371fi]) 3372library_names_spec= 3373libname_spec='lib$name' 3374soname_spec= 3375shrext_cmds=".so" 3376postinstall_cmds= 3377postuninstall_cmds= 3378finish_cmds= 3379finish_eval= 3380shlibpath_var= 3381shlibpath_overrides_runpath=unknown 3382version_type=none 3383dynamic_linker="$host_os ld.so" 3384sys_lib_dlsearch_path_spec="/lib /usr/lib" 3385need_lib_prefix=unknown 3386hardcode_into_libs=no 3387 3388# when you set need_version to no, make sure it does not cause -set_version 3389# flags to be left without arguments 3390need_version=unknown 3391 3392case $host_os in 3393aix3*) 3394 version_type=linux # correct to gnu/linux during the next big refactor 3395 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3396 shlibpath_var=LIBPATH 3397 3398 # AIX 3 has no versioning support, so we append a major version to the name. 3399 soname_spec='${libname}${release}${shared_ext}$major' 3400 ;; 3401 3402aix[[4-9]]*) 3403 version_type=linux # correct to gnu/linux during the next big refactor 3404 need_lib_prefix=no 3405 need_version=no 3406 hardcode_into_libs=yes 3407 if test "$host_cpu" = ia64; then 3408 # AIX 5 supports IA64 3409 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3410 shlibpath_var=LD_LIBRARY_PATH 3411 else 3412 # With GCC up to 2.95.x, collect2 would create an import file 3413 # for dependence libraries. The import file would start with 3414 # the line `#! .'. This would cause the generated library to 3415 # depend on `.', always an invalid library. This was fixed in 3416 # development snapshots of GCC prior to 3.0. 3417 case $host_os in 3418 aix4 | aix4.[[01]] | aix4.[[01]].*) 3419 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3420 echo ' yes ' 3421 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3422 : 3423 else 3424 can_build_shared=no 3425 fi 3426 ;; 3427 esac 3428 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3429 # soname into executable. Probably we can add versioning support to 3430 # collect2, so additional links can be useful in future. 3431 if test "$aix_use_runtimelinking" = yes; then 3432 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3433 # instead of lib<name>.a to let people know that these are not 3434 # typical AIX shared libraries. 3435 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3436 else 3437 # We preserve .a as extension for shared libraries through AIX4.2 3438 # and later when we are not doing run time linking. 3439 library_names_spec='${libname}${release}.a $libname.a' 3440 soname_spec='${libname}${release}${shared_ext}$major' 3441 fi 3442 shlibpath_var=LIBPATH 3443 fi 3444 ;; 3445 3446amigaos*) 3447 case $host_cpu in 3448 powerpc) 3449 # Since July 2007 AmigaOS4 officially supports .so libraries. 3450 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3452 ;; 3453 m68k) 3454 library_names_spec='$libname.ixlibrary $libname.a' 3455 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3456 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 3457 ;; 3458 esac 3459 ;; 3460 3461beos*) 3462 library_names_spec='${libname}${shared_ext}' 3463 dynamic_linker="$host_os ld.so" 3464 shlibpath_var=LIBRARY_PATH 3465 ;; 3466 3467bsdi[[45]]*) 3468 version_type=linux # correct to gnu/linux during the next big refactor 3469 need_version=no 3470 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3471 soname_spec='${libname}${release}${shared_ext}$major' 3472 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3473 shlibpath_var=LD_LIBRARY_PATH 3474 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3475 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3476 # the default ld.so.conf also contains /usr/contrib/lib and 3477 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3478 # libtool to hard-code these into programs 3479 ;; 3480 3481cygwin* | mingw* | pw32* | cegcc*) 3482 version_type=windows 3483 shrext_cmds=".dll" 3484 need_version=no 3485 need_lib_prefix=no 3486 3487 case $GCC,$cc_basename in 3488 yes,*) 3489 # gcc 3490 library_names_spec='$libname.dll.a' 3491 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3492 postinstall_cmds='base_file=`basename \${file}`~ 3493 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3494 dldir=$destdir/`dirname \$dlpath`~ 3495 test -d \$dldir || mkdir -p \$dldir~ 3496 $install_prog $dir/$dlname \$dldir/$dlname~ 3497 chmod a+x \$dldir/$dlname~ 3498 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3499 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3500 fi' 3501 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3502 dlpath=$dir/\$dldll~ 3503 $RM \$dlpath' 3504 shlibpath_overrides_runpath=yes 3505 3506 case $host_os in 3507 cygwin*) 3508 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3509 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3510m4_if([$1], [],[ 3511 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3512 ;; 3513 mingw* | cegcc*) 3514 # MinGW DLLs use traditional 'lib' prefix 3515 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3516 ;; 3517 pw32*) 3518 # pw32 DLLs use 'pw' prefix rather than 'lib' 3519 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3520 ;; 3521 esac 3522 dynamic_linker='Win32 ld.exe' 3523 ;; 3524 3525 *,cl*) 3526 # Native MSVC 3527 libname_spec='$name' 3528 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3529 library_names_spec='${libname}.dll.lib' 3530 3531 case $build_os in 3532 mingw*) 3533 sys_lib_search_path_spec= 3534 lt_save_ifs=$IFS 3535 IFS=';' 3536 for lt_path in $LIB 3537 do 3538 IFS=$lt_save_ifs 3539 # Let DOS variable expansion print the short 8.3 style file name. 3540 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3541 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3542 done 3543 IFS=$lt_save_ifs 3544 # Convert to MSYS style. 3545 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3546 ;; 3547 cygwin*) 3548 # Convert to unix form, then to dos form, then back to unix form 3549 # but this time dos style (no spaces!) so that the unix form looks 3550 # like /cygdrive/c/PROGRA~1:/cygdr... 3551 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3552 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3553 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3554 ;; 3555 *) 3556 sys_lib_search_path_spec="$LIB" 3557 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3558 # It is most probably a Windows format PATH. 3559 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3560 else 3561 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3562 fi 3563 # FIXME: find the short name or the path components, as spaces are 3564 # common. (e.g. "Program Files" -> "PROGRA~1") 3565 ;; 3566 esac 3567 3568 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3569 postinstall_cmds='base_file=`basename \${file}`~ 3570 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3571 dldir=$destdir/`dirname \$dlpath`~ 3572 test -d \$dldir || mkdir -p \$dldir~ 3573 $install_prog $dir/$dlname \$dldir/$dlname' 3574 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3575 dlpath=$dir/\$dldll~ 3576 $RM \$dlpath' 3577 shlibpath_overrides_runpath=yes 3578 dynamic_linker='Win32 link.exe' 3579 ;; 3580 3581 *) 3582 # Assume MSVC wrapper 3583 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3584 dynamic_linker='Win32 ld.exe' 3585 ;; 3586 esac 3587 # FIXME: first we should search . and the directory the executable is in 3588 shlibpath_var=PATH 3589 ;; 3590 3591darwin* | rhapsody*) 3592 dynamic_linker="$host_os dyld" 3593 version_type=darwin 3594 need_lib_prefix=no 3595 need_version=no 3596 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3597 soname_spec='${libname}${release}${major}$shared_ext' 3598 shlibpath_overrides_runpath=yes 3599 shlibpath_var=DYLD_LIBRARY_PATH 3600 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3601m4_if([$1], [],[ 3602 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3603 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3604 ;; 3605 3606dgux*) 3607 version_type=linux # correct to gnu/linux during the next big refactor 3608 need_lib_prefix=no 3609 need_version=no 3610 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3611 soname_spec='${libname}${release}${shared_ext}$major' 3612 shlibpath_var=LD_LIBRARY_PATH 3613 ;; 3614 3615freebsd* | dragonfly*) 3616 # DragonFly does not have aout. When/if they implement a new 3617 # versioning mechanism, adjust this. 3618 if test -x /usr/bin/objformat; then 3619 objformat=`/usr/bin/objformat` 3620 else 3621 case $host_os in 3622 freebsd[[23]].*) objformat=aout ;; 3623 *) objformat=elf ;; 3624 esac 3625 fi 3626 version_type=freebsd-$objformat 3627 case $version_type in 3628 freebsd-elf*) 3629 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3630 need_version=no 3631 need_lib_prefix=no 3632 ;; 3633 freebsd-*) 3634 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3635 need_version=yes 3636 ;; 3637 esac 3638 shlibpath_var=LD_LIBRARY_PATH 3639 case $host_os in 3640 freebsd2.*) 3641 shlibpath_overrides_runpath=yes 3642 ;; 3643 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3644 shlibpath_overrides_runpath=yes 3645 hardcode_into_libs=yes 3646 ;; 3647 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3648 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3649 shlibpath_overrides_runpath=no 3650 hardcode_into_libs=yes 3651 ;; 3652 *) # from 4.6 on, and DragonFly 3653 shlibpath_overrides_runpath=yes 3654 hardcode_into_libs=yes 3655 ;; 3656 esac 3657 ;; 3658 3659gnu*) 3660 version_type=linux # correct to gnu/linux during the next big refactor 3661 need_lib_prefix=no 3662 need_version=no 3663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3664 soname_spec='${libname}${release}${shared_ext}$major' 3665 shlibpath_var=LD_LIBRARY_PATH 3666 shlibpath_overrides_runpath=no 3667 hardcode_into_libs=yes 3668 ;; 3669 3670haiku*) 3671 version_type=linux # correct to gnu/linux during the next big refactor 3672 need_lib_prefix=no 3673 need_version=no 3674 dynamic_linker="$host_os runtime_loader" 3675 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3676 soname_spec='${libname}${release}${shared_ext}$major' 3677 shlibpath_var=LIBRARY_PATH 3678 shlibpath_overrides_runpath=yes 3679 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3680 hardcode_into_libs=yes 3681 ;; 3682 3683hpux9* | hpux10* | hpux11*) 3684 # Give a soname corresponding to the major version so that dld.sl refuses to 3685 # link against other versions. 3686 version_type=sunos 3687 need_lib_prefix=no 3688 need_version=no 3689 case $host_cpu in 3690 ia64*) 3691 shrext_cmds='.so' 3692 hardcode_into_libs=yes 3693 dynamic_linker="$host_os dld.so" 3694 shlibpath_var=LD_LIBRARY_PATH 3695 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3696 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3697 soname_spec='${libname}${release}${shared_ext}$major' 3698 if test "X$HPUX_IA64_MODE" = X32; then 3699 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3700 else 3701 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3702 fi 3703 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3704 ;; 3705 hppa*64*) 3706 shrext_cmds='.sl' 3707 hardcode_into_libs=yes 3708 dynamic_linker="$host_os dld.sl" 3709 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3710 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3711 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3712 soname_spec='${libname}${release}${shared_ext}$major' 3713 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3714 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3715 ;; 3716 *) 3717 shrext_cmds='.sl' 3718 dynamic_linker="$host_os dld.sl" 3719 shlibpath_var=SHLIB_PATH 3720 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3721 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3722 soname_spec='${libname}${release}${shared_ext}$major' 3723 ;; 3724 esac 3725 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3726 postinstall_cmds='chmod 555 $lib' 3727 # or fails outright, so override atomically: 3728 install_override_mode=555 3729 ;; 3730 3731interix[[3-9]]*) 3732 version_type=linux # correct to gnu/linux during the next big refactor 3733 need_lib_prefix=no 3734 need_version=no 3735 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3736 soname_spec='${libname}${release}${shared_ext}$major' 3737 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3738 shlibpath_var=LD_LIBRARY_PATH 3739 shlibpath_overrides_runpath=no 3740 hardcode_into_libs=yes 3741 ;; 3742 3743irix5* | irix6* | nonstopux*) 3744 case $host_os in 3745 nonstopux*) version_type=nonstopux ;; 3746 *) 3747 if test "$lt_cv_prog_gnu_ld" = yes; then 3748 version_type=linux # correct to gnu/linux during the next big refactor 3749 else 3750 version_type=irix 3751 fi ;; 3752 esac 3753 need_lib_prefix=no 3754 need_version=no 3755 soname_spec='${libname}${release}${shared_ext}$major' 3756 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3757 case $host_os in 3758 irix5* | nonstopux*) 3759 libsuff= shlibsuff= 3760 ;; 3761 *) 3762 case $LD in # libtool.m4 will add one of these switches to LD 3763 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3764 libsuff= shlibsuff= libmagic=32-bit;; 3765 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3766 libsuff=32 shlibsuff=N32 libmagic=N32;; 3767 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3768 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3769 *) libsuff= shlibsuff= libmagic=never-match;; 3770 esac 3771 ;; 3772 esac 3773 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3774 shlibpath_overrides_runpath=no 3775 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3776 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3777 hardcode_into_libs=yes 3778 ;; 3779 3780# No shared lib support for Linux oldld, aout, or coff. 3781linux*oldld* | linux*aout* | linux*coff*) 3782 dynamic_linker=no 3783 ;; 3784 3785# This must be glibc/ELF. 3786linux* | k*bsd*-gnu | kopensolaris*-gnu) 3787 version_type=linux # correct to gnu/linux during the next big refactor 3788 need_lib_prefix=no 3789 need_version=no 3790 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3791 soname_spec='${libname}${release}${shared_ext}$major' 3792 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3793 shlibpath_var=LD_LIBRARY_PATH 3794 shlibpath_overrides_runpath=no 3795 3796 # Some binutils ld are patched to set DT_RUNPATH 3797 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3798 [lt_cv_shlibpath_overrides_runpath=no 3799 save_LDFLAGS=$LDFLAGS 3800 save_libdir=$libdir 3801 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3802 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3803 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3804 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3805 [lt_cv_shlibpath_overrides_runpath=yes])]) 3806 LDFLAGS=$save_LDFLAGS 3807 libdir=$save_libdir 3808 ]) 3809 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3810 3811 # This implies no fast_install, which is unacceptable. 3812 # Some rework will be needed to allow for fast_install 3813 # before this can be enabled. 3814 hardcode_into_libs=yes 3815 3816 # Append ld.so.conf contents to the search path 3817 if test -f /etc/ld.so.conf; then 3818 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' ' '` 3819 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3820 fi 3821 3822 # We used to test for /lib/ld.so.1 and disable shared libraries on 3823 # powerpc, because MkLinux only supported shared libraries with the 3824 # GNU dynamic linker. Since this was broken with cross compilers, 3825 # most powerpc-linux boxes support dynamic linking these days and 3826 # people can always --disable-shared, the test was removed, and we 3827 # assume the GNU/Linux dynamic linker is in use. 3828 dynamic_linker='GNU/Linux ld.so' 3829 ;; 3830 3831netbsd*) 3832 version_type=sunos 3833 need_lib_prefix=no 3834 need_version=no 3835 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3836 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3837 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3838 dynamic_linker='NetBSD (a.out) ld.so' 3839 else 3840 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3841 soname_spec='${libname}${release}${shared_ext}$major' 3842 dynamic_linker='NetBSD ld.elf_so' 3843 fi 3844 shlibpath_var=LD_LIBRARY_PATH 3845 shlibpath_overrides_runpath=yes 3846 hardcode_into_libs=yes 3847 ;; 3848 3849newsos6) 3850 version_type=linux # correct to gnu/linux during the next big refactor 3851 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3852 shlibpath_var=LD_LIBRARY_PATH 3853 shlibpath_overrides_runpath=yes 3854 ;; 3855 3856*nto* | *qnx*) 3857 version_type=qnx 3858 need_lib_prefix=no 3859 need_version=no 3860 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3861 soname_spec='${libname}${release}${shared_ext}$major' 3862 shlibpath_var=LD_LIBRARY_PATH 3863 shlibpath_overrides_runpath=no 3864 hardcode_into_libs=yes 3865 dynamic_linker='ldqnx.so' 3866 ;; 3867 3868openbsd*) 3869 version_type=sunos 3870 sys_lib_dlsearch_path_spec="/usr/lib" 3871 need_lib_prefix=no 3872 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3873 case $host_os in 3874 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3875 *) need_version=no ;; 3876 esac 3877 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3878 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3879 shlibpath_var=LD_LIBRARY_PATH 3880 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3881 case $host_os in 3882 openbsd2.[[89]] | openbsd2.[[89]].*) 3883 shlibpath_overrides_runpath=no 3884 ;; 3885 *) 3886 shlibpath_overrides_runpath=yes 3887 ;; 3888 esac 3889 else 3890 shlibpath_overrides_runpath=yes 3891 fi 3892 ;; 3893 3894os2*) 3895 libname_spec='$name' 3896 shrext_cmds=".dll" 3897 need_lib_prefix=no 3898 library_names_spec='$libname${shared_ext} $libname.a' 3899 dynamic_linker='OS/2 ld.exe' 3900 shlibpath_var=LIBPATH 3901 ;; 3902 3903osf3* | osf4* | osf5*) 3904 version_type=osf 3905 need_lib_prefix=no 3906 need_version=no 3907 soname_spec='${libname}${release}${shared_ext}$major' 3908 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3909 shlibpath_var=LD_LIBRARY_PATH 3910 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3911 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3912 ;; 3913 3914rdos*) 3915 dynamic_linker=no 3916 ;; 3917 3918solaris*) 3919 version_type=linux # correct to gnu/linux during the next big refactor 3920 need_lib_prefix=no 3921 need_version=no 3922 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3923 soname_spec='${libname}${release}${shared_ext}$major' 3924 shlibpath_var=LD_LIBRARY_PATH 3925 shlibpath_overrides_runpath=yes 3926 hardcode_into_libs=yes 3927 # ldd complains unless libraries are executable 3928 postinstall_cmds='chmod +x $lib' 3929 ;; 3930 3931sunos4*) 3932 version_type=sunos 3933 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3934 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3935 shlibpath_var=LD_LIBRARY_PATH 3936 shlibpath_overrides_runpath=yes 3937 if test "$with_gnu_ld" = yes; then 3938 need_lib_prefix=no 3939 fi 3940 need_version=yes 3941 ;; 3942 3943sysv4 | sysv4.3*) 3944 version_type=linux # correct to gnu/linux during the next big refactor 3945 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3946 soname_spec='${libname}${release}${shared_ext}$major' 3947 shlibpath_var=LD_LIBRARY_PATH 3948 case $host_vendor in 3949 sni) 3950 shlibpath_overrides_runpath=no 3951 need_lib_prefix=no 3952 runpath_var=LD_RUN_PATH 3953 ;; 3954 siemens) 3955 need_lib_prefix=no 3956 ;; 3957 motorola) 3958 need_lib_prefix=no 3959 need_version=no 3960 shlibpath_overrides_runpath=no 3961 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3962 ;; 3963 esac 3964 ;; 3965 3966sysv4*MP*) 3967 if test -d /usr/nec ;then 3968 version_type=linux # correct to gnu/linux during the next big refactor 3969 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3970 soname_spec='$libname${shared_ext}.$major' 3971 shlibpath_var=LD_LIBRARY_PATH 3972 fi 3973 ;; 3974 3975sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3976 version_type=freebsd-elf 3977 need_lib_prefix=no 3978 need_version=no 3979 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3980 soname_spec='${libname}${release}${shared_ext}$major' 3981 shlibpath_var=LD_LIBRARY_PATH 3982 shlibpath_overrides_runpath=yes 3983 hardcode_into_libs=yes 3984 if test "$with_gnu_ld" = yes; then 3985 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3986 else 3987 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3988 case $host_os in 3989 sco3.2v5*) 3990 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3991 ;; 3992 esac 3993 fi 3994 sys_lib_dlsearch_path_spec='/usr/lib' 3995 ;; 3996 3997tpf*) 3998 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3999 version_type=linux # correct to gnu/linux during the next big refactor 4000 need_lib_prefix=no 4001 need_version=no 4002 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4003 shlibpath_var=LD_LIBRARY_PATH 4004 shlibpath_overrides_runpath=no 4005 hardcode_into_libs=yes 4006 ;; 4007 4008uts4*) 4009 version_type=linux # correct to gnu/linux during the next big refactor 4010 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4011 soname_spec='${libname}${release}${shared_ext}$major' 4012 shlibpath_var=LD_LIBRARY_PATH 4013 ;; 4014 4015*) 4016 dynamic_linker=no 4017 ;; 4018esac 4019AC_MSG_RESULT([$dynamic_linker]) 4020test "$dynamic_linker" = no && can_build_shared=no 4021 4022variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4023if test "$GCC" = yes; then 4024 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4025fi 4026 4027if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4028 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4029fi 4030if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4031 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4032fi 4033 4034_LT_DECL([], [variables_saved_for_relink], [1], 4035 [Variables whose values should be saved in libtool wrapper scripts and 4036 restored at link time]) 4037_LT_DECL([], [need_lib_prefix], [0], 4038 [Do we need the "lib" prefix for modules?]) 4039_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4040_LT_DECL([], [version_type], [0], [Library versioning type]) 4041_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4042_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4043_LT_DECL([], [shlibpath_overrides_runpath], [0], 4044 [Is shlibpath searched before the hard-coded library search path?]) 4045_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4046_LT_DECL([], [library_names_spec], [1], 4047 [[List of archive names. First name is the real one, the rest are links. 4048 The last name is the one that the linker finds with -lNAME]]) 4049_LT_DECL([], [soname_spec], [1], 4050 [[The coded name of the library, if different from the real name]]) 4051_LT_DECL([], [install_override_mode], [1], 4052 [Permission mode override for installation of shared libraries]) 4053_LT_DECL([], [postinstall_cmds], [2], 4054 [Command to use after installation of a shared archive]) 4055_LT_DECL([], [postuninstall_cmds], [2], 4056 [Command to use after uninstallation of a shared archive]) 4057_LT_DECL([], [finish_cmds], [2], 4058 [Commands used to finish a libtool library installation in a directory]) 4059_LT_DECL([], [finish_eval], [1], 4060 [[As "finish_cmds", except a single script fragment to be evaled but 4061 not shown]]) 4062_LT_DECL([], [hardcode_into_libs], [0], 4063 [Whether we should hardcode library paths into libraries]) 4064_LT_DECL([], [sys_lib_search_path_spec], [2], 4065 [Compile-time system search path for libraries]) 4066_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4067 [Run-time system search path for libraries]) 4068])# _LT_SYS_DYNAMIC_LINKER 4069 4070 4071# _LT_PATH_TOOL_PREFIX(TOOL) 4072# -------------------------- 4073# find a file program which can recognize shared library 4074AC_DEFUN([_LT_PATH_TOOL_PREFIX], 4075[m4_require([_LT_DECL_EGREP])dnl 4076AC_MSG_CHECKING([for $1]) 4077AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4078[case $MAGIC_CMD in 4079[[\\/*] | ?:[\\/]*]) 4080 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4081 ;; 4082*) 4083 lt_save_MAGIC_CMD="$MAGIC_CMD" 4084 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4085dnl $ac_dummy forces splitting on constant user-supplied paths. 4086dnl POSIX.2 word splitting is done only on the output of word expansions, 4087dnl not every word. This closes a longstanding sh security hole. 4088 ac_dummy="m4_if([$2], , $PATH, [$2])" 4089 for ac_dir in $ac_dummy; do 4090 IFS="$lt_save_ifs" 4091 test -z "$ac_dir" && ac_dir=. 4092 if test -f $ac_dir/$1; then 4093 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4094 if test -n "$file_magic_test_file"; then 4095 case $deplibs_check_method in 4096 "file_magic "*) 4097 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4098 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4099 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4100 $EGREP "$file_magic_regex" > /dev/null; then 4101 : 4102 else 4103 cat <<_LT_EOF 1>&2 4104 4105*** Warning: the command libtool uses to detect shared libraries, 4106*** $file_magic_cmd, produces output that libtool cannot recognize. 4107*** The result is that libtool may fail to recognize shared libraries 4108*** as such. This will affect the creation of libtool libraries that 4109*** depend on shared libraries, but programs linked with such libtool 4110*** libraries will work regardless of this problem. Nevertheless, you 4111*** may want to report the problem to your system manager and/or to 4112*** bug-libtool@gnu.org 4113 4114_LT_EOF 4115 fi ;; 4116 esac 4117 fi 4118 break 4119 fi 4120 done 4121 IFS="$lt_save_ifs" 4122 MAGIC_CMD="$lt_save_MAGIC_CMD" 4123 ;; 4124esac]) 4125MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4126if test -n "$MAGIC_CMD"; then 4127 AC_MSG_RESULT($MAGIC_CMD) 4128else 4129 AC_MSG_RESULT(no) 4130fi 4131_LT_DECL([], [MAGIC_CMD], [0], 4132 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4133])# _LT_PATH_TOOL_PREFIX 4134 4135# Old name: 4136AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4137dnl aclocal-1.4 backwards compatibility: 4138dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4139 4140 4141# _LT_PATH_MAGIC 4142# -------------- 4143# find a file program which can recognize a shared library 4144m4_defun([_LT_PATH_MAGIC], 4145[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4146if test -z "$lt_cv_path_MAGIC_CMD"; then 4147 if test -n "$ac_tool_prefix"; then 4148 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4149 else 4150 MAGIC_CMD=: 4151 fi 4152fi 4153])# _LT_PATH_MAGIC 4154 4155 4156# LT_PATH_LD 4157# ---------- 4158# find the pathname to the GNU or non-GNU linker 4159AC_DEFUN([LT_PATH_LD], 4160[AC_REQUIRE([AC_PROG_CC])dnl 4161AC_REQUIRE([AC_CANONICAL_HOST])dnl 4162AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4163m4_require([_LT_DECL_SED])dnl 4164m4_require([_LT_DECL_EGREP])dnl 4165m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4166 4167AC_ARG_WITH([gnu-ld], 4168 [AS_HELP_STRING([--with-gnu-ld], 4169 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4170 [test "$withval" = no || with_gnu_ld=yes], 4171 [with_gnu_ld=no])dnl 4172 4173ac_prog=ld 4174if test "$GCC" = yes; then 4175 # Check if gcc -print-prog-name=ld gives a path. 4176 AC_MSG_CHECKING([for ld used by $CC]) 4177 case $host in 4178 *-*-mingw*) 4179 # gcc leaves a trailing carriage return which upsets mingw 4180 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4181 *) 4182 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4183 esac 4184 case $ac_prog in 4185 # Accept absolute paths. 4186 [[\\/]]* | ?:[[\\/]]*) 4187 re_direlt='/[[^/]][[^/]]*/\.\./' 4188 # Canonicalize the pathname of ld 4189 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4190 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4191 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4192 done 4193 test -z "$LD" && LD="$ac_prog" 4194 ;; 4195 "") 4196 # If it fails, then pretend we aren't using GCC. 4197 ac_prog=ld 4198 ;; 4199 *) 4200 # If it is relative, then search for the first ld in PATH. 4201 with_gnu_ld=unknown 4202 ;; 4203 esac 4204elif test "$with_gnu_ld" = yes; then 4205 AC_MSG_CHECKING([for GNU ld]) 4206else 4207 AC_MSG_CHECKING([for non-GNU ld]) 4208fi 4209AC_CACHE_VAL(lt_cv_path_LD, 4210[if test -z "$LD"; then 4211 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4212 for ac_dir in $PATH; do 4213 IFS="$lt_save_ifs" 4214 test -z "$ac_dir" && ac_dir=. 4215 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4216 lt_cv_path_LD="$ac_dir/$ac_prog" 4217 # Check to see if the program is GNU ld. I'd rather use --version, 4218 # but apparently some variants of GNU ld only accept -v. 4219 # Break only if it was the GNU/non-GNU ld that we prefer. 4220 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4221 *GNU* | *'with BFD'*) 4222 test "$with_gnu_ld" != no && break 4223 ;; 4224 *) 4225 test "$with_gnu_ld" != yes && break 4226 ;; 4227 esac 4228 fi 4229 done 4230 IFS="$lt_save_ifs" 4231else 4232 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4233fi]) 4234LD="$lt_cv_path_LD" 4235if test -n "$LD"; then 4236 AC_MSG_RESULT($LD) 4237else 4238 AC_MSG_RESULT(no) 4239fi 4240test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4241_LT_PATH_LD_GNU 4242AC_SUBST([LD]) 4243 4244_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4245])# LT_PATH_LD 4246 4247# Old names: 4248AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4249AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4250dnl aclocal-1.4 backwards compatibility: 4251dnl AC_DEFUN([AM_PROG_LD], []) 4252dnl AC_DEFUN([AC_PROG_LD], []) 4253 4254 4255# _LT_PATH_LD_GNU 4256#- -------------- 4257m4_defun([_LT_PATH_LD_GNU], 4258[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4259[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4260case `$LD -v 2>&1 </dev/null` in 4261*GNU* | *'with BFD'*) 4262 lt_cv_prog_gnu_ld=yes 4263 ;; 4264*) 4265 lt_cv_prog_gnu_ld=no 4266 ;; 4267esac]) 4268with_gnu_ld=$lt_cv_prog_gnu_ld 4269])# _LT_PATH_LD_GNU 4270 4271 4272# _LT_CMD_RELOAD 4273# -------------- 4274# find reload flag for linker 4275# -- PORTME Some linkers may need a different reload flag. 4276m4_defun([_LT_CMD_RELOAD], 4277[AC_CACHE_CHECK([for $LD option to reload object files], 4278 lt_cv_ld_reload_flag, 4279 [lt_cv_ld_reload_flag='-r']) 4280reload_flag=$lt_cv_ld_reload_flag 4281case $reload_flag in 4282"" | " "*) ;; 4283*) reload_flag=" $reload_flag" ;; 4284esac 4285reload_cmds='$LD$reload_flag -o $output$reload_objs' 4286case $host_os in 4287 cygwin* | mingw* | pw32* | cegcc*) 4288 if test "$GCC" != yes; then 4289 reload_cmds=false 4290 fi 4291 ;; 4292 darwin*) 4293 if test "$GCC" = yes; then 4294 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4295 else 4296 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4297 fi 4298 ;; 4299esac 4300_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4301_LT_TAGDECL([], [reload_cmds], [2])dnl 4302])# _LT_CMD_RELOAD 4303 4304 4305# _LT_CHECK_MAGIC_METHOD 4306# ---------------------- 4307# how to check for library dependencies 4308# -- PORTME fill in with the dynamic library characteristics 4309m4_defun([_LT_CHECK_MAGIC_METHOD], 4310[m4_require([_LT_DECL_EGREP]) 4311m4_require([_LT_DECL_OBJDUMP]) 4312AC_CACHE_CHECK([how to recognize dependent libraries], 4313lt_cv_deplibs_check_method, 4314[lt_cv_file_magic_cmd='$MAGIC_CMD' 4315lt_cv_file_magic_test_file= 4316lt_cv_deplibs_check_method='unknown' 4317# Need to set the preceding variable on all platforms that support 4318# interlibrary dependencies. 4319# 'none' -- dependencies not supported. 4320# `unknown' -- same as none, but documents that we really don't know. 4321# 'pass_all' -- all dependencies passed with no checks. 4322# 'test_compile' -- check by making test program. 4323# 'file_magic [[regex]]' -- check by looking for files in library path 4324# which responds to the $file_magic_cmd with a given extended regex. 4325# If you have `file' or equivalent on your system and you're not sure 4326# whether `pass_all' will *always* work, you probably want this one. 4327 4328case $host_os in 4329aix[[4-9]]*) 4330 lt_cv_deplibs_check_method=pass_all 4331 ;; 4332 4333beos*) 4334 lt_cv_deplibs_check_method=pass_all 4335 ;; 4336 4337bsdi[[45]]*) 4338 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4339 lt_cv_file_magic_cmd='/usr/bin/file -L' 4340 lt_cv_file_magic_test_file=/shlib/libc.so 4341 ;; 4342 4343cygwin*) 4344 # func_win32_libid is a shell function defined in ltmain.sh 4345 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4346 lt_cv_file_magic_cmd='func_win32_libid' 4347 ;; 4348 4349mingw* | pw32*) 4350 # Base MSYS/MinGW do not provide the 'file' command needed by 4351 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4352 # unless we find 'file', for example because we are cross-compiling. 4353 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4354 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4355 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4356 lt_cv_file_magic_cmd='func_win32_libid' 4357 else 4358 # Keep this pattern in sync with the one in func_win32_libid. 4359 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4360 lt_cv_file_magic_cmd='$OBJDUMP -f' 4361 fi 4362 ;; 4363 4364cegcc*) 4365 # use the weaker test based on 'objdump'. See mingw*. 4366 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4367 lt_cv_file_magic_cmd='$OBJDUMP -f' 4368 ;; 4369 4370darwin* | rhapsody*) 4371 lt_cv_deplibs_check_method=pass_all 4372 ;; 4373 4374freebsd* | dragonfly*) 4375 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4376 case $host_cpu in 4377 i*86 ) 4378 # Not sure whether the presence of OpenBSD here was a mistake. 4379 # Let's accept both of them until this is cleared up. 4380 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4381 lt_cv_file_magic_cmd=/usr/bin/file 4382 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4383 ;; 4384 esac 4385 else 4386 lt_cv_deplibs_check_method=pass_all 4387 fi 4388 ;; 4389 4390gnu*) 4391 lt_cv_deplibs_check_method=pass_all 4392 ;; 4393 4394haiku*) 4395 lt_cv_deplibs_check_method=pass_all 4396 ;; 4397 4398hpux10.20* | hpux11*) 4399 lt_cv_file_magic_cmd=/usr/bin/file 4400 case $host_cpu in 4401 ia64*) 4402 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4403 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4404 ;; 4405 hppa*64*) 4406 [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]'] 4407 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4408 ;; 4409 *) 4410 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4411 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4412 ;; 4413 esac 4414 ;; 4415 4416interix[[3-9]]*) 4417 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4418 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4419 ;; 4420 4421irix5* | irix6* | nonstopux*) 4422 case $LD in 4423 *-32|*"-32 ") libmagic=32-bit;; 4424 *-n32|*"-n32 ") libmagic=N32;; 4425 *-64|*"-64 ") libmagic=64-bit;; 4426 *) libmagic=never-match;; 4427 esac 4428 lt_cv_deplibs_check_method=pass_all 4429 ;; 4430 4431# This must be glibc/ELF. 4432linux* | k*bsd*-gnu | kopensolaris*-gnu) 4433 lt_cv_deplibs_check_method=pass_all 4434 ;; 4435 4436netbsd*) 4437 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4438 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4439 else 4440 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4441 fi 4442 ;; 4443 4444newos6*) 4445 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4446 lt_cv_file_magic_cmd=/usr/bin/file 4447 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4448 ;; 4449 4450*nto* | *qnx*) 4451 lt_cv_deplibs_check_method=pass_all 4452 ;; 4453 4454openbsd*) 4455 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4456 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4457 else 4458 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4459 fi 4460 ;; 4461 4462osf3* | osf4* | osf5*) 4463 lt_cv_deplibs_check_method=pass_all 4464 ;; 4465 4466rdos*) 4467 lt_cv_deplibs_check_method=pass_all 4468 ;; 4469 4470solaris*) 4471 lt_cv_deplibs_check_method=pass_all 4472 ;; 4473 4474sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4475 lt_cv_deplibs_check_method=pass_all 4476 ;; 4477 4478sysv4 | sysv4.3*) 4479 case $host_vendor in 4480 motorola) 4481 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]]' 4482 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4483 ;; 4484 ncr) 4485 lt_cv_deplibs_check_method=pass_all 4486 ;; 4487 sequent) 4488 lt_cv_file_magic_cmd='/bin/file' 4489 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4490 ;; 4491 sni) 4492 lt_cv_file_magic_cmd='/bin/file' 4493 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4494 lt_cv_file_magic_test_file=/lib/libc.so 4495 ;; 4496 siemens) 4497 lt_cv_deplibs_check_method=pass_all 4498 ;; 4499 pc) 4500 lt_cv_deplibs_check_method=pass_all 4501 ;; 4502 esac 4503 ;; 4504 4505tpf*) 4506 lt_cv_deplibs_check_method=pass_all 4507 ;; 4508esac 4509]) 4510 4511file_magic_glob= 4512want_nocaseglob=no 4513if test "$build" = "$host"; then 4514 case $host_os in 4515 mingw* | pw32*) 4516 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4517 want_nocaseglob=yes 4518 else 4519 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4520 fi 4521 ;; 4522 esac 4523fi 4524 4525file_magic_cmd=$lt_cv_file_magic_cmd 4526deplibs_check_method=$lt_cv_deplibs_check_method 4527test -z "$deplibs_check_method" && deplibs_check_method=unknown 4528 4529_LT_DECL([], [deplibs_check_method], [1], 4530 [Method to check whether dependent libraries are shared objects]) 4531_LT_DECL([], [file_magic_cmd], [1], 4532 [Command to use when deplibs_check_method = "file_magic"]) 4533_LT_DECL([], [file_magic_glob], [1], 4534 [How to find potential files when deplibs_check_method = "file_magic"]) 4535_LT_DECL([], [want_nocaseglob], [1], 4536 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4537])# _LT_CHECK_MAGIC_METHOD 4538 4539 4540# LT_PATH_NM 4541# ---------- 4542# find the pathname to a BSD- or MS-compatible name lister 4543AC_DEFUN([LT_PATH_NM], 4544[AC_REQUIRE([AC_PROG_CC])dnl 4545AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4546[if test -n "$NM"; then 4547 # Let the user override the test. 4548 lt_cv_path_NM="$NM" 4549else 4550 lt_nm_to_check="${ac_tool_prefix}nm" 4551 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4552 lt_nm_to_check="$lt_nm_to_check nm" 4553 fi 4554 for lt_tmp_nm in $lt_nm_to_check; do 4555 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4556 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4557 IFS="$lt_save_ifs" 4558 test -z "$ac_dir" && ac_dir=. 4559 tmp_nm="$ac_dir/$lt_tmp_nm" 4560 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4561 # Check to see if the nm accepts a BSD-compat flag. 4562 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4563 # nm: unknown option "B" ignored 4564 # Tru64's nm complains that /dev/null is an invalid object file 4565 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4566 */dev/null* | *'Invalid file or object type'*) 4567 lt_cv_path_NM="$tmp_nm -B" 4568 break 4569 ;; 4570 *) 4571 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4572 */dev/null*) 4573 lt_cv_path_NM="$tmp_nm -p" 4574 break 4575 ;; 4576 *) 4577 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4578 continue # so that we can try to find one that supports BSD flags 4579 ;; 4580 esac 4581 ;; 4582 esac 4583 fi 4584 done 4585 IFS="$lt_save_ifs" 4586 done 4587 : ${lt_cv_path_NM=no} 4588fi]) 4589if test "$lt_cv_path_NM" != "no"; then 4590 NM="$lt_cv_path_NM" 4591else 4592 # Didn't find any BSD compatible name lister, look for dumpbin. 4593 if test -n "$DUMPBIN"; then : 4594 # Let the user override the test. 4595 else 4596 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4597 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4598 *COFF*) 4599 DUMPBIN="$DUMPBIN -symbols" 4600 ;; 4601 *) 4602 DUMPBIN=: 4603 ;; 4604 esac 4605 fi 4606 AC_SUBST([DUMPBIN]) 4607 if test "$DUMPBIN" != ":"; then 4608 NM="$DUMPBIN" 4609 fi 4610fi 4611test -z "$NM" && NM=nm 4612AC_SUBST([NM]) 4613_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4614 4615AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4616 [lt_cv_nm_interface="BSD nm" 4617 echo "int some_variable = 0;" > conftest.$ac_ext 4618 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4619 (eval "$ac_compile" 2>conftest.err) 4620 cat conftest.err >&AS_MESSAGE_LOG_FD 4621 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4622 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4623 cat conftest.err >&AS_MESSAGE_LOG_FD 4624 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4625 cat conftest.out >&AS_MESSAGE_LOG_FD 4626 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4627 lt_cv_nm_interface="MS dumpbin" 4628 fi 4629 rm -f conftest*]) 4630])# LT_PATH_NM 4631 4632# Old names: 4633AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4634AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4635dnl aclocal-1.4 backwards compatibility: 4636dnl AC_DEFUN([AM_PROG_NM], []) 4637dnl AC_DEFUN([AC_PROG_NM], []) 4638 4639# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4640# -------------------------------- 4641# how to determine the name of the shared library 4642# associated with a specific link library. 4643# -- PORTME fill in with the dynamic library characteristics 4644m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4645[m4_require([_LT_DECL_EGREP]) 4646m4_require([_LT_DECL_OBJDUMP]) 4647m4_require([_LT_DECL_DLLTOOL]) 4648AC_CACHE_CHECK([how to associate runtime and link libraries], 4649lt_cv_sharedlib_from_linklib_cmd, 4650[lt_cv_sharedlib_from_linklib_cmd='unknown' 4651 4652case $host_os in 4653cygwin* | mingw* | pw32* | cegcc*) 4654 # two different shell functions defined in ltmain.sh 4655 # decide which to use based on capabilities of $DLLTOOL 4656 case `$DLLTOOL --help 2>&1` in 4657 *--identify-strict*) 4658 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4659 ;; 4660 *) 4661 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4662 ;; 4663 esac 4664 ;; 4665*) 4666 # fallback: assume linklib IS sharedlib 4667 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4668 ;; 4669esac 4670]) 4671sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4672test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4673 4674_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4675 [Command to associate shared and link libraries]) 4676])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4677 4678 4679# _LT_PATH_MANIFEST_TOOL 4680# ---------------------- 4681# locate the manifest tool 4682m4_defun([_LT_PATH_MANIFEST_TOOL], 4683[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4684test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4685AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4686 [lt_cv_path_mainfest_tool=no 4687 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4688 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4689 cat conftest.err >&AS_MESSAGE_LOG_FD 4690 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4691 lt_cv_path_mainfest_tool=yes 4692 fi 4693 rm -f conftest*]) 4694if test "x$lt_cv_path_mainfest_tool" != xyes; then 4695 MANIFEST_TOOL=: 4696fi 4697_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4698])# _LT_PATH_MANIFEST_TOOL 4699 4700 4701# LT_LIB_M 4702# -------- 4703# check for math library 4704AC_DEFUN([LT_LIB_M], 4705[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4706LIBM= 4707case $host in 4708*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4709 # These system don't have libm, or don't need it 4710 ;; 4711*-ncr-sysv4.3*) 4712 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4713 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4714 ;; 4715*) 4716 AC_CHECK_LIB(m, cos, LIBM="-lm") 4717 ;; 4718esac 4719AC_SUBST([LIBM]) 4720])# LT_LIB_M 4721 4722# Old name: 4723AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4724dnl aclocal-1.4 backwards compatibility: 4725dnl AC_DEFUN([AC_CHECK_LIBM], []) 4726 4727 4728# _LT_COMPILER_NO_RTTI([TAGNAME]) 4729# ------------------------------- 4730m4_defun([_LT_COMPILER_NO_RTTI], 4731[m4_require([_LT_TAG_COMPILER])dnl 4732 4733_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4734 4735if test "$GCC" = yes; then 4736 case $cc_basename in 4737 nvcc*) 4738 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4739 *) 4740 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4741 esac 4742 4743 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4744 lt_cv_prog_compiler_rtti_exceptions, 4745 [-fno-rtti -fno-exceptions], [], 4746 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4747fi 4748_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4749 [Compiler flag to turn off builtin functions]) 4750])# _LT_COMPILER_NO_RTTI 4751 4752 4753# _LT_CMD_GLOBAL_SYMBOLS 4754# ---------------------- 4755m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4756[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4757AC_REQUIRE([AC_PROG_CC])dnl 4758AC_REQUIRE([AC_PROG_AWK])dnl 4759AC_REQUIRE([LT_PATH_NM])dnl 4760AC_REQUIRE([LT_PATH_LD])dnl 4761m4_require([_LT_DECL_SED])dnl 4762m4_require([_LT_DECL_EGREP])dnl 4763m4_require([_LT_TAG_COMPILER])dnl 4764 4765# Check for command to grab the raw symbol name followed by C symbol from nm. 4766AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4767AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4768[ 4769# These are sane defaults that work on at least a few old systems. 4770# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4771 4772# Character class describing NM global symbol codes. 4773symcode='[[BCDEGRST]]' 4774 4775# Regexp to match symbols that can be accessed directly from C. 4776sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4777 4778# Define system-specific variables. 4779case $host_os in 4780aix*) 4781 symcode='[[BCDT]]' 4782 ;; 4783cygwin* | mingw* | pw32* | cegcc*) 4784 symcode='[[ABCDGISTW]]' 4785 ;; 4786hpux*) 4787 if test "$host_cpu" = ia64; then 4788 symcode='[[ABCDEGRST]]' 4789 fi 4790 ;; 4791irix* | nonstopux*) 4792 symcode='[[BCDEGRST]]' 4793 ;; 4794osf*) 4795 symcode='[[BCDEGQRST]]' 4796 ;; 4797solaris*) 4798 symcode='[[BDRT]]' 4799 ;; 4800sco3.2v5*) 4801 symcode='[[DT]]' 4802 ;; 4803sysv4.2uw2*) 4804 symcode='[[DT]]' 4805 ;; 4806sysv5* | sco5v6* | unixware* | OpenUNIX*) 4807 symcode='[[ABDT]]' 4808 ;; 4809sysv4) 4810 symcode='[[DFNSTU]]' 4811 ;; 4812esac 4813 4814# If we're using GNU nm, then use its standard symbol codes. 4815case `$NM -V 2>&1` in 4816*GNU* | *'with BFD'*) 4817 symcode='[[ABCDGIRSTW]]' ;; 4818esac 4819 4820# Transform an extracted symbol line into a proper C declaration. 4821# Some systems (esp. on ia64) link data and code symbols differently, 4822# so use this general approach. 4823lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4824 4825# Transform an extracted symbol line into symbol name and symbol address 4826lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4827lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 4828 4829# Handle CRLF in mingw tool chain 4830opt_cr= 4831case $build_os in 4832mingw*) 4833 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4834 ;; 4835esac 4836 4837# Try without a prefix underscore, then with it. 4838for ac_symprfx in "" "_"; do 4839 4840 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4841 symxfrm="\\1 $ac_symprfx\\2 \\2" 4842 4843 # Write the raw and C identifiers. 4844 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4845 # Fake it for dumpbin and say T for any non-static function 4846 # and D for any global variable. 4847 # Also find C++ and __fastcall symbols from MSVC++, 4848 # which start with @ or ?. 4849 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4850" {last_section=section; section=\$ 3};"\ 4851" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4852" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4853" \$ 0!~/External *\|/{next};"\ 4854" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4855" {if(hide[section]) next};"\ 4856" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4857" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4858" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4859" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4860" ' prfx=^$ac_symprfx]" 4861 else 4862 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4863 fi 4864 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4865 4866 # Check to see that the pipe works correctly. 4867 pipe_works=no 4868 4869 rm -f conftest* 4870 cat > conftest.$ac_ext <<_LT_EOF 4871#ifdef __cplusplus 4872extern "C" { 4873#endif 4874char nm_test_var; 4875void nm_test_func(void); 4876void nm_test_func(void){} 4877#ifdef __cplusplus 4878} 4879#endif 4880int main(){nm_test_var='a';nm_test_func();return(0);} 4881_LT_EOF 4882 4883 if AC_TRY_EVAL(ac_compile); then 4884 # Now try to grab the symbols. 4885 nlist=conftest.nm 4886 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4887 # Try sorting and uniquifying the output. 4888 if sort "$nlist" | uniq > "$nlist"T; then 4889 mv -f "$nlist"T "$nlist" 4890 else 4891 rm -f "$nlist"T 4892 fi 4893 4894 # Make sure that we snagged all the symbols we need. 4895 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4896 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4897 cat <<_LT_EOF > conftest.$ac_ext 4898/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4899#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4900/* DATA imports from DLLs on WIN32 con't be const, because runtime 4901 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4902# define LT@&t@_DLSYM_CONST 4903#elif defined(__osf__) 4904/* This system does not cope well with relocations in const data. */ 4905# define LT@&t@_DLSYM_CONST 4906#else 4907# define LT@&t@_DLSYM_CONST const 4908#endif 4909 4910#ifdef __cplusplus 4911extern "C" { 4912#endif 4913 4914_LT_EOF 4915 # Now generate the symbol file. 4916 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4917 4918 cat <<_LT_EOF >> conftest.$ac_ext 4919 4920/* The mapping between symbol names and symbols. */ 4921LT@&t@_DLSYM_CONST struct { 4922 const char *name; 4923 void *address; 4924} 4925lt__PROGRAM__LTX_preloaded_symbols[[]] = 4926{ 4927 { "@PROGRAM@", (void *) 0 }, 4928_LT_EOF 4929 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4930 cat <<\_LT_EOF >> conftest.$ac_ext 4931 {0, (void *) 0} 4932}; 4933 4934/* This works around a problem in FreeBSD linker */ 4935#ifdef FREEBSD_WORKAROUND 4936static const void *lt_preloaded_setup() { 4937 return lt__PROGRAM__LTX_preloaded_symbols; 4938} 4939#endif 4940 4941#ifdef __cplusplus 4942} 4943#endif 4944_LT_EOF 4945 # Now try linking the two files. 4946 mv conftest.$ac_objext conftstm.$ac_objext 4947 lt_globsym_save_LIBS=$LIBS 4948 lt_globsym_save_CFLAGS=$CFLAGS 4949 LIBS="conftstm.$ac_objext" 4950 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4951 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4952 pipe_works=yes 4953 fi 4954 LIBS=$lt_globsym_save_LIBS 4955 CFLAGS=$lt_globsym_save_CFLAGS 4956 else 4957 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4958 fi 4959 else 4960 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4961 fi 4962 else 4963 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4964 fi 4965 else 4966 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4967 cat conftest.$ac_ext >&5 4968 fi 4969 rm -rf conftest* conftst* 4970 4971 # Do not use the global_symbol_pipe unless it works. 4972 if test "$pipe_works" = yes; then 4973 break 4974 else 4975 lt_cv_sys_global_symbol_pipe= 4976 fi 4977done 4978]) 4979if test -z "$lt_cv_sys_global_symbol_pipe"; then 4980 lt_cv_sys_global_symbol_to_cdecl= 4981fi 4982if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4983 AC_MSG_RESULT(failed) 4984else 4985 AC_MSG_RESULT(ok) 4986fi 4987 4988# Response file support. 4989if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4990 nm_file_list_spec='@' 4991elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4992 nm_file_list_spec='@' 4993fi 4994 4995_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4996 [Take the output of nm and produce a listing of raw symbols and C names]) 4997_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4998 [Transform the output of nm in a proper C declaration]) 4999_LT_DECL([global_symbol_to_c_name_address], 5000 [lt_cv_sys_global_symbol_to_c_name_address], [1], 5001 [Transform the output of nm in a C name address pair]) 5002_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5003 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5004 [Transform the output of nm in a C name address pair when lib prefix is needed]) 5005_LT_DECL([], [nm_file_list_spec], [1], 5006 [Specify filename containing input files for $NM]) 5007]) # _LT_CMD_GLOBAL_SYMBOLS 5008 5009 5010# _LT_COMPILER_PIC([TAGNAME]) 5011# --------------------------- 5012m4_defun([_LT_COMPILER_PIC], 5013[m4_require([_LT_TAG_COMPILER])dnl 5014_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5015_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5016_LT_TAGVAR(lt_prog_compiler_static, $1)= 5017 5018m4_if([$1], [CXX], [ 5019 # C++ specific cases for pic, static, wl, etc. 5020 if test "$GXX" = yes; then 5021 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5022 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5023 5024 case $host_os in 5025 aix*) 5026 # All AIX code is PIC. 5027 if test "$host_cpu" = ia64; then 5028 # AIX 5 now supports IA64 processor 5029 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5030 fi 5031 ;; 5032 5033 amigaos*) 5034 case $host_cpu in 5035 powerpc) 5036 # see comment about AmigaOS4 .so support 5037 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5038 ;; 5039 m68k) 5040 # FIXME: we need at least 68020 code to build shared libraries, but 5041 # adding the `-m68020' flag to GCC prevents building anything better, 5042 # like `-m68040'. 5043 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5044 ;; 5045 esac 5046 ;; 5047 5048 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5049 # PIC is the default for these OSes. 5050 ;; 5051 mingw* | cygwin* | os2* | pw32* | cegcc*) 5052 # This hack is so that the source file can tell whether it is being 5053 # built for inclusion in a dll (and should export symbols for example). 5054 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5055 # (--disable-auto-import) libraries 5056 m4_if([$1], [GCJ], [], 5057 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5058 ;; 5059 darwin* | rhapsody*) 5060 # PIC is the default on this platform 5061 # Common symbols not allowed in MH_DYLIB files 5062 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5063 ;; 5064 *djgpp*) 5065 # DJGPP does not support shared libraries at all 5066 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5067 ;; 5068 haiku*) 5069 # PIC is the default for Haiku. 5070 # The "-static" flag exists, but is broken. 5071 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5072 ;; 5073 interix[[3-9]]*) 5074 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5075 # Instead, we relocate shared libraries at runtime. 5076 ;; 5077 sysv4*MP*) 5078 if test -d /usr/nec; then 5079 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5080 fi 5081 ;; 5082 hpux*) 5083 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5084 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5085 # sets the default TLS model and affects inlining. 5086 case $host_cpu in 5087 hppa*64*) 5088 ;; 5089 *) 5090 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5091 ;; 5092 esac 5093 ;; 5094 *qnx* | *nto*) 5095 # QNX uses GNU C++, but need to define -shared option too, otherwise 5096 # it will coredump. 5097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5098 ;; 5099 *) 5100 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5101 ;; 5102 esac 5103 else 5104 case $host_os in 5105 aix[[4-9]]*) 5106 # All AIX code is PIC. 5107 if test "$host_cpu" = ia64; then 5108 # AIX 5 now supports IA64 processor 5109 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5110 else 5111 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5112 fi 5113 ;; 5114 chorus*) 5115 case $cc_basename in 5116 cxch68*) 5117 # Green Hills C++ Compiler 5118 # _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" 5119 ;; 5120 esac 5121 ;; 5122 mingw* | cygwin* | os2* | pw32* | cegcc*) 5123 # This hack is so that the source file can tell whether it is being 5124 # built for inclusion in a dll (and should export symbols for example). 5125 m4_if([$1], [GCJ], [], 5126 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5127 ;; 5128 dgux*) 5129 case $cc_basename in 5130 ec++*) 5131 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5132 ;; 5133 ghcx*) 5134 # Green Hills C++ Compiler 5135 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5136 ;; 5137 *) 5138 ;; 5139 esac 5140 ;; 5141 freebsd* | dragonfly*) 5142 # FreeBSD uses GNU C++ 5143 ;; 5144 hpux9* | hpux10* | hpux11*) 5145 case $cc_basename in 5146 CC*) 5147 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5148 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5149 if test "$host_cpu" != ia64; then 5150 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5151 fi 5152 ;; 5153 aCC*) 5154 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5155 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5156 case $host_cpu in 5157 hppa*64*|ia64*) 5158 # +Z the default 5159 ;; 5160 *) 5161 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5162 ;; 5163 esac 5164 ;; 5165 *) 5166 ;; 5167 esac 5168 ;; 5169 interix*) 5170 # This is c89, which is MS Visual C++ (no shared libs) 5171 # Anyone wants to do a port? 5172 ;; 5173 irix5* | irix6* | nonstopux*) 5174 case $cc_basename in 5175 CC*) 5176 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5177 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5178 # CC pic flag -KPIC is the default. 5179 ;; 5180 *) 5181 ;; 5182 esac 5183 ;; 5184 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5185 case $cc_basename in 5186 KCC*) 5187 # KAI C++ Compiler 5188 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5190 ;; 5191 ecpc* ) 5192 # old Intel C++ for x86_64 which still supported -KPIC. 5193 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5194 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5195 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5196 ;; 5197 icpc* ) 5198 # Intel C++, used to be incompatible with GCC. 5199 # ICC 10 doesn't accept -KPIC any more. 5200 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5201 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5202 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5203 ;; 5204 pgCC* | pgcpp*) 5205 # Portland Group C++ compiler 5206 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5208 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5209 ;; 5210 cxx*) 5211 # Compaq C++ 5212 # Make sure the PIC flag is empty. It appears that all Alpha 5213 # Linux and Compaq Tru64 Unix objects are PIC. 5214 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5215 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5216 ;; 5217 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5218 # IBM XL 8.0, 9.0 on PPC and BlueGene 5219 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5220 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5221 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5222 ;; 5223 *) 5224 case `$CC -V 2>&1 | sed 5q` in 5225 *Sun\ C*) 5226 # Sun C++ 5.9 5227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5228 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5229 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5230 ;; 5231 esac 5232 ;; 5233 esac 5234 ;; 5235 lynxos*) 5236 ;; 5237 m88k*) 5238 ;; 5239 mvs*) 5240 case $cc_basename in 5241 cxx*) 5242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5243 ;; 5244 *) 5245 ;; 5246 esac 5247 ;; 5248 netbsd*) 5249 ;; 5250 *qnx* | *nto*) 5251 # QNX uses GNU C++, but need to define -shared option too, otherwise 5252 # it will coredump. 5253 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5254 ;; 5255 osf3* | osf4* | osf5*) 5256 case $cc_basename in 5257 KCC*) 5258 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5259 ;; 5260 RCC*) 5261 # Rational C++ 2.4.1 5262 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5263 ;; 5264 cxx*) 5265 # Digital/Compaq C++ 5266 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5267 # Make sure the PIC flag is empty. It appears that all Alpha 5268 # Linux and Compaq Tru64 Unix objects are PIC. 5269 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5270 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5271 ;; 5272 *) 5273 ;; 5274 esac 5275 ;; 5276 psos*) 5277 ;; 5278 solaris*) 5279 case $cc_basename in 5280 CC* | sunCC*) 5281 # Sun C++ 4.2, 5.x and Centerline C++ 5282 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5283 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5284 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5285 ;; 5286 gcx*) 5287 # Green Hills C++ Compiler 5288 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5289 ;; 5290 *) 5291 ;; 5292 esac 5293 ;; 5294 sunos4*) 5295 case $cc_basename in 5296 CC*) 5297 # Sun C++ 4.x 5298 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5300 ;; 5301 lcc*) 5302 # Lucid 5303 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5304 ;; 5305 *) 5306 ;; 5307 esac 5308 ;; 5309 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5310 case $cc_basename in 5311 CC*) 5312 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5313 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5314 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5315 ;; 5316 esac 5317 ;; 5318 tandem*) 5319 case $cc_basename in 5320 NCC*) 5321 # NonStop-UX NCC 3.20 5322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5323 ;; 5324 *) 5325 ;; 5326 esac 5327 ;; 5328 vxworks*) 5329 ;; 5330 *) 5331 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5332 ;; 5333 esac 5334 fi 5335], 5336[ 5337 if test "$GCC" = yes; then 5338 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5339 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5340 5341 case $host_os in 5342 aix*) 5343 # All AIX code is PIC. 5344 if test "$host_cpu" = ia64; then 5345 # AIX 5 now supports IA64 processor 5346 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5347 fi 5348 ;; 5349 5350 amigaos*) 5351 case $host_cpu in 5352 powerpc) 5353 # see comment about AmigaOS4 .so support 5354 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5355 ;; 5356 m68k) 5357 # FIXME: we need at least 68020 code to build shared libraries, but 5358 # adding the `-m68020' flag to GCC prevents building anything better, 5359 # like `-m68040'. 5360 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5361 ;; 5362 esac 5363 ;; 5364 5365 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5366 # PIC is the default for these OSes. 5367 ;; 5368 5369 mingw* | cygwin* | pw32* | os2* | cegcc*) 5370 # This hack is so that the source file can tell whether it is being 5371 # built for inclusion in a dll (and should export symbols for example). 5372 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5373 # (--disable-auto-import) libraries 5374 m4_if([$1], [GCJ], [], 5375 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5376 ;; 5377 5378 darwin* | rhapsody*) 5379 # PIC is the default on this platform 5380 # Common symbols not allowed in MH_DYLIB files 5381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5382 ;; 5383 5384 haiku*) 5385 # PIC is the default for Haiku. 5386 # The "-static" flag exists, but is broken. 5387 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5388 ;; 5389 5390 hpux*) 5391 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5392 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5393 # sets the default TLS model and affects inlining. 5394 case $host_cpu in 5395 hppa*64*) 5396 # +Z the default 5397 ;; 5398 *) 5399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5400 ;; 5401 esac 5402 ;; 5403 5404 interix[[3-9]]*) 5405 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5406 # Instead, we relocate shared libraries at runtime. 5407 ;; 5408 5409 msdosdjgpp*) 5410 # Just because we use GCC doesn't mean we suddenly get shared libraries 5411 # on systems that don't support them. 5412 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5413 enable_shared=no 5414 ;; 5415 5416 *nto* | *qnx*) 5417 # QNX uses GNU C++, but need to define -shared option too, otherwise 5418 # it will coredump. 5419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5420 ;; 5421 5422 sysv4*MP*) 5423 if test -d /usr/nec; then 5424 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5425 fi 5426 ;; 5427 5428 *) 5429 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5430 ;; 5431 esac 5432 5433 case $cc_basename in 5434 nvcc*) # Cuda Compiler Driver 2.2 5435 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5436 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5437 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5438 fi 5439 ;; 5440 esac 5441 else 5442 # PORTME Check for flag to pass linker flags through the system compiler. 5443 case $host_os in 5444 aix*) 5445 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5446 if test "$host_cpu" = ia64; then 5447 # AIX 5 now supports IA64 processor 5448 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449 else 5450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5451 fi 5452 ;; 5453 5454 mingw* | cygwin* | pw32* | os2* | cegcc*) 5455 # This hack is so that the source file can tell whether it is being 5456 # built for inclusion in a dll (and should export symbols for example). 5457 m4_if([$1], [GCJ], [], 5458 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5459 ;; 5460 5461 hpux9* | hpux10* | hpux11*) 5462 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5463 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5464 # not for PA HP-UX. 5465 case $host_cpu in 5466 hppa*64*|ia64*) 5467 # +Z the default 5468 ;; 5469 *) 5470 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5471 ;; 5472 esac 5473 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5474 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5475 ;; 5476 5477 irix5* | irix6* | nonstopux*) 5478 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5479 # PIC (with -KPIC) is the default. 5480 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5481 ;; 5482 5483 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5484 case $cc_basename in 5485 # old Intel for x86_64 which still supported -KPIC. 5486 ecc*) 5487 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5490 ;; 5491 # icc used to be incompatible with GCC. 5492 # ICC 10 doesn't accept -KPIC any more. 5493 icc* | ifort*) 5494 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5495 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5496 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5497 ;; 5498 # Lahey Fortran 8.1. 5499 lf95*) 5500 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5501 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5502 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5503 ;; 5504 nagfor*) 5505 # NAG Fortran compiler 5506 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5507 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5508 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5509 ;; 5510 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5511 # Portland Group compilers (*not* the Pentium gcc compiler, 5512 # which looks to be a dead project) 5513 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5515 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516 ;; 5517 ccc*) 5518 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5519 # All Alpha code is PIC. 5520 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5521 ;; 5522 xl* | bgxl* | bgf* | mpixl*) 5523 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5524 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5525 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5526 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5527 ;; 5528 *) 5529 case `$CC -V 2>&1 | sed 5q` in 5530 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5531 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5532 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5533 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5534 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5535 ;; 5536 *Sun\ F* | *Sun*Fortran*) 5537 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5538 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5539 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5540 ;; 5541 *Sun\ C*) 5542 # Sun C 5.9 5543 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5544 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5545 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5546 ;; 5547 *Intel*\ [[CF]]*Compiler*) 5548 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5549 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5550 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5551 ;; 5552 *Portland\ Group*) 5553 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5555 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5556 ;; 5557 esac 5558 ;; 5559 esac 5560 ;; 5561 5562 newsos6) 5563 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5564 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5565 ;; 5566 5567 *nto* | *qnx*) 5568 # QNX uses GNU C++, but need to define -shared option too, otherwise 5569 # it will coredump. 5570 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5571 ;; 5572 5573 osf3* | osf4* | osf5*) 5574 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5575 # All OSF/1 code is PIC. 5576 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5577 ;; 5578 5579 rdos*) 5580 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5581 ;; 5582 5583 solaris*) 5584 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5585 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5586 case $cc_basename in 5587 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5588 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5589 *) 5590 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5591 esac 5592 ;; 5593 5594 sunos4*) 5595 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5596 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5597 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5598 ;; 5599 5600 sysv4 | sysv4.2uw2* | sysv4.3*) 5601 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5602 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5603 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5604 ;; 5605 5606 sysv4*MP*) 5607 if test -d /usr/nec ;then 5608 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5609 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5610 fi 5611 ;; 5612 5613 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5614 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5616 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5617 ;; 5618 5619 unicos*) 5620 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5621 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5622 ;; 5623 5624 uts4*) 5625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5626 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5627 ;; 5628 5629 *) 5630 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5631 ;; 5632 esac 5633 fi 5634]) 5635case $host_os in 5636 # For platforms which do not support PIC, -DPIC is meaningless: 5637 *djgpp*) 5638 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5639 ;; 5640 *) 5641 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5642 ;; 5643esac 5644 5645AC_CACHE_CHECK([for $compiler option to produce PIC], 5646 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5647 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5648_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5649 5650# 5651# Check to make sure the PIC flag actually works. 5652# 5653if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5654 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5655 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5656 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5657 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5658 "" | " "*) ;; 5659 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5660 esac], 5661 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5662 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5663fi 5664_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5665 [Additional compiler flags for building library objects]) 5666 5667_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5668 [How to pass a linker flag through the compiler]) 5669# 5670# Check to make sure the static flag actually works. 5671# 5672wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5673_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5674 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5675 $lt_tmp_static_flag, 5676 [], 5677 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5678_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5679 [Compiler flag to prevent dynamic linking]) 5680])# _LT_COMPILER_PIC 5681 5682 5683# _LT_LINKER_SHLIBS([TAGNAME]) 5684# ---------------------------- 5685# See if the linker supports building shared libraries. 5686m4_defun([_LT_LINKER_SHLIBS], 5687[AC_REQUIRE([LT_PATH_LD])dnl 5688AC_REQUIRE([LT_PATH_NM])dnl 5689m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5690m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5691m4_require([_LT_DECL_EGREP])dnl 5692m4_require([_LT_DECL_SED])dnl 5693m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5694m4_require([_LT_TAG_COMPILER])dnl 5695AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5696m4_if([$1], [CXX], [ 5697 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5698 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5699 case $host_os in 5700 aix[[4-9]]*) 5701 # If we're using GNU nm, then we don't want the "-C" option. 5702 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5703 # Also, AIX nm treats weak defined symbols like other global defined 5704 # symbols, whereas GNU nm marks them as "W". 5705 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5706 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 5707 else 5708 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 5709 fi 5710 ;; 5711 pw32*) 5712 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5713 ;; 5714 cygwin* | mingw* | cegcc*) 5715 case $cc_basename in 5716 cl*) 5717 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5718 ;; 5719 *) 5720 _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' 5721 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5722 ;; 5723 esac 5724 ;; 5725 *) 5726 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5727 ;; 5728 esac 5729], [ 5730 runpath_var= 5731 _LT_TAGVAR(allow_undefined_flag, $1)= 5732 _LT_TAGVAR(always_export_symbols, $1)=no 5733 _LT_TAGVAR(archive_cmds, $1)= 5734 _LT_TAGVAR(archive_expsym_cmds, $1)= 5735 _LT_TAGVAR(compiler_needs_object, $1)=no 5736 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5737 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5738 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5739 _LT_TAGVAR(hardcode_automatic, $1)=no 5740 _LT_TAGVAR(hardcode_direct, $1)=no 5741 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5742 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5743 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5744 _LT_TAGVAR(hardcode_minus_L, $1)=no 5745 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5746 _LT_TAGVAR(inherit_rpath, $1)=no 5747 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5748 _LT_TAGVAR(module_cmds, $1)= 5749 _LT_TAGVAR(module_expsym_cmds, $1)= 5750 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5751 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5752 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5753 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5754 # include_expsyms should be a list of space-separated symbols to be *always* 5755 # included in the symbol list 5756 _LT_TAGVAR(include_expsyms, $1)= 5757 # exclude_expsyms can be an extended regexp of symbols to exclude 5758 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5759 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5760 # as well as any symbol that contains `d'. 5761 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5762 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5763 # platforms (ab)use it in PIC code, but their linkers get confused if 5764 # the symbol is explicitly referenced. Since portable code cannot 5765 # rely on this symbol name, it's probably fine to never include it in 5766 # preloaded symbol tables. 5767 # Exclude shared library initialization/finalization symbols. 5768dnl Note also adjust exclude_expsyms for C++ above. 5769 extract_expsyms_cmds= 5770 5771 case $host_os in 5772 cygwin* | mingw* | pw32* | cegcc*) 5773 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5774 # When not using gcc, we currently assume that we are using 5775 # Microsoft Visual C++. 5776 if test "$GCC" != yes; then 5777 with_gnu_ld=no 5778 fi 5779 ;; 5780 interix*) 5781 # we just hope/assume this is gcc and not c89 (= MSVC++) 5782 with_gnu_ld=yes 5783 ;; 5784 openbsd*) 5785 with_gnu_ld=no 5786 ;; 5787 esac 5788 5789 _LT_TAGVAR(ld_shlibs, $1)=yes 5790 5791 # On some targets, GNU ld is compatible enough with the native linker 5792 # that we're better off using the native interface for both. 5793 lt_use_gnu_ld_interface=no 5794 if test "$with_gnu_ld" = yes; then 5795 case $host_os in 5796 aix*) 5797 # The AIX port of GNU ld has always aspired to compatibility 5798 # with the native linker. However, as the warning in the GNU ld 5799 # block says, versions before 2.19.5* couldn't really create working 5800 # shared libraries, regardless of the interface used. 5801 case `$LD -v 2>&1` in 5802 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5803 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5804 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5805 *) 5806 lt_use_gnu_ld_interface=yes 5807 ;; 5808 esac 5809 ;; 5810 *) 5811 lt_use_gnu_ld_interface=yes 5812 ;; 5813 esac 5814 fi 5815 5816 if test "$lt_use_gnu_ld_interface" = yes; then 5817 # If archive_cmds runs LD, not CC, wlarc should be empty 5818 wlarc='${wl}' 5819 5820 # Set some defaults for GNU ld with shared library support. These 5821 # are reset later if shared libraries are not supported. Putting them 5822 # here allows them to be overridden if necessary. 5823 runpath_var=LD_RUN_PATH 5824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5825 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5826 # ancient GNU ld didn't support --whole-archive et. al. 5827 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5828 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5829 else 5830 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5831 fi 5832 supports_anon_versioning=no 5833 case `$LD -v 2>&1` in 5834 *GNU\ gold*) supports_anon_versioning=yes ;; 5835 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5836 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5837 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5838 *\ 2.11.*) ;; # other 2.11 versions 5839 *) supports_anon_versioning=yes ;; 5840 esac 5841 5842 # See if GNU ld supports shared libraries. 5843 case $host_os in 5844 aix[[3-9]]*) 5845 # On AIX/PPC, the GNU linker is very broken 5846 if test "$host_cpu" != ia64; then 5847 _LT_TAGVAR(ld_shlibs, $1)=no 5848 cat <<_LT_EOF 1>&2 5849 5850*** Warning: the GNU linker, at least up to release 2.19, is reported 5851*** to be unable to reliably create shared libraries on AIX. 5852*** Therefore, libtool is disabling shared libraries support. If you 5853*** really care for shared libraries, you may want to install binutils 5854*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5855*** You will then need to restart the configuration process. 5856 5857_LT_EOF 5858 fi 5859 ;; 5860 5861 amigaos*) 5862 case $host_cpu in 5863 powerpc) 5864 # see comment about AmigaOS4 .so support 5865 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5866 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5867 ;; 5868 m68k) 5869 _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)' 5870 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5871 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5872 ;; 5873 esac 5874 ;; 5875 5876 beos*) 5877 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5878 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5879 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5880 # support --undefined. This deserves some investigation. FIXME 5881 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5882 else 5883 _LT_TAGVAR(ld_shlibs, $1)=no 5884 fi 5885 ;; 5886 5887 cygwin* | mingw* | pw32* | cegcc*) 5888 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5889 # as there is no search path for DLLs. 5890 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5891 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5892 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5893 _LT_TAGVAR(always_export_symbols, $1)=no 5894 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5895 _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' 5896 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5897 5898 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5899 _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' 5900 # If the export-symbols file already is a .def file (1st line 5901 # is EXPORTS), use it as is; otherwise, prepend... 5902 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5903 cp $export_symbols $output_objdir/$soname.def; 5904 else 5905 echo EXPORTS > $output_objdir/$soname.def; 5906 cat $export_symbols >> $output_objdir/$soname.def; 5907 fi~ 5908 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5909 else 5910 _LT_TAGVAR(ld_shlibs, $1)=no 5911 fi 5912 ;; 5913 5914 haiku*) 5915 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5916 _LT_TAGVAR(link_all_deplibs, $1)=yes 5917 ;; 5918 5919 interix[[3-9]]*) 5920 _LT_TAGVAR(hardcode_direct, $1)=no 5921 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5922 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5923 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5924 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5925 # Instead, shared libraries are loaded at an image base (0x10000000 by 5926 # default) and relocated if they conflict, which is a slow very memory 5927 # consuming and fragmenting process. To avoid this, we pick a random, 5928 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5929 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5930 _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' 5931 _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' 5932 ;; 5933 5934 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5935 tmp_diet=no 5936 if test "$host_os" = linux-dietlibc; then 5937 case $cc_basename in 5938 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5939 esac 5940 fi 5941 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5942 && test "$tmp_diet" = no 5943 then 5944 tmp_addflag=' $pic_flag' 5945 tmp_sharedflag='-shared' 5946 case $cc_basename,$host_cpu in 5947 pgcc*) # Portland Group C compiler 5948 _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' 5949 tmp_addflag=' $pic_flag' 5950 ;; 5951 pgf77* | pgf90* | pgf95* | pgfortran*) 5952 # Portland Group f77 and f90 compilers 5953 _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' 5954 tmp_addflag=' $pic_flag -Mnomain' ;; 5955 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5956 tmp_addflag=' -i_dynamic' ;; 5957 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5958 tmp_addflag=' -i_dynamic -nofor_main' ;; 5959 ifc* | ifort*) # Intel Fortran compiler 5960 tmp_addflag=' -nofor_main' ;; 5961 lf95*) # Lahey Fortran 8.1 5962 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5963 tmp_sharedflag='--shared' ;; 5964 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5965 tmp_sharedflag='-qmkshrobj' 5966 tmp_addflag= ;; 5967 nvcc*) # Cuda Compiler Driver 2.2 5968 _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' 5969 _LT_TAGVAR(compiler_needs_object, $1)=yes 5970 ;; 5971 esac 5972 case `$CC -V 2>&1 | sed 5q` in 5973 *Sun\ C*) # Sun C 5.9 5974 _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' 5975 _LT_TAGVAR(compiler_needs_object, $1)=yes 5976 tmp_sharedflag='-G' ;; 5977 *Sun\ F*) # Sun Fortran 8.3 5978 tmp_sharedflag='-G' ;; 5979 esac 5980 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5981 5982 if test "x$supports_anon_versioning" = xyes; then 5983 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5984 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5985 echo "local: *; };" >> $output_objdir/$libname.ver~ 5986 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5987 fi 5988 5989 case $cc_basename in 5990 xlf* | bgf* | bgxlf* | mpixlf*) 5991 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5992 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5995 if test "x$supports_anon_versioning" = xyes; then 5996 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5997 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5998 echo "local: *; };" >> $output_objdir/$libname.ver~ 5999 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6000 fi 6001 ;; 6002 esac 6003 else 6004 _LT_TAGVAR(ld_shlibs, $1)=no 6005 fi 6006 ;; 6007 6008 netbsd*) 6009 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6010 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6011 wlarc= 6012 else 6013 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6014 _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' 6015 fi 6016 ;; 6017 6018 solaris*) 6019 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6020 _LT_TAGVAR(ld_shlibs, $1)=no 6021 cat <<_LT_EOF 1>&2 6022 6023*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6024*** create shared libraries on Solaris systems. Therefore, libtool 6025*** is disabling shared libraries support. We urge you to upgrade GNU 6026*** binutils to release 2.9.1 or newer. Another option is to modify 6027*** your PATH or compiler configuration so that the native linker is 6028*** used, and then restart. 6029 6030_LT_EOF 6031 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6032 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6033 _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' 6034 else 6035 _LT_TAGVAR(ld_shlibs, $1)=no 6036 fi 6037 ;; 6038 6039 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6040 case `$LD -v 2>&1` in 6041 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6042 _LT_TAGVAR(ld_shlibs, $1)=no 6043 cat <<_LT_EOF 1>&2 6044 6045*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6046*** reliably create shared libraries on SCO systems. Therefore, libtool 6047*** is disabling shared libraries support. We urge you to upgrade GNU 6048*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6049*** your PATH or compiler configuration so that the native linker is 6050*** used, and then restart. 6051 6052_LT_EOF 6053 ;; 6054 *) 6055 # For security reasons, it is highly recommended that you always 6056 # use absolute paths for naming shared libraries, and exclude the 6057 # DT_RUNPATH tag from executables and libraries. But doing so 6058 # requires that you compile everything twice, which is a pain. 6059 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6060 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6061 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6062 _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' 6063 else 6064 _LT_TAGVAR(ld_shlibs, $1)=no 6065 fi 6066 ;; 6067 esac 6068 ;; 6069 6070 sunos4*) 6071 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6072 wlarc= 6073 _LT_TAGVAR(hardcode_direct, $1)=yes 6074 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6075 ;; 6076 6077 *) 6078 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6079 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6080 _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' 6081 else 6082 _LT_TAGVAR(ld_shlibs, $1)=no 6083 fi 6084 ;; 6085 esac 6086 6087 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6088 runpath_var= 6089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6090 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6091 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6092 fi 6093 else 6094 # PORTME fill in a description of your system's linker (not GNU ld) 6095 case $host_os in 6096 aix3*) 6097 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6098 _LT_TAGVAR(always_export_symbols, $1)=yes 6099 _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' 6100 # Note: this linker hardcodes the directories in LIBPATH if there 6101 # are no directories specified by -L. 6102 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6103 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6104 # Neither direct hardcoding nor static linking is supported with a 6105 # broken collect2. 6106 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6107 fi 6108 ;; 6109 6110 aix[[4-9]]*) 6111 if test "$host_cpu" = ia64; then 6112 # On IA64, the linker does run time linking by default, so we don't 6113 # have to do anything special. 6114 aix_use_runtimelinking=no 6115 exp_sym_flag='-Bexport' 6116 no_entry_flag="" 6117 else 6118 # If we're using GNU nm, then we don't want the "-C" option. 6119 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6120 # Also, AIX nm treats weak defined symbols like other global 6121 # defined symbols, whereas GNU nm marks them as "W". 6122 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6123 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6124 else 6125 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6126 fi 6127 aix_use_runtimelinking=no 6128 6129 # Test if we are trying to use run time linking or normal 6130 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6131 # need to do runtime linking. 6132 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6133 for ld_flag in $LDFLAGS; do 6134 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6135 aix_use_runtimelinking=yes 6136 break 6137 fi 6138 done 6139 ;; 6140 esac 6141 6142 exp_sym_flag='-bexport' 6143 no_entry_flag='-bnoentry' 6144 fi 6145 6146 # When large executables or shared objects are built, AIX ld can 6147 # have problems creating the table of contents. If linking a library 6148 # or program results in "error TOC overflow" add -mminimal-toc to 6149 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6150 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6151 6152 _LT_TAGVAR(archive_cmds, $1)='' 6153 _LT_TAGVAR(hardcode_direct, $1)=yes 6154 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6155 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6156 _LT_TAGVAR(link_all_deplibs, $1)=yes 6157 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6158 6159 if test "$GCC" = yes; then 6160 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6161 # We only want to do this on AIX 4.2 and lower, the check 6162 # below for broken collect2 doesn't work under 4.3+ 6163 collect2name=`${CC} -print-prog-name=collect2` 6164 if test -f "$collect2name" && 6165 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6166 then 6167 # We have reworked collect2 6168 : 6169 else 6170 # We have old collect2 6171 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6172 # It fails to find uninstalled libraries when the uninstalled 6173 # path is not listed in the libpath. Setting hardcode_minus_L 6174 # to unsupported forces relinking 6175 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6176 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6177 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6178 fi 6179 ;; 6180 esac 6181 shared_flag='-shared' 6182 if test "$aix_use_runtimelinking" = yes; then 6183 shared_flag="$shared_flag "'${wl}-G' 6184 fi 6185 else 6186 # not using gcc 6187 if test "$host_cpu" = ia64; then 6188 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6189 # chokes on -Wl,-G. The following line is correct: 6190 shared_flag='-G' 6191 else 6192 if test "$aix_use_runtimelinking" = yes; then 6193 shared_flag='${wl}-G' 6194 else 6195 shared_flag='${wl}-bM:SRE' 6196 fi 6197 fi 6198 fi 6199 6200 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6201 # It seems that -bexpall does not export symbols beginning with 6202 # underscore (_), so it is better to generate a list of symbols to export. 6203 _LT_TAGVAR(always_export_symbols, $1)=yes 6204 if test "$aix_use_runtimelinking" = yes; then 6205 # Warning - without using the other runtime loading flags (-brtl), 6206 # -berok will link without error, but may produce a broken library. 6207 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6208 # Determine the default libpath from the value encoded in an 6209 # empty executable. 6210 _LT_SYS_MODULE_PATH_AIX([$1]) 6211 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6212 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6213 else 6214 if test "$host_cpu" = ia64; then 6215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6216 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6217 _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" 6218 else 6219 # Determine the default libpath from the value encoded in an 6220 # empty executable. 6221 _LT_SYS_MODULE_PATH_AIX([$1]) 6222 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6223 # Warning - without using the other run time loading flags, 6224 # -berok will link without error, but may produce a broken library. 6225 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6226 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6227 if test "$with_gnu_ld" = yes; then 6228 # We only use this code for GNU lds that support --whole-archive. 6229 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6230 else 6231 # Exported symbols can be pulled into shared objects from archives 6232 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6233 fi 6234 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6235 # This is similar to how AIX traditionally builds its shared libraries. 6236 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6237 fi 6238 fi 6239 ;; 6240 6241 amigaos*) 6242 case $host_cpu in 6243 powerpc) 6244 # see comment about AmigaOS4 .so support 6245 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6246 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6247 ;; 6248 m68k) 6249 _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)' 6250 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6251 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6252 ;; 6253 esac 6254 ;; 6255 6256 bsdi[[45]]*) 6257 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6258 ;; 6259 6260 cygwin* | mingw* | pw32* | cegcc*) 6261 # When not using gcc, we currently assume that we are using 6262 # Microsoft Visual C++. 6263 # hardcode_libdir_flag_spec is actually meaningless, as there is 6264 # no search path for DLLs. 6265 case $cc_basename in 6266 cl*) 6267 # Native MSVC 6268 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6269 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6270 _LT_TAGVAR(always_export_symbols, $1)=yes 6271 _LT_TAGVAR(file_list_spec, $1)='@' 6272 # Tell ltmain to make .lib files, not .a files. 6273 libext=lib 6274 # Tell ltmain to make .dll files, not .so files. 6275 shrext_cmds=".dll" 6276 # FIXME: Setting linknames here is a bad hack. 6277 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6278 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6279 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6280 else 6281 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6282 fi~ 6283 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6284 linknames=' 6285 # The linker will not automatically build a static lib if we build a DLL. 6286 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6287 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6288 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6289 _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' 6290 # Don't use ranlib 6291 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6292 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6293 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6294 case $lt_outputfile in 6295 *.exe|*.EXE) ;; 6296 *) 6297 lt_outputfile="$lt_outputfile.exe" 6298 lt_tool_outputfile="$lt_tool_outputfile.exe" 6299 ;; 6300 esac~ 6301 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6302 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6303 $RM "$lt_outputfile.manifest"; 6304 fi' 6305 ;; 6306 *) 6307 # Assume MSVC wrapper 6308 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6309 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6310 # Tell ltmain to make .lib files, not .a files. 6311 libext=lib 6312 # Tell ltmain to make .dll files, not .so files. 6313 shrext_cmds=".dll" 6314 # FIXME: Setting linknames here is a bad hack. 6315 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6316 # The linker will automatically build a .lib file if we build a DLL. 6317 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6318 # FIXME: Should let the user specify the lib program. 6319 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6320 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6321 ;; 6322 esac 6323 ;; 6324 6325 darwin* | rhapsody*) 6326 _LT_DARWIN_LINKER_FEATURES($1) 6327 ;; 6328 6329 dgux*) 6330 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6331 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6332 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6333 ;; 6334 6335 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6336 # support. Future versions do this automatically, but an explicit c++rt0.o 6337 # does not break anything, and helps significantly (at the cost of a little 6338 # extra space). 6339 freebsd2.2*) 6340 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6342 _LT_TAGVAR(hardcode_direct, $1)=yes 6343 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6344 ;; 6345 6346 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6347 freebsd2.*) 6348 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6349 _LT_TAGVAR(hardcode_direct, $1)=yes 6350 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6351 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6352 ;; 6353 6354 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6355 freebsd* | dragonfly*) 6356 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6358 _LT_TAGVAR(hardcode_direct, $1)=yes 6359 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6360 ;; 6361 6362 hpux9*) 6363 if test "$GCC" = yes; then 6364 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6365 else 6366 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6367 fi 6368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6369 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6370 _LT_TAGVAR(hardcode_direct, $1)=yes 6371 6372 # hardcode_minus_L: Not really in the search PATH, 6373 # but as the default location of the library. 6374 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6375 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6376 ;; 6377 6378 hpux10*) 6379 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6380 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6381 else 6382 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6383 fi 6384 if test "$with_gnu_ld" = no; then 6385 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6386 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6387 _LT_TAGVAR(hardcode_direct, $1)=yes 6388 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6389 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6390 # hardcode_minus_L: Not really in the search PATH, 6391 # but as the default location of the library. 6392 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6393 fi 6394 ;; 6395 6396 hpux11*) 6397 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6398 case $host_cpu in 6399 hppa*64*) 6400 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6401 ;; 6402 ia64*) 6403 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6404 ;; 6405 *) 6406 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6407 ;; 6408 esac 6409 else 6410 case $host_cpu in 6411 hppa*64*) 6412 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6413 ;; 6414 ia64*) 6415 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6416 ;; 6417 *) 6418 m4_if($1, [], [ 6419 # Older versions of the 11.00 compiler do not understand -b yet 6420 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6421 _LT_LINKER_OPTION([if $CC understands -b], 6422 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6423 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6424 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6425 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6426 ;; 6427 esac 6428 fi 6429 if test "$with_gnu_ld" = no; then 6430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6431 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6432 6433 case $host_cpu in 6434 hppa*64*|ia64*) 6435 _LT_TAGVAR(hardcode_direct, $1)=no 6436 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6437 ;; 6438 *) 6439 _LT_TAGVAR(hardcode_direct, $1)=yes 6440 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6441 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6442 6443 # hardcode_minus_L: Not really in the search PATH, 6444 # but as the default location of the library. 6445 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6446 ;; 6447 esac 6448 fi 6449 ;; 6450 6451 irix5* | irix6* | nonstopux*) 6452 if test "$GCC" = yes; then 6453 _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' 6454 # Try to use the -exported_symbol ld option, if it does not 6455 # work, assume that -exports_file does not work either and 6456 # implicitly export all symbols. 6457 # This should be the same for all languages, so no per-tag cache variable. 6458 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6459 [lt_cv_irix_exported_symbol], 6460 [save_LDFLAGS="$LDFLAGS" 6461 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6462 AC_LINK_IFELSE( 6463 [AC_LANG_SOURCE( 6464 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6465 [C++], [[int foo (void) { return 0; }]], 6466 [Fortran 77], [[ 6467 subroutine foo 6468 end]], 6469 [Fortran], [[ 6470 subroutine foo 6471 end]])])], 6472 [lt_cv_irix_exported_symbol=yes], 6473 [lt_cv_irix_exported_symbol=no]) 6474 LDFLAGS="$save_LDFLAGS"]) 6475 if test "$lt_cv_irix_exported_symbol" = yes; then 6476 _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' 6477 fi 6478 else 6479 _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' 6480 _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' 6481 fi 6482 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6484 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6485 _LT_TAGVAR(inherit_rpath, $1)=yes 6486 _LT_TAGVAR(link_all_deplibs, $1)=yes 6487 ;; 6488 6489 netbsd*) 6490 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6491 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6492 else 6493 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6494 fi 6495 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6496 _LT_TAGVAR(hardcode_direct, $1)=yes 6497 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6498 ;; 6499 6500 newsos6) 6501 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6502 _LT_TAGVAR(hardcode_direct, $1)=yes 6503 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6504 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6505 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6506 ;; 6507 6508 *nto* | *qnx*) 6509 ;; 6510 6511 openbsd*) 6512 if test -f /usr/libexec/ld.so; then 6513 _LT_TAGVAR(hardcode_direct, $1)=yes 6514 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6515 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6516 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6517 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6518 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6520 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6521 else 6522 case $host_os in 6523 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6524 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526 ;; 6527 *) 6528 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6529 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6530 ;; 6531 esac 6532 fi 6533 else 6534 _LT_TAGVAR(ld_shlibs, $1)=no 6535 fi 6536 ;; 6537 6538 os2*) 6539 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6540 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6541 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6542 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 6543 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6544 ;; 6545 6546 osf3*) 6547 if test "$GCC" = yes; then 6548 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6549 _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' 6550 else 6551 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6552 _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' 6553 fi 6554 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6555 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6556 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6557 ;; 6558 6559 osf4* | osf5*) # as osf3* with the addition of -msym flag 6560 if test "$GCC" = yes; then 6561 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6562 _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' 6563 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6564 else 6565 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6566 _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' 6567 _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~ 6568 $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' 6569 6570 # Both c and cxx compiler support -rpath directly 6571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6572 fi 6573 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6574 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6575 ;; 6576 6577 solaris*) 6578 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6579 if test "$GCC" = yes; then 6580 wlarc='${wl}' 6581 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6582 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6583 $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' 6584 else 6585 case `$CC -V 2>&1` in 6586 *"Compilers 5.0"*) 6587 wlarc='' 6588 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6589 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6590 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6591 ;; 6592 *) 6593 wlarc='${wl}' 6594 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6595 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6596 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6597 ;; 6598 esac 6599 fi 6600 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6601 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6602 case $host_os in 6603 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6604 *) 6605 # The compiler driver will combine and reorder linker options, 6606 # but understands `-z linker_flag'. GCC discards it without `$wl', 6607 # but is careful enough not to reorder. 6608 # Supported since Solaris 2.6 (maybe 2.5.1?) 6609 if test "$GCC" = yes; then 6610 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6611 else 6612 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6613 fi 6614 ;; 6615 esac 6616 _LT_TAGVAR(link_all_deplibs, $1)=yes 6617 ;; 6618 6619 sunos4*) 6620 if test "x$host_vendor" = xsequent; then 6621 # Use $CC to link under sequent, because it throws in some extra .o 6622 # files that make .init and .fini sections work. 6623 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6624 else 6625 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6626 fi 6627 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6628 _LT_TAGVAR(hardcode_direct, $1)=yes 6629 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6630 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6631 ;; 6632 6633 sysv4) 6634 case $host_vendor in 6635 sni) 6636 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6637 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6638 ;; 6639 siemens) 6640 ## LD is ld it makes a PLAMLIB 6641 ## CC just makes a GrossModule. 6642 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6643 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6644 _LT_TAGVAR(hardcode_direct, $1)=no 6645 ;; 6646 motorola) 6647 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6648 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6649 ;; 6650 esac 6651 runpath_var='LD_RUN_PATH' 6652 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6653 ;; 6654 6655 sysv4.3*) 6656 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6657 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6658 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6659 ;; 6660 6661 sysv4*MP*) 6662 if test -d /usr/nec; then 6663 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6664 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6665 runpath_var=LD_RUN_PATH 6666 hardcode_runpath_var=yes 6667 _LT_TAGVAR(ld_shlibs, $1)=yes 6668 fi 6669 ;; 6670 6671 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6672 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6673 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6675 runpath_var='LD_RUN_PATH' 6676 6677 if test "$GCC" = yes; then 6678 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6679 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6680 else 6681 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6682 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6683 fi 6684 ;; 6685 6686 sysv5* | sco3.2v5* | sco5v6*) 6687 # Note: We can NOT use -z defs as we might desire, because we do not 6688 # link with -lc, and that would cause any symbols used from libc to 6689 # always be unresolved, which means just about no library would 6690 # ever link correctly. If we're not using GNU ld we use -z text 6691 # though, which does catch some bad symbols but isn't as heavy-handed 6692 # as -z defs. 6693 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6694 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6695 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6696 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6698 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6699 _LT_TAGVAR(link_all_deplibs, $1)=yes 6700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6701 runpath_var='LD_RUN_PATH' 6702 6703 if test "$GCC" = yes; then 6704 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6705 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6706 else 6707 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6708 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6709 fi 6710 ;; 6711 6712 uts4*) 6713 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6714 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6715 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6716 ;; 6717 6718 *) 6719 _LT_TAGVAR(ld_shlibs, $1)=no 6720 ;; 6721 esac 6722 6723 if test x$host_vendor = xsni; then 6724 case $host in 6725 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6726 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6727 ;; 6728 esac 6729 fi 6730 fi 6731]) 6732AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6733test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6734 6735_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6736 6737_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6738_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6739_LT_DECL([], [extract_expsyms_cmds], [2], 6740 [The commands to extract the exported symbol list from a shared archive]) 6741 6742# 6743# Do we need to explicitly link libc? 6744# 6745case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6746x|xyes) 6747 # Assume -lc should be added 6748 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6749 6750 if test "$enable_shared" = yes && test "$GCC" = yes; then 6751 case $_LT_TAGVAR(archive_cmds, $1) in 6752 *'~'*) 6753 # FIXME: we may have to deal with multi-command sequences. 6754 ;; 6755 '$CC '*) 6756 # Test whether the compiler implicitly links with -lc since on some 6757 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6758 # to ld, don't add -lc before -lgcc. 6759 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6760 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6761 [$RM conftest* 6762 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6763 6764 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6765 soname=conftest 6766 lib=conftest 6767 libobjs=conftest.$ac_objext 6768 deplibs= 6769 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6770 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6771 compiler_flags=-v 6772 linker_flags=-v 6773 verstring= 6774 output_objdir=. 6775 libname=conftest 6776 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6777 _LT_TAGVAR(allow_undefined_flag, $1)= 6778 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6779 then 6780 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6781 else 6782 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6783 fi 6784 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6785 else 6786 cat conftest.err 1>&5 6787 fi 6788 $RM conftest* 6789 ]) 6790 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6791 ;; 6792 esac 6793 fi 6794 ;; 6795esac 6796 6797_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6798 [Whether or not to add -lc for building shared libraries]) 6799_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6800 [enable_shared_with_static_runtimes], [0], 6801 [Whether or not to disallow shared libs when runtime libs are static]) 6802_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6803 [Compiler flag to allow reflexive dlopens]) 6804_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6805 [Compiler flag to generate shared objects directly from archives]) 6806_LT_TAGDECL([], [compiler_needs_object], [1], 6807 [Whether the compiler copes with passing no objects directly]) 6808_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6809 [Create an old-style archive from a shared archive]) 6810_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6811 [Create a temporary old-style archive to link instead of a shared archive]) 6812_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6813_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6814_LT_TAGDECL([], [module_cmds], [2], 6815 [Commands used to build a loadable module if different from building 6816 a shared archive.]) 6817_LT_TAGDECL([], [module_expsym_cmds], [2]) 6818_LT_TAGDECL([], [with_gnu_ld], [1], 6819 [Whether we are building with GNU ld or not]) 6820_LT_TAGDECL([], [allow_undefined_flag], [1], 6821 [Flag that allows shared libraries with undefined symbols to be built]) 6822_LT_TAGDECL([], [no_undefined_flag], [1], 6823 [Flag that enforces no undefined symbols]) 6824_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6825 [Flag to hardcode $libdir into a binary during linking. 6826 This must work even if $libdir does not exist]) 6827_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6828 [Whether we need a single "-rpath" flag with a separated argument]) 6829_LT_TAGDECL([], [hardcode_direct], [0], 6830 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6831 DIR into the resulting binary]) 6832_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6833 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6834 DIR into the resulting binary and the resulting library dependency is 6835 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6836 library is relocated]) 6837_LT_TAGDECL([], [hardcode_minus_L], [0], 6838 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6839 into the resulting binary]) 6840_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6841 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6842 into the resulting binary]) 6843_LT_TAGDECL([], [hardcode_automatic], [0], 6844 [Set to "yes" if building a shared library automatically hardcodes DIR 6845 into the library and all subsequent libraries and executables linked 6846 against it]) 6847_LT_TAGDECL([], [inherit_rpath], [0], 6848 [Set to yes if linker adds runtime paths of dependent libraries 6849 to runtime path list]) 6850_LT_TAGDECL([], [link_all_deplibs], [0], 6851 [Whether libtool must link a program against all its dependency libraries]) 6852_LT_TAGDECL([], [always_export_symbols], [0], 6853 [Set to "yes" if exported symbols are required]) 6854_LT_TAGDECL([], [export_symbols_cmds], [2], 6855 [The commands to list exported symbols]) 6856_LT_TAGDECL([], [exclude_expsyms], [1], 6857 [Symbols that should not be listed in the preloaded symbols]) 6858_LT_TAGDECL([], [include_expsyms], [1], 6859 [Symbols that must always be exported]) 6860_LT_TAGDECL([], [prelink_cmds], [2], 6861 [Commands necessary for linking programs (against libraries) with templates]) 6862_LT_TAGDECL([], [postlink_cmds], [2], 6863 [Commands necessary for finishing linking programs]) 6864_LT_TAGDECL([], [file_list_spec], [1], 6865 [Specify filename containing input files]) 6866dnl FIXME: Not yet implemented 6867dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6868dnl [Compiler flag to generate thread safe objects]) 6869])# _LT_LINKER_SHLIBS 6870 6871 6872# _LT_LANG_C_CONFIG([TAG]) 6873# ------------------------ 6874# Ensure that the configuration variables for a C compiler are suitably 6875# defined. These variables are subsequently used by _LT_CONFIG to write 6876# the compiler configuration to `libtool'. 6877m4_defun([_LT_LANG_C_CONFIG], 6878[m4_require([_LT_DECL_EGREP])dnl 6879lt_save_CC="$CC" 6880AC_LANG_PUSH(C) 6881 6882# Source file extension for C test sources. 6883ac_ext=c 6884 6885# Object file extension for compiled C test sources. 6886objext=o 6887_LT_TAGVAR(objext, $1)=$objext 6888 6889# Code to be used in simple compile tests 6890lt_simple_compile_test_code="int some_variable = 0;" 6891 6892# Code to be used in simple link tests 6893lt_simple_link_test_code='int main(){return(0);}' 6894 6895_LT_TAG_COMPILER 6896# Save the default compiler, since it gets overwritten when the other 6897# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6898compiler_DEFAULT=$CC 6899 6900# save warnings/boilerplate of simple test code 6901_LT_COMPILER_BOILERPLATE 6902_LT_LINKER_BOILERPLATE 6903 6904if test -n "$compiler"; then 6905 _LT_COMPILER_NO_RTTI($1) 6906 _LT_COMPILER_PIC($1) 6907 _LT_COMPILER_C_O($1) 6908 _LT_COMPILER_FILE_LOCKS($1) 6909 _LT_LINKER_SHLIBS($1) 6910 _LT_SYS_DYNAMIC_LINKER($1) 6911 _LT_LINKER_HARDCODE_LIBPATH($1) 6912 LT_SYS_DLOPEN_SELF 6913 _LT_CMD_STRIPLIB 6914 6915 # Report which library types will actually be built 6916 AC_MSG_CHECKING([if libtool supports shared libraries]) 6917 AC_MSG_RESULT([$can_build_shared]) 6918 6919 AC_MSG_CHECKING([whether to build shared libraries]) 6920 test "$can_build_shared" = "no" && enable_shared=no 6921 6922 # On AIX, shared libraries and static libraries use the same namespace, and 6923 # are all built from PIC. 6924 case $host_os in 6925 aix3*) 6926 test "$enable_shared" = yes && enable_static=no 6927 if test -n "$RANLIB"; then 6928 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6929 postinstall_cmds='$RANLIB $lib' 6930 fi 6931 ;; 6932 6933 aix[[4-9]]*) 6934 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6935 test "$enable_shared" = yes && enable_static=no 6936 fi 6937 ;; 6938 esac 6939 AC_MSG_RESULT([$enable_shared]) 6940 6941 AC_MSG_CHECKING([whether to build static libraries]) 6942 # Make sure either enable_shared or enable_static is yes. 6943 test "$enable_shared" = yes || enable_static=yes 6944 AC_MSG_RESULT([$enable_static]) 6945 6946 _LT_CONFIG($1) 6947fi 6948AC_LANG_POP 6949CC="$lt_save_CC" 6950])# _LT_LANG_C_CONFIG 6951 6952 6953# _LT_LANG_CXX_CONFIG([TAG]) 6954# -------------------------- 6955# Ensure that the configuration variables for a C++ compiler are suitably 6956# defined. These variables are subsequently used by _LT_CONFIG to write 6957# the compiler configuration to `libtool'. 6958m4_defun([_LT_LANG_CXX_CONFIG], 6959[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6960m4_require([_LT_DECL_EGREP])dnl 6961m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6962if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6963 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6964 (test "X$CXX" != "Xg++"))) ; then 6965 AC_PROG_CXXCPP 6966else 6967 _lt_caught_CXX_error=yes 6968fi 6969 6970AC_LANG_PUSH(C++) 6971_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6972_LT_TAGVAR(allow_undefined_flag, $1)= 6973_LT_TAGVAR(always_export_symbols, $1)=no 6974_LT_TAGVAR(archive_expsym_cmds, $1)= 6975_LT_TAGVAR(compiler_needs_object, $1)=no 6976_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6977_LT_TAGVAR(hardcode_direct, $1)=no 6978_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6979_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6980_LT_TAGVAR(hardcode_libdir_separator, $1)= 6981_LT_TAGVAR(hardcode_minus_L, $1)=no 6982_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6983_LT_TAGVAR(hardcode_automatic, $1)=no 6984_LT_TAGVAR(inherit_rpath, $1)=no 6985_LT_TAGVAR(module_cmds, $1)= 6986_LT_TAGVAR(module_expsym_cmds, $1)= 6987_LT_TAGVAR(link_all_deplibs, $1)=unknown 6988_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6989_LT_TAGVAR(reload_flag, $1)=$reload_flag 6990_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6991_LT_TAGVAR(no_undefined_flag, $1)= 6992_LT_TAGVAR(whole_archive_flag_spec, $1)= 6993_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6994 6995# Source file extension for C++ test sources. 6996ac_ext=cpp 6997 6998# Object file extension for compiled C++ test sources. 6999objext=o 7000_LT_TAGVAR(objext, $1)=$objext 7001 7002# No sense in running all these tests if we already determined that 7003# the CXX compiler isn't working. Some variables (like enable_shared) 7004# are currently assumed to apply to all compilers on this platform, 7005# and will be corrupted by setting them based on a non-working compiler. 7006if test "$_lt_caught_CXX_error" != yes; then 7007 # Code to be used in simple compile tests 7008 lt_simple_compile_test_code="int some_variable = 0;" 7009 7010 # Code to be used in simple link tests 7011 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7012 7013 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7014 _LT_TAG_COMPILER 7015 7016 # save warnings/boilerplate of simple test code 7017 _LT_COMPILER_BOILERPLATE 7018 _LT_LINKER_BOILERPLATE 7019 7020 # Allow CC to be a program name with arguments. 7021 lt_save_CC=$CC 7022 lt_save_CFLAGS=$CFLAGS 7023 lt_save_LD=$LD 7024 lt_save_GCC=$GCC 7025 GCC=$GXX 7026 lt_save_with_gnu_ld=$with_gnu_ld 7027 lt_save_path_LD=$lt_cv_path_LD 7028 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7029 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7030 else 7031 $as_unset lt_cv_prog_gnu_ld 7032 fi 7033 if test -n "${lt_cv_path_LDCXX+set}"; then 7034 lt_cv_path_LD=$lt_cv_path_LDCXX 7035 else 7036 $as_unset lt_cv_path_LD 7037 fi 7038 test -z "${LDCXX+set}" || LD=$LDCXX 7039 CC=${CXX-"c++"} 7040 CFLAGS=$CXXFLAGS 7041 compiler=$CC 7042 _LT_TAGVAR(compiler, $1)=$CC 7043 _LT_CC_BASENAME([$compiler]) 7044 7045 if test -n "$compiler"; then 7046 # We don't want -fno-exception when compiling C++ code, so set the 7047 # no_builtin_flag separately 7048 if test "$GXX" = yes; then 7049 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7050 else 7051 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7052 fi 7053 7054 if test "$GXX" = yes; then 7055 # Set up default GNU C++ configuration 7056 7057 LT_PATH_LD 7058 7059 # Check if GNU C++ uses GNU ld as the underlying linker, since the 7060 # archiving commands below assume that GNU ld is being used. 7061 if test "$with_gnu_ld" = yes; then 7062 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7063 _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' 7064 7065 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7066 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7067 7068 # If archive_cmds runs LD, not CC, wlarc should be empty 7069 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7070 # investigate it a little bit more. (MM) 7071 wlarc='${wl}' 7072 7073 # ancient GNU ld didn't support --whole-archive et. al. 7074 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7075 $GREP 'no-whole-archive' > /dev/null; then 7076 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7077 else 7078 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7079 fi 7080 else 7081 with_gnu_ld=no 7082 wlarc= 7083 7084 # A generic and very simple default shared library creation 7085 # command for GNU C++ for the case where it uses the native 7086 # linker, instead of GNU ld. If possible, this setting should 7087 # overridden to take advantage of the native linker features on 7088 # the platform it is being used on. 7089 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7090 fi 7091 7092 # Commands to make compiler produce verbose output that lists 7093 # what "hidden" libraries, object files and flags are used when 7094 # linking a shared library. 7095 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7096 7097 else 7098 GXX=no 7099 with_gnu_ld=no 7100 wlarc= 7101 fi 7102 7103 # PORTME: fill in a description of your system's C++ link characteristics 7104 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7105 _LT_TAGVAR(ld_shlibs, $1)=yes 7106 case $host_os in 7107 aix3*) 7108 # FIXME: insert proper C++ library support 7109 _LT_TAGVAR(ld_shlibs, $1)=no 7110 ;; 7111 aix[[4-9]]*) 7112 if test "$host_cpu" = ia64; then 7113 # On IA64, the linker does run time linking by default, so we don't 7114 # have to do anything special. 7115 aix_use_runtimelinking=no 7116 exp_sym_flag='-Bexport' 7117 no_entry_flag="" 7118 else 7119 aix_use_runtimelinking=no 7120 7121 # Test if we are trying to use run time linking or normal 7122 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7123 # need to do runtime linking. 7124 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7125 for ld_flag in $LDFLAGS; do 7126 case $ld_flag in 7127 *-brtl*) 7128 aix_use_runtimelinking=yes 7129 break 7130 ;; 7131 esac 7132 done 7133 ;; 7134 esac 7135 7136 exp_sym_flag='-bexport' 7137 no_entry_flag='-bnoentry' 7138 fi 7139 7140 # When large executables or shared objects are built, AIX ld can 7141 # have problems creating the table of contents. If linking a library 7142 # or program results in "error TOC overflow" add -mminimal-toc to 7143 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7144 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7145 7146 _LT_TAGVAR(archive_cmds, $1)='' 7147 _LT_TAGVAR(hardcode_direct, $1)=yes 7148 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7149 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7150 _LT_TAGVAR(link_all_deplibs, $1)=yes 7151 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7152 7153 if test "$GXX" = yes; then 7154 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7155 # We only want to do this on AIX 4.2 and lower, the check 7156 # below for broken collect2 doesn't work under 4.3+ 7157 collect2name=`${CC} -print-prog-name=collect2` 7158 if test -f "$collect2name" && 7159 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7160 then 7161 # We have reworked collect2 7162 : 7163 else 7164 # We have old collect2 7165 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7166 # It fails to find uninstalled libraries when the uninstalled 7167 # path is not listed in the libpath. Setting hardcode_minus_L 7168 # to unsupported forces relinking 7169 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7171 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7172 fi 7173 esac 7174 shared_flag='-shared' 7175 if test "$aix_use_runtimelinking" = yes; then 7176 shared_flag="$shared_flag "'${wl}-G' 7177 fi 7178 else 7179 # not using gcc 7180 if test "$host_cpu" = ia64; then 7181 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7182 # chokes on -Wl,-G. The following line is correct: 7183 shared_flag='-G' 7184 else 7185 if test "$aix_use_runtimelinking" = yes; then 7186 shared_flag='${wl}-G' 7187 else 7188 shared_flag='${wl}-bM:SRE' 7189 fi 7190 fi 7191 fi 7192 7193 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7194 # It seems that -bexpall does not export symbols beginning with 7195 # underscore (_), so it is better to generate a list of symbols to 7196 # export. 7197 _LT_TAGVAR(always_export_symbols, $1)=yes 7198 if test "$aix_use_runtimelinking" = yes; then 7199 # Warning - without using the other runtime loading flags (-brtl), 7200 # -berok will link without error, but may produce a broken library. 7201 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7202 # Determine the default libpath from the value encoded in an empty 7203 # executable. 7204 _LT_SYS_MODULE_PATH_AIX([$1]) 7205 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7206 7207 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7208 else 7209 if test "$host_cpu" = ia64; then 7210 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7211 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7212 _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" 7213 else 7214 # Determine the default libpath from the value encoded in an 7215 # empty executable. 7216 _LT_SYS_MODULE_PATH_AIX([$1]) 7217 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7218 # Warning - without using the other run time loading flags, 7219 # -berok will link without error, but may produce a broken library. 7220 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7221 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7222 if test "$with_gnu_ld" = yes; then 7223 # We only use this code for GNU lds that support --whole-archive. 7224 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7225 else 7226 # Exported symbols can be pulled into shared objects from archives 7227 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7228 fi 7229 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7230 # This is similar to how AIX traditionally builds its shared 7231 # libraries. 7232 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 7233 fi 7234 fi 7235 ;; 7236 7237 beos*) 7238 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7239 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7240 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7241 # support --undefined. This deserves some investigation. FIXME 7242 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7243 else 7244 _LT_TAGVAR(ld_shlibs, $1)=no 7245 fi 7246 ;; 7247 7248 chorus*) 7249 case $cc_basename in 7250 *) 7251 # FIXME: insert proper C++ library support 7252 _LT_TAGVAR(ld_shlibs, $1)=no 7253 ;; 7254 esac 7255 ;; 7256 7257 cygwin* | mingw* | pw32* | cegcc*) 7258 case $GXX,$cc_basename in 7259 ,cl* | no,cl*) 7260 # Native MSVC 7261 # hardcode_libdir_flag_spec is actually meaningless, as there is 7262 # no search path for DLLs. 7263 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7264 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7265 _LT_TAGVAR(always_export_symbols, $1)=yes 7266 _LT_TAGVAR(file_list_spec, $1)='@' 7267 # Tell ltmain to make .lib files, not .a files. 7268 libext=lib 7269 # Tell ltmain to make .dll files, not .so files. 7270 shrext_cmds=".dll" 7271 # FIXME: Setting linknames here is a bad hack. 7272 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7273 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7274 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7275 else 7276 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7277 fi~ 7278 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7279 linknames=' 7280 # The linker will not automatically build a static lib if we build a DLL. 7281 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7282 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7283 # Don't use ranlib 7284 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7285 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7286 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7287 case $lt_outputfile in 7288 *.exe|*.EXE) ;; 7289 *) 7290 lt_outputfile="$lt_outputfile.exe" 7291 lt_tool_outputfile="$lt_tool_outputfile.exe" 7292 ;; 7293 esac~ 7294 func_to_tool_file "$lt_outputfile"~ 7295 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7296 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7297 $RM "$lt_outputfile.manifest"; 7298 fi' 7299 ;; 7300 *) 7301 # g++ 7302 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7303 # as there is no search path for DLLs. 7304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7305 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7306 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7307 _LT_TAGVAR(always_export_symbols, $1)=no 7308 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7309 7310 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7311 _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' 7312 # If the export-symbols file already is a .def file (1st line 7313 # is EXPORTS), use it as is; otherwise, prepend... 7314 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7315 cp $export_symbols $output_objdir/$soname.def; 7316 else 7317 echo EXPORTS > $output_objdir/$soname.def; 7318 cat $export_symbols >> $output_objdir/$soname.def; 7319 fi~ 7320 $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' 7321 else 7322 _LT_TAGVAR(ld_shlibs, $1)=no 7323 fi 7324 ;; 7325 esac 7326 ;; 7327 darwin* | rhapsody*) 7328 _LT_DARWIN_LINKER_FEATURES($1) 7329 ;; 7330 7331 dgux*) 7332 case $cc_basename in 7333 ec++*) 7334 # FIXME: insert proper C++ library support 7335 _LT_TAGVAR(ld_shlibs, $1)=no 7336 ;; 7337 ghcx*) 7338 # Green Hills C++ Compiler 7339 # FIXME: insert proper C++ library support 7340 _LT_TAGVAR(ld_shlibs, $1)=no 7341 ;; 7342 *) 7343 # FIXME: insert proper C++ library support 7344 _LT_TAGVAR(ld_shlibs, $1)=no 7345 ;; 7346 esac 7347 ;; 7348 7349 freebsd2.*) 7350 # C++ shared libraries reported to be fairly broken before 7351 # switch to ELF 7352 _LT_TAGVAR(ld_shlibs, $1)=no 7353 ;; 7354 7355 freebsd-elf*) 7356 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7357 ;; 7358 7359 freebsd* | dragonfly*) 7360 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7361 # conventions 7362 _LT_TAGVAR(ld_shlibs, $1)=yes 7363 ;; 7364 7365 gnu*) 7366 ;; 7367 7368 haiku*) 7369 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7370 _LT_TAGVAR(link_all_deplibs, $1)=yes 7371 ;; 7372 7373 hpux9*) 7374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7375 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7376 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7377 _LT_TAGVAR(hardcode_direct, $1)=yes 7378 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7379 # but as the default 7380 # location of the library. 7381 7382 case $cc_basename in 7383 CC*) 7384 # FIXME: insert proper C++ library support 7385 _LT_TAGVAR(ld_shlibs, $1)=no 7386 ;; 7387 aCC*) 7388 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7389 # Commands to make compiler produce verbose output that lists 7390 # what "hidden" libraries, object files and flags are used when 7391 # linking a shared library. 7392 # 7393 # There doesn't appear to be a way to prevent this compiler from 7394 # explicitly linking system object files so we need to strip them 7395 # from the output so that they don't get included in the library 7396 # dependencies. 7397 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"' 7398 ;; 7399 *) 7400 if test "$GXX" = yes; then 7401 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7402 else 7403 # FIXME: insert proper C++ library support 7404 _LT_TAGVAR(ld_shlibs, $1)=no 7405 fi 7406 ;; 7407 esac 7408 ;; 7409 7410 hpux10*|hpux11*) 7411 if test $with_gnu_ld = no; then 7412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7413 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7414 7415 case $host_cpu in 7416 hppa*64*|ia64*) 7417 ;; 7418 *) 7419 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7420 ;; 7421 esac 7422 fi 7423 case $host_cpu in 7424 hppa*64*|ia64*) 7425 _LT_TAGVAR(hardcode_direct, $1)=no 7426 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7427 ;; 7428 *) 7429 _LT_TAGVAR(hardcode_direct, $1)=yes 7430 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7431 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7432 # but as the default 7433 # location of the library. 7434 ;; 7435 esac 7436 7437 case $cc_basename in 7438 CC*) 7439 # FIXME: insert proper C++ library support 7440 _LT_TAGVAR(ld_shlibs, $1)=no 7441 ;; 7442 aCC*) 7443 case $host_cpu in 7444 hppa*64*) 7445 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7446 ;; 7447 ia64*) 7448 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7449 ;; 7450 *) 7451 _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' 7452 ;; 7453 esac 7454 # Commands to make compiler produce verbose output that lists 7455 # what "hidden" libraries, object files and flags are used when 7456 # linking a shared library. 7457 # 7458 # There doesn't appear to be a way to prevent this compiler from 7459 # explicitly linking system object files so we need to strip them 7460 # from the output so that they don't get included in the library 7461 # dependencies. 7462 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"' 7463 ;; 7464 *) 7465 if test "$GXX" = yes; then 7466 if test $with_gnu_ld = no; then 7467 case $host_cpu in 7468 hppa*64*) 7469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7470 ;; 7471 ia64*) 7472 _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' 7473 ;; 7474 *) 7475 _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' 7476 ;; 7477 esac 7478 fi 7479 else 7480 # FIXME: insert proper C++ library support 7481 _LT_TAGVAR(ld_shlibs, $1)=no 7482 fi 7483 ;; 7484 esac 7485 ;; 7486 7487 interix[[3-9]]*) 7488 _LT_TAGVAR(hardcode_direct, $1)=no 7489 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7490 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7491 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7492 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7493 # Instead, shared libraries are loaded at an image base (0x10000000 by 7494 # default) and relocated if they conflict, which is a slow very memory 7495 # consuming and fragmenting process. To avoid this, we pick a random, 7496 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7497 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7498 _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' 7499 _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' 7500 ;; 7501 irix5* | irix6*) 7502 case $cc_basename in 7503 CC*) 7504 # SGI C++ 7505 _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' 7506 7507 # Archives containing C++ object files must be created using 7508 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7509 # necessary to make sure instantiated templates are included 7510 # in the archive. 7511 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7512 ;; 7513 *) 7514 if test "$GXX" = yes; then 7515 if test "$with_gnu_ld" = no; then 7516 _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' 7517 else 7518 _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' 7519 fi 7520 fi 7521 _LT_TAGVAR(link_all_deplibs, $1)=yes 7522 ;; 7523 esac 7524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7525 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7526 _LT_TAGVAR(inherit_rpath, $1)=yes 7527 ;; 7528 7529 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7530 case $cc_basename in 7531 KCC*) 7532 # Kuck and Associates, Inc. (KAI) C++ Compiler 7533 7534 # KCC will only create a shared library if the output file 7535 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7536 # to its proper name (with version) after linking. 7537 _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' 7538 _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' 7539 # Commands to make compiler produce verbose output that lists 7540 # what "hidden" libraries, object files and flags are used when 7541 # linking a shared library. 7542 # 7543 # There doesn't appear to be a way to prevent this compiler from 7544 # explicitly linking system object files so we need to strip them 7545 # from the output so that they don't get included in the library 7546 # dependencies. 7547 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"' 7548 7549 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7550 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7551 7552 # Archives containing C++ object files must be created using 7553 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7554 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7555 ;; 7556 icpc* | ecpc* ) 7557 # Intel C++ 7558 with_gnu_ld=yes 7559 # version 8.0 and above of icpc choke on multiply defined symbols 7560 # if we add $predep_objects and $postdep_objects, however 7.1 and 7561 # earlier do not add the objects themselves. 7562 case `$CC -V 2>&1` in 7563 *"Version 7."*) 7564 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7565 _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' 7566 ;; 7567 *) # Version 8.0 or newer 7568 tmp_idyn= 7569 case $host_cpu in 7570 ia64*) tmp_idyn=' -i_dynamic';; 7571 esac 7572 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7573 _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' 7574 ;; 7575 esac 7576 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7577 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7578 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7579 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7580 ;; 7581 pgCC* | pgcpp*) 7582 # Portland Group C++ compiler 7583 case `$CC -V` in 7584 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7585 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7586 rm -rf $tpldir~ 7587 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7588 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7589 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7590 rm -rf $tpldir~ 7591 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7592 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7593 $RANLIB $oldlib' 7594 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7595 rm -rf $tpldir~ 7596 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7597 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7598 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7599 rm -rf $tpldir~ 7600 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7601 $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' 7602 ;; 7603 *) # Version 6 and above use weak symbols 7604 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7605 _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' 7606 ;; 7607 esac 7608 7609 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7610 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7611 _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' 7612 ;; 7613 cxx*) 7614 # Compaq C++ 7615 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7616 _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' 7617 7618 runpath_var=LD_RUN_PATH 7619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7620 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7621 7622 # Commands to make compiler produce verbose output that lists 7623 # what "hidden" libraries, object files and flags are used when 7624 # linking a shared library. 7625 # 7626 # There doesn't appear to be a way to prevent this compiler from 7627 # explicitly linking system object files so we need to strip them 7628 # from the output so that they don't get included in the library 7629 # dependencies. 7630 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' 7631 ;; 7632 xl* | mpixl* | bgxl*) 7633 # IBM XL 8.0 on PPC, with GNU ld 7634 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7635 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7636 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7637 if test "x$supports_anon_versioning" = xyes; then 7638 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7639 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7640 echo "local: *; };" >> $output_objdir/$libname.ver~ 7641 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7642 fi 7643 ;; 7644 *) 7645 case `$CC -V 2>&1 | sed 5q` in 7646 *Sun\ C*) 7647 # Sun C++ 5.9 7648 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7649 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7650 _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' 7651 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7652 _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' 7653 _LT_TAGVAR(compiler_needs_object, $1)=yes 7654 7655 # Not sure whether something based on 7656 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7657 # would be better. 7658 output_verbose_link_cmd='func_echo_all' 7659 7660 # Archives containing C++ object files must be created using 7661 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7662 # necessary to make sure instantiated templates are included 7663 # in the archive. 7664 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7665 ;; 7666 esac 7667 ;; 7668 esac 7669 ;; 7670 7671 lynxos*) 7672 # FIXME: insert proper C++ library support 7673 _LT_TAGVAR(ld_shlibs, $1)=no 7674 ;; 7675 7676 m88k*) 7677 # FIXME: insert proper C++ library support 7678 _LT_TAGVAR(ld_shlibs, $1)=no 7679 ;; 7680 7681 mvs*) 7682 case $cc_basename in 7683 cxx*) 7684 # FIXME: insert proper C++ library support 7685 _LT_TAGVAR(ld_shlibs, $1)=no 7686 ;; 7687 *) 7688 # FIXME: insert proper C++ library support 7689 _LT_TAGVAR(ld_shlibs, $1)=no 7690 ;; 7691 esac 7692 ;; 7693 7694 netbsd*) 7695 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7696 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7697 wlarc= 7698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7699 _LT_TAGVAR(hardcode_direct, $1)=yes 7700 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7701 fi 7702 # Workaround some broken pre-1.5 toolchains 7703 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7704 ;; 7705 7706 *nto* | *qnx*) 7707 _LT_TAGVAR(ld_shlibs, $1)=yes 7708 ;; 7709 7710 openbsd2*) 7711 # C++ shared libraries are fairly broken 7712 _LT_TAGVAR(ld_shlibs, $1)=no 7713 ;; 7714 7715 openbsd*) 7716 if test -f /usr/libexec/ld.so; then 7717 _LT_TAGVAR(hardcode_direct, $1)=yes 7718 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7719 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7720 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7721 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7722 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7723 _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' 7724 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7725 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7726 fi 7727 output_verbose_link_cmd=func_echo_all 7728 else 7729 _LT_TAGVAR(ld_shlibs, $1)=no 7730 fi 7731 ;; 7732 7733 osf3* | osf4* | osf5*) 7734 case $cc_basename in 7735 KCC*) 7736 # Kuck and Associates, Inc. (KAI) C++ Compiler 7737 7738 # KCC will only create a shared library if the output file 7739 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7740 # to its proper name (with version) after linking. 7741 _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' 7742 7743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7744 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7745 7746 # Archives containing C++ object files must be created using 7747 # the KAI C++ compiler. 7748 case $host in 7749 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7750 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7751 esac 7752 ;; 7753 RCC*) 7754 # Rational C++ 2.4.1 7755 # FIXME: insert proper C++ library support 7756 _LT_TAGVAR(ld_shlibs, $1)=no 7757 ;; 7758 cxx*) 7759 case $host in 7760 osf3*) 7761 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7762 _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' 7763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7764 ;; 7765 *) 7766 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7767 _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' 7768 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7769 echo "-hidden">> $lib.exp~ 7770 $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~ 7771 $RM $lib.exp' 7772 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7773 ;; 7774 esac 7775 7776 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7777 7778 # Commands to make compiler produce verbose output that lists 7779 # what "hidden" libraries, object files and flags are used when 7780 # linking a shared library. 7781 # 7782 # There doesn't appear to be a way to prevent this compiler from 7783 # explicitly linking system object files so we need to strip them 7784 # from the output so that they don't get included in the library 7785 # dependencies. 7786 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"' 7787 ;; 7788 *) 7789 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7790 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7791 case $host in 7792 osf3*) 7793 _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' 7794 ;; 7795 *) 7796 _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' 7797 ;; 7798 esac 7799 7800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7801 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7802 7803 # Commands to make compiler produce verbose output that lists 7804 # what "hidden" libraries, object files and flags are used when 7805 # linking a shared library. 7806 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7807 7808 else 7809 # FIXME: insert proper C++ library support 7810 _LT_TAGVAR(ld_shlibs, $1)=no 7811 fi 7812 ;; 7813 esac 7814 ;; 7815 7816 psos*) 7817 # FIXME: insert proper C++ library support 7818 _LT_TAGVAR(ld_shlibs, $1)=no 7819 ;; 7820 7821 sunos4*) 7822 case $cc_basename in 7823 CC*) 7824 # Sun C++ 4.x 7825 # FIXME: insert proper C++ library support 7826 _LT_TAGVAR(ld_shlibs, $1)=no 7827 ;; 7828 lcc*) 7829 # Lucid 7830 # FIXME: insert proper C++ library support 7831 _LT_TAGVAR(ld_shlibs, $1)=no 7832 ;; 7833 *) 7834 # FIXME: insert proper C++ library support 7835 _LT_TAGVAR(ld_shlibs, $1)=no 7836 ;; 7837 esac 7838 ;; 7839 7840 solaris*) 7841 case $cc_basename in 7842 CC* | sunCC*) 7843 # Sun C++ 4.2, 5.x and Centerline C++ 7844 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7845 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7846 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7847 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7848 $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' 7849 7850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7851 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7852 case $host_os in 7853 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7854 *) 7855 # The compiler driver will combine and reorder linker options, 7856 # but understands `-z linker_flag'. 7857 # Supported since Solaris 2.6 (maybe 2.5.1?) 7858 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7859 ;; 7860 esac 7861 _LT_TAGVAR(link_all_deplibs, $1)=yes 7862 7863 output_verbose_link_cmd='func_echo_all' 7864 7865 # Archives containing C++ object files must be created using 7866 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7867 # necessary to make sure instantiated templates are included 7868 # in the archive. 7869 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7870 ;; 7871 gcx*) 7872 # Green Hills C++ Compiler 7873 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7874 7875 # The C++ compiler must be used to create the archive. 7876 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7877 ;; 7878 *) 7879 # GNU C++ compiler with Solaris linker 7880 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7881 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7882 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7883 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7884 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7885 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7886 7887 # Commands to make compiler produce verbose output that lists 7888 # what "hidden" libraries, object files and flags are used when 7889 # linking a shared library. 7890 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7891 else 7892 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7893 # platform. 7894 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7895 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7896 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7897 7898 # Commands to make compiler produce verbose output that lists 7899 # what "hidden" libraries, object files and flags are used when 7900 # linking a shared library. 7901 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7902 fi 7903 7904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7905 case $host_os in 7906 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7907 *) 7908 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7909 ;; 7910 esac 7911 fi 7912 ;; 7913 esac 7914 ;; 7915 7916 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7917 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7918 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7919 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7920 runpath_var='LD_RUN_PATH' 7921 7922 case $cc_basename in 7923 CC*) 7924 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7925 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7926 ;; 7927 *) 7928 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7929 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7930 ;; 7931 esac 7932 ;; 7933 7934 sysv5* | sco3.2v5* | sco5v6*) 7935 # Note: We can NOT use -z defs as we might desire, because we do not 7936 # link with -lc, and that would cause any symbols used from libc to 7937 # always be unresolved, which means just about no library would 7938 # ever link correctly. If we're not using GNU ld we use -z text 7939 # though, which does catch some bad symbols but isn't as heavy-handed 7940 # as -z defs. 7941 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7942 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7943 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7944 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7946 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7947 _LT_TAGVAR(link_all_deplibs, $1)=yes 7948 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7949 runpath_var='LD_RUN_PATH' 7950 7951 case $cc_basename in 7952 CC*) 7953 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7954 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7955 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7956 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7957 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7958 '"$_LT_TAGVAR(reload_cmds, $1)" 7959 ;; 7960 *) 7961 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7962 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7963 ;; 7964 esac 7965 ;; 7966 7967 tandem*) 7968 case $cc_basename in 7969 NCC*) 7970 # NonStop-UX NCC 3.20 7971 # FIXME: insert proper C++ library support 7972 _LT_TAGVAR(ld_shlibs, $1)=no 7973 ;; 7974 *) 7975 # FIXME: insert proper C++ library support 7976 _LT_TAGVAR(ld_shlibs, $1)=no 7977 ;; 7978 esac 7979 ;; 7980 7981 vxworks*) 7982 # FIXME: insert proper C++ library support 7983 _LT_TAGVAR(ld_shlibs, $1)=no 7984 ;; 7985 7986 *) 7987 # FIXME: insert proper C++ library support 7988 _LT_TAGVAR(ld_shlibs, $1)=no 7989 ;; 7990 esac 7991 7992 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7993 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7994 7995 _LT_TAGVAR(GCC, $1)="$GXX" 7996 _LT_TAGVAR(LD, $1)="$LD" 7997 7998 ## CAVEAT EMPTOR: 7999 ## There is no encapsulation within the following macros, do not change 8000 ## the running order or otherwise move them around unless you know exactly 8001 ## what you are doing... 8002 _LT_SYS_HIDDEN_LIBDEPS($1) 8003 _LT_COMPILER_PIC($1) 8004 _LT_COMPILER_C_O($1) 8005 _LT_COMPILER_FILE_LOCKS($1) 8006 _LT_LINKER_SHLIBS($1) 8007 _LT_SYS_DYNAMIC_LINKER($1) 8008 _LT_LINKER_HARDCODE_LIBPATH($1) 8009 8010 _LT_CONFIG($1) 8011 fi # test -n "$compiler" 8012 8013 CC=$lt_save_CC 8014 CFLAGS=$lt_save_CFLAGS 8015 LDCXX=$LD 8016 LD=$lt_save_LD 8017 GCC=$lt_save_GCC 8018 with_gnu_ld=$lt_save_with_gnu_ld 8019 lt_cv_path_LDCXX=$lt_cv_path_LD 8020 lt_cv_path_LD=$lt_save_path_LD 8021 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8022 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8023fi # test "$_lt_caught_CXX_error" != yes 8024 8025AC_LANG_POP 8026])# _LT_LANG_CXX_CONFIG 8027 8028 8029# _LT_FUNC_STRIPNAME_CNF 8030# ---------------------- 8031# func_stripname_cnf prefix suffix name 8032# strip PREFIX and SUFFIX off of NAME. 8033# PREFIX and SUFFIX must not contain globbing or regex special 8034# characters, hashes, percent signs, but SUFFIX may contain a leading 8035# dot (in which case that matches only a dot). 8036# 8037# This function is identical to the (non-XSI) version of func_stripname, 8038# except this one can be used by m4 code that may be executed by configure, 8039# rather than the libtool script. 8040m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 8041AC_REQUIRE([_LT_DECL_SED]) 8042AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 8043func_stripname_cnf () 8044{ 8045 case ${2} in 8046 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8047 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8048 esac 8049} # func_stripname_cnf 8050])# _LT_FUNC_STRIPNAME_CNF 8051 8052# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8053# --------------------------------- 8054# Figure out "hidden" library dependencies from verbose 8055# compiler output when linking a shared library. 8056# Parse the compiler output and extract the necessary 8057# objects, libraries and library flags. 8058m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8059[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8060AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8061# Dependencies to place before and after the object being linked: 8062_LT_TAGVAR(predep_objects, $1)= 8063_LT_TAGVAR(postdep_objects, $1)= 8064_LT_TAGVAR(predeps, $1)= 8065_LT_TAGVAR(postdeps, $1)= 8066_LT_TAGVAR(compiler_lib_search_path, $1)= 8067 8068dnl we can't use the lt_simple_compile_test_code here, 8069dnl because it contains code intended for an executable, 8070dnl not a library. It's possible we should let each 8071dnl tag define a new lt_????_link_test_code variable, 8072dnl but it's only used here... 8073m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8074int a; 8075void foo (void) { a = 0; } 8076_LT_EOF 8077], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8078class Foo 8079{ 8080public: 8081 Foo (void) { a = 0; } 8082private: 8083 int a; 8084}; 8085_LT_EOF 8086], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8087 subroutine foo 8088 implicit none 8089 integer*4 a 8090 a=0 8091 return 8092 end 8093_LT_EOF 8094], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8095 subroutine foo 8096 implicit none 8097 integer a 8098 a=0 8099 return 8100 end 8101_LT_EOF 8102], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8103public class foo { 8104 private int a; 8105 public void bar (void) { 8106 a = 0; 8107 } 8108}; 8109_LT_EOF 8110], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8111package foo 8112func foo() { 8113} 8114_LT_EOF 8115]) 8116 8117_lt_libdeps_save_CFLAGS=$CFLAGS 8118case "$CC $CFLAGS " in #( 8119*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8120*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8121*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8122esac 8123 8124dnl Parse the compiler output and extract the necessary 8125dnl objects, libraries and library flags. 8126if AC_TRY_EVAL(ac_compile); then 8127 # Parse the compiler output and extract the necessary 8128 # objects, libraries and library flags. 8129 8130 # Sentinel used to keep track of whether or not we are before 8131 # the conftest object file. 8132 pre_test_object_deps_done=no 8133 8134 for p in `eval "$output_verbose_link_cmd"`; do 8135 case ${prev}${p} in 8136 8137 -L* | -R* | -l*) 8138 # Some compilers place space between "-{L,R}" and the path. 8139 # Remove the space. 8140 if test $p = "-L" || 8141 test $p = "-R"; then 8142 prev=$p 8143 continue 8144 fi 8145 8146 # Expand the sysroot to ease extracting the directories later. 8147 if test -z "$prev"; then 8148 case $p in 8149 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8150 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8151 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8152 esac 8153 fi 8154 case $p in 8155 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8156 esac 8157 if test "$pre_test_object_deps_done" = no; then 8158 case ${prev} in 8159 -L | -R) 8160 # Internal compiler library paths should come after those 8161 # provided the user. The postdeps already come after the 8162 # user supplied libs so there is no need to process them. 8163 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8164 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8165 else 8166 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8167 fi 8168 ;; 8169 # The "-l" case would never come before the object being 8170 # linked, so don't bother handling this case. 8171 esac 8172 else 8173 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8174 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8175 else 8176 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8177 fi 8178 fi 8179 prev= 8180 ;; 8181 8182 *.lto.$objext) ;; # Ignore GCC LTO objects 8183 *.$objext) 8184 # This assumes that the test object file only shows up 8185 # once in the compiler output. 8186 if test "$p" = "conftest.$objext"; then 8187 pre_test_object_deps_done=yes 8188 continue 8189 fi 8190 8191 if test "$pre_test_object_deps_done" = no; then 8192 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8193 _LT_TAGVAR(predep_objects, $1)="$p" 8194 else 8195 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8196 fi 8197 else 8198 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8199 _LT_TAGVAR(postdep_objects, $1)="$p" 8200 else 8201 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8202 fi 8203 fi 8204 ;; 8205 8206 *) ;; # Ignore the rest. 8207 8208 esac 8209 done 8210 8211 # Clean up. 8212 rm -f a.out a.exe 8213else 8214 echo "libtool.m4: error: problem compiling $1 test program" 8215fi 8216 8217$RM -f confest.$objext 8218CFLAGS=$_lt_libdeps_save_CFLAGS 8219 8220# PORTME: override above test on systems where it is broken 8221m4_if([$1], [CXX], 8222[case $host_os in 8223interix[[3-9]]*) 8224 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8225 # hack all around it, let's just trust "g++" to DTRT. 8226 _LT_TAGVAR(predep_objects,$1)= 8227 _LT_TAGVAR(postdep_objects,$1)= 8228 _LT_TAGVAR(postdeps,$1)= 8229 ;; 8230 8231linux*) 8232 case `$CC -V 2>&1 | sed 5q` in 8233 *Sun\ C*) 8234 # Sun C++ 5.9 8235 8236 # The more standards-conforming stlport4 library is 8237 # incompatible with the Cstd library. Avoid specifying 8238 # it if it's in CXXFLAGS. Ignore libCrun as 8239 # -library=stlport4 depends on it. 8240 case " $CXX $CXXFLAGS " in 8241 *" -library=stlport4 "*) 8242 solaris_use_stlport4=yes 8243 ;; 8244 esac 8245 8246 if test "$solaris_use_stlport4" != yes; then 8247 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8248 fi 8249 ;; 8250 esac 8251 ;; 8252 8253solaris*) 8254 case $cc_basename in 8255 CC* | sunCC*) 8256 # The more standards-conforming stlport4 library is 8257 # incompatible with the Cstd library. Avoid specifying 8258 # it if it's in CXXFLAGS. Ignore libCrun as 8259 # -library=stlport4 depends on it. 8260 case " $CXX $CXXFLAGS " in 8261 *" -library=stlport4 "*) 8262 solaris_use_stlport4=yes 8263 ;; 8264 esac 8265 8266 # Adding this requires a known-good setup of shared libraries for 8267 # Sun compiler versions before 5.6, else PIC objects from an old 8268 # archive will be linked into the output, leading to subtle bugs. 8269 if test "$solaris_use_stlport4" != yes; then 8270 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8271 fi 8272 ;; 8273 esac 8274 ;; 8275esac 8276]) 8277 8278case " $_LT_TAGVAR(postdeps, $1) " in 8279*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8280esac 8281 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8282if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8283 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8284fi 8285_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8286 [The directories searched by this compiler when creating a shared library]) 8287_LT_TAGDECL([], [predep_objects], [1], 8288 [Dependencies to place before and after the objects being linked to 8289 create a shared library]) 8290_LT_TAGDECL([], [postdep_objects], [1]) 8291_LT_TAGDECL([], [predeps], [1]) 8292_LT_TAGDECL([], [postdeps], [1]) 8293_LT_TAGDECL([], [compiler_lib_search_path], [1], 8294 [The library search path used internally by the compiler when linking 8295 a shared library]) 8296])# _LT_SYS_HIDDEN_LIBDEPS 8297 8298 8299# _LT_LANG_F77_CONFIG([TAG]) 8300# -------------------------- 8301# Ensure that the configuration variables for a Fortran 77 compiler are 8302# suitably defined. These variables are subsequently used by _LT_CONFIG 8303# to write the compiler configuration to `libtool'. 8304m4_defun([_LT_LANG_F77_CONFIG], 8305[AC_LANG_PUSH(Fortran 77) 8306if test -z "$F77" || test "X$F77" = "Xno"; then 8307 _lt_disable_F77=yes 8308fi 8309 8310_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8311_LT_TAGVAR(allow_undefined_flag, $1)= 8312_LT_TAGVAR(always_export_symbols, $1)=no 8313_LT_TAGVAR(archive_expsym_cmds, $1)= 8314_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8315_LT_TAGVAR(hardcode_direct, $1)=no 8316_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8317_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8318_LT_TAGVAR(hardcode_libdir_separator, $1)= 8319_LT_TAGVAR(hardcode_minus_L, $1)=no 8320_LT_TAGVAR(hardcode_automatic, $1)=no 8321_LT_TAGVAR(inherit_rpath, $1)=no 8322_LT_TAGVAR(module_cmds, $1)= 8323_LT_TAGVAR(module_expsym_cmds, $1)= 8324_LT_TAGVAR(link_all_deplibs, $1)=unknown 8325_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8326_LT_TAGVAR(reload_flag, $1)=$reload_flag 8327_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8328_LT_TAGVAR(no_undefined_flag, $1)= 8329_LT_TAGVAR(whole_archive_flag_spec, $1)= 8330_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8331 8332# Source file extension for f77 test sources. 8333ac_ext=f 8334 8335# Object file extension for compiled f77 test sources. 8336objext=o 8337_LT_TAGVAR(objext, $1)=$objext 8338 8339# No sense in running all these tests if we already determined that 8340# the F77 compiler isn't working. Some variables (like enable_shared) 8341# are currently assumed to apply to all compilers on this platform, 8342# and will be corrupted by setting them based on a non-working compiler. 8343if test "$_lt_disable_F77" != yes; then 8344 # Code to be used in simple compile tests 8345 lt_simple_compile_test_code="\ 8346 subroutine t 8347 return 8348 end 8349" 8350 8351 # Code to be used in simple link tests 8352 lt_simple_link_test_code="\ 8353 program t 8354 end 8355" 8356 8357 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8358 _LT_TAG_COMPILER 8359 8360 # save warnings/boilerplate of simple test code 8361 _LT_COMPILER_BOILERPLATE 8362 _LT_LINKER_BOILERPLATE 8363 8364 # Allow CC to be a program name with arguments. 8365 lt_save_CC="$CC" 8366 lt_save_GCC=$GCC 8367 lt_save_CFLAGS=$CFLAGS 8368 CC=${F77-"f77"} 8369 CFLAGS=$FFLAGS 8370 compiler=$CC 8371 _LT_TAGVAR(compiler, $1)=$CC 8372 _LT_CC_BASENAME([$compiler]) 8373 GCC=$G77 8374 if test -n "$compiler"; then 8375 AC_MSG_CHECKING([if libtool supports shared libraries]) 8376 AC_MSG_RESULT([$can_build_shared]) 8377 8378 AC_MSG_CHECKING([whether to build shared libraries]) 8379 test "$can_build_shared" = "no" && enable_shared=no 8380 8381 # On AIX, shared libraries and static libraries use the same namespace, and 8382 # are all built from PIC. 8383 case $host_os in 8384 aix3*) 8385 test "$enable_shared" = yes && enable_static=no 8386 if test -n "$RANLIB"; then 8387 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8388 postinstall_cmds='$RANLIB $lib' 8389 fi 8390 ;; 8391 aix[[4-9]]*) 8392 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8393 test "$enable_shared" = yes && enable_static=no 8394 fi 8395 ;; 8396 esac 8397 AC_MSG_RESULT([$enable_shared]) 8398 8399 AC_MSG_CHECKING([whether to build static libraries]) 8400 # Make sure either enable_shared or enable_static is yes. 8401 test "$enable_shared" = yes || enable_static=yes 8402 AC_MSG_RESULT([$enable_static]) 8403 8404 _LT_TAGVAR(GCC, $1)="$G77" 8405 _LT_TAGVAR(LD, $1)="$LD" 8406 8407 ## CAVEAT EMPTOR: 8408 ## There is no encapsulation within the following macros, do not change 8409 ## the running order or otherwise move them around unless you know exactly 8410 ## what you are doing... 8411 _LT_COMPILER_PIC($1) 8412 _LT_COMPILER_C_O($1) 8413 _LT_COMPILER_FILE_LOCKS($1) 8414 _LT_LINKER_SHLIBS($1) 8415 _LT_SYS_DYNAMIC_LINKER($1) 8416 _LT_LINKER_HARDCODE_LIBPATH($1) 8417 8418 _LT_CONFIG($1) 8419 fi # test -n "$compiler" 8420 8421 GCC=$lt_save_GCC 8422 CC="$lt_save_CC" 8423 CFLAGS="$lt_save_CFLAGS" 8424fi # test "$_lt_disable_F77" != yes 8425 8426AC_LANG_POP 8427])# _LT_LANG_F77_CONFIG 8428 8429 8430# _LT_LANG_FC_CONFIG([TAG]) 8431# ------------------------- 8432# Ensure that the configuration variables for a Fortran compiler are 8433# suitably defined. These variables are subsequently used by _LT_CONFIG 8434# to write the compiler configuration to `libtool'. 8435m4_defun([_LT_LANG_FC_CONFIG], 8436[AC_LANG_PUSH(Fortran) 8437 8438if test -z "$FC" || test "X$FC" = "Xno"; then 8439 _lt_disable_FC=yes 8440fi 8441 8442_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8443_LT_TAGVAR(allow_undefined_flag, $1)= 8444_LT_TAGVAR(always_export_symbols, $1)=no 8445_LT_TAGVAR(archive_expsym_cmds, $1)= 8446_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8447_LT_TAGVAR(hardcode_direct, $1)=no 8448_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8449_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8450_LT_TAGVAR(hardcode_libdir_separator, $1)= 8451_LT_TAGVAR(hardcode_minus_L, $1)=no 8452_LT_TAGVAR(hardcode_automatic, $1)=no 8453_LT_TAGVAR(inherit_rpath, $1)=no 8454_LT_TAGVAR(module_cmds, $1)= 8455_LT_TAGVAR(module_expsym_cmds, $1)= 8456_LT_TAGVAR(link_all_deplibs, $1)=unknown 8457_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8458_LT_TAGVAR(reload_flag, $1)=$reload_flag 8459_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8460_LT_TAGVAR(no_undefined_flag, $1)= 8461_LT_TAGVAR(whole_archive_flag_spec, $1)= 8462_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8463 8464# Source file extension for fc test sources. 8465ac_ext=${ac_fc_srcext-f} 8466 8467# Object file extension for compiled fc test sources. 8468objext=o 8469_LT_TAGVAR(objext, $1)=$objext 8470 8471# No sense in running all these tests if we already determined that 8472# the FC compiler isn't working. Some variables (like enable_shared) 8473# are currently assumed to apply to all compilers on this platform, 8474# and will be corrupted by setting them based on a non-working compiler. 8475if test "$_lt_disable_FC" != yes; then 8476 # Code to be used in simple compile tests 8477 lt_simple_compile_test_code="\ 8478 subroutine t 8479 return 8480 end 8481" 8482 8483 # Code to be used in simple link tests 8484 lt_simple_link_test_code="\ 8485 program t 8486 end 8487" 8488 8489 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8490 _LT_TAG_COMPILER 8491 8492 # save warnings/boilerplate of simple test code 8493 _LT_COMPILER_BOILERPLATE 8494 _LT_LINKER_BOILERPLATE 8495 8496 # Allow CC to be a program name with arguments. 8497 lt_save_CC="$CC" 8498 lt_save_GCC=$GCC 8499 lt_save_CFLAGS=$CFLAGS 8500 CC=${FC-"f95"} 8501 CFLAGS=$FCFLAGS 8502 compiler=$CC 8503 GCC=$ac_cv_fc_compiler_gnu 8504 8505 _LT_TAGVAR(compiler, $1)=$CC 8506 _LT_CC_BASENAME([$compiler]) 8507 8508 if test -n "$compiler"; then 8509 AC_MSG_CHECKING([if libtool supports shared libraries]) 8510 AC_MSG_RESULT([$can_build_shared]) 8511 8512 AC_MSG_CHECKING([whether to build shared libraries]) 8513 test "$can_build_shared" = "no" && enable_shared=no 8514 8515 # On AIX, shared libraries and static libraries use the same namespace, and 8516 # are all built from PIC. 8517 case $host_os in 8518 aix3*) 8519 test "$enable_shared" = yes && enable_static=no 8520 if test -n "$RANLIB"; then 8521 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8522 postinstall_cmds='$RANLIB $lib' 8523 fi 8524 ;; 8525 aix[[4-9]]*) 8526 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8527 test "$enable_shared" = yes && enable_static=no 8528 fi 8529 ;; 8530 esac 8531 AC_MSG_RESULT([$enable_shared]) 8532 8533 AC_MSG_CHECKING([whether to build static libraries]) 8534 # Make sure either enable_shared or enable_static is yes. 8535 test "$enable_shared" = yes || enable_static=yes 8536 AC_MSG_RESULT([$enable_static]) 8537 8538 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8539 _LT_TAGVAR(LD, $1)="$LD" 8540 8541 ## CAVEAT EMPTOR: 8542 ## There is no encapsulation within the following macros, do not change 8543 ## the running order or otherwise move them around unless you know exactly 8544 ## what you are doing... 8545 _LT_SYS_HIDDEN_LIBDEPS($1) 8546 _LT_COMPILER_PIC($1) 8547 _LT_COMPILER_C_O($1) 8548 _LT_COMPILER_FILE_LOCKS($1) 8549 _LT_LINKER_SHLIBS($1) 8550 _LT_SYS_DYNAMIC_LINKER($1) 8551 _LT_LINKER_HARDCODE_LIBPATH($1) 8552 8553 _LT_CONFIG($1) 8554 fi # test -n "$compiler" 8555 8556 GCC=$lt_save_GCC 8557 CC=$lt_save_CC 8558 CFLAGS=$lt_save_CFLAGS 8559fi # test "$_lt_disable_FC" != yes 8560 8561AC_LANG_POP 8562])# _LT_LANG_FC_CONFIG 8563 8564 8565# _LT_LANG_GCJ_CONFIG([TAG]) 8566# -------------------------- 8567# Ensure that the configuration variables for the GNU Java Compiler compiler 8568# are suitably defined. These variables are subsequently used by _LT_CONFIG 8569# to write the compiler configuration to `libtool'. 8570m4_defun([_LT_LANG_GCJ_CONFIG], 8571[AC_REQUIRE([LT_PROG_GCJ])dnl 8572AC_LANG_SAVE 8573 8574# Source file extension for Java test sources. 8575ac_ext=java 8576 8577# Object file extension for compiled Java test sources. 8578objext=o 8579_LT_TAGVAR(objext, $1)=$objext 8580 8581# Code to be used in simple compile tests 8582lt_simple_compile_test_code="class foo {}" 8583 8584# Code to be used in simple link tests 8585lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8586 8587# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8588_LT_TAG_COMPILER 8589 8590# save warnings/boilerplate of simple test code 8591_LT_COMPILER_BOILERPLATE 8592_LT_LINKER_BOILERPLATE 8593 8594# Allow CC to be a program name with arguments. 8595lt_save_CC=$CC 8596lt_save_CFLAGS=$CFLAGS 8597lt_save_GCC=$GCC 8598GCC=yes 8599CC=${GCJ-"gcj"} 8600CFLAGS=$GCJFLAGS 8601compiler=$CC 8602_LT_TAGVAR(compiler, $1)=$CC 8603_LT_TAGVAR(LD, $1)="$LD" 8604_LT_CC_BASENAME([$compiler]) 8605 8606# GCJ did not exist at the time GCC didn't implicitly link libc in. 8607_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8608 8609_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8610_LT_TAGVAR(reload_flag, $1)=$reload_flag 8611_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8612 8613if test -n "$compiler"; then 8614 _LT_COMPILER_NO_RTTI($1) 8615 _LT_COMPILER_PIC($1) 8616 _LT_COMPILER_C_O($1) 8617 _LT_COMPILER_FILE_LOCKS($1) 8618 _LT_LINKER_SHLIBS($1) 8619 _LT_LINKER_HARDCODE_LIBPATH($1) 8620 8621 _LT_CONFIG($1) 8622fi 8623 8624AC_LANG_RESTORE 8625 8626GCC=$lt_save_GCC 8627CC=$lt_save_CC 8628CFLAGS=$lt_save_CFLAGS 8629])# _LT_LANG_GCJ_CONFIG 8630 8631 8632# _LT_LANG_GO_CONFIG([TAG]) 8633# -------------------------- 8634# Ensure that the configuration variables for the GNU Go compiler 8635# are suitably defined. These variables are subsequently used by _LT_CONFIG 8636# to write the compiler configuration to `libtool'. 8637m4_defun([_LT_LANG_GO_CONFIG], 8638[AC_REQUIRE([LT_PROG_GO])dnl 8639AC_LANG_SAVE 8640 8641# Source file extension for Go test sources. 8642ac_ext=go 8643 8644# Object file extension for compiled Go test sources. 8645objext=o 8646_LT_TAGVAR(objext, $1)=$objext 8647 8648# Code to be used in simple compile tests 8649lt_simple_compile_test_code="package main; func main() { }" 8650 8651# Code to be used in simple link tests 8652lt_simple_link_test_code='package main; func main() { }' 8653 8654# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8655_LT_TAG_COMPILER 8656 8657# save warnings/boilerplate of simple test code 8658_LT_COMPILER_BOILERPLATE 8659_LT_LINKER_BOILERPLATE 8660 8661# Allow CC to be a program name with arguments. 8662lt_save_CC=$CC 8663lt_save_CFLAGS=$CFLAGS 8664lt_save_GCC=$GCC 8665GCC=yes 8666CC=${GOC-"gccgo"} 8667CFLAGS=$GOFLAGS 8668compiler=$CC 8669_LT_TAGVAR(compiler, $1)=$CC 8670_LT_TAGVAR(LD, $1)="$LD" 8671_LT_CC_BASENAME([$compiler]) 8672 8673# Go did not exist at the time GCC didn't implicitly link libc in. 8674_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8675 8676_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8677_LT_TAGVAR(reload_flag, $1)=$reload_flag 8678_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8679 8680if test -n "$compiler"; then 8681 _LT_COMPILER_NO_RTTI($1) 8682 _LT_COMPILER_PIC($1) 8683 _LT_COMPILER_C_O($1) 8684 _LT_COMPILER_FILE_LOCKS($1) 8685 _LT_LINKER_SHLIBS($1) 8686 _LT_LINKER_HARDCODE_LIBPATH($1) 8687 8688 _LT_CONFIG($1) 8689fi 8690 8691AC_LANG_RESTORE 8692 8693GCC=$lt_save_GCC 8694CC=$lt_save_CC 8695CFLAGS=$lt_save_CFLAGS 8696])# _LT_LANG_GO_CONFIG 8697 8698 8699# _LT_LANG_RC_CONFIG([TAG]) 8700# ------------------------- 8701# Ensure that the configuration variables for the Windows resource compiler 8702# are suitably defined. These variables are subsequently used by _LT_CONFIG 8703# to write the compiler configuration to `libtool'. 8704m4_defun([_LT_LANG_RC_CONFIG], 8705[AC_REQUIRE([LT_PROG_RC])dnl 8706AC_LANG_SAVE 8707 8708# Source file extension for RC test sources. 8709ac_ext=rc 8710 8711# Object file extension for compiled RC test sources. 8712objext=o 8713_LT_TAGVAR(objext, $1)=$objext 8714 8715# Code to be used in simple compile tests 8716lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8717 8718# Code to be used in simple link tests 8719lt_simple_link_test_code="$lt_simple_compile_test_code" 8720 8721# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8722_LT_TAG_COMPILER 8723 8724# save warnings/boilerplate of simple test code 8725_LT_COMPILER_BOILERPLATE 8726_LT_LINKER_BOILERPLATE 8727 8728# Allow CC to be a program name with arguments. 8729lt_save_CC="$CC" 8730lt_save_CFLAGS=$CFLAGS 8731lt_save_GCC=$GCC 8732GCC= 8733CC=${RC-"windres"} 8734CFLAGS= 8735compiler=$CC 8736_LT_TAGVAR(compiler, $1)=$CC 8737_LT_CC_BASENAME([$compiler]) 8738_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8739 8740if test -n "$compiler"; then 8741 : 8742 _LT_CONFIG($1) 8743fi 8744 8745GCC=$lt_save_GCC 8746AC_LANG_RESTORE 8747CC=$lt_save_CC 8748CFLAGS=$lt_save_CFLAGS 8749])# _LT_LANG_RC_CONFIG 8750 8751 8752# LT_PROG_GCJ 8753# ----------- 8754AC_DEFUN([LT_PROG_GCJ], 8755[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8756 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8757 [AC_CHECK_TOOL(GCJ, gcj,) 8758 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8759 AC_SUBST(GCJFLAGS)])])[]dnl 8760]) 8761 8762# Old name: 8763AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8764dnl aclocal-1.4 backwards compatibility: 8765dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8766 8767 8768# LT_PROG_GO 8769# ---------- 8770AC_DEFUN([LT_PROG_GO], 8771[AC_CHECK_TOOL(GOC, gccgo,) 8772]) 8773 8774 8775# LT_PROG_RC 8776# ---------- 8777AC_DEFUN([LT_PROG_RC], 8778[AC_CHECK_TOOL(RC, windres,) 8779]) 8780 8781# Old name: 8782AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8783dnl aclocal-1.4 backwards compatibility: 8784dnl AC_DEFUN([LT_AC_PROG_RC], []) 8785 8786 8787# _LT_DECL_EGREP 8788# -------------- 8789# If we don't have a new enough Autoconf to choose the best grep 8790# available, choose the one first in the user's PATH. 8791m4_defun([_LT_DECL_EGREP], 8792[AC_REQUIRE([AC_PROG_EGREP])dnl 8793AC_REQUIRE([AC_PROG_FGREP])dnl 8794test -z "$GREP" && GREP=grep 8795_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8796_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8797_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8798dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8799AC_SUBST([GREP]) 8800]) 8801 8802 8803# _LT_DECL_OBJDUMP 8804# -------------- 8805# If we don't have a new enough Autoconf to choose the best objdump 8806# available, choose the one first in the user's PATH. 8807m4_defun([_LT_DECL_OBJDUMP], 8808[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8809test -z "$OBJDUMP" && OBJDUMP=objdump 8810_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8811AC_SUBST([OBJDUMP]) 8812]) 8813 8814# _LT_DECL_DLLTOOL 8815# ---------------- 8816# Ensure DLLTOOL variable is set. 8817m4_defun([_LT_DECL_DLLTOOL], 8818[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8819test -z "$DLLTOOL" && DLLTOOL=dlltool 8820_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8821AC_SUBST([DLLTOOL]) 8822]) 8823 8824# _LT_DECL_SED 8825# ------------ 8826# Check for a fully-functional sed program, that truncates 8827# as few characters as possible. Prefer GNU sed if found. 8828m4_defun([_LT_DECL_SED], 8829[AC_PROG_SED 8830test -z "$SED" && SED=sed 8831Xsed="$SED -e 1s/^X//" 8832_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8833_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8834 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8835])# _LT_DECL_SED 8836 8837m4_ifndef([AC_PROG_SED], [ 8838# NOTE: This macro has been submitted for inclusion into # 8839# GNU Autoconf as AC_PROG_SED. When it is available in # 8840# a released version of Autoconf we should remove this # 8841# macro and use it instead. # 8842 8843m4_defun([AC_PROG_SED], 8844[AC_MSG_CHECKING([for a sed that does not truncate output]) 8845AC_CACHE_VAL(lt_cv_path_SED, 8846[# Loop through the user's path and test for sed and gsed. 8847# Then use that list of sed's as ones to test for truncation. 8848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8849for as_dir in $PATH 8850do 8851 IFS=$as_save_IFS 8852 test -z "$as_dir" && as_dir=. 8853 for lt_ac_prog in sed gsed; do 8854 for ac_exec_ext in '' $ac_executable_extensions; do 8855 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8856 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8857 fi 8858 done 8859 done 8860done 8861IFS=$as_save_IFS 8862lt_ac_max=0 8863lt_ac_count=0 8864# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8865# along with /bin/sed that truncates output. 8866for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8867 test ! -f $lt_ac_sed && continue 8868 cat /dev/null > conftest.in 8869 lt_ac_count=0 8870 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8871 # Check for GNU sed and select it if it is found. 8872 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8873 lt_cv_path_SED=$lt_ac_sed 8874 break 8875 fi 8876 while true; do 8877 cat conftest.in conftest.in >conftest.tmp 8878 mv conftest.tmp conftest.in 8879 cp conftest.in conftest.nl 8880 echo >>conftest.nl 8881 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8882 cmp -s conftest.out conftest.nl || break 8883 # 10000 chars as input seems more than enough 8884 test $lt_ac_count -gt 10 && break 8885 lt_ac_count=`expr $lt_ac_count + 1` 8886 if test $lt_ac_count -gt $lt_ac_max; then 8887 lt_ac_max=$lt_ac_count 8888 lt_cv_path_SED=$lt_ac_sed 8889 fi 8890 done 8891done 8892]) 8893SED=$lt_cv_path_SED 8894AC_SUBST([SED]) 8895AC_MSG_RESULT([$SED]) 8896])#AC_PROG_SED 8897])#m4_ifndef 8898 8899# Old name: 8900AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8901dnl aclocal-1.4 backwards compatibility: 8902dnl AC_DEFUN([LT_AC_PROG_SED], []) 8903 8904 8905# _LT_CHECK_SHELL_FEATURES 8906# ------------------------ 8907# Find out whether the shell is Bourne or XSI compatible, 8908# or has some other useful features. 8909m4_defun([_LT_CHECK_SHELL_FEATURES], 8910[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8911# Try some XSI features 8912xsi_shell=no 8913( _lt_dummy="a/b/c" 8914 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8915 = c,a/b,b/c, \ 8916 && eval 'test $(( 1 + 1 )) -eq 2 \ 8917 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8918 && xsi_shell=yes 8919AC_MSG_RESULT([$xsi_shell]) 8920_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8921 8922AC_MSG_CHECKING([whether the shell understands "+="]) 8923lt_shell_append=no 8924( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8925 >/dev/null 2>&1 \ 8926 && lt_shell_append=yes 8927AC_MSG_RESULT([$lt_shell_append]) 8928_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8929 8930if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8931 lt_unset=unset 8932else 8933 lt_unset=false 8934fi 8935_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8936 8937# test EBCDIC or ASCII 8938case `echo X|tr X '\101'` in 8939 A) # ASCII based system 8940 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8941 lt_SP2NL='tr \040 \012' 8942 lt_NL2SP='tr \015\012 \040\040' 8943 ;; 8944 *) # EBCDIC based system 8945 lt_SP2NL='tr \100 \n' 8946 lt_NL2SP='tr \r\n \100\100' 8947 ;; 8948esac 8949_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8950_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8951])# _LT_CHECK_SHELL_FEATURES 8952 8953 8954# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8955# ------------------------------------------------------ 8956# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8957# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8958m4_defun([_LT_PROG_FUNCTION_REPLACE], 8959[dnl { 8960sed -e '/^$1 ()$/,/^} # $1 /c\ 8961$1 ()\ 8962{\ 8963m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8964} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8965 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8966 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8967test 0 -eq $? || _lt_function_replace_fail=: 8968]) 8969 8970 8971# _LT_PROG_REPLACE_SHELLFNS 8972# ------------------------- 8973# Replace existing portable implementations of several shell functions with 8974# equivalent extended shell implementations where those features are available.. 8975m4_defun([_LT_PROG_REPLACE_SHELLFNS], 8976[if test x"$xsi_shell" = xyes; then 8977 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8978 case ${1} in 8979 */*) func_dirname_result="${1%/*}${2}" ;; 8980 * ) func_dirname_result="${3}" ;; 8981 esac]) 8982 8983 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8984 func_basename_result="${1##*/}"]) 8985 8986 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8987 case ${1} in 8988 */*) func_dirname_result="${1%/*}${2}" ;; 8989 * ) func_dirname_result="${3}" ;; 8990 esac 8991 func_basename_result="${1##*/}"]) 8992 8993 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8994 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8995 # positional parameters, so assign one to ordinary parameter first. 8996 func_stripname_result=${3} 8997 func_stripname_result=${func_stripname_result#"${1}"} 8998 func_stripname_result=${func_stripname_result%"${2}"}]) 8999 9000 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 9001 func_split_long_opt_name=${1%%=*} 9002 func_split_long_opt_arg=${1#*=}]) 9003 9004 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 9005 func_split_short_opt_arg=${1#??} 9006 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9007 9008 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 9009 case ${1} in 9010 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9011 *) func_lo2o_result=${1} ;; 9012 esac]) 9013 9014 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9015 9016 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9017 9018 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 9019fi 9020 9021if test x"$lt_shell_append" = xyes; then 9022 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 9023 9024 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 9025 func_quote_for_eval "${2}" 9026dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 9027 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 9028 9029 # Save a `func_append' function call where possible by direct use of '+=' 9030 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 9031 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9032 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9033 test 0 -eq $? || _lt_function_replace_fail=: 9034else 9035 # Save a `func_append' function call even when '+=' is not available 9036 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 9037 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9038 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9039 test 0 -eq $? || _lt_function_replace_fail=: 9040fi 9041 9042if test x"$_lt_function_replace_fail" = x":"; then 9043 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 9044fi 9045]) 9046 9047# _LT_PATH_CONVERSION_FUNCTIONS 9048# ----------------------------- 9049# Determine which file name conversion functions should be used by 9050# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 9051# for certain cross-compile configurations and native mingw. 9052m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 9053[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9054AC_REQUIRE([AC_CANONICAL_BUILD])dnl 9055AC_MSG_CHECKING([how to convert $build file names to $host format]) 9056AC_CACHE_VAL(lt_cv_to_host_file_cmd, 9057[case $host in 9058 *-*-mingw* ) 9059 case $build in 9060 *-*-mingw* ) # actually msys 9061 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 9062 ;; 9063 *-*-cygwin* ) 9064 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 9065 ;; 9066 * ) # otherwise, assume *nix 9067 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 9068 ;; 9069 esac 9070 ;; 9071 *-*-cygwin* ) 9072 case $build in 9073 *-*-mingw* ) # actually msys 9074 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 9075 ;; 9076 *-*-cygwin* ) 9077 lt_cv_to_host_file_cmd=func_convert_file_noop 9078 ;; 9079 * ) # otherwise, assume *nix 9080 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9081 ;; 9082 esac 9083 ;; 9084 * ) # unhandled hosts (and "normal" native builds) 9085 lt_cv_to_host_file_cmd=func_convert_file_noop 9086 ;; 9087esac 9088]) 9089to_host_file_cmd=$lt_cv_to_host_file_cmd 9090AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9091_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9092 [0], [convert $build file names to $host format])dnl 9093 9094AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9095AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9096[#assume ordinary cross tools, or native build. 9097lt_cv_to_tool_file_cmd=func_convert_file_noop 9098case $host in 9099 *-*-mingw* ) 9100 case $build in 9101 *-*-mingw* ) # actually msys 9102 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9103 ;; 9104 esac 9105 ;; 9106esac 9107]) 9108to_tool_file_cmd=$lt_cv_to_tool_file_cmd 9109AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9110_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9111 [0], [convert $build files to toolchain format])dnl 9112])# _LT_PATH_CONVERSION_FUNCTIONS 9113 9114# Helper functions for option handling. -*- Autoconf -*- 9115# 9116# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9117# Inc. 9118# Written by Gary V. Vaughan, 2004 9119# 9120# This file is free software; the Free Software Foundation gives 9121# unlimited permission to copy and/or distribute it, with or without 9122# modifications, as long as this notice is preserved. 9123 9124# serial 7 ltoptions.m4 9125 9126# This is to help aclocal find these macros, as it can't see m4_define. 9127AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9128 9129 9130# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9131# ------------------------------------------ 9132m4_define([_LT_MANGLE_OPTION], 9133[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9134 9135 9136# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9137# --------------------------------------- 9138# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9139# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9140# saved as a flag. 9141m4_define([_LT_SET_OPTION], 9142[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9143m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9144 _LT_MANGLE_DEFUN([$1], [$2]), 9145 [m4_warning([Unknown $1 option `$2'])])[]dnl 9146]) 9147 9148 9149# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9150# ------------------------------------------------------------ 9151# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9152m4_define([_LT_IF_OPTION], 9153[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9154 9155 9156# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9157# ------------------------------------------------------- 9158# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9159# are set. 9160m4_define([_LT_UNLESS_OPTIONS], 9161[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9162 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9163 [m4_define([$0_found])])])[]dnl 9164m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9165])[]dnl 9166]) 9167 9168 9169# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9170# ---------------------------------------- 9171# OPTION-LIST is a space-separated list of Libtool options associated 9172# with MACRO-NAME. If any OPTION has a matching handler declared with 9173# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9174# the unknown option and exit. 9175m4_defun([_LT_SET_OPTIONS], 9176[# Set options 9177m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9178 [_LT_SET_OPTION([$1], _LT_Option)]) 9179 9180m4_if([$1],[LT_INIT],[ 9181 dnl 9182 dnl Simply set some default values (i.e off) if boolean options were not 9183 dnl specified: 9184 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9185 ]) 9186 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9187 ]) 9188 dnl 9189 dnl If no reference was made to various pairs of opposing options, then 9190 dnl we run the default mode handler for the pair. For example, if neither 9191 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9192 dnl archives by default: 9193 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9194 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9195 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9196 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9197 [_LT_ENABLE_FAST_INSTALL]) 9198 ]) 9199])# _LT_SET_OPTIONS 9200 9201 9202 9203# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9204# ----------------------------------------- 9205m4_define([_LT_MANGLE_DEFUN], 9206[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9207 9208 9209# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9210# ----------------------------------------------- 9211m4_define([LT_OPTION_DEFINE], 9212[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9213])# LT_OPTION_DEFINE 9214 9215 9216# dlopen 9217# ------ 9218LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9219]) 9220 9221AU_DEFUN([AC_LIBTOOL_DLOPEN], 9222[_LT_SET_OPTION([LT_INIT], [dlopen]) 9223AC_DIAGNOSE([obsolete], 9224[$0: Remove this warning and the call to _LT_SET_OPTION when you 9225put the `dlopen' option into LT_INIT's first parameter.]) 9226]) 9227 9228dnl aclocal-1.4 backwards compatibility: 9229dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9230 9231 9232# win32-dll 9233# --------- 9234# Declare package support for building win32 dll's. 9235LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9236[enable_win32_dll=yes 9237 9238case $host in 9239*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9240 AC_CHECK_TOOL(AS, as, false) 9241 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9242 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9243 ;; 9244esac 9245 9246test -z "$AS" && AS=as 9247_LT_DECL([], [AS], [1], [Assembler program])dnl 9248 9249test -z "$DLLTOOL" && DLLTOOL=dlltool 9250_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9251 9252test -z "$OBJDUMP" && OBJDUMP=objdump 9253_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9254])# win32-dll 9255 9256AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9257[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9258_LT_SET_OPTION([LT_INIT], [win32-dll]) 9259AC_DIAGNOSE([obsolete], 9260[$0: Remove this warning and the call to _LT_SET_OPTION when you 9261put the `win32-dll' option into LT_INIT's first parameter.]) 9262]) 9263 9264dnl aclocal-1.4 backwards compatibility: 9265dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9266 9267 9268# _LT_ENABLE_SHARED([DEFAULT]) 9269# ---------------------------- 9270# implement the --enable-shared flag, and supports the `shared' and 9271# `disable-shared' LT_INIT options. 9272# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9273m4_define([_LT_ENABLE_SHARED], 9274[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9275AC_ARG_ENABLE([shared], 9276 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9277 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9278 [p=${PACKAGE-default} 9279 case $enableval in 9280 yes) enable_shared=yes ;; 9281 no) enable_shared=no ;; 9282 *) 9283 enable_shared=no 9284 # Look at the argument we got. We use all the common list separators. 9285 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9286 for pkg in $enableval; do 9287 IFS="$lt_save_ifs" 9288 if test "X$pkg" = "X$p"; then 9289 enable_shared=yes 9290 fi 9291 done 9292 IFS="$lt_save_ifs" 9293 ;; 9294 esac], 9295 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9296 9297 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9298 [Whether or not to build shared libraries]) 9299])# _LT_ENABLE_SHARED 9300 9301LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9302LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9303 9304# Old names: 9305AC_DEFUN([AC_ENABLE_SHARED], 9306[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9307]) 9308 9309AC_DEFUN([AC_DISABLE_SHARED], 9310[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9311]) 9312 9313AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9314AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9315 9316dnl aclocal-1.4 backwards compatibility: 9317dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9318dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9319 9320 9321 9322# _LT_ENABLE_STATIC([DEFAULT]) 9323# ---------------------------- 9324# implement the --enable-static flag, and support the `static' and 9325# `disable-static' LT_INIT options. 9326# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9327m4_define([_LT_ENABLE_STATIC], 9328[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9329AC_ARG_ENABLE([static], 9330 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9331 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9332 [p=${PACKAGE-default} 9333 case $enableval in 9334 yes) enable_static=yes ;; 9335 no) enable_static=no ;; 9336 *) 9337 enable_static=no 9338 # Look at the argument we got. We use all the common list separators. 9339 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9340 for pkg in $enableval; do 9341 IFS="$lt_save_ifs" 9342 if test "X$pkg" = "X$p"; then 9343 enable_static=yes 9344 fi 9345 done 9346 IFS="$lt_save_ifs" 9347 ;; 9348 esac], 9349 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9350 9351 _LT_DECL([build_old_libs], [enable_static], [0], 9352 [Whether or not to build static libraries]) 9353])# _LT_ENABLE_STATIC 9354 9355LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9356LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9357 9358# Old names: 9359AC_DEFUN([AC_ENABLE_STATIC], 9360[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9361]) 9362 9363AC_DEFUN([AC_DISABLE_STATIC], 9364[_LT_SET_OPTION([LT_INIT], [disable-static]) 9365]) 9366 9367AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9368AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9369 9370dnl aclocal-1.4 backwards compatibility: 9371dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9372dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9373 9374 9375 9376# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9377# ---------------------------------- 9378# implement the --enable-fast-install flag, and support the `fast-install' 9379# and `disable-fast-install' LT_INIT options. 9380# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9381m4_define([_LT_ENABLE_FAST_INSTALL], 9382[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9383AC_ARG_ENABLE([fast-install], 9384 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9385 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9386 [p=${PACKAGE-default} 9387 case $enableval in 9388 yes) enable_fast_install=yes ;; 9389 no) enable_fast_install=no ;; 9390 *) 9391 enable_fast_install=no 9392 # Look at the argument we got. We use all the common list separators. 9393 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9394 for pkg in $enableval; do 9395 IFS="$lt_save_ifs" 9396 if test "X$pkg" = "X$p"; then 9397 enable_fast_install=yes 9398 fi 9399 done 9400 IFS="$lt_save_ifs" 9401 ;; 9402 esac], 9403 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9404 9405_LT_DECL([fast_install], [enable_fast_install], [0], 9406 [Whether or not to optimize for fast installation])dnl 9407])# _LT_ENABLE_FAST_INSTALL 9408 9409LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9410LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9411 9412# Old names: 9413AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9414[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9415AC_DIAGNOSE([obsolete], 9416[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9417the `fast-install' option into LT_INIT's first parameter.]) 9418]) 9419 9420AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9421[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9422AC_DIAGNOSE([obsolete], 9423[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9424the `disable-fast-install' option into LT_INIT's first parameter.]) 9425]) 9426 9427dnl aclocal-1.4 backwards compatibility: 9428dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9429dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9430 9431 9432# _LT_WITH_PIC([MODE]) 9433# -------------------- 9434# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9435# LT_INIT options. 9436# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9437m4_define([_LT_WITH_PIC], 9438[AC_ARG_WITH([pic], 9439 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9440 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9441 [lt_p=${PACKAGE-default} 9442 case $withval in 9443 yes|no) pic_mode=$withval ;; 9444 *) 9445 pic_mode=default 9446 # Look at the argument we got. We use all the common list separators. 9447 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9448 for lt_pkg in $withval; do 9449 IFS="$lt_save_ifs" 9450 if test "X$lt_pkg" = "X$lt_p"; then 9451 pic_mode=yes 9452 fi 9453 done 9454 IFS="$lt_save_ifs" 9455 ;; 9456 esac], 9457 [pic_mode=default]) 9458 9459test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9460 9461_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9462])# _LT_WITH_PIC 9463 9464LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9465LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9466 9467# Old name: 9468AU_DEFUN([AC_LIBTOOL_PICMODE], 9469[_LT_SET_OPTION([LT_INIT], [pic-only]) 9470AC_DIAGNOSE([obsolete], 9471[$0: Remove this warning and the call to _LT_SET_OPTION when you 9472put the `pic-only' option into LT_INIT's first parameter.]) 9473]) 9474 9475dnl aclocal-1.4 backwards compatibility: 9476dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9477 9478 9479m4_define([_LTDL_MODE], []) 9480LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9481 [m4_define([_LTDL_MODE], [nonrecursive])]) 9482LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9483 [m4_define([_LTDL_MODE], [recursive])]) 9484LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9485 [m4_define([_LTDL_MODE], [subproject])]) 9486 9487m4_define([_LTDL_TYPE], []) 9488LT_OPTION_DEFINE([LTDL_INIT], [installable], 9489 [m4_define([_LTDL_TYPE], [installable])]) 9490LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9491 [m4_define([_LTDL_TYPE], [convenience])]) 9492 9493# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9494# 9495# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9496# Written by Gary V. Vaughan, 2004 9497# 9498# This file is free software; the Free Software Foundation gives 9499# unlimited permission to copy and/or distribute it, with or without 9500# modifications, as long as this notice is preserved. 9501 9502# serial 6 ltsugar.m4 9503 9504# This is to help aclocal find these macros, as it can't see m4_define. 9505AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9506 9507 9508# lt_join(SEP, ARG1, [ARG2...]) 9509# ----------------------------- 9510# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9511# associated separator. 9512# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9513# versions in m4sugar had bugs. 9514m4_define([lt_join], 9515[m4_if([$#], [1], [], 9516 [$#], [2], [[$2]], 9517 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9518m4_define([_lt_join], 9519[m4_if([$#$2], [2], [], 9520 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9521 9522 9523# lt_car(LIST) 9524# lt_cdr(LIST) 9525# ------------ 9526# Manipulate m4 lists. 9527# These macros are necessary as long as will still need to support 9528# Autoconf-2.59 which quotes differently. 9529m4_define([lt_car], [[$1]]) 9530m4_define([lt_cdr], 9531[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9532 [$#], 1, [], 9533 [m4_dquote(m4_shift($@))])]) 9534m4_define([lt_unquote], $1) 9535 9536 9537# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9538# ------------------------------------------ 9539# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9540# Note that neither SEPARATOR nor STRING are expanded; they are appended 9541# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9542# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9543# than defined and empty). 9544# 9545# This macro is needed until we can rely on Autoconf 2.62, since earlier 9546# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9547m4_define([lt_append], 9548[m4_define([$1], 9549 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9550 9551 9552 9553# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9554# ---------------------------------------------------------- 9555# Produce a SEP delimited list of all paired combinations of elements of 9556# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9557# has the form PREFIXmINFIXSUFFIXn. 9558# Needed until we can rely on m4_combine added in Autoconf 2.62. 9559m4_define([lt_combine], 9560[m4_if(m4_eval([$# > 3]), [1], 9561 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9562[[m4_foreach([_Lt_prefix], [$2], 9563 [m4_foreach([_Lt_suffix], 9564 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9565 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9566 9567 9568# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9569# ----------------------------------------------------------------------- 9570# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9571# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9572m4_define([lt_if_append_uniq], 9573[m4_ifdef([$1], 9574 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9575 [lt_append([$1], [$2], [$3])$4], 9576 [$5])], 9577 [lt_append([$1], [$2], [$3])$4])]) 9578 9579 9580# lt_dict_add(DICT, KEY, VALUE) 9581# ----------------------------- 9582m4_define([lt_dict_add], 9583[m4_define([$1($2)], [$3])]) 9584 9585 9586# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9587# -------------------------------------------- 9588m4_define([lt_dict_add_subkey], 9589[m4_define([$1($2:$3)], [$4])]) 9590 9591 9592# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9593# ---------------------------------- 9594m4_define([lt_dict_fetch], 9595[m4_ifval([$3], 9596 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9597 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9598 9599 9600# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9601# ----------------------------------------------------------------- 9602m4_define([lt_if_dict_fetch], 9603[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9604 [$5], 9605 [$6])]) 9606 9607 9608# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9609# -------------------------------------------------------------- 9610m4_define([lt_dict_filter], 9611[m4_if([$5], [], [], 9612 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9613 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9614 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9615]) 9616 9617# ltversion.m4 -- version numbers -*- Autoconf -*- 9618# 9619# Copyright (C) 2004 Free Software Foundation, Inc. 9620# Written by Scott James Remnant, 2004 9621# 9622# This file is free software; the Free Software Foundation gives 9623# unlimited permission to copy and/or distribute it, with or without 9624# modifications, as long as this notice is preserved. 9625 9626# @configure_input@ 9627 9628# serial 3337 ltversion.m4 9629# This file is part of GNU Libtool 9630 9631m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9632m4_define([LT_PACKAGE_REVISION], [1.3337]) 9633 9634AC_DEFUN([LTVERSION_VERSION], 9635[macro_version='2.4.2' 9636macro_revision='1.3337' 9637_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9638_LT_DECL(, macro_revision, 0) 9639]) 9640 9641# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9642# 9643# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9644# Written by Scott James Remnant, 2004. 9645# 9646# This file is free software; the Free Software Foundation gives 9647# unlimited permission to copy and/or distribute it, with or without 9648# modifications, as long as this notice is preserved. 9649 9650# serial 5 lt~obsolete.m4 9651 9652# These exist entirely to fool aclocal when bootstrapping libtool. 9653# 9654# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9655# which have later been changed to m4_define as they aren't part of the 9656# exported API, or moved to Autoconf or Automake where they belong. 9657# 9658# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9659# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9660# using a macro with the same name in our local m4/libtool.m4 it'll 9661# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9662# and doesn't know about Autoconf macros at all.) 9663# 9664# So we provide this file, which has a silly filename so it's always 9665# included after everything else. This provides aclocal with the 9666# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9667# because those macros already exist, or will be overwritten later. 9668# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9669# 9670# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9671# Yes, that means every name once taken will need to remain here until 9672# we give up compatibility with versions before 1.7, at which point 9673# we need to keep only those names which we still refer to. 9674 9675# This is to help aclocal find these macros, as it can't see m4_define. 9676AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9677 9678m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9679m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9680m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9681m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9682m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9683m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9684m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9685m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9686m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9687m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9688m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9689m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9690m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9691m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9692m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9693m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9694m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9695m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9696m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9697m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9698m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9699m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9700m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9701m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9702m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9703m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9704m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9705m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9706m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9707m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9708m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9709m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9710m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9711m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9712m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9713m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9714m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9715m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9716m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9717m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9718m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9719m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9720m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9721m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9722m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9723m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9724m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9725m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9726m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9727m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9728m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9729m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9730m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9731m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9732m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9733m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9734m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9735m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9736m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9737m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9738m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9739 9740# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9741# 9742# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9743# 9744# This program is free software; you can redistribute it and/or modify 9745# it under the terms of the GNU General Public License as published by 9746# the Free Software Foundation; either version 2 of the License, or 9747# (at your option) any later version. 9748# 9749# This program is distributed in the hope that it will be useful, but 9750# WITHOUT ANY WARRANTY; without even the implied warranty of 9751# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9752# General Public License for more details. 9753# 9754# You should have received a copy of the GNU General Public License 9755# along with this program; if not, write to the Free Software 9756# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9757# 9758# As a special exception to the GNU General Public License, if you 9759# distribute this file as part of a program that contains a 9760# configuration script generated by Autoconf, you may include it under 9761# the same distribution terms that you use for the rest of that program. 9762 9763# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9764# ---------------------------------- 9765AC_DEFUN([PKG_PROG_PKG_CONFIG], 9766[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9767m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9768AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9769if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9770 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9771fi 9772if test -n "$PKG_CONFIG"; then 9773 _pkg_min_version=m4_default([$1], [0.9.0]) 9774 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9775 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9776 AC_MSG_RESULT([yes]) 9777 else 9778 AC_MSG_RESULT([no]) 9779 PKG_CONFIG="" 9780 fi 9781 9782fi[]dnl 9783])# PKG_PROG_PKG_CONFIG 9784 9785# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9786# 9787# Check to see whether a particular set of modules exists. Similar 9788# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9789# 9790# 9791# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9792# this or PKG_CHECK_MODULES is called, or make sure to call 9793# PKG_CHECK_EXISTS manually 9794# -------------------------------------------------------------- 9795AC_DEFUN([PKG_CHECK_EXISTS], 9796[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9797if test -n "$PKG_CONFIG" && \ 9798 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9799 m4_ifval([$2], [$2], [:]) 9800m4_ifvaln([$3], [else 9801 $3])dnl 9802fi]) 9803 9804 9805# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9806# --------------------------------------------- 9807m4_define([_PKG_CONFIG], 9808[if test -n "$$1"; then 9809 pkg_cv_[]$1="$$1" 9810 elif test -n "$PKG_CONFIG"; then 9811 PKG_CHECK_EXISTS([$3], 9812 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9813 [pkg_failed=yes]) 9814 else 9815 pkg_failed=untried 9816fi[]dnl 9817])# _PKG_CONFIG 9818 9819# _PKG_SHORT_ERRORS_SUPPORTED 9820# ----------------------------- 9821AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9822[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9823if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9824 _pkg_short_errors_supported=yes 9825else 9826 _pkg_short_errors_supported=no 9827fi[]dnl 9828])# _PKG_SHORT_ERRORS_SUPPORTED 9829 9830 9831# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9832# [ACTION-IF-NOT-FOUND]) 9833# 9834# 9835# Note that if there is a possibility the first call to 9836# PKG_CHECK_MODULES might not happen, you should be sure to include an 9837# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9838# 9839# 9840# -------------------------------------------------------------- 9841AC_DEFUN([PKG_CHECK_MODULES], 9842[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9843AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9844AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9845 9846pkg_failed=no 9847AC_MSG_CHECKING([for $1]) 9848 9849_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9850_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9851 9852m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9853and $1[]_LIBS to avoid the need to call pkg-config. 9854See the pkg-config man page for more details.]) 9855 9856if test $pkg_failed = yes; then 9857 _PKG_SHORT_ERRORS_SUPPORTED 9858 if test $_pkg_short_errors_supported = yes; then 9859 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9860 else 9861 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9862 fi 9863 # Put the nasty error message in config.log where it belongs 9864 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9865 9866 ifelse([$4], , [AC_MSG_ERROR(dnl 9867[Package requirements ($2) were not met: 9868 9869$$1_PKG_ERRORS 9870 9871Consider adjusting the PKG_CONFIG_PATH environment variable if you 9872installed software in a non-standard prefix. 9873 9874_PKG_TEXT 9875])], 9876 [AC_MSG_RESULT([no]) 9877 $4]) 9878elif test $pkg_failed = untried; then 9879 ifelse([$4], , [AC_MSG_FAILURE(dnl 9880[The pkg-config script could not be found or is too old. Make sure it 9881is in your PATH or set the PKG_CONFIG environment variable to the full 9882path to pkg-config. 9883 9884_PKG_TEXT 9885 9886To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9887 [$4]) 9888else 9889 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9890 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9891 AC_MSG_RESULT([yes]) 9892 ifelse([$3], , :, [$3]) 9893fi[]dnl 9894])# PKG_CHECK_MODULES 9895 9896dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9897dnl 9898dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9899dnl 9900dnl Permission is hereby granted, free of charge, to any person obtaining a 9901dnl copy of this software and associated documentation files (the "Software"), 9902dnl to deal in the Software without restriction, including without limitation 9903dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9904dnl and/or sell copies of the Software, and to permit persons to whom the 9905dnl Software is furnished to do so, subject to the following conditions: 9906dnl 9907dnl The above copyright notice and this permission notice (including the next 9908dnl paragraph) shall be included in all copies or substantial portions of the 9909dnl Software. 9910dnl 9911dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9912dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9913dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9914dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9915dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9916dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9917dnl DEALINGS IN THE SOFTWARE. 9918 9919# XORG_MACROS_VERSION(required-version) 9920# ------------------------------------- 9921# Minimum version: 1.1.0 9922# 9923# If you're using a macro added in Version 1.1 or newer, include this in 9924# your configure.ac with the minimum required version, such as: 9925# XORG_MACROS_VERSION(1.1) 9926# 9927# To ensure that this macro is defined, also add: 9928# m4_ifndef([XORG_MACROS_VERSION], 9929# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9930# 9931# 9932# See the "minimum version" comment for each macro you use to see what 9933# version you require. 9934m4_defun([XORG_MACROS_VERSION],[ 9935m4_define([vers_have], [1.19.0]) 9936m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9937m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9938m4_if(m4_cmp(maj_have, maj_needed), 0,, 9939 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9940m4_if(m4_version_compare(vers_have, [$1]), -1, 9941 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9942m4_undefine([vers_have]) 9943m4_undefine([maj_have]) 9944m4_undefine([maj_needed]) 9945]) # XORG_MACROS_VERSION 9946 9947# XORG_PROG_RAWCPP() 9948# ------------------ 9949# Minimum version: 1.0.0 9950# 9951# Find cpp program and necessary flags for use in pre-processing text files 9952# such as man pages and config files 9953AC_DEFUN([XORG_PROG_RAWCPP],[ 9954AC_REQUIRE([AC_PROG_CPP]) 9955AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9956 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9957 9958# Check for flag to avoid builtin definitions - assumes unix is predefined, 9959# which is not the best choice for supporting other OS'es, but covers most 9960# of the ones we need for now. 9961AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9962AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9963if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9964 AC_MSG_RESULT([no]) 9965else 9966 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9967 RAWCPPFLAGS=-undef 9968 AC_MSG_RESULT([yes]) 9969 # under Cygwin unix is still defined even with -undef 9970 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9971 RAWCPPFLAGS="-undef -ansi" 9972 AC_MSG_RESULT([yes, with -ansi]) 9973 else 9974 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9975 fi 9976fi 9977rm -f conftest.$ac_ext 9978 9979AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9980AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9981if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9982 AC_MSG_RESULT([no]) 9983else 9984 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9985 TRADITIONALCPPFLAGS="-traditional" 9986 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9987 AC_MSG_RESULT([yes]) 9988 else 9989 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9990 fi 9991fi 9992rm -f conftest.$ac_ext 9993AC_SUBST(RAWCPPFLAGS) 9994AC_SUBST(TRADITIONALCPPFLAGS) 9995]) # XORG_PROG_RAWCPP 9996 9997# XORG_MANPAGE_SECTIONS() 9998# ----------------------- 9999# Minimum version: 1.0.0 10000# 10001# Determine which sections man pages go in for the different man page types 10002# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10003# Not sure if there's any better way than just hardcoding by OS name. 10004# Override default settings by setting environment variables 10005# Added MAN_SUBSTS in version 1.8 10006# Added AC_PROG_SED in version 1.8 10007 10008AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10009AC_REQUIRE([AC_CANONICAL_HOST]) 10010AC_REQUIRE([AC_PROG_SED]) 10011 10012if test x$APP_MAN_SUFFIX = x ; then 10013 APP_MAN_SUFFIX=1 10014fi 10015if test x$APP_MAN_DIR = x ; then 10016 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10017fi 10018 10019if test x$LIB_MAN_SUFFIX = x ; then 10020 LIB_MAN_SUFFIX=3 10021fi 10022if test x$LIB_MAN_DIR = x ; then 10023 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10024fi 10025 10026if test x$FILE_MAN_SUFFIX = x ; then 10027 case $host_os in 10028 solaris*) FILE_MAN_SUFFIX=4 ;; 10029 *) FILE_MAN_SUFFIX=5 ;; 10030 esac 10031fi 10032if test x$FILE_MAN_DIR = x ; then 10033 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10034fi 10035 10036if test x$MISC_MAN_SUFFIX = x ; then 10037 case $host_os in 10038 solaris*) MISC_MAN_SUFFIX=5 ;; 10039 *) MISC_MAN_SUFFIX=7 ;; 10040 esac 10041fi 10042if test x$MISC_MAN_DIR = x ; then 10043 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10044fi 10045 10046if test x$DRIVER_MAN_SUFFIX = x ; then 10047 case $host_os in 10048 solaris*) DRIVER_MAN_SUFFIX=7 ;; 10049 *) DRIVER_MAN_SUFFIX=4 ;; 10050 esac 10051fi 10052if test x$DRIVER_MAN_DIR = x ; then 10053 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10054fi 10055 10056if test x$ADMIN_MAN_SUFFIX = x ; then 10057 case $host_os in 10058 solaris*) ADMIN_MAN_SUFFIX=1m ;; 10059 *) ADMIN_MAN_SUFFIX=8 ;; 10060 esac 10061fi 10062if test x$ADMIN_MAN_DIR = x ; then 10063 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10064fi 10065 10066 10067AC_SUBST([APP_MAN_SUFFIX]) 10068AC_SUBST([LIB_MAN_SUFFIX]) 10069AC_SUBST([FILE_MAN_SUFFIX]) 10070AC_SUBST([MISC_MAN_SUFFIX]) 10071AC_SUBST([DRIVER_MAN_SUFFIX]) 10072AC_SUBST([ADMIN_MAN_SUFFIX]) 10073AC_SUBST([APP_MAN_DIR]) 10074AC_SUBST([LIB_MAN_DIR]) 10075AC_SUBST([FILE_MAN_DIR]) 10076AC_SUBST([MISC_MAN_DIR]) 10077AC_SUBST([DRIVER_MAN_DIR]) 10078AC_SUBST([ADMIN_MAN_DIR]) 10079 10080XORG_MAN_PAGE="X Version 11" 10081AC_SUBST([XORG_MAN_PAGE]) 10082MAN_SUBSTS="\ 10083 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10084 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10085 -e 's|__xservername__|Xorg|g' \ 10086 -e 's|__xconfigfile__|xorg.conf|g' \ 10087 -e 's|__projectroot__|\$(prefix)|g' \ 10088 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10089 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10090 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10091 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10092 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10093 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10094 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10095AC_SUBST([MAN_SUBSTS]) 10096 10097]) # XORG_MANPAGE_SECTIONS 10098 10099# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10100# ------------------------ 10101# Minimum version: 1.7.0 10102# 10103# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10104# provided by xorg-sgml-doctools, if installed. 10105AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10106AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10107XORG_SGML_PATH= 10108PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10109 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10110 [m4_ifval([$1],[:], 10111 [if test x"$cross_compiling" != x"yes" ; then 10112 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10113 [XORG_SGML_PATH=$prefix/share/sgml]) 10114 fi]) 10115 ]) 10116 10117# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10118# the path and the name of the doc stylesheet 10119if test "x$XORG_SGML_PATH" != "x" ; then 10120 AC_MSG_RESULT([$XORG_SGML_PATH]) 10121 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10122 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10123else 10124 AC_MSG_RESULT([no]) 10125fi 10126 10127AC_SUBST(XORG_SGML_PATH) 10128AC_SUBST(STYLESHEET_SRCDIR) 10129AC_SUBST(XSL_STYLESHEET) 10130AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10131]) # XORG_CHECK_SGML_DOCTOOLS 10132 10133# XORG_CHECK_LINUXDOC 10134# ------------------- 10135# Minimum version: 1.0.0 10136# 10137# Defines the variable MAKE_TEXT if the necessary tools and 10138# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10139# Whether or not the necessary tools and files are found can be checked 10140# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10141AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10142AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10143AC_REQUIRE([XORG_WITH_PS2PDF]) 10144 10145AC_PATH_PROG(LINUXDOC, linuxdoc) 10146 10147AC_MSG_CHECKING([whether to build documentation]) 10148 10149if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10150 BUILDDOC=yes 10151else 10152 BUILDDOC=no 10153fi 10154 10155AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10156 10157AC_MSG_RESULT([$BUILDDOC]) 10158 10159AC_MSG_CHECKING([whether to build pdf documentation]) 10160 10161if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10162 BUILDPDFDOC=yes 10163else 10164 BUILDPDFDOC=no 10165fi 10166 10167AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10168 10169AC_MSG_RESULT([$BUILDPDFDOC]) 10170 10171MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10172MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10173MAKE_PDF="$PS2PDF" 10174MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10175 10176AC_SUBST(MAKE_TEXT) 10177AC_SUBST(MAKE_PS) 10178AC_SUBST(MAKE_PDF) 10179AC_SUBST(MAKE_HTML) 10180]) # XORG_CHECK_LINUXDOC 10181 10182# XORG_CHECK_DOCBOOK 10183# ------------------- 10184# Minimum version: 1.0.0 10185# 10186# Checks for the ability to build output formats from SGML DocBook source. 10187# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10188# indicates whether the necessary tools and files are found and, if set, 10189# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10190AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10191AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10192 10193BUILDTXTDOC=no 10194BUILDPDFDOC=no 10195BUILDPSDOC=no 10196BUILDHTMLDOC=no 10197 10198AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10199AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10200AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10201AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10202 10203AC_MSG_CHECKING([whether to build text documentation]) 10204if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10205 test x$BUILD_TXTDOC != xno; then 10206 BUILDTXTDOC=yes 10207fi 10208AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10209AC_MSG_RESULT([$BUILDTXTDOC]) 10210 10211AC_MSG_CHECKING([whether to build PDF documentation]) 10212if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10213 test x$BUILD_PDFDOC != xno; then 10214 BUILDPDFDOC=yes 10215fi 10216AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10217AC_MSG_RESULT([$BUILDPDFDOC]) 10218 10219AC_MSG_CHECKING([whether to build PostScript documentation]) 10220if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10221 test x$BUILD_PSDOC != xno; then 10222 BUILDPSDOC=yes 10223fi 10224AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10225AC_MSG_RESULT([$BUILDPSDOC]) 10226 10227AC_MSG_CHECKING([whether to build HTML documentation]) 10228if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10229 test x$BUILD_HTMLDOC != xno; then 10230 BUILDHTMLDOC=yes 10231fi 10232AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10233AC_MSG_RESULT([$BUILDHTMLDOC]) 10234 10235MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10236MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10237MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10238MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10239 10240AC_SUBST(MAKE_TEXT) 10241AC_SUBST(MAKE_PS) 10242AC_SUBST(MAKE_PDF) 10243AC_SUBST(MAKE_HTML) 10244]) # XORG_CHECK_DOCBOOK 10245 10246# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10247# ---------------- 10248# Minimum version: 1.5.0 10249# Minimum version for optional DEFAULT argument: 1.11.0 10250# 10251# Documentation tools are not always available on all platforms and sometimes 10252# not at the appropriate level. This macro enables a module to test for the 10253# presence of the tool and obtain it's path in separate variables. Coupled with 10254# the --with-xmlto option, it allows maximum flexibilty in making decisions 10255# as whether or not to use the xmlto package. When DEFAULT is not specified, 10256# --with-xmlto assumes 'auto'. 10257# 10258# Interface to module: 10259# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10260# XMLTO: returns the path of the xmlto program found 10261# returns the path set by the user in the environment 10262# --with-xmlto: 'yes' user instructs the module to use xmlto 10263# 'no' user instructs the module not to use xmlto 10264# 10265# Added in version 1.10.0 10266# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10267# xmlto for text output requires either lynx, links, or w3m browsers 10268# 10269# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10270# 10271AC_DEFUN([XORG_WITH_XMLTO],[ 10272AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10273m4_define([_defopt], m4_default([$2], [auto])) 10274AC_ARG_WITH(xmlto, 10275 AS_HELP_STRING([--with-xmlto], 10276 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10277 [use_xmlto=$withval], [use_xmlto=]_defopt) 10278m4_undefine([_defopt]) 10279 10280if test "x$use_xmlto" = x"auto"; then 10281 AC_PATH_PROG([XMLTO], [xmlto]) 10282 if test "x$XMLTO" = "x"; then 10283 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10284 have_xmlto=no 10285 else 10286 have_xmlto=yes 10287 fi 10288elif test "x$use_xmlto" = x"yes" ; then 10289 AC_PATH_PROG([XMLTO], [xmlto]) 10290 if test "x$XMLTO" = "x"; then 10291 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10292 fi 10293 have_xmlto=yes 10294elif test "x$use_xmlto" = x"no" ; then 10295 if test "x$XMLTO" != "x"; then 10296 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10297 fi 10298 have_xmlto=no 10299else 10300 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10301fi 10302 10303# Test for a minimum version of xmlto, if provided. 10304m4_ifval([$1], 10305[if test "$have_xmlto" = yes; then 10306 # scrape the xmlto version 10307 AC_MSG_CHECKING([the xmlto version]) 10308 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10309 AC_MSG_RESULT([$xmlto_version]) 10310 AS_VERSION_COMPARE([$xmlto_version], [$1], 10311 [if test "x$use_xmlto" = xauto; then 10312 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10313 have_xmlto=no 10314 else 10315 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10316 fi]) 10317fi]) 10318 10319# Test for the ability of xmlto to generate a text target 10320have_xmlto_text=no 10321cat > conftest.xml << "EOF" 10322EOF 10323AS_IF([test "$have_xmlto" = yes], 10324 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10325 [have_xmlto_text=yes], 10326 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10327rm -f conftest.xml 10328AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10329AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10330]) # XORG_WITH_XMLTO 10331 10332# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10333# -------------------------------------------- 10334# Minimum version: 1.12.0 10335# Minimum version for optional DEFAULT argument: 1.12.0 10336# 10337# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10338# XML-based language used for the transformation of XML documents. 10339# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10340# It is used under the cover by xmlto to generate html files from DocBook/XML. 10341# The XSLT processor is often used as a standalone tool for transformations. 10342# It should not be assumed that this tool is used only to work with documnetation. 10343# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10344# 10345# Interface to module: 10346# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10347# XSLTPROC: returns the path of the xsltproc program found 10348# returns the path set by the user in the environment 10349# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10350# 'no' user instructs the module not to use xsltproc 10351# have_xsltproc: returns yes if xsltproc found in PATH or no 10352# 10353# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10354# 10355AC_DEFUN([XORG_WITH_XSLTPROC],[ 10356AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10357# Preserves the interface, should it be implemented later 10358m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10359m4_define([_defopt], m4_default([$2], [auto])) 10360AC_ARG_WITH(xsltproc, 10361 AS_HELP_STRING([--with-xsltproc], 10362 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10363 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10364m4_undefine([_defopt]) 10365 10366if test "x$use_xsltproc" = x"auto"; then 10367 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10368 if test "x$XSLTPROC" = "x"; then 10369 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10370 have_xsltproc=no 10371 else 10372 have_xsltproc=yes 10373 fi 10374elif test "x$use_xsltproc" = x"yes" ; then 10375 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10376 if test "x$XSLTPROC" = "x"; then 10377 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10378 fi 10379 have_xsltproc=yes 10380elif test "x$use_xsltproc" = x"no" ; then 10381 if test "x$XSLTPROC" != "x"; then 10382 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10383 fi 10384 have_xsltproc=no 10385else 10386 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10387fi 10388 10389AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10390]) # XORG_WITH_XSLTPROC 10391 10392# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10393# ---------------------------------------- 10394# Minimum version: 1.15.0 10395# 10396# PERL (Practical Extraction and Report Language) is a language optimized for 10397# scanning arbitrary text files, extracting information from those text files, 10398# and printing reports based on that information. 10399# 10400# When DEFAULT is not specified, --with-perl assumes 'auto'. 10401# 10402# Interface to module: 10403# HAVE_PERL: used in makefiles to conditionally scan text files 10404# PERL: returns the path of the perl program found 10405# returns the path set by the user in the environment 10406# --with-perl: 'yes' user instructs the module to use perl 10407# 'no' user instructs the module not to use perl 10408# have_perl: returns yes if perl found in PATH or no 10409# 10410# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10411# 10412AC_DEFUN([XORG_WITH_PERL],[ 10413AC_ARG_VAR([PERL], [Path to perl command]) 10414# Preserves the interface, should it be implemented later 10415m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10416m4_define([_defopt], m4_default([$2], [auto])) 10417AC_ARG_WITH(perl, 10418 AS_HELP_STRING([--with-perl], 10419 [Use perl for extracting information from files (default: ]_defopt[)]), 10420 [use_perl=$withval], [use_perl=]_defopt) 10421m4_undefine([_defopt]) 10422 10423if test "x$use_perl" = x"auto"; then 10424 AC_PATH_PROG([PERL], [perl]) 10425 if test "x$PERL" = "x"; then 10426 AC_MSG_WARN([perl not found - cannot extract information and report]) 10427 have_perl=no 10428 else 10429 have_perl=yes 10430 fi 10431elif test "x$use_perl" = x"yes" ; then 10432 AC_PATH_PROG([PERL], [perl]) 10433 if test "x$PERL" = "x"; then 10434 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10435 fi 10436 have_perl=yes 10437elif test "x$use_perl" = x"no" ; then 10438 if test "x$PERL" != "x"; then 10439 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10440 fi 10441 have_perl=no 10442else 10443 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10444fi 10445 10446AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10447]) # XORG_WITH_PERL 10448 10449# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10450# ---------------- 10451# Minimum version: 1.5.0 10452# Minimum version for optional DEFAULT argument: 1.11.0 10453# 10454# Documentation tools are not always available on all platforms and sometimes 10455# not at the appropriate level. This macro enables a module to test for the 10456# presence of the tool and obtain it's path in separate variables. Coupled with 10457# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10458# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10459# --with-asciidoc assumes 'auto'. 10460# 10461# Interface to module: 10462# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10463# ASCIIDOC: returns the path of the asciidoc program found 10464# returns the path set by the user in the environment 10465# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10466# 'no' user instructs the module not to use asciidoc 10467# 10468# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10469# 10470AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10471AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10472m4_define([_defopt], m4_default([$2], [auto])) 10473AC_ARG_WITH(asciidoc, 10474 AS_HELP_STRING([--with-asciidoc], 10475 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10476 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10477m4_undefine([_defopt]) 10478 10479if test "x$use_asciidoc" = x"auto"; then 10480 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10481 if test "x$ASCIIDOC" = "x"; then 10482 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10483 have_asciidoc=no 10484 else 10485 have_asciidoc=yes 10486 fi 10487elif test "x$use_asciidoc" = x"yes" ; then 10488 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10489 if test "x$ASCIIDOC" = "x"; then 10490 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10491 fi 10492 have_asciidoc=yes 10493elif test "x$use_asciidoc" = x"no" ; then 10494 if test "x$ASCIIDOC" != "x"; then 10495 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10496 fi 10497 have_asciidoc=no 10498else 10499 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10500fi 10501m4_ifval([$1], 10502[if test "$have_asciidoc" = yes; then 10503 # scrape the asciidoc version 10504 AC_MSG_CHECKING([the asciidoc version]) 10505 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10506 AC_MSG_RESULT([$asciidoc_version]) 10507 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10508 [if test "x$use_asciidoc" = xauto; then 10509 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10510 have_asciidoc=no 10511 else 10512 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10513 fi]) 10514fi]) 10515AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10516]) # XORG_WITH_ASCIIDOC 10517 10518# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10519# ------------------------------------------- 10520# Minimum version: 1.5.0 10521# Minimum version for optional DEFAULT argument: 1.11.0 10522# Minimum version for optional DOT checking: 1.18.0 10523# 10524# Documentation tools are not always available on all platforms and sometimes 10525# not at the appropriate level. This macro enables a module to test for the 10526# presence of the tool and obtain it's path in separate variables. Coupled with 10527# the --with-doxygen option, it allows maximum flexibilty in making decisions 10528# as whether or not to use the doxygen package. When DEFAULT is not specified, 10529# --with-doxygen assumes 'auto'. 10530# 10531# Interface to module: 10532# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10533# DOXYGEN: returns the path of the doxygen program found 10534# returns the path set by the user in the environment 10535# --with-doxygen: 'yes' user instructs the module to use doxygen 10536# 'no' user instructs the module not to use doxygen 10537# 10538# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10539# 10540AC_DEFUN([XORG_WITH_DOXYGEN],[ 10541AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10542AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10543m4_define([_defopt], m4_default([$2], [auto])) 10544AC_ARG_WITH(doxygen, 10545 AS_HELP_STRING([--with-doxygen], 10546 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10547 [use_doxygen=$withval], [use_doxygen=]_defopt) 10548m4_undefine([_defopt]) 10549 10550if test "x$use_doxygen" = x"auto"; then 10551 AC_PATH_PROG([DOXYGEN], [doxygen]) 10552 if test "x$DOXYGEN" = "x"; then 10553 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10554 have_doxygen=no 10555 else 10556 have_doxygen=yes 10557 fi 10558elif test "x$use_doxygen" = x"yes" ; then 10559 AC_PATH_PROG([DOXYGEN], [doxygen]) 10560 if test "x$DOXYGEN" = "x"; then 10561 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10562 fi 10563 have_doxygen=yes 10564elif test "x$use_doxygen" = x"no" ; then 10565 if test "x$DOXYGEN" != "x"; then 10566 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10567 fi 10568 have_doxygen=no 10569else 10570 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10571fi 10572m4_ifval([$1], 10573[if test "$have_doxygen" = yes; then 10574 # scrape the doxygen version 10575 AC_MSG_CHECKING([the doxygen version]) 10576 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10577 AC_MSG_RESULT([$doxygen_version]) 10578 AS_VERSION_COMPARE([$doxygen_version], [$1], 10579 [if test "x$use_doxygen" = xauto; then 10580 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10581 have_doxygen=no 10582 else 10583 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10584 fi]) 10585fi]) 10586 10587dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10588dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10589dnl HAVE_DOT = @HAVE_DOT@ 10590HAVE_DOT=no 10591if test "x$have_doxygen" = "xyes"; then 10592 AC_PATH_PROG([DOT], [dot]) 10593 if test "x$DOT" != "x"; then 10594 HAVE_DOT=yes 10595 fi 10596fi 10597 10598AC_SUBST([HAVE_DOT]) 10599AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10600AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10601]) # XORG_WITH_DOXYGEN 10602 10603# XORG_WITH_GROFF([DEFAULT]) 10604# ---------------- 10605# Minimum version: 1.6.0 10606# Minimum version for optional DEFAULT argument: 1.11.0 10607# 10608# Documentation tools are not always available on all platforms and sometimes 10609# not at the appropriate level. This macro enables a module to test for the 10610# presence of the tool and obtain it's path in separate variables. Coupled with 10611# the --with-groff option, it allows maximum flexibilty in making decisions 10612# as whether or not to use the groff package. When DEFAULT is not specified, 10613# --with-groff assumes 'auto'. 10614# 10615# Interface to module: 10616# HAVE_GROFF: used in makefiles to conditionally generate documentation 10617# HAVE_GROFF_MM: the memorandum macros (-mm) package 10618# HAVE_GROFF_MS: the -ms macros package 10619# GROFF: returns the path of the groff program found 10620# returns the path set by the user in the environment 10621# --with-groff: 'yes' user instructs the module to use groff 10622# 'no' user instructs the module not to use groff 10623# 10624# Added in version 1.9.0: 10625# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10626# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10627# psselect from the psutils package. 10628# the ghostcript package. Refer to the grohtml man pages 10629# 10630# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10631# 10632# OS and distros often splits groff in a basic and full package, the former 10633# having the groff program and the later having devices, fonts and macros 10634# Checking for the groff executable is not enough. 10635# 10636# If macros are missing, we cannot assume that groff is useless, so we don't 10637# unset HAVE_GROFF or GROFF env variables. 10638# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10639# 10640AC_DEFUN([XORG_WITH_GROFF],[ 10641AC_ARG_VAR([GROFF], [Path to groff command]) 10642m4_define([_defopt], m4_default([$1], [auto])) 10643AC_ARG_WITH(groff, 10644 AS_HELP_STRING([--with-groff], 10645 [Use groff to regenerate documentation (default: ]_defopt[)]), 10646 [use_groff=$withval], [use_groff=]_defopt) 10647m4_undefine([_defopt]) 10648 10649if test "x$use_groff" = x"auto"; then 10650 AC_PATH_PROG([GROFF], [groff]) 10651 if test "x$GROFF" = "x"; then 10652 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10653 have_groff=no 10654 else 10655 have_groff=yes 10656 fi 10657elif test "x$use_groff" = x"yes" ; then 10658 AC_PATH_PROG([GROFF], [groff]) 10659 if test "x$GROFF" = "x"; then 10660 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10661 fi 10662 have_groff=yes 10663elif test "x$use_groff" = x"no" ; then 10664 if test "x$GROFF" != "x"; then 10665 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10666 fi 10667 have_groff=no 10668else 10669 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10670fi 10671 10672# We have groff, test for the presence of the macro packages 10673if test "x$have_groff" = x"yes"; then 10674 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10675 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10676 groff_ms_works=yes 10677 else 10678 groff_ms_works=no 10679 fi 10680 AC_MSG_RESULT([$groff_ms_works]) 10681 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10682 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10683 groff_mm_works=yes 10684 else 10685 groff_mm_works=no 10686 fi 10687 AC_MSG_RESULT([$groff_mm_works]) 10688fi 10689 10690# We have groff, test for HTML dependencies, one command per package 10691if test "x$have_groff" = x"yes"; then 10692 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10693 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10694 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10695 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10696 have_groff_html=yes 10697 else 10698 have_groff_html=no 10699 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10700 fi 10701fi 10702 10703# Set Automake conditionals for Makefiles 10704AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10705AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10706AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10707AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10708]) # XORG_WITH_GROFF 10709 10710# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10711# --------------------------------------- 10712# Minimum version: 1.6.0 10713# Minimum version for optional DEFAULT argument: 1.11.0 10714# Minimum version for optional MIN-VERSION argument: 1.15.0 10715# 10716# Documentation tools are not always available on all platforms and sometimes 10717# not at the appropriate level. This macro enables a module to test for the 10718# presence of the tool and obtain it's path in separate variables. Coupled with 10719# the --with-fop option, it allows maximum flexibilty in making decisions 10720# as whether or not to use the fop package. When DEFAULT is not specified, 10721# --with-fop assumes 'auto'. 10722# 10723# Interface to module: 10724# HAVE_FOP: used in makefiles to conditionally generate documentation 10725# FOP: returns the path of the fop program found 10726# returns the path set by the user in the environment 10727# --with-fop: 'yes' user instructs the module to use fop 10728# 'no' user instructs the module not to use fop 10729# 10730# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10731# 10732AC_DEFUN([XORG_WITH_FOP],[ 10733AC_ARG_VAR([FOP], [Path to fop command]) 10734m4_define([_defopt], m4_default([$2], [auto])) 10735AC_ARG_WITH(fop, 10736 AS_HELP_STRING([--with-fop], 10737 [Use fop to regenerate documentation (default: ]_defopt[)]), 10738 [use_fop=$withval], [use_fop=]_defopt) 10739m4_undefine([_defopt]) 10740 10741if test "x$use_fop" = x"auto"; then 10742 AC_PATH_PROG([FOP], [fop]) 10743 if test "x$FOP" = "x"; then 10744 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10745 have_fop=no 10746 else 10747 have_fop=yes 10748 fi 10749elif test "x$use_fop" = x"yes" ; then 10750 AC_PATH_PROG([FOP], [fop]) 10751 if test "x$FOP" = "x"; then 10752 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10753 fi 10754 have_fop=yes 10755elif test "x$use_fop" = x"no" ; then 10756 if test "x$FOP" != "x"; then 10757 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10758 fi 10759 have_fop=no 10760else 10761 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10762fi 10763 10764# Test for a minimum version of fop, if provided. 10765m4_ifval([$1], 10766[if test "$have_fop" = yes; then 10767 # scrape the fop version 10768 AC_MSG_CHECKING([for fop minimum version]) 10769 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10770 AC_MSG_RESULT([$fop_version]) 10771 AS_VERSION_COMPARE([$fop_version], [$1], 10772 [if test "x$use_fop" = xauto; then 10773 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10774 have_fop=no 10775 else 10776 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10777 fi]) 10778fi]) 10779AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10780]) # XORG_WITH_FOP 10781 10782# XORG_WITH_M4([MIN-VERSION]) 10783# --------------------------- 10784# Minimum version: 1.19.0 10785# 10786# This macro attempts to locate an m4 macro processor which supports 10787# -I option and is only useful for modules relying on M4 in order to 10788# expand macros in source code files. 10789# 10790# Interface to module: 10791# M4: returns the path of the m4 program found 10792# returns the path set by the user in the environment 10793# 10794AC_DEFUN([XORG_WITH_M4], [ 10795AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10796 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10797 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10798 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10799 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10800 [$PATH:/usr/gnu/bin])]) 10801 10802AC_SUBST([M4], [$ac_cv_path_M4]) 10803]) # XORG_WITH_M4 10804 10805# XORG_WITH_PS2PDF([DEFAULT]) 10806# ---------------- 10807# Minimum version: 1.6.0 10808# Minimum version for optional DEFAULT argument: 1.11.0 10809# 10810# Documentation tools are not always available on all platforms and sometimes 10811# not at the appropriate level. This macro enables a module to test for the 10812# presence of the tool and obtain it's path in separate variables. Coupled with 10813# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10814# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10815# --with-ps2pdf assumes 'auto'. 10816# 10817# Interface to module: 10818# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10819# PS2PDF: returns the path of the ps2pdf program found 10820# returns the path set by the user in the environment 10821# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10822# 'no' user instructs the module not to use ps2pdf 10823# 10824# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10825# 10826AC_DEFUN([XORG_WITH_PS2PDF],[ 10827AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10828m4_define([_defopt], m4_default([$1], [auto])) 10829AC_ARG_WITH(ps2pdf, 10830 AS_HELP_STRING([--with-ps2pdf], 10831 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10832 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10833m4_undefine([_defopt]) 10834 10835if test "x$use_ps2pdf" = x"auto"; then 10836 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10837 if test "x$PS2PDF" = "x"; then 10838 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10839 have_ps2pdf=no 10840 else 10841 have_ps2pdf=yes 10842 fi 10843elif test "x$use_ps2pdf" = x"yes" ; then 10844 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10845 if test "x$PS2PDF" = "x"; then 10846 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10847 fi 10848 have_ps2pdf=yes 10849elif test "x$use_ps2pdf" = x"no" ; then 10850 if test "x$PS2PDF" != "x"; then 10851 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10852 fi 10853 have_ps2pdf=no 10854else 10855 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10856fi 10857AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10858]) # XORG_WITH_PS2PDF 10859 10860# XORG_ENABLE_DOCS (enable_docs=yes) 10861# ---------------- 10862# Minimum version: 1.6.0 10863# 10864# Documentation tools are not always available on all platforms and sometimes 10865# not at the appropriate level. This macro enables a builder to skip all 10866# documentation targets except traditional man pages. 10867# Combined with the specific tool checking macros XORG_WITH_*, it provides 10868# maximum flexibilty in controlling documentation building. 10869# Refer to: 10870# XORG_WITH_XMLTO --with-xmlto 10871# XORG_WITH_ASCIIDOC --with-asciidoc 10872# XORG_WITH_DOXYGEN --with-doxygen 10873# XORG_WITH_FOP --with-fop 10874# XORG_WITH_GROFF --with-groff 10875# XORG_WITH_PS2PDF --with-ps2pdf 10876# 10877# Interface to module: 10878# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10879# --enable-docs: 'yes' user instructs the module to generate docs 10880# 'no' user instructs the module not to generate docs 10881# parm1: specify the default value, yes or no. 10882# 10883AC_DEFUN([XORG_ENABLE_DOCS],[ 10884m4_define([docs_default], m4_default([$1], [yes])) 10885AC_ARG_ENABLE(docs, 10886 AS_HELP_STRING([--enable-docs], 10887 [Enable building the documentation (default: ]docs_default[)]), 10888 [build_docs=$enableval], [build_docs=]docs_default) 10889m4_undefine([docs_default]) 10890AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10891AC_MSG_CHECKING([whether to build documentation]) 10892AC_MSG_RESULT([$build_docs]) 10893]) # XORG_ENABLE_DOCS 10894 10895# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10896# ---------------- 10897# Minimum version: 1.6.0 10898# 10899# This macro enables a builder to skip all developer documentation. 10900# Combined with the specific tool checking macros XORG_WITH_*, it provides 10901# maximum flexibilty in controlling documentation building. 10902# Refer to: 10903# XORG_WITH_XMLTO --with-xmlto 10904# XORG_WITH_ASCIIDOC --with-asciidoc 10905# XORG_WITH_DOXYGEN --with-doxygen 10906# XORG_WITH_FOP --with-fop 10907# XORG_WITH_GROFF --with-groff 10908# XORG_WITH_PS2PDF --with-ps2pdf 10909# 10910# Interface to module: 10911# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10912# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10913# 'no' user instructs the module not to generate developer docs 10914# parm1: specify the default value, yes or no. 10915# 10916AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10917m4_define([devel_default], m4_default([$1], [yes])) 10918AC_ARG_ENABLE(devel-docs, 10919 AS_HELP_STRING([--enable-devel-docs], 10920 [Enable building the developer documentation (default: ]devel_default[)]), 10921 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10922m4_undefine([devel_default]) 10923AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10924AC_MSG_CHECKING([whether to build developer documentation]) 10925AC_MSG_RESULT([$build_devel_docs]) 10926]) # XORG_ENABLE_DEVEL_DOCS 10927 10928# XORG_ENABLE_SPECS (enable_specs=yes) 10929# ---------------- 10930# Minimum version: 1.6.0 10931# 10932# This macro enables a builder to skip all functional specification targets. 10933# Combined with the specific tool checking macros XORG_WITH_*, it provides 10934# maximum flexibilty in controlling documentation building. 10935# Refer to: 10936# XORG_WITH_XMLTO --with-xmlto 10937# XORG_WITH_ASCIIDOC --with-asciidoc 10938# XORG_WITH_DOXYGEN --with-doxygen 10939# XORG_WITH_FOP --with-fop 10940# XORG_WITH_GROFF --with-groff 10941# XORG_WITH_PS2PDF --with-ps2pdf 10942# 10943# Interface to module: 10944# ENABLE_SPECS: used in makefiles to conditionally generate specs 10945# --enable-specs: 'yes' user instructs the module to generate specs 10946# 'no' user instructs the module not to generate specs 10947# parm1: specify the default value, yes or no. 10948# 10949AC_DEFUN([XORG_ENABLE_SPECS],[ 10950m4_define([spec_default], m4_default([$1], [yes])) 10951AC_ARG_ENABLE(specs, 10952 AS_HELP_STRING([--enable-specs], 10953 [Enable building the specs (default: ]spec_default[)]), 10954 [build_specs=$enableval], [build_specs=]spec_default) 10955m4_undefine([spec_default]) 10956AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10957AC_MSG_CHECKING([whether to build functional specifications]) 10958AC_MSG_RESULT([$build_specs]) 10959]) # XORG_ENABLE_SPECS 10960 10961# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10962# ---------------------------------------------- 10963# Minimum version: 1.13.0 10964# 10965# This macro enables a builder to enable/disable unit testing 10966# It makes no assumption about the test cases implementation 10967# Test cases may or may not use Automake "Support for test suites" 10968# They may or may not use the software utility library GLib 10969# 10970# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10971# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10972# The variable enable_unit_tests is used by other macros in this file. 10973# 10974# Interface to module: 10975# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10976# enable_unit_tests: used in configure.ac for additional configuration 10977# --enable-unit-tests: 'yes' user instructs the module to build tests 10978# 'no' user instructs the module not to build tests 10979# parm1: specify the default value, yes or no. 10980# 10981AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10982AC_BEFORE([$0], [XORG_WITH_GLIB]) 10983AC_BEFORE([$0], [XORG_LD_WRAP]) 10984AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10985m4_define([_defopt], m4_default([$1], [auto])) 10986AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10987 [Enable building unit test cases (default: ]_defopt[)]), 10988 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10989m4_undefine([_defopt]) 10990AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10991AC_MSG_CHECKING([whether to build unit test cases]) 10992AC_MSG_RESULT([$enable_unit_tests]) 10993]) # XORG_ENABLE_UNIT_TESTS 10994 10995# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10996# ------------------------------------------------------ 10997# Minimum version: 1.17.0 10998# 10999# This macro enables a builder to enable/disable integration testing 11000# It makes no assumption about the test cases' implementation 11001# Test cases may or may not use Automake "Support for test suites" 11002# 11003# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11004# usually requires less dependencies and may be built and run under less 11005# stringent environments than integration tests. 11006# 11007# Interface to module: 11008# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11009# enable_integration_tests: used in configure.ac for additional configuration 11010# --enable-integration-tests: 'yes' user instructs the module to build tests 11011# 'no' user instructs the module not to build tests 11012# parm1: specify the default value, yes or no. 11013# 11014AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11015AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11016m4_define([_defopt], m4_default([$1], [auto])) 11017AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11018 [Enable building integration test cases (default: ]_defopt[)]), 11019 [enable_integration_tests=$enableval], 11020 [enable_integration_tests=]_defopt) 11021m4_undefine([_defopt]) 11022AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11023 [test "x$enable_integration_tests" != xno]) 11024AC_MSG_CHECKING([whether to build unit test cases]) 11025AC_MSG_RESULT([$enable_integration_tests]) 11026]) # XORG_ENABLE_INTEGRATION_TESTS 11027 11028# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11029# ---------------------------------------- 11030# Minimum version: 1.13.0 11031# 11032# GLib is a library which provides advanced data structures and functions. 11033# This macro enables a module to test for the presence of Glib. 11034# 11035# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11036# Otherwise the value of $enable_unit_tests is blank. 11037# 11038# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11039# test support usually requires less dependencies and may be built and run under 11040# less stringent environments than integration tests. 11041# 11042# Interface to module: 11043# HAVE_GLIB: used in makefiles to conditionally build targets 11044# with_glib: used in configure.ac to know if GLib has been found 11045# --with-glib: 'yes' user instructs the module to use glib 11046# 'no' user instructs the module not to use glib 11047# 11048AC_DEFUN([XORG_WITH_GLIB],[ 11049AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11050m4_define([_defopt], m4_default([$2], [auto])) 11051AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11052 [Use GLib library for unit testing (default: ]_defopt[)]), 11053 [with_glib=$withval], [with_glib=]_defopt) 11054m4_undefine([_defopt]) 11055 11056have_glib=no 11057# Do not probe GLib if user explicitly disabled unit testing 11058if test "x$enable_unit_tests" != x"no"; then 11059 # Do not probe GLib if user explicitly disabled it 11060 if test "x$with_glib" != x"no"; then 11061 m4_ifval( 11062 [$1], 11063 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11064 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11065 ) 11066 fi 11067fi 11068 11069# Not having GLib when unit testing has been explicitly requested is an error 11070if test "x$enable_unit_tests" = x"yes"; then 11071 if test "x$have_glib" = x"no"; then 11072 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11073 fi 11074fi 11075 11076# Having unit testing disabled when GLib has been explicitly requested is an error 11077if test "x$enable_unit_tests" = x"no"; then 11078 if test "x$with_glib" = x"yes"; then 11079 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11080 fi 11081fi 11082 11083# Not having GLib when it has been explicitly requested is an error 11084if test "x$with_glib" = x"yes"; then 11085 if test "x$have_glib" = x"no"; then 11086 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11087 fi 11088fi 11089 11090AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11091]) # XORG_WITH_GLIB 11092 11093# XORG_LD_WRAP([required|optional]) 11094# --------------------------------- 11095# Minimum version: 1.13.0 11096# 11097# Check if linker supports -wrap, passed via compiler flags 11098# 11099# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11100# Otherwise the value of $enable_unit_tests is blank. 11101# 11102# Argument added in 1.16.0 - default is "required", to match existing behavior 11103# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11104# available, an argument of "optional" allows use when some unit tests require 11105# ld -wrap and others do not. 11106# 11107AC_DEFUN([XORG_LD_WRAP],[ 11108XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11109 [AC_LANG_PROGRAM([#include <stdlib.h> 11110 void __wrap_exit(int status) { return; }], 11111 [exit(0);])]) 11112# Not having ld wrap when unit testing has been explicitly requested is an error 11113if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11114 if test "x$have_ld_wrap" = x"no"; then 11115 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11116 fi 11117fi 11118AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11119# 11120]) # XORG_LD_WRAP 11121 11122# XORG_CHECK_LINKER_FLAGS 11123# ----------------------- 11124# SYNOPSIS 11125# 11126# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11127# 11128# DESCRIPTION 11129# 11130# Check whether the given linker FLAGS work with the current language's 11131# linker, or whether they give an error. 11132# 11133# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11134# success/failure. 11135# 11136# PROGRAM-SOURCE is the program source to link with, if needed 11137# 11138# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11139# 11140# LICENSE 11141# 11142# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11143# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11144# Copyright (c) 2009 Matteo Frigo 11145# 11146# This program is free software: you can redistribute it and/or modify it 11147# under the terms of the GNU General Public License as published by the 11148# Free Software Foundation, either version 3 of the License, or (at your 11149# option) any later version. 11150# 11151# This program is distributed in the hope that it will be useful, but 11152# WITHOUT ANY WARRANTY; without even the implied warranty of 11153# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11154# Public License for more details. 11155# 11156# You should have received a copy of the GNU General Public License along 11157# with this program. If not, see <http://www.gnu.org/licenses/>. 11158# 11159# As a special exception, the respective Autoconf Macro's copyright owner 11160# gives unlimited permission to copy, distribute and modify the configure 11161# scripts that are the output of Autoconf when processing the Macro. You 11162# need not follow the terms of the GNU General Public License when using 11163# or distributing such scripts, even though portions of the text of the 11164# Macro appear in them. The GNU General Public License (GPL) does govern 11165# all other use of the material that constitutes the Autoconf Macro. 11166# 11167# This special exception to the GPL applies to versions of the Autoconf 11168# Macro released by the Autoconf Archive. When you make and distribute a 11169# modified version of the Autoconf Macro, you may extend this special 11170# exception to the GPL to apply to your modified version as well.# 11171AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11172[AC_MSG_CHECKING([whether the linker accepts $1]) 11173dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11174AS_LITERAL_IF([$1], 11175 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11176 ax_save_FLAGS=$LDFLAGS 11177 LDFLAGS="$1" 11178 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11179 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11180 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11181 LDFLAGS=$ax_save_FLAGS])], 11182 [ax_save_FLAGS=$LDFLAGS 11183 LDFLAGS="$1" 11184 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11185 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11186 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11187 LDFLAGS=$ax_save_FLAGS]) 11188eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11189AC_MSG_RESULT($xorg_check_linker_flags) 11190if test "x$xorg_check_linker_flags" = xyes; then 11191 m4_default([$2], :) 11192else 11193 m4_default([$3], :) 11194fi 11195]) # XORG_CHECK_LINKER_FLAGS 11196 11197# XORG_MEMORY_CHECK_FLAGS 11198# ----------------------- 11199# Minimum version: 1.16.0 11200# 11201# This macro attempts to find appropriate memory checking functionality 11202# for various platforms which unit testing code may use to catch various 11203# forms of memory allocation and access errors in testing. 11204# 11205# Interface to module: 11206# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11207# Usually added to TESTS_ENVIRONMENT in Makefile.am 11208# 11209# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11210# 11211AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11212 11213AC_REQUIRE([AC_CANONICAL_HOST]) 11214AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11215 [Environment variables to enable memory checking in tests]) 11216 11217# Check for different types of support on different platforms 11218case $host_os in 11219 solaris*) 11220 AC_CHECK_LIB([umem], [umem_alloc], 11221 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11222 ;; 11223 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11224 # both directly and inverted, so should not be 0 or 255. 11225 malloc_debug_env='MALLOC_PERTURB_=15' 11226 ;; 11227 darwin*) 11228 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11229 ;; 11230 *bsd*) 11231 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11232 ;; 11233esac 11234 11235# User supplied flags override default flags 11236if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11237 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11238fi 11239 11240AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11241]) # XORG_WITH_LINT 11242 11243# XORG_CHECK_MALLOC_ZERO 11244# ---------------------- 11245# Minimum version: 1.0.0 11246# 11247# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11248# malloc(0) returns NULL. Packages should add one of these cflags to 11249# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11250AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11251AC_ARG_ENABLE(malloc0returnsnull, 11252 AS_HELP_STRING([--enable-malloc0returnsnull], 11253 [malloc(0) returns NULL (default: auto)]), 11254 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11255 [MALLOC_ZERO_RETURNS_NULL=auto]) 11256 11257AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11258if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11259AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11260 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11261#include <stdlib.h> 11262],[ 11263 char *m0, *r0, *c0, *p; 11264 m0 = malloc(0); 11265 p = malloc(10); 11266 r0 = realloc(p,0); 11267 c0 = calloc(0,10); 11268 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11269])], 11270 [xorg_cv_malloc0_returns_null=yes], 11271 [xorg_cv_malloc0_returns_null=no])]) 11272MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11273fi 11274AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11275 11276if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11277 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11278 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11279 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11280else 11281 MALLOC_ZERO_CFLAGS="" 11282 XMALLOC_ZERO_CFLAGS="" 11283 XTMALLOC_ZERO_CFLAGS="" 11284fi 11285 11286AC_SUBST([MALLOC_ZERO_CFLAGS]) 11287AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11288AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11289]) # XORG_CHECK_MALLOC_ZERO 11290 11291# XORG_WITH_LINT() 11292# ---------------- 11293# Minimum version: 1.1.0 11294# 11295# This macro enables the use of a tool that flags some suspicious and 11296# non-portable constructs (likely to be bugs) in C language source code. 11297# It will attempt to locate the tool and use appropriate options. 11298# There are various lint type tools on different platforms. 11299# 11300# Interface to module: 11301# LINT: returns the path to the tool found on the platform 11302# or the value set to LINT on the configure cmd line 11303# also an Automake conditional 11304# LINT_FLAGS: an Automake variable with appropriate flags 11305# 11306# --with-lint: 'yes' user instructs the module to use lint 11307# 'no' user instructs the module not to use lint (default) 11308# 11309# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11310# If the user sets the value of LINT_FLAGS, they are used verbatim. 11311# 11312AC_DEFUN([XORG_WITH_LINT],[ 11313 11314AC_ARG_VAR([LINT], [Path to a lint-style command]) 11315AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11316AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11317 [Use a lint-style source code checker (default: disabled)])], 11318 [use_lint=$withval], [use_lint=no]) 11319 11320# Obtain platform specific info like program name and options 11321# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11322case $host_os in 11323 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11324 lint_name=splint 11325 lint_options="-badflag" 11326 ;; 11327 *freebsd* | *netbsd*) 11328 lint_name=lint 11329 lint_options="-u -b" 11330 ;; 11331 *solaris*) 11332 lint_name=lint 11333 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11334 ;; 11335esac 11336 11337# Test for the presence of the program (either guessed by the code or spelled out by the user) 11338if test "x$use_lint" = x"yes" ; then 11339 AC_PATH_PROG([LINT], [$lint_name]) 11340 if test "x$LINT" = "x"; then 11341 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11342 fi 11343elif test "x$use_lint" = x"no" ; then 11344 if test "x$LINT" != "x"; then 11345 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11346 fi 11347else 11348 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11349fi 11350 11351# User supplied flags override default flags 11352if test "x$LINT_FLAGS" != "x"; then 11353 lint_options=$LINT_FLAGS 11354fi 11355 11356AC_SUBST([LINT_FLAGS],[$lint_options]) 11357AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11358 11359]) # XORG_WITH_LINT 11360 11361# XORG_LINT_LIBRARY(LIBNAME) 11362# -------------------------- 11363# Minimum version: 1.1.0 11364# 11365# Sets up flags for building lint libraries for checking programs that call 11366# functions in the library. 11367# 11368# Interface to module: 11369# LINTLIB - Automake variable with the name of lint library file to make 11370# MAKE_LINT_LIB - Automake conditional 11371# 11372# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11373# - 'no' user instructs the module not to create a lint library (default) 11374 11375AC_DEFUN([XORG_LINT_LIBRARY],[ 11376AC_REQUIRE([XORG_WITH_LINT]) 11377AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11378 [Create lint library (default: disabled)])], 11379 [make_lint_lib=$enableval], [make_lint_lib=no]) 11380 11381if test "x$make_lint_lib" = x"yes" ; then 11382 LINTLIB=llib-l$1.ln 11383 if test "x$LINT" = "x"; then 11384 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11385 fi 11386elif test "x$make_lint_lib" != x"no" ; then 11387 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11388fi 11389 11390AC_SUBST(LINTLIB) 11391AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11392 11393]) # XORG_LINT_LIBRARY 11394 11395# XORG_COMPILER_BRAND 11396# ------------------- 11397# Minimum version: 1.14.0 11398# 11399# Checks for various brands of compilers and sets flags as appropriate: 11400# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11401# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11402# clang compiler - sets CLANGCC to "yes" 11403# Intel compiler - sets INTELCC to "yes" 11404# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11405# 11406AC_DEFUN([XORG_COMPILER_BRAND], [ 11407AC_LANG_CASE( 11408 [C], [ 11409 AC_REQUIRE([AC_PROG_CC_C99]) 11410 ], 11411 [C++], [ 11412 AC_REQUIRE([AC_PROG_CXX]) 11413 ] 11414) 11415AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11416AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11417AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11418]) # XORG_COMPILER_BRAND 11419 11420# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11421# --------------- 11422# Minimum version: 1.16.0 11423# 11424# Test if the compiler works when passed the given flag as a command line argument. 11425# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11426# next flag in the list until there are no more options. 11427# 11428# Note that this does not guarantee that the compiler supports the flag as some 11429# compilers will simply ignore arguments that they do not understand, but we do 11430# attempt to weed out false positives by using -Werror=unknown-warning-option and 11431# -Werror=unused-command-line-argument 11432# 11433AC_DEFUN([XORG_TESTSET_CFLAG], [ 11434m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11435m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11436 11437AC_LANG_COMPILER_REQUIRE 11438 11439AC_LANG_CASE( 11440 [C], [ 11441 AC_REQUIRE([AC_PROG_CC_C99]) 11442 define([PREFIX], [C]) 11443 define([CACHE_PREFIX], [cc]) 11444 define([COMPILER], [$CC]) 11445 ], 11446 [C++], [ 11447 define([PREFIX], [CXX]) 11448 define([CACHE_PREFIX], [cxx]) 11449 define([COMPILER], [$CXX]) 11450 ] 11451) 11452 11453[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11454 11455if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11456 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11457 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11458 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11459 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11460 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11461 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11462 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11463 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11464fi 11465 11466if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11467 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11468 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11469 fi 11470 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11471 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11472 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11473 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11474 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11475 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11476 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11477 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11478fi 11479 11480found="no" 11481m4_foreach([flag], m4_cdr($@), [ 11482 if test $found = "no" ; then 11483 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11484 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11485 fi 11486 11487 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11488 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11489 fi 11490 11491 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11492 11493dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11494 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11495 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11496 AC_CACHE_VAL($cacheid, 11497 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11498 [eval $cacheid=yes], 11499 [eval $cacheid=no])]) 11500 11501 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11502 11503 eval supported=\$$cacheid 11504 AC_MSG_RESULT([$supported]) 11505 if test "$supported" = "yes" ; then 11506 $1="$$1 ]flag[" 11507 found="yes" 11508 fi 11509 fi 11510]) 11511]) # XORG_TESTSET_CFLAG 11512 11513# XORG_COMPILER_FLAGS 11514# --------------- 11515# Minimum version: 1.16.0 11516# 11517# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11518# arguments supported by the selected compiler which do NOT alter the generated 11519# code. These arguments will cause the compiler to print various warnings 11520# during compilation AND turn a conservative set of warnings into errors. 11521# 11522# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11523# future versions of util-macros as options are added to new compilers. 11524# 11525AC_DEFUN([XORG_COMPILER_FLAGS], [ 11526AC_REQUIRE([XORG_COMPILER_BRAND]) 11527 11528AC_ARG_ENABLE(selective-werror, 11529 AS_HELP_STRING([--disable-selective-werror], 11530 [Turn off selective compiler errors. (default: enabled)]), 11531 [SELECTIVE_WERROR=$enableval], 11532 [SELECTIVE_WERROR=yes]) 11533 11534AC_LANG_CASE( 11535 [C], [ 11536 define([PREFIX], [C]) 11537 ], 11538 [C++], [ 11539 define([PREFIX], [CXX]) 11540 ] 11541) 11542# -v is too short to test reliably with XORG_TESTSET_CFLAG 11543if test "x$SUNCC" = "xyes"; then 11544 [BASE_]PREFIX[FLAGS]="-v" 11545else 11546 [BASE_]PREFIX[FLAGS]="" 11547fi 11548 11549# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11550XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11551XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11552XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11553XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11554 11555AC_LANG_CASE( 11556 [C], [ 11557 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11558 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11559 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11560 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11561 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11562 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11563 ] 11564) 11565 11566# This chunk adds additional warnings that could catch undesired effects. 11567XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11568XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11569XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11570XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11571XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11572XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11573XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11574 11575# These are currently disabled because they are noisy. They will be enabled 11576# in the future once the codebase is sufficiently modernized to silence 11577# them. For now, I don't want them to drown out the other warnings. 11578# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11579# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11580# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11581 11582# Turn some warnings into errors, so we don't accidently get successful builds 11583# when there are problems that should be fixed. 11584 11585if test "x$SELECTIVE_WERROR" = "xyes" ; then 11586XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11587XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11588XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11589XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11590XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11591XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11592XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11593XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11594XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11595XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11596XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11597XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11598XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11599else 11600AC_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]) 11601XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11602XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11603XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11604XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11605XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11606XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11607XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11608XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11609XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11610XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11611XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11612XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11613XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11614fi 11615 11616AC_SUBST([BASE_]PREFIX[FLAGS]) 11617]) # XORG_COMPILER_FLAGS 11618 11619# XORG_CWARNFLAGS 11620# --------------- 11621# Minimum version: 1.2.0 11622# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11623# 11624# Defines CWARNFLAGS to enable C compiler warnings. 11625# 11626# This function is deprecated because it defines -fno-strict-aliasing 11627# which alters the code generated by the compiler. If -fno-strict-aliasing 11628# is needed, then it should be added explicitly in the module when 11629# it is updated to use BASE_CFLAGS. 11630# 11631AC_DEFUN([XORG_CWARNFLAGS], [ 11632AC_REQUIRE([XORG_COMPILER_FLAGS]) 11633AC_REQUIRE([XORG_COMPILER_BRAND]) 11634AC_LANG_CASE( 11635 [C], [ 11636 CWARNFLAGS="$BASE_CFLAGS" 11637 if test "x$GCC" = xyes ; then 11638 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11639 fi 11640 AC_SUBST(CWARNFLAGS) 11641 ] 11642) 11643]) # XORG_CWARNFLAGS 11644 11645# XORG_STRICT_OPTION 11646# ----------------------- 11647# Minimum version: 1.3.0 11648# 11649# Add configure option to enable strict compilation flags, such as treating 11650# warnings as fatal errors. 11651# If --enable-strict-compilation is passed to configure, adds strict flags to 11652# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11653# 11654# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11655# when strict compilation is unconditionally desired. 11656AC_DEFUN([XORG_STRICT_OPTION], [ 11657AC_REQUIRE([XORG_CWARNFLAGS]) 11658AC_REQUIRE([XORG_COMPILER_FLAGS]) 11659 11660AC_ARG_ENABLE(strict-compilation, 11661 AS_HELP_STRING([--enable-strict-compilation], 11662 [Enable all warnings from compiler and make them errors (default: disabled)]), 11663 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11664 11665AC_LANG_CASE( 11666 [C], [ 11667 define([PREFIX], [C]) 11668 ], 11669 [C++], [ 11670 define([PREFIX], [CXX]) 11671 ] 11672) 11673 11674[STRICT_]PREFIX[FLAGS]="" 11675XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11676XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11677 11678# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11679# activate it with -Werror, so we add it here explicitly. 11680XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11681 11682if test "x$STRICT_COMPILE" = "xyes"; then 11683 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11684 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11685fi 11686AC_SUBST([STRICT_]PREFIX[FLAGS]) 11687AC_SUBST([BASE_]PREFIX[FLAGS]) 11688AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11689]) # XORG_STRICT_OPTION 11690 11691# XORG_DEFAULT_OPTIONS 11692# -------------------- 11693# Minimum version: 1.3.0 11694# 11695# Defines default options for X.Org modules. 11696# 11697AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11698AC_REQUIRE([AC_PROG_INSTALL]) 11699XORG_COMPILER_FLAGS 11700XORG_CWARNFLAGS 11701XORG_STRICT_OPTION 11702XORG_RELEASE_VERSION 11703XORG_CHANGELOG 11704XORG_INSTALL 11705XORG_MANPAGE_SECTIONS 11706m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11707 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11708]) # XORG_DEFAULT_OPTIONS 11709 11710# XORG_INSTALL() 11711# ---------------- 11712# Minimum version: 1.4.0 11713# 11714# Defines the variable INSTALL_CMD as the command to copy 11715# INSTALL from $prefix/share/util-macros. 11716# 11717AC_DEFUN([XORG_INSTALL], [ 11718AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11719macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11720INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11721mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11722|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11723echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11724AC_SUBST([INSTALL_CMD]) 11725]) # XORG_INSTALL 11726dnl Copyright 2005 Red Hat, Inc 11727dnl 11728dnl Permission to use, copy, modify, distribute, and sell this software and its 11729dnl documentation for any purpose is hereby granted without fee, provided that 11730dnl the above copyright notice appear in all copies and that both that 11731dnl copyright notice and this permission notice appear in supporting 11732dnl documentation. 11733dnl 11734dnl The above copyright notice and this permission notice shall be included 11735dnl in all copies or substantial portions of the Software. 11736dnl 11737dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11738dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11739dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11740dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11741dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11742dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11743dnl OTHER DEALINGS IN THE SOFTWARE. 11744dnl 11745dnl Except as contained in this notice, the name of the copyright holders shall 11746dnl not be used in advertising or otherwise to promote the sale, use or 11747dnl other dealings in this Software without prior written authorization 11748dnl from the copyright holders. 11749dnl 11750 11751# XORG_RELEASE_VERSION 11752# -------------------- 11753# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11754 11755AC_DEFUN([XORG_RELEASE_VERSION],[ 11756 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11757 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11758 [Major version of this package]) 11759 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11760 if test "x$PVM" = "x"; then 11761 PVM="0" 11762 fi 11763 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11764 [$PVM], 11765 [Minor version of this package]) 11766 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11767 if test "x$PVP" = "x"; then 11768 PVP="0" 11769 fi 11770 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11771 [$PVP], 11772 [Patch version of this package]) 11773]) 11774 11775# XORG_CHANGELOG() 11776# ---------------- 11777# Minimum version: 1.2.0 11778# 11779# Defines the variable CHANGELOG_CMD as the command to generate 11780# ChangeLog from git. 11781# 11782# 11783AC_DEFUN([XORG_CHANGELOG], [ 11784CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11785mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11786|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11787echo 'git directory not found: installing possibly empty changelog.' >&2)" 11788AC_SUBST([CHANGELOG_CMD]) 11789]) # XORG_CHANGELOG 11790 11791