aclocal.m4 revision 339a7c43
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 1153m4_include([m4/ax_define_dir.m4]) 1154# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1155# 1156# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1157# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1158# Foundation, Inc. 1159# Written by Gordon Matzigkeit, 1996 1160# 1161# This file is free software; the Free Software Foundation gives 1162# unlimited permission to copy and/or distribute it, with or without 1163# modifications, as long as this notice is preserved. 1164 1165m4_define([_LT_COPYING], [dnl 1166# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1167# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1168# Foundation, Inc. 1169# Written by Gordon Matzigkeit, 1996 1170# 1171# This file is part of GNU Libtool. 1172# 1173# GNU Libtool is free software; you can redistribute it and/or 1174# modify it under the terms of the GNU General Public License as 1175# published by the Free Software Foundation; either version 2 of 1176# the License, or (at your option) any later version. 1177# 1178# As a special exception to the GNU General Public License, 1179# if you distribute this file as part of a program or library that 1180# is built using GNU Libtool, you may include this file under the 1181# same distribution terms that you use for the rest of that program. 1182# 1183# GNU Libtool is distributed in the hope that it will be useful, 1184# but WITHOUT ANY WARRANTY; without even the implied warranty of 1185# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1186# GNU General Public License for more details. 1187# 1188# You should have received a copy of the GNU General Public License 1189# along with GNU Libtool; see the file COPYING. If not, a copy 1190# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1191# obtained by writing to the Free Software Foundation, Inc., 1192# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1193]) 1194 1195# serial 57 LT_INIT 1196 1197 1198# LT_PREREQ(VERSION) 1199# ------------------ 1200# Complain and exit if this libtool version is less that VERSION. 1201m4_defun([LT_PREREQ], 1202[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1203 [m4_default([$3], 1204 [m4_fatal([Libtool version $1 or higher is required], 1205 63)])], 1206 [$2])]) 1207 1208 1209# _LT_CHECK_BUILDDIR 1210# ------------------ 1211# Complain if the absolute build directory name contains unusual characters 1212m4_defun([_LT_CHECK_BUILDDIR], 1213[case `pwd` in 1214 *\ * | *\ *) 1215 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1216esac 1217]) 1218 1219 1220# LT_INIT([OPTIONS]) 1221# ------------------ 1222AC_DEFUN([LT_INIT], 1223[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1224AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1225AC_BEFORE([$0], [LT_LANG])dnl 1226AC_BEFORE([$0], [LT_OUTPUT])dnl 1227AC_BEFORE([$0], [LTDL_INIT])dnl 1228m4_require([_LT_CHECK_BUILDDIR])dnl 1229 1230dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1231m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1232m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1233dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1234dnl unless we require an AC_DEFUNed macro: 1235AC_REQUIRE([LTOPTIONS_VERSION])dnl 1236AC_REQUIRE([LTSUGAR_VERSION])dnl 1237AC_REQUIRE([LTVERSION_VERSION])dnl 1238AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1239m4_require([_LT_PROG_LTMAIN])dnl 1240 1241_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1242 1243dnl Parse OPTIONS 1244_LT_SET_OPTIONS([$0], [$1]) 1245 1246# This can be used to rebuild libtool when needed 1247LIBTOOL_DEPS="$ltmain" 1248 1249# Always use our own libtool. 1250LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1251AC_SUBST(LIBTOOL)dnl 1252 1253_LT_SETUP 1254 1255# Only expand once: 1256m4_define([LT_INIT]) 1257])# LT_INIT 1258 1259# Old names: 1260AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1261AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1262dnl aclocal-1.4 backwards compatibility: 1263dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1264dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1265 1266 1267# _LT_CC_BASENAME(CC) 1268# ------------------- 1269# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1270m4_defun([_LT_CC_BASENAME], 1271[for cc_temp in $1""; do 1272 case $cc_temp in 1273 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1274 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1275 \-*) ;; 1276 *) break;; 1277 esac 1278done 1279cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1280]) 1281 1282 1283# _LT_FILEUTILS_DEFAULTS 1284# ---------------------- 1285# It is okay to use these file commands and assume they have been set 1286# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1287m4_defun([_LT_FILEUTILS_DEFAULTS], 1288[: ${CP="cp -f"} 1289: ${MV="mv -f"} 1290: ${RM="rm -f"} 1291])# _LT_FILEUTILS_DEFAULTS 1292 1293 1294# _LT_SETUP 1295# --------- 1296m4_defun([_LT_SETUP], 1297[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1298AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1299AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1300AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1301 1302_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1303dnl 1304_LT_DECL([], [host_alias], [0], [The host system])dnl 1305_LT_DECL([], [host], [0])dnl 1306_LT_DECL([], [host_os], [0])dnl 1307dnl 1308_LT_DECL([], [build_alias], [0], [The build system])dnl 1309_LT_DECL([], [build], [0])dnl 1310_LT_DECL([], [build_os], [0])dnl 1311dnl 1312AC_REQUIRE([AC_PROG_CC])dnl 1313AC_REQUIRE([LT_PATH_LD])dnl 1314AC_REQUIRE([LT_PATH_NM])dnl 1315dnl 1316AC_REQUIRE([AC_PROG_LN_S])dnl 1317test -z "$LN_S" && LN_S="ln -s" 1318_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1319dnl 1320AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1321_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1322_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1323dnl 1324m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1325m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1326m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1327m4_require([_LT_CMD_RELOAD])dnl 1328m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1329m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1330m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1331m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1332m4_require([_LT_WITH_SYSROOT])dnl 1333 1334_LT_CONFIG_LIBTOOL_INIT([ 1335# See if we are running on zsh, and set the options which allow our 1336# commands through without removal of \ escapes INIT. 1337if test -n "\${ZSH_VERSION+set}" ; then 1338 setopt NO_GLOB_SUBST 1339fi 1340]) 1341if test -n "${ZSH_VERSION+set}" ; then 1342 setopt NO_GLOB_SUBST 1343fi 1344 1345_LT_CHECK_OBJDIR 1346 1347m4_require([_LT_TAG_COMPILER])dnl 1348 1349case $host_os in 1350aix3*) 1351 # AIX sometimes has problems with the GCC collect2 program. For some 1352 # reason, if we set the COLLECT_NAMES environment variable, the problems 1353 # vanish in a puff of smoke. 1354 if test "X${COLLECT_NAMES+set}" != Xset; then 1355 COLLECT_NAMES= 1356 export COLLECT_NAMES 1357 fi 1358 ;; 1359esac 1360 1361# Global variables: 1362ofile=libtool 1363can_build_shared=yes 1364 1365# All known linkers require a `.a' archive for static linking (except MSVC, 1366# which needs '.lib'). 1367libext=a 1368 1369with_gnu_ld="$lt_cv_prog_gnu_ld" 1370 1371old_CC="$CC" 1372old_CFLAGS="$CFLAGS" 1373 1374# Set sane defaults for various variables 1375test -z "$CC" && CC=cc 1376test -z "$LTCC" && LTCC=$CC 1377test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1378test -z "$LD" && LD=ld 1379test -z "$ac_objext" && ac_objext=o 1380 1381_LT_CC_BASENAME([$compiler]) 1382 1383# Only perform the check for file, if the check method requires it 1384test -z "$MAGIC_CMD" && MAGIC_CMD=file 1385case $deplibs_check_method in 1386file_magic*) 1387 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1388 _LT_PATH_MAGIC 1389 fi 1390 ;; 1391esac 1392 1393# Use C for the default configuration in the libtool script 1394LT_SUPPORTED_TAG([CC]) 1395_LT_LANG_C_CONFIG 1396_LT_LANG_DEFAULT_CONFIG 1397_LT_CONFIG_COMMANDS 1398])# _LT_SETUP 1399 1400 1401# _LT_PREPARE_SED_QUOTE_VARS 1402# -------------------------- 1403# Define a few sed substitution that help us do robust quoting. 1404m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1405[# Backslashify metacharacters that are still active within 1406# double-quoted strings. 1407sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1408 1409# Same as above, but do not quote variable references. 1410double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1411 1412# Sed substitution to delay expansion of an escaped shell variable in a 1413# double_quote_subst'ed string. 1414delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1415 1416# Sed substitution to delay expansion of an escaped single quote. 1417delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1418 1419# Sed substitution to avoid accidental globbing in evaled expressions 1420no_glob_subst='s/\*/\\\*/g' 1421]) 1422 1423# _LT_PROG_LTMAIN 1424# --------------- 1425# Note that this code is called both from `configure', and `config.status' 1426# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1427# `config.status' has no value for ac_aux_dir unless we are using Automake, 1428# so we pass a copy along to make sure it has a sensible value anyway. 1429m4_defun([_LT_PROG_LTMAIN], 1430[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1431_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1432ltmain="$ac_aux_dir/ltmain.sh" 1433])# _LT_PROG_LTMAIN 1434 1435 1436 1437# So that we can recreate a full libtool script including additional 1438# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1439# in macros and then make a single call at the end using the `libtool' 1440# label. 1441 1442 1443# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1444# ---------------------------------------- 1445# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1446m4_define([_LT_CONFIG_LIBTOOL_INIT], 1447[m4_ifval([$1], 1448 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1449 [$1 1450])])]) 1451 1452# Initialize. 1453m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1454 1455 1456# _LT_CONFIG_LIBTOOL([COMMANDS]) 1457# ------------------------------ 1458# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1459m4_define([_LT_CONFIG_LIBTOOL], 1460[m4_ifval([$1], 1461 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1462 [$1 1463])])]) 1464 1465# Initialize. 1466m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1467 1468 1469# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1470# ----------------------------------------------------- 1471m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1472[_LT_CONFIG_LIBTOOL([$1]) 1473_LT_CONFIG_LIBTOOL_INIT([$2]) 1474]) 1475 1476 1477# _LT_FORMAT_COMMENT([COMMENT]) 1478# ----------------------------- 1479# Add leading comment marks to the start of each line, and a trailing 1480# full-stop to the whole comment if one is not present already. 1481m4_define([_LT_FORMAT_COMMENT], 1482[m4_ifval([$1], [ 1483m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1484 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1485)]) 1486 1487 1488 1489 1490 1491# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1492# ------------------------------------------------------------------- 1493# CONFIGNAME is the name given to the value in the libtool script. 1494# VARNAME is the (base) name used in the configure script. 1495# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1496# VARNAME. Any other value will be used directly. 1497m4_define([_LT_DECL], 1498[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1499 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1500 [m4_ifval([$1], [$1], [$2])]) 1501 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1502 m4_ifval([$4], 1503 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1504 lt_dict_add_subkey([lt_decl_dict], [$2], 1505 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1506]) 1507 1508 1509# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1510# -------------------------------------------------------- 1511m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1512 1513 1514# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1515# ------------------------------------------------ 1516m4_define([lt_decl_tag_varnames], 1517[_lt_decl_filter([tagged?], [yes], $@)]) 1518 1519 1520# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1521# --------------------------------------------------------- 1522m4_define([_lt_decl_filter], 1523[m4_case([$#], 1524 [0], [m4_fatal([$0: too few arguments: $#])], 1525 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1526 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1527 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1528 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1529]) 1530 1531 1532# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1533# -------------------------------------------------- 1534m4_define([lt_decl_quote_varnames], 1535[_lt_decl_filter([value], [1], $@)]) 1536 1537 1538# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1539# --------------------------------------------------- 1540m4_define([lt_decl_dquote_varnames], 1541[_lt_decl_filter([value], [2], $@)]) 1542 1543 1544# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1545# --------------------------------------------------- 1546m4_define([lt_decl_varnames_tagged], 1547[m4_assert([$# <= 2])dnl 1548_$0(m4_quote(m4_default([$1], [[, ]])), 1549 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1550 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1551m4_define([_lt_decl_varnames_tagged], 1552[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1553 1554 1555# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1556# ------------------------------------------------ 1557m4_define([lt_decl_all_varnames], 1558[_$0(m4_quote(m4_default([$1], [[, ]])), 1559 m4_if([$2], [], 1560 m4_quote(lt_decl_varnames), 1561 m4_quote(m4_shift($@))))[]dnl 1562]) 1563m4_define([_lt_decl_all_varnames], 1564[lt_join($@, lt_decl_varnames_tagged([$1], 1565 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1566]) 1567 1568 1569# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1570# ------------------------------------ 1571# Quote a variable value, and forward it to `config.status' so that its 1572# declaration there will have the same value as in `configure'. VARNAME 1573# must have a single quote delimited value for this to work. 1574m4_define([_LT_CONFIG_STATUS_DECLARE], 1575[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1576 1577 1578# _LT_CONFIG_STATUS_DECLARATIONS 1579# ------------------------------ 1580# We delimit libtool config variables with single quotes, so when 1581# we write them to config.status, we have to be sure to quote all 1582# embedded single quotes properly. In configure, this macro expands 1583# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1584# 1585# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1586m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1587[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1588 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1589 1590 1591# _LT_LIBTOOL_TAGS 1592# ---------------- 1593# Output comment and list of tags supported by the script 1594m4_defun([_LT_LIBTOOL_TAGS], 1595[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1596available_tags="_LT_TAGS"dnl 1597]) 1598 1599 1600# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1601# ----------------------------------- 1602# Extract the dictionary values for VARNAME (optionally with TAG) and 1603# expand to a commented shell variable setting: 1604# 1605# # Some comment about what VAR is for. 1606# visible_name=$lt_internal_name 1607m4_define([_LT_LIBTOOL_DECLARE], 1608[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1609 [description])))[]dnl 1610m4_pushdef([_libtool_name], 1611 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1612m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1613 [0], [_libtool_name=[$]$1], 1614 [1], [_libtool_name=$lt_[]$1], 1615 [2], [_libtool_name=$lt_[]$1], 1616 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1617m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1618]) 1619 1620 1621# _LT_LIBTOOL_CONFIG_VARS 1622# ----------------------- 1623# Produce commented declarations of non-tagged libtool config variables 1624# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1625# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1626# section) are produced by _LT_LIBTOOL_TAG_VARS. 1627m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1628[m4_foreach([_lt_var], 1629 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1630 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1631 1632 1633# _LT_LIBTOOL_TAG_VARS(TAG) 1634# ------------------------- 1635m4_define([_LT_LIBTOOL_TAG_VARS], 1636[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1637 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1638 1639 1640# _LT_TAGVAR(VARNAME, [TAGNAME]) 1641# ------------------------------ 1642m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1643 1644 1645# _LT_CONFIG_COMMANDS 1646# ------------------- 1647# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1648# variables for single and double quote escaping we saved from calls 1649# to _LT_DECL, we can put quote escaped variables declarations 1650# into `config.status', and then the shell code to quote escape them in 1651# for loops in `config.status'. Finally, any additional code accumulated 1652# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1653m4_defun([_LT_CONFIG_COMMANDS], 1654[AC_PROVIDE_IFELSE([LT_OUTPUT], 1655 dnl If the libtool generation code has been placed in $CONFIG_LT, 1656 dnl instead of duplicating it all over again into config.status, 1657 dnl then we will have config.status run $CONFIG_LT later, so it 1658 dnl needs to know what name is stored there: 1659 [AC_CONFIG_COMMANDS([libtool], 1660 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1661 dnl If the libtool generation code is destined for config.status, 1662 dnl expand the accumulated commands and init code now: 1663 [AC_CONFIG_COMMANDS([libtool], 1664 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1665])#_LT_CONFIG_COMMANDS 1666 1667 1668# Initialize. 1669m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1670[ 1671 1672# The HP-UX ksh and POSIX shell print the target directory to stdout 1673# if CDPATH is set. 1674(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1675 1676sed_quote_subst='$sed_quote_subst' 1677double_quote_subst='$double_quote_subst' 1678delay_variable_subst='$delay_variable_subst' 1679_LT_CONFIG_STATUS_DECLARATIONS 1680LTCC='$LTCC' 1681LTCFLAGS='$LTCFLAGS' 1682compiler='$compiler_DEFAULT' 1683 1684# A function that is used when there is no print builtin or printf. 1685func_fallback_echo () 1686{ 1687 eval 'cat <<_LTECHO_EOF 1688\$[]1 1689_LTECHO_EOF' 1690} 1691 1692# Quote evaled strings. 1693for var in lt_decl_all_varnames([[ \ 1694]], lt_decl_quote_varnames); do 1695 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1696 *[[\\\\\\\`\\"\\\$]]*) 1697 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1698 ;; 1699 *) 1700 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1701 ;; 1702 esac 1703done 1704 1705# Double-quote double-evaled strings. 1706for var in lt_decl_all_varnames([[ \ 1707]], lt_decl_dquote_varnames); do 1708 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1709 *[[\\\\\\\`\\"\\\$]]*) 1710 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1711 ;; 1712 *) 1713 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1714 ;; 1715 esac 1716done 1717 1718_LT_OUTPUT_LIBTOOL_INIT 1719]) 1720 1721# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1722# ------------------------------------ 1723# Generate a child script FILE with all initialization necessary to 1724# reuse the environment learned by the parent script, and make the 1725# file executable. If COMMENT is supplied, it is inserted after the 1726# `#!' sequence but before initialization text begins. After this 1727# macro, additional text can be appended to FILE to form the body of 1728# the child script. The macro ends with non-zero status if the 1729# file could not be fully written (such as if the disk is full). 1730m4_ifdef([AS_INIT_GENERATED], 1731[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1732[m4_defun([_LT_GENERATED_FILE_INIT], 1733[m4_require([AS_PREPARE])]dnl 1734[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1735[lt_write_fail=0 1736cat >$1 <<_ASEOF || lt_write_fail=1 1737#! $SHELL 1738# Generated by $as_me. 1739$2 1740SHELL=\${CONFIG_SHELL-$SHELL} 1741export SHELL 1742_ASEOF 1743cat >>$1 <<\_ASEOF || lt_write_fail=1 1744AS_SHELL_SANITIZE 1745_AS_PREPARE 1746exec AS_MESSAGE_FD>&1 1747_ASEOF 1748test $lt_write_fail = 0 && chmod +x $1[]dnl 1749m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1750 1751# LT_OUTPUT 1752# --------- 1753# This macro allows early generation of the libtool script (before 1754# AC_OUTPUT is called), incase it is used in configure for compilation 1755# tests. 1756AC_DEFUN([LT_OUTPUT], 1757[: ${CONFIG_LT=./config.lt} 1758AC_MSG_NOTICE([creating $CONFIG_LT]) 1759_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1760[# Run this file to recreate a libtool stub with the current configuration.]) 1761 1762cat >>"$CONFIG_LT" <<\_LTEOF 1763lt_cl_silent=false 1764exec AS_MESSAGE_LOG_FD>>config.log 1765{ 1766 echo 1767 AS_BOX([Running $as_me.]) 1768} >&AS_MESSAGE_LOG_FD 1769 1770lt_cl_help="\ 1771\`$as_me' creates a local libtool stub from the current configuration, 1772for use in further configure time tests before the real libtool is 1773generated. 1774 1775Usage: $[0] [[OPTIONS]] 1776 1777 -h, --help print this help, then exit 1778 -V, --version print version number, then exit 1779 -q, --quiet do not print progress messages 1780 -d, --debug don't remove temporary files 1781 1782Report bugs to <bug-libtool@gnu.org>." 1783 1784lt_cl_version="\ 1785m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1786m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1787configured by $[0], generated by m4_PACKAGE_STRING. 1788 1789Copyright (C) 2011 Free Software Foundation, Inc. 1790This config.lt script is free software; the Free Software Foundation 1791gives unlimited permision to copy, distribute and modify it." 1792 1793while test $[#] != 0 1794do 1795 case $[1] in 1796 --version | --v* | -V ) 1797 echo "$lt_cl_version"; exit 0 ;; 1798 --help | --h* | -h ) 1799 echo "$lt_cl_help"; exit 0 ;; 1800 --debug | --d* | -d ) 1801 debug=: ;; 1802 --quiet | --q* | --silent | --s* | -q ) 1803 lt_cl_silent=: ;; 1804 1805 -*) AC_MSG_ERROR([unrecognized option: $[1] 1806Try \`$[0] --help' for more information.]) ;; 1807 1808 *) AC_MSG_ERROR([unrecognized argument: $[1] 1809Try \`$[0] --help' for more information.]) ;; 1810 esac 1811 shift 1812done 1813 1814if $lt_cl_silent; then 1815 exec AS_MESSAGE_FD>/dev/null 1816fi 1817_LTEOF 1818 1819cat >>"$CONFIG_LT" <<_LTEOF 1820_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1821_LTEOF 1822 1823cat >>"$CONFIG_LT" <<\_LTEOF 1824AC_MSG_NOTICE([creating $ofile]) 1825_LT_OUTPUT_LIBTOOL_COMMANDS 1826AS_EXIT(0) 1827_LTEOF 1828chmod +x "$CONFIG_LT" 1829 1830# configure is writing to config.log, but config.lt does its own redirection, 1831# appending to config.log, which fails on DOS, as config.log is still kept 1832# open by configure. Here we exec the FD to /dev/null, effectively closing 1833# config.log, so it can be properly (re)opened and appended to by config.lt. 1834lt_cl_success=: 1835test "$silent" = yes && 1836 lt_config_lt_args="$lt_config_lt_args --quiet" 1837exec AS_MESSAGE_LOG_FD>/dev/null 1838$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1839exec AS_MESSAGE_LOG_FD>>config.log 1840$lt_cl_success || AS_EXIT(1) 1841])# LT_OUTPUT 1842 1843 1844# _LT_CONFIG(TAG) 1845# --------------- 1846# If TAG is the built-in tag, create an initial libtool script with a 1847# default configuration from the untagged config vars. Otherwise add code 1848# to config.status for appending the configuration named by TAG from the 1849# matching tagged config vars. 1850m4_defun([_LT_CONFIG], 1851[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1852_LT_CONFIG_SAVE_COMMANDS([ 1853 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1854 m4_if(_LT_TAG, [C], [ 1855 # See if we are running on zsh, and set the options which allow our 1856 # commands through without removal of \ escapes. 1857 if test -n "${ZSH_VERSION+set}" ; then 1858 setopt NO_GLOB_SUBST 1859 fi 1860 1861 cfgfile="${ofile}T" 1862 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1863 $RM "$cfgfile" 1864 1865 cat <<_LT_EOF >> "$cfgfile" 1866#! $SHELL 1867 1868# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1869# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1870# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1871# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1872# 1873_LT_COPYING 1874_LT_LIBTOOL_TAGS 1875 1876# ### BEGIN LIBTOOL CONFIG 1877_LT_LIBTOOL_CONFIG_VARS 1878_LT_LIBTOOL_TAG_VARS 1879# ### END LIBTOOL CONFIG 1880 1881_LT_EOF 1882 1883 case $host_os in 1884 aix3*) 1885 cat <<\_LT_EOF >> "$cfgfile" 1886# AIX sometimes has problems with the GCC collect2 program. For some 1887# reason, if we set the COLLECT_NAMES environment variable, the problems 1888# vanish in a puff of smoke. 1889if test "X${COLLECT_NAMES+set}" != Xset; then 1890 COLLECT_NAMES= 1891 export COLLECT_NAMES 1892fi 1893_LT_EOF 1894 ;; 1895 esac 1896 1897 _LT_PROG_LTMAIN 1898 1899 # We use sed instead of cat because bash on DJGPP gets confused if 1900 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1901 # text mode, it properly converts lines to CR/LF. This bash problem 1902 # is reportedly fixed, but why not run on old versions too? 1903 sed '$q' "$ltmain" >> "$cfgfile" \ 1904 || (rm -f "$cfgfile"; exit 1) 1905 1906 _LT_PROG_REPLACE_SHELLFNS 1907 1908 mv -f "$cfgfile" "$ofile" || 1909 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1910 chmod +x "$ofile" 1911], 1912[cat <<_LT_EOF >> "$ofile" 1913 1914dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1915dnl in a comment (ie after a #). 1916# ### BEGIN LIBTOOL TAG CONFIG: $1 1917_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1918# ### END LIBTOOL TAG CONFIG: $1 1919_LT_EOF 1920])dnl /m4_if 1921], 1922[m4_if([$1], [], [ 1923 PACKAGE='$PACKAGE' 1924 VERSION='$VERSION' 1925 TIMESTAMP='$TIMESTAMP' 1926 RM='$RM' 1927 ofile='$ofile'], []) 1928])dnl /_LT_CONFIG_SAVE_COMMANDS 1929])# _LT_CONFIG 1930 1931 1932# LT_SUPPORTED_TAG(TAG) 1933# --------------------- 1934# Trace this macro to discover what tags are supported by the libtool 1935# --tag option, using: 1936# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1937AC_DEFUN([LT_SUPPORTED_TAG], []) 1938 1939 1940# C support is built-in for now 1941m4_define([_LT_LANG_C_enabled], []) 1942m4_define([_LT_TAGS], []) 1943 1944 1945# LT_LANG(LANG) 1946# ------------- 1947# Enable libtool support for the given language if not already enabled. 1948AC_DEFUN([LT_LANG], 1949[AC_BEFORE([$0], [LT_OUTPUT])dnl 1950m4_case([$1], 1951 [C], [_LT_LANG(C)], 1952 [C++], [_LT_LANG(CXX)], 1953 [Go], [_LT_LANG(GO)], 1954 [Java], [_LT_LANG(GCJ)], 1955 [Fortran 77], [_LT_LANG(F77)], 1956 [Fortran], [_LT_LANG(FC)], 1957 [Windows Resource], [_LT_LANG(RC)], 1958 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1959 [_LT_LANG($1)], 1960 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1961])# LT_LANG 1962 1963 1964# _LT_LANG(LANGNAME) 1965# ------------------ 1966m4_defun([_LT_LANG], 1967[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1968 [LT_SUPPORTED_TAG([$1])dnl 1969 m4_append([_LT_TAGS], [$1 ])dnl 1970 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1971 _LT_LANG_$1_CONFIG($1)])dnl 1972])# _LT_LANG 1973 1974 1975m4_ifndef([AC_PROG_GO], [ 1976# NOTE: This macro has been submitted for inclusion into # 1977# GNU Autoconf as AC_PROG_GO. When it is available in # 1978# a released version of Autoconf we should remove this # 1979# macro and use it instead. # 1980m4_defun([AC_PROG_GO], 1981[AC_LANG_PUSH(Go)dnl 1982AC_ARG_VAR([GOC], [Go compiler command])dnl 1983AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1984_AC_ARG_VAR_LDFLAGS()dnl 1985AC_CHECK_TOOL(GOC, gccgo) 1986if test -z "$GOC"; then 1987 if test -n "$ac_tool_prefix"; then 1988 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1989 fi 1990fi 1991if test -z "$GOC"; then 1992 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1993fi 1994])#m4_defun 1995])#m4_ifndef 1996 1997 1998# _LT_LANG_DEFAULT_CONFIG 1999# ----------------------- 2000m4_defun([_LT_LANG_DEFAULT_CONFIG], 2001[AC_PROVIDE_IFELSE([AC_PROG_CXX], 2002 [LT_LANG(CXX)], 2003 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2004 2005AC_PROVIDE_IFELSE([AC_PROG_F77], 2006 [LT_LANG(F77)], 2007 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2008 2009AC_PROVIDE_IFELSE([AC_PROG_FC], 2010 [LT_LANG(FC)], 2011 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2012 2013dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 2014dnl pulling things in needlessly. 2015AC_PROVIDE_IFELSE([AC_PROG_GCJ], 2016 [LT_LANG(GCJ)], 2017 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2018 [LT_LANG(GCJ)], 2019 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 2020 [LT_LANG(GCJ)], 2021 [m4_ifdef([AC_PROG_GCJ], 2022 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 2023 m4_ifdef([A][M_PROG_GCJ], 2024 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 2025 m4_ifdef([LT_PROG_GCJ], 2026 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2027 2028AC_PROVIDE_IFELSE([AC_PROG_GO], 2029 [LT_LANG(GO)], 2030 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2031 2032AC_PROVIDE_IFELSE([LT_PROG_RC], 2033 [LT_LANG(RC)], 2034 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 2035])# _LT_LANG_DEFAULT_CONFIG 2036 2037# Obsolete macros: 2038AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 2039AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 2040AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 2041AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 2042AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 2043dnl aclocal-1.4 backwards compatibility: 2044dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 2045dnl AC_DEFUN([AC_LIBTOOL_F77], []) 2046dnl AC_DEFUN([AC_LIBTOOL_FC], []) 2047dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 2048dnl AC_DEFUN([AC_LIBTOOL_RC], []) 2049 2050 2051# _LT_TAG_COMPILER 2052# ---------------- 2053m4_defun([_LT_TAG_COMPILER], 2054[AC_REQUIRE([AC_PROG_CC])dnl 2055 2056_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 2057_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 2058_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 2059_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2060 2061# If no C compiler was specified, use CC. 2062LTCC=${LTCC-"$CC"} 2063 2064# If no C compiler flags were specified, use CFLAGS. 2065LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2066 2067# Allow CC to be a program name with arguments. 2068compiler=$CC 2069])# _LT_TAG_COMPILER 2070 2071 2072# _LT_COMPILER_BOILERPLATE 2073# ------------------------ 2074# Check for compiler boilerplate output or warnings with 2075# the simple compiler test code. 2076m4_defun([_LT_COMPILER_BOILERPLATE], 2077[m4_require([_LT_DECL_SED])dnl 2078ac_outfile=conftest.$ac_objext 2079echo "$lt_simple_compile_test_code" >conftest.$ac_ext 2080eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2081_lt_compiler_boilerplate=`cat conftest.err` 2082$RM conftest* 2083])# _LT_COMPILER_BOILERPLATE 2084 2085 2086# _LT_LINKER_BOILERPLATE 2087# ---------------------- 2088# Check for linker boilerplate output or warnings with 2089# the simple link test code. 2090m4_defun([_LT_LINKER_BOILERPLATE], 2091[m4_require([_LT_DECL_SED])dnl 2092ac_outfile=conftest.$ac_objext 2093echo "$lt_simple_link_test_code" >conftest.$ac_ext 2094eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2095_lt_linker_boilerplate=`cat conftest.err` 2096$RM -r conftest* 2097])# _LT_LINKER_BOILERPLATE 2098 2099# _LT_REQUIRED_DARWIN_CHECKS 2100# ------------------------- 2101m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2102 case $host_os in 2103 rhapsody* | darwin*) 2104 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2105 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2106 AC_CHECK_TOOL([LIPO], [lipo], [:]) 2107 AC_CHECK_TOOL([OTOOL], [otool], [:]) 2108 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2109 _LT_DECL([], [DSYMUTIL], [1], 2110 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2111 _LT_DECL([], [NMEDIT], [1], 2112 [Tool to change global to local symbols on Mac OS X]) 2113 _LT_DECL([], [LIPO], [1], 2114 [Tool to manipulate fat objects and archives on Mac OS X]) 2115 _LT_DECL([], [OTOOL], [1], 2116 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2117 _LT_DECL([], [OTOOL64], [1], 2118 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2119 2120 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2121 [lt_cv_apple_cc_single_mod=no 2122 if test -z "${LT_MULTI_MODULE}"; then 2123 # By default we will add the -single_module flag. You can override 2124 # by either setting the environment variable LT_MULTI_MODULE 2125 # non-empty at configure time, or by adding -multi_module to the 2126 # link flags. 2127 rm -rf libconftest.dylib* 2128 echo "int foo(void){return 1;}" > conftest.c 2129 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2130-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2131 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2132 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2133 _lt_result=$? 2134 # If there is a non-empty error log, and "single_module" 2135 # appears in it, assume the flag caused a linker warning 2136 if test -s conftest.err && $GREP single_module conftest.err; then 2137 cat conftest.err >&AS_MESSAGE_LOG_FD 2138 # Otherwise, if the output was created with a 0 exit code from 2139 # the compiler, it worked. 2140 elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2141 lt_cv_apple_cc_single_mod=yes 2142 else 2143 cat conftest.err >&AS_MESSAGE_LOG_FD 2144 fi 2145 rm -rf libconftest.dylib* 2146 rm -f conftest.* 2147 fi]) 2148 2149 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2150 [lt_cv_ld_exported_symbols_list], 2151 [lt_cv_ld_exported_symbols_list=no 2152 save_LDFLAGS=$LDFLAGS 2153 echo "_main" > conftest.sym 2154 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2155 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2156 [lt_cv_ld_exported_symbols_list=yes], 2157 [lt_cv_ld_exported_symbols_list=no]) 2158 LDFLAGS="$save_LDFLAGS" 2159 ]) 2160 2161 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2162 [lt_cv_ld_force_load=no 2163 cat > conftest.c << _LT_EOF 2164int forced_loaded() { return 2;} 2165_LT_EOF 2166 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2167 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2168 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2169 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2170 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2171 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2172 cat > conftest.c << _LT_EOF 2173int main() { return 0;} 2174_LT_EOF 2175 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2176 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2177 _lt_result=$? 2178 if test -s conftest.err && $GREP force_load conftest.err; then 2179 cat conftest.err >&AS_MESSAGE_LOG_FD 2180 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2181 lt_cv_ld_force_load=yes 2182 else 2183 cat conftest.err >&AS_MESSAGE_LOG_FD 2184 fi 2185 rm -f conftest.err libconftest.a conftest conftest.c 2186 rm -rf conftest.dSYM 2187 ]) 2188 case $host_os in 2189 rhapsody* | darwin1.[[012]]) 2190 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2191 darwin1.*) 2192 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2193 darwin*) # darwin 5.x on 2194 # if running on 10.5 or later, the deployment target defaults 2195 # to the OS version, if on x86, and 10.4, the deployment 2196 # target defaults to 10.4. Don't you love it? 2197 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2198 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2199 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2200 10.[[012]]*) 2201 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2202 10.*) 2203 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2204 esac 2205 ;; 2206 esac 2207 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2208 _lt_dar_single_mod='$single_module' 2209 fi 2210 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2211 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2212 else 2213 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2214 fi 2215 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2216 _lt_dsymutil='~$DSYMUTIL $lib || :' 2217 else 2218 _lt_dsymutil= 2219 fi 2220 ;; 2221 esac 2222]) 2223 2224 2225# _LT_DARWIN_LINKER_FEATURES([TAG]) 2226# --------------------------------- 2227# Checks for linker and compiler features on darwin 2228m4_defun([_LT_DARWIN_LINKER_FEATURES], 2229[ 2230 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2231 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2232 _LT_TAGVAR(hardcode_direct, $1)=no 2233 _LT_TAGVAR(hardcode_automatic, $1)=yes 2234 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2235 if test "$lt_cv_ld_force_load" = "yes"; then 2236 _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\"`' 2237 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2238 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2239 else 2240 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2241 fi 2242 _LT_TAGVAR(link_all_deplibs, $1)=yes 2243 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2244 case $cc_basename in 2245 ifort*) _lt_dar_can_shared=yes ;; 2246 *) _lt_dar_can_shared=$GCC ;; 2247 esac 2248 if test "$_lt_dar_can_shared" = "yes"; then 2249 output_verbose_link_cmd=func_echo_all 2250 _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}" 2251 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2252 _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}" 2253 _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}" 2254 m4_if([$1], [CXX], 2255[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2256 _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}" 2257 _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}" 2258 fi 2259],[]) 2260 else 2261 _LT_TAGVAR(ld_shlibs, $1)=no 2262 fi 2263]) 2264 2265# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2266# ---------------------------------- 2267# Links a minimal program and checks the executable 2268# for the system default hardcoded library path. In most cases, 2269# this is /usr/lib:/lib, but when the MPI compilers are used 2270# the location of the communication and MPI libs are included too. 2271# If we don't find anything, use the default library path according 2272# to the aix ld manual. 2273# Store the results from the different compilers for each TAGNAME. 2274# Allow to override them for all tags through lt_cv_aix_libpath. 2275m4_defun([_LT_SYS_MODULE_PATH_AIX], 2276[m4_require([_LT_DECL_SED])dnl 2277if test "${lt_cv_aix_libpath+set}" = set; then 2278 aix_libpath=$lt_cv_aix_libpath 2279else 2280 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2281 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2282 lt_aix_libpath_sed='[ 2283 /Import File Strings/,/^$/ { 2284 /^0/ { 2285 s/^0 *\([^ ]*\) *$/\1/ 2286 p 2287 } 2288 }]' 2289 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2290 # Check for a 64-bit object if we didn't find anything. 2291 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2292 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2293 fi],[]) 2294 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2295 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2296 fi 2297 ]) 2298 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2299fi 2300])# _LT_SYS_MODULE_PATH_AIX 2301 2302 2303# _LT_SHELL_INIT(ARG) 2304# ------------------- 2305m4_define([_LT_SHELL_INIT], 2306[m4_divert_text([M4SH-INIT], [$1 2307])])# _LT_SHELL_INIT 2308 2309 2310 2311# _LT_PROG_ECHO_BACKSLASH 2312# ----------------------- 2313# Find how we can fake an echo command that does not interpret backslash. 2314# In particular, with Autoconf 2.60 or later we add some code to the start 2315# of the generated configure script which will find a shell with a builtin 2316# printf (which we can use as an echo command). 2317m4_defun([_LT_PROG_ECHO_BACKSLASH], 2318[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2319ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2320ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2321 2322AC_MSG_CHECKING([how to print strings]) 2323# Test print first, because it will be a builtin if present. 2324if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2325 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2326 ECHO='print -r --' 2327elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2328 ECHO='printf %s\n' 2329else 2330 # Use this function as a fallback that always works. 2331 func_fallback_echo () 2332 { 2333 eval 'cat <<_LTECHO_EOF 2334$[]1 2335_LTECHO_EOF' 2336 } 2337 ECHO='func_fallback_echo' 2338fi 2339 2340# func_echo_all arg... 2341# Invoke $ECHO with all args, space-separated. 2342func_echo_all () 2343{ 2344 $ECHO "$*" 2345} 2346 2347case "$ECHO" in 2348 printf*) AC_MSG_RESULT([printf]) ;; 2349 print*) AC_MSG_RESULT([print -r]) ;; 2350 *) AC_MSG_RESULT([cat]) ;; 2351esac 2352 2353m4_ifdef([_AS_DETECT_SUGGESTED], 2354[_AS_DETECT_SUGGESTED([ 2355 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2356 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2357 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2358 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2359 PATH=/empty FPATH=/empty; export PATH FPATH 2360 test "X`printf %s $ECHO`" = "X$ECHO" \ 2361 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2362 2363_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2364_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2365])# _LT_PROG_ECHO_BACKSLASH 2366 2367 2368# _LT_WITH_SYSROOT 2369# ---------------- 2370AC_DEFUN([_LT_WITH_SYSROOT], 2371[AC_MSG_CHECKING([for sysroot]) 2372AC_ARG_WITH([sysroot], 2373[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2374 (or the compiler's sysroot if not specified).], 2375[], [with_sysroot=no]) 2376 2377dnl lt_sysroot will always be passed unquoted. We quote it here 2378dnl in case the user passed a directory name. 2379lt_sysroot= 2380case ${with_sysroot} in #( 2381 yes) 2382 if test "$GCC" = yes; then 2383 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2384 fi 2385 ;; #( 2386 /*) 2387 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2388 ;; #( 2389 no|'') 2390 ;; #( 2391 *) 2392 AC_MSG_RESULT([${with_sysroot}]) 2393 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2394 ;; 2395esac 2396 2397 AC_MSG_RESULT([${lt_sysroot:-no}]) 2398_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2399[dependent libraries, and in which our libraries should be installed.])]) 2400 2401# _LT_ENABLE_LOCK 2402# --------------- 2403m4_defun([_LT_ENABLE_LOCK], 2404[AC_ARG_ENABLE([libtool-lock], 2405 [AS_HELP_STRING([--disable-libtool-lock], 2406 [avoid locking (might break parallel builds)])]) 2407test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2408 2409# Some flags need to be propagated to the compiler or linker for good 2410# libtool support. 2411case $host in 2412ia64-*-hpux*) 2413 # Find out which ABI we are using. 2414 echo 'int i;' > conftest.$ac_ext 2415 if AC_TRY_EVAL(ac_compile); then 2416 case `/usr/bin/file conftest.$ac_objext` in 2417 *ELF-32*) 2418 HPUX_IA64_MODE="32" 2419 ;; 2420 *ELF-64*) 2421 HPUX_IA64_MODE="64" 2422 ;; 2423 esac 2424 fi 2425 rm -rf conftest* 2426 ;; 2427*-*-irix6*) 2428 # Find out which ABI we are using. 2429 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2430 if AC_TRY_EVAL(ac_compile); then 2431 if test "$lt_cv_prog_gnu_ld" = yes; then 2432 case `/usr/bin/file conftest.$ac_objext` in 2433 *32-bit*) 2434 LD="${LD-ld} -melf32bsmip" 2435 ;; 2436 *N32*) 2437 LD="${LD-ld} -melf32bmipn32" 2438 ;; 2439 *64-bit*) 2440 LD="${LD-ld} -melf64bmip" 2441 ;; 2442 esac 2443 else 2444 case `/usr/bin/file conftest.$ac_objext` in 2445 *32-bit*) 2446 LD="${LD-ld} -32" 2447 ;; 2448 *N32*) 2449 LD="${LD-ld} -n32" 2450 ;; 2451 *64-bit*) 2452 LD="${LD-ld} -64" 2453 ;; 2454 esac 2455 fi 2456 fi 2457 rm -rf conftest* 2458 ;; 2459 2460x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2461s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2462 # Find out which ABI we are using. 2463 echo 'int i;' > conftest.$ac_ext 2464 if AC_TRY_EVAL(ac_compile); then 2465 case `/usr/bin/file conftest.o` in 2466 *32-bit*) 2467 case $host in 2468 x86_64-*kfreebsd*-gnu) 2469 LD="${LD-ld} -m elf_i386_fbsd" 2470 ;; 2471 x86_64-*linux*) 2472 LD="${LD-ld} -m elf_i386" 2473 ;; 2474 ppc64-*linux*|powerpc64-*linux*) 2475 LD="${LD-ld} -m elf32ppclinux" 2476 ;; 2477 s390x-*linux*) 2478 LD="${LD-ld} -m elf_s390" 2479 ;; 2480 sparc64-*linux*) 2481 LD="${LD-ld} -m elf32_sparc" 2482 ;; 2483 esac 2484 ;; 2485 *64-bit*) 2486 case $host in 2487 x86_64-*kfreebsd*-gnu) 2488 LD="${LD-ld} -m elf_x86_64_fbsd" 2489 ;; 2490 x86_64-*linux*) 2491 LD="${LD-ld} -m elf_x86_64" 2492 ;; 2493 ppc*-*linux*|powerpc*-*linux*) 2494 LD="${LD-ld} -m elf64ppc" 2495 ;; 2496 s390*-*linux*|s390*-*tpf*) 2497 LD="${LD-ld} -m elf64_s390" 2498 ;; 2499 sparc*-*linux*) 2500 LD="${LD-ld} -m elf64_sparc" 2501 ;; 2502 esac 2503 ;; 2504 esac 2505 fi 2506 rm -rf conftest* 2507 ;; 2508 2509*-*-sco3.2v5*) 2510 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2511 SAVE_CFLAGS="$CFLAGS" 2512 CFLAGS="$CFLAGS -belf" 2513 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2514 [AC_LANG_PUSH(C) 2515 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2516 AC_LANG_POP]) 2517 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2518 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2519 CFLAGS="$SAVE_CFLAGS" 2520 fi 2521 ;; 2522*-*solaris*) 2523 # Find out which ABI we are using. 2524 echo 'int i;' > conftest.$ac_ext 2525 if AC_TRY_EVAL(ac_compile); then 2526 case `/usr/bin/file conftest.o` in 2527 *64-bit*) 2528 case $lt_cv_prog_gnu_ld in 2529 yes*) 2530 case $host in 2531 i?86-*-solaris*) 2532 LD="${LD-ld} -m elf_x86_64" 2533 ;; 2534 sparc*-*-solaris*) 2535 LD="${LD-ld} -m elf64_sparc" 2536 ;; 2537 esac 2538 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2539 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2540 LD="${LD-ld}_sol2" 2541 fi 2542 ;; 2543 *) 2544 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2545 LD="${LD-ld} -64" 2546 fi 2547 ;; 2548 esac 2549 ;; 2550 esac 2551 fi 2552 rm -rf conftest* 2553 ;; 2554esac 2555 2556need_locks="$enable_libtool_lock" 2557])# _LT_ENABLE_LOCK 2558 2559 2560# _LT_PROG_AR 2561# ----------- 2562m4_defun([_LT_PROG_AR], 2563[AC_CHECK_TOOLS(AR, [ar], false) 2564: ${AR=ar} 2565: ${AR_FLAGS=cru} 2566_LT_DECL([], [AR], [1], [The archiver]) 2567_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2568 2569AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2570 [lt_cv_ar_at_file=no 2571 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2572 [echo conftest.$ac_objext > conftest.lst 2573 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2574 AC_TRY_EVAL([lt_ar_try]) 2575 if test "$ac_status" -eq 0; then 2576 # Ensure the archiver fails upon bogus file names. 2577 rm -f conftest.$ac_objext libconftest.a 2578 AC_TRY_EVAL([lt_ar_try]) 2579 if test "$ac_status" -ne 0; then 2580 lt_cv_ar_at_file=@ 2581 fi 2582 fi 2583 rm -f conftest.* libconftest.a 2584 ]) 2585 ]) 2586 2587if test "x$lt_cv_ar_at_file" = xno; then 2588 archiver_list_spec= 2589else 2590 archiver_list_spec=$lt_cv_ar_at_file 2591fi 2592_LT_DECL([], [archiver_list_spec], [1], 2593 [How to feed a file listing to the archiver]) 2594])# _LT_PROG_AR 2595 2596 2597# _LT_CMD_OLD_ARCHIVE 2598# ------------------- 2599m4_defun([_LT_CMD_OLD_ARCHIVE], 2600[_LT_PROG_AR 2601 2602AC_CHECK_TOOL(STRIP, strip, :) 2603test -z "$STRIP" && STRIP=: 2604_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2605 2606AC_CHECK_TOOL(RANLIB, ranlib, :) 2607test -z "$RANLIB" && RANLIB=: 2608_LT_DECL([], [RANLIB], [1], 2609 [Commands used to install an old-style archive]) 2610 2611# Determine commands to create old-style static archives. 2612old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2613old_postinstall_cmds='chmod 644 $oldlib' 2614old_postuninstall_cmds= 2615 2616if test -n "$RANLIB"; then 2617 case $host_os in 2618 openbsd*) 2619 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2620 ;; 2621 *) 2622 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2623 ;; 2624 esac 2625 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2626fi 2627 2628case $host_os in 2629 darwin*) 2630 lock_old_archive_extraction=yes ;; 2631 *) 2632 lock_old_archive_extraction=no ;; 2633esac 2634_LT_DECL([], [old_postinstall_cmds], [2]) 2635_LT_DECL([], [old_postuninstall_cmds], [2]) 2636_LT_TAGDECL([], [old_archive_cmds], [2], 2637 [Commands used to build an old-style archive]) 2638_LT_DECL([], [lock_old_archive_extraction], [0], 2639 [Whether to use a lock for old archive extraction]) 2640])# _LT_CMD_OLD_ARCHIVE 2641 2642 2643# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2644# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2645# ---------------------------------------------------------------- 2646# Check whether the given compiler option works 2647AC_DEFUN([_LT_COMPILER_OPTION], 2648[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2649m4_require([_LT_DECL_SED])dnl 2650AC_CACHE_CHECK([$1], [$2], 2651 [$2=no 2652 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2653 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2654 lt_compiler_flag="$3" 2655 # Insert the option either (1) after the last *FLAGS variable, or 2656 # (2) before a word containing "conftest.", or (3) at the end. 2657 # Note that $ac_compile itself does not contain backslashes and begins 2658 # with a dollar sign (not a hyphen), so the echo should work correctly. 2659 # The option is referenced via a variable to avoid confusing sed. 2660 lt_compile=`echo "$ac_compile" | $SED \ 2661 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2662 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2663 -e 's:$: $lt_compiler_flag:'` 2664 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2665 (eval "$lt_compile" 2>conftest.err) 2666 ac_status=$? 2667 cat conftest.err >&AS_MESSAGE_LOG_FD 2668 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2669 if (exit $ac_status) && test -s "$ac_outfile"; then 2670 # The compiler can only warn and ignore the option if not recognized 2671 # So say no if there are warnings other than the usual output. 2672 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2673 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2674 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2675 $2=yes 2676 fi 2677 fi 2678 $RM conftest* 2679]) 2680 2681if test x"[$]$2" = xyes; then 2682 m4_if([$5], , :, [$5]) 2683else 2684 m4_if([$6], , :, [$6]) 2685fi 2686])# _LT_COMPILER_OPTION 2687 2688# Old name: 2689AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2690dnl aclocal-1.4 backwards compatibility: 2691dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2692 2693 2694# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2695# [ACTION-SUCCESS], [ACTION-FAILURE]) 2696# ---------------------------------------------------- 2697# Check whether the given linker option works 2698AC_DEFUN([_LT_LINKER_OPTION], 2699[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2700m4_require([_LT_DECL_SED])dnl 2701AC_CACHE_CHECK([$1], [$2], 2702 [$2=no 2703 save_LDFLAGS="$LDFLAGS" 2704 LDFLAGS="$LDFLAGS $3" 2705 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2706 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2707 # The linker can only warn and ignore the option if not recognized 2708 # So say no if there are warnings 2709 if test -s conftest.err; then 2710 # Append any errors to the config.log. 2711 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2712 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2713 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2714 if diff conftest.exp conftest.er2 >/dev/null; then 2715 $2=yes 2716 fi 2717 else 2718 $2=yes 2719 fi 2720 fi 2721 $RM -r conftest* 2722 LDFLAGS="$save_LDFLAGS" 2723]) 2724 2725if test x"[$]$2" = xyes; then 2726 m4_if([$4], , :, [$4]) 2727else 2728 m4_if([$5], , :, [$5]) 2729fi 2730])# _LT_LINKER_OPTION 2731 2732# Old name: 2733AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2734dnl aclocal-1.4 backwards compatibility: 2735dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2736 2737 2738# LT_CMD_MAX_LEN 2739#--------------- 2740AC_DEFUN([LT_CMD_MAX_LEN], 2741[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2742# find the maximum length of command line arguments 2743AC_MSG_CHECKING([the maximum length of command line arguments]) 2744AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2745 i=0 2746 teststring="ABCD" 2747 2748 case $build_os in 2749 msdosdjgpp*) 2750 # On DJGPP, this test can blow up pretty badly due to problems in libc 2751 # (any single argument exceeding 2000 bytes causes a buffer overrun 2752 # during glob expansion). Even if it were fixed, the result of this 2753 # check would be larger than it should be. 2754 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2755 ;; 2756 2757 gnu*) 2758 # Under GNU Hurd, this test is not required because there is 2759 # no limit to the length of command line arguments. 2760 # Libtool will interpret -1 as no limit whatsoever 2761 lt_cv_sys_max_cmd_len=-1; 2762 ;; 2763 2764 cygwin* | mingw* | cegcc*) 2765 # On Win9x/ME, this test blows up -- it succeeds, but takes 2766 # about 5 minutes as the teststring grows exponentially. 2767 # Worse, since 9x/ME are not pre-emptively multitasking, 2768 # you end up with a "frozen" computer, even though with patience 2769 # the test eventually succeeds (with a max line length of 256k). 2770 # Instead, let's just punt: use the minimum linelength reported by 2771 # all of the supported platforms: 8192 (on NT/2K/XP). 2772 lt_cv_sys_max_cmd_len=8192; 2773 ;; 2774 2775 mint*) 2776 # On MiNT this can take a long time and run out of memory. 2777 lt_cv_sys_max_cmd_len=8192; 2778 ;; 2779 2780 amigaos*) 2781 # On AmigaOS with pdksh, this test takes hours, literally. 2782 # So we just punt and use a minimum line length of 8192. 2783 lt_cv_sys_max_cmd_len=8192; 2784 ;; 2785 2786 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2787 # This has been around since 386BSD, at least. Likely further. 2788 if test -x /sbin/sysctl; then 2789 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2790 elif test -x /usr/sbin/sysctl; then 2791 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2792 else 2793 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2794 fi 2795 # And add a safety zone 2796 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2797 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2798 ;; 2799 2800 interix*) 2801 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2802 lt_cv_sys_max_cmd_len=196608 2803 ;; 2804 2805 os2*) 2806 # The test takes a long time on OS/2. 2807 lt_cv_sys_max_cmd_len=8192 2808 ;; 2809 2810 osf*) 2811 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2812 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2813 # nice to cause kernel panics so lets avoid the loop below. 2814 # First set a reasonable default. 2815 lt_cv_sys_max_cmd_len=16384 2816 # 2817 if test -x /sbin/sysconfig; then 2818 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2819 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2820 esac 2821 fi 2822 ;; 2823 sco3.2v5*) 2824 lt_cv_sys_max_cmd_len=102400 2825 ;; 2826 sysv5* | sco5v6* | sysv4.2uw2*) 2827 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2828 if test -n "$kargmax"; then 2829 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2830 else 2831 lt_cv_sys_max_cmd_len=32768 2832 fi 2833 ;; 2834 *) 2835 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2836 if test -n "$lt_cv_sys_max_cmd_len"; then 2837 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2838 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2839 else 2840 # Make teststring a little bigger before we do anything with it. 2841 # a 1K string should be a reasonable start. 2842 for i in 1 2 3 4 5 6 7 8 ; do 2843 teststring=$teststring$teststring 2844 done 2845 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2846 # If test is not a shell built-in, we'll probably end up computing a 2847 # maximum length that is only half of the actual maximum length, but 2848 # we can't tell. 2849 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2850 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2851 test $i != 17 # 1/2 MB should be enough 2852 do 2853 i=`expr $i + 1` 2854 teststring=$teststring$teststring 2855 done 2856 # Only check the string length outside the loop. 2857 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2858 teststring= 2859 # Add a significant safety factor because C++ compilers can tack on 2860 # massive amounts of additional arguments before passing them to the 2861 # linker. It appears as though 1/2 is a usable value. 2862 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2863 fi 2864 ;; 2865 esac 2866]) 2867if test -n $lt_cv_sys_max_cmd_len ; then 2868 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2869else 2870 AC_MSG_RESULT(none) 2871fi 2872max_cmd_len=$lt_cv_sys_max_cmd_len 2873_LT_DECL([], [max_cmd_len], [0], 2874 [What is the maximum length of a command?]) 2875])# LT_CMD_MAX_LEN 2876 2877# Old name: 2878AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2879dnl aclocal-1.4 backwards compatibility: 2880dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2881 2882 2883# _LT_HEADER_DLFCN 2884# ---------------- 2885m4_defun([_LT_HEADER_DLFCN], 2886[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2887])# _LT_HEADER_DLFCN 2888 2889 2890# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2891# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2892# ---------------------------------------------------------------- 2893m4_defun([_LT_TRY_DLOPEN_SELF], 2894[m4_require([_LT_HEADER_DLFCN])dnl 2895if test "$cross_compiling" = yes; then : 2896 [$4] 2897else 2898 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2899 lt_status=$lt_dlunknown 2900 cat > conftest.$ac_ext <<_LT_EOF 2901[#line $LINENO "configure" 2902#include "confdefs.h" 2903 2904#if HAVE_DLFCN_H 2905#include <dlfcn.h> 2906#endif 2907 2908#include <stdio.h> 2909 2910#ifdef RTLD_GLOBAL 2911# define LT_DLGLOBAL RTLD_GLOBAL 2912#else 2913# ifdef DL_GLOBAL 2914# define LT_DLGLOBAL DL_GLOBAL 2915# else 2916# define LT_DLGLOBAL 0 2917# endif 2918#endif 2919 2920/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2921 find out it does not work in some platform. */ 2922#ifndef LT_DLLAZY_OR_NOW 2923# ifdef RTLD_LAZY 2924# define LT_DLLAZY_OR_NOW RTLD_LAZY 2925# else 2926# ifdef DL_LAZY 2927# define LT_DLLAZY_OR_NOW DL_LAZY 2928# else 2929# ifdef RTLD_NOW 2930# define LT_DLLAZY_OR_NOW RTLD_NOW 2931# else 2932# ifdef DL_NOW 2933# define LT_DLLAZY_OR_NOW DL_NOW 2934# else 2935# define LT_DLLAZY_OR_NOW 0 2936# endif 2937# endif 2938# endif 2939# endif 2940#endif 2941 2942/* When -fvisbility=hidden is used, assume the code has been annotated 2943 correspondingly for the symbols needed. */ 2944#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2945int fnord () __attribute__((visibility("default"))); 2946#endif 2947 2948int fnord () { return 42; } 2949int main () 2950{ 2951 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2952 int status = $lt_dlunknown; 2953 2954 if (self) 2955 { 2956 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2957 else 2958 { 2959 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2960 else puts (dlerror ()); 2961 } 2962 /* dlclose (self); */ 2963 } 2964 else 2965 puts (dlerror ()); 2966 2967 return status; 2968}] 2969_LT_EOF 2970 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2971 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2972 lt_status=$? 2973 case x$lt_status in 2974 x$lt_dlno_uscore) $1 ;; 2975 x$lt_dlneed_uscore) $2 ;; 2976 x$lt_dlunknown|x*) $3 ;; 2977 esac 2978 else : 2979 # compilation failed 2980 $3 2981 fi 2982fi 2983rm -fr conftest* 2984])# _LT_TRY_DLOPEN_SELF 2985 2986 2987# LT_SYS_DLOPEN_SELF 2988# ------------------ 2989AC_DEFUN([LT_SYS_DLOPEN_SELF], 2990[m4_require([_LT_HEADER_DLFCN])dnl 2991if test "x$enable_dlopen" != xyes; then 2992 enable_dlopen=unknown 2993 enable_dlopen_self=unknown 2994 enable_dlopen_self_static=unknown 2995else 2996 lt_cv_dlopen=no 2997 lt_cv_dlopen_libs= 2998 2999 case $host_os in 3000 beos*) 3001 lt_cv_dlopen="load_add_on" 3002 lt_cv_dlopen_libs= 3003 lt_cv_dlopen_self=yes 3004 ;; 3005 3006 mingw* | pw32* | cegcc*) 3007 lt_cv_dlopen="LoadLibrary" 3008 lt_cv_dlopen_libs= 3009 ;; 3010 3011 cygwin*) 3012 lt_cv_dlopen="dlopen" 3013 lt_cv_dlopen_libs= 3014 ;; 3015 3016 darwin*) 3017 # if libdl is installed we need to link against it 3018 AC_CHECK_LIB([dl], [dlopen], 3019 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3020 lt_cv_dlopen="dyld" 3021 lt_cv_dlopen_libs= 3022 lt_cv_dlopen_self=yes 3023 ]) 3024 ;; 3025 3026 *) 3027 AC_CHECK_FUNC([shl_load], 3028 [lt_cv_dlopen="shl_load"], 3029 [AC_CHECK_LIB([dld], [shl_load], 3030 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 3031 [AC_CHECK_FUNC([dlopen], 3032 [lt_cv_dlopen="dlopen"], 3033 [AC_CHECK_LIB([dl], [dlopen], 3034 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3035 [AC_CHECK_LIB([svld], [dlopen], 3036 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3037 [AC_CHECK_LIB([dld], [dld_link], 3038 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 3039 ]) 3040 ]) 3041 ]) 3042 ]) 3043 ]) 3044 ;; 3045 esac 3046 3047 if test "x$lt_cv_dlopen" != xno; then 3048 enable_dlopen=yes 3049 else 3050 enable_dlopen=no 3051 fi 3052 3053 case $lt_cv_dlopen in 3054 dlopen) 3055 save_CPPFLAGS="$CPPFLAGS" 3056 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3057 3058 save_LDFLAGS="$LDFLAGS" 3059 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3060 3061 save_LIBS="$LIBS" 3062 LIBS="$lt_cv_dlopen_libs $LIBS" 3063 3064 AC_CACHE_CHECK([whether a program can dlopen itself], 3065 lt_cv_dlopen_self, [dnl 3066 _LT_TRY_DLOPEN_SELF( 3067 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3068 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3069 ]) 3070 3071 if test "x$lt_cv_dlopen_self" = xyes; then 3072 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3073 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3074 lt_cv_dlopen_self_static, [dnl 3075 _LT_TRY_DLOPEN_SELF( 3076 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3077 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3078 ]) 3079 fi 3080 3081 CPPFLAGS="$save_CPPFLAGS" 3082 LDFLAGS="$save_LDFLAGS" 3083 LIBS="$save_LIBS" 3084 ;; 3085 esac 3086 3087 case $lt_cv_dlopen_self in 3088 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3089 *) enable_dlopen_self=unknown ;; 3090 esac 3091 3092 case $lt_cv_dlopen_self_static in 3093 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3094 *) enable_dlopen_self_static=unknown ;; 3095 esac 3096fi 3097_LT_DECL([dlopen_support], [enable_dlopen], [0], 3098 [Whether dlopen is supported]) 3099_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3100 [Whether dlopen of programs is supported]) 3101_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3102 [Whether dlopen of statically linked programs is supported]) 3103])# LT_SYS_DLOPEN_SELF 3104 3105# Old name: 3106AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3107dnl aclocal-1.4 backwards compatibility: 3108dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3109 3110 3111# _LT_COMPILER_C_O([TAGNAME]) 3112# --------------------------- 3113# Check to see if options -c and -o are simultaneously supported by compiler. 3114# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3115m4_defun([_LT_COMPILER_C_O], 3116[m4_require([_LT_DECL_SED])dnl 3117m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3118m4_require([_LT_TAG_COMPILER])dnl 3119AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3120 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3121 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3122 $RM -r conftest 2>/dev/null 3123 mkdir conftest 3124 cd conftest 3125 mkdir out 3126 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3127 3128 lt_compiler_flag="-o out/conftest2.$ac_objext" 3129 # Insert the option either (1) after the last *FLAGS variable, or 3130 # (2) before a word containing "conftest.", or (3) at the end. 3131 # Note that $ac_compile itself does not contain backslashes and begins 3132 # with a dollar sign (not a hyphen), so the echo should work correctly. 3133 lt_compile=`echo "$ac_compile" | $SED \ 3134 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3135 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3136 -e 's:$: $lt_compiler_flag:'` 3137 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3138 (eval "$lt_compile" 2>out/conftest.err) 3139 ac_status=$? 3140 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3141 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3142 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3143 then 3144 # The compiler can only warn and ignore the option if not recognized 3145 # So say no if there are warnings 3146 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3147 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3148 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3149 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3150 fi 3151 fi 3152 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3153 $RM conftest* 3154 # SGI C++ compiler will create directory out/ii_files/ for 3155 # template instantiation 3156 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3157 $RM out/* && rmdir out 3158 cd .. 3159 $RM -r conftest 3160 $RM conftest* 3161]) 3162_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3163 [Does compiler simultaneously support -c and -o options?]) 3164])# _LT_COMPILER_C_O 3165 3166 3167# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3168# ---------------------------------- 3169# Check to see if we can do hard links to lock some files if needed 3170m4_defun([_LT_COMPILER_FILE_LOCKS], 3171[m4_require([_LT_ENABLE_LOCK])dnl 3172m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3173_LT_COMPILER_C_O([$1]) 3174 3175hard_links="nottested" 3176if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3177 # do not overwrite the value of need_locks provided by the user 3178 AC_MSG_CHECKING([if we can lock with hard links]) 3179 hard_links=yes 3180 $RM conftest* 3181 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3182 touch conftest.a 3183 ln conftest.a conftest.b 2>&5 || hard_links=no 3184 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3185 AC_MSG_RESULT([$hard_links]) 3186 if test "$hard_links" = no; then 3187 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3188 need_locks=warn 3189 fi 3190else 3191 need_locks=no 3192fi 3193_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3194])# _LT_COMPILER_FILE_LOCKS 3195 3196 3197# _LT_CHECK_OBJDIR 3198# ---------------- 3199m4_defun([_LT_CHECK_OBJDIR], 3200[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3201[rm -f .libs 2>/dev/null 3202mkdir .libs 2>/dev/null 3203if test -d .libs; then 3204 lt_cv_objdir=.libs 3205else 3206 # MS-DOS does not allow filenames that begin with a dot. 3207 lt_cv_objdir=_libs 3208fi 3209rmdir .libs 2>/dev/null]) 3210objdir=$lt_cv_objdir 3211_LT_DECL([], [objdir], [0], 3212 [The name of the directory that contains temporary libtool files])dnl 3213m4_pattern_allow([LT_OBJDIR])dnl 3214AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3215 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3216])# _LT_CHECK_OBJDIR 3217 3218 3219# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3220# -------------------------------------- 3221# Check hardcoding attributes. 3222m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3223[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3224_LT_TAGVAR(hardcode_action, $1)= 3225if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3226 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3227 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3228 3229 # We can hardcode non-existent directories. 3230 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3231 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3232 # have to relink, otherwise we might link with an installed library 3233 # when we should be linking with a yet-to-be-installed one 3234 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3235 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3236 # Linking always hardcodes the temporary library directory. 3237 _LT_TAGVAR(hardcode_action, $1)=relink 3238 else 3239 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3240 _LT_TAGVAR(hardcode_action, $1)=immediate 3241 fi 3242else 3243 # We cannot hardcode anything, or else we can only hardcode existing 3244 # directories. 3245 _LT_TAGVAR(hardcode_action, $1)=unsupported 3246fi 3247AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3248 3249if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3250 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3251 # Fast installation is not supported 3252 enable_fast_install=no 3253elif test "$shlibpath_overrides_runpath" = yes || 3254 test "$enable_shared" = no; then 3255 # Fast installation is not necessary 3256 enable_fast_install=needless 3257fi 3258_LT_TAGDECL([], [hardcode_action], [0], 3259 [How to hardcode a shared library path into an executable]) 3260])# _LT_LINKER_HARDCODE_LIBPATH 3261 3262 3263# _LT_CMD_STRIPLIB 3264# ---------------- 3265m4_defun([_LT_CMD_STRIPLIB], 3266[m4_require([_LT_DECL_EGREP]) 3267striplib= 3268old_striplib= 3269AC_MSG_CHECKING([whether stripping libraries is possible]) 3270if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3271 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3272 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3273 AC_MSG_RESULT([yes]) 3274else 3275# FIXME - insert some real tests, host_os isn't really good enough 3276 case $host_os in 3277 darwin*) 3278 if test -n "$STRIP" ; then 3279 striplib="$STRIP -x" 3280 old_striplib="$STRIP -S" 3281 AC_MSG_RESULT([yes]) 3282 else 3283 AC_MSG_RESULT([no]) 3284 fi 3285 ;; 3286 *) 3287 AC_MSG_RESULT([no]) 3288 ;; 3289 esac 3290fi 3291_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3292_LT_DECL([], [striplib], [1]) 3293])# _LT_CMD_STRIPLIB 3294 3295 3296# _LT_SYS_DYNAMIC_LINKER([TAG]) 3297# ----------------------------- 3298# PORTME Fill in your ld.so characteristics 3299m4_defun([_LT_SYS_DYNAMIC_LINKER], 3300[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3301m4_require([_LT_DECL_EGREP])dnl 3302m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3303m4_require([_LT_DECL_OBJDUMP])dnl 3304m4_require([_LT_DECL_SED])dnl 3305m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3306AC_MSG_CHECKING([dynamic linker characteristics]) 3307m4_if([$1], 3308 [], [ 3309if test "$GCC" = yes; then 3310 case $host_os in 3311 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3312 *) lt_awk_arg="/^libraries:/" ;; 3313 esac 3314 case $host_os in 3315 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3316 *) lt_sed_strip_eq="s,=/,/,g" ;; 3317 esac 3318 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3319 case $lt_search_path_spec in 3320 *\;*) 3321 # if the path contains ";" then we assume it to be the separator 3322 # otherwise default to the standard path separator (i.e. ":") - it is 3323 # assumed that no part of a normal pathname contains ";" but that should 3324 # okay in the real world where ";" in dirpaths is itself problematic. 3325 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3326 ;; 3327 *) 3328 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3329 ;; 3330 esac 3331 # Ok, now we have the path, separated by spaces, we can step through it 3332 # and add multilib dir if necessary. 3333 lt_tmp_lt_search_path_spec= 3334 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3335 for lt_sys_path in $lt_search_path_spec; do 3336 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3337 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3338 else 3339 test -d "$lt_sys_path" && \ 3340 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3341 fi 3342 done 3343 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3344BEGIN {RS=" "; FS="/|\n";} { 3345 lt_foo=""; 3346 lt_count=0; 3347 for (lt_i = NF; lt_i > 0; lt_i--) { 3348 if ($lt_i != "" && $lt_i != ".") { 3349 if ($lt_i == "..") { 3350 lt_count++; 3351 } else { 3352 if (lt_count == 0) { 3353 lt_foo="/" $lt_i lt_foo; 3354 } else { 3355 lt_count--; 3356 } 3357 } 3358 } 3359 } 3360 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3361 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3362}'` 3363 # AWK program above erroneously prepends '/' to C:/dos/paths 3364 # for these hosts. 3365 case $host_os in 3366 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3367 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3368 esac 3369 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3370else 3371 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3372fi]) 3373library_names_spec= 3374libname_spec='lib$name' 3375soname_spec= 3376shrext_cmds=".so" 3377postinstall_cmds= 3378postuninstall_cmds= 3379finish_cmds= 3380finish_eval= 3381shlibpath_var= 3382shlibpath_overrides_runpath=unknown 3383version_type=none 3384dynamic_linker="$host_os ld.so" 3385sys_lib_dlsearch_path_spec="/lib /usr/lib" 3386need_lib_prefix=unknown 3387hardcode_into_libs=no 3388 3389# when you set need_version to no, make sure it does not cause -set_version 3390# flags to be left without arguments 3391need_version=unknown 3392 3393case $host_os in 3394aix3*) 3395 version_type=linux # correct to gnu/linux during the next big refactor 3396 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3397 shlibpath_var=LIBPATH 3398 3399 # AIX 3 has no versioning support, so we append a major version to the name. 3400 soname_spec='${libname}${release}${shared_ext}$major' 3401 ;; 3402 3403aix[[4-9]]*) 3404 version_type=linux # correct to gnu/linux during the next big refactor 3405 need_lib_prefix=no 3406 need_version=no 3407 hardcode_into_libs=yes 3408 if test "$host_cpu" = ia64; then 3409 # AIX 5 supports IA64 3410 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3411 shlibpath_var=LD_LIBRARY_PATH 3412 else 3413 # With GCC up to 2.95.x, collect2 would create an import file 3414 # for dependence libraries. The import file would start with 3415 # the line `#! .'. This would cause the generated library to 3416 # depend on `.', always an invalid library. This was fixed in 3417 # development snapshots of GCC prior to 3.0. 3418 case $host_os in 3419 aix4 | aix4.[[01]] | aix4.[[01]].*) 3420 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3421 echo ' yes ' 3422 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3423 : 3424 else 3425 can_build_shared=no 3426 fi 3427 ;; 3428 esac 3429 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3430 # soname into executable. Probably we can add versioning support to 3431 # collect2, so additional links can be useful in future. 3432 if test "$aix_use_runtimelinking" = yes; then 3433 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3434 # instead of lib<name>.a to let people know that these are not 3435 # typical AIX shared libraries. 3436 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3437 else 3438 # We preserve .a as extension for shared libraries through AIX4.2 3439 # and later when we are not doing run time linking. 3440 library_names_spec='${libname}${release}.a $libname.a' 3441 soname_spec='${libname}${release}${shared_ext}$major' 3442 fi 3443 shlibpath_var=LIBPATH 3444 fi 3445 ;; 3446 3447amigaos*) 3448 case $host_cpu in 3449 powerpc) 3450 # Since July 2007 AmigaOS4 officially supports .so libraries. 3451 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3452 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3453 ;; 3454 m68k) 3455 library_names_spec='$libname.ixlibrary $libname.a' 3456 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3457 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' 3458 ;; 3459 esac 3460 ;; 3461 3462beos*) 3463 library_names_spec='${libname}${shared_ext}' 3464 dynamic_linker="$host_os ld.so" 3465 shlibpath_var=LIBRARY_PATH 3466 ;; 3467 3468bsdi[[45]]*) 3469 version_type=linux # correct to gnu/linux during the next big refactor 3470 need_version=no 3471 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3472 soname_spec='${libname}${release}${shared_ext}$major' 3473 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3474 shlibpath_var=LD_LIBRARY_PATH 3475 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3476 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3477 # the default ld.so.conf also contains /usr/contrib/lib and 3478 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3479 # libtool to hard-code these into programs 3480 ;; 3481 3482cygwin* | mingw* | pw32* | cegcc*) 3483 version_type=windows 3484 shrext_cmds=".dll" 3485 need_version=no 3486 need_lib_prefix=no 3487 3488 case $GCC,$cc_basename in 3489 yes,*) 3490 # gcc 3491 library_names_spec='$libname.dll.a' 3492 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3493 postinstall_cmds='base_file=`basename \${file}`~ 3494 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3495 dldir=$destdir/`dirname \$dlpath`~ 3496 test -d \$dldir || mkdir -p \$dldir~ 3497 $install_prog $dir/$dlname \$dldir/$dlname~ 3498 chmod a+x \$dldir/$dlname~ 3499 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3500 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3501 fi' 3502 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3503 dlpath=$dir/\$dldll~ 3504 $RM \$dlpath' 3505 shlibpath_overrides_runpath=yes 3506 3507 case $host_os in 3508 cygwin*) 3509 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3510 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3511m4_if([$1], [],[ 3512 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3513 ;; 3514 mingw* | cegcc*) 3515 # MinGW DLLs use traditional 'lib' prefix 3516 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3517 ;; 3518 pw32*) 3519 # pw32 DLLs use 'pw' prefix rather than 'lib' 3520 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3521 ;; 3522 esac 3523 dynamic_linker='Win32 ld.exe' 3524 ;; 3525 3526 *,cl*) 3527 # Native MSVC 3528 libname_spec='$name' 3529 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3530 library_names_spec='${libname}.dll.lib' 3531 3532 case $build_os in 3533 mingw*) 3534 sys_lib_search_path_spec= 3535 lt_save_ifs=$IFS 3536 IFS=';' 3537 for lt_path in $LIB 3538 do 3539 IFS=$lt_save_ifs 3540 # Let DOS variable expansion print the short 8.3 style file name. 3541 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3542 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3543 done 3544 IFS=$lt_save_ifs 3545 # Convert to MSYS style. 3546 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3547 ;; 3548 cygwin*) 3549 # Convert to unix form, then to dos form, then back to unix form 3550 # but this time dos style (no spaces!) so that the unix form looks 3551 # like /cygdrive/c/PROGRA~1:/cygdr... 3552 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3553 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3554 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3555 ;; 3556 *) 3557 sys_lib_search_path_spec="$LIB" 3558 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3559 # It is most probably a Windows format PATH. 3560 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3561 else 3562 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3563 fi 3564 # FIXME: find the short name or the path components, as spaces are 3565 # common. (e.g. "Program Files" -> "PROGRA~1") 3566 ;; 3567 esac 3568 3569 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3570 postinstall_cmds='base_file=`basename \${file}`~ 3571 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3572 dldir=$destdir/`dirname \$dlpath`~ 3573 test -d \$dldir || mkdir -p \$dldir~ 3574 $install_prog $dir/$dlname \$dldir/$dlname' 3575 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3576 dlpath=$dir/\$dldll~ 3577 $RM \$dlpath' 3578 shlibpath_overrides_runpath=yes 3579 dynamic_linker='Win32 link.exe' 3580 ;; 3581 3582 *) 3583 # Assume MSVC wrapper 3584 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3585 dynamic_linker='Win32 ld.exe' 3586 ;; 3587 esac 3588 # FIXME: first we should search . and the directory the executable is in 3589 shlibpath_var=PATH 3590 ;; 3591 3592darwin* | rhapsody*) 3593 dynamic_linker="$host_os dyld" 3594 version_type=darwin 3595 need_lib_prefix=no 3596 need_version=no 3597 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3598 soname_spec='${libname}${release}${major}$shared_ext' 3599 shlibpath_overrides_runpath=yes 3600 shlibpath_var=DYLD_LIBRARY_PATH 3601 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3602m4_if([$1], [],[ 3603 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3604 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3605 ;; 3606 3607dgux*) 3608 version_type=linux # correct to gnu/linux during the next big refactor 3609 need_lib_prefix=no 3610 need_version=no 3611 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3612 soname_spec='${libname}${release}${shared_ext}$major' 3613 shlibpath_var=LD_LIBRARY_PATH 3614 ;; 3615 3616freebsd* | dragonfly*) 3617 # DragonFly does not have aout. When/if they implement a new 3618 # versioning mechanism, adjust this. 3619 if test -x /usr/bin/objformat; then 3620 objformat=`/usr/bin/objformat` 3621 else 3622 case $host_os in 3623 freebsd[[23]].*) objformat=aout ;; 3624 *) objformat=elf ;; 3625 esac 3626 fi 3627 version_type=freebsd-$objformat 3628 case $version_type in 3629 freebsd-elf*) 3630 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3631 need_version=no 3632 need_lib_prefix=no 3633 ;; 3634 freebsd-*) 3635 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3636 need_version=yes 3637 ;; 3638 esac 3639 shlibpath_var=LD_LIBRARY_PATH 3640 case $host_os in 3641 freebsd2.*) 3642 shlibpath_overrides_runpath=yes 3643 ;; 3644 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3645 shlibpath_overrides_runpath=yes 3646 hardcode_into_libs=yes 3647 ;; 3648 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3649 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3650 shlibpath_overrides_runpath=no 3651 hardcode_into_libs=yes 3652 ;; 3653 *) # from 4.6 on, and DragonFly 3654 shlibpath_overrides_runpath=yes 3655 hardcode_into_libs=yes 3656 ;; 3657 esac 3658 ;; 3659 3660gnu*) 3661 version_type=linux # correct to gnu/linux during the next big refactor 3662 need_lib_prefix=no 3663 need_version=no 3664 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3665 soname_spec='${libname}${release}${shared_ext}$major' 3666 shlibpath_var=LD_LIBRARY_PATH 3667 shlibpath_overrides_runpath=no 3668 hardcode_into_libs=yes 3669 ;; 3670 3671haiku*) 3672 version_type=linux # correct to gnu/linux during the next big refactor 3673 need_lib_prefix=no 3674 need_version=no 3675 dynamic_linker="$host_os runtime_loader" 3676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3677 soname_spec='${libname}${release}${shared_ext}$major' 3678 shlibpath_var=LIBRARY_PATH 3679 shlibpath_overrides_runpath=yes 3680 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3681 hardcode_into_libs=yes 3682 ;; 3683 3684hpux9* | hpux10* | hpux11*) 3685 # Give a soname corresponding to the major version so that dld.sl refuses to 3686 # link against other versions. 3687 version_type=sunos 3688 need_lib_prefix=no 3689 need_version=no 3690 case $host_cpu in 3691 ia64*) 3692 shrext_cmds='.so' 3693 hardcode_into_libs=yes 3694 dynamic_linker="$host_os dld.so" 3695 shlibpath_var=LD_LIBRARY_PATH 3696 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3697 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3698 soname_spec='${libname}${release}${shared_ext}$major' 3699 if test "X$HPUX_IA64_MODE" = X32; then 3700 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3701 else 3702 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3703 fi 3704 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3705 ;; 3706 hppa*64*) 3707 shrext_cmds='.sl' 3708 hardcode_into_libs=yes 3709 dynamic_linker="$host_os dld.sl" 3710 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3711 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3713 soname_spec='${libname}${release}${shared_ext}$major' 3714 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3715 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3716 ;; 3717 *) 3718 shrext_cmds='.sl' 3719 dynamic_linker="$host_os dld.sl" 3720 shlibpath_var=SHLIB_PATH 3721 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3723 soname_spec='${libname}${release}${shared_ext}$major' 3724 ;; 3725 esac 3726 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3727 postinstall_cmds='chmod 555 $lib' 3728 # or fails outright, so override atomically: 3729 install_override_mode=555 3730 ;; 3731 3732interix[[3-9]]*) 3733 version_type=linux # correct to gnu/linux during the next big refactor 3734 need_lib_prefix=no 3735 need_version=no 3736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3737 soname_spec='${libname}${release}${shared_ext}$major' 3738 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3739 shlibpath_var=LD_LIBRARY_PATH 3740 shlibpath_overrides_runpath=no 3741 hardcode_into_libs=yes 3742 ;; 3743 3744irix5* | irix6* | nonstopux*) 3745 case $host_os in 3746 nonstopux*) version_type=nonstopux ;; 3747 *) 3748 if test "$lt_cv_prog_gnu_ld" = yes; then 3749 version_type=linux # correct to gnu/linux during the next big refactor 3750 else 3751 version_type=irix 3752 fi ;; 3753 esac 3754 need_lib_prefix=no 3755 need_version=no 3756 soname_spec='${libname}${release}${shared_ext}$major' 3757 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3758 case $host_os in 3759 irix5* | nonstopux*) 3760 libsuff= shlibsuff= 3761 ;; 3762 *) 3763 case $LD in # libtool.m4 will add one of these switches to LD 3764 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3765 libsuff= shlibsuff= libmagic=32-bit;; 3766 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3767 libsuff=32 shlibsuff=N32 libmagic=N32;; 3768 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3769 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3770 *) libsuff= shlibsuff= libmagic=never-match;; 3771 esac 3772 ;; 3773 esac 3774 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3775 shlibpath_overrides_runpath=no 3776 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3777 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3778 hardcode_into_libs=yes 3779 ;; 3780 3781# No shared lib support for Linux oldld, aout, or coff. 3782linux*oldld* | linux*aout* | linux*coff*) 3783 dynamic_linker=no 3784 ;; 3785 3786# This must be glibc/ELF. 3787linux* | k*bsd*-gnu | kopensolaris*-gnu) 3788 version_type=linux # correct to gnu/linux during the next big refactor 3789 need_lib_prefix=no 3790 need_version=no 3791 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3792 soname_spec='${libname}${release}${shared_ext}$major' 3793 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3794 shlibpath_var=LD_LIBRARY_PATH 3795 shlibpath_overrides_runpath=no 3796 3797 # Some binutils ld are patched to set DT_RUNPATH 3798 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3799 [lt_cv_shlibpath_overrides_runpath=no 3800 save_LDFLAGS=$LDFLAGS 3801 save_libdir=$libdir 3802 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3803 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3804 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3805 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3806 [lt_cv_shlibpath_overrides_runpath=yes])]) 3807 LDFLAGS=$save_LDFLAGS 3808 libdir=$save_libdir 3809 ]) 3810 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3811 3812 # This implies no fast_install, which is unacceptable. 3813 # Some rework will be needed to allow for fast_install 3814 # before this can be enabled. 3815 hardcode_into_libs=yes 3816 3817 # Append ld.so.conf contents to the search path 3818 if test -f /etc/ld.so.conf; then 3819 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' ' '` 3820 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3821 fi 3822 3823 # We used to test for /lib/ld.so.1 and disable shared libraries on 3824 # powerpc, because MkLinux only supported shared libraries with the 3825 # GNU dynamic linker. Since this was broken with cross compilers, 3826 # most powerpc-linux boxes support dynamic linking these days and 3827 # people can always --disable-shared, the test was removed, and we 3828 # assume the GNU/Linux dynamic linker is in use. 3829 dynamic_linker='GNU/Linux ld.so' 3830 ;; 3831 3832netbsd*) 3833 version_type=sunos 3834 need_lib_prefix=no 3835 need_version=no 3836 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3838 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3839 dynamic_linker='NetBSD (a.out) ld.so' 3840 else 3841 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3842 soname_spec='${libname}${release}${shared_ext}$major' 3843 dynamic_linker='NetBSD ld.elf_so' 3844 fi 3845 shlibpath_var=LD_LIBRARY_PATH 3846 shlibpath_overrides_runpath=yes 3847 hardcode_into_libs=yes 3848 ;; 3849 3850newsos6) 3851 version_type=linux # correct to gnu/linux during the next big refactor 3852 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3853 shlibpath_var=LD_LIBRARY_PATH 3854 shlibpath_overrides_runpath=yes 3855 ;; 3856 3857*nto* | *qnx*) 3858 version_type=qnx 3859 need_lib_prefix=no 3860 need_version=no 3861 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3862 soname_spec='${libname}${release}${shared_ext}$major' 3863 shlibpath_var=LD_LIBRARY_PATH 3864 shlibpath_overrides_runpath=no 3865 hardcode_into_libs=yes 3866 dynamic_linker='ldqnx.so' 3867 ;; 3868 3869openbsd*) 3870 version_type=sunos 3871 sys_lib_dlsearch_path_spec="/usr/lib" 3872 need_lib_prefix=no 3873 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3874 case $host_os in 3875 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3876 *) need_version=no ;; 3877 esac 3878 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3879 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3880 shlibpath_var=LD_LIBRARY_PATH 3881 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3882 case $host_os in 3883 openbsd2.[[89]] | openbsd2.[[89]].*) 3884 shlibpath_overrides_runpath=no 3885 ;; 3886 *) 3887 shlibpath_overrides_runpath=yes 3888 ;; 3889 esac 3890 else 3891 shlibpath_overrides_runpath=yes 3892 fi 3893 ;; 3894 3895os2*) 3896 libname_spec='$name' 3897 shrext_cmds=".dll" 3898 need_lib_prefix=no 3899 library_names_spec='$libname${shared_ext} $libname.a' 3900 dynamic_linker='OS/2 ld.exe' 3901 shlibpath_var=LIBPATH 3902 ;; 3903 3904osf3* | osf4* | osf5*) 3905 version_type=osf 3906 need_lib_prefix=no 3907 need_version=no 3908 soname_spec='${libname}${release}${shared_ext}$major' 3909 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3910 shlibpath_var=LD_LIBRARY_PATH 3911 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3912 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3913 ;; 3914 3915rdos*) 3916 dynamic_linker=no 3917 ;; 3918 3919solaris*) 3920 version_type=linux # correct to gnu/linux during the next big refactor 3921 need_lib_prefix=no 3922 need_version=no 3923 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3924 soname_spec='${libname}${release}${shared_ext}$major' 3925 shlibpath_var=LD_LIBRARY_PATH 3926 shlibpath_overrides_runpath=yes 3927 hardcode_into_libs=yes 3928 # ldd complains unless libraries are executable 3929 postinstall_cmds='chmod +x $lib' 3930 ;; 3931 3932sunos4*) 3933 version_type=sunos 3934 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3935 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3936 shlibpath_var=LD_LIBRARY_PATH 3937 shlibpath_overrides_runpath=yes 3938 if test "$with_gnu_ld" = yes; then 3939 need_lib_prefix=no 3940 fi 3941 need_version=yes 3942 ;; 3943 3944sysv4 | sysv4.3*) 3945 version_type=linux # correct to gnu/linux during the next big refactor 3946 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3947 soname_spec='${libname}${release}${shared_ext}$major' 3948 shlibpath_var=LD_LIBRARY_PATH 3949 case $host_vendor in 3950 sni) 3951 shlibpath_overrides_runpath=no 3952 need_lib_prefix=no 3953 runpath_var=LD_RUN_PATH 3954 ;; 3955 siemens) 3956 need_lib_prefix=no 3957 ;; 3958 motorola) 3959 need_lib_prefix=no 3960 need_version=no 3961 shlibpath_overrides_runpath=no 3962 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3963 ;; 3964 esac 3965 ;; 3966 3967sysv4*MP*) 3968 if test -d /usr/nec ;then 3969 version_type=linux # correct to gnu/linux during the next big refactor 3970 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3971 soname_spec='$libname${shared_ext}.$major' 3972 shlibpath_var=LD_LIBRARY_PATH 3973 fi 3974 ;; 3975 3976sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3977 version_type=freebsd-elf 3978 need_lib_prefix=no 3979 need_version=no 3980 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3981 soname_spec='${libname}${release}${shared_ext}$major' 3982 shlibpath_var=LD_LIBRARY_PATH 3983 shlibpath_overrides_runpath=yes 3984 hardcode_into_libs=yes 3985 if test "$with_gnu_ld" = yes; then 3986 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3987 else 3988 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3989 case $host_os in 3990 sco3.2v5*) 3991 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3992 ;; 3993 esac 3994 fi 3995 sys_lib_dlsearch_path_spec='/usr/lib' 3996 ;; 3997 3998tpf*) 3999 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 4000 version_type=linux # correct to gnu/linux during the next big refactor 4001 need_lib_prefix=no 4002 need_version=no 4003 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4004 shlibpath_var=LD_LIBRARY_PATH 4005 shlibpath_overrides_runpath=no 4006 hardcode_into_libs=yes 4007 ;; 4008 4009uts4*) 4010 version_type=linux # correct to gnu/linux during the next big refactor 4011 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4012 soname_spec='${libname}${release}${shared_ext}$major' 4013 shlibpath_var=LD_LIBRARY_PATH 4014 ;; 4015 4016*) 4017 dynamic_linker=no 4018 ;; 4019esac 4020AC_MSG_RESULT([$dynamic_linker]) 4021test "$dynamic_linker" = no && can_build_shared=no 4022 4023variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4024if test "$GCC" = yes; then 4025 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4026fi 4027 4028if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4029 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4030fi 4031if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4032 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4033fi 4034 4035_LT_DECL([], [variables_saved_for_relink], [1], 4036 [Variables whose values should be saved in libtool wrapper scripts and 4037 restored at link time]) 4038_LT_DECL([], [need_lib_prefix], [0], 4039 [Do we need the "lib" prefix for modules?]) 4040_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4041_LT_DECL([], [version_type], [0], [Library versioning type]) 4042_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4043_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4044_LT_DECL([], [shlibpath_overrides_runpath], [0], 4045 [Is shlibpath searched before the hard-coded library search path?]) 4046_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4047_LT_DECL([], [library_names_spec], [1], 4048 [[List of archive names. First name is the real one, the rest are links. 4049 The last name is the one that the linker finds with -lNAME]]) 4050_LT_DECL([], [soname_spec], [1], 4051 [[The coded name of the library, if different from the real name]]) 4052_LT_DECL([], [install_override_mode], [1], 4053 [Permission mode override for installation of shared libraries]) 4054_LT_DECL([], [postinstall_cmds], [2], 4055 [Command to use after installation of a shared archive]) 4056_LT_DECL([], [postuninstall_cmds], [2], 4057 [Command to use after uninstallation of a shared archive]) 4058_LT_DECL([], [finish_cmds], [2], 4059 [Commands used to finish a libtool library installation in a directory]) 4060_LT_DECL([], [finish_eval], [1], 4061 [[As "finish_cmds", except a single script fragment to be evaled but 4062 not shown]]) 4063_LT_DECL([], [hardcode_into_libs], [0], 4064 [Whether we should hardcode library paths into libraries]) 4065_LT_DECL([], [sys_lib_search_path_spec], [2], 4066 [Compile-time system search path for libraries]) 4067_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4068 [Run-time system search path for libraries]) 4069])# _LT_SYS_DYNAMIC_LINKER 4070 4071 4072# _LT_PATH_TOOL_PREFIX(TOOL) 4073# -------------------------- 4074# find a file program which can recognize shared library 4075AC_DEFUN([_LT_PATH_TOOL_PREFIX], 4076[m4_require([_LT_DECL_EGREP])dnl 4077AC_MSG_CHECKING([for $1]) 4078AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4079[case $MAGIC_CMD in 4080[[\\/*] | ?:[\\/]*]) 4081 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4082 ;; 4083*) 4084 lt_save_MAGIC_CMD="$MAGIC_CMD" 4085 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4086dnl $ac_dummy forces splitting on constant user-supplied paths. 4087dnl POSIX.2 word splitting is done only on the output of word expansions, 4088dnl not every word. This closes a longstanding sh security hole. 4089 ac_dummy="m4_if([$2], , $PATH, [$2])" 4090 for ac_dir in $ac_dummy; do 4091 IFS="$lt_save_ifs" 4092 test -z "$ac_dir" && ac_dir=. 4093 if test -f $ac_dir/$1; then 4094 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4095 if test -n "$file_magic_test_file"; then 4096 case $deplibs_check_method in 4097 "file_magic "*) 4098 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4099 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4100 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4101 $EGREP "$file_magic_regex" > /dev/null; then 4102 : 4103 else 4104 cat <<_LT_EOF 1>&2 4105 4106*** Warning: the command libtool uses to detect shared libraries, 4107*** $file_magic_cmd, produces output that libtool cannot recognize. 4108*** The result is that libtool may fail to recognize shared libraries 4109*** as such. This will affect the creation of libtool libraries that 4110*** depend on shared libraries, but programs linked with such libtool 4111*** libraries will work regardless of this problem. Nevertheless, you 4112*** may want to report the problem to your system manager and/or to 4113*** bug-libtool@gnu.org 4114 4115_LT_EOF 4116 fi ;; 4117 esac 4118 fi 4119 break 4120 fi 4121 done 4122 IFS="$lt_save_ifs" 4123 MAGIC_CMD="$lt_save_MAGIC_CMD" 4124 ;; 4125esac]) 4126MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4127if test -n "$MAGIC_CMD"; then 4128 AC_MSG_RESULT($MAGIC_CMD) 4129else 4130 AC_MSG_RESULT(no) 4131fi 4132_LT_DECL([], [MAGIC_CMD], [0], 4133 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4134])# _LT_PATH_TOOL_PREFIX 4135 4136# Old name: 4137AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4138dnl aclocal-1.4 backwards compatibility: 4139dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4140 4141 4142# _LT_PATH_MAGIC 4143# -------------- 4144# find a file program which can recognize a shared library 4145m4_defun([_LT_PATH_MAGIC], 4146[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4147if test -z "$lt_cv_path_MAGIC_CMD"; then 4148 if test -n "$ac_tool_prefix"; then 4149 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4150 else 4151 MAGIC_CMD=: 4152 fi 4153fi 4154])# _LT_PATH_MAGIC 4155 4156 4157# LT_PATH_LD 4158# ---------- 4159# find the pathname to the GNU or non-GNU linker 4160AC_DEFUN([LT_PATH_LD], 4161[AC_REQUIRE([AC_PROG_CC])dnl 4162AC_REQUIRE([AC_CANONICAL_HOST])dnl 4163AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4164m4_require([_LT_DECL_SED])dnl 4165m4_require([_LT_DECL_EGREP])dnl 4166m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4167 4168AC_ARG_WITH([gnu-ld], 4169 [AS_HELP_STRING([--with-gnu-ld], 4170 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4171 [test "$withval" = no || with_gnu_ld=yes], 4172 [with_gnu_ld=no])dnl 4173 4174ac_prog=ld 4175if test "$GCC" = yes; then 4176 # Check if gcc -print-prog-name=ld gives a path. 4177 AC_MSG_CHECKING([for ld used by $CC]) 4178 case $host in 4179 *-*-mingw*) 4180 # gcc leaves a trailing carriage return which upsets mingw 4181 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4182 *) 4183 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4184 esac 4185 case $ac_prog in 4186 # Accept absolute paths. 4187 [[\\/]]* | ?:[[\\/]]*) 4188 re_direlt='/[[^/]][[^/]]*/\.\./' 4189 # Canonicalize the pathname of ld 4190 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4191 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4192 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4193 done 4194 test -z "$LD" && LD="$ac_prog" 4195 ;; 4196 "") 4197 # If it fails, then pretend we aren't using GCC. 4198 ac_prog=ld 4199 ;; 4200 *) 4201 # If it is relative, then search for the first ld in PATH. 4202 with_gnu_ld=unknown 4203 ;; 4204 esac 4205elif test "$with_gnu_ld" = yes; then 4206 AC_MSG_CHECKING([for GNU ld]) 4207else 4208 AC_MSG_CHECKING([for non-GNU ld]) 4209fi 4210AC_CACHE_VAL(lt_cv_path_LD, 4211[if test -z "$LD"; then 4212 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4213 for ac_dir in $PATH; do 4214 IFS="$lt_save_ifs" 4215 test -z "$ac_dir" && ac_dir=. 4216 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4217 lt_cv_path_LD="$ac_dir/$ac_prog" 4218 # Check to see if the program is GNU ld. I'd rather use --version, 4219 # but apparently some variants of GNU ld only accept -v. 4220 # Break only if it was the GNU/non-GNU ld that we prefer. 4221 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4222 *GNU* | *'with BFD'*) 4223 test "$with_gnu_ld" != no && break 4224 ;; 4225 *) 4226 test "$with_gnu_ld" != yes && break 4227 ;; 4228 esac 4229 fi 4230 done 4231 IFS="$lt_save_ifs" 4232else 4233 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4234fi]) 4235LD="$lt_cv_path_LD" 4236if test -n "$LD"; then 4237 AC_MSG_RESULT($LD) 4238else 4239 AC_MSG_RESULT(no) 4240fi 4241test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4242_LT_PATH_LD_GNU 4243AC_SUBST([LD]) 4244 4245_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4246])# LT_PATH_LD 4247 4248# Old names: 4249AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4250AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4251dnl aclocal-1.4 backwards compatibility: 4252dnl AC_DEFUN([AM_PROG_LD], []) 4253dnl AC_DEFUN([AC_PROG_LD], []) 4254 4255 4256# _LT_PATH_LD_GNU 4257#- -------------- 4258m4_defun([_LT_PATH_LD_GNU], 4259[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4260[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4261case `$LD -v 2>&1 </dev/null` in 4262*GNU* | *'with BFD'*) 4263 lt_cv_prog_gnu_ld=yes 4264 ;; 4265*) 4266 lt_cv_prog_gnu_ld=no 4267 ;; 4268esac]) 4269with_gnu_ld=$lt_cv_prog_gnu_ld 4270])# _LT_PATH_LD_GNU 4271 4272 4273# _LT_CMD_RELOAD 4274# -------------- 4275# find reload flag for linker 4276# -- PORTME Some linkers may need a different reload flag. 4277m4_defun([_LT_CMD_RELOAD], 4278[AC_CACHE_CHECK([for $LD option to reload object files], 4279 lt_cv_ld_reload_flag, 4280 [lt_cv_ld_reload_flag='-r']) 4281reload_flag=$lt_cv_ld_reload_flag 4282case $reload_flag in 4283"" | " "*) ;; 4284*) reload_flag=" $reload_flag" ;; 4285esac 4286reload_cmds='$LD$reload_flag -o $output$reload_objs' 4287case $host_os in 4288 cygwin* | mingw* | pw32* | cegcc*) 4289 if test "$GCC" != yes; then 4290 reload_cmds=false 4291 fi 4292 ;; 4293 darwin*) 4294 if test "$GCC" = yes; then 4295 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4296 else 4297 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4298 fi 4299 ;; 4300esac 4301_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4302_LT_TAGDECL([], [reload_cmds], [2])dnl 4303])# _LT_CMD_RELOAD 4304 4305 4306# _LT_CHECK_MAGIC_METHOD 4307# ---------------------- 4308# how to check for library dependencies 4309# -- PORTME fill in with the dynamic library characteristics 4310m4_defun([_LT_CHECK_MAGIC_METHOD], 4311[m4_require([_LT_DECL_EGREP]) 4312m4_require([_LT_DECL_OBJDUMP]) 4313AC_CACHE_CHECK([how to recognize dependent libraries], 4314lt_cv_deplibs_check_method, 4315[lt_cv_file_magic_cmd='$MAGIC_CMD' 4316lt_cv_file_magic_test_file= 4317lt_cv_deplibs_check_method='unknown' 4318# Need to set the preceding variable on all platforms that support 4319# interlibrary dependencies. 4320# 'none' -- dependencies not supported. 4321# `unknown' -- same as none, but documents that we really don't know. 4322# 'pass_all' -- all dependencies passed with no checks. 4323# 'test_compile' -- check by making test program. 4324# 'file_magic [[regex]]' -- check by looking for files in library path 4325# which responds to the $file_magic_cmd with a given extended regex. 4326# If you have `file' or equivalent on your system and you're not sure 4327# whether `pass_all' will *always* work, you probably want this one. 4328 4329case $host_os in 4330aix[[4-9]]*) 4331 lt_cv_deplibs_check_method=pass_all 4332 ;; 4333 4334beos*) 4335 lt_cv_deplibs_check_method=pass_all 4336 ;; 4337 4338bsdi[[45]]*) 4339 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4340 lt_cv_file_magic_cmd='/usr/bin/file -L' 4341 lt_cv_file_magic_test_file=/shlib/libc.so 4342 ;; 4343 4344cygwin*) 4345 # func_win32_libid is a shell function defined in ltmain.sh 4346 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4347 lt_cv_file_magic_cmd='func_win32_libid' 4348 ;; 4349 4350mingw* | pw32*) 4351 # Base MSYS/MinGW do not provide the 'file' command needed by 4352 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4353 # unless we find 'file', for example because we are cross-compiling. 4354 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4355 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4356 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4357 lt_cv_file_magic_cmd='func_win32_libid' 4358 else 4359 # Keep this pattern in sync with the one in func_win32_libid. 4360 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4361 lt_cv_file_magic_cmd='$OBJDUMP -f' 4362 fi 4363 ;; 4364 4365cegcc*) 4366 # use the weaker test based on 'objdump'. See mingw*. 4367 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4368 lt_cv_file_magic_cmd='$OBJDUMP -f' 4369 ;; 4370 4371darwin* | rhapsody*) 4372 lt_cv_deplibs_check_method=pass_all 4373 ;; 4374 4375freebsd* | dragonfly*) 4376 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4377 case $host_cpu in 4378 i*86 ) 4379 # Not sure whether the presence of OpenBSD here was a mistake. 4380 # Let's accept both of them until this is cleared up. 4381 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4382 lt_cv_file_magic_cmd=/usr/bin/file 4383 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4384 ;; 4385 esac 4386 else 4387 lt_cv_deplibs_check_method=pass_all 4388 fi 4389 ;; 4390 4391gnu*) 4392 lt_cv_deplibs_check_method=pass_all 4393 ;; 4394 4395haiku*) 4396 lt_cv_deplibs_check_method=pass_all 4397 ;; 4398 4399hpux10.20* | hpux11*) 4400 lt_cv_file_magic_cmd=/usr/bin/file 4401 case $host_cpu in 4402 ia64*) 4403 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4404 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4405 ;; 4406 hppa*64*) 4407 [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]'] 4408 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4409 ;; 4410 *) 4411 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4412 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4413 ;; 4414 esac 4415 ;; 4416 4417interix[[3-9]]*) 4418 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4419 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4420 ;; 4421 4422irix5* | irix6* | nonstopux*) 4423 case $LD in 4424 *-32|*"-32 ") libmagic=32-bit;; 4425 *-n32|*"-n32 ") libmagic=N32;; 4426 *-64|*"-64 ") libmagic=64-bit;; 4427 *) libmagic=never-match;; 4428 esac 4429 lt_cv_deplibs_check_method=pass_all 4430 ;; 4431 4432# This must be glibc/ELF. 4433linux* | k*bsd*-gnu | kopensolaris*-gnu) 4434 lt_cv_deplibs_check_method=pass_all 4435 ;; 4436 4437netbsd*) 4438 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4439 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4440 else 4441 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4442 fi 4443 ;; 4444 4445newos6*) 4446 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4447 lt_cv_file_magic_cmd=/usr/bin/file 4448 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4449 ;; 4450 4451*nto* | *qnx*) 4452 lt_cv_deplibs_check_method=pass_all 4453 ;; 4454 4455openbsd*) 4456 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4457 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4458 else 4459 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4460 fi 4461 ;; 4462 4463osf3* | osf4* | osf5*) 4464 lt_cv_deplibs_check_method=pass_all 4465 ;; 4466 4467rdos*) 4468 lt_cv_deplibs_check_method=pass_all 4469 ;; 4470 4471solaris*) 4472 lt_cv_deplibs_check_method=pass_all 4473 ;; 4474 4475sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4476 lt_cv_deplibs_check_method=pass_all 4477 ;; 4478 4479sysv4 | sysv4.3*) 4480 case $host_vendor in 4481 motorola) 4482 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]]' 4483 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4484 ;; 4485 ncr) 4486 lt_cv_deplibs_check_method=pass_all 4487 ;; 4488 sequent) 4489 lt_cv_file_magic_cmd='/bin/file' 4490 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4491 ;; 4492 sni) 4493 lt_cv_file_magic_cmd='/bin/file' 4494 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4495 lt_cv_file_magic_test_file=/lib/libc.so 4496 ;; 4497 siemens) 4498 lt_cv_deplibs_check_method=pass_all 4499 ;; 4500 pc) 4501 lt_cv_deplibs_check_method=pass_all 4502 ;; 4503 esac 4504 ;; 4505 4506tpf*) 4507 lt_cv_deplibs_check_method=pass_all 4508 ;; 4509esac 4510]) 4511 4512file_magic_glob= 4513want_nocaseglob=no 4514if test "$build" = "$host"; then 4515 case $host_os in 4516 mingw* | pw32*) 4517 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4518 want_nocaseglob=yes 4519 else 4520 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4521 fi 4522 ;; 4523 esac 4524fi 4525 4526file_magic_cmd=$lt_cv_file_magic_cmd 4527deplibs_check_method=$lt_cv_deplibs_check_method 4528test -z "$deplibs_check_method" && deplibs_check_method=unknown 4529 4530_LT_DECL([], [deplibs_check_method], [1], 4531 [Method to check whether dependent libraries are shared objects]) 4532_LT_DECL([], [file_magic_cmd], [1], 4533 [Command to use when deplibs_check_method = "file_magic"]) 4534_LT_DECL([], [file_magic_glob], [1], 4535 [How to find potential files when deplibs_check_method = "file_magic"]) 4536_LT_DECL([], [want_nocaseglob], [1], 4537 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4538])# _LT_CHECK_MAGIC_METHOD 4539 4540 4541# LT_PATH_NM 4542# ---------- 4543# find the pathname to a BSD- or MS-compatible name lister 4544AC_DEFUN([LT_PATH_NM], 4545[AC_REQUIRE([AC_PROG_CC])dnl 4546AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4547[if test -n "$NM"; then 4548 # Let the user override the test. 4549 lt_cv_path_NM="$NM" 4550else 4551 lt_nm_to_check="${ac_tool_prefix}nm" 4552 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4553 lt_nm_to_check="$lt_nm_to_check nm" 4554 fi 4555 for lt_tmp_nm in $lt_nm_to_check; do 4556 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4557 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4558 IFS="$lt_save_ifs" 4559 test -z "$ac_dir" && ac_dir=. 4560 tmp_nm="$ac_dir/$lt_tmp_nm" 4561 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4562 # Check to see if the nm accepts a BSD-compat flag. 4563 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4564 # nm: unknown option "B" ignored 4565 # Tru64's nm complains that /dev/null is an invalid object file 4566 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4567 */dev/null* | *'Invalid file or object type'*) 4568 lt_cv_path_NM="$tmp_nm -B" 4569 break 4570 ;; 4571 *) 4572 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4573 */dev/null*) 4574 lt_cv_path_NM="$tmp_nm -p" 4575 break 4576 ;; 4577 *) 4578 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4579 continue # so that we can try to find one that supports BSD flags 4580 ;; 4581 esac 4582 ;; 4583 esac 4584 fi 4585 done 4586 IFS="$lt_save_ifs" 4587 done 4588 : ${lt_cv_path_NM=no} 4589fi]) 4590if test "$lt_cv_path_NM" != "no"; then 4591 NM="$lt_cv_path_NM" 4592else 4593 # Didn't find any BSD compatible name lister, look for dumpbin. 4594 if test -n "$DUMPBIN"; then : 4595 # Let the user override the test. 4596 else 4597 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4598 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4599 *COFF*) 4600 DUMPBIN="$DUMPBIN -symbols" 4601 ;; 4602 *) 4603 DUMPBIN=: 4604 ;; 4605 esac 4606 fi 4607 AC_SUBST([DUMPBIN]) 4608 if test "$DUMPBIN" != ":"; then 4609 NM="$DUMPBIN" 4610 fi 4611fi 4612test -z "$NM" && NM=nm 4613AC_SUBST([NM]) 4614_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4615 4616AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4617 [lt_cv_nm_interface="BSD nm" 4618 echo "int some_variable = 0;" > conftest.$ac_ext 4619 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4620 (eval "$ac_compile" 2>conftest.err) 4621 cat conftest.err >&AS_MESSAGE_LOG_FD 4622 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4623 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4624 cat conftest.err >&AS_MESSAGE_LOG_FD 4625 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4626 cat conftest.out >&AS_MESSAGE_LOG_FD 4627 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4628 lt_cv_nm_interface="MS dumpbin" 4629 fi 4630 rm -f conftest*]) 4631])# LT_PATH_NM 4632 4633# Old names: 4634AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4635AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4636dnl aclocal-1.4 backwards compatibility: 4637dnl AC_DEFUN([AM_PROG_NM], []) 4638dnl AC_DEFUN([AC_PROG_NM], []) 4639 4640# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4641# -------------------------------- 4642# how to determine the name of the shared library 4643# associated with a specific link library. 4644# -- PORTME fill in with the dynamic library characteristics 4645m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4646[m4_require([_LT_DECL_EGREP]) 4647m4_require([_LT_DECL_OBJDUMP]) 4648m4_require([_LT_DECL_DLLTOOL]) 4649AC_CACHE_CHECK([how to associate runtime and link libraries], 4650lt_cv_sharedlib_from_linklib_cmd, 4651[lt_cv_sharedlib_from_linklib_cmd='unknown' 4652 4653case $host_os in 4654cygwin* | mingw* | pw32* | cegcc*) 4655 # two different shell functions defined in ltmain.sh 4656 # decide which to use based on capabilities of $DLLTOOL 4657 case `$DLLTOOL --help 2>&1` in 4658 *--identify-strict*) 4659 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4660 ;; 4661 *) 4662 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4663 ;; 4664 esac 4665 ;; 4666*) 4667 # fallback: assume linklib IS sharedlib 4668 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4669 ;; 4670esac 4671]) 4672sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4673test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4674 4675_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4676 [Command to associate shared and link libraries]) 4677])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4678 4679 4680# _LT_PATH_MANIFEST_TOOL 4681# ---------------------- 4682# locate the manifest tool 4683m4_defun([_LT_PATH_MANIFEST_TOOL], 4684[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4685test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4686AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4687 [lt_cv_path_mainfest_tool=no 4688 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4689 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4690 cat conftest.err >&AS_MESSAGE_LOG_FD 4691 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4692 lt_cv_path_mainfest_tool=yes 4693 fi 4694 rm -f conftest*]) 4695if test "x$lt_cv_path_mainfest_tool" != xyes; then 4696 MANIFEST_TOOL=: 4697fi 4698_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4699])# _LT_PATH_MANIFEST_TOOL 4700 4701 4702# LT_LIB_M 4703# -------- 4704# check for math library 4705AC_DEFUN([LT_LIB_M], 4706[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4707LIBM= 4708case $host in 4709*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4710 # These system don't have libm, or don't need it 4711 ;; 4712*-ncr-sysv4.3*) 4713 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4714 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4715 ;; 4716*) 4717 AC_CHECK_LIB(m, cos, LIBM="-lm") 4718 ;; 4719esac 4720AC_SUBST([LIBM]) 4721])# LT_LIB_M 4722 4723# Old name: 4724AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4725dnl aclocal-1.4 backwards compatibility: 4726dnl AC_DEFUN([AC_CHECK_LIBM], []) 4727 4728 4729# _LT_COMPILER_NO_RTTI([TAGNAME]) 4730# ------------------------------- 4731m4_defun([_LT_COMPILER_NO_RTTI], 4732[m4_require([_LT_TAG_COMPILER])dnl 4733 4734_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4735 4736if test "$GCC" = yes; then 4737 case $cc_basename in 4738 nvcc*) 4739 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4740 *) 4741 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4742 esac 4743 4744 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4745 lt_cv_prog_compiler_rtti_exceptions, 4746 [-fno-rtti -fno-exceptions], [], 4747 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4748fi 4749_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4750 [Compiler flag to turn off builtin functions]) 4751])# _LT_COMPILER_NO_RTTI 4752 4753 4754# _LT_CMD_GLOBAL_SYMBOLS 4755# ---------------------- 4756m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4757[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4758AC_REQUIRE([AC_PROG_CC])dnl 4759AC_REQUIRE([AC_PROG_AWK])dnl 4760AC_REQUIRE([LT_PATH_NM])dnl 4761AC_REQUIRE([LT_PATH_LD])dnl 4762m4_require([_LT_DECL_SED])dnl 4763m4_require([_LT_DECL_EGREP])dnl 4764m4_require([_LT_TAG_COMPILER])dnl 4765 4766# Check for command to grab the raw symbol name followed by C symbol from nm. 4767AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4768AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4769[ 4770# These are sane defaults that work on at least a few old systems. 4771# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4772 4773# Character class describing NM global symbol codes. 4774symcode='[[BCDEGRST]]' 4775 4776# Regexp to match symbols that can be accessed directly from C. 4777sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4778 4779# Define system-specific variables. 4780case $host_os in 4781aix*) 4782 symcode='[[BCDT]]' 4783 ;; 4784cygwin* | mingw* | pw32* | cegcc*) 4785 symcode='[[ABCDGISTW]]' 4786 ;; 4787hpux*) 4788 if test "$host_cpu" = ia64; then 4789 symcode='[[ABCDEGRST]]' 4790 fi 4791 ;; 4792irix* | nonstopux*) 4793 symcode='[[BCDEGRST]]' 4794 ;; 4795osf*) 4796 symcode='[[BCDEGQRST]]' 4797 ;; 4798solaris*) 4799 symcode='[[BDRT]]' 4800 ;; 4801sco3.2v5*) 4802 symcode='[[DT]]' 4803 ;; 4804sysv4.2uw2*) 4805 symcode='[[DT]]' 4806 ;; 4807sysv5* | sco5v6* | unixware* | OpenUNIX*) 4808 symcode='[[ABDT]]' 4809 ;; 4810sysv4) 4811 symcode='[[DFNSTU]]' 4812 ;; 4813esac 4814 4815# If we're using GNU nm, then use its standard symbol codes. 4816case `$NM -V 2>&1` in 4817*GNU* | *'with BFD'*) 4818 symcode='[[ABCDGIRSTW]]' ;; 4819esac 4820 4821# Transform an extracted symbol line into a proper C declaration. 4822# Some systems (esp. on ia64) link data and code symbols differently, 4823# so use this general approach. 4824lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4825 4826# Transform an extracted symbol line into symbol name and symbol address 4827lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4828lt_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'" 4829 4830# Handle CRLF in mingw tool chain 4831opt_cr= 4832case $build_os in 4833mingw*) 4834 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4835 ;; 4836esac 4837 4838# Try without a prefix underscore, then with it. 4839for ac_symprfx in "" "_"; do 4840 4841 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4842 symxfrm="\\1 $ac_symprfx\\2 \\2" 4843 4844 # Write the raw and C identifiers. 4845 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4846 # Fake it for dumpbin and say T for any non-static function 4847 # and D for any global variable. 4848 # Also find C++ and __fastcall symbols from MSVC++, 4849 # which start with @ or ?. 4850 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4851" {last_section=section; section=\$ 3};"\ 4852" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4853" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4854" \$ 0!~/External *\|/{next};"\ 4855" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4856" {if(hide[section]) next};"\ 4857" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4858" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4859" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4860" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4861" ' prfx=^$ac_symprfx]" 4862 else 4863 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4864 fi 4865 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4866 4867 # Check to see that the pipe works correctly. 4868 pipe_works=no 4869 4870 rm -f conftest* 4871 cat > conftest.$ac_ext <<_LT_EOF 4872#ifdef __cplusplus 4873extern "C" { 4874#endif 4875char nm_test_var; 4876void nm_test_func(void); 4877void nm_test_func(void){} 4878#ifdef __cplusplus 4879} 4880#endif 4881int main(){nm_test_var='a';nm_test_func();return(0);} 4882_LT_EOF 4883 4884 if AC_TRY_EVAL(ac_compile); then 4885 # Now try to grab the symbols. 4886 nlist=conftest.nm 4887 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4888 # Try sorting and uniquifying the output. 4889 if sort "$nlist" | uniq > "$nlist"T; then 4890 mv -f "$nlist"T "$nlist" 4891 else 4892 rm -f "$nlist"T 4893 fi 4894 4895 # Make sure that we snagged all the symbols we need. 4896 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4897 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4898 cat <<_LT_EOF > conftest.$ac_ext 4899/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4900#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4901/* DATA imports from DLLs on WIN32 con't be const, because runtime 4902 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4903# define LT@&t@_DLSYM_CONST 4904#elif defined(__osf__) 4905/* This system does not cope well with relocations in const data. */ 4906# define LT@&t@_DLSYM_CONST 4907#else 4908# define LT@&t@_DLSYM_CONST const 4909#endif 4910 4911#ifdef __cplusplus 4912extern "C" { 4913#endif 4914 4915_LT_EOF 4916 # Now generate the symbol file. 4917 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4918 4919 cat <<_LT_EOF >> conftest.$ac_ext 4920 4921/* The mapping between symbol names and symbols. */ 4922LT@&t@_DLSYM_CONST struct { 4923 const char *name; 4924 void *address; 4925} 4926lt__PROGRAM__LTX_preloaded_symbols[[]] = 4927{ 4928 { "@PROGRAM@", (void *) 0 }, 4929_LT_EOF 4930 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4931 cat <<\_LT_EOF >> conftest.$ac_ext 4932 {0, (void *) 0} 4933}; 4934 4935/* This works around a problem in FreeBSD linker */ 4936#ifdef FREEBSD_WORKAROUND 4937static const void *lt_preloaded_setup() { 4938 return lt__PROGRAM__LTX_preloaded_symbols; 4939} 4940#endif 4941 4942#ifdef __cplusplus 4943} 4944#endif 4945_LT_EOF 4946 # Now try linking the two files. 4947 mv conftest.$ac_objext conftstm.$ac_objext 4948 lt_globsym_save_LIBS=$LIBS 4949 lt_globsym_save_CFLAGS=$CFLAGS 4950 LIBS="conftstm.$ac_objext" 4951 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4952 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4953 pipe_works=yes 4954 fi 4955 LIBS=$lt_globsym_save_LIBS 4956 CFLAGS=$lt_globsym_save_CFLAGS 4957 else 4958 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4959 fi 4960 else 4961 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4962 fi 4963 else 4964 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4965 fi 4966 else 4967 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4968 cat conftest.$ac_ext >&5 4969 fi 4970 rm -rf conftest* conftst* 4971 4972 # Do not use the global_symbol_pipe unless it works. 4973 if test "$pipe_works" = yes; then 4974 break 4975 else 4976 lt_cv_sys_global_symbol_pipe= 4977 fi 4978done 4979]) 4980if test -z "$lt_cv_sys_global_symbol_pipe"; then 4981 lt_cv_sys_global_symbol_to_cdecl= 4982fi 4983if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4984 AC_MSG_RESULT(failed) 4985else 4986 AC_MSG_RESULT(ok) 4987fi 4988 4989# Response file support. 4990if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4991 nm_file_list_spec='@' 4992elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4993 nm_file_list_spec='@' 4994fi 4995 4996_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4997 [Take the output of nm and produce a listing of raw symbols and C names]) 4998_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4999 [Transform the output of nm in a proper C declaration]) 5000_LT_DECL([global_symbol_to_c_name_address], 5001 [lt_cv_sys_global_symbol_to_c_name_address], [1], 5002 [Transform the output of nm in a C name address pair]) 5003_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5004 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5005 [Transform the output of nm in a C name address pair when lib prefix is needed]) 5006_LT_DECL([], [nm_file_list_spec], [1], 5007 [Specify filename containing input files for $NM]) 5008]) # _LT_CMD_GLOBAL_SYMBOLS 5009 5010 5011# _LT_COMPILER_PIC([TAGNAME]) 5012# --------------------------- 5013m4_defun([_LT_COMPILER_PIC], 5014[m4_require([_LT_TAG_COMPILER])dnl 5015_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5016_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5017_LT_TAGVAR(lt_prog_compiler_static, $1)= 5018 5019m4_if([$1], [CXX], [ 5020 # C++ specific cases for pic, static, wl, etc. 5021 if test "$GXX" = yes; then 5022 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5023 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5024 5025 case $host_os in 5026 aix*) 5027 # All AIX code is PIC. 5028 if test "$host_cpu" = ia64; then 5029 # AIX 5 now supports IA64 processor 5030 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5031 fi 5032 ;; 5033 5034 amigaos*) 5035 case $host_cpu in 5036 powerpc) 5037 # see comment about AmigaOS4 .so support 5038 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5039 ;; 5040 m68k) 5041 # FIXME: we need at least 68020 code to build shared libraries, but 5042 # adding the `-m68020' flag to GCC prevents building anything better, 5043 # like `-m68040'. 5044 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5045 ;; 5046 esac 5047 ;; 5048 5049 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5050 # PIC is the default for these OSes. 5051 ;; 5052 mingw* | cygwin* | os2* | pw32* | cegcc*) 5053 # This hack is so that the source file can tell whether it is being 5054 # built for inclusion in a dll (and should export symbols for example). 5055 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5056 # (--disable-auto-import) libraries 5057 m4_if([$1], [GCJ], [], 5058 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5059 ;; 5060 darwin* | rhapsody*) 5061 # PIC is the default on this platform 5062 # Common symbols not allowed in MH_DYLIB files 5063 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5064 ;; 5065 *djgpp*) 5066 # DJGPP does not support shared libraries at all 5067 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5068 ;; 5069 haiku*) 5070 # PIC is the default for Haiku. 5071 # The "-static" flag exists, but is broken. 5072 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5073 ;; 5074 interix[[3-9]]*) 5075 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5076 # Instead, we relocate shared libraries at runtime. 5077 ;; 5078 sysv4*MP*) 5079 if test -d /usr/nec; then 5080 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5081 fi 5082 ;; 5083 hpux*) 5084 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5085 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5086 # sets the default TLS model and affects inlining. 5087 case $host_cpu in 5088 hppa*64*) 5089 ;; 5090 *) 5091 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5092 ;; 5093 esac 5094 ;; 5095 *qnx* | *nto*) 5096 # QNX uses GNU C++, but need to define -shared option too, otherwise 5097 # it will coredump. 5098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5099 ;; 5100 *) 5101 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5102 ;; 5103 esac 5104 else 5105 case $host_os in 5106 aix[[4-9]]*) 5107 # All AIX code is PIC. 5108 if test "$host_cpu" = ia64; then 5109 # AIX 5 now supports IA64 processor 5110 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5111 else 5112 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5113 fi 5114 ;; 5115 chorus*) 5116 case $cc_basename in 5117 cxch68*) 5118 # Green Hills C++ Compiler 5119 # _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" 5120 ;; 5121 esac 5122 ;; 5123 mingw* | cygwin* | os2* | pw32* | cegcc*) 5124 # This hack is so that the source file can tell whether it is being 5125 # built for inclusion in a dll (and should export symbols for example). 5126 m4_if([$1], [GCJ], [], 5127 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5128 ;; 5129 dgux*) 5130 case $cc_basename in 5131 ec++*) 5132 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5133 ;; 5134 ghcx*) 5135 # Green Hills C++ Compiler 5136 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5137 ;; 5138 *) 5139 ;; 5140 esac 5141 ;; 5142 freebsd* | dragonfly*) 5143 # FreeBSD uses GNU C++ 5144 ;; 5145 hpux9* | hpux10* | hpux11*) 5146 case $cc_basename in 5147 CC*) 5148 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5149 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5150 if test "$host_cpu" != ia64; then 5151 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5152 fi 5153 ;; 5154 aCC*) 5155 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5156 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5157 case $host_cpu in 5158 hppa*64*|ia64*) 5159 # +Z the default 5160 ;; 5161 *) 5162 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5163 ;; 5164 esac 5165 ;; 5166 *) 5167 ;; 5168 esac 5169 ;; 5170 interix*) 5171 # This is c89, which is MS Visual C++ (no shared libs) 5172 # Anyone wants to do a port? 5173 ;; 5174 irix5* | irix6* | nonstopux*) 5175 case $cc_basename in 5176 CC*) 5177 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5178 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5179 # CC pic flag -KPIC is the default. 5180 ;; 5181 *) 5182 ;; 5183 esac 5184 ;; 5185 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5186 case $cc_basename in 5187 KCC*) 5188 # KAI C++ Compiler 5189 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5190 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5191 ;; 5192 ecpc* ) 5193 # old Intel C++ for x86_64 which still supported -KPIC. 5194 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5195 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5196 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5197 ;; 5198 icpc* ) 5199 # Intel C++, used to be incompatible with GCC. 5200 # ICC 10 doesn't accept -KPIC any more. 5201 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5202 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5203 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5204 ;; 5205 pgCC* | pgcpp*) 5206 # Portland Group C++ compiler 5207 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5208 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5209 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5210 ;; 5211 cxx*) 5212 # Compaq C++ 5213 # Make sure the PIC flag is empty. It appears that all Alpha 5214 # Linux and Compaq Tru64 Unix objects are PIC. 5215 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5216 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5217 ;; 5218 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5219 # IBM XL 8.0, 9.0 on PPC and BlueGene 5220 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5223 ;; 5224 *) 5225 case `$CC -V 2>&1 | sed 5q` in 5226 *Sun\ C*) 5227 # Sun C++ 5.9 5228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5229 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5230 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5231 ;; 5232 esac 5233 ;; 5234 esac 5235 ;; 5236 lynxos*) 5237 ;; 5238 m88k*) 5239 ;; 5240 mvs*) 5241 case $cc_basename in 5242 cxx*) 5243 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5244 ;; 5245 *) 5246 ;; 5247 esac 5248 ;; 5249 netbsd*) 5250 ;; 5251 *qnx* | *nto*) 5252 # QNX uses GNU C++, but need to define -shared option too, otherwise 5253 # it will coredump. 5254 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5255 ;; 5256 osf3* | osf4* | osf5*) 5257 case $cc_basename in 5258 KCC*) 5259 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5260 ;; 5261 RCC*) 5262 # Rational C++ 2.4.1 5263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5264 ;; 5265 cxx*) 5266 # Digital/Compaq C++ 5267 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5268 # Make sure the PIC flag is empty. It appears that all Alpha 5269 # Linux and Compaq Tru64 Unix objects are PIC. 5270 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5271 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5272 ;; 5273 *) 5274 ;; 5275 esac 5276 ;; 5277 psos*) 5278 ;; 5279 solaris*) 5280 case $cc_basename in 5281 CC* | sunCC*) 5282 # Sun C++ 4.2, 5.x and Centerline C++ 5283 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5284 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5285 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5286 ;; 5287 gcx*) 5288 # Green Hills C++ Compiler 5289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5290 ;; 5291 *) 5292 ;; 5293 esac 5294 ;; 5295 sunos4*) 5296 case $cc_basename in 5297 CC*) 5298 # Sun C++ 4.x 5299 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5300 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5301 ;; 5302 lcc*) 5303 # Lucid 5304 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5305 ;; 5306 *) 5307 ;; 5308 esac 5309 ;; 5310 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5311 case $cc_basename in 5312 CC*) 5313 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5314 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5316 ;; 5317 esac 5318 ;; 5319 tandem*) 5320 case $cc_basename in 5321 NCC*) 5322 # NonStop-UX NCC 3.20 5323 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5324 ;; 5325 *) 5326 ;; 5327 esac 5328 ;; 5329 vxworks*) 5330 ;; 5331 *) 5332 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5333 ;; 5334 esac 5335 fi 5336], 5337[ 5338 if test "$GCC" = yes; then 5339 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5340 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5341 5342 case $host_os in 5343 aix*) 5344 # All AIX code is PIC. 5345 if test "$host_cpu" = ia64; then 5346 # AIX 5 now supports IA64 processor 5347 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5348 fi 5349 ;; 5350 5351 amigaos*) 5352 case $host_cpu in 5353 powerpc) 5354 # see comment about AmigaOS4 .so support 5355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5356 ;; 5357 m68k) 5358 # FIXME: we need at least 68020 code to build shared libraries, but 5359 # adding the `-m68020' flag to GCC prevents building anything better, 5360 # like `-m68040'. 5361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5362 ;; 5363 esac 5364 ;; 5365 5366 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5367 # PIC is the default for these OSes. 5368 ;; 5369 5370 mingw* | cygwin* | pw32* | os2* | cegcc*) 5371 # This hack is so that the source file can tell whether it is being 5372 # built for inclusion in a dll (and should export symbols for example). 5373 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5374 # (--disable-auto-import) libraries 5375 m4_if([$1], [GCJ], [], 5376 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5377 ;; 5378 5379 darwin* | rhapsody*) 5380 # PIC is the default on this platform 5381 # Common symbols not allowed in MH_DYLIB files 5382 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5383 ;; 5384 5385 haiku*) 5386 # PIC is the default for Haiku. 5387 # The "-static" flag exists, but is broken. 5388 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5389 ;; 5390 5391 hpux*) 5392 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5393 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5394 # sets the default TLS model and affects inlining. 5395 case $host_cpu in 5396 hppa*64*) 5397 # +Z the default 5398 ;; 5399 *) 5400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5401 ;; 5402 esac 5403 ;; 5404 5405 interix[[3-9]]*) 5406 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5407 # Instead, we relocate shared libraries at runtime. 5408 ;; 5409 5410 msdosdjgpp*) 5411 # Just because we use GCC doesn't mean we suddenly get shared libraries 5412 # on systems that don't support them. 5413 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5414 enable_shared=no 5415 ;; 5416 5417 *nto* | *qnx*) 5418 # QNX uses GNU C++, but need to define -shared option too, otherwise 5419 # it will coredump. 5420 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5421 ;; 5422 5423 sysv4*MP*) 5424 if test -d /usr/nec; then 5425 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5426 fi 5427 ;; 5428 5429 *) 5430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5431 ;; 5432 esac 5433 5434 case $cc_basename in 5435 nvcc*) # Cuda Compiler Driver 2.2 5436 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5437 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5438 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5439 fi 5440 ;; 5441 esac 5442 else 5443 # PORTME Check for flag to pass linker flags through the system compiler. 5444 case $host_os in 5445 aix*) 5446 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5447 if test "$host_cpu" = ia64; then 5448 # AIX 5 now supports IA64 processor 5449 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5450 else 5451 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5452 fi 5453 ;; 5454 5455 mingw* | cygwin* | pw32* | os2* | cegcc*) 5456 # This hack is so that the source file can tell whether it is being 5457 # built for inclusion in a dll (and should export symbols for example). 5458 m4_if([$1], [GCJ], [], 5459 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5460 ;; 5461 5462 hpux9* | hpux10* | hpux11*) 5463 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5465 # not for PA HP-UX. 5466 case $host_cpu in 5467 hppa*64*|ia64*) 5468 # +Z the default 5469 ;; 5470 *) 5471 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5472 ;; 5473 esac 5474 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5475 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5476 ;; 5477 5478 irix5* | irix6* | nonstopux*) 5479 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5480 # PIC (with -KPIC) is the default. 5481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5482 ;; 5483 5484 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5485 case $cc_basename in 5486 # old Intel for x86_64 which still supported -KPIC. 5487 ecc*) 5488 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5489 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5490 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5491 ;; 5492 # icc used to be incompatible with GCC. 5493 # ICC 10 doesn't accept -KPIC any more. 5494 icc* | ifort*) 5495 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5496 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5497 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5498 ;; 5499 # Lahey Fortran 8.1. 5500 lf95*) 5501 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5502 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5503 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5504 ;; 5505 nagfor*) 5506 # NAG Fortran compiler 5507 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5508 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5509 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5510 ;; 5511 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5512 # Portland Group compilers (*not* the Pentium gcc compiler, 5513 # which looks to be a dead project) 5514 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5515 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5516 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5517 ;; 5518 ccc*) 5519 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5520 # All Alpha code is PIC. 5521 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5522 ;; 5523 xl* | bgxl* | bgf* | mpixl*) 5524 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5525 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5526 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5527 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5528 ;; 5529 *) 5530 case `$CC -V 2>&1 | sed 5q` in 5531 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5532 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5533 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5534 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5535 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5536 ;; 5537 *Sun\ F* | *Sun*Fortran*) 5538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5539 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5540 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5541 ;; 5542 *Sun\ C*) 5543 # Sun C 5.9 5544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5546 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5547 ;; 5548 *Intel*\ [[CF]]*Compiler*) 5549 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5550 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5551 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5552 ;; 5553 *Portland\ Group*) 5554 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5555 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5556 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5557 ;; 5558 esac 5559 ;; 5560 esac 5561 ;; 5562 5563 newsos6) 5564 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5565 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5566 ;; 5567 5568 *nto* | *qnx*) 5569 # QNX uses GNU C++, but need to define -shared option too, otherwise 5570 # it will coredump. 5571 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5572 ;; 5573 5574 osf3* | osf4* | osf5*) 5575 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5576 # All OSF/1 code is PIC. 5577 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5578 ;; 5579 5580 rdos*) 5581 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5582 ;; 5583 5584 solaris*) 5585 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5586 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5587 case $cc_basename in 5588 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5589 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5590 *) 5591 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5592 esac 5593 ;; 5594 5595 sunos4*) 5596 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5598 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5599 ;; 5600 5601 sysv4 | sysv4.2uw2* | sysv4.3*) 5602 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5603 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5604 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5605 ;; 5606 5607 sysv4*MP*) 5608 if test -d /usr/nec ;then 5609 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5610 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5611 fi 5612 ;; 5613 5614 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5615 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5616 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5617 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5618 ;; 5619 5620 unicos*) 5621 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5622 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5623 ;; 5624 5625 uts4*) 5626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5627 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5628 ;; 5629 5630 *) 5631 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5632 ;; 5633 esac 5634 fi 5635]) 5636case $host_os in 5637 # For platforms which do not support PIC, -DPIC is meaningless: 5638 *djgpp*) 5639 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5640 ;; 5641 *) 5642 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5643 ;; 5644esac 5645 5646AC_CACHE_CHECK([for $compiler option to produce PIC], 5647 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5648 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5649_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5650 5651# 5652# Check to make sure the PIC flag actually works. 5653# 5654if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5655 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5656 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5657 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5658 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5659 "" | " "*) ;; 5660 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5661 esac], 5662 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5663 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5664fi 5665_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5666 [Additional compiler flags for building library objects]) 5667 5668_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5669 [How to pass a linker flag through the compiler]) 5670# 5671# Check to make sure the static flag actually works. 5672# 5673wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5674_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5675 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5676 $lt_tmp_static_flag, 5677 [], 5678 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5679_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5680 [Compiler flag to prevent dynamic linking]) 5681])# _LT_COMPILER_PIC 5682 5683 5684# _LT_LINKER_SHLIBS([TAGNAME]) 5685# ---------------------------- 5686# See if the linker supports building shared libraries. 5687m4_defun([_LT_LINKER_SHLIBS], 5688[AC_REQUIRE([LT_PATH_LD])dnl 5689AC_REQUIRE([LT_PATH_NM])dnl 5690m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5691m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5692m4_require([_LT_DECL_EGREP])dnl 5693m4_require([_LT_DECL_SED])dnl 5694m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5695m4_require([_LT_TAG_COMPILER])dnl 5696AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5697m4_if([$1], [CXX], [ 5698 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5699 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5700 case $host_os in 5701 aix[[4-9]]*) 5702 # If we're using GNU nm, then we don't want the "-C" option. 5703 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5704 # Also, AIX nm treats weak defined symbols like other global defined 5705 # symbols, whereas GNU nm marks them as "W". 5706 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5707 _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' 5708 else 5709 _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' 5710 fi 5711 ;; 5712 pw32*) 5713 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5714 ;; 5715 cygwin* | mingw* | cegcc*) 5716 case $cc_basename in 5717 cl*) 5718 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5719 ;; 5720 *) 5721 _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' 5722 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5723 ;; 5724 esac 5725 ;; 5726 *) 5727 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5728 ;; 5729 esac 5730], [ 5731 runpath_var= 5732 _LT_TAGVAR(allow_undefined_flag, $1)= 5733 _LT_TAGVAR(always_export_symbols, $1)=no 5734 _LT_TAGVAR(archive_cmds, $1)= 5735 _LT_TAGVAR(archive_expsym_cmds, $1)= 5736 _LT_TAGVAR(compiler_needs_object, $1)=no 5737 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5738 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5739 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5740 _LT_TAGVAR(hardcode_automatic, $1)=no 5741 _LT_TAGVAR(hardcode_direct, $1)=no 5742 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5744 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5745 _LT_TAGVAR(hardcode_minus_L, $1)=no 5746 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5747 _LT_TAGVAR(inherit_rpath, $1)=no 5748 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5749 _LT_TAGVAR(module_cmds, $1)= 5750 _LT_TAGVAR(module_expsym_cmds, $1)= 5751 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5752 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5753 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5754 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5755 # include_expsyms should be a list of space-separated symbols to be *always* 5756 # included in the symbol list 5757 _LT_TAGVAR(include_expsyms, $1)= 5758 # exclude_expsyms can be an extended regexp of symbols to exclude 5759 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5760 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5761 # as well as any symbol that contains `d'. 5762 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5763 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5764 # platforms (ab)use it in PIC code, but their linkers get confused if 5765 # the symbol is explicitly referenced. Since portable code cannot 5766 # rely on this symbol name, it's probably fine to never include it in 5767 # preloaded symbol tables. 5768 # Exclude shared library initialization/finalization symbols. 5769dnl Note also adjust exclude_expsyms for C++ above. 5770 extract_expsyms_cmds= 5771 5772 case $host_os in 5773 cygwin* | mingw* | pw32* | cegcc*) 5774 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5775 # When not using gcc, we currently assume that we are using 5776 # Microsoft Visual C++. 5777 if test "$GCC" != yes; then 5778 with_gnu_ld=no 5779 fi 5780 ;; 5781 interix*) 5782 # we just hope/assume this is gcc and not c89 (= MSVC++) 5783 with_gnu_ld=yes 5784 ;; 5785 openbsd*) 5786 with_gnu_ld=no 5787 ;; 5788 esac 5789 5790 _LT_TAGVAR(ld_shlibs, $1)=yes 5791 5792 # On some targets, GNU ld is compatible enough with the native linker 5793 # that we're better off using the native interface for both. 5794 lt_use_gnu_ld_interface=no 5795 if test "$with_gnu_ld" = yes; then 5796 case $host_os in 5797 aix*) 5798 # The AIX port of GNU ld has always aspired to compatibility 5799 # with the native linker. However, as the warning in the GNU ld 5800 # block says, versions before 2.19.5* couldn't really create working 5801 # shared libraries, regardless of the interface used. 5802 case `$LD -v 2>&1` in 5803 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5804 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5805 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5806 *) 5807 lt_use_gnu_ld_interface=yes 5808 ;; 5809 esac 5810 ;; 5811 *) 5812 lt_use_gnu_ld_interface=yes 5813 ;; 5814 esac 5815 fi 5816 5817 if test "$lt_use_gnu_ld_interface" = yes; then 5818 # If archive_cmds runs LD, not CC, wlarc should be empty 5819 wlarc='${wl}' 5820 5821 # Set some defaults for GNU ld with shared library support. These 5822 # are reset later if shared libraries are not supported. Putting them 5823 # here allows them to be overridden if necessary. 5824 runpath_var=LD_RUN_PATH 5825 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5826 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5827 # ancient GNU ld didn't support --whole-archive et. al. 5828 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5829 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5830 else 5831 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5832 fi 5833 supports_anon_versioning=no 5834 case `$LD -v 2>&1` in 5835 *GNU\ gold*) supports_anon_versioning=yes ;; 5836 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5837 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5838 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5839 *\ 2.11.*) ;; # other 2.11 versions 5840 *) supports_anon_versioning=yes ;; 5841 esac 5842 5843 # See if GNU ld supports shared libraries. 5844 case $host_os in 5845 aix[[3-9]]*) 5846 # On AIX/PPC, the GNU linker is very broken 5847 if test "$host_cpu" != ia64; then 5848 _LT_TAGVAR(ld_shlibs, $1)=no 5849 cat <<_LT_EOF 1>&2 5850 5851*** Warning: the GNU linker, at least up to release 2.19, is reported 5852*** to be unable to reliably create shared libraries on AIX. 5853*** Therefore, libtool is disabling shared libraries support. If you 5854*** really care for shared libraries, you may want to install binutils 5855*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5856*** You will then need to restart the configuration process. 5857 5858_LT_EOF 5859 fi 5860 ;; 5861 5862 amigaos*) 5863 case $host_cpu in 5864 powerpc) 5865 # see comment about AmigaOS4 .so support 5866 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5868 ;; 5869 m68k) 5870 _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)' 5871 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5872 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5873 ;; 5874 esac 5875 ;; 5876 5877 beos*) 5878 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5879 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5880 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5881 # support --undefined. This deserves some investigation. FIXME 5882 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5883 else 5884 _LT_TAGVAR(ld_shlibs, $1)=no 5885 fi 5886 ;; 5887 5888 cygwin* | mingw* | pw32* | cegcc*) 5889 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5890 # as there is no search path for DLLs. 5891 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5892 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5893 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5894 _LT_TAGVAR(always_export_symbols, $1)=no 5895 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5896 _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' 5897 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5898 5899 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5900 _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' 5901 # If the export-symbols file already is a .def file (1st line 5902 # is EXPORTS), use it as is; otherwise, prepend... 5903 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5904 cp $export_symbols $output_objdir/$soname.def; 5905 else 5906 echo EXPORTS > $output_objdir/$soname.def; 5907 cat $export_symbols >> $output_objdir/$soname.def; 5908 fi~ 5909 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5910 else 5911 _LT_TAGVAR(ld_shlibs, $1)=no 5912 fi 5913 ;; 5914 5915 haiku*) 5916 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5917 _LT_TAGVAR(link_all_deplibs, $1)=yes 5918 ;; 5919 5920 interix[[3-9]]*) 5921 _LT_TAGVAR(hardcode_direct, $1)=no 5922 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5923 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5924 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5925 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5926 # Instead, shared libraries are loaded at an image base (0x10000000 by 5927 # default) and relocated if they conflict, which is a slow very memory 5928 # consuming and fragmenting process. To avoid this, we pick a random, 5929 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5930 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5931 _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' 5932 _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' 5933 ;; 5934 5935 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5936 tmp_diet=no 5937 if test "$host_os" = linux-dietlibc; then 5938 case $cc_basename in 5939 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5940 esac 5941 fi 5942 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5943 && test "$tmp_diet" = no 5944 then 5945 tmp_addflag=' $pic_flag' 5946 tmp_sharedflag='-shared' 5947 case $cc_basename,$host_cpu in 5948 pgcc*) # Portland Group C compiler 5949 _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' 5950 tmp_addflag=' $pic_flag' 5951 ;; 5952 pgf77* | pgf90* | pgf95* | pgfortran*) 5953 # Portland Group f77 and f90 compilers 5954 _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' 5955 tmp_addflag=' $pic_flag -Mnomain' ;; 5956 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5957 tmp_addflag=' -i_dynamic' ;; 5958 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5959 tmp_addflag=' -i_dynamic -nofor_main' ;; 5960 ifc* | ifort*) # Intel Fortran compiler 5961 tmp_addflag=' -nofor_main' ;; 5962 lf95*) # Lahey Fortran 8.1 5963 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5964 tmp_sharedflag='--shared' ;; 5965 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5966 tmp_sharedflag='-qmkshrobj' 5967 tmp_addflag= ;; 5968 nvcc*) # Cuda Compiler Driver 2.2 5969 _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' 5970 _LT_TAGVAR(compiler_needs_object, $1)=yes 5971 ;; 5972 esac 5973 case `$CC -V 2>&1 | sed 5q` in 5974 *Sun\ C*) # Sun C 5.9 5975 _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' 5976 _LT_TAGVAR(compiler_needs_object, $1)=yes 5977 tmp_sharedflag='-G' ;; 5978 *Sun\ F*) # Sun Fortran 8.3 5979 tmp_sharedflag='-G' ;; 5980 esac 5981 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5982 5983 if test "x$supports_anon_versioning" = xyes; then 5984 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5985 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5986 echo "local: *; };" >> $output_objdir/$libname.ver~ 5987 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5988 fi 5989 5990 case $cc_basename in 5991 xlf* | bgf* | bgxlf* | mpixlf*) 5992 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5993 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5994 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5995 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5996 if test "x$supports_anon_versioning" = xyes; then 5997 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5998 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5999 echo "local: *; };" >> $output_objdir/$libname.ver~ 6000 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6001 fi 6002 ;; 6003 esac 6004 else 6005 _LT_TAGVAR(ld_shlibs, $1)=no 6006 fi 6007 ;; 6008 6009 netbsd*) 6010 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6011 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6012 wlarc= 6013 else 6014 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6015 _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' 6016 fi 6017 ;; 6018 6019 solaris*) 6020 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6021 _LT_TAGVAR(ld_shlibs, $1)=no 6022 cat <<_LT_EOF 1>&2 6023 6024*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6025*** create shared libraries on Solaris systems. Therefore, libtool 6026*** is disabling shared libraries support. We urge you to upgrade GNU 6027*** binutils to release 2.9.1 or newer. Another option is to modify 6028*** your PATH or compiler configuration so that the native linker is 6029*** used, and then restart. 6030 6031_LT_EOF 6032 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6033 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6034 _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' 6035 else 6036 _LT_TAGVAR(ld_shlibs, $1)=no 6037 fi 6038 ;; 6039 6040 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6041 case `$LD -v 2>&1` in 6042 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6043 _LT_TAGVAR(ld_shlibs, $1)=no 6044 cat <<_LT_EOF 1>&2 6045 6046*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6047*** reliably create shared libraries on SCO systems. Therefore, libtool 6048*** is disabling shared libraries support. We urge you to upgrade GNU 6049*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6050*** your PATH or compiler configuration so that the native linker is 6051*** used, and then restart. 6052 6053_LT_EOF 6054 ;; 6055 *) 6056 # For security reasons, it is highly recommended that you always 6057 # use absolute paths for naming shared libraries, and exclude the 6058 # DT_RUNPATH tag from executables and libraries. But doing so 6059 # requires that you compile everything twice, which is a pain. 6060 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6062 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6063 _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' 6064 else 6065 _LT_TAGVAR(ld_shlibs, $1)=no 6066 fi 6067 ;; 6068 esac 6069 ;; 6070 6071 sunos4*) 6072 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6073 wlarc= 6074 _LT_TAGVAR(hardcode_direct, $1)=yes 6075 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6076 ;; 6077 6078 *) 6079 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6080 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6081 _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' 6082 else 6083 _LT_TAGVAR(ld_shlibs, $1)=no 6084 fi 6085 ;; 6086 esac 6087 6088 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6089 runpath_var= 6090 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6091 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6092 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6093 fi 6094 else 6095 # PORTME fill in a description of your system's linker (not GNU ld) 6096 case $host_os in 6097 aix3*) 6098 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6099 _LT_TAGVAR(always_export_symbols, $1)=yes 6100 _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' 6101 # Note: this linker hardcodes the directories in LIBPATH if there 6102 # are no directories specified by -L. 6103 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6104 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6105 # Neither direct hardcoding nor static linking is supported with a 6106 # broken collect2. 6107 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6108 fi 6109 ;; 6110 6111 aix[[4-9]]*) 6112 if test "$host_cpu" = ia64; then 6113 # On IA64, the linker does run time linking by default, so we don't 6114 # have to do anything special. 6115 aix_use_runtimelinking=no 6116 exp_sym_flag='-Bexport' 6117 no_entry_flag="" 6118 else 6119 # If we're using GNU nm, then we don't want the "-C" option. 6120 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6121 # Also, AIX nm treats weak defined symbols like other global 6122 # defined symbols, whereas GNU nm marks them as "W". 6123 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6124 _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' 6125 else 6126 _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' 6127 fi 6128 aix_use_runtimelinking=no 6129 6130 # Test if we are trying to use run time linking or normal 6131 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6132 # need to do runtime linking. 6133 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6134 for ld_flag in $LDFLAGS; do 6135 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6136 aix_use_runtimelinking=yes 6137 break 6138 fi 6139 done 6140 ;; 6141 esac 6142 6143 exp_sym_flag='-bexport' 6144 no_entry_flag='-bnoentry' 6145 fi 6146 6147 # When large executables or shared objects are built, AIX ld can 6148 # have problems creating the table of contents. If linking a library 6149 # or program results in "error TOC overflow" add -mminimal-toc to 6150 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6151 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6152 6153 _LT_TAGVAR(archive_cmds, $1)='' 6154 _LT_TAGVAR(hardcode_direct, $1)=yes 6155 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6156 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6157 _LT_TAGVAR(link_all_deplibs, $1)=yes 6158 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6159 6160 if test "$GCC" = yes; then 6161 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6162 # We only want to do this on AIX 4.2 and lower, the check 6163 # below for broken collect2 doesn't work under 4.3+ 6164 collect2name=`${CC} -print-prog-name=collect2` 6165 if test -f "$collect2name" && 6166 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6167 then 6168 # We have reworked collect2 6169 : 6170 else 6171 # We have old collect2 6172 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6173 # It fails to find uninstalled libraries when the uninstalled 6174 # path is not listed in the libpath. Setting hardcode_minus_L 6175 # to unsupported forces relinking 6176 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6178 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6179 fi 6180 ;; 6181 esac 6182 shared_flag='-shared' 6183 if test "$aix_use_runtimelinking" = yes; then 6184 shared_flag="$shared_flag "'${wl}-G' 6185 fi 6186 else 6187 # not using gcc 6188 if test "$host_cpu" = ia64; then 6189 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6190 # chokes on -Wl,-G. The following line is correct: 6191 shared_flag='-G' 6192 else 6193 if test "$aix_use_runtimelinking" = yes; then 6194 shared_flag='${wl}-G' 6195 else 6196 shared_flag='${wl}-bM:SRE' 6197 fi 6198 fi 6199 fi 6200 6201 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6202 # It seems that -bexpall does not export symbols beginning with 6203 # underscore (_), so it is better to generate a list of symbols to export. 6204 _LT_TAGVAR(always_export_symbols, $1)=yes 6205 if test "$aix_use_runtimelinking" = yes; then 6206 # Warning - without using the other runtime loading flags (-brtl), 6207 # -berok will link without error, but may produce a broken library. 6208 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6209 # Determine the default libpath from the value encoded in an 6210 # empty executable. 6211 _LT_SYS_MODULE_PATH_AIX([$1]) 6212 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6213 _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" 6214 else 6215 if test "$host_cpu" = ia64; then 6216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6217 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6218 _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" 6219 else 6220 # Determine the default libpath from the value encoded in an 6221 # empty executable. 6222 _LT_SYS_MODULE_PATH_AIX([$1]) 6223 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6224 # Warning - without using the other run time loading flags, 6225 # -berok will link without error, but may produce a broken library. 6226 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6227 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6228 if test "$with_gnu_ld" = yes; then 6229 # We only use this code for GNU lds that support --whole-archive. 6230 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6231 else 6232 # Exported symbols can be pulled into shared objects from archives 6233 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6234 fi 6235 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6236 # This is similar to how AIX traditionally builds its shared libraries. 6237 _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' 6238 fi 6239 fi 6240 ;; 6241 6242 amigaos*) 6243 case $host_cpu in 6244 powerpc) 6245 # see comment about AmigaOS4 .so support 6246 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6247 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6248 ;; 6249 m68k) 6250 _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)' 6251 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6252 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6253 ;; 6254 esac 6255 ;; 6256 6257 bsdi[[45]]*) 6258 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6259 ;; 6260 6261 cygwin* | mingw* | pw32* | cegcc*) 6262 # When not using gcc, we currently assume that we are using 6263 # Microsoft Visual C++. 6264 # hardcode_libdir_flag_spec is actually meaningless, as there is 6265 # no search path for DLLs. 6266 case $cc_basename in 6267 cl*) 6268 # Native MSVC 6269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6270 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6271 _LT_TAGVAR(always_export_symbols, $1)=yes 6272 _LT_TAGVAR(file_list_spec, $1)='@' 6273 # Tell ltmain to make .lib files, not .a files. 6274 libext=lib 6275 # Tell ltmain to make .dll files, not .so files. 6276 shrext_cmds=".dll" 6277 # FIXME: Setting linknames here is a bad hack. 6278 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6279 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6280 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6281 else 6282 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6283 fi~ 6284 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6285 linknames=' 6286 # The linker will not automatically build a static lib if we build a DLL. 6287 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6288 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6289 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6290 _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' 6291 # Don't use ranlib 6292 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6293 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6294 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6295 case $lt_outputfile in 6296 *.exe|*.EXE) ;; 6297 *) 6298 lt_outputfile="$lt_outputfile.exe" 6299 lt_tool_outputfile="$lt_tool_outputfile.exe" 6300 ;; 6301 esac~ 6302 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6303 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6304 $RM "$lt_outputfile.manifest"; 6305 fi' 6306 ;; 6307 *) 6308 # Assume MSVC wrapper 6309 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6310 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6311 # Tell ltmain to make .lib files, not .a files. 6312 libext=lib 6313 # Tell ltmain to make .dll files, not .so files. 6314 shrext_cmds=".dll" 6315 # FIXME: Setting linknames here is a bad hack. 6316 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6317 # The linker will automatically build a .lib file if we build a DLL. 6318 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6319 # FIXME: Should let the user specify the lib program. 6320 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6321 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6322 ;; 6323 esac 6324 ;; 6325 6326 darwin* | rhapsody*) 6327 _LT_DARWIN_LINKER_FEATURES($1) 6328 ;; 6329 6330 dgux*) 6331 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6332 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6334 ;; 6335 6336 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6337 # support. Future versions do this automatically, but an explicit c++rt0.o 6338 # does not break anything, and helps significantly (at the cost of a little 6339 # extra space). 6340 freebsd2.2*) 6341 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6342 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6343 _LT_TAGVAR(hardcode_direct, $1)=yes 6344 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6345 ;; 6346 6347 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6348 freebsd2.*) 6349 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6350 _LT_TAGVAR(hardcode_direct, $1)=yes 6351 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6352 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6353 ;; 6354 6355 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6356 freebsd* | dragonfly*) 6357 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6359 _LT_TAGVAR(hardcode_direct, $1)=yes 6360 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6361 ;; 6362 6363 hpux9*) 6364 if test "$GCC" = yes; then 6365 _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' 6366 else 6367 _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' 6368 fi 6369 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6370 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6371 _LT_TAGVAR(hardcode_direct, $1)=yes 6372 6373 # hardcode_minus_L: Not really in the search PATH, 6374 # but as the default location of the library. 6375 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6376 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6377 ;; 6378 6379 hpux10*) 6380 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6381 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6382 else 6383 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6384 fi 6385 if test "$with_gnu_ld" = no; then 6386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6387 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6388 _LT_TAGVAR(hardcode_direct, $1)=yes 6389 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6390 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6391 # hardcode_minus_L: Not really in the search PATH, 6392 # but as the default location of the library. 6393 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6394 fi 6395 ;; 6396 6397 hpux11*) 6398 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6399 case $host_cpu in 6400 hppa*64*) 6401 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6402 ;; 6403 ia64*) 6404 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6405 ;; 6406 *) 6407 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6408 ;; 6409 esac 6410 else 6411 case $host_cpu in 6412 hppa*64*) 6413 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6414 ;; 6415 ia64*) 6416 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6417 ;; 6418 *) 6419 m4_if($1, [], [ 6420 # Older versions of the 11.00 compiler do not understand -b yet 6421 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6422 _LT_LINKER_OPTION([if $CC understands -b], 6423 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6424 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6425 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6426 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6427 ;; 6428 esac 6429 fi 6430 if test "$with_gnu_ld" = no; then 6431 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6432 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6433 6434 case $host_cpu in 6435 hppa*64*|ia64*) 6436 _LT_TAGVAR(hardcode_direct, $1)=no 6437 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6438 ;; 6439 *) 6440 _LT_TAGVAR(hardcode_direct, $1)=yes 6441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6442 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6443 6444 # hardcode_minus_L: Not really in the search PATH, 6445 # but as the default location of the library. 6446 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6447 ;; 6448 esac 6449 fi 6450 ;; 6451 6452 irix5* | irix6* | nonstopux*) 6453 if test "$GCC" = yes; then 6454 _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' 6455 # Try to use the -exported_symbol ld option, if it does not 6456 # work, assume that -exports_file does not work either and 6457 # implicitly export all symbols. 6458 # This should be the same for all languages, so no per-tag cache variable. 6459 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6460 [lt_cv_irix_exported_symbol], 6461 [save_LDFLAGS="$LDFLAGS" 6462 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6463 AC_LINK_IFELSE( 6464 [AC_LANG_SOURCE( 6465 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6466 [C++], [[int foo (void) { return 0; }]], 6467 [Fortran 77], [[ 6468 subroutine foo 6469 end]], 6470 [Fortran], [[ 6471 subroutine foo 6472 end]])])], 6473 [lt_cv_irix_exported_symbol=yes], 6474 [lt_cv_irix_exported_symbol=no]) 6475 LDFLAGS="$save_LDFLAGS"]) 6476 if test "$lt_cv_irix_exported_symbol" = yes; then 6477 _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' 6478 fi 6479 else 6480 _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' 6481 _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' 6482 fi 6483 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6484 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6485 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6486 _LT_TAGVAR(inherit_rpath, $1)=yes 6487 _LT_TAGVAR(link_all_deplibs, $1)=yes 6488 ;; 6489 6490 netbsd*) 6491 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6492 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6493 else 6494 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6495 fi 6496 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6497 _LT_TAGVAR(hardcode_direct, $1)=yes 6498 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6499 ;; 6500 6501 newsos6) 6502 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6503 _LT_TAGVAR(hardcode_direct, $1)=yes 6504 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6505 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6506 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6507 ;; 6508 6509 *nto* | *qnx*) 6510 ;; 6511 6512 openbsd*) 6513 if test -f /usr/libexec/ld.so; then 6514 _LT_TAGVAR(hardcode_direct, $1)=yes 6515 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6516 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6517 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6518 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6519 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6520 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6521 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6522 else 6523 case $host_os in 6524 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6525 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6526 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6527 ;; 6528 *) 6529 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6530 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6531 ;; 6532 esac 6533 fi 6534 else 6535 _LT_TAGVAR(ld_shlibs, $1)=no 6536 fi 6537 ;; 6538 6539 os2*) 6540 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6541 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6542 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6543 _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' 6544 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6545 ;; 6546 6547 osf3*) 6548 if test "$GCC" = yes; then 6549 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6550 _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' 6551 else 6552 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6553 _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' 6554 fi 6555 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6556 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6557 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6558 ;; 6559 6560 osf4* | osf5*) # as osf3* with the addition of -msym flag 6561 if test "$GCC" = yes; then 6562 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6563 _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' 6564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6565 else 6566 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6567 _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' 6568 _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~ 6569 $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' 6570 6571 # Both c and cxx compiler support -rpath directly 6572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6573 fi 6574 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6575 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6576 ;; 6577 6578 solaris*) 6579 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6580 if test "$GCC" = yes; then 6581 wlarc='${wl}' 6582 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6583 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6584 $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' 6585 else 6586 case `$CC -V 2>&1` in 6587 *"Compilers 5.0"*) 6588 wlarc='' 6589 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6590 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6591 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6592 ;; 6593 *) 6594 wlarc='${wl}' 6595 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6596 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6597 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6598 ;; 6599 esac 6600 fi 6601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6602 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6603 case $host_os in 6604 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6605 *) 6606 # The compiler driver will combine and reorder linker options, 6607 # but understands `-z linker_flag'. GCC discards it without `$wl', 6608 # but is careful enough not to reorder. 6609 # Supported since Solaris 2.6 (maybe 2.5.1?) 6610 if test "$GCC" = yes; then 6611 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6612 else 6613 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6614 fi 6615 ;; 6616 esac 6617 _LT_TAGVAR(link_all_deplibs, $1)=yes 6618 ;; 6619 6620 sunos4*) 6621 if test "x$host_vendor" = xsequent; then 6622 # Use $CC to link under sequent, because it throws in some extra .o 6623 # files that make .init and .fini sections work. 6624 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6625 else 6626 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6627 fi 6628 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6629 _LT_TAGVAR(hardcode_direct, $1)=yes 6630 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6631 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6632 ;; 6633 6634 sysv4) 6635 case $host_vendor in 6636 sni) 6637 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6638 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6639 ;; 6640 siemens) 6641 ## LD is ld it makes a PLAMLIB 6642 ## CC just makes a GrossModule. 6643 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6644 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6645 _LT_TAGVAR(hardcode_direct, $1)=no 6646 ;; 6647 motorola) 6648 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6649 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6650 ;; 6651 esac 6652 runpath_var='LD_RUN_PATH' 6653 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6654 ;; 6655 6656 sysv4.3*) 6657 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6659 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6660 ;; 6661 6662 sysv4*MP*) 6663 if test -d /usr/nec; then 6664 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6665 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6666 runpath_var=LD_RUN_PATH 6667 hardcode_runpath_var=yes 6668 _LT_TAGVAR(ld_shlibs, $1)=yes 6669 fi 6670 ;; 6671 6672 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6673 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6674 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6676 runpath_var='LD_RUN_PATH' 6677 6678 if test "$GCC" = yes; then 6679 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6680 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6681 else 6682 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6683 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6684 fi 6685 ;; 6686 6687 sysv5* | sco3.2v5* | sco5v6*) 6688 # Note: We can NOT use -z defs as we might desire, because we do not 6689 # link with -lc, and that would cause any symbols used from libc to 6690 # always be unresolved, which means just about no library would 6691 # ever link correctly. If we're not using GNU ld we use -z text 6692 # though, which does catch some bad symbols but isn't as heavy-handed 6693 # as -z defs. 6694 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6695 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6696 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6697 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6699 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6700 _LT_TAGVAR(link_all_deplibs, $1)=yes 6701 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6702 runpath_var='LD_RUN_PATH' 6703 6704 if test "$GCC" = yes; then 6705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6706 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6707 else 6708 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6709 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6710 fi 6711 ;; 6712 6713 uts4*) 6714 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6716 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6717 ;; 6718 6719 *) 6720 _LT_TAGVAR(ld_shlibs, $1)=no 6721 ;; 6722 esac 6723 6724 if test x$host_vendor = xsni; then 6725 case $host in 6726 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6727 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6728 ;; 6729 esac 6730 fi 6731 fi 6732]) 6733AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6734test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6735 6736_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6737 6738_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6739_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6740_LT_DECL([], [extract_expsyms_cmds], [2], 6741 [The commands to extract the exported symbol list from a shared archive]) 6742 6743# 6744# Do we need to explicitly link libc? 6745# 6746case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6747x|xyes) 6748 # Assume -lc should be added 6749 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6750 6751 if test "$enable_shared" = yes && test "$GCC" = yes; then 6752 case $_LT_TAGVAR(archive_cmds, $1) in 6753 *'~'*) 6754 # FIXME: we may have to deal with multi-command sequences. 6755 ;; 6756 '$CC '*) 6757 # Test whether the compiler implicitly links with -lc since on some 6758 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6759 # to ld, don't add -lc before -lgcc. 6760 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6761 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6762 [$RM conftest* 6763 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6764 6765 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6766 soname=conftest 6767 lib=conftest 6768 libobjs=conftest.$ac_objext 6769 deplibs= 6770 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6771 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6772 compiler_flags=-v 6773 linker_flags=-v 6774 verstring= 6775 output_objdir=. 6776 libname=conftest 6777 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6778 _LT_TAGVAR(allow_undefined_flag, $1)= 6779 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6780 then 6781 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6782 else 6783 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6784 fi 6785 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6786 else 6787 cat conftest.err 1>&5 6788 fi 6789 $RM conftest* 6790 ]) 6791 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6792 ;; 6793 esac 6794 fi 6795 ;; 6796esac 6797 6798_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6799 [Whether or not to add -lc for building shared libraries]) 6800_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6801 [enable_shared_with_static_runtimes], [0], 6802 [Whether or not to disallow shared libs when runtime libs are static]) 6803_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6804 [Compiler flag to allow reflexive dlopens]) 6805_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6806 [Compiler flag to generate shared objects directly from archives]) 6807_LT_TAGDECL([], [compiler_needs_object], [1], 6808 [Whether the compiler copes with passing no objects directly]) 6809_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6810 [Create an old-style archive from a shared archive]) 6811_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6812 [Create a temporary old-style archive to link instead of a shared archive]) 6813_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6814_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6815_LT_TAGDECL([], [module_cmds], [2], 6816 [Commands used to build a loadable module if different from building 6817 a shared archive.]) 6818_LT_TAGDECL([], [module_expsym_cmds], [2]) 6819_LT_TAGDECL([], [with_gnu_ld], [1], 6820 [Whether we are building with GNU ld or not]) 6821_LT_TAGDECL([], [allow_undefined_flag], [1], 6822 [Flag that allows shared libraries with undefined symbols to be built]) 6823_LT_TAGDECL([], [no_undefined_flag], [1], 6824 [Flag that enforces no undefined symbols]) 6825_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6826 [Flag to hardcode $libdir into a binary during linking. 6827 This must work even if $libdir does not exist]) 6828_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6829 [Whether we need a single "-rpath" flag with a separated argument]) 6830_LT_TAGDECL([], [hardcode_direct], [0], 6831 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6832 DIR into the resulting binary]) 6833_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6834 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6835 DIR into the resulting binary and the resulting library dependency is 6836 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6837 library is relocated]) 6838_LT_TAGDECL([], [hardcode_minus_L], [0], 6839 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6840 into the resulting binary]) 6841_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6842 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6843 into the resulting binary]) 6844_LT_TAGDECL([], [hardcode_automatic], [0], 6845 [Set to "yes" if building a shared library automatically hardcodes DIR 6846 into the library and all subsequent libraries and executables linked 6847 against it]) 6848_LT_TAGDECL([], [inherit_rpath], [0], 6849 [Set to yes if linker adds runtime paths of dependent libraries 6850 to runtime path list]) 6851_LT_TAGDECL([], [link_all_deplibs], [0], 6852 [Whether libtool must link a program against all its dependency libraries]) 6853_LT_TAGDECL([], [always_export_symbols], [0], 6854 [Set to "yes" if exported symbols are required]) 6855_LT_TAGDECL([], [export_symbols_cmds], [2], 6856 [The commands to list exported symbols]) 6857_LT_TAGDECL([], [exclude_expsyms], [1], 6858 [Symbols that should not be listed in the preloaded symbols]) 6859_LT_TAGDECL([], [include_expsyms], [1], 6860 [Symbols that must always be exported]) 6861_LT_TAGDECL([], [prelink_cmds], [2], 6862 [Commands necessary for linking programs (against libraries) with templates]) 6863_LT_TAGDECL([], [postlink_cmds], [2], 6864 [Commands necessary for finishing linking programs]) 6865_LT_TAGDECL([], [file_list_spec], [1], 6866 [Specify filename containing input files]) 6867dnl FIXME: Not yet implemented 6868dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6869dnl [Compiler flag to generate thread safe objects]) 6870])# _LT_LINKER_SHLIBS 6871 6872 6873# _LT_LANG_C_CONFIG([TAG]) 6874# ------------------------ 6875# Ensure that the configuration variables for a C compiler are suitably 6876# defined. These variables are subsequently used by _LT_CONFIG to write 6877# the compiler configuration to `libtool'. 6878m4_defun([_LT_LANG_C_CONFIG], 6879[m4_require([_LT_DECL_EGREP])dnl 6880lt_save_CC="$CC" 6881AC_LANG_PUSH(C) 6882 6883# Source file extension for C test sources. 6884ac_ext=c 6885 6886# Object file extension for compiled C test sources. 6887objext=o 6888_LT_TAGVAR(objext, $1)=$objext 6889 6890# Code to be used in simple compile tests 6891lt_simple_compile_test_code="int some_variable = 0;" 6892 6893# Code to be used in simple link tests 6894lt_simple_link_test_code='int main(){return(0);}' 6895 6896_LT_TAG_COMPILER 6897# Save the default compiler, since it gets overwritten when the other 6898# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6899compiler_DEFAULT=$CC 6900 6901# save warnings/boilerplate of simple test code 6902_LT_COMPILER_BOILERPLATE 6903_LT_LINKER_BOILERPLATE 6904 6905if test -n "$compiler"; then 6906 _LT_COMPILER_NO_RTTI($1) 6907 _LT_COMPILER_PIC($1) 6908 _LT_COMPILER_C_O($1) 6909 _LT_COMPILER_FILE_LOCKS($1) 6910 _LT_LINKER_SHLIBS($1) 6911 _LT_SYS_DYNAMIC_LINKER($1) 6912 _LT_LINKER_HARDCODE_LIBPATH($1) 6913 LT_SYS_DLOPEN_SELF 6914 _LT_CMD_STRIPLIB 6915 6916 # Report which library types will actually be built 6917 AC_MSG_CHECKING([if libtool supports shared libraries]) 6918 AC_MSG_RESULT([$can_build_shared]) 6919 6920 AC_MSG_CHECKING([whether to build shared libraries]) 6921 test "$can_build_shared" = "no" && enable_shared=no 6922 6923 # On AIX, shared libraries and static libraries use the same namespace, and 6924 # are all built from PIC. 6925 case $host_os in 6926 aix3*) 6927 test "$enable_shared" = yes && enable_static=no 6928 if test -n "$RANLIB"; then 6929 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6930 postinstall_cmds='$RANLIB $lib' 6931 fi 6932 ;; 6933 6934 aix[[4-9]]*) 6935 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6936 test "$enable_shared" = yes && enable_static=no 6937 fi 6938 ;; 6939 esac 6940 AC_MSG_RESULT([$enable_shared]) 6941 6942 AC_MSG_CHECKING([whether to build static libraries]) 6943 # Make sure either enable_shared or enable_static is yes. 6944 test "$enable_shared" = yes || enable_static=yes 6945 AC_MSG_RESULT([$enable_static]) 6946 6947 _LT_CONFIG($1) 6948fi 6949AC_LANG_POP 6950CC="$lt_save_CC" 6951])# _LT_LANG_C_CONFIG 6952 6953 6954# _LT_LANG_CXX_CONFIG([TAG]) 6955# -------------------------- 6956# Ensure that the configuration variables for a C++ compiler are suitably 6957# defined. These variables are subsequently used by _LT_CONFIG to write 6958# the compiler configuration to `libtool'. 6959m4_defun([_LT_LANG_CXX_CONFIG], 6960[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6961m4_require([_LT_DECL_EGREP])dnl 6962m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6963if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6964 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6965 (test "X$CXX" != "Xg++"))) ; then 6966 AC_PROG_CXXCPP 6967else 6968 _lt_caught_CXX_error=yes 6969fi 6970 6971AC_LANG_PUSH(C++) 6972_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6973_LT_TAGVAR(allow_undefined_flag, $1)= 6974_LT_TAGVAR(always_export_symbols, $1)=no 6975_LT_TAGVAR(archive_expsym_cmds, $1)= 6976_LT_TAGVAR(compiler_needs_object, $1)=no 6977_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6978_LT_TAGVAR(hardcode_direct, $1)=no 6979_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6980_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6981_LT_TAGVAR(hardcode_libdir_separator, $1)= 6982_LT_TAGVAR(hardcode_minus_L, $1)=no 6983_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6984_LT_TAGVAR(hardcode_automatic, $1)=no 6985_LT_TAGVAR(inherit_rpath, $1)=no 6986_LT_TAGVAR(module_cmds, $1)= 6987_LT_TAGVAR(module_expsym_cmds, $1)= 6988_LT_TAGVAR(link_all_deplibs, $1)=unknown 6989_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6990_LT_TAGVAR(reload_flag, $1)=$reload_flag 6991_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6992_LT_TAGVAR(no_undefined_flag, $1)= 6993_LT_TAGVAR(whole_archive_flag_spec, $1)= 6994_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6995 6996# Source file extension for C++ test sources. 6997ac_ext=cpp 6998 6999# Object file extension for compiled C++ test sources. 7000objext=o 7001_LT_TAGVAR(objext, $1)=$objext 7002 7003# No sense in running all these tests if we already determined that 7004# the CXX compiler isn't working. Some variables (like enable_shared) 7005# are currently assumed to apply to all compilers on this platform, 7006# and will be corrupted by setting them based on a non-working compiler. 7007if test "$_lt_caught_CXX_error" != yes; then 7008 # Code to be used in simple compile tests 7009 lt_simple_compile_test_code="int some_variable = 0;" 7010 7011 # Code to be used in simple link tests 7012 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7013 7014 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7015 _LT_TAG_COMPILER 7016 7017 # save warnings/boilerplate of simple test code 7018 _LT_COMPILER_BOILERPLATE 7019 _LT_LINKER_BOILERPLATE 7020 7021 # Allow CC to be a program name with arguments. 7022 lt_save_CC=$CC 7023 lt_save_CFLAGS=$CFLAGS 7024 lt_save_LD=$LD 7025 lt_save_GCC=$GCC 7026 GCC=$GXX 7027 lt_save_with_gnu_ld=$with_gnu_ld 7028 lt_save_path_LD=$lt_cv_path_LD 7029 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7030 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7031 else 7032 $as_unset lt_cv_prog_gnu_ld 7033 fi 7034 if test -n "${lt_cv_path_LDCXX+set}"; then 7035 lt_cv_path_LD=$lt_cv_path_LDCXX 7036 else 7037 $as_unset lt_cv_path_LD 7038 fi 7039 test -z "${LDCXX+set}" || LD=$LDCXX 7040 CC=${CXX-"c++"} 7041 CFLAGS=$CXXFLAGS 7042 compiler=$CC 7043 _LT_TAGVAR(compiler, $1)=$CC 7044 _LT_CC_BASENAME([$compiler]) 7045 7046 if test -n "$compiler"; then 7047 # We don't want -fno-exception when compiling C++ code, so set the 7048 # no_builtin_flag separately 7049 if test "$GXX" = yes; then 7050 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7051 else 7052 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7053 fi 7054 7055 if test "$GXX" = yes; then 7056 # Set up default GNU C++ configuration 7057 7058 LT_PATH_LD 7059 7060 # Check if GNU C++ uses GNU ld as the underlying linker, since the 7061 # archiving commands below assume that GNU ld is being used. 7062 if test "$with_gnu_ld" = yes; then 7063 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7064 _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' 7065 7066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7067 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7068 7069 # If archive_cmds runs LD, not CC, wlarc should be empty 7070 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7071 # investigate it a little bit more. (MM) 7072 wlarc='${wl}' 7073 7074 # ancient GNU ld didn't support --whole-archive et. al. 7075 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7076 $GREP 'no-whole-archive' > /dev/null; then 7077 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7078 else 7079 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7080 fi 7081 else 7082 with_gnu_ld=no 7083 wlarc= 7084 7085 # A generic and very simple default shared library creation 7086 # command for GNU C++ for the case where it uses the native 7087 # linker, instead of GNU ld. If possible, this setting should 7088 # overridden to take advantage of the native linker features on 7089 # the platform it is being used on. 7090 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7091 fi 7092 7093 # Commands to make compiler produce verbose output that lists 7094 # what "hidden" libraries, object files and flags are used when 7095 # linking a shared library. 7096 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7097 7098 else 7099 GXX=no 7100 with_gnu_ld=no 7101 wlarc= 7102 fi 7103 7104 # PORTME: fill in a description of your system's C++ link characteristics 7105 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7106 _LT_TAGVAR(ld_shlibs, $1)=yes 7107 case $host_os in 7108 aix3*) 7109 # FIXME: insert proper C++ library support 7110 _LT_TAGVAR(ld_shlibs, $1)=no 7111 ;; 7112 aix[[4-9]]*) 7113 if test "$host_cpu" = ia64; then 7114 # On IA64, the linker does run time linking by default, so we don't 7115 # have to do anything special. 7116 aix_use_runtimelinking=no 7117 exp_sym_flag='-Bexport' 7118 no_entry_flag="" 7119 else 7120 aix_use_runtimelinking=no 7121 7122 # Test if we are trying to use run time linking or normal 7123 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7124 # need to do runtime linking. 7125 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7126 for ld_flag in $LDFLAGS; do 7127 case $ld_flag in 7128 *-brtl*) 7129 aix_use_runtimelinking=yes 7130 break 7131 ;; 7132 esac 7133 done 7134 ;; 7135 esac 7136 7137 exp_sym_flag='-bexport' 7138 no_entry_flag='-bnoentry' 7139 fi 7140 7141 # When large executables or shared objects are built, AIX ld can 7142 # have problems creating the table of contents. If linking a library 7143 # or program results in "error TOC overflow" add -mminimal-toc to 7144 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7145 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7146 7147 _LT_TAGVAR(archive_cmds, $1)='' 7148 _LT_TAGVAR(hardcode_direct, $1)=yes 7149 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7150 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7151 _LT_TAGVAR(link_all_deplibs, $1)=yes 7152 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7153 7154 if test "$GXX" = yes; then 7155 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7156 # We only want to do this on AIX 4.2 and lower, the check 7157 # below for broken collect2 doesn't work under 4.3+ 7158 collect2name=`${CC} -print-prog-name=collect2` 7159 if test -f "$collect2name" && 7160 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7161 then 7162 # We have reworked collect2 7163 : 7164 else 7165 # We have old collect2 7166 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7167 # It fails to find uninstalled libraries when the uninstalled 7168 # path is not listed in the libpath. Setting hardcode_minus_L 7169 # to unsupported forces relinking 7170 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7172 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7173 fi 7174 esac 7175 shared_flag='-shared' 7176 if test "$aix_use_runtimelinking" = yes; then 7177 shared_flag="$shared_flag "'${wl}-G' 7178 fi 7179 else 7180 # not using gcc 7181 if test "$host_cpu" = ia64; then 7182 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7183 # chokes on -Wl,-G. The following line is correct: 7184 shared_flag='-G' 7185 else 7186 if test "$aix_use_runtimelinking" = yes; then 7187 shared_flag='${wl}-G' 7188 else 7189 shared_flag='${wl}-bM:SRE' 7190 fi 7191 fi 7192 fi 7193 7194 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7195 # It seems that -bexpall does not export symbols beginning with 7196 # underscore (_), so it is better to generate a list of symbols to 7197 # export. 7198 _LT_TAGVAR(always_export_symbols, $1)=yes 7199 if test "$aix_use_runtimelinking" = yes; then 7200 # Warning - without using the other runtime loading flags (-brtl), 7201 # -berok will link without error, but may produce a broken library. 7202 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7203 # Determine the default libpath from the value encoded in an empty 7204 # executable. 7205 _LT_SYS_MODULE_PATH_AIX([$1]) 7206 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7207 7208 _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" 7209 else 7210 if test "$host_cpu" = ia64; then 7211 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7212 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7213 _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" 7214 else 7215 # Determine the default libpath from the value encoded in an 7216 # empty executable. 7217 _LT_SYS_MODULE_PATH_AIX([$1]) 7218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7219 # Warning - without using the other run time loading flags, 7220 # -berok will link without error, but may produce a broken library. 7221 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7222 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7223 if test "$with_gnu_ld" = yes; then 7224 # We only use this code for GNU lds that support --whole-archive. 7225 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7226 else 7227 # Exported symbols can be pulled into shared objects from archives 7228 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7229 fi 7230 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7231 # This is similar to how AIX traditionally builds its shared 7232 # libraries. 7233 _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' 7234 fi 7235 fi 7236 ;; 7237 7238 beos*) 7239 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7240 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7241 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7242 # support --undefined. This deserves some investigation. FIXME 7243 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7244 else 7245 _LT_TAGVAR(ld_shlibs, $1)=no 7246 fi 7247 ;; 7248 7249 chorus*) 7250 case $cc_basename in 7251 *) 7252 # FIXME: insert proper C++ library support 7253 _LT_TAGVAR(ld_shlibs, $1)=no 7254 ;; 7255 esac 7256 ;; 7257 7258 cygwin* | mingw* | pw32* | cegcc*) 7259 case $GXX,$cc_basename in 7260 ,cl* | no,cl*) 7261 # Native MSVC 7262 # hardcode_libdir_flag_spec is actually meaningless, as there is 7263 # no search path for DLLs. 7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7265 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7266 _LT_TAGVAR(always_export_symbols, $1)=yes 7267 _LT_TAGVAR(file_list_spec, $1)='@' 7268 # Tell ltmain to make .lib files, not .a files. 7269 libext=lib 7270 # Tell ltmain to make .dll files, not .so files. 7271 shrext_cmds=".dll" 7272 # FIXME: Setting linknames here is a bad hack. 7273 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7274 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7275 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7276 else 7277 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7278 fi~ 7279 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7280 linknames=' 7281 # The linker will not automatically build a static lib if we build a DLL. 7282 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7283 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7284 # Don't use ranlib 7285 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7286 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7287 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7288 case $lt_outputfile in 7289 *.exe|*.EXE) ;; 7290 *) 7291 lt_outputfile="$lt_outputfile.exe" 7292 lt_tool_outputfile="$lt_tool_outputfile.exe" 7293 ;; 7294 esac~ 7295 func_to_tool_file "$lt_outputfile"~ 7296 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7297 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7298 $RM "$lt_outputfile.manifest"; 7299 fi' 7300 ;; 7301 *) 7302 # g++ 7303 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7304 # as there is no search path for DLLs. 7305 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7306 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7307 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7308 _LT_TAGVAR(always_export_symbols, $1)=no 7309 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7310 7311 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7312 _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' 7313 # If the export-symbols file already is a .def file (1st line 7314 # is EXPORTS), use it as is; otherwise, prepend... 7315 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7316 cp $export_symbols $output_objdir/$soname.def; 7317 else 7318 echo EXPORTS > $output_objdir/$soname.def; 7319 cat $export_symbols >> $output_objdir/$soname.def; 7320 fi~ 7321 $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' 7322 else 7323 _LT_TAGVAR(ld_shlibs, $1)=no 7324 fi 7325 ;; 7326 esac 7327 ;; 7328 darwin* | rhapsody*) 7329 _LT_DARWIN_LINKER_FEATURES($1) 7330 ;; 7331 7332 dgux*) 7333 case $cc_basename in 7334 ec++*) 7335 # FIXME: insert proper C++ library support 7336 _LT_TAGVAR(ld_shlibs, $1)=no 7337 ;; 7338 ghcx*) 7339 # Green Hills C++ Compiler 7340 # FIXME: insert proper C++ library support 7341 _LT_TAGVAR(ld_shlibs, $1)=no 7342 ;; 7343 *) 7344 # FIXME: insert proper C++ library support 7345 _LT_TAGVAR(ld_shlibs, $1)=no 7346 ;; 7347 esac 7348 ;; 7349 7350 freebsd2.*) 7351 # C++ shared libraries reported to be fairly broken before 7352 # switch to ELF 7353 _LT_TAGVAR(ld_shlibs, $1)=no 7354 ;; 7355 7356 freebsd-elf*) 7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7358 ;; 7359 7360 freebsd* | dragonfly*) 7361 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7362 # conventions 7363 _LT_TAGVAR(ld_shlibs, $1)=yes 7364 ;; 7365 7366 gnu*) 7367 ;; 7368 7369 haiku*) 7370 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7371 _LT_TAGVAR(link_all_deplibs, $1)=yes 7372 ;; 7373 7374 hpux9*) 7375 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7376 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7377 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7378 _LT_TAGVAR(hardcode_direct, $1)=yes 7379 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7380 # but as the default 7381 # location of the library. 7382 7383 case $cc_basename in 7384 CC*) 7385 # FIXME: insert proper C++ library support 7386 _LT_TAGVAR(ld_shlibs, $1)=no 7387 ;; 7388 aCC*) 7389 _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' 7390 # Commands to make compiler produce verbose output that lists 7391 # what "hidden" libraries, object files and flags are used when 7392 # linking a shared library. 7393 # 7394 # There doesn't appear to be a way to prevent this compiler from 7395 # explicitly linking system object files so we need to strip them 7396 # from the output so that they don't get included in the library 7397 # dependencies. 7398 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"' 7399 ;; 7400 *) 7401 if test "$GXX" = yes; then 7402 _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' 7403 else 7404 # FIXME: insert proper C++ library support 7405 _LT_TAGVAR(ld_shlibs, $1)=no 7406 fi 7407 ;; 7408 esac 7409 ;; 7410 7411 hpux10*|hpux11*) 7412 if test $with_gnu_ld = no; then 7413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7414 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7415 7416 case $host_cpu in 7417 hppa*64*|ia64*) 7418 ;; 7419 *) 7420 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7421 ;; 7422 esac 7423 fi 7424 case $host_cpu in 7425 hppa*64*|ia64*) 7426 _LT_TAGVAR(hardcode_direct, $1)=no 7427 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7428 ;; 7429 *) 7430 _LT_TAGVAR(hardcode_direct, $1)=yes 7431 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7432 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7433 # but as the default 7434 # location of the library. 7435 ;; 7436 esac 7437 7438 case $cc_basename in 7439 CC*) 7440 # FIXME: insert proper C++ library support 7441 _LT_TAGVAR(ld_shlibs, $1)=no 7442 ;; 7443 aCC*) 7444 case $host_cpu in 7445 hppa*64*) 7446 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7447 ;; 7448 ia64*) 7449 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7450 ;; 7451 *) 7452 _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' 7453 ;; 7454 esac 7455 # Commands to make compiler produce verbose output that lists 7456 # what "hidden" libraries, object files and flags are used when 7457 # linking a shared library. 7458 # 7459 # There doesn't appear to be a way to prevent this compiler from 7460 # explicitly linking system object files so we need to strip them 7461 # from the output so that they don't get included in the library 7462 # dependencies. 7463 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"' 7464 ;; 7465 *) 7466 if test "$GXX" = yes; then 7467 if test $with_gnu_ld = no; then 7468 case $host_cpu in 7469 hppa*64*) 7470 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7471 ;; 7472 ia64*) 7473 _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' 7474 ;; 7475 *) 7476 _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' 7477 ;; 7478 esac 7479 fi 7480 else 7481 # FIXME: insert proper C++ library support 7482 _LT_TAGVAR(ld_shlibs, $1)=no 7483 fi 7484 ;; 7485 esac 7486 ;; 7487 7488 interix[[3-9]]*) 7489 _LT_TAGVAR(hardcode_direct, $1)=no 7490 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7492 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7493 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7494 # Instead, shared libraries are loaded at an image base (0x10000000 by 7495 # default) and relocated if they conflict, which is a slow very memory 7496 # consuming and fragmenting process. To avoid this, we pick a random, 7497 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7498 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7499 _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' 7500 _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' 7501 ;; 7502 irix5* | irix6*) 7503 case $cc_basename in 7504 CC*) 7505 # SGI C++ 7506 _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' 7507 7508 # Archives containing C++ object files must be created using 7509 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7510 # necessary to make sure instantiated templates are included 7511 # in the archive. 7512 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7513 ;; 7514 *) 7515 if test "$GXX" = yes; then 7516 if test "$with_gnu_ld" = no; then 7517 _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' 7518 else 7519 _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' 7520 fi 7521 fi 7522 _LT_TAGVAR(link_all_deplibs, $1)=yes 7523 ;; 7524 esac 7525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7526 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7527 _LT_TAGVAR(inherit_rpath, $1)=yes 7528 ;; 7529 7530 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7531 case $cc_basename in 7532 KCC*) 7533 # Kuck and Associates, Inc. (KAI) C++ Compiler 7534 7535 # KCC will only create a shared library if the output file 7536 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7537 # to its proper name (with version) after linking. 7538 _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' 7539 _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' 7540 # Commands to make compiler produce verbose output that lists 7541 # what "hidden" libraries, object files and flags are used when 7542 # linking a shared library. 7543 # 7544 # There doesn't appear to be a way to prevent this compiler from 7545 # explicitly linking system object files so we need to strip them 7546 # from the output so that they don't get included in the library 7547 # dependencies. 7548 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"' 7549 7550 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7551 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7552 7553 # Archives containing C++ object files must be created using 7554 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7555 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7556 ;; 7557 icpc* | ecpc* ) 7558 # Intel C++ 7559 with_gnu_ld=yes 7560 # version 8.0 and above of icpc choke on multiply defined symbols 7561 # if we add $predep_objects and $postdep_objects, however 7.1 and 7562 # earlier do not add the objects themselves. 7563 case `$CC -V 2>&1` in 7564 *"Version 7."*) 7565 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7566 _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' 7567 ;; 7568 *) # Version 8.0 or newer 7569 tmp_idyn= 7570 case $host_cpu in 7571 ia64*) tmp_idyn=' -i_dynamic';; 7572 esac 7573 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7574 _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' 7575 ;; 7576 esac 7577 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7578 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7579 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7580 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7581 ;; 7582 pgCC* | pgcpp*) 7583 # Portland Group C++ compiler 7584 case `$CC -V` in 7585 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7586 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7587 rm -rf $tpldir~ 7588 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7589 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7590 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7591 rm -rf $tpldir~ 7592 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7593 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7594 $RANLIB $oldlib' 7595 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7596 rm -rf $tpldir~ 7597 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7598 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7599 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7600 rm -rf $tpldir~ 7601 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7602 $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' 7603 ;; 7604 *) # Version 6 and above use weak symbols 7605 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7606 _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' 7607 ;; 7608 esac 7609 7610 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7611 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7612 _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' 7613 ;; 7614 cxx*) 7615 # Compaq C++ 7616 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7617 _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' 7618 7619 runpath_var=LD_RUN_PATH 7620 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7621 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7622 7623 # Commands to make compiler produce verbose output that lists 7624 # what "hidden" libraries, object files and flags are used when 7625 # linking a shared library. 7626 # 7627 # There doesn't appear to be a way to prevent this compiler from 7628 # explicitly linking system object files so we need to strip them 7629 # from the output so that they don't get included in the library 7630 # dependencies. 7631 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' 7632 ;; 7633 xl* | mpixl* | bgxl*) 7634 # IBM XL 8.0 on PPC, with GNU ld 7635 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7636 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7637 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7638 if test "x$supports_anon_versioning" = xyes; then 7639 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7640 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7641 echo "local: *; };" >> $output_objdir/$libname.ver~ 7642 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7643 fi 7644 ;; 7645 *) 7646 case `$CC -V 2>&1 | sed 5q` in 7647 *Sun\ C*) 7648 # Sun C++ 5.9 7649 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7650 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7651 _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' 7652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7653 _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' 7654 _LT_TAGVAR(compiler_needs_object, $1)=yes 7655 7656 # Not sure whether something based on 7657 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7658 # would be better. 7659 output_verbose_link_cmd='func_echo_all' 7660 7661 # Archives containing C++ object files must be created using 7662 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7663 # necessary to make sure instantiated templates are included 7664 # in the archive. 7665 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7666 ;; 7667 esac 7668 ;; 7669 esac 7670 ;; 7671 7672 lynxos*) 7673 # FIXME: insert proper C++ library support 7674 _LT_TAGVAR(ld_shlibs, $1)=no 7675 ;; 7676 7677 m88k*) 7678 # FIXME: insert proper C++ library support 7679 _LT_TAGVAR(ld_shlibs, $1)=no 7680 ;; 7681 7682 mvs*) 7683 case $cc_basename in 7684 cxx*) 7685 # FIXME: insert proper C++ library support 7686 _LT_TAGVAR(ld_shlibs, $1)=no 7687 ;; 7688 *) 7689 # FIXME: insert proper C++ library support 7690 _LT_TAGVAR(ld_shlibs, $1)=no 7691 ;; 7692 esac 7693 ;; 7694 7695 netbsd*) 7696 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7697 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7698 wlarc= 7699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7700 _LT_TAGVAR(hardcode_direct, $1)=yes 7701 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7702 fi 7703 # Workaround some broken pre-1.5 toolchains 7704 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7705 ;; 7706 7707 *nto* | *qnx*) 7708 _LT_TAGVAR(ld_shlibs, $1)=yes 7709 ;; 7710 7711 openbsd2*) 7712 # C++ shared libraries are fairly broken 7713 _LT_TAGVAR(ld_shlibs, $1)=no 7714 ;; 7715 7716 openbsd*) 7717 if test -f /usr/libexec/ld.so; then 7718 _LT_TAGVAR(hardcode_direct, $1)=yes 7719 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7720 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7722 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7723 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7724 _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' 7725 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7726 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7727 fi 7728 output_verbose_link_cmd=func_echo_all 7729 else 7730 _LT_TAGVAR(ld_shlibs, $1)=no 7731 fi 7732 ;; 7733 7734 osf3* | osf4* | osf5*) 7735 case $cc_basename in 7736 KCC*) 7737 # Kuck and Associates, Inc. (KAI) C++ Compiler 7738 7739 # KCC will only create a shared library if the output file 7740 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7741 # to its proper name (with version) after linking. 7742 _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' 7743 7744 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7745 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7746 7747 # Archives containing C++ object files must be created using 7748 # the KAI C++ compiler. 7749 case $host in 7750 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7751 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7752 esac 7753 ;; 7754 RCC*) 7755 # Rational C++ 2.4.1 7756 # FIXME: insert proper C++ library support 7757 _LT_TAGVAR(ld_shlibs, $1)=no 7758 ;; 7759 cxx*) 7760 case $host in 7761 osf3*) 7762 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7763 _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' 7764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7765 ;; 7766 *) 7767 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7768 _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' 7769 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7770 echo "-hidden">> $lib.exp~ 7771 $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~ 7772 $RM $lib.exp' 7773 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7774 ;; 7775 esac 7776 7777 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7778 7779 # Commands to make compiler produce verbose output that lists 7780 # what "hidden" libraries, object files and flags are used when 7781 # linking a shared library. 7782 # 7783 # There doesn't appear to be a way to prevent this compiler from 7784 # explicitly linking system object files so we need to strip them 7785 # from the output so that they don't get included in the library 7786 # dependencies. 7787 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"' 7788 ;; 7789 *) 7790 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7791 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7792 case $host in 7793 osf3*) 7794 _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' 7795 ;; 7796 *) 7797 _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' 7798 ;; 7799 esac 7800 7801 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7802 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7803 7804 # Commands to make compiler produce verbose output that lists 7805 # what "hidden" libraries, object files and flags are used when 7806 # linking a shared library. 7807 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7808 7809 else 7810 # FIXME: insert proper C++ library support 7811 _LT_TAGVAR(ld_shlibs, $1)=no 7812 fi 7813 ;; 7814 esac 7815 ;; 7816 7817 psos*) 7818 # FIXME: insert proper C++ library support 7819 _LT_TAGVAR(ld_shlibs, $1)=no 7820 ;; 7821 7822 sunos4*) 7823 case $cc_basename in 7824 CC*) 7825 # Sun C++ 4.x 7826 # FIXME: insert proper C++ library support 7827 _LT_TAGVAR(ld_shlibs, $1)=no 7828 ;; 7829 lcc*) 7830 # Lucid 7831 # FIXME: insert proper C++ library support 7832 _LT_TAGVAR(ld_shlibs, $1)=no 7833 ;; 7834 *) 7835 # FIXME: insert proper C++ library support 7836 _LT_TAGVAR(ld_shlibs, $1)=no 7837 ;; 7838 esac 7839 ;; 7840 7841 solaris*) 7842 case $cc_basename in 7843 CC* | sunCC*) 7844 # Sun C++ 4.2, 5.x and Centerline C++ 7845 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7846 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7847 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7848 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7849 $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' 7850 7851 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7852 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7853 case $host_os in 7854 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7855 *) 7856 # The compiler driver will combine and reorder linker options, 7857 # but understands `-z linker_flag'. 7858 # Supported since Solaris 2.6 (maybe 2.5.1?) 7859 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7860 ;; 7861 esac 7862 _LT_TAGVAR(link_all_deplibs, $1)=yes 7863 7864 output_verbose_link_cmd='func_echo_all' 7865 7866 # Archives containing C++ object files must be created using 7867 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7868 # necessary to make sure instantiated templates are included 7869 # in the archive. 7870 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7871 ;; 7872 gcx*) 7873 # Green Hills C++ Compiler 7874 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7875 7876 # The C++ compiler must be used to create the archive. 7877 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7878 ;; 7879 *) 7880 # GNU C++ compiler with Solaris linker 7881 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7882 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7883 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7884 _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' 7885 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7886 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7887 7888 # Commands to make compiler produce verbose output that lists 7889 # what "hidden" libraries, object files and flags are used when 7890 # linking a shared library. 7891 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7892 else 7893 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7894 # platform. 7895 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7896 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7897 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7898 7899 # Commands to make compiler produce verbose output that lists 7900 # what "hidden" libraries, object files and flags are used when 7901 # linking a shared library. 7902 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7903 fi 7904 7905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7906 case $host_os in 7907 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7908 *) 7909 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7910 ;; 7911 esac 7912 fi 7913 ;; 7914 esac 7915 ;; 7916 7917 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7918 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7919 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7920 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7921 runpath_var='LD_RUN_PATH' 7922 7923 case $cc_basename in 7924 CC*) 7925 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7926 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7927 ;; 7928 *) 7929 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7930 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7931 ;; 7932 esac 7933 ;; 7934 7935 sysv5* | sco3.2v5* | sco5v6*) 7936 # Note: We can NOT use -z defs as we might desire, because we do not 7937 # link with -lc, and that would cause any symbols used from libc to 7938 # always be unresolved, which means just about no library would 7939 # ever link correctly. If we're not using GNU ld we use -z text 7940 # though, which does catch some bad symbols but isn't as heavy-handed 7941 # as -z defs. 7942 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7943 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7944 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7945 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7947 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7948 _LT_TAGVAR(link_all_deplibs, $1)=yes 7949 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7950 runpath_var='LD_RUN_PATH' 7951 7952 case $cc_basename in 7953 CC*) 7954 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7955 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7956 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7957 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7958 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7959 '"$_LT_TAGVAR(reload_cmds, $1)" 7960 ;; 7961 *) 7962 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7963 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7964 ;; 7965 esac 7966 ;; 7967 7968 tandem*) 7969 case $cc_basename in 7970 NCC*) 7971 # NonStop-UX NCC 3.20 7972 # FIXME: insert proper C++ library support 7973 _LT_TAGVAR(ld_shlibs, $1)=no 7974 ;; 7975 *) 7976 # FIXME: insert proper C++ library support 7977 _LT_TAGVAR(ld_shlibs, $1)=no 7978 ;; 7979 esac 7980 ;; 7981 7982 vxworks*) 7983 # FIXME: insert proper C++ library support 7984 _LT_TAGVAR(ld_shlibs, $1)=no 7985 ;; 7986 7987 *) 7988 # FIXME: insert proper C++ library support 7989 _LT_TAGVAR(ld_shlibs, $1)=no 7990 ;; 7991 esac 7992 7993 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7994 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7995 7996 _LT_TAGVAR(GCC, $1)="$GXX" 7997 _LT_TAGVAR(LD, $1)="$LD" 7998 7999 ## CAVEAT EMPTOR: 8000 ## There is no encapsulation within the following macros, do not change 8001 ## the running order or otherwise move them around unless you know exactly 8002 ## what you are doing... 8003 _LT_SYS_HIDDEN_LIBDEPS($1) 8004 _LT_COMPILER_PIC($1) 8005 _LT_COMPILER_C_O($1) 8006 _LT_COMPILER_FILE_LOCKS($1) 8007 _LT_LINKER_SHLIBS($1) 8008 _LT_SYS_DYNAMIC_LINKER($1) 8009 _LT_LINKER_HARDCODE_LIBPATH($1) 8010 8011 _LT_CONFIG($1) 8012 fi # test -n "$compiler" 8013 8014 CC=$lt_save_CC 8015 CFLAGS=$lt_save_CFLAGS 8016 LDCXX=$LD 8017 LD=$lt_save_LD 8018 GCC=$lt_save_GCC 8019 with_gnu_ld=$lt_save_with_gnu_ld 8020 lt_cv_path_LDCXX=$lt_cv_path_LD 8021 lt_cv_path_LD=$lt_save_path_LD 8022 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8023 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8024fi # test "$_lt_caught_CXX_error" != yes 8025 8026AC_LANG_POP 8027])# _LT_LANG_CXX_CONFIG 8028 8029 8030# _LT_FUNC_STRIPNAME_CNF 8031# ---------------------- 8032# func_stripname_cnf prefix suffix name 8033# strip PREFIX and SUFFIX off of NAME. 8034# PREFIX and SUFFIX must not contain globbing or regex special 8035# characters, hashes, percent signs, but SUFFIX may contain a leading 8036# dot (in which case that matches only a dot). 8037# 8038# This function is identical to the (non-XSI) version of func_stripname, 8039# except this one can be used by m4 code that may be executed by configure, 8040# rather than the libtool script. 8041m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 8042AC_REQUIRE([_LT_DECL_SED]) 8043AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 8044func_stripname_cnf () 8045{ 8046 case ${2} in 8047 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8048 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8049 esac 8050} # func_stripname_cnf 8051])# _LT_FUNC_STRIPNAME_CNF 8052 8053# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8054# --------------------------------- 8055# Figure out "hidden" library dependencies from verbose 8056# compiler output when linking a shared library. 8057# Parse the compiler output and extract the necessary 8058# objects, libraries and library flags. 8059m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8060[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8061AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8062# Dependencies to place before and after the object being linked: 8063_LT_TAGVAR(predep_objects, $1)= 8064_LT_TAGVAR(postdep_objects, $1)= 8065_LT_TAGVAR(predeps, $1)= 8066_LT_TAGVAR(postdeps, $1)= 8067_LT_TAGVAR(compiler_lib_search_path, $1)= 8068 8069dnl we can't use the lt_simple_compile_test_code here, 8070dnl because it contains code intended for an executable, 8071dnl not a library. It's possible we should let each 8072dnl tag define a new lt_????_link_test_code variable, 8073dnl but it's only used here... 8074m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8075int a; 8076void foo (void) { a = 0; } 8077_LT_EOF 8078], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8079class Foo 8080{ 8081public: 8082 Foo (void) { a = 0; } 8083private: 8084 int a; 8085}; 8086_LT_EOF 8087], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8088 subroutine foo 8089 implicit none 8090 integer*4 a 8091 a=0 8092 return 8093 end 8094_LT_EOF 8095], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8096 subroutine foo 8097 implicit none 8098 integer a 8099 a=0 8100 return 8101 end 8102_LT_EOF 8103], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8104public class foo { 8105 private int a; 8106 public void bar (void) { 8107 a = 0; 8108 } 8109}; 8110_LT_EOF 8111], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8112package foo 8113func foo() { 8114} 8115_LT_EOF 8116]) 8117 8118_lt_libdeps_save_CFLAGS=$CFLAGS 8119case "$CC $CFLAGS " in #( 8120*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8121*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8122*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8123esac 8124 8125dnl Parse the compiler output and extract the necessary 8126dnl objects, libraries and library flags. 8127if AC_TRY_EVAL(ac_compile); then 8128 # Parse the compiler output and extract the necessary 8129 # objects, libraries and library flags. 8130 8131 # Sentinel used to keep track of whether or not we are before 8132 # the conftest object file. 8133 pre_test_object_deps_done=no 8134 8135 for p in `eval "$output_verbose_link_cmd"`; do 8136 case ${prev}${p} in 8137 8138 -L* | -R* | -l*) 8139 # Some compilers place space between "-{L,R}" and the path. 8140 # Remove the space. 8141 if test $p = "-L" || 8142 test $p = "-R"; then 8143 prev=$p 8144 continue 8145 fi 8146 8147 # Expand the sysroot to ease extracting the directories later. 8148 if test -z "$prev"; then 8149 case $p in 8150 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8151 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8152 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8153 esac 8154 fi 8155 case $p in 8156 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8157 esac 8158 if test "$pre_test_object_deps_done" = no; then 8159 case ${prev} in 8160 -L | -R) 8161 # Internal compiler library paths should come after those 8162 # provided the user. The postdeps already come after the 8163 # user supplied libs so there is no need to process them. 8164 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8165 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8166 else 8167 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8168 fi 8169 ;; 8170 # The "-l" case would never come before the object being 8171 # linked, so don't bother handling this case. 8172 esac 8173 else 8174 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8175 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8176 else 8177 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8178 fi 8179 fi 8180 prev= 8181 ;; 8182 8183 *.lto.$objext) ;; # Ignore GCC LTO objects 8184 *.$objext) 8185 # This assumes that the test object file only shows up 8186 # once in the compiler output. 8187 if test "$p" = "conftest.$objext"; then 8188 pre_test_object_deps_done=yes 8189 continue 8190 fi 8191 8192 if test "$pre_test_object_deps_done" = no; then 8193 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8194 _LT_TAGVAR(predep_objects, $1)="$p" 8195 else 8196 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8197 fi 8198 else 8199 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8200 _LT_TAGVAR(postdep_objects, $1)="$p" 8201 else 8202 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8203 fi 8204 fi 8205 ;; 8206 8207 *) ;; # Ignore the rest. 8208 8209 esac 8210 done 8211 8212 # Clean up. 8213 rm -f a.out a.exe 8214else 8215 echo "libtool.m4: error: problem compiling $1 test program" 8216fi 8217 8218$RM -f confest.$objext 8219CFLAGS=$_lt_libdeps_save_CFLAGS 8220 8221# PORTME: override above test on systems where it is broken 8222m4_if([$1], [CXX], 8223[case $host_os in 8224interix[[3-9]]*) 8225 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8226 # hack all around it, let's just trust "g++" to DTRT. 8227 _LT_TAGVAR(predep_objects,$1)= 8228 _LT_TAGVAR(postdep_objects,$1)= 8229 _LT_TAGVAR(postdeps,$1)= 8230 ;; 8231 8232linux*) 8233 case `$CC -V 2>&1 | sed 5q` in 8234 *Sun\ C*) 8235 # Sun C++ 5.9 8236 8237 # The more standards-conforming stlport4 library is 8238 # incompatible with the Cstd library. Avoid specifying 8239 # it if it's in CXXFLAGS. Ignore libCrun as 8240 # -library=stlport4 depends on it. 8241 case " $CXX $CXXFLAGS " in 8242 *" -library=stlport4 "*) 8243 solaris_use_stlport4=yes 8244 ;; 8245 esac 8246 8247 if test "$solaris_use_stlport4" != yes; then 8248 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8249 fi 8250 ;; 8251 esac 8252 ;; 8253 8254solaris*) 8255 case $cc_basename in 8256 CC* | sunCC*) 8257 # The more standards-conforming stlport4 library is 8258 # incompatible with the Cstd library. Avoid specifying 8259 # it if it's in CXXFLAGS. Ignore libCrun as 8260 # -library=stlport4 depends on it. 8261 case " $CXX $CXXFLAGS " in 8262 *" -library=stlport4 "*) 8263 solaris_use_stlport4=yes 8264 ;; 8265 esac 8266 8267 # Adding this requires a known-good setup of shared libraries for 8268 # Sun compiler versions before 5.6, else PIC objects from an old 8269 # archive will be linked into the output, leading to subtle bugs. 8270 if test "$solaris_use_stlport4" != yes; then 8271 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8272 fi 8273 ;; 8274 esac 8275 ;; 8276esac 8277]) 8278 8279case " $_LT_TAGVAR(postdeps, $1) " in 8280*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8281esac 8282 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8283if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8284 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8285fi 8286_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8287 [The directories searched by this compiler when creating a shared library]) 8288_LT_TAGDECL([], [predep_objects], [1], 8289 [Dependencies to place before and after the objects being linked to 8290 create a shared library]) 8291_LT_TAGDECL([], [postdep_objects], [1]) 8292_LT_TAGDECL([], [predeps], [1]) 8293_LT_TAGDECL([], [postdeps], [1]) 8294_LT_TAGDECL([], [compiler_lib_search_path], [1], 8295 [The library search path used internally by the compiler when linking 8296 a shared library]) 8297])# _LT_SYS_HIDDEN_LIBDEPS 8298 8299 8300# _LT_LANG_F77_CONFIG([TAG]) 8301# -------------------------- 8302# Ensure that the configuration variables for a Fortran 77 compiler are 8303# suitably defined. These variables are subsequently used by _LT_CONFIG 8304# to write the compiler configuration to `libtool'. 8305m4_defun([_LT_LANG_F77_CONFIG], 8306[AC_LANG_PUSH(Fortran 77) 8307if test -z "$F77" || test "X$F77" = "Xno"; then 8308 _lt_disable_F77=yes 8309fi 8310 8311_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8312_LT_TAGVAR(allow_undefined_flag, $1)= 8313_LT_TAGVAR(always_export_symbols, $1)=no 8314_LT_TAGVAR(archive_expsym_cmds, $1)= 8315_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8316_LT_TAGVAR(hardcode_direct, $1)=no 8317_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8318_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8319_LT_TAGVAR(hardcode_libdir_separator, $1)= 8320_LT_TAGVAR(hardcode_minus_L, $1)=no 8321_LT_TAGVAR(hardcode_automatic, $1)=no 8322_LT_TAGVAR(inherit_rpath, $1)=no 8323_LT_TAGVAR(module_cmds, $1)= 8324_LT_TAGVAR(module_expsym_cmds, $1)= 8325_LT_TAGVAR(link_all_deplibs, $1)=unknown 8326_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8327_LT_TAGVAR(reload_flag, $1)=$reload_flag 8328_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8329_LT_TAGVAR(no_undefined_flag, $1)= 8330_LT_TAGVAR(whole_archive_flag_spec, $1)= 8331_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8332 8333# Source file extension for f77 test sources. 8334ac_ext=f 8335 8336# Object file extension for compiled f77 test sources. 8337objext=o 8338_LT_TAGVAR(objext, $1)=$objext 8339 8340# No sense in running all these tests if we already determined that 8341# the F77 compiler isn't working. Some variables (like enable_shared) 8342# are currently assumed to apply to all compilers on this platform, 8343# and will be corrupted by setting them based on a non-working compiler. 8344if test "$_lt_disable_F77" != yes; then 8345 # Code to be used in simple compile tests 8346 lt_simple_compile_test_code="\ 8347 subroutine t 8348 return 8349 end 8350" 8351 8352 # Code to be used in simple link tests 8353 lt_simple_link_test_code="\ 8354 program t 8355 end 8356" 8357 8358 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8359 _LT_TAG_COMPILER 8360 8361 # save warnings/boilerplate of simple test code 8362 _LT_COMPILER_BOILERPLATE 8363 _LT_LINKER_BOILERPLATE 8364 8365 # Allow CC to be a program name with arguments. 8366 lt_save_CC="$CC" 8367 lt_save_GCC=$GCC 8368 lt_save_CFLAGS=$CFLAGS 8369 CC=${F77-"f77"} 8370 CFLAGS=$FFLAGS 8371 compiler=$CC 8372 _LT_TAGVAR(compiler, $1)=$CC 8373 _LT_CC_BASENAME([$compiler]) 8374 GCC=$G77 8375 if test -n "$compiler"; then 8376 AC_MSG_CHECKING([if libtool supports shared libraries]) 8377 AC_MSG_RESULT([$can_build_shared]) 8378 8379 AC_MSG_CHECKING([whether to build shared libraries]) 8380 test "$can_build_shared" = "no" && enable_shared=no 8381 8382 # On AIX, shared libraries and static libraries use the same namespace, and 8383 # are all built from PIC. 8384 case $host_os in 8385 aix3*) 8386 test "$enable_shared" = yes && enable_static=no 8387 if test -n "$RANLIB"; then 8388 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8389 postinstall_cmds='$RANLIB $lib' 8390 fi 8391 ;; 8392 aix[[4-9]]*) 8393 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8394 test "$enable_shared" = yes && enable_static=no 8395 fi 8396 ;; 8397 esac 8398 AC_MSG_RESULT([$enable_shared]) 8399 8400 AC_MSG_CHECKING([whether to build static libraries]) 8401 # Make sure either enable_shared or enable_static is yes. 8402 test "$enable_shared" = yes || enable_static=yes 8403 AC_MSG_RESULT([$enable_static]) 8404 8405 _LT_TAGVAR(GCC, $1)="$G77" 8406 _LT_TAGVAR(LD, $1)="$LD" 8407 8408 ## CAVEAT EMPTOR: 8409 ## There is no encapsulation within the following macros, do not change 8410 ## the running order or otherwise move them around unless you know exactly 8411 ## what you are doing... 8412 _LT_COMPILER_PIC($1) 8413 _LT_COMPILER_C_O($1) 8414 _LT_COMPILER_FILE_LOCKS($1) 8415 _LT_LINKER_SHLIBS($1) 8416 _LT_SYS_DYNAMIC_LINKER($1) 8417 _LT_LINKER_HARDCODE_LIBPATH($1) 8418 8419 _LT_CONFIG($1) 8420 fi # test -n "$compiler" 8421 8422 GCC=$lt_save_GCC 8423 CC="$lt_save_CC" 8424 CFLAGS="$lt_save_CFLAGS" 8425fi # test "$_lt_disable_F77" != yes 8426 8427AC_LANG_POP 8428])# _LT_LANG_F77_CONFIG 8429 8430 8431# _LT_LANG_FC_CONFIG([TAG]) 8432# ------------------------- 8433# Ensure that the configuration variables for a Fortran compiler are 8434# suitably defined. These variables are subsequently used by _LT_CONFIG 8435# to write the compiler configuration to `libtool'. 8436m4_defun([_LT_LANG_FC_CONFIG], 8437[AC_LANG_PUSH(Fortran) 8438 8439if test -z "$FC" || test "X$FC" = "Xno"; then 8440 _lt_disable_FC=yes 8441fi 8442 8443_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8444_LT_TAGVAR(allow_undefined_flag, $1)= 8445_LT_TAGVAR(always_export_symbols, $1)=no 8446_LT_TAGVAR(archive_expsym_cmds, $1)= 8447_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8448_LT_TAGVAR(hardcode_direct, $1)=no 8449_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8450_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8451_LT_TAGVAR(hardcode_libdir_separator, $1)= 8452_LT_TAGVAR(hardcode_minus_L, $1)=no 8453_LT_TAGVAR(hardcode_automatic, $1)=no 8454_LT_TAGVAR(inherit_rpath, $1)=no 8455_LT_TAGVAR(module_cmds, $1)= 8456_LT_TAGVAR(module_expsym_cmds, $1)= 8457_LT_TAGVAR(link_all_deplibs, $1)=unknown 8458_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8459_LT_TAGVAR(reload_flag, $1)=$reload_flag 8460_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8461_LT_TAGVAR(no_undefined_flag, $1)= 8462_LT_TAGVAR(whole_archive_flag_spec, $1)= 8463_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8464 8465# Source file extension for fc test sources. 8466ac_ext=${ac_fc_srcext-f} 8467 8468# Object file extension for compiled fc test sources. 8469objext=o 8470_LT_TAGVAR(objext, $1)=$objext 8471 8472# No sense in running all these tests if we already determined that 8473# the FC compiler isn't working. Some variables (like enable_shared) 8474# are currently assumed to apply to all compilers on this platform, 8475# and will be corrupted by setting them based on a non-working compiler. 8476if test "$_lt_disable_FC" != yes; then 8477 # Code to be used in simple compile tests 8478 lt_simple_compile_test_code="\ 8479 subroutine t 8480 return 8481 end 8482" 8483 8484 # Code to be used in simple link tests 8485 lt_simple_link_test_code="\ 8486 program t 8487 end 8488" 8489 8490 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8491 _LT_TAG_COMPILER 8492 8493 # save warnings/boilerplate of simple test code 8494 _LT_COMPILER_BOILERPLATE 8495 _LT_LINKER_BOILERPLATE 8496 8497 # Allow CC to be a program name with arguments. 8498 lt_save_CC="$CC" 8499 lt_save_GCC=$GCC 8500 lt_save_CFLAGS=$CFLAGS 8501 CC=${FC-"f95"} 8502 CFLAGS=$FCFLAGS 8503 compiler=$CC 8504 GCC=$ac_cv_fc_compiler_gnu 8505 8506 _LT_TAGVAR(compiler, $1)=$CC 8507 _LT_CC_BASENAME([$compiler]) 8508 8509 if test -n "$compiler"; then 8510 AC_MSG_CHECKING([if libtool supports shared libraries]) 8511 AC_MSG_RESULT([$can_build_shared]) 8512 8513 AC_MSG_CHECKING([whether to build shared libraries]) 8514 test "$can_build_shared" = "no" && enable_shared=no 8515 8516 # On AIX, shared libraries and static libraries use the same namespace, and 8517 # are all built from PIC. 8518 case $host_os in 8519 aix3*) 8520 test "$enable_shared" = yes && enable_static=no 8521 if test -n "$RANLIB"; then 8522 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8523 postinstall_cmds='$RANLIB $lib' 8524 fi 8525 ;; 8526 aix[[4-9]]*) 8527 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8528 test "$enable_shared" = yes && enable_static=no 8529 fi 8530 ;; 8531 esac 8532 AC_MSG_RESULT([$enable_shared]) 8533 8534 AC_MSG_CHECKING([whether to build static libraries]) 8535 # Make sure either enable_shared or enable_static is yes. 8536 test "$enable_shared" = yes || enable_static=yes 8537 AC_MSG_RESULT([$enable_static]) 8538 8539 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8540 _LT_TAGVAR(LD, $1)="$LD" 8541 8542 ## CAVEAT EMPTOR: 8543 ## There is no encapsulation within the following macros, do not change 8544 ## the running order or otherwise move them around unless you know exactly 8545 ## what you are doing... 8546 _LT_SYS_HIDDEN_LIBDEPS($1) 8547 _LT_COMPILER_PIC($1) 8548 _LT_COMPILER_C_O($1) 8549 _LT_COMPILER_FILE_LOCKS($1) 8550 _LT_LINKER_SHLIBS($1) 8551 _LT_SYS_DYNAMIC_LINKER($1) 8552 _LT_LINKER_HARDCODE_LIBPATH($1) 8553 8554 _LT_CONFIG($1) 8555 fi # test -n "$compiler" 8556 8557 GCC=$lt_save_GCC 8558 CC=$lt_save_CC 8559 CFLAGS=$lt_save_CFLAGS 8560fi # test "$_lt_disable_FC" != yes 8561 8562AC_LANG_POP 8563])# _LT_LANG_FC_CONFIG 8564 8565 8566# _LT_LANG_GCJ_CONFIG([TAG]) 8567# -------------------------- 8568# Ensure that the configuration variables for the GNU Java Compiler compiler 8569# are suitably defined. These variables are subsequently used by _LT_CONFIG 8570# to write the compiler configuration to `libtool'. 8571m4_defun([_LT_LANG_GCJ_CONFIG], 8572[AC_REQUIRE([LT_PROG_GCJ])dnl 8573AC_LANG_SAVE 8574 8575# Source file extension for Java test sources. 8576ac_ext=java 8577 8578# Object file extension for compiled Java test sources. 8579objext=o 8580_LT_TAGVAR(objext, $1)=$objext 8581 8582# Code to be used in simple compile tests 8583lt_simple_compile_test_code="class foo {}" 8584 8585# Code to be used in simple link tests 8586lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8587 8588# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8589_LT_TAG_COMPILER 8590 8591# save warnings/boilerplate of simple test code 8592_LT_COMPILER_BOILERPLATE 8593_LT_LINKER_BOILERPLATE 8594 8595# Allow CC to be a program name with arguments. 8596lt_save_CC=$CC 8597lt_save_CFLAGS=$CFLAGS 8598lt_save_GCC=$GCC 8599GCC=yes 8600CC=${GCJ-"gcj"} 8601CFLAGS=$GCJFLAGS 8602compiler=$CC 8603_LT_TAGVAR(compiler, $1)=$CC 8604_LT_TAGVAR(LD, $1)="$LD" 8605_LT_CC_BASENAME([$compiler]) 8606 8607# GCJ did not exist at the time GCC didn't implicitly link libc in. 8608_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8609 8610_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8611_LT_TAGVAR(reload_flag, $1)=$reload_flag 8612_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8613 8614if test -n "$compiler"; then 8615 _LT_COMPILER_NO_RTTI($1) 8616 _LT_COMPILER_PIC($1) 8617 _LT_COMPILER_C_O($1) 8618 _LT_COMPILER_FILE_LOCKS($1) 8619 _LT_LINKER_SHLIBS($1) 8620 _LT_LINKER_HARDCODE_LIBPATH($1) 8621 8622 _LT_CONFIG($1) 8623fi 8624 8625AC_LANG_RESTORE 8626 8627GCC=$lt_save_GCC 8628CC=$lt_save_CC 8629CFLAGS=$lt_save_CFLAGS 8630])# _LT_LANG_GCJ_CONFIG 8631 8632 8633# _LT_LANG_GO_CONFIG([TAG]) 8634# -------------------------- 8635# Ensure that the configuration variables for the GNU Go compiler 8636# are suitably defined. These variables are subsequently used by _LT_CONFIG 8637# to write the compiler configuration to `libtool'. 8638m4_defun([_LT_LANG_GO_CONFIG], 8639[AC_REQUIRE([LT_PROG_GO])dnl 8640AC_LANG_SAVE 8641 8642# Source file extension for Go test sources. 8643ac_ext=go 8644 8645# Object file extension for compiled Go test sources. 8646objext=o 8647_LT_TAGVAR(objext, $1)=$objext 8648 8649# Code to be used in simple compile tests 8650lt_simple_compile_test_code="package main; func main() { }" 8651 8652# Code to be used in simple link tests 8653lt_simple_link_test_code='package main; func main() { }' 8654 8655# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8656_LT_TAG_COMPILER 8657 8658# save warnings/boilerplate of simple test code 8659_LT_COMPILER_BOILERPLATE 8660_LT_LINKER_BOILERPLATE 8661 8662# Allow CC to be a program name with arguments. 8663lt_save_CC=$CC 8664lt_save_CFLAGS=$CFLAGS 8665lt_save_GCC=$GCC 8666GCC=yes 8667CC=${GOC-"gccgo"} 8668CFLAGS=$GOFLAGS 8669compiler=$CC 8670_LT_TAGVAR(compiler, $1)=$CC 8671_LT_TAGVAR(LD, $1)="$LD" 8672_LT_CC_BASENAME([$compiler]) 8673 8674# Go did not exist at the time GCC didn't implicitly link libc in. 8675_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8676 8677_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8678_LT_TAGVAR(reload_flag, $1)=$reload_flag 8679_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8680 8681if test -n "$compiler"; then 8682 _LT_COMPILER_NO_RTTI($1) 8683 _LT_COMPILER_PIC($1) 8684 _LT_COMPILER_C_O($1) 8685 _LT_COMPILER_FILE_LOCKS($1) 8686 _LT_LINKER_SHLIBS($1) 8687 _LT_LINKER_HARDCODE_LIBPATH($1) 8688 8689 _LT_CONFIG($1) 8690fi 8691 8692AC_LANG_RESTORE 8693 8694GCC=$lt_save_GCC 8695CC=$lt_save_CC 8696CFLAGS=$lt_save_CFLAGS 8697])# _LT_LANG_GO_CONFIG 8698 8699 8700# _LT_LANG_RC_CONFIG([TAG]) 8701# ------------------------- 8702# Ensure that the configuration variables for the Windows resource compiler 8703# are suitably defined. These variables are subsequently used by _LT_CONFIG 8704# to write the compiler configuration to `libtool'. 8705m4_defun([_LT_LANG_RC_CONFIG], 8706[AC_REQUIRE([LT_PROG_RC])dnl 8707AC_LANG_SAVE 8708 8709# Source file extension for RC test sources. 8710ac_ext=rc 8711 8712# Object file extension for compiled RC test sources. 8713objext=o 8714_LT_TAGVAR(objext, $1)=$objext 8715 8716# Code to be used in simple compile tests 8717lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8718 8719# Code to be used in simple link tests 8720lt_simple_link_test_code="$lt_simple_compile_test_code" 8721 8722# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8723_LT_TAG_COMPILER 8724 8725# save warnings/boilerplate of simple test code 8726_LT_COMPILER_BOILERPLATE 8727_LT_LINKER_BOILERPLATE 8728 8729# Allow CC to be a program name with arguments. 8730lt_save_CC="$CC" 8731lt_save_CFLAGS=$CFLAGS 8732lt_save_GCC=$GCC 8733GCC= 8734CC=${RC-"windres"} 8735CFLAGS= 8736compiler=$CC 8737_LT_TAGVAR(compiler, $1)=$CC 8738_LT_CC_BASENAME([$compiler]) 8739_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8740 8741if test -n "$compiler"; then 8742 : 8743 _LT_CONFIG($1) 8744fi 8745 8746GCC=$lt_save_GCC 8747AC_LANG_RESTORE 8748CC=$lt_save_CC 8749CFLAGS=$lt_save_CFLAGS 8750])# _LT_LANG_RC_CONFIG 8751 8752 8753# LT_PROG_GCJ 8754# ----------- 8755AC_DEFUN([LT_PROG_GCJ], 8756[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8757 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8758 [AC_CHECK_TOOL(GCJ, gcj,) 8759 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8760 AC_SUBST(GCJFLAGS)])])[]dnl 8761]) 8762 8763# Old name: 8764AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8765dnl aclocal-1.4 backwards compatibility: 8766dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8767 8768 8769# LT_PROG_GO 8770# ---------- 8771AC_DEFUN([LT_PROG_GO], 8772[AC_CHECK_TOOL(GOC, gccgo,) 8773]) 8774 8775 8776# LT_PROG_RC 8777# ---------- 8778AC_DEFUN([LT_PROG_RC], 8779[AC_CHECK_TOOL(RC, windres,) 8780]) 8781 8782# Old name: 8783AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8784dnl aclocal-1.4 backwards compatibility: 8785dnl AC_DEFUN([LT_AC_PROG_RC], []) 8786 8787 8788# _LT_DECL_EGREP 8789# -------------- 8790# If we don't have a new enough Autoconf to choose the best grep 8791# available, choose the one first in the user's PATH. 8792m4_defun([_LT_DECL_EGREP], 8793[AC_REQUIRE([AC_PROG_EGREP])dnl 8794AC_REQUIRE([AC_PROG_FGREP])dnl 8795test -z "$GREP" && GREP=grep 8796_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8797_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8798_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8799dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8800AC_SUBST([GREP]) 8801]) 8802 8803 8804# _LT_DECL_OBJDUMP 8805# -------------- 8806# If we don't have a new enough Autoconf to choose the best objdump 8807# available, choose the one first in the user's PATH. 8808m4_defun([_LT_DECL_OBJDUMP], 8809[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8810test -z "$OBJDUMP" && OBJDUMP=objdump 8811_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8812AC_SUBST([OBJDUMP]) 8813]) 8814 8815# _LT_DECL_DLLTOOL 8816# ---------------- 8817# Ensure DLLTOOL variable is set. 8818m4_defun([_LT_DECL_DLLTOOL], 8819[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8820test -z "$DLLTOOL" && DLLTOOL=dlltool 8821_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8822AC_SUBST([DLLTOOL]) 8823]) 8824 8825# _LT_DECL_SED 8826# ------------ 8827# Check for a fully-functional sed program, that truncates 8828# as few characters as possible. Prefer GNU sed if found. 8829m4_defun([_LT_DECL_SED], 8830[AC_PROG_SED 8831test -z "$SED" && SED=sed 8832Xsed="$SED -e 1s/^X//" 8833_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8834_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8835 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8836])# _LT_DECL_SED 8837 8838m4_ifndef([AC_PROG_SED], [ 8839# NOTE: This macro has been submitted for inclusion into # 8840# GNU Autoconf as AC_PROG_SED. When it is available in # 8841# a released version of Autoconf we should remove this # 8842# macro and use it instead. # 8843 8844m4_defun([AC_PROG_SED], 8845[AC_MSG_CHECKING([for a sed that does not truncate output]) 8846AC_CACHE_VAL(lt_cv_path_SED, 8847[# Loop through the user's path and test for sed and gsed. 8848# Then use that list of sed's as ones to test for truncation. 8849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8850for as_dir in $PATH 8851do 8852 IFS=$as_save_IFS 8853 test -z "$as_dir" && as_dir=. 8854 for lt_ac_prog in sed gsed; do 8855 for ac_exec_ext in '' $ac_executable_extensions; do 8856 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8857 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8858 fi 8859 done 8860 done 8861done 8862IFS=$as_save_IFS 8863lt_ac_max=0 8864lt_ac_count=0 8865# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8866# along with /bin/sed that truncates output. 8867for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8868 test ! -f $lt_ac_sed && continue 8869 cat /dev/null > conftest.in 8870 lt_ac_count=0 8871 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8872 # Check for GNU sed and select it if it is found. 8873 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8874 lt_cv_path_SED=$lt_ac_sed 8875 break 8876 fi 8877 while true; do 8878 cat conftest.in conftest.in >conftest.tmp 8879 mv conftest.tmp conftest.in 8880 cp conftest.in conftest.nl 8881 echo >>conftest.nl 8882 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8883 cmp -s conftest.out conftest.nl || break 8884 # 10000 chars as input seems more than enough 8885 test $lt_ac_count -gt 10 && break 8886 lt_ac_count=`expr $lt_ac_count + 1` 8887 if test $lt_ac_count -gt $lt_ac_max; then 8888 lt_ac_max=$lt_ac_count 8889 lt_cv_path_SED=$lt_ac_sed 8890 fi 8891 done 8892done 8893]) 8894SED=$lt_cv_path_SED 8895AC_SUBST([SED]) 8896AC_MSG_RESULT([$SED]) 8897])#AC_PROG_SED 8898])#m4_ifndef 8899 8900# Old name: 8901AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8902dnl aclocal-1.4 backwards compatibility: 8903dnl AC_DEFUN([LT_AC_PROG_SED], []) 8904 8905 8906# _LT_CHECK_SHELL_FEATURES 8907# ------------------------ 8908# Find out whether the shell is Bourne or XSI compatible, 8909# or has some other useful features. 8910m4_defun([_LT_CHECK_SHELL_FEATURES], 8911[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8912# Try some XSI features 8913xsi_shell=no 8914( _lt_dummy="a/b/c" 8915 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8916 = c,a/b,b/c, \ 8917 && eval 'test $(( 1 + 1 )) -eq 2 \ 8918 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8919 && xsi_shell=yes 8920AC_MSG_RESULT([$xsi_shell]) 8921_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8922 8923AC_MSG_CHECKING([whether the shell understands "+="]) 8924lt_shell_append=no 8925( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8926 >/dev/null 2>&1 \ 8927 && lt_shell_append=yes 8928AC_MSG_RESULT([$lt_shell_append]) 8929_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8930 8931if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8932 lt_unset=unset 8933else 8934 lt_unset=false 8935fi 8936_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8937 8938# test EBCDIC or ASCII 8939case `echo X|tr X '\101'` in 8940 A) # ASCII based system 8941 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8942 lt_SP2NL='tr \040 \012' 8943 lt_NL2SP='tr \015\012 \040\040' 8944 ;; 8945 *) # EBCDIC based system 8946 lt_SP2NL='tr \100 \n' 8947 lt_NL2SP='tr \r\n \100\100' 8948 ;; 8949esac 8950_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8951_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8952])# _LT_CHECK_SHELL_FEATURES 8953 8954 8955# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8956# ------------------------------------------------------ 8957# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8958# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8959m4_defun([_LT_PROG_FUNCTION_REPLACE], 8960[dnl { 8961sed -e '/^$1 ()$/,/^} # $1 /c\ 8962$1 ()\ 8963{\ 8964m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8965} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8966 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8967 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8968test 0 -eq $? || _lt_function_replace_fail=: 8969]) 8970 8971 8972# _LT_PROG_REPLACE_SHELLFNS 8973# ------------------------- 8974# Replace existing portable implementations of several shell functions with 8975# equivalent extended shell implementations where those features are available.. 8976m4_defun([_LT_PROG_REPLACE_SHELLFNS], 8977[if test x"$xsi_shell" = xyes; then 8978 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8979 case ${1} in 8980 */*) func_dirname_result="${1%/*}${2}" ;; 8981 * ) func_dirname_result="${3}" ;; 8982 esac]) 8983 8984 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8985 func_basename_result="${1##*/}"]) 8986 8987 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8988 case ${1} in 8989 */*) func_dirname_result="${1%/*}${2}" ;; 8990 * ) func_dirname_result="${3}" ;; 8991 esac 8992 func_basename_result="${1##*/}"]) 8993 8994 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8995 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8996 # positional parameters, so assign one to ordinary parameter first. 8997 func_stripname_result=${3} 8998 func_stripname_result=${func_stripname_result#"${1}"} 8999 func_stripname_result=${func_stripname_result%"${2}"}]) 9000 9001 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 9002 func_split_long_opt_name=${1%%=*} 9003 func_split_long_opt_arg=${1#*=}]) 9004 9005 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 9006 func_split_short_opt_arg=${1#??} 9007 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9008 9009 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 9010 case ${1} in 9011 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9012 *) func_lo2o_result=${1} ;; 9013 esac]) 9014 9015 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9016 9017 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9018 9019 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 9020fi 9021 9022if test x"$lt_shell_append" = xyes; then 9023 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 9024 9025 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 9026 func_quote_for_eval "${2}" 9027dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 9028 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 9029 9030 # Save a `func_append' function call where possible by direct use of '+=' 9031 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 9032 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9033 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9034 test 0 -eq $? || _lt_function_replace_fail=: 9035else 9036 # Save a `func_append' function call even when '+=' is not available 9037 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 9038 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9039 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9040 test 0 -eq $? || _lt_function_replace_fail=: 9041fi 9042 9043if test x"$_lt_function_replace_fail" = x":"; then 9044 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 9045fi 9046]) 9047 9048# _LT_PATH_CONVERSION_FUNCTIONS 9049# ----------------------------- 9050# Determine which file name conversion functions should be used by 9051# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 9052# for certain cross-compile configurations and native mingw. 9053m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 9054[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9055AC_REQUIRE([AC_CANONICAL_BUILD])dnl 9056AC_MSG_CHECKING([how to convert $build file names to $host format]) 9057AC_CACHE_VAL(lt_cv_to_host_file_cmd, 9058[case $host in 9059 *-*-mingw* ) 9060 case $build in 9061 *-*-mingw* ) # actually msys 9062 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 9063 ;; 9064 *-*-cygwin* ) 9065 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 9066 ;; 9067 * ) # otherwise, assume *nix 9068 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 9069 ;; 9070 esac 9071 ;; 9072 *-*-cygwin* ) 9073 case $build in 9074 *-*-mingw* ) # actually msys 9075 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 9076 ;; 9077 *-*-cygwin* ) 9078 lt_cv_to_host_file_cmd=func_convert_file_noop 9079 ;; 9080 * ) # otherwise, assume *nix 9081 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9082 ;; 9083 esac 9084 ;; 9085 * ) # unhandled hosts (and "normal" native builds) 9086 lt_cv_to_host_file_cmd=func_convert_file_noop 9087 ;; 9088esac 9089]) 9090to_host_file_cmd=$lt_cv_to_host_file_cmd 9091AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9092_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9093 [0], [convert $build file names to $host format])dnl 9094 9095AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9096AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9097[#assume ordinary cross tools, or native build. 9098lt_cv_to_tool_file_cmd=func_convert_file_noop 9099case $host in 9100 *-*-mingw* ) 9101 case $build in 9102 *-*-mingw* ) # actually msys 9103 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9104 ;; 9105 esac 9106 ;; 9107esac 9108]) 9109to_tool_file_cmd=$lt_cv_to_tool_file_cmd 9110AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9111_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9112 [0], [convert $build files to toolchain format])dnl 9113])# _LT_PATH_CONVERSION_FUNCTIONS 9114 9115# Helper functions for option handling. -*- Autoconf -*- 9116# 9117# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9118# Inc. 9119# Written by Gary V. Vaughan, 2004 9120# 9121# This file is free software; the Free Software Foundation gives 9122# unlimited permission to copy and/or distribute it, with or without 9123# modifications, as long as this notice is preserved. 9124 9125# serial 7 ltoptions.m4 9126 9127# This is to help aclocal find these macros, as it can't see m4_define. 9128AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9129 9130 9131# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9132# ------------------------------------------ 9133m4_define([_LT_MANGLE_OPTION], 9134[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9135 9136 9137# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9138# --------------------------------------- 9139# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9140# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9141# saved as a flag. 9142m4_define([_LT_SET_OPTION], 9143[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9144m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9145 _LT_MANGLE_DEFUN([$1], [$2]), 9146 [m4_warning([Unknown $1 option `$2'])])[]dnl 9147]) 9148 9149 9150# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9151# ------------------------------------------------------------ 9152# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9153m4_define([_LT_IF_OPTION], 9154[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9155 9156 9157# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9158# ------------------------------------------------------- 9159# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9160# are set. 9161m4_define([_LT_UNLESS_OPTIONS], 9162[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9163 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9164 [m4_define([$0_found])])])[]dnl 9165m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9166])[]dnl 9167]) 9168 9169 9170# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9171# ---------------------------------------- 9172# OPTION-LIST is a space-separated list of Libtool options associated 9173# with MACRO-NAME. If any OPTION has a matching handler declared with 9174# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9175# the unknown option and exit. 9176m4_defun([_LT_SET_OPTIONS], 9177[# Set options 9178m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9179 [_LT_SET_OPTION([$1], _LT_Option)]) 9180 9181m4_if([$1],[LT_INIT],[ 9182 dnl 9183 dnl Simply set some default values (i.e off) if boolean options were not 9184 dnl specified: 9185 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9186 ]) 9187 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9188 ]) 9189 dnl 9190 dnl If no reference was made to various pairs of opposing options, then 9191 dnl we run the default mode handler for the pair. For example, if neither 9192 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9193 dnl archives by default: 9194 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9195 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9196 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9197 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9198 [_LT_ENABLE_FAST_INSTALL]) 9199 ]) 9200])# _LT_SET_OPTIONS 9201 9202 9203 9204# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9205# ----------------------------------------- 9206m4_define([_LT_MANGLE_DEFUN], 9207[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9208 9209 9210# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9211# ----------------------------------------------- 9212m4_define([LT_OPTION_DEFINE], 9213[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9214])# LT_OPTION_DEFINE 9215 9216 9217# dlopen 9218# ------ 9219LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9220]) 9221 9222AU_DEFUN([AC_LIBTOOL_DLOPEN], 9223[_LT_SET_OPTION([LT_INIT], [dlopen]) 9224AC_DIAGNOSE([obsolete], 9225[$0: Remove this warning and the call to _LT_SET_OPTION when you 9226put the `dlopen' option into LT_INIT's first parameter.]) 9227]) 9228 9229dnl aclocal-1.4 backwards compatibility: 9230dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9231 9232 9233# win32-dll 9234# --------- 9235# Declare package support for building win32 dll's. 9236LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9237[enable_win32_dll=yes 9238 9239case $host in 9240*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9241 AC_CHECK_TOOL(AS, as, false) 9242 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9243 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9244 ;; 9245esac 9246 9247test -z "$AS" && AS=as 9248_LT_DECL([], [AS], [1], [Assembler program])dnl 9249 9250test -z "$DLLTOOL" && DLLTOOL=dlltool 9251_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9252 9253test -z "$OBJDUMP" && OBJDUMP=objdump 9254_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9255])# win32-dll 9256 9257AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9258[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9259_LT_SET_OPTION([LT_INIT], [win32-dll]) 9260AC_DIAGNOSE([obsolete], 9261[$0: Remove this warning and the call to _LT_SET_OPTION when you 9262put the `win32-dll' option into LT_INIT's first parameter.]) 9263]) 9264 9265dnl aclocal-1.4 backwards compatibility: 9266dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9267 9268 9269# _LT_ENABLE_SHARED([DEFAULT]) 9270# ---------------------------- 9271# implement the --enable-shared flag, and supports the `shared' and 9272# `disable-shared' LT_INIT options. 9273# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9274m4_define([_LT_ENABLE_SHARED], 9275[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9276AC_ARG_ENABLE([shared], 9277 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9278 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9279 [p=${PACKAGE-default} 9280 case $enableval in 9281 yes) enable_shared=yes ;; 9282 no) enable_shared=no ;; 9283 *) 9284 enable_shared=no 9285 # Look at the argument we got. We use all the common list separators. 9286 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9287 for pkg in $enableval; do 9288 IFS="$lt_save_ifs" 9289 if test "X$pkg" = "X$p"; then 9290 enable_shared=yes 9291 fi 9292 done 9293 IFS="$lt_save_ifs" 9294 ;; 9295 esac], 9296 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9297 9298 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9299 [Whether or not to build shared libraries]) 9300])# _LT_ENABLE_SHARED 9301 9302LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9303LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9304 9305# Old names: 9306AC_DEFUN([AC_ENABLE_SHARED], 9307[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9308]) 9309 9310AC_DEFUN([AC_DISABLE_SHARED], 9311[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9312]) 9313 9314AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9315AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9316 9317dnl aclocal-1.4 backwards compatibility: 9318dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9319dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9320 9321 9322 9323# _LT_ENABLE_STATIC([DEFAULT]) 9324# ---------------------------- 9325# implement the --enable-static flag, and support the `static' and 9326# `disable-static' LT_INIT options. 9327# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9328m4_define([_LT_ENABLE_STATIC], 9329[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9330AC_ARG_ENABLE([static], 9331 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9332 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9333 [p=${PACKAGE-default} 9334 case $enableval in 9335 yes) enable_static=yes ;; 9336 no) enable_static=no ;; 9337 *) 9338 enable_static=no 9339 # Look at the argument we got. We use all the common list separators. 9340 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9341 for pkg in $enableval; do 9342 IFS="$lt_save_ifs" 9343 if test "X$pkg" = "X$p"; then 9344 enable_static=yes 9345 fi 9346 done 9347 IFS="$lt_save_ifs" 9348 ;; 9349 esac], 9350 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9351 9352 _LT_DECL([build_old_libs], [enable_static], [0], 9353 [Whether or not to build static libraries]) 9354])# _LT_ENABLE_STATIC 9355 9356LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9357LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9358 9359# Old names: 9360AC_DEFUN([AC_ENABLE_STATIC], 9361[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9362]) 9363 9364AC_DEFUN([AC_DISABLE_STATIC], 9365[_LT_SET_OPTION([LT_INIT], [disable-static]) 9366]) 9367 9368AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9369AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9370 9371dnl aclocal-1.4 backwards compatibility: 9372dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9373dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9374 9375 9376 9377# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9378# ---------------------------------- 9379# implement the --enable-fast-install flag, and support the `fast-install' 9380# and `disable-fast-install' LT_INIT options. 9381# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9382m4_define([_LT_ENABLE_FAST_INSTALL], 9383[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9384AC_ARG_ENABLE([fast-install], 9385 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9386 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9387 [p=${PACKAGE-default} 9388 case $enableval in 9389 yes) enable_fast_install=yes ;; 9390 no) enable_fast_install=no ;; 9391 *) 9392 enable_fast_install=no 9393 # Look at the argument we got. We use all the common list separators. 9394 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9395 for pkg in $enableval; do 9396 IFS="$lt_save_ifs" 9397 if test "X$pkg" = "X$p"; then 9398 enable_fast_install=yes 9399 fi 9400 done 9401 IFS="$lt_save_ifs" 9402 ;; 9403 esac], 9404 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9405 9406_LT_DECL([fast_install], [enable_fast_install], [0], 9407 [Whether or not to optimize for fast installation])dnl 9408])# _LT_ENABLE_FAST_INSTALL 9409 9410LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9411LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9412 9413# Old names: 9414AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9415[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9416AC_DIAGNOSE([obsolete], 9417[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9418the `fast-install' option into LT_INIT's first parameter.]) 9419]) 9420 9421AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9422[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9423AC_DIAGNOSE([obsolete], 9424[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9425the `disable-fast-install' option into LT_INIT's first parameter.]) 9426]) 9427 9428dnl aclocal-1.4 backwards compatibility: 9429dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9430dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9431 9432 9433# _LT_WITH_PIC([MODE]) 9434# -------------------- 9435# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9436# LT_INIT options. 9437# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9438m4_define([_LT_WITH_PIC], 9439[AC_ARG_WITH([pic], 9440 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9441 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9442 [lt_p=${PACKAGE-default} 9443 case $withval in 9444 yes|no) pic_mode=$withval ;; 9445 *) 9446 pic_mode=default 9447 # Look at the argument we got. We use all the common list separators. 9448 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9449 for lt_pkg in $withval; do 9450 IFS="$lt_save_ifs" 9451 if test "X$lt_pkg" = "X$lt_p"; then 9452 pic_mode=yes 9453 fi 9454 done 9455 IFS="$lt_save_ifs" 9456 ;; 9457 esac], 9458 [pic_mode=default]) 9459 9460test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9461 9462_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9463])# _LT_WITH_PIC 9464 9465LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9466LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9467 9468# Old name: 9469AU_DEFUN([AC_LIBTOOL_PICMODE], 9470[_LT_SET_OPTION([LT_INIT], [pic-only]) 9471AC_DIAGNOSE([obsolete], 9472[$0: Remove this warning and the call to _LT_SET_OPTION when you 9473put the `pic-only' option into LT_INIT's first parameter.]) 9474]) 9475 9476dnl aclocal-1.4 backwards compatibility: 9477dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9478 9479 9480m4_define([_LTDL_MODE], []) 9481LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9482 [m4_define([_LTDL_MODE], [nonrecursive])]) 9483LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9484 [m4_define([_LTDL_MODE], [recursive])]) 9485LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9486 [m4_define([_LTDL_MODE], [subproject])]) 9487 9488m4_define([_LTDL_TYPE], []) 9489LT_OPTION_DEFINE([LTDL_INIT], [installable], 9490 [m4_define([_LTDL_TYPE], [installable])]) 9491LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9492 [m4_define([_LTDL_TYPE], [convenience])]) 9493 9494# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9495# 9496# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9497# Written by Gary V. Vaughan, 2004 9498# 9499# This file is free software; the Free Software Foundation gives 9500# unlimited permission to copy and/or distribute it, with or without 9501# modifications, as long as this notice is preserved. 9502 9503# serial 6 ltsugar.m4 9504 9505# This is to help aclocal find these macros, as it can't see m4_define. 9506AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9507 9508 9509# lt_join(SEP, ARG1, [ARG2...]) 9510# ----------------------------- 9511# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9512# associated separator. 9513# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9514# versions in m4sugar had bugs. 9515m4_define([lt_join], 9516[m4_if([$#], [1], [], 9517 [$#], [2], [[$2]], 9518 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9519m4_define([_lt_join], 9520[m4_if([$#$2], [2], [], 9521 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9522 9523 9524# lt_car(LIST) 9525# lt_cdr(LIST) 9526# ------------ 9527# Manipulate m4 lists. 9528# These macros are necessary as long as will still need to support 9529# Autoconf-2.59 which quotes differently. 9530m4_define([lt_car], [[$1]]) 9531m4_define([lt_cdr], 9532[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9533 [$#], 1, [], 9534 [m4_dquote(m4_shift($@))])]) 9535m4_define([lt_unquote], $1) 9536 9537 9538# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9539# ------------------------------------------ 9540# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9541# Note that neither SEPARATOR nor STRING are expanded; they are appended 9542# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9543# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9544# than defined and empty). 9545# 9546# This macro is needed until we can rely on Autoconf 2.62, since earlier 9547# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9548m4_define([lt_append], 9549[m4_define([$1], 9550 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9551 9552 9553 9554# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9555# ---------------------------------------------------------- 9556# Produce a SEP delimited list of all paired combinations of elements of 9557# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9558# has the form PREFIXmINFIXSUFFIXn. 9559# Needed until we can rely on m4_combine added in Autoconf 2.62. 9560m4_define([lt_combine], 9561[m4_if(m4_eval([$# > 3]), [1], 9562 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9563[[m4_foreach([_Lt_prefix], [$2], 9564 [m4_foreach([_Lt_suffix], 9565 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9566 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9567 9568 9569# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9570# ----------------------------------------------------------------------- 9571# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9572# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9573m4_define([lt_if_append_uniq], 9574[m4_ifdef([$1], 9575 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9576 [lt_append([$1], [$2], [$3])$4], 9577 [$5])], 9578 [lt_append([$1], [$2], [$3])$4])]) 9579 9580 9581# lt_dict_add(DICT, KEY, VALUE) 9582# ----------------------------- 9583m4_define([lt_dict_add], 9584[m4_define([$1($2)], [$3])]) 9585 9586 9587# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9588# -------------------------------------------- 9589m4_define([lt_dict_add_subkey], 9590[m4_define([$1($2:$3)], [$4])]) 9591 9592 9593# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9594# ---------------------------------- 9595m4_define([lt_dict_fetch], 9596[m4_ifval([$3], 9597 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9598 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9599 9600 9601# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9602# ----------------------------------------------------------------- 9603m4_define([lt_if_dict_fetch], 9604[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9605 [$5], 9606 [$6])]) 9607 9608 9609# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9610# -------------------------------------------------------------- 9611m4_define([lt_dict_filter], 9612[m4_if([$5], [], [], 9613 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9614 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9615 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9616]) 9617 9618# ltversion.m4 -- version numbers -*- Autoconf -*- 9619# 9620# Copyright (C) 2004 Free Software Foundation, Inc. 9621# Written by Scott James Remnant, 2004 9622# 9623# This file is free software; the Free Software Foundation gives 9624# unlimited permission to copy and/or distribute it, with or without 9625# modifications, as long as this notice is preserved. 9626 9627# @configure_input@ 9628 9629# serial 3337 ltversion.m4 9630# This file is part of GNU Libtool 9631 9632m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9633m4_define([LT_PACKAGE_REVISION], [1.3337]) 9634 9635AC_DEFUN([LTVERSION_VERSION], 9636[macro_version='2.4.2' 9637macro_revision='1.3337' 9638_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9639_LT_DECL(, macro_revision, 0) 9640]) 9641 9642# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9643# 9644# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9645# Written by Scott James Remnant, 2004. 9646# 9647# This file is free software; the Free Software Foundation gives 9648# unlimited permission to copy and/or distribute it, with or without 9649# modifications, as long as this notice is preserved. 9650 9651# serial 5 lt~obsolete.m4 9652 9653# These exist entirely to fool aclocal when bootstrapping libtool. 9654# 9655# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9656# which have later been changed to m4_define as they aren't part of the 9657# exported API, or moved to Autoconf or Automake where they belong. 9658# 9659# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9660# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9661# using a macro with the same name in our local m4/libtool.m4 it'll 9662# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9663# and doesn't know about Autoconf macros at all.) 9664# 9665# So we provide this file, which has a silly filename so it's always 9666# included after everything else. This provides aclocal with the 9667# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9668# because those macros already exist, or will be overwritten later. 9669# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9670# 9671# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9672# Yes, that means every name once taken will need to remain here until 9673# we give up compatibility with versions before 1.7, at which point 9674# we need to keep only those names which we still refer to. 9675 9676# This is to help aclocal find these macros, as it can't see m4_define. 9677AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9678 9679m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9680m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9681m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9682m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9683m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9684m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9685m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9686m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9687m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9688m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9689m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9690m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9691m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9692m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9693m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9694m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9695m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9696m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9697m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9698m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9699m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9700m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9701m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9702m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9703m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9704m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9705m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9706m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9707m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9708m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9709m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9710m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9711m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9712m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9713m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9714m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9715m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9716m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9717m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9718m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9719m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9720m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9721m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9722m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9723m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9724m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9725m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9726m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9727m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9728m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9729m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9730m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9731m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9732m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9733m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9734m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9735m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9736m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9737m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9738m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9739m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9740 9741# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9742# 9743# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9744# 9745# This program is free software; you can redistribute it and/or modify 9746# it under the terms of the GNU General Public License as published by 9747# the Free Software Foundation; either version 2 of the License, or 9748# (at your option) any later version. 9749# 9750# This program is distributed in the hope that it will be useful, but 9751# WITHOUT ANY WARRANTY; without even the implied warranty of 9752# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9753# General Public License for more details. 9754# 9755# You should have received a copy of the GNU General Public License 9756# along with this program; if not, write to the Free Software 9757# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9758# 9759# As a special exception to the GNU General Public License, if you 9760# distribute this file as part of a program that contains a 9761# configuration script generated by Autoconf, you may include it under 9762# the same distribution terms that you use for the rest of that program. 9763 9764# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9765# ---------------------------------- 9766AC_DEFUN([PKG_PROG_PKG_CONFIG], 9767[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9768m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9769AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9770if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9771 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9772fi 9773if test -n "$PKG_CONFIG"; then 9774 _pkg_min_version=m4_default([$1], [0.9.0]) 9775 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9776 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9777 AC_MSG_RESULT([yes]) 9778 else 9779 AC_MSG_RESULT([no]) 9780 PKG_CONFIG="" 9781 fi 9782 9783fi[]dnl 9784])# PKG_PROG_PKG_CONFIG 9785 9786# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9787# 9788# Check to see whether a particular set of modules exists. Similar 9789# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9790# 9791# 9792# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9793# this or PKG_CHECK_MODULES is called, or make sure to call 9794# PKG_CHECK_EXISTS manually 9795# -------------------------------------------------------------- 9796AC_DEFUN([PKG_CHECK_EXISTS], 9797[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9798if test -n "$PKG_CONFIG" && \ 9799 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9800 m4_ifval([$2], [$2], [:]) 9801m4_ifvaln([$3], [else 9802 $3])dnl 9803fi]) 9804 9805 9806# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9807# --------------------------------------------- 9808m4_define([_PKG_CONFIG], 9809[if test -n "$$1"; then 9810 pkg_cv_[]$1="$$1" 9811 elif test -n "$PKG_CONFIG"; then 9812 PKG_CHECK_EXISTS([$3], 9813 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9814 [pkg_failed=yes]) 9815 else 9816 pkg_failed=untried 9817fi[]dnl 9818])# _PKG_CONFIG 9819 9820# _PKG_SHORT_ERRORS_SUPPORTED 9821# ----------------------------- 9822AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9823[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9824if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9825 _pkg_short_errors_supported=yes 9826else 9827 _pkg_short_errors_supported=no 9828fi[]dnl 9829])# _PKG_SHORT_ERRORS_SUPPORTED 9830 9831 9832# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9833# [ACTION-IF-NOT-FOUND]) 9834# 9835# 9836# Note that if there is a possibility the first call to 9837# PKG_CHECK_MODULES might not happen, you should be sure to include an 9838# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9839# 9840# 9841# -------------------------------------------------------------- 9842AC_DEFUN([PKG_CHECK_MODULES], 9843[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9844AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9845AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9846 9847pkg_failed=no 9848AC_MSG_CHECKING([for $1]) 9849 9850_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9851_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9852 9853m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9854and $1[]_LIBS to avoid the need to call pkg-config. 9855See the pkg-config man page for more details.]) 9856 9857if test $pkg_failed = yes; then 9858 _PKG_SHORT_ERRORS_SUPPORTED 9859 if test $_pkg_short_errors_supported = yes; then 9860 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9861 else 9862 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9863 fi 9864 # Put the nasty error message in config.log where it belongs 9865 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9866 9867 ifelse([$4], , [AC_MSG_ERROR(dnl 9868[Package requirements ($2) were not met: 9869 9870$$1_PKG_ERRORS 9871 9872Consider adjusting the PKG_CONFIG_PATH environment variable if you 9873installed software in a non-standard prefix. 9874 9875_PKG_TEXT 9876])], 9877 [AC_MSG_RESULT([no]) 9878 $4]) 9879elif test $pkg_failed = untried; then 9880 ifelse([$4], , [AC_MSG_FAILURE(dnl 9881[The pkg-config script could not be found or is too old. Make sure it 9882is in your PATH or set the PKG_CONFIG environment variable to the full 9883path to pkg-config. 9884 9885_PKG_TEXT 9886 9887To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9888 [$4]) 9889else 9890 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9891 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9892 AC_MSG_RESULT([yes]) 9893 ifelse([$3], , :, [$3]) 9894fi[]dnl 9895])# PKG_CHECK_MODULES 9896 9897dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9898dnl 9899dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9900dnl 9901dnl Permission is hereby granted, free of charge, to any person obtaining a 9902dnl copy of this software and associated documentation files (the "Software"), 9903dnl to deal in the Software without restriction, including without limitation 9904dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9905dnl and/or sell copies of the Software, and to permit persons to whom the 9906dnl Software is furnished to do so, subject to the following conditions: 9907dnl 9908dnl The above copyright notice and this permission notice (including the next 9909dnl paragraph) shall be included in all copies or substantial portions of the 9910dnl Software. 9911dnl 9912dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9913dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9914dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9915dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9916dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9917dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9918dnl DEALINGS IN THE SOFTWARE. 9919 9920# XORG_MACROS_VERSION(required-version) 9921# ------------------------------------- 9922# Minimum version: 1.1.0 9923# 9924# If you're using a macro added in Version 1.1 or newer, include this in 9925# your configure.ac with the minimum required version, such as: 9926# XORG_MACROS_VERSION(1.1) 9927# 9928# To ensure that this macro is defined, also add: 9929# m4_ifndef([XORG_MACROS_VERSION], 9930# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9931# 9932# 9933# See the "minimum version" comment for each macro you use to see what 9934# version you require. 9935m4_defun([XORG_MACROS_VERSION],[ 9936m4_define([vers_have], [1.19.0]) 9937m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9938m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9939m4_if(m4_cmp(maj_have, maj_needed), 0,, 9940 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9941m4_if(m4_version_compare(vers_have, [$1]), -1, 9942 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9943m4_undefine([vers_have]) 9944m4_undefine([maj_have]) 9945m4_undefine([maj_needed]) 9946]) # XORG_MACROS_VERSION 9947 9948# XORG_PROG_RAWCPP() 9949# ------------------ 9950# Minimum version: 1.0.0 9951# 9952# Find cpp program and necessary flags for use in pre-processing text files 9953# such as man pages and config files 9954AC_DEFUN([XORG_PROG_RAWCPP],[ 9955AC_REQUIRE([AC_PROG_CPP]) 9956AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9957 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9958 9959# Check for flag to avoid builtin definitions - assumes unix is predefined, 9960# which is not the best choice for supporting other OS'es, but covers most 9961# of the ones we need for now. 9962AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9963AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9964if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9965 AC_MSG_RESULT([no]) 9966else 9967 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9968 RAWCPPFLAGS=-undef 9969 AC_MSG_RESULT([yes]) 9970 # under Cygwin unix is still defined even with -undef 9971 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9972 RAWCPPFLAGS="-undef -ansi" 9973 AC_MSG_RESULT([yes, with -ansi]) 9974 else 9975 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9976 fi 9977fi 9978rm -f conftest.$ac_ext 9979 9980AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9981AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9982if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9983 AC_MSG_RESULT([no]) 9984else 9985 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9986 TRADITIONALCPPFLAGS="-traditional" 9987 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9988 AC_MSG_RESULT([yes]) 9989 else 9990 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9991 fi 9992fi 9993rm -f conftest.$ac_ext 9994AC_SUBST(RAWCPPFLAGS) 9995AC_SUBST(TRADITIONALCPPFLAGS) 9996]) # XORG_PROG_RAWCPP 9997 9998# XORG_MANPAGE_SECTIONS() 9999# ----------------------- 10000# Minimum version: 1.0.0 10001# 10002# Determine which sections man pages go in for the different man page types 10003# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10004# Not sure if there's any better way than just hardcoding by OS name. 10005# Override default settings by setting environment variables 10006# Added MAN_SUBSTS in version 1.8 10007# Added AC_PROG_SED in version 1.8 10008 10009AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10010AC_REQUIRE([AC_CANONICAL_HOST]) 10011AC_REQUIRE([AC_PROG_SED]) 10012 10013if test x$APP_MAN_SUFFIX = x ; then 10014 APP_MAN_SUFFIX=1 10015fi 10016if test x$APP_MAN_DIR = x ; then 10017 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10018fi 10019 10020if test x$LIB_MAN_SUFFIX = x ; then 10021 LIB_MAN_SUFFIX=3 10022fi 10023if test x$LIB_MAN_DIR = x ; then 10024 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10025fi 10026 10027if test x$FILE_MAN_SUFFIX = x ; then 10028 case $host_os in 10029 solaris*) FILE_MAN_SUFFIX=4 ;; 10030 *) FILE_MAN_SUFFIX=5 ;; 10031 esac 10032fi 10033if test x$FILE_MAN_DIR = x ; then 10034 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10035fi 10036 10037if test x$MISC_MAN_SUFFIX = x ; then 10038 case $host_os in 10039 solaris*) MISC_MAN_SUFFIX=5 ;; 10040 *) MISC_MAN_SUFFIX=7 ;; 10041 esac 10042fi 10043if test x$MISC_MAN_DIR = x ; then 10044 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10045fi 10046 10047if test x$DRIVER_MAN_SUFFIX = x ; then 10048 case $host_os in 10049 solaris*) DRIVER_MAN_SUFFIX=7 ;; 10050 *) DRIVER_MAN_SUFFIX=4 ;; 10051 esac 10052fi 10053if test x$DRIVER_MAN_DIR = x ; then 10054 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10055fi 10056 10057if test x$ADMIN_MAN_SUFFIX = x ; then 10058 case $host_os in 10059 solaris*) ADMIN_MAN_SUFFIX=1m ;; 10060 *) ADMIN_MAN_SUFFIX=8 ;; 10061 esac 10062fi 10063if test x$ADMIN_MAN_DIR = x ; then 10064 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10065fi 10066 10067 10068AC_SUBST([APP_MAN_SUFFIX]) 10069AC_SUBST([LIB_MAN_SUFFIX]) 10070AC_SUBST([FILE_MAN_SUFFIX]) 10071AC_SUBST([MISC_MAN_SUFFIX]) 10072AC_SUBST([DRIVER_MAN_SUFFIX]) 10073AC_SUBST([ADMIN_MAN_SUFFIX]) 10074AC_SUBST([APP_MAN_DIR]) 10075AC_SUBST([LIB_MAN_DIR]) 10076AC_SUBST([FILE_MAN_DIR]) 10077AC_SUBST([MISC_MAN_DIR]) 10078AC_SUBST([DRIVER_MAN_DIR]) 10079AC_SUBST([ADMIN_MAN_DIR]) 10080 10081XORG_MAN_PAGE="X Version 11" 10082AC_SUBST([XORG_MAN_PAGE]) 10083MAN_SUBSTS="\ 10084 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10085 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10086 -e 's|__xservername__|Xorg|g' \ 10087 -e 's|__xconfigfile__|xorg.conf|g' \ 10088 -e 's|__projectroot__|\$(prefix)|g' \ 10089 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10090 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10091 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10092 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10093 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10094 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10095 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10096AC_SUBST([MAN_SUBSTS]) 10097 10098]) # XORG_MANPAGE_SECTIONS 10099 10100# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10101# ------------------------ 10102# Minimum version: 1.7.0 10103# 10104# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10105# provided by xorg-sgml-doctools, if installed. 10106AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10107AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10108XORG_SGML_PATH= 10109PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10110 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10111 [m4_ifval([$1],[:], 10112 [if test x"$cross_compiling" != x"yes" ; then 10113 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10114 [XORG_SGML_PATH=$prefix/share/sgml]) 10115 fi]) 10116 ]) 10117 10118# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10119# the path and the name of the doc stylesheet 10120if test "x$XORG_SGML_PATH" != "x" ; then 10121 AC_MSG_RESULT([$XORG_SGML_PATH]) 10122 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10123 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10124else 10125 AC_MSG_RESULT([no]) 10126fi 10127 10128AC_SUBST(XORG_SGML_PATH) 10129AC_SUBST(STYLESHEET_SRCDIR) 10130AC_SUBST(XSL_STYLESHEET) 10131AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10132]) # XORG_CHECK_SGML_DOCTOOLS 10133 10134# XORG_CHECK_LINUXDOC 10135# ------------------- 10136# Minimum version: 1.0.0 10137# 10138# Defines the variable MAKE_TEXT if the necessary tools and 10139# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10140# Whether or not the necessary tools and files are found can be checked 10141# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10142AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10143AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10144AC_REQUIRE([XORG_WITH_PS2PDF]) 10145 10146AC_PATH_PROG(LINUXDOC, linuxdoc) 10147 10148AC_MSG_CHECKING([whether to build documentation]) 10149 10150if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10151 BUILDDOC=yes 10152else 10153 BUILDDOC=no 10154fi 10155 10156AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10157 10158AC_MSG_RESULT([$BUILDDOC]) 10159 10160AC_MSG_CHECKING([whether to build pdf documentation]) 10161 10162if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10163 BUILDPDFDOC=yes 10164else 10165 BUILDPDFDOC=no 10166fi 10167 10168AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10169 10170AC_MSG_RESULT([$BUILDPDFDOC]) 10171 10172MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10173MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10174MAKE_PDF="$PS2PDF" 10175MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10176 10177AC_SUBST(MAKE_TEXT) 10178AC_SUBST(MAKE_PS) 10179AC_SUBST(MAKE_PDF) 10180AC_SUBST(MAKE_HTML) 10181]) # XORG_CHECK_LINUXDOC 10182 10183# XORG_CHECK_DOCBOOK 10184# ------------------- 10185# Minimum version: 1.0.0 10186# 10187# Checks for the ability to build output formats from SGML DocBook source. 10188# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10189# indicates whether the necessary tools and files are found and, if set, 10190# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10191AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10192AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10193 10194BUILDTXTDOC=no 10195BUILDPDFDOC=no 10196BUILDPSDOC=no 10197BUILDHTMLDOC=no 10198 10199AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10200AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10201AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10202AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10203 10204AC_MSG_CHECKING([whether to build text documentation]) 10205if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10206 test x$BUILD_TXTDOC != xno; then 10207 BUILDTXTDOC=yes 10208fi 10209AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10210AC_MSG_RESULT([$BUILDTXTDOC]) 10211 10212AC_MSG_CHECKING([whether to build PDF documentation]) 10213if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10214 test x$BUILD_PDFDOC != xno; then 10215 BUILDPDFDOC=yes 10216fi 10217AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10218AC_MSG_RESULT([$BUILDPDFDOC]) 10219 10220AC_MSG_CHECKING([whether to build PostScript documentation]) 10221if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10222 test x$BUILD_PSDOC != xno; then 10223 BUILDPSDOC=yes 10224fi 10225AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10226AC_MSG_RESULT([$BUILDPSDOC]) 10227 10228AC_MSG_CHECKING([whether to build HTML documentation]) 10229if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10230 test x$BUILD_HTMLDOC != xno; then 10231 BUILDHTMLDOC=yes 10232fi 10233AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10234AC_MSG_RESULT([$BUILDHTMLDOC]) 10235 10236MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10237MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10238MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10239MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10240 10241AC_SUBST(MAKE_TEXT) 10242AC_SUBST(MAKE_PS) 10243AC_SUBST(MAKE_PDF) 10244AC_SUBST(MAKE_HTML) 10245]) # XORG_CHECK_DOCBOOK 10246 10247# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10248# ---------------- 10249# Minimum version: 1.5.0 10250# Minimum version for optional DEFAULT argument: 1.11.0 10251# 10252# Documentation tools are not always available on all platforms and sometimes 10253# not at the appropriate level. This macro enables a module to test for the 10254# presence of the tool and obtain it's path in separate variables. Coupled with 10255# the --with-xmlto option, it allows maximum flexibilty in making decisions 10256# as whether or not to use the xmlto package. When DEFAULT is not specified, 10257# --with-xmlto assumes 'auto'. 10258# 10259# Interface to module: 10260# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10261# XMLTO: returns the path of the xmlto program found 10262# returns the path set by the user in the environment 10263# --with-xmlto: 'yes' user instructs the module to use xmlto 10264# 'no' user instructs the module not to use xmlto 10265# 10266# Added in version 1.10.0 10267# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10268# xmlto for text output requires either lynx, links, or w3m browsers 10269# 10270# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10271# 10272AC_DEFUN([XORG_WITH_XMLTO],[ 10273AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10274m4_define([_defopt], m4_default([$2], [auto])) 10275AC_ARG_WITH(xmlto, 10276 AS_HELP_STRING([--with-xmlto], 10277 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10278 [use_xmlto=$withval], [use_xmlto=]_defopt) 10279m4_undefine([_defopt]) 10280 10281if test "x$use_xmlto" = x"auto"; then 10282 AC_PATH_PROG([XMLTO], [xmlto]) 10283 if test "x$XMLTO" = "x"; then 10284 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10285 have_xmlto=no 10286 else 10287 have_xmlto=yes 10288 fi 10289elif test "x$use_xmlto" = x"yes" ; then 10290 AC_PATH_PROG([XMLTO], [xmlto]) 10291 if test "x$XMLTO" = "x"; then 10292 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10293 fi 10294 have_xmlto=yes 10295elif test "x$use_xmlto" = x"no" ; then 10296 if test "x$XMLTO" != "x"; then 10297 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10298 fi 10299 have_xmlto=no 10300else 10301 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10302fi 10303 10304# Test for a minimum version of xmlto, if provided. 10305m4_ifval([$1], 10306[if test "$have_xmlto" = yes; then 10307 # scrape the xmlto version 10308 AC_MSG_CHECKING([the xmlto version]) 10309 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10310 AC_MSG_RESULT([$xmlto_version]) 10311 AS_VERSION_COMPARE([$xmlto_version], [$1], 10312 [if test "x$use_xmlto" = xauto; then 10313 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10314 have_xmlto=no 10315 else 10316 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10317 fi]) 10318fi]) 10319 10320# Test for the ability of xmlto to generate a text target 10321have_xmlto_text=no 10322cat > conftest.xml << "EOF" 10323EOF 10324AS_IF([test "$have_xmlto" = yes], 10325 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10326 [have_xmlto_text=yes], 10327 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10328rm -f conftest.xml 10329AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10330AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10331]) # XORG_WITH_XMLTO 10332 10333# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10334# -------------------------------------------- 10335# Minimum version: 1.12.0 10336# Minimum version for optional DEFAULT argument: 1.12.0 10337# 10338# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10339# XML-based language used for the transformation of XML documents. 10340# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10341# It is used under the cover by xmlto to generate html files from DocBook/XML. 10342# The XSLT processor is often used as a standalone tool for transformations. 10343# It should not be assumed that this tool is used only to work with documnetation. 10344# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10345# 10346# Interface to module: 10347# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10348# XSLTPROC: returns the path of the xsltproc program found 10349# returns the path set by the user in the environment 10350# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10351# 'no' user instructs the module not to use xsltproc 10352# have_xsltproc: returns yes if xsltproc found in PATH or no 10353# 10354# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10355# 10356AC_DEFUN([XORG_WITH_XSLTPROC],[ 10357AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10358# Preserves the interface, should it be implemented later 10359m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10360m4_define([_defopt], m4_default([$2], [auto])) 10361AC_ARG_WITH(xsltproc, 10362 AS_HELP_STRING([--with-xsltproc], 10363 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10364 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10365m4_undefine([_defopt]) 10366 10367if test "x$use_xsltproc" = x"auto"; then 10368 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10369 if test "x$XSLTPROC" = "x"; then 10370 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10371 have_xsltproc=no 10372 else 10373 have_xsltproc=yes 10374 fi 10375elif test "x$use_xsltproc" = x"yes" ; then 10376 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10377 if test "x$XSLTPROC" = "x"; then 10378 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10379 fi 10380 have_xsltproc=yes 10381elif test "x$use_xsltproc" = x"no" ; then 10382 if test "x$XSLTPROC" != "x"; then 10383 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10384 fi 10385 have_xsltproc=no 10386else 10387 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10388fi 10389 10390AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10391]) # XORG_WITH_XSLTPROC 10392 10393# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10394# ---------------------------------------- 10395# Minimum version: 1.15.0 10396# 10397# PERL (Practical Extraction and Report Language) is a language optimized for 10398# scanning arbitrary text files, extracting information from those text files, 10399# and printing reports based on that information. 10400# 10401# When DEFAULT is not specified, --with-perl assumes 'auto'. 10402# 10403# Interface to module: 10404# HAVE_PERL: used in makefiles to conditionally scan text files 10405# PERL: returns the path of the perl program found 10406# returns the path set by the user in the environment 10407# --with-perl: 'yes' user instructs the module to use perl 10408# 'no' user instructs the module not to use perl 10409# have_perl: returns yes if perl found in PATH or no 10410# 10411# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10412# 10413AC_DEFUN([XORG_WITH_PERL],[ 10414AC_ARG_VAR([PERL], [Path to perl command]) 10415# Preserves the interface, should it be implemented later 10416m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10417m4_define([_defopt], m4_default([$2], [auto])) 10418AC_ARG_WITH(perl, 10419 AS_HELP_STRING([--with-perl], 10420 [Use perl for extracting information from files (default: ]_defopt[)]), 10421 [use_perl=$withval], [use_perl=]_defopt) 10422m4_undefine([_defopt]) 10423 10424if test "x$use_perl" = x"auto"; then 10425 AC_PATH_PROG([PERL], [perl]) 10426 if test "x$PERL" = "x"; then 10427 AC_MSG_WARN([perl not found - cannot extract information and report]) 10428 have_perl=no 10429 else 10430 have_perl=yes 10431 fi 10432elif test "x$use_perl" = x"yes" ; then 10433 AC_PATH_PROG([PERL], [perl]) 10434 if test "x$PERL" = "x"; then 10435 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10436 fi 10437 have_perl=yes 10438elif test "x$use_perl" = x"no" ; then 10439 if test "x$PERL" != "x"; then 10440 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10441 fi 10442 have_perl=no 10443else 10444 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10445fi 10446 10447AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10448]) # XORG_WITH_PERL 10449 10450# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10451# ---------------- 10452# Minimum version: 1.5.0 10453# Minimum version for optional DEFAULT argument: 1.11.0 10454# 10455# Documentation tools are not always available on all platforms and sometimes 10456# not at the appropriate level. This macro enables a module to test for the 10457# presence of the tool and obtain it's path in separate variables. Coupled with 10458# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10459# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10460# --with-asciidoc assumes 'auto'. 10461# 10462# Interface to module: 10463# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10464# ASCIIDOC: returns the path of the asciidoc program found 10465# returns the path set by the user in the environment 10466# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10467# 'no' user instructs the module not to use asciidoc 10468# 10469# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10470# 10471AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10472AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10473m4_define([_defopt], m4_default([$2], [auto])) 10474AC_ARG_WITH(asciidoc, 10475 AS_HELP_STRING([--with-asciidoc], 10476 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10477 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10478m4_undefine([_defopt]) 10479 10480if test "x$use_asciidoc" = x"auto"; then 10481 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10482 if test "x$ASCIIDOC" = "x"; then 10483 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10484 have_asciidoc=no 10485 else 10486 have_asciidoc=yes 10487 fi 10488elif test "x$use_asciidoc" = x"yes" ; then 10489 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10490 if test "x$ASCIIDOC" = "x"; then 10491 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10492 fi 10493 have_asciidoc=yes 10494elif test "x$use_asciidoc" = x"no" ; then 10495 if test "x$ASCIIDOC" != "x"; then 10496 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10497 fi 10498 have_asciidoc=no 10499else 10500 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10501fi 10502m4_ifval([$1], 10503[if test "$have_asciidoc" = yes; then 10504 # scrape the asciidoc version 10505 AC_MSG_CHECKING([the asciidoc version]) 10506 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10507 AC_MSG_RESULT([$asciidoc_version]) 10508 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10509 [if test "x$use_asciidoc" = xauto; then 10510 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10511 have_asciidoc=no 10512 else 10513 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10514 fi]) 10515fi]) 10516AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10517]) # XORG_WITH_ASCIIDOC 10518 10519# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10520# ------------------------------------------- 10521# Minimum version: 1.5.0 10522# Minimum version for optional DEFAULT argument: 1.11.0 10523# Minimum version for optional DOT checking: 1.18.0 10524# 10525# Documentation tools are not always available on all platforms and sometimes 10526# not at the appropriate level. This macro enables a module to test for the 10527# presence of the tool and obtain it's path in separate variables. Coupled with 10528# the --with-doxygen option, it allows maximum flexibilty in making decisions 10529# as whether or not to use the doxygen package. When DEFAULT is not specified, 10530# --with-doxygen assumes 'auto'. 10531# 10532# Interface to module: 10533# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10534# DOXYGEN: returns the path of the doxygen program found 10535# returns the path set by the user in the environment 10536# --with-doxygen: 'yes' user instructs the module to use doxygen 10537# 'no' user instructs the module not to use doxygen 10538# 10539# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10540# 10541AC_DEFUN([XORG_WITH_DOXYGEN],[ 10542AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10543AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10544m4_define([_defopt], m4_default([$2], [auto])) 10545AC_ARG_WITH(doxygen, 10546 AS_HELP_STRING([--with-doxygen], 10547 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10548 [use_doxygen=$withval], [use_doxygen=]_defopt) 10549m4_undefine([_defopt]) 10550 10551if test "x$use_doxygen" = x"auto"; then 10552 AC_PATH_PROG([DOXYGEN], [doxygen]) 10553 if test "x$DOXYGEN" = "x"; then 10554 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10555 have_doxygen=no 10556 else 10557 have_doxygen=yes 10558 fi 10559elif test "x$use_doxygen" = x"yes" ; then 10560 AC_PATH_PROG([DOXYGEN], [doxygen]) 10561 if test "x$DOXYGEN" = "x"; then 10562 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10563 fi 10564 have_doxygen=yes 10565elif test "x$use_doxygen" = x"no" ; then 10566 if test "x$DOXYGEN" != "x"; then 10567 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10568 fi 10569 have_doxygen=no 10570else 10571 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10572fi 10573m4_ifval([$1], 10574[if test "$have_doxygen" = yes; then 10575 # scrape the doxygen version 10576 AC_MSG_CHECKING([the doxygen version]) 10577 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10578 AC_MSG_RESULT([$doxygen_version]) 10579 AS_VERSION_COMPARE([$doxygen_version], [$1], 10580 [if test "x$use_doxygen" = xauto; then 10581 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10582 have_doxygen=no 10583 else 10584 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10585 fi]) 10586fi]) 10587 10588dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10589dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10590dnl HAVE_DOT = @HAVE_DOT@ 10591HAVE_DOT=no 10592if test "x$have_doxygen" = "xyes"; then 10593 AC_PATH_PROG([DOT], [dot]) 10594 if test "x$DOT" != "x"; then 10595 HAVE_DOT=yes 10596 fi 10597fi 10598 10599AC_SUBST([HAVE_DOT]) 10600AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10601AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10602]) # XORG_WITH_DOXYGEN 10603 10604# XORG_WITH_GROFF([DEFAULT]) 10605# ---------------- 10606# Minimum version: 1.6.0 10607# Minimum version for optional DEFAULT argument: 1.11.0 10608# 10609# Documentation tools are not always available on all platforms and sometimes 10610# not at the appropriate level. This macro enables a module to test for the 10611# presence of the tool and obtain it's path in separate variables. Coupled with 10612# the --with-groff option, it allows maximum flexibilty in making decisions 10613# as whether or not to use the groff package. When DEFAULT is not specified, 10614# --with-groff assumes 'auto'. 10615# 10616# Interface to module: 10617# HAVE_GROFF: used in makefiles to conditionally generate documentation 10618# HAVE_GROFF_MM: the memorandum macros (-mm) package 10619# HAVE_GROFF_MS: the -ms macros package 10620# GROFF: returns the path of the groff program found 10621# returns the path set by the user in the environment 10622# --with-groff: 'yes' user instructs the module to use groff 10623# 'no' user instructs the module not to use groff 10624# 10625# Added in version 1.9.0: 10626# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10627# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10628# psselect from the psutils package. 10629# the ghostcript package. Refer to the grohtml man pages 10630# 10631# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10632# 10633# OS and distros often splits groff in a basic and full package, the former 10634# having the groff program and the later having devices, fonts and macros 10635# Checking for the groff executable is not enough. 10636# 10637# If macros are missing, we cannot assume that groff is useless, so we don't 10638# unset HAVE_GROFF or GROFF env variables. 10639# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10640# 10641AC_DEFUN([XORG_WITH_GROFF],[ 10642AC_ARG_VAR([GROFF], [Path to groff command]) 10643m4_define([_defopt], m4_default([$1], [auto])) 10644AC_ARG_WITH(groff, 10645 AS_HELP_STRING([--with-groff], 10646 [Use groff to regenerate documentation (default: ]_defopt[)]), 10647 [use_groff=$withval], [use_groff=]_defopt) 10648m4_undefine([_defopt]) 10649 10650if test "x$use_groff" = x"auto"; then 10651 AC_PATH_PROG([GROFF], [groff]) 10652 if test "x$GROFF" = "x"; then 10653 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10654 have_groff=no 10655 else 10656 have_groff=yes 10657 fi 10658elif test "x$use_groff" = x"yes" ; then 10659 AC_PATH_PROG([GROFF], [groff]) 10660 if test "x$GROFF" = "x"; then 10661 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10662 fi 10663 have_groff=yes 10664elif test "x$use_groff" = x"no" ; then 10665 if test "x$GROFF" != "x"; then 10666 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10667 fi 10668 have_groff=no 10669else 10670 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10671fi 10672 10673# We have groff, test for the presence of the macro packages 10674if test "x$have_groff" = x"yes"; then 10675 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10676 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10677 groff_ms_works=yes 10678 else 10679 groff_ms_works=no 10680 fi 10681 AC_MSG_RESULT([$groff_ms_works]) 10682 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10683 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10684 groff_mm_works=yes 10685 else 10686 groff_mm_works=no 10687 fi 10688 AC_MSG_RESULT([$groff_mm_works]) 10689fi 10690 10691# We have groff, test for HTML dependencies, one command per package 10692if test "x$have_groff" = x"yes"; then 10693 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10694 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10695 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10696 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10697 have_groff_html=yes 10698 else 10699 have_groff_html=no 10700 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10701 fi 10702fi 10703 10704# Set Automake conditionals for Makefiles 10705AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10706AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10707AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10708AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10709]) # XORG_WITH_GROFF 10710 10711# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10712# --------------------------------------- 10713# Minimum version: 1.6.0 10714# Minimum version for optional DEFAULT argument: 1.11.0 10715# Minimum version for optional MIN-VERSION argument: 1.15.0 10716# 10717# Documentation tools are not always available on all platforms and sometimes 10718# not at the appropriate level. This macro enables a module to test for the 10719# presence of the tool and obtain it's path in separate variables. Coupled with 10720# the --with-fop option, it allows maximum flexibilty in making decisions 10721# as whether or not to use the fop package. When DEFAULT is not specified, 10722# --with-fop assumes 'auto'. 10723# 10724# Interface to module: 10725# HAVE_FOP: used in makefiles to conditionally generate documentation 10726# FOP: returns the path of the fop program found 10727# returns the path set by the user in the environment 10728# --with-fop: 'yes' user instructs the module to use fop 10729# 'no' user instructs the module not to use fop 10730# 10731# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10732# 10733AC_DEFUN([XORG_WITH_FOP],[ 10734AC_ARG_VAR([FOP], [Path to fop command]) 10735m4_define([_defopt], m4_default([$2], [auto])) 10736AC_ARG_WITH(fop, 10737 AS_HELP_STRING([--with-fop], 10738 [Use fop to regenerate documentation (default: ]_defopt[)]), 10739 [use_fop=$withval], [use_fop=]_defopt) 10740m4_undefine([_defopt]) 10741 10742if test "x$use_fop" = x"auto"; then 10743 AC_PATH_PROG([FOP], [fop]) 10744 if test "x$FOP" = "x"; then 10745 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10746 have_fop=no 10747 else 10748 have_fop=yes 10749 fi 10750elif test "x$use_fop" = x"yes" ; then 10751 AC_PATH_PROG([FOP], [fop]) 10752 if test "x$FOP" = "x"; then 10753 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10754 fi 10755 have_fop=yes 10756elif test "x$use_fop" = x"no" ; then 10757 if test "x$FOP" != "x"; then 10758 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10759 fi 10760 have_fop=no 10761else 10762 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10763fi 10764 10765# Test for a minimum version of fop, if provided. 10766m4_ifval([$1], 10767[if test "$have_fop" = yes; then 10768 # scrape the fop version 10769 AC_MSG_CHECKING([for fop minimum version]) 10770 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10771 AC_MSG_RESULT([$fop_version]) 10772 AS_VERSION_COMPARE([$fop_version], [$1], 10773 [if test "x$use_fop" = xauto; then 10774 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10775 have_fop=no 10776 else 10777 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10778 fi]) 10779fi]) 10780AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10781]) # XORG_WITH_FOP 10782 10783# XORG_WITH_M4([MIN-VERSION]) 10784# --------------------------- 10785# Minimum version: 1.19.0 10786# 10787# This macro attempts to locate an m4 macro processor which supports 10788# -I option and is only useful for modules relying on M4 in order to 10789# expand macros in source code files. 10790# 10791# Interface to module: 10792# M4: returns the path of the m4 program found 10793# returns the path set by the user in the environment 10794# 10795AC_DEFUN([XORG_WITH_M4], [ 10796AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10797 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10798 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10799 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10800 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10801 [$PATH:/usr/gnu/bin])]) 10802 10803AC_SUBST([M4], [$ac_cv_path_M4]) 10804]) # XORG_WITH_M4 10805 10806# XORG_WITH_PS2PDF([DEFAULT]) 10807# ---------------- 10808# Minimum version: 1.6.0 10809# Minimum version for optional DEFAULT argument: 1.11.0 10810# 10811# Documentation tools are not always available on all platforms and sometimes 10812# not at the appropriate level. This macro enables a module to test for the 10813# presence of the tool and obtain it's path in separate variables. Coupled with 10814# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10815# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10816# --with-ps2pdf assumes 'auto'. 10817# 10818# Interface to module: 10819# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10820# PS2PDF: returns the path of the ps2pdf program found 10821# returns the path set by the user in the environment 10822# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10823# 'no' user instructs the module not to use ps2pdf 10824# 10825# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10826# 10827AC_DEFUN([XORG_WITH_PS2PDF],[ 10828AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10829m4_define([_defopt], m4_default([$1], [auto])) 10830AC_ARG_WITH(ps2pdf, 10831 AS_HELP_STRING([--with-ps2pdf], 10832 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10833 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10834m4_undefine([_defopt]) 10835 10836if test "x$use_ps2pdf" = x"auto"; then 10837 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10838 if test "x$PS2PDF" = "x"; then 10839 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10840 have_ps2pdf=no 10841 else 10842 have_ps2pdf=yes 10843 fi 10844elif test "x$use_ps2pdf" = x"yes" ; then 10845 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10846 if test "x$PS2PDF" = "x"; then 10847 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10848 fi 10849 have_ps2pdf=yes 10850elif test "x$use_ps2pdf" = x"no" ; then 10851 if test "x$PS2PDF" != "x"; then 10852 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10853 fi 10854 have_ps2pdf=no 10855else 10856 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10857fi 10858AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10859]) # XORG_WITH_PS2PDF 10860 10861# XORG_ENABLE_DOCS (enable_docs=yes) 10862# ---------------- 10863# Minimum version: 1.6.0 10864# 10865# Documentation tools are not always available on all platforms and sometimes 10866# not at the appropriate level. This macro enables a builder to skip all 10867# documentation targets except traditional man pages. 10868# Combined with the specific tool checking macros XORG_WITH_*, it provides 10869# maximum flexibilty in controlling documentation building. 10870# Refer to: 10871# XORG_WITH_XMLTO --with-xmlto 10872# XORG_WITH_ASCIIDOC --with-asciidoc 10873# XORG_WITH_DOXYGEN --with-doxygen 10874# XORG_WITH_FOP --with-fop 10875# XORG_WITH_GROFF --with-groff 10876# XORG_WITH_PS2PDF --with-ps2pdf 10877# 10878# Interface to module: 10879# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10880# --enable-docs: 'yes' user instructs the module to generate docs 10881# 'no' user instructs the module not to generate docs 10882# parm1: specify the default value, yes or no. 10883# 10884AC_DEFUN([XORG_ENABLE_DOCS],[ 10885m4_define([docs_default], m4_default([$1], [yes])) 10886AC_ARG_ENABLE(docs, 10887 AS_HELP_STRING([--enable-docs], 10888 [Enable building the documentation (default: ]docs_default[)]), 10889 [build_docs=$enableval], [build_docs=]docs_default) 10890m4_undefine([docs_default]) 10891AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10892AC_MSG_CHECKING([whether to build documentation]) 10893AC_MSG_RESULT([$build_docs]) 10894]) # XORG_ENABLE_DOCS 10895 10896# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10897# ---------------- 10898# Minimum version: 1.6.0 10899# 10900# This macro enables a builder to skip all developer documentation. 10901# Combined with the specific tool checking macros XORG_WITH_*, it provides 10902# maximum flexibilty in controlling documentation building. 10903# Refer to: 10904# XORG_WITH_XMLTO --with-xmlto 10905# XORG_WITH_ASCIIDOC --with-asciidoc 10906# XORG_WITH_DOXYGEN --with-doxygen 10907# XORG_WITH_FOP --with-fop 10908# XORG_WITH_GROFF --with-groff 10909# XORG_WITH_PS2PDF --with-ps2pdf 10910# 10911# Interface to module: 10912# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10913# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10914# 'no' user instructs the module not to generate developer docs 10915# parm1: specify the default value, yes or no. 10916# 10917AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10918m4_define([devel_default], m4_default([$1], [yes])) 10919AC_ARG_ENABLE(devel-docs, 10920 AS_HELP_STRING([--enable-devel-docs], 10921 [Enable building the developer documentation (default: ]devel_default[)]), 10922 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10923m4_undefine([devel_default]) 10924AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10925AC_MSG_CHECKING([whether to build developer documentation]) 10926AC_MSG_RESULT([$build_devel_docs]) 10927]) # XORG_ENABLE_DEVEL_DOCS 10928 10929# XORG_ENABLE_SPECS (enable_specs=yes) 10930# ---------------- 10931# Minimum version: 1.6.0 10932# 10933# This macro enables a builder to skip all functional specification targets. 10934# Combined with the specific tool checking macros XORG_WITH_*, it provides 10935# maximum flexibilty in controlling documentation building. 10936# Refer to: 10937# XORG_WITH_XMLTO --with-xmlto 10938# XORG_WITH_ASCIIDOC --with-asciidoc 10939# XORG_WITH_DOXYGEN --with-doxygen 10940# XORG_WITH_FOP --with-fop 10941# XORG_WITH_GROFF --with-groff 10942# XORG_WITH_PS2PDF --with-ps2pdf 10943# 10944# Interface to module: 10945# ENABLE_SPECS: used in makefiles to conditionally generate specs 10946# --enable-specs: 'yes' user instructs the module to generate specs 10947# 'no' user instructs the module not to generate specs 10948# parm1: specify the default value, yes or no. 10949# 10950AC_DEFUN([XORG_ENABLE_SPECS],[ 10951m4_define([spec_default], m4_default([$1], [yes])) 10952AC_ARG_ENABLE(specs, 10953 AS_HELP_STRING([--enable-specs], 10954 [Enable building the specs (default: ]spec_default[)]), 10955 [build_specs=$enableval], [build_specs=]spec_default) 10956m4_undefine([spec_default]) 10957AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10958AC_MSG_CHECKING([whether to build functional specifications]) 10959AC_MSG_RESULT([$build_specs]) 10960]) # XORG_ENABLE_SPECS 10961 10962# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10963# ---------------------------------------------- 10964# Minimum version: 1.13.0 10965# 10966# This macro enables a builder to enable/disable unit testing 10967# It makes no assumption about the test cases implementation 10968# Test cases may or may not use Automake "Support for test suites" 10969# They may or may not use the software utility library GLib 10970# 10971# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10972# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10973# The variable enable_unit_tests is used by other macros in this file. 10974# 10975# Interface to module: 10976# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10977# enable_unit_tests: used in configure.ac for additional configuration 10978# --enable-unit-tests: 'yes' user instructs the module to build tests 10979# 'no' user instructs the module not to build tests 10980# parm1: specify the default value, yes or no. 10981# 10982AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10983AC_BEFORE([$0], [XORG_WITH_GLIB]) 10984AC_BEFORE([$0], [XORG_LD_WRAP]) 10985AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10986m4_define([_defopt], m4_default([$1], [auto])) 10987AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10988 [Enable building unit test cases (default: ]_defopt[)]), 10989 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10990m4_undefine([_defopt]) 10991AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10992AC_MSG_CHECKING([whether to build unit test cases]) 10993AC_MSG_RESULT([$enable_unit_tests]) 10994]) # XORG_ENABLE_UNIT_TESTS 10995 10996# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10997# ------------------------------------------------------ 10998# Minimum version: 1.17.0 10999# 11000# This macro enables a builder to enable/disable integration testing 11001# It makes no assumption about the test cases' implementation 11002# Test cases may or may not use Automake "Support for test suites" 11003# 11004# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11005# usually requires less dependencies and may be built and run under less 11006# stringent environments than integration tests. 11007# 11008# Interface to module: 11009# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11010# enable_integration_tests: used in configure.ac for additional configuration 11011# --enable-integration-tests: 'yes' user instructs the module to build tests 11012# 'no' user instructs the module not to build tests 11013# parm1: specify the default value, yes or no. 11014# 11015AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11016AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11017m4_define([_defopt], m4_default([$1], [auto])) 11018AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11019 [Enable building integration test cases (default: ]_defopt[)]), 11020 [enable_integration_tests=$enableval], 11021 [enable_integration_tests=]_defopt) 11022m4_undefine([_defopt]) 11023AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11024 [test "x$enable_integration_tests" != xno]) 11025AC_MSG_CHECKING([whether to build unit test cases]) 11026AC_MSG_RESULT([$enable_integration_tests]) 11027]) # XORG_ENABLE_INTEGRATION_TESTS 11028 11029# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11030# ---------------------------------------- 11031# Minimum version: 1.13.0 11032# 11033# GLib is a library which provides advanced data structures and functions. 11034# This macro enables a module to test for the presence of Glib. 11035# 11036# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11037# Otherwise the value of $enable_unit_tests is blank. 11038# 11039# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11040# test support usually requires less dependencies and may be built and run under 11041# less stringent environments than integration tests. 11042# 11043# Interface to module: 11044# HAVE_GLIB: used in makefiles to conditionally build targets 11045# with_glib: used in configure.ac to know if GLib has been found 11046# --with-glib: 'yes' user instructs the module to use glib 11047# 'no' user instructs the module not to use glib 11048# 11049AC_DEFUN([XORG_WITH_GLIB],[ 11050AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11051m4_define([_defopt], m4_default([$2], [auto])) 11052AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11053 [Use GLib library for unit testing (default: ]_defopt[)]), 11054 [with_glib=$withval], [with_glib=]_defopt) 11055m4_undefine([_defopt]) 11056 11057have_glib=no 11058# Do not probe GLib if user explicitly disabled unit testing 11059if test "x$enable_unit_tests" != x"no"; then 11060 # Do not probe GLib if user explicitly disabled it 11061 if test "x$with_glib" != x"no"; then 11062 m4_ifval( 11063 [$1], 11064 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11065 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11066 ) 11067 fi 11068fi 11069 11070# Not having GLib when unit testing has been explicitly requested is an error 11071if test "x$enable_unit_tests" = x"yes"; then 11072 if test "x$have_glib" = x"no"; then 11073 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11074 fi 11075fi 11076 11077# Having unit testing disabled when GLib has been explicitly requested is an error 11078if test "x$enable_unit_tests" = x"no"; then 11079 if test "x$with_glib" = x"yes"; then 11080 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11081 fi 11082fi 11083 11084# Not having GLib when it has been explicitly requested is an error 11085if test "x$with_glib" = x"yes"; then 11086 if test "x$have_glib" = x"no"; then 11087 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11088 fi 11089fi 11090 11091AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11092]) # XORG_WITH_GLIB 11093 11094# XORG_LD_WRAP([required|optional]) 11095# --------------------------------- 11096# Minimum version: 1.13.0 11097# 11098# Check if linker supports -wrap, passed via compiler flags 11099# 11100# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11101# Otherwise the value of $enable_unit_tests is blank. 11102# 11103# Argument added in 1.16.0 - default is "required", to match existing behavior 11104# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11105# available, an argument of "optional" allows use when some unit tests require 11106# ld -wrap and others do not. 11107# 11108AC_DEFUN([XORG_LD_WRAP],[ 11109XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11110 [AC_LANG_PROGRAM([#include <stdlib.h> 11111 void __wrap_exit(int status) { return; }], 11112 [exit(0);])]) 11113# Not having ld wrap when unit testing has been explicitly requested is an error 11114if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11115 if test "x$have_ld_wrap" = x"no"; then 11116 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11117 fi 11118fi 11119AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11120# 11121]) # XORG_LD_WRAP 11122 11123# XORG_CHECK_LINKER_FLAGS 11124# ----------------------- 11125# SYNOPSIS 11126# 11127# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11128# 11129# DESCRIPTION 11130# 11131# Check whether the given linker FLAGS work with the current language's 11132# linker, or whether they give an error. 11133# 11134# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11135# success/failure. 11136# 11137# PROGRAM-SOURCE is the program source to link with, if needed 11138# 11139# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11140# 11141# LICENSE 11142# 11143# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11144# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11145# Copyright (c) 2009 Matteo Frigo 11146# 11147# This program is free software: you can redistribute it and/or modify it 11148# under the terms of the GNU General Public License as published by the 11149# Free Software Foundation, either version 3 of the License, or (at your 11150# option) any later version. 11151# 11152# This program is distributed in the hope that it will be useful, but 11153# WITHOUT ANY WARRANTY; without even the implied warranty of 11154# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11155# Public License for more details. 11156# 11157# You should have received a copy of the GNU General Public License along 11158# with this program. If not, see <http://www.gnu.org/licenses/>. 11159# 11160# As a special exception, the respective Autoconf Macro's copyright owner 11161# gives unlimited permission to copy, distribute and modify the configure 11162# scripts that are the output of Autoconf when processing the Macro. You 11163# need not follow the terms of the GNU General Public License when using 11164# or distributing such scripts, even though portions of the text of the 11165# Macro appear in them. The GNU General Public License (GPL) does govern 11166# all other use of the material that constitutes the Autoconf Macro. 11167# 11168# This special exception to the GPL applies to versions of the Autoconf 11169# Macro released by the Autoconf Archive. When you make and distribute a 11170# modified version of the Autoconf Macro, you may extend this special 11171# exception to the GPL to apply to your modified version as well.# 11172AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11173[AC_MSG_CHECKING([whether the linker accepts $1]) 11174dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11175AS_LITERAL_IF([$1], 11176 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11177 ax_save_FLAGS=$LDFLAGS 11178 LDFLAGS="$1" 11179 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11180 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11181 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11182 LDFLAGS=$ax_save_FLAGS])], 11183 [ax_save_FLAGS=$LDFLAGS 11184 LDFLAGS="$1" 11185 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11186 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11187 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11188 LDFLAGS=$ax_save_FLAGS]) 11189eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11190AC_MSG_RESULT($xorg_check_linker_flags) 11191if test "x$xorg_check_linker_flags" = xyes; then 11192 m4_default([$2], :) 11193else 11194 m4_default([$3], :) 11195fi 11196]) # XORG_CHECK_LINKER_FLAGS 11197 11198# XORG_MEMORY_CHECK_FLAGS 11199# ----------------------- 11200# Minimum version: 1.16.0 11201# 11202# This macro attempts to find appropriate memory checking functionality 11203# for various platforms which unit testing code may use to catch various 11204# forms of memory allocation and access errors in testing. 11205# 11206# Interface to module: 11207# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11208# Usually added to TESTS_ENVIRONMENT in Makefile.am 11209# 11210# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11211# 11212AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11213 11214AC_REQUIRE([AC_CANONICAL_HOST]) 11215AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11216 [Environment variables to enable memory checking in tests]) 11217 11218# Check for different types of support on different platforms 11219case $host_os in 11220 solaris*) 11221 AC_CHECK_LIB([umem], [umem_alloc], 11222 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11223 ;; 11224 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11225 # both directly and inverted, so should not be 0 or 255. 11226 malloc_debug_env='MALLOC_PERTURB_=15' 11227 ;; 11228 darwin*) 11229 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11230 ;; 11231 *bsd*) 11232 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11233 ;; 11234esac 11235 11236# User supplied flags override default flags 11237if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11238 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11239fi 11240 11241AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11242]) # XORG_WITH_LINT 11243 11244# XORG_CHECK_MALLOC_ZERO 11245# ---------------------- 11246# Minimum version: 1.0.0 11247# 11248# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11249# malloc(0) returns NULL. Packages should add one of these cflags to 11250# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11251AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11252AC_ARG_ENABLE(malloc0returnsnull, 11253 AS_HELP_STRING([--enable-malloc0returnsnull], 11254 [malloc(0) returns NULL (default: auto)]), 11255 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11256 [MALLOC_ZERO_RETURNS_NULL=auto]) 11257 11258AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11259if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11260AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11261 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11262#include <stdlib.h> 11263],[ 11264 char *m0, *r0, *c0, *p; 11265 m0 = malloc(0); 11266 p = malloc(10); 11267 r0 = realloc(p,0); 11268 c0 = calloc(0,10); 11269 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11270])], 11271 [xorg_cv_malloc0_returns_null=yes], 11272 [xorg_cv_malloc0_returns_null=no])]) 11273MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11274fi 11275AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11276 11277if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11278 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11279 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11280 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11281else 11282 MALLOC_ZERO_CFLAGS="" 11283 XMALLOC_ZERO_CFLAGS="" 11284 XTMALLOC_ZERO_CFLAGS="" 11285fi 11286 11287AC_SUBST([MALLOC_ZERO_CFLAGS]) 11288AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11289AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11290]) # XORG_CHECK_MALLOC_ZERO 11291 11292# XORG_WITH_LINT() 11293# ---------------- 11294# Minimum version: 1.1.0 11295# 11296# This macro enables the use of a tool that flags some suspicious and 11297# non-portable constructs (likely to be bugs) in C language source code. 11298# It will attempt to locate the tool and use appropriate options. 11299# There are various lint type tools on different platforms. 11300# 11301# Interface to module: 11302# LINT: returns the path to the tool found on the platform 11303# or the value set to LINT on the configure cmd line 11304# also an Automake conditional 11305# LINT_FLAGS: an Automake variable with appropriate flags 11306# 11307# --with-lint: 'yes' user instructs the module to use lint 11308# 'no' user instructs the module not to use lint (default) 11309# 11310# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11311# If the user sets the value of LINT_FLAGS, they are used verbatim. 11312# 11313AC_DEFUN([XORG_WITH_LINT],[ 11314 11315AC_ARG_VAR([LINT], [Path to a lint-style command]) 11316AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11317AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11318 [Use a lint-style source code checker (default: disabled)])], 11319 [use_lint=$withval], [use_lint=no]) 11320 11321# Obtain platform specific info like program name and options 11322# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11323case $host_os in 11324 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11325 lint_name=splint 11326 lint_options="-badflag" 11327 ;; 11328 *freebsd* | *netbsd*) 11329 lint_name=lint 11330 lint_options="-u -b" 11331 ;; 11332 *solaris*) 11333 lint_name=lint 11334 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11335 ;; 11336esac 11337 11338# Test for the presence of the program (either guessed by the code or spelled out by the user) 11339if test "x$use_lint" = x"yes" ; then 11340 AC_PATH_PROG([LINT], [$lint_name]) 11341 if test "x$LINT" = "x"; then 11342 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11343 fi 11344elif test "x$use_lint" = x"no" ; then 11345 if test "x$LINT" != "x"; then 11346 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11347 fi 11348else 11349 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11350fi 11351 11352# User supplied flags override default flags 11353if test "x$LINT_FLAGS" != "x"; then 11354 lint_options=$LINT_FLAGS 11355fi 11356 11357AC_SUBST([LINT_FLAGS],[$lint_options]) 11358AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11359 11360]) # XORG_WITH_LINT 11361 11362# XORG_LINT_LIBRARY(LIBNAME) 11363# -------------------------- 11364# Minimum version: 1.1.0 11365# 11366# Sets up flags for building lint libraries for checking programs that call 11367# functions in the library. 11368# 11369# Interface to module: 11370# LINTLIB - Automake variable with the name of lint library file to make 11371# MAKE_LINT_LIB - Automake conditional 11372# 11373# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11374# - 'no' user instructs the module not to create a lint library (default) 11375 11376AC_DEFUN([XORG_LINT_LIBRARY],[ 11377AC_REQUIRE([XORG_WITH_LINT]) 11378AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11379 [Create lint library (default: disabled)])], 11380 [make_lint_lib=$enableval], [make_lint_lib=no]) 11381 11382if test "x$make_lint_lib" = x"yes" ; then 11383 LINTLIB=llib-l$1.ln 11384 if test "x$LINT" = "x"; then 11385 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11386 fi 11387elif test "x$make_lint_lib" != x"no" ; then 11388 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11389fi 11390 11391AC_SUBST(LINTLIB) 11392AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11393 11394]) # XORG_LINT_LIBRARY 11395 11396# XORG_COMPILER_BRAND 11397# ------------------- 11398# Minimum version: 1.14.0 11399# 11400# Checks for various brands of compilers and sets flags as appropriate: 11401# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11402# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11403# clang compiler - sets CLANGCC to "yes" 11404# Intel compiler - sets INTELCC to "yes" 11405# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11406# 11407AC_DEFUN([XORG_COMPILER_BRAND], [ 11408AC_LANG_CASE( 11409 [C], [ 11410 AC_REQUIRE([AC_PROG_CC_C99]) 11411 ], 11412 [C++], [ 11413 AC_REQUIRE([AC_PROG_CXX]) 11414 ] 11415) 11416AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11417AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11418AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11419]) # XORG_COMPILER_BRAND 11420 11421# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11422# --------------- 11423# Minimum version: 1.16.0 11424# 11425# Test if the compiler works when passed the given flag as a command line argument. 11426# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11427# next flag in the list until there are no more options. 11428# 11429# Note that this does not guarantee that the compiler supports the flag as some 11430# compilers will simply ignore arguments that they do not understand, but we do 11431# attempt to weed out false positives by using -Werror=unknown-warning-option and 11432# -Werror=unused-command-line-argument 11433# 11434AC_DEFUN([XORG_TESTSET_CFLAG], [ 11435m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11436m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11437 11438AC_LANG_COMPILER_REQUIRE 11439 11440AC_LANG_CASE( 11441 [C], [ 11442 AC_REQUIRE([AC_PROG_CC_C99]) 11443 define([PREFIX], [C]) 11444 define([CACHE_PREFIX], [cc]) 11445 define([COMPILER], [$CC]) 11446 ], 11447 [C++], [ 11448 define([PREFIX], [CXX]) 11449 define([CACHE_PREFIX], [cxx]) 11450 define([COMPILER], [$CXX]) 11451 ] 11452) 11453 11454[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11455 11456if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11457 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11458 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11459 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11460 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11461 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11462 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11463 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11464 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11465fi 11466 11467if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11468 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11469 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11470 fi 11471 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11472 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11473 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11474 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11475 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11476 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11477 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11478 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11479fi 11480 11481found="no" 11482m4_foreach([flag], m4_cdr($@), [ 11483 if test $found = "no" ; then 11484 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11485 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11486 fi 11487 11488 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11489 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11490 fi 11491 11492 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11493 11494dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11495 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11496 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11497 AC_CACHE_VAL($cacheid, 11498 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11499 [eval $cacheid=yes], 11500 [eval $cacheid=no])]) 11501 11502 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11503 11504 eval supported=\$$cacheid 11505 AC_MSG_RESULT([$supported]) 11506 if test "$supported" = "yes" ; then 11507 $1="$$1 ]flag[" 11508 found="yes" 11509 fi 11510 fi 11511]) 11512]) # XORG_TESTSET_CFLAG 11513 11514# XORG_COMPILER_FLAGS 11515# --------------- 11516# Minimum version: 1.16.0 11517# 11518# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11519# arguments supported by the selected compiler which do NOT alter the generated 11520# code. These arguments will cause the compiler to print various warnings 11521# during compilation AND turn a conservative set of warnings into errors. 11522# 11523# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11524# future versions of util-macros as options are added to new compilers. 11525# 11526AC_DEFUN([XORG_COMPILER_FLAGS], [ 11527AC_REQUIRE([XORG_COMPILER_BRAND]) 11528 11529AC_ARG_ENABLE(selective-werror, 11530 AS_HELP_STRING([--disable-selective-werror], 11531 [Turn off selective compiler errors. (default: enabled)]), 11532 [SELECTIVE_WERROR=$enableval], 11533 [SELECTIVE_WERROR=yes]) 11534 11535AC_LANG_CASE( 11536 [C], [ 11537 define([PREFIX], [C]) 11538 ], 11539 [C++], [ 11540 define([PREFIX], [CXX]) 11541 ] 11542) 11543# -v is too short to test reliably with XORG_TESTSET_CFLAG 11544if test "x$SUNCC" = "xyes"; then 11545 [BASE_]PREFIX[FLAGS]="-v" 11546else 11547 [BASE_]PREFIX[FLAGS]="" 11548fi 11549 11550# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11551XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11552XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11553XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11554XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11555 11556AC_LANG_CASE( 11557 [C], [ 11558 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11559 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11560 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11561 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11562 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11563 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11564 ] 11565) 11566 11567# This chunk adds additional warnings that could catch undesired effects. 11568XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11569XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11570XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11571XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11572XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11573XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11574XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11575 11576# These are currently disabled because they are noisy. They will be enabled 11577# in the future once the codebase is sufficiently modernized to silence 11578# them. For now, I don't want them to drown out the other warnings. 11579# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11580# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11581# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11582 11583# Turn some warnings into errors, so we don't accidently get successful builds 11584# when there are problems that should be fixed. 11585 11586if test "x$SELECTIVE_WERROR" = "xyes" ; then 11587XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11588XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11589XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11590XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11591XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11592XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11593XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11594XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11595XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11596XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11597XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11598XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11599XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11600else 11601AC_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]) 11602XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11603XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11604XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11605XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11606XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11607XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11608XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11609XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11610XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11611XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11612XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11613XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11614XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11615fi 11616 11617AC_SUBST([BASE_]PREFIX[FLAGS]) 11618]) # XORG_COMPILER_FLAGS 11619 11620# XORG_CWARNFLAGS 11621# --------------- 11622# Minimum version: 1.2.0 11623# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11624# 11625# Defines CWARNFLAGS to enable C compiler warnings. 11626# 11627# This function is deprecated because it defines -fno-strict-aliasing 11628# which alters the code generated by the compiler. If -fno-strict-aliasing 11629# is needed, then it should be added explicitly in the module when 11630# it is updated to use BASE_CFLAGS. 11631# 11632AC_DEFUN([XORG_CWARNFLAGS], [ 11633AC_REQUIRE([XORG_COMPILER_FLAGS]) 11634AC_REQUIRE([XORG_COMPILER_BRAND]) 11635AC_LANG_CASE( 11636 [C], [ 11637 CWARNFLAGS="$BASE_CFLAGS" 11638 if test "x$GCC" = xyes ; then 11639 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11640 fi 11641 AC_SUBST(CWARNFLAGS) 11642 ] 11643) 11644]) # XORG_CWARNFLAGS 11645 11646# XORG_STRICT_OPTION 11647# ----------------------- 11648# Minimum version: 1.3.0 11649# 11650# Add configure option to enable strict compilation flags, such as treating 11651# warnings as fatal errors. 11652# If --enable-strict-compilation is passed to configure, adds strict flags to 11653# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11654# 11655# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11656# when strict compilation is unconditionally desired. 11657AC_DEFUN([XORG_STRICT_OPTION], [ 11658AC_REQUIRE([XORG_CWARNFLAGS]) 11659AC_REQUIRE([XORG_COMPILER_FLAGS]) 11660 11661AC_ARG_ENABLE(strict-compilation, 11662 AS_HELP_STRING([--enable-strict-compilation], 11663 [Enable all warnings from compiler and make them errors (default: disabled)]), 11664 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11665 11666AC_LANG_CASE( 11667 [C], [ 11668 define([PREFIX], [C]) 11669 ], 11670 [C++], [ 11671 define([PREFIX], [CXX]) 11672 ] 11673) 11674 11675[STRICT_]PREFIX[FLAGS]="" 11676XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11677XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11678 11679# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11680# activate it with -Werror, so we add it here explicitly. 11681XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11682 11683if test "x$STRICT_COMPILE" = "xyes"; then 11684 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11685 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11686fi 11687AC_SUBST([STRICT_]PREFIX[FLAGS]) 11688AC_SUBST([BASE_]PREFIX[FLAGS]) 11689AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11690]) # XORG_STRICT_OPTION 11691 11692# XORG_DEFAULT_OPTIONS 11693# -------------------- 11694# Minimum version: 1.3.0 11695# 11696# Defines default options for X.Org modules. 11697# 11698AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11699AC_REQUIRE([AC_PROG_INSTALL]) 11700XORG_COMPILER_FLAGS 11701XORG_CWARNFLAGS 11702XORG_STRICT_OPTION 11703XORG_RELEASE_VERSION 11704XORG_CHANGELOG 11705XORG_INSTALL 11706XORG_MANPAGE_SECTIONS 11707m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11708 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11709]) # XORG_DEFAULT_OPTIONS 11710 11711# XORG_INSTALL() 11712# ---------------- 11713# Minimum version: 1.4.0 11714# 11715# Defines the variable INSTALL_CMD as the command to copy 11716# INSTALL from $prefix/share/util-macros. 11717# 11718AC_DEFUN([XORG_INSTALL], [ 11719AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11720macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11721INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11722mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11723|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11724echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11725AC_SUBST([INSTALL_CMD]) 11726]) # XORG_INSTALL 11727dnl Copyright 2005 Red Hat, Inc 11728dnl 11729dnl Permission to use, copy, modify, distribute, and sell this software and its 11730dnl documentation for any purpose is hereby granted without fee, provided that 11731dnl the above copyright notice appear in all copies and that both that 11732dnl copyright notice and this permission notice appear in supporting 11733dnl documentation. 11734dnl 11735dnl The above copyright notice and this permission notice shall be included 11736dnl in all copies or substantial portions of the Software. 11737dnl 11738dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11739dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11740dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11741dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11742dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11743dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11744dnl OTHER DEALINGS IN THE SOFTWARE. 11745dnl 11746dnl Except as contained in this notice, the name of the copyright holders shall 11747dnl not be used in advertising or otherwise to promote the sale, use or 11748dnl other dealings in this Software without prior written authorization 11749dnl from the copyright holders. 11750dnl 11751 11752# XORG_RELEASE_VERSION 11753# -------------------- 11754# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11755 11756AC_DEFUN([XORG_RELEASE_VERSION],[ 11757 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11758 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11759 [Major version of this package]) 11760 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11761 if test "x$PVM" = "x"; then 11762 PVM="0" 11763 fi 11764 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11765 [$PVM], 11766 [Minor version of this package]) 11767 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11768 if test "x$PVP" = "x"; then 11769 PVP="0" 11770 fi 11771 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11772 [$PVP], 11773 [Patch version of this package]) 11774]) 11775 11776# XORG_CHANGELOG() 11777# ---------------- 11778# Minimum version: 1.2.0 11779# 11780# Defines the variable CHANGELOG_CMD as the command to generate 11781# ChangeLog from git. 11782# 11783# 11784AC_DEFUN([XORG_CHANGELOG], [ 11785CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11786mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11787|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11788echo 'git directory not found: installing possibly empty changelog.' >&2)" 11789AC_SUBST([CHANGELOG_CMD]) 11790]) # XORG_CHANGELOG 11791 11792