aclocal.m4 revision 26b1ff4e
1# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 2 3# Copyright (C) 1996-2013 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-2013 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.13' 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.13.4], [], 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.13.4])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-2013 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[dnl Rely on autoconf to set up CDPATH properly. 107AC_PREREQ([2.50])dnl 108# expand $ac_aux_dir to an absolute path 109am_aux_dir=`cd $ac_aux_dir && pwd` 110]) 111 112# AM_CONDITIONAL -*- Autoconf -*- 113 114# Copyright (C) 1997-2013 Free Software Foundation, Inc. 115# 116# This file is free software; the Free Software Foundation 117# gives unlimited permission to copy and/or distribute it, 118# with or without modifications, as long as this notice is preserved. 119 120# AM_CONDITIONAL(NAME, SHELL-CONDITION) 121# ------------------------------------- 122# Define a conditional. 123AC_DEFUN([AM_CONDITIONAL], 124[AC_PREREQ([2.52])dnl 125 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 126 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 127AC_SUBST([$1_TRUE])dnl 128AC_SUBST([$1_FALSE])dnl 129_AM_SUBST_NOTMAKE([$1_TRUE])dnl 130_AM_SUBST_NOTMAKE([$1_FALSE])dnl 131m4_define([_AM_COND_VALUE_$1], [$2])dnl 132if $2; then 133 $1_TRUE= 134 $1_FALSE='#' 135else 136 $1_TRUE='#' 137 $1_FALSE= 138fi 139AC_CONFIG_COMMANDS_PRE( 140[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 141 AC_MSG_ERROR([[conditional "$1" was never defined. 142Usually this means the macro was only invoked conditionally.]]) 143fi])]) 144 145# Copyright (C) 1999-2013 Free Software Foundation, Inc. 146# 147# This file is free software; the Free Software Foundation 148# gives unlimited permission to copy and/or distribute it, 149# with or without modifications, as long as this notice is preserved. 150 151 152# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 153# written in clear, in which case automake, when reading aclocal.m4, 154# will think it sees a *use*, and therefore will trigger all it's 155# C support machinery. Also note that it means that autoscan, seeing 156# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157 158 159# _AM_DEPENDENCIES(NAME) 160# ---------------------- 161# See how the compiler implements dependency checking. 162# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 163# We try a few techniques and use that to set a single cache variable. 164# 165# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 166# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 167# dependency, and given that the user is not expected to run this macro, 168# just rely on AC_PROG_CC. 169AC_DEFUN([_AM_DEPENDENCIES], 170[AC_REQUIRE([AM_SET_DEPDIR])dnl 171AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 172AC_REQUIRE([AM_MAKE_INCLUDE])dnl 173AC_REQUIRE([AM_DEP_TRACK])dnl 174 175m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 176 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 177 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 178 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 179 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 180 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 181 [depcc="$$1" am_compiler_list=]) 182 183AC_CACHE_CHECK([dependency style of $depcc], 184 [am_cv_$1_dependencies_compiler_type], 185[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 186 # We make a subdir and do the tests there. Otherwise we can end up 187 # making bogus files that we don't know about and never remove. For 188 # instance it was reported that on HP-UX the gcc test will end up 189 # making a dummy file named 'D' -- because '-MD' means "put the output 190 # in D". 191 rm -rf conftest.dir 192 mkdir conftest.dir 193 # Copy depcomp to subdir because otherwise we won't find it if we're 194 # using a relative directory. 195 cp "$am_depcomp" conftest.dir 196 cd conftest.dir 197 # We will build objects and dependencies in a subdirectory because 198 # it helps to detect inapplicable dependency modes. For instance 199 # both Tru64's cc and ICC support -MD to output dependencies as a 200 # side effect of compilation, but ICC will put the dependencies in 201 # the current directory while Tru64 will put them in the object 202 # directory. 203 mkdir sub 204 205 am_cv_$1_dependencies_compiler_type=none 206 if test "$am_compiler_list" = ""; then 207 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208 fi 209 am__universal=false 210 m4_case([$1], [CC], 211 [case " $depcc " in #( 212 *\ -arch\ *\ -arch\ *) am__universal=true ;; 213 esac], 214 [CXX], 215 [case " $depcc " in #( 216 *\ -arch\ *\ -arch\ *) am__universal=true ;; 217 esac]) 218 219 for depmode in $am_compiler_list; do 220 # Setup a source with many dependencies, because some compilers 221 # like to wrap large dependency lists on column 80 (with \), and 222 # we should not choose a depcomp mode which is confused by this. 223 # 224 # We need to recreate these files for each test, as the compiler may 225 # overwrite some of them when testing with obscure command lines. 226 # This happens at least with the AIX C compiler. 227 : > sub/conftest.c 228 for i in 1 2 3 4 5 6; do 229 echo '#include "conftst'$i'.h"' >> sub/conftest.c 230 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 231 # Solaris 10 /bin/sh. 232 echo '/* dummy */' > sub/conftst$i.h 233 done 234 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235 236 # We check with '-c' and '-o' for the sake of the "dashmstdout" 237 # mode. It turns out that the SunPro C++ compiler does not properly 238 # handle '-M -o', and we need to detect this. Also, some Intel 239 # versions had trouble with output in subdirs. 240 am__obj=sub/conftest.${OBJEXT-o} 241 am__minus_obj="-o $am__obj" 242 case $depmode in 243 gcc) 244 # This depmode causes a compiler race in universal mode. 245 test "$am__universal" = false || continue 246 ;; 247 nosideeffect) 248 # After this tag, mechanisms are not by side-effect, so they'll 249 # only be used when explicitly requested. 250 if test "x$enable_dependency_tracking" = xyes; then 251 continue 252 else 253 break 254 fi 255 ;; 256 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 257 # This compiler won't grok '-c -o', but also, the minuso test has 258 # not run yet. These depmodes are late enough in the game, and 259 # so weak that their functioning should not be impacted. 260 am__obj=conftest.${OBJEXT-o} 261 am__minus_obj= 262 ;; 263 none) break ;; 264 esac 265 if depmode=$depmode \ 266 source=sub/conftest.c object=$am__obj \ 267 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 268 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 269 >/dev/null 2>conftest.err && 270 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 271 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 272 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 273 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 274 # icc doesn't choke on unknown options, it will just issue warnings 275 # or remarks (even with -Werror). So we grep stderr for any message 276 # that says an option was ignored or not supported. 277 # When given -MP, icc 7.0 and 7.1 complain thusly: 278 # icc: Command line warning: ignoring option '-M'; no argument required 279 # The diagnosis changed in icc 8.0: 280 # icc: Command line remark: option '-MP' not supported 281 if (grep 'ignoring option' conftest.err || 282 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 283 am_cv_$1_dependencies_compiler_type=$depmode 284 break 285 fi 286 fi 287 done 288 289 cd .. 290 rm -rf conftest.dir 291else 292 am_cv_$1_dependencies_compiler_type=none 293fi 294]) 295AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 296AM_CONDITIONAL([am__fastdep$1], [ 297 test "x$enable_dependency_tracking" != xno \ 298 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 299]) 300 301 302# AM_SET_DEPDIR 303# ------------- 304# Choose a directory name for dependency files. 305# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 306AC_DEFUN([AM_SET_DEPDIR], 307[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 308AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 309]) 310 311 312# AM_DEP_TRACK 313# ------------ 314AC_DEFUN([AM_DEP_TRACK], 315[AC_ARG_ENABLE([dependency-tracking], [dnl 316AS_HELP_STRING( 317 [--enable-dependency-tracking], 318 [do not reject slow dependency extractors]) 319AS_HELP_STRING( 320 [--disable-dependency-tracking], 321 [speeds up one-time build])]) 322if test "x$enable_dependency_tracking" != xno; then 323 am_depcomp="$ac_aux_dir/depcomp" 324 AMDEPBACKSLASH='\' 325 am__nodep='_no' 326fi 327AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 328AC_SUBST([AMDEPBACKSLASH])dnl 329_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 330AC_SUBST([am__nodep])dnl 331_AM_SUBST_NOTMAKE([am__nodep])dnl 332]) 333 334# Generate code to set up dependency tracking. -*- Autoconf -*- 335 336# Copyright (C) 1999-2013 Free Software Foundation, Inc. 337# 338# This file is free software; the Free Software Foundation 339# gives unlimited permission to copy and/or distribute it, 340# with or without modifications, as long as this notice is preserved. 341 342 343# _AM_OUTPUT_DEPENDENCY_COMMANDS 344# ------------------------------ 345AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 346[{ 347 # Older Autoconf quotes --file arguments for eval, but not when files 348 # are listed without --file. Let's play safe and only enable the eval 349 # if we detect the quoting. 350 case $CONFIG_FILES in 351 *\'*) eval set x "$CONFIG_FILES" ;; 352 *) set x $CONFIG_FILES ;; 353 esac 354 shift 355 for mf 356 do 357 # Strip MF so we end up with the name of the file. 358 mf=`echo "$mf" | sed -e 's/:.*$//'` 359 # Check whether this is an Automake generated Makefile or not. 360 # We used to match only the files named 'Makefile.in', but 361 # some people rename them; so instead we look at the file content. 362 # Grep'ing the first line is not enough: some people post-process 363 # each Makefile.in and add a new line on top of each file to say so. 364 # Grep'ing the whole file is not good either: AIX grep has a line 365 # limit of 2048, but all sed's we know have understand at least 4000. 366 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 367 dirpart=`AS_DIRNAME("$mf")` 368 else 369 continue 370 fi 371 # Extract the definition of DEPDIR, am__include, and am__quote 372 # from the Makefile without running 'make'. 373 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 374 test -z "$DEPDIR" && continue 375 am__include=`sed -n 's/^am__include = //p' < "$mf"` 376 test -z "$am__include" && continue 377 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 378 # Find all dependency output files, they are included files with 379 # $(DEPDIR) in their names. We invoke sed twice because it is the 380 # simplest approach to changing $(DEPDIR) to its actual value in the 381 # expansion. 382 for file in `sed -n " 383 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 384 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 385 # Make sure the directory exists. 386 test -f "$dirpart/$file" && continue 387 fdir=`AS_DIRNAME(["$file"])` 388 AS_MKDIR_P([$dirpart/$fdir]) 389 # echo "creating $dirpart/$file" 390 echo '# dummy' > "$dirpart/$file" 391 done 392 done 393} 394])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395 396 397# AM_OUTPUT_DEPENDENCY_COMMANDS 398# ----------------------------- 399# This macro should only be invoked once -- use via AC_REQUIRE. 400# 401# This code is only required when automatic dependency tracking 402# is enabled. FIXME. This creates each '.P' file that we will 403# need in order to bootstrap the dependency handling code. 404AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 405[AC_CONFIG_COMMANDS([depfiles], 406 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 407 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408]) 409 410# Do all the work for Automake. -*- Autoconf -*- 411 412# Copyright (C) 1996-2013 Free Software Foundation, Inc. 413# 414# This file is free software; the Free Software Foundation 415# gives unlimited permission to copy and/or distribute it, 416# with or without modifications, as long as this notice is preserved. 417 418# This macro actually does too much. Some checks are only needed if 419# your package does certain things. But this isn't really a big deal. 420 421# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 422# AM_INIT_AUTOMAKE([OPTIONS]) 423# ----------------------------------------------- 424# The call with PACKAGE and VERSION arguments is the old style 425# call (pre autoconf-2.50), which is being phased out. PACKAGE 426# and VERSION should now be passed to AC_INIT and removed from 427# the call to AM_INIT_AUTOMAKE. 428# We support both call styles for the transition. After 429# the next Automake release, Autoconf can make the AC_INIT 430# arguments mandatory, and then we can depend on a new Autoconf 431# release and drop the old call support. 432AC_DEFUN([AM_INIT_AUTOMAKE], 433[AC_PREREQ([2.65])dnl 434dnl Autoconf wants to disallow AM_ names. We explicitly allow 435dnl the ones we care about. 436m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 437AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 438AC_REQUIRE([AC_PROG_INSTALL])dnl 439if test "`cd $srcdir && pwd`" != "`pwd`"; then 440 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 441 # is not polluted with repeated "-I." 442 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 443 # test to see if srcdir already configured 444 if test -f $srcdir/config.status; then 445 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 446 fi 447fi 448 449# test whether we have cygpath 450if test -z "$CYGPATH_W"; then 451 if (cygpath --version) >/dev/null 2>/dev/null; then 452 CYGPATH_W='cygpath -w' 453 else 454 CYGPATH_W=echo 455 fi 456fi 457AC_SUBST([CYGPATH_W]) 458 459# Define the identity of the package. 460dnl Distinguish between old-style and new-style calls. 461m4_ifval([$2], 462[AC_DIAGNOSE([obsolete], 463 [$0: two- and three-arguments forms are deprecated.]) 464m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465 AC_SUBST([PACKAGE], [$1])dnl 466 AC_SUBST([VERSION], [$2])], 467[_AM_SET_OPTIONS([$1])dnl 468dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469m4_if( 470 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 471 [ok:ok],, 472 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 473 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 474 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 475 476_AM_IF_OPTION([no-define],, 477[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 478 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 479 480# Some tools Automake needs. 481AC_REQUIRE([AM_SANITY_CHECK])dnl 482AC_REQUIRE([AC_ARG_PROGRAM])dnl 483AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 484AM_MISSING_PROG([AUTOCONF], [autoconf]) 485AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 486AM_MISSING_PROG([AUTOHEADER], [autoheader]) 487AM_MISSING_PROG([MAKEINFO], [makeinfo]) 488AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 489AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 490AC_REQUIRE([AC_PROG_MKDIR_P])dnl 491# For better backward compatibility. To be removed once Automake 1.9.x 492# dies out for good. For more background, see: 493# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 494# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 495AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 496# We need awk for the "check" target. The system "awk" is bad on 497# some platforms. 498AC_REQUIRE([AC_PROG_AWK])dnl 499AC_REQUIRE([AC_PROG_MAKE_SET])dnl 500AC_REQUIRE([AM_SET_LEADING_DOT])dnl 501_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 502 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 503 [_AM_PROG_TAR([v7])])]) 504_AM_IF_OPTION([no-dependencies],, 505[AC_PROVIDE_IFELSE([AC_PROG_CC], 506 [_AM_DEPENDENCIES([CC])], 507 [m4_define([AC_PROG_CC], 508 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 509AC_PROVIDE_IFELSE([AC_PROG_CXX], 510 [_AM_DEPENDENCIES([CXX])], 511 [m4_define([AC_PROG_CXX], 512 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 513AC_PROVIDE_IFELSE([AC_PROG_OBJC], 514 [_AM_DEPENDENCIES([OBJC])], 515 [m4_define([AC_PROG_OBJC], 516 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 517AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 518 [_AM_DEPENDENCIES([OBJCXX])], 519 [m4_define([AC_PROG_OBJCXX], 520 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 521]) 522AC_REQUIRE([AM_SILENT_RULES])dnl 523dnl The testsuite driver may need to know about EXEEXT, so add the 524dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 525dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 526AC_CONFIG_COMMANDS_PRE(dnl 527[m4_provide_if([_AM_COMPILER_EXEEXT], 528 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529]) 530 531dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 532dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 533dnl mangled by Autoconf and run in a shell conditional statement. 534m4_define([_AC_COMPILER_EXEEXT], 535m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 536 537 538# When config.status generates a header, we must update the stamp-h file. 539# This file resides in the same directory as the config header 540# that is generated. The stamp files are numbered to have different names. 541 542# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 543# loop where config.status creates the headers, so we can generate 544# our stamp files there. 545AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 546[# Compute $1's index in $config_headers. 547_am_arg=$1 548_am_stamp_count=1 549for _am_header in $config_headers :; do 550 case $_am_header in 551 $_am_arg | $_am_arg:* ) 552 break ;; 553 * ) 554 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 555 esac 556done 557echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558 559# Copyright (C) 2001-2013 Free Software Foundation, Inc. 560# 561# This file is free software; the Free Software Foundation 562# gives unlimited permission to copy and/or distribute it, 563# with or without modifications, as long as this notice is preserved. 564 565# AM_PROG_INSTALL_SH 566# ------------------ 567# Define $install_sh. 568AC_DEFUN([AM_PROG_INSTALL_SH], 569[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 570if test x"${install_sh}" != xset; then 571 case $am_aux_dir in 572 *\ * | *\ *) 573 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 574 *) 575 install_sh="\${SHELL} $am_aux_dir/install-sh" 576 esac 577fi 578AC_SUBST([install_sh])]) 579 580# Copyright (C) 2003-2013 Free Software Foundation, Inc. 581# 582# This file is free software; the Free Software Foundation 583# gives unlimited permission to copy and/or distribute it, 584# with or without modifications, as long as this notice is preserved. 585 586# Check whether the underlying file-system supports filenames 587# with a leading dot. For instance MS-DOS doesn't. 588AC_DEFUN([AM_SET_LEADING_DOT], 589[rm -rf .tst 2>/dev/null 590mkdir .tst 2>/dev/null 591if test -d .tst; then 592 am__leading_dot=. 593else 594 am__leading_dot=_ 595fi 596rmdir .tst 2>/dev/null 597AC_SUBST([am__leading_dot])]) 598 599# Check to see how 'make' treats includes. -*- Autoconf -*- 600 601# Copyright (C) 2001-2013 Free Software Foundation, Inc. 602# 603# This file is free software; the Free Software Foundation 604# gives unlimited permission to copy and/or distribute it, 605# with or without modifications, as long as this notice is preserved. 606 607# AM_MAKE_INCLUDE() 608# ----------------- 609# Check to see how make treats includes. 610AC_DEFUN([AM_MAKE_INCLUDE], 611[am_make=${MAKE-make} 612cat > confinc << 'END' 613am__doit: 614 @echo this is the am__doit target 615.PHONY: am__doit 616END 617# If we don't find an include directive, just comment out the code. 618AC_MSG_CHECKING([for style of include used by $am_make]) 619am__include="#" 620am__quote= 621_am_result=none 622# First try GNU make style include. 623echo "include confinc" > confmf 624# Ignore all kinds of additional output from 'make'. 625case `$am_make -s -f confmf 2> /dev/null` in #( 626*the\ am__doit\ target*) 627 am__include=include 628 am__quote= 629 _am_result=GNU 630 ;; 631esac 632# Now try BSD make style include. 633if test "$am__include" = "#"; then 634 echo '.include "confinc"' > confmf 635 case `$am_make -s -f confmf 2> /dev/null` in #( 636 *the\ am__doit\ target*) 637 am__include=.include 638 am__quote="\"" 639 _am_result=BSD 640 ;; 641 esac 642fi 643AC_SUBST([am__include]) 644AC_SUBST([am__quote]) 645AC_MSG_RESULT([$_am_result]) 646rm -f confinc confmf 647]) 648 649# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 650 651# Copyright (C) 1997-2013 Free Software Foundation, Inc. 652# 653# This file is free software; the Free Software Foundation 654# gives unlimited permission to copy and/or distribute it, 655# with or without modifications, as long as this notice is preserved. 656 657# AM_MISSING_PROG(NAME, PROGRAM) 658# ------------------------------ 659AC_DEFUN([AM_MISSING_PROG], 660[AC_REQUIRE([AM_MISSING_HAS_RUN]) 661$1=${$1-"${am_missing_run}$2"} 662AC_SUBST($1)]) 663 664# AM_MISSING_HAS_RUN 665# ------------------ 666# Define MISSING if not defined so far and test if it is modern enough. 667# If it is, set am_missing_run to use it, otherwise, to nothing. 668AC_DEFUN([AM_MISSING_HAS_RUN], 669[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 670AC_REQUIRE_AUX_FILE([missing])dnl 671if test x"${MISSING+set}" != xset; then 672 case $am_aux_dir in 673 *\ * | *\ *) 674 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 675 *) 676 MISSING="\${SHELL} $am_aux_dir/missing" ;; 677 esac 678fi 679# Use eval to expand $SHELL 680if eval "$MISSING --is-lightweight"; then 681 am_missing_run="$MISSING " 682else 683 am_missing_run= 684 AC_MSG_WARN(['missing' script is too old or missing]) 685fi 686]) 687 688# Helper functions for option handling. -*- Autoconf -*- 689 690# Copyright (C) 2001-2013 Free Software Foundation, Inc. 691# 692# This file is free software; the Free Software Foundation 693# gives unlimited permission to copy and/or distribute it, 694# with or without modifications, as long as this notice is preserved. 695 696# _AM_MANGLE_OPTION(NAME) 697# ----------------------- 698AC_DEFUN([_AM_MANGLE_OPTION], 699[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 700 701# _AM_SET_OPTION(NAME) 702# -------------------- 703# Set option NAME. Presently that only means defining a flag for this option. 704AC_DEFUN([_AM_SET_OPTION], 705[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 706 707# _AM_SET_OPTIONS(OPTIONS) 708# ------------------------ 709# OPTIONS is a space-separated list of Automake options. 710AC_DEFUN([_AM_SET_OPTIONS], 711[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 712 713# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 714# ------------------------------------------- 715# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 716AC_DEFUN([_AM_IF_OPTION], 717[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 718 719# Check to make sure that the build environment is sane. -*- Autoconf -*- 720 721# Copyright (C) 1996-2013 Free Software Foundation, Inc. 722# 723# This file is free software; the Free Software Foundation 724# gives unlimited permission to copy and/or distribute it, 725# with or without modifications, as long as this notice is preserved. 726 727# AM_SANITY_CHECK 728# --------------- 729AC_DEFUN([AM_SANITY_CHECK], 730[AC_MSG_CHECKING([whether build environment is sane]) 731# Reject unsafe characters in $srcdir or the absolute working directory 732# name. Accept space and tab only in the latter. 733am_lf=' 734' 735case `pwd` in 736 *[[\\\"\#\$\&\'\`$am_lf]]*) 737 AC_MSG_ERROR([unsafe absolute working directory name]);; 738esac 739case $srcdir in 740 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 741 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 742esac 743 744# Do 'set' in a subshell so we don't clobber the current shell's 745# arguments. Must try -L first in case configure is actually a 746# symlink; some systems play weird games with the mod time of symlinks 747# (eg FreeBSD returns the mod time of the symlink's containing 748# directory). 749if ( 750 am_has_slept=no 751 for am_try in 1 2; do 752 echo "timestamp, slept: $am_has_slept" > conftest.file 753 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 754 if test "$[*]" = "X"; then 755 # -L didn't work. 756 set X `ls -t "$srcdir/configure" conftest.file` 757 fi 758 if test "$[*]" != "X $srcdir/configure conftest.file" \ 759 && test "$[*]" != "X conftest.file $srcdir/configure"; then 760 761 # If neither matched, then we have a broken ls. This can happen 762 # if, for instance, CONFIG_SHELL is bash and it inherits a 763 # broken ls alias from the environment. This has actually 764 # happened. Such a system could not be considered "sane". 765 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 766 alias in your environment]) 767 fi 768 if test "$[2]" = conftest.file || test $am_try -eq 2; then 769 break 770 fi 771 # Just in case. 772 sleep 1 773 am_has_slept=yes 774 done 775 test "$[2]" = conftest.file 776 ) 777then 778 # Ok. 779 : 780else 781 AC_MSG_ERROR([newly created file is older than distributed files! 782Check your system clock]) 783fi 784AC_MSG_RESULT([yes]) 785# If we didn't sleep, we still need to ensure time stamps of config.status and 786# generated files are strictly newer. 787am_sleep_pid= 788if grep 'slept: no' conftest.file >/dev/null 2>&1; then 789 ( sleep 1 ) & 790 am_sleep_pid=$! 791fi 792AC_CONFIG_COMMANDS_PRE( 793 [AC_MSG_CHECKING([that generated files are newer than configure]) 794 if test -n "$am_sleep_pid"; then 795 # Hide warnings about reused PIDs. 796 wait $am_sleep_pid 2>/dev/null 797 fi 798 AC_MSG_RESULT([done])]) 799rm -f conftest.file 800]) 801 802# Copyright (C) 2009-2013 Free Software Foundation, Inc. 803# 804# This file is free software; the Free Software Foundation 805# gives unlimited permission to copy and/or distribute it, 806# with or without modifications, as long as this notice is preserved. 807 808# AM_SILENT_RULES([DEFAULT]) 809# -------------------------- 810# Enable less verbose build rules; with the default set to DEFAULT 811# ("yes" being less verbose, "no" or empty being verbose). 812AC_DEFUN([AM_SILENT_RULES], 813[AC_ARG_ENABLE([silent-rules], [dnl 814AS_HELP_STRING( 815 [--enable-silent-rules], 816 [less verbose build output (undo: "make V=1")]) 817AS_HELP_STRING( 818 [--disable-silent-rules], 819 [verbose build output (undo: "make V=0")])dnl 820]) 821case $enable_silent_rules in @%:@ ((( 822 yes) AM_DEFAULT_VERBOSITY=0;; 823 no) AM_DEFAULT_VERBOSITY=1;; 824 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 825esac 826dnl 827dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 828dnl do not support nested variable expansions. 829dnl See automake bug#9928 and bug#10237. 830am_make=${MAKE-make} 831AC_CACHE_CHECK([whether $am_make supports nested variables], 832 [am_cv_make_support_nested_variables], 833 [if AS_ECHO([['TRUE=$(BAR$(V)) 834BAR0=false 835BAR1=true 836V=1 837am__doit: 838 @$(TRUE) 839.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 840 am_cv_make_support_nested_variables=yes 841else 842 am_cv_make_support_nested_variables=no 843fi]) 844if test $am_cv_make_support_nested_variables = yes; then 845 dnl Using '$V' instead of '$(V)' breaks IRIX make. 846 AM_V='$(V)' 847 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 848else 849 AM_V=$AM_DEFAULT_VERBOSITY 850 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 851fi 852AC_SUBST([AM_V])dnl 853AM_SUBST_NOTMAKE([AM_V])dnl 854AC_SUBST([AM_DEFAULT_V])dnl 855AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 856AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 857AM_BACKSLASH='\' 858AC_SUBST([AM_BACKSLASH])dnl 859_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 860]) 861 862# Copyright (C) 2001-2013 Free Software Foundation, Inc. 863# 864# This file is free software; the Free Software Foundation 865# gives unlimited permission to copy and/or distribute it, 866# with or without modifications, as long as this notice is preserved. 867 868# AM_PROG_INSTALL_STRIP 869# --------------------- 870# One issue with vendor 'install' (even GNU) is that you can't 871# specify the program used to strip binaries. This is especially 872# annoying in cross-compiling environments, where the build's strip 873# is unlikely to handle the host's binaries. 874# Fortunately install-sh will honor a STRIPPROG variable, so we 875# always use install-sh in "make install-strip", and initialize 876# STRIPPROG with the value of the STRIP variable (set by the user). 877AC_DEFUN([AM_PROG_INSTALL_STRIP], 878[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 879# Installed binaries are usually stripped using 'strip' when the user 880# run "make install-strip". However 'strip' might not be the right 881# tool to use in cross-compilation environments, therefore Automake 882# will honor the 'STRIP' environment variable to overrule this program. 883dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 884if test "$cross_compiling" != no; then 885 AC_CHECK_TOOL([STRIP], [strip], :) 886fi 887INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 888AC_SUBST([INSTALL_STRIP_PROGRAM])]) 889 890# Copyright (C) 2006-2013 Free Software Foundation, Inc. 891# 892# This file is free software; the Free Software Foundation 893# gives unlimited permission to copy and/or distribute it, 894# with or without modifications, as long as this notice is preserved. 895 896# _AM_SUBST_NOTMAKE(VARIABLE) 897# --------------------------- 898# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 899# This macro is traced by Automake. 900AC_DEFUN([_AM_SUBST_NOTMAKE]) 901 902# AM_SUBST_NOTMAKE(VARIABLE) 903# -------------------------- 904# Public sister of _AM_SUBST_NOTMAKE. 905AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 906 907# Check how to create a tarball. -*- Autoconf -*- 908 909# Copyright (C) 2004-2013 Free Software Foundation, Inc. 910# 911# This file is free software; the Free Software Foundation 912# gives unlimited permission to copy and/or distribute it, 913# with or without modifications, as long as this notice is preserved. 914 915# _AM_PROG_TAR(FORMAT) 916# -------------------- 917# Check how to create a tarball in format FORMAT. 918# FORMAT should be one of 'v7', 'ustar', or 'pax'. 919# 920# Substitute a variable $(am__tar) that is a command 921# writing to stdout a FORMAT-tarball containing the directory 922# $tardir. 923# tardir=directory && $(am__tar) > result.tar 924# 925# Substitute a variable $(am__untar) that extract such 926# a tarball read from stdin. 927# $(am__untar) < result.tar 928# 929AC_DEFUN([_AM_PROG_TAR], 930[# Always define AMTAR for backward compatibility. Yes, it's still used 931# in the wild :-( We should find a proper way to deprecate it ... 932AC_SUBST([AMTAR], ['$${TAR-tar}']) 933 934# We'll loop over all known methods to create a tar archive until one works. 935_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 936 937m4_if([$1], [v7], 938 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 939 940 [m4_case([$1], 941 [ustar], 942 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 943 # There is notably a 21 bits limit for the UID and the GID. In fact, 944 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 945 # and bug#13588). 946 am_max_uid=2097151 # 2^21 - 1 947 am_max_gid=$am_max_uid 948 # The $UID and $GID variables are not portable, so we need to resort 949 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 950 # below are definitely unexpected, so allow the users to see them 951 # (that is, avoid stderr redirection). 952 am_uid=`id -u || echo unknown` 953 am_gid=`id -g || echo unknown` 954 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 955 if test $am_uid -le $am_max_uid; then 956 AC_MSG_RESULT([yes]) 957 else 958 AC_MSG_RESULT([no]) 959 _am_tools=none 960 fi 961 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 962 if test $am_gid -le $am_max_gid; then 963 AC_MSG_RESULT([yes]) 964 else 965 AC_MSG_RESULT([no]) 966 _am_tools=none 967 fi], 968 969 [pax], 970 [], 971 972 [m4_fatal([Unknown tar format])]) 973 974 AC_MSG_CHECKING([how to create a $1 tar archive]) 975 976 # Go ahead even if we have the value already cached. We do so because we 977 # need to set the values for the 'am__tar' and 'am__untar' variables. 978 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 979 980 for _am_tool in $_am_tools; do 981 case $_am_tool in 982 gnutar) 983 for _am_tar in tar gnutar gtar; do 984 AM_RUN_LOG([$_am_tar --version]) && break 985 done 986 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 987 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 988 am__untar="$_am_tar -xf -" 989 ;; 990 plaintar) 991 # Must skip GNU tar: if it does not support --format= it doesn't create 992 # ustar tarball either. 993 (tar --version) >/dev/null 2>&1 && continue 994 am__tar='tar chf - "$$tardir"' 995 am__tar_='tar chf - "$tardir"' 996 am__untar='tar xf -' 997 ;; 998 pax) 999 am__tar='pax -L -x $1 -w "$$tardir"' 1000 am__tar_='pax -L -x $1 -w "$tardir"' 1001 am__untar='pax -r' 1002 ;; 1003 cpio) 1004 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1005 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1006 am__untar='cpio -i -H $1 -d' 1007 ;; 1008 none) 1009 am__tar=false 1010 am__tar_=false 1011 am__untar=false 1012 ;; 1013 esac 1014 1015 # If the value was cached, stop now. We just wanted to have am__tar 1016 # and am__untar set. 1017 test -n "${am_cv_prog_tar_$1}" && break 1018 1019 # tar/untar a dummy directory, and stop if the command works. 1020 rm -rf conftest.dir 1021 mkdir conftest.dir 1022 echo GrepMe > conftest.dir/file 1023 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1024 rm -rf conftest.dir 1025 if test -s conftest.tar; then 1026 AM_RUN_LOG([$am__untar <conftest.tar]) 1027 AM_RUN_LOG([cat conftest.dir/file]) 1028 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1029 fi 1030 done 1031 rm -rf conftest.dir 1032 1033 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1034 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1035 1036AC_SUBST([am__tar]) 1037AC_SUBST([am__untar]) 1038]) # _AM_PROG_TAR 1039 1040# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1041# 1042# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1043# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1044# Foundation, Inc. 1045# Written by Gordon Matzigkeit, 1996 1046# 1047# This file is free software; the Free Software Foundation gives 1048# unlimited permission to copy and/or distribute it, with or without 1049# modifications, as long as this notice is preserved. 1050 1051m4_define([_LT_COPYING], [dnl 1052# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1053# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1054# Foundation, Inc. 1055# Written by Gordon Matzigkeit, 1996 1056# 1057# This file is part of GNU Libtool. 1058# 1059# GNU Libtool is free software; you can redistribute it and/or 1060# modify it under the terms of the GNU General Public License as 1061# published by the Free Software Foundation; either version 2 of 1062# the License, or (at your option) any later version. 1063# 1064# As a special exception to the GNU General Public License, 1065# if you distribute this file as part of a program or library that 1066# is built using GNU Libtool, you may include this file under the 1067# same distribution terms that you use for the rest of that program. 1068# 1069# GNU Libtool is distributed in the hope that it will be useful, 1070# but WITHOUT ANY WARRANTY; without even the implied warranty of 1071# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1072# GNU General Public License for more details. 1073# 1074# You should have received a copy of the GNU General Public License 1075# along with GNU Libtool; see the file COPYING. If not, a copy 1076# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1077# obtained by writing to the Free Software Foundation, Inc., 1078# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1079]) 1080 1081# serial 57 LT_INIT 1082 1083 1084# LT_PREREQ(VERSION) 1085# ------------------ 1086# Complain and exit if this libtool version is less that VERSION. 1087m4_defun([LT_PREREQ], 1088[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1089 [m4_default([$3], 1090 [m4_fatal([Libtool version $1 or higher is required], 1091 63)])], 1092 [$2])]) 1093 1094 1095# _LT_CHECK_BUILDDIR 1096# ------------------ 1097# Complain if the absolute build directory name contains unusual characters 1098m4_defun([_LT_CHECK_BUILDDIR], 1099[case `pwd` in 1100 *\ * | *\ *) 1101 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1102esac 1103]) 1104 1105 1106# LT_INIT([OPTIONS]) 1107# ------------------ 1108AC_DEFUN([LT_INIT], 1109[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1110AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1111AC_BEFORE([$0], [LT_LANG])dnl 1112AC_BEFORE([$0], [LT_OUTPUT])dnl 1113AC_BEFORE([$0], [LTDL_INIT])dnl 1114m4_require([_LT_CHECK_BUILDDIR])dnl 1115 1116dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1117m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1118m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1119dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1120dnl unless we require an AC_DEFUNed macro: 1121AC_REQUIRE([LTOPTIONS_VERSION])dnl 1122AC_REQUIRE([LTSUGAR_VERSION])dnl 1123AC_REQUIRE([LTVERSION_VERSION])dnl 1124AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1125m4_require([_LT_PROG_LTMAIN])dnl 1126 1127_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128 1129dnl Parse OPTIONS 1130_LT_SET_OPTIONS([$0], [$1]) 1131 1132# This can be used to rebuild libtool when needed 1133LIBTOOL_DEPS="$ltmain" 1134 1135# Always use our own libtool. 1136LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1137AC_SUBST(LIBTOOL)dnl 1138 1139_LT_SETUP 1140 1141# Only expand once: 1142m4_define([LT_INIT]) 1143])# LT_INIT 1144 1145# Old names: 1146AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1147AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1148dnl aclocal-1.4 backwards compatibility: 1149dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1150dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151 1152 1153# _LT_CC_BASENAME(CC) 1154# ------------------- 1155# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1156m4_defun([_LT_CC_BASENAME], 1157[for cc_temp in $1""; do 1158 case $cc_temp in 1159 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1160 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1161 \-*) ;; 1162 *) break;; 1163 esac 1164done 1165cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1166]) 1167 1168 1169# _LT_FILEUTILS_DEFAULTS 1170# ---------------------- 1171# It is okay to use these file commands and assume they have been set 1172# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1173m4_defun([_LT_FILEUTILS_DEFAULTS], 1174[: ${CP="cp -f"} 1175: ${MV="mv -f"} 1176: ${RM="rm -f"} 1177])# _LT_FILEUTILS_DEFAULTS 1178 1179 1180# _LT_SETUP 1181# --------- 1182m4_defun([_LT_SETUP], 1183[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1184AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1185AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1186AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1187 1188_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1189dnl 1190_LT_DECL([], [host_alias], [0], [The host system])dnl 1191_LT_DECL([], [host], [0])dnl 1192_LT_DECL([], [host_os], [0])dnl 1193dnl 1194_LT_DECL([], [build_alias], [0], [The build system])dnl 1195_LT_DECL([], [build], [0])dnl 1196_LT_DECL([], [build_os], [0])dnl 1197dnl 1198AC_REQUIRE([AC_PROG_CC])dnl 1199AC_REQUIRE([LT_PATH_LD])dnl 1200AC_REQUIRE([LT_PATH_NM])dnl 1201dnl 1202AC_REQUIRE([AC_PROG_LN_S])dnl 1203test -z "$LN_S" && LN_S="ln -s" 1204_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1205dnl 1206AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1207_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1208_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1209dnl 1210m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1211m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1212m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1213m4_require([_LT_CMD_RELOAD])dnl 1214m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1215m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1216m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1217m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1218m4_require([_LT_WITH_SYSROOT])dnl 1219 1220_LT_CONFIG_LIBTOOL_INIT([ 1221# See if we are running on zsh, and set the options which allow our 1222# commands through without removal of \ escapes INIT. 1223if test -n "\${ZSH_VERSION+set}" ; then 1224 setopt NO_GLOB_SUBST 1225fi 1226]) 1227if test -n "${ZSH_VERSION+set}" ; then 1228 setopt NO_GLOB_SUBST 1229fi 1230 1231_LT_CHECK_OBJDIR 1232 1233m4_require([_LT_TAG_COMPILER])dnl 1234 1235case $host_os in 1236aix3*) 1237 # AIX sometimes has problems with the GCC collect2 program. For some 1238 # reason, if we set the COLLECT_NAMES environment variable, the problems 1239 # vanish in a puff of smoke. 1240 if test "X${COLLECT_NAMES+set}" != Xset; then 1241 COLLECT_NAMES= 1242 export COLLECT_NAMES 1243 fi 1244 ;; 1245esac 1246 1247# Global variables: 1248ofile=libtool 1249can_build_shared=yes 1250 1251# All known linkers require a `.a' archive for static linking (except MSVC, 1252# which needs '.lib'). 1253libext=a 1254 1255with_gnu_ld="$lt_cv_prog_gnu_ld" 1256 1257old_CC="$CC" 1258old_CFLAGS="$CFLAGS" 1259 1260# Set sane defaults for various variables 1261test -z "$CC" && CC=cc 1262test -z "$LTCC" && LTCC=$CC 1263test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1264test -z "$LD" && LD=ld 1265test -z "$ac_objext" && ac_objext=o 1266 1267_LT_CC_BASENAME([$compiler]) 1268 1269# Only perform the check for file, if the check method requires it 1270test -z "$MAGIC_CMD" && MAGIC_CMD=file 1271case $deplibs_check_method in 1272file_magic*) 1273 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1274 _LT_PATH_MAGIC 1275 fi 1276 ;; 1277esac 1278 1279# Use C for the default configuration in the libtool script 1280LT_SUPPORTED_TAG([CC]) 1281_LT_LANG_C_CONFIG 1282_LT_LANG_DEFAULT_CONFIG 1283_LT_CONFIG_COMMANDS 1284])# _LT_SETUP 1285 1286 1287# _LT_PREPARE_SED_QUOTE_VARS 1288# -------------------------- 1289# Define a few sed substitution that help us do robust quoting. 1290m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1291[# Backslashify metacharacters that are still active within 1292# double-quoted strings. 1293sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1294 1295# Same as above, but do not quote variable references. 1296double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1297 1298# Sed substitution to delay expansion of an escaped shell variable in a 1299# double_quote_subst'ed string. 1300delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1301 1302# Sed substitution to delay expansion of an escaped single quote. 1303delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1304 1305# Sed substitution to avoid accidental globbing in evaled expressions 1306no_glob_subst='s/\*/\\\*/g' 1307]) 1308 1309# _LT_PROG_LTMAIN 1310# --------------- 1311# Note that this code is called both from `configure', and `config.status' 1312# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1313# `config.status' has no value for ac_aux_dir unless we are using Automake, 1314# so we pass a copy along to make sure it has a sensible value anyway. 1315m4_defun([_LT_PROG_LTMAIN], 1316[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1317_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1318ltmain="$ac_aux_dir/ltmain.sh" 1319])# _LT_PROG_LTMAIN 1320 1321 1322 1323# So that we can recreate a full libtool script including additional 1324# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1325# in macros and then make a single call at the end using the `libtool' 1326# label. 1327 1328 1329# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1330# ---------------------------------------- 1331# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1332m4_define([_LT_CONFIG_LIBTOOL_INIT], 1333[m4_ifval([$1], 1334 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1335 [$1 1336])])]) 1337 1338# Initialize. 1339m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340 1341 1342# _LT_CONFIG_LIBTOOL([COMMANDS]) 1343# ------------------------------ 1344# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1345m4_define([_LT_CONFIG_LIBTOOL], 1346[m4_ifval([$1], 1347 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1348 [$1 1349])])]) 1350 1351# Initialize. 1352m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353 1354 1355# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1356# ----------------------------------------------------- 1357m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1358[_LT_CONFIG_LIBTOOL([$1]) 1359_LT_CONFIG_LIBTOOL_INIT([$2]) 1360]) 1361 1362 1363# _LT_FORMAT_COMMENT([COMMENT]) 1364# ----------------------------- 1365# Add leading comment marks to the start of each line, and a trailing 1366# full-stop to the whole comment if one is not present already. 1367m4_define([_LT_FORMAT_COMMENT], 1368[m4_ifval([$1], [ 1369m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1370 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1371)]) 1372 1373 1374 1375 1376 1377# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1378# ------------------------------------------------------------------- 1379# CONFIGNAME is the name given to the value in the libtool script. 1380# VARNAME is the (base) name used in the configure script. 1381# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1382# VARNAME. Any other value will be used directly. 1383m4_define([_LT_DECL], 1384[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1385 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1386 [m4_ifval([$1], [$1], [$2])]) 1387 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1388 m4_ifval([$4], 1389 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1390 lt_dict_add_subkey([lt_decl_dict], [$2], 1391 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1392]) 1393 1394 1395# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1396# -------------------------------------------------------- 1397m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1398 1399 1400# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1401# ------------------------------------------------ 1402m4_define([lt_decl_tag_varnames], 1403[_lt_decl_filter([tagged?], [yes], $@)]) 1404 1405 1406# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1407# --------------------------------------------------------- 1408m4_define([_lt_decl_filter], 1409[m4_case([$#], 1410 [0], [m4_fatal([$0: too few arguments: $#])], 1411 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1412 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1413 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1414 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1415]) 1416 1417 1418# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1419# -------------------------------------------------- 1420m4_define([lt_decl_quote_varnames], 1421[_lt_decl_filter([value], [1], $@)]) 1422 1423 1424# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1425# --------------------------------------------------- 1426m4_define([lt_decl_dquote_varnames], 1427[_lt_decl_filter([value], [2], $@)]) 1428 1429 1430# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1431# --------------------------------------------------- 1432m4_define([lt_decl_varnames_tagged], 1433[m4_assert([$# <= 2])dnl 1434_$0(m4_quote(m4_default([$1], [[, ]])), 1435 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1436 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1437m4_define([_lt_decl_varnames_tagged], 1438[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1439 1440 1441# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1442# ------------------------------------------------ 1443m4_define([lt_decl_all_varnames], 1444[_$0(m4_quote(m4_default([$1], [[, ]])), 1445 m4_if([$2], [], 1446 m4_quote(lt_decl_varnames), 1447 m4_quote(m4_shift($@))))[]dnl 1448]) 1449m4_define([_lt_decl_all_varnames], 1450[lt_join($@, lt_decl_varnames_tagged([$1], 1451 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1452]) 1453 1454 1455# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1456# ------------------------------------ 1457# Quote a variable value, and forward it to `config.status' so that its 1458# declaration there will have the same value as in `configure'. VARNAME 1459# must have a single quote delimited value for this to work. 1460m4_define([_LT_CONFIG_STATUS_DECLARE], 1461[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462 1463 1464# _LT_CONFIG_STATUS_DECLARATIONS 1465# ------------------------------ 1466# We delimit libtool config variables with single quotes, so when 1467# we write them to config.status, we have to be sure to quote all 1468# embedded single quotes properly. In configure, this macro expands 1469# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1470# 1471# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1472m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1473[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1474 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475 1476 1477# _LT_LIBTOOL_TAGS 1478# ---------------- 1479# Output comment and list of tags supported by the script 1480m4_defun([_LT_LIBTOOL_TAGS], 1481[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1482available_tags="_LT_TAGS"dnl 1483]) 1484 1485 1486# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1487# ----------------------------------- 1488# Extract the dictionary values for VARNAME (optionally with TAG) and 1489# expand to a commented shell variable setting: 1490# 1491# # Some comment about what VAR is for. 1492# visible_name=$lt_internal_name 1493m4_define([_LT_LIBTOOL_DECLARE], 1494[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1495 [description])))[]dnl 1496m4_pushdef([_libtool_name], 1497 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1498m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1499 [0], [_libtool_name=[$]$1], 1500 [1], [_libtool_name=$lt_[]$1], 1501 [2], [_libtool_name=$lt_[]$1], 1502 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1503m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1504]) 1505 1506 1507# _LT_LIBTOOL_CONFIG_VARS 1508# ----------------------- 1509# Produce commented declarations of non-tagged libtool config variables 1510# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1511# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1512# section) are produced by _LT_LIBTOOL_TAG_VARS. 1513m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1514[m4_foreach([_lt_var], 1515 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1516 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1517 1518 1519# _LT_LIBTOOL_TAG_VARS(TAG) 1520# ------------------------- 1521m4_define([_LT_LIBTOOL_TAG_VARS], 1522[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1523 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524 1525 1526# _LT_TAGVAR(VARNAME, [TAGNAME]) 1527# ------------------------------ 1528m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529 1530 1531# _LT_CONFIG_COMMANDS 1532# ------------------- 1533# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1534# variables for single and double quote escaping we saved from calls 1535# to _LT_DECL, we can put quote escaped variables declarations 1536# into `config.status', and then the shell code to quote escape them in 1537# for loops in `config.status'. Finally, any additional code accumulated 1538# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1539m4_defun([_LT_CONFIG_COMMANDS], 1540[AC_PROVIDE_IFELSE([LT_OUTPUT], 1541 dnl If the libtool generation code has been placed in $CONFIG_LT, 1542 dnl instead of duplicating it all over again into config.status, 1543 dnl then we will have config.status run $CONFIG_LT later, so it 1544 dnl needs to know what name is stored there: 1545 [AC_CONFIG_COMMANDS([libtool], 1546 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1547 dnl If the libtool generation code is destined for config.status, 1548 dnl expand the accumulated commands and init code now: 1549 [AC_CONFIG_COMMANDS([libtool], 1550 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1551])#_LT_CONFIG_COMMANDS 1552 1553 1554# Initialize. 1555m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1556[ 1557 1558# The HP-UX ksh and POSIX shell print the target directory to stdout 1559# if CDPATH is set. 1560(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1561 1562sed_quote_subst='$sed_quote_subst' 1563double_quote_subst='$double_quote_subst' 1564delay_variable_subst='$delay_variable_subst' 1565_LT_CONFIG_STATUS_DECLARATIONS 1566LTCC='$LTCC' 1567LTCFLAGS='$LTCFLAGS' 1568compiler='$compiler_DEFAULT' 1569 1570# A function that is used when there is no print builtin or printf. 1571func_fallback_echo () 1572{ 1573 eval 'cat <<_LTECHO_EOF 1574\$[]1 1575_LTECHO_EOF' 1576} 1577 1578# Quote evaled strings. 1579for var in lt_decl_all_varnames([[ \ 1580]], lt_decl_quote_varnames); do 1581 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1582 *[[\\\\\\\`\\"\\\$]]*) 1583 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1584 ;; 1585 *) 1586 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1587 ;; 1588 esac 1589done 1590 1591# Double-quote double-evaled strings. 1592for var in lt_decl_all_varnames([[ \ 1593]], lt_decl_dquote_varnames); do 1594 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1595 *[[\\\\\\\`\\"\\\$]]*) 1596 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1597 ;; 1598 *) 1599 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1600 ;; 1601 esac 1602done 1603 1604_LT_OUTPUT_LIBTOOL_INIT 1605]) 1606 1607# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1608# ------------------------------------ 1609# Generate a child script FILE with all initialization necessary to 1610# reuse the environment learned by the parent script, and make the 1611# file executable. If COMMENT is supplied, it is inserted after the 1612# `#!' sequence but before initialization text begins. After this 1613# macro, additional text can be appended to FILE to form the body of 1614# the child script. The macro ends with non-zero status if the 1615# file could not be fully written (such as if the disk is full). 1616m4_ifdef([AS_INIT_GENERATED], 1617[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1618[m4_defun([_LT_GENERATED_FILE_INIT], 1619[m4_require([AS_PREPARE])]dnl 1620[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1621[lt_write_fail=0 1622cat >$1 <<_ASEOF || lt_write_fail=1 1623#! $SHELL 1624# Generated by $as_me. 1625$2 1626SHELL=\${CONFIG_SHELL-$SHELL} 1627export SHELL 1628_ASEOF 1629cat >>$1 <<\_ASEOF || lt_write_fail=1 1630AS_SHELL_SANITIZE 1631_AS_PREPARE 1632exec AS_MESSAGE_FD>&1 1633_ASEOF 1634test $lt_write_fail = 0 && chmod +x $1[]dnl 1635m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636 1637# LT_OUTPUT 1638# --------- 1639# This macro allows early generation of the libtool script (before 1640# AC_OUTPUT is called), incase it is used in configure for compilation 1641# tests. 1642AC_DEFUN([LT_OUTPUT], 1643[: ${CONFIG_LT=./config.lt} 1644AC_MSG_NOTICE([creating $CONFIG_LT]) 1645_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1646[# Run this file to recreate a libtool stub with the current configuration.]) 1647 1648cat >>"$CONFIG_LT" <<\_LTEOF 1649lt_cl_silent=false 1650exec AS_MESSAGE_LOG_FD>>config.log 1651{ 1652 echo 1653 AS_BOX([Running $as_me.]) 1654} >&AS_MESSAGE_LOG_FD 1655 1656lt_cl_help="\ 1657\`$as_me' creates a local libtool stub from the current configuration, 1658for use in further configure time tests before the real libtool is 1659generated. 1660 1661Usage: $[0] [[OPTIONS]] 1662 1663 -h, --help print this help, then exit 1664 -V, --version print version number, then exit 1665 -q, --quiet do not print progress messages 1666 -d, --debug don't remove temporary files 1667 1668Report bugs to <bug-libtool@gnu.org>." 1669 1670lt_cl_version="\ 1671m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1672m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1673configured by $[0], generated by m4_PACKAGE_STRING. 1674 1675Copyright (C) 2011 Free Software Foundation, Inc. 1676This config.lt script is free software; the Free Software Foundation 1677gives unlimited permision to copy, distribute and modify it." 1678 1679while test $[#] != 0 1680do 1681 case $[1] in 1682 --version | --v* | -V ) 1683 echo "$lt_cl_version"; exit 0 ;; 1684 --help | --h* | -h ) 1685 echo "$lt_cl_help"; exit 0 ;; 1686 --debug | --d* | -d ) 1687 debug=: ;; 1688 --quiet | --q* | --silent | --s* | -q ) 1689 lt_cl_silent=: ;; 1690 1691 -*) AC_MSG_ERROR([unrecognized option: $[1] 1692Try \`$[0] --help' for more information.]) ;; 1693 1694 *) AC_MSG_ERROR([unrecognized argument: $[1] 1695Try \`$[0] --help' for more information.]) ;; 1696 esac 1697 shift 1698done 1699 1700if $lt_cl_silent; then 1701 exec AS_MESSAGE_FD>/dev/null 1702fi 1703_LTEOF 1704 1705cat >>"$CONFIG_LT" <<_LTEOF 1706_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1707_LTEOF 1708 1709cat >>"$CONFIG_LT" <<\_LTEOF 1710AC_MSG_NOTICE([creating $ofile]) 1711_LT_OUTPUT_LIBTOOL_COMMANDS 1712AS_EXIT(0) 1713_LTEOF 1714chmod +x "$CONFIG_LT" 1715 1716# configure is writing to config.log, but config.lt does its own redirection, 1717# appending to config.log, which fails on DOS, as config.log is still kept 1718# open by configure. Here we exec the FD to /dev/null, effectively closing 1719# config.log, so it can be properly (re)opened and appended to by config.lt. 1720lt_cl_success=: 1721test "$silent" = yes && 1722 lt_config_lt_args="$lt_config_lt_args --quiet" 1723exec AS_MESSAGE_LOG_FD>/dev/null 1724$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1725exec AS_MESSAGE_LOG_FD>>config.log 1726$lt_cl_success || AS_EXIT(1) 1727])# LT_OUTPUT 1728 1729 1730# _LT_CONFIG(TAG) 1731# --------------- 1732# If TAG is the built-in tag, create an initial libtool script with a 1733# default configuration from the untagged config vars. Otherwise add code 1734# to config.status for appending the configuration named by TAG from the 1735# matching tagged config vars. 1736m4_defun([_LT_CONFIG], 1737[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1738_LT_CONFIG_SAVE_COMMANDS([ 1739 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1740 m4_if(_LT_TAG, [C], [ 1741 # See if we are running on zsh, and set the options which allow our 1742 # commands through without removal of \ escapes. 1743 if test -n "${ZSH_VERSION+set}" ; then 1744 setopt NO_GLOB_SUBST 1745 fi 1746 1747 cfgfile="${ofile}T" 1748 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1749 $RM "$cfgfile" 1750 1751 cat <<_LT_EOF >> "$cfgfile" 1752#! $SHELL 1753 1754# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1755# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1756# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1757# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1758# 1759_LT_COPYING 1760_LT_LIBTOOL_TAGS 1761 1762# ### BEGIN LIBTOOL CONFIG 1763_LT_LIBTOOL_CONFIG_VARS 1764_LT_LIBTOOL_TAG_VARS 1765# ### END LIBTOOL CONFIG 1766 1767_LT_EOF 1768 1769 case $host_os in 1770 aix3*) 1771 cat <<\_LT_EOF >> "$cfgfile" 1772# AIX sometimes has problems with the GCC collect2 program. For some 1773# reason, if we set the COLLECT_NAMES environment variable, the problems 1774# vanish in a puff of smoke. 1775if test "X${COLLECT_NAMES+set}" != Xset; then 1776 COLLECT_NAMES= 1777 export COLLECT_NAMES 1778fi 1779_LT_EOF 1780 ;; 1781 esac 1782 1783 _LT_PROG_LTMAIN 1784 1785 # We use sed instead of cat because bash on DJGPP gets confused if 1786 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1787 # text mode, it properly converts lines to CR/LF. This bash problem 1788 # is reportedly fixed, but why not run on old versions too? 1789 sed '$q' "$ltmain" >> "$cfgfile" \ 1790 || (rm -f "$cfgfile"; exit 1) 1791 1792 _LT_PROG_REPLACE_SHELLFNS 1793 1794 mv -f "$cfgfile" "$ofile" || 1795 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1796 chmod +x "$ofile" 1797], 1798[cat <<_LT_EOF >> "$ofile" 1799 1800dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1801dnl in a comment (ie after a #). 1802# ### BEGIN LIBTOOL TAG CONFIG: $1 1803_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1804# ### END LIBTOOL TAG CONFIG: $1 1805_LT_EOF 1806])dnl /m4_if 1807], 1808[m4_if([$1], [], [ 1809 PACKAGE='$PACKAGE' 1810 VERSION='$VERSION' 1811 TIMESTAMP='$TIMESTAMP' 1812 RM='$RM' 1813 ofile='$ofile'], []) 1814])dnl /_LT_CONFIG_SAVE_COMMANDS 1815])# _LT_CONFIG 1816 1817 1818# LT_SUPPORTED_TAG(TAG) 1819# --------------------- 1820# Trace this macro to discover what tags are supported by the libtool 1821# --tag option, using: 1822# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1823AC_DEFUN([LT_SUPPORTED_TAG], []) 1824 1825 1826# C support is built-in for now 1827m4_define([_LT_LANG_C_enabled], []) 1828m4_define([_LT_TAGS], []) 1829 1830 1831# LT_LANG(LANG) 1832# ------------- 1833# Enable libtool support for the given language if not already enabled. 1834AC_DEFUN([LT_LANG], 1835[AC_BEFORE([$0], [LT_OUTPUT])dnl 1836m4_case([$1], 1837 [C], [_LT_LANG(C)], 1838 [C++], [_LT_LANG(CXX)], 1839 [Go], [_LT_LANG(GO)], 1840 [Java], [_LT_LANG(GCJ)], 1841 [Fortran 77], [_LT_LANG(F77)], 1842 [Fortran], [_LT_LANG(FC)], 1843 [Windows Resource], [_LT_LANG(RC)], 1844 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1845 [_LT_LANG($1)], 1846 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1847])# LT_LANG 1848 1849 1850# _LT_LANG(LANGNAME) 1851# ------------------ 1852m4_defun([_LT_LANG], 1853[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1854 [LT_SUPPORTED_TAG([$1])dnl 1855 m4_append([_LT_TAGS], [$1 ])dnl 1856 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1857 _LT_LANG_$1_CONFIG($1)])dnl 1858])# _LT_LANG 1859 1860 1861m4_ifndef([AC_PROG_GO], [ 1862# NOTE: This macro has been submitted for inclusion into # 1863# GNU Autoconf as AC_PROG_GO. When it is available in # 1864# a released version of Autoconf we should remove this # 1865# macro and use it instead. # 1866m4_defun([AC_PROG_GO], 1867[AC_LANG_PUSH(Go)dnl 1868AC_ARG_VAR([GOC], [Go compiler command])dnl 1869AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1870_AC_ARG_VAR_LDFLAGS()dnl 1871AC_CHECK_TOOL(GOC, gccgo) 1872if test -z "$GOC"; then 1873 if test -n "$ac_tool_prefix"; then 1874 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1875 fi 1876fi 1877if test -z "$GOC"; then 1878 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1879fi 1880])#m4_defun 1881])#m4_ifndef 1882 1883 1884# _LT_LANG_DEFAULT_CONFIG 1885# ----------------------- 1886m4_defun([_LT_LANG_DEFAULT_CONFIG], 1887[AC_PROVIDE_IFELSE([AC_PROG_CXX], 1888 [LT_LANG(CXX)], 1889 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890 1891AC_PROVIDE_IFELSE([AC_PROG_F77], 1892 [LT_LANG(F77)], 1893 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894 1895AC_PROVIDE_IFELSE([AC_PROG_FC], 1896 [LT_LANG(FC)], 1897 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898 1899dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 1900dnl pulling things in needlessly. 1901AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1902 [LT_LANG(GCJ)], 1903 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1904 [LT_LANG(GCJ)], 1905 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 1906 [LT_LANG(GCJ)], 1907 [m4_ifdef([AC_PROG_GCJ], 1908 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 1909 m4_ifdef([A][M_PROG_GCJ], 1910 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 1911 m4_ifdef([LT_PROG_GCJ], 1912 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913 1914AC_PROVIDE_IFELSE([AC_PROG_GO], 1915 [LT_LANG(GO)], 1916 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1917 1918AC_PROVIDE_IFELSE([LT_PROG_RC], 1919 [LT_LANG(RC)], 1920 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 1921])# _LT_LANG_DEFAULT_CONFIG 1922 1923# Obsolete macros: 1924AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 1925AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 1926AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 1927AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 1928AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 1929dnl aclocal-1.4 backwards compatibility: 1930dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 1931dnl AC_DEFUN([AC_LIBTOOL_F77], []) 1932dnl AC_DEFUN([AC_LIBTOOL_FC], []) 1933dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 1934dnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935 1936 1937# _LT_TAG_COMPILER 1938# ---------------- 1939m4_defun([_LT_TAG_COMPILER], 1940[AC_REQUIRE([AC_PROG_CC])dnl 1941 1942_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 1943_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 1944_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 1945_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946 1947# If no C compiler was specified, use CC. 1948LTCC=${LTCC-"$CC"} 1949 1950# If no C compiler flags were specified, use CFLAGS. 1951LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952 1953# Allow CC to be a program name with arguments. 1954compiler=$CC 1955])# _LT_TAG_COMPILER 1956 1957 1958# _LT_COMPILER_BOILERPLATE 1959# ------------------------ 1960# Check for compiler boilerplate output or warnings with 1961# the simple compiler test code. 1962m4_defun([_LT_COMPILER_BOILERPLATE], 1963[m4_require([_LT_DECL_SED])dnl 1964ac_outfile=conftest.$ac_objext 1965echo "$lt_simple_compile_test_code" >conftest.$ac_ext 1966eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1967_lt_compiler_boilerplate=`cat conftest.err` 1968$RM conftest* 1969])# _LT_COMPILER_BOILERPLATE 1970 1971 1972# _LT_LINKER_BOILERPLATE 1973# ---------------------- 1974# Check for linker boilerplate output or warnings with 1975# the simple link test code. 1976m4_defun([_LT_LINKER_BOILERPLATE], 1977[m4_require([_LT_DECL_SED])dnl 1978ac_outfile=conftest.$ac_objext 1979echo "$lt_simple_link_test_code" >conftest.$ac_ext 1980eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1981_lt_linker_boilerplate=`cat conftest.err` 1982$RM -r conftest* 1983])# _LT_LINKER_BOILERPLATE 1984 1985# _LT_REQUIRED_DARWIN_CHECKS 1986# ------------------------- 1987m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1988 case $host_os in 1989 rhapsody* | darwin*) 1990 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 1991 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 1992 AC_CHECK_TOOL([LIPO], [lipo], [:]) 1993 AC_CHECK_TOOL([OTOOL], [otool], [:]) 1994 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1995 _LT_DECL([], [DSYMUTIL], [1], 1996 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1997 _LT_DECL([], [NMEDIT], [1], 1998 [Tool to change global to local symbols on Mac OS X]) 1999 _LT_DECL([], [LIPO], [1], 2000 [Tool to manipulate fat objects and archives on Mac OS X]) 2001 _LT_DECL([], [OTOOL], [1], 2002 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2003 _LT_DECL([], [OTOOL64], [1], 2004 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2005 2006 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2007 [lt_cv_apple_cc_single_mod=no 2008 if test -z "${LT_MULTI_MODULE}"; then 2009 # By default we will add the -single_module flag. You can override 2010 # by either setting the environment variable LT_MULTI_MODULE 2011 # non-empty at configure time, or by adding -multi_module to the 2012 # link flags. 2013 rm -rf libconftest.dylib* 2014 echo "int foo(void){return 1;}" > conftest.c 2015 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2016-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2017 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2018 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2019 _lt_result=$? 2020 # If there is a non-empty error log, and "single_module" 2021 # appears in it, assume the flag caused a linker warning 2022 if test -s conftest.err && $GREP single_module conftest.err; then 2023 cat conftest.err >&AS_MESSAGE_LOG_FD 2024 # Otherwise, if the output was created with a 0 exit code from 2025 # the compiler, it worked. 2026 elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2027 lt_cv_apple_cc_single_mod=yes 2028 else 2029 cat conftest.err >&AS_MESSAGE_LOG_FD 2030 fi 2031 rm -rf libconftest.dylib* 2032 rm -f conftest.* 2033 fi]) 2034 2035 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2036 [lt_cv_ld_exported_symbols_list], 2037 [lt_cv_ld_exported_symbols_list=no 2038 save_LDFLAGS=$LDFLAGS 2039 echo "_main" > conftest.sym 2040 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2041 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2042 [lt_cv_ld_exported_symbols_list=yes], 2043 [lt_cv_ld_exported_symbols_list=no]) 2044 LDFLAGS="$save_LDFLAGS" 2045 ]) 2046 2047 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2048 [lt_cv_ld_force_load=no 2049 cat > conftest.c << _LT_EOF 2050int forced_loaded() { return 2;} 2051_LT_EOF 2052 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2053 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2054 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2055 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2056 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2057 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2058 cat > conftest.c << _LT_EOF 2059int main() { return 0;} 2060_LT_EOF 2061 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2062 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2063 _lt_result=$? 2064 if test -s conftest.err && $GREP force_load conftest.err; then 2065 cat conftest.err >&AS_MESSAGE_LOG_FD 2066 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2067 lt_cv_ld_force_load=yes 2068 else 2069 cat conftest.err >&AS_MESSAGE_LOG_FD 2070 fi 2071 rm -f conftest.err libconftest.a conftest conftest.c 2072 rm -rf conftest.dSYM 2073 ]) 2074 case $host_os in 2075 rhapsody* | darwin1.[[012]]) 2076 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2077 darwin1.*) 2078 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2079 darwin*) # darwin 5.x on 2080 # if running on 10.5 or later, the deployment target defaults 2081 # to the OS version, if on x86, and 10.4, the deployment 2082 # target defaults to 10.4. Don't you love it? 2083 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2084 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2085 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2086 10.[[012]]*) 2087 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2088 10.*) 2089 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2090 esac 2091 ;; 2092 esac 2093 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2094 _lt_dar_single_mod='$single_module' 2095 fi 2096 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2097 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2098 else 2099 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2100 fi 2101 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2102 _lt_dsymutil='~$DSYMUTIL $lib || :' 2103 else 2104 _lt_dsymutil= 2105 fi 2106 ;; 2107 esac 2108]) 2109 2110 2111# _LT_DARWIN_LINKER_FEATURES([TAG]) 2112# --------------------------------- 2113# Checks for linker and compiler features on darwin 2114m4_defun([_LT_DARWIN_LINKER_FEATURES], 2115[ 2116 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2117 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2118 _LT_TAGVAR(hardcode_direct, $1)=no 2119 _LT_TAGVAR(hardcode_automatic, $1)=yes 2120 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2121 if test "$lt_cv_ld_force_load" = "yes"; then 2122 _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\"`' 2123 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2124 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2125 else 2126 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2127 fi 2128 _LT_TAGVAR(link_all_deplibs, $1)=yes 2129 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2130 case $cc_basename in 2131 ifort*) _lt_dar_can_shared=yes ;; 2132 *) _lt_dar_can_shared=$GCC ;; 2133 esac 2134 if test "$_lt_dar_can_shared" = "yes"; then 2135 output_verbose_link_cmd=func_echo_all 2136 _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}" 2137 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2138 _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}" 2139 _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}" 2140 m4_if([$1], [CXX], 2141[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2142 _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}" 2143 _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}" 2144 fi 2145],[]) 2146 else 2147 _LT_TAGVAR(ld_shlibs, $1)=no 2148 fi 2149]) 2150 2151# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2152# ---------------------------------- 2153# Links a minimal program and checks the executable 2154# for the system default hardcoded library path. In most cases, 2155# this is /usr/lib:/lib, but when the MPI compilers are used 2156# the location of the communication and MPI libs are included too. 2157# If we don't find anything, use the default library path according 2158# to the aix ld manual. 2159# Store the results from the different compilers for each TAGNAME. 2160# Allow to override them for all tags through lt_cv_aix_libpath. 2161m4_defun([_LT_SYS_MODULE_PATH_AIX], 2162[m4_require([_LT_DECL_SED])dnl 2163if test "${lt_cv_aix_libpath+set}" = set; then 2164 aix_libpath=$lt_cv_aix_libpath 2165else 2166 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2167 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2168 lt_aix_libpath_sed='[ 2169 /Import File Strings/,/^$/ { 2170 /^0/ { 2171 s/^0 *\([^ ]*\) *$/\1/ 2172 p 2173 } 2174 }]' 2175 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2176 # Check for a 64-bit object if we didn't find anything. 2177 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2178 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2179 fi],[]) 2180 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2181 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2182 fi 2183 ]) 2184 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2185fi 2186])# _LT_SYS_MODULE_PATH_AIX 2187 2188 2189# _LT_SHELL_INIT(ARG) 2190# ------------------- 2191m4_define([_LT_SHELL_INIT], 2192[m4_divert_text([M4SH-INIT], [$1 2193])])# _LT_SHELL_INIT 2194 2195 2196 2197# _LT_PROG_ECHO_BACKSLASH 2198# ----------------------- 2199# Find how we can fake an echo command that does not interpret backslash. 2200# In particular, with Autoconf 2.60 or later we add some code to the start 2201# of the generated configure script which will find a shell with a builtin 2202# printf (which we can use as an echo command). 2203m4_defun([_LT_PROG_ECHO_BACKSLASH], 2204[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2205ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2206ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2207 2208AC_MSG_CHECKING([how to print strings]) 2209# Test print first, because it will be a builtin if present. 2210if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2211 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2212 ECHO='print -r --' 2213elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2214 ECHO='printf %s\n' 2215else 2216 # Use this function as a fallback that always works. 2217 func_fallback_echo () 2218 { 2219 eval 'cat <<_LTECHO_EOF 2220$[]1 2221_LTECHO_EOF' 2222 } 2223 ECHO='func_fallback_echo' 2224fi 2225 2226# func_echo_all arg... 2227# Invoke $ECHO with all args, space-separated. 2228func_echo_all () 2229{ 2230 $ECHO "$*" 2231} 2232 2233case "$ECHO" in 2234 printf*) AC_MSG_RESULT([printf]) ;; 2235 print*) AC_MSG_RESULT([print -r]) ;; 2236 *) AC_MSG_RESULT([cat]) ;; 2237esac 2238 2239m4_ifdef([_AS_DETECT_SUGGESTED], 2240[_AS_DETECT_SUGGESTED([ 2241 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2242 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2243 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2244 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2245 PATH=/empty FPATH=/empty; export PATH FPATH 2246 test "X`printf %s $ECHO`" = "X$ECHO" \ 2247 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248 2249_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2250_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2251])# _LT_PROG_ECHO_BACKSLASH 2252 2253 2254# _LT_WITH_SYSROOT 2255# ---------------- 2256AC_DEFUN([_LT_WITH_SYSROOT], 2257[AC_MSG_CHECKING([for sysroot]) 2258AC_ARG_WITH([sysroot], 2259[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2260 (or the compiler's sysroot if not specified).], 2261[], [with_sysroot=no]) 2262 2263dnl lt_sysroot will always be passed unquoted. We quote it here 2264dnl in case the user passed a directory name. 2265lt_sysroot= 2266case ${with_sysroot} in #( 2267 yes) 2268 if test "$GCC" = yes; then 2269 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2270 fi 2271 ;; #( 2272 /*) 2273 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2274 ;; #( 2275 no|'') 2276 ;; #( 2277 *) 2278 AC_MSG_RESULT([${with_sysroot}]) 2279 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2280 ;; 2281esac 2282 2283 AC_MSG_RESULT([${lt_sysroot:-no}]) 2284_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2285[dependent libraries, and in which our libraries should be installed.])]) 2286 2287# _LT_ENABLE_LOCK 2288# --------------- 2289m4_defun([_LT_ENABLE_LOCK], 2290[AC_ARG_ENABLE([libtool-lock], 2291 [AS_HELP_STRING([--disable-libtool-lock], 2292 [avoid locking (might break parallel builds)])]) 2293test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2294 2295# Some flags need to be propagated to the compiler or linker for good 2296# libtool support. 2297case $host in 2298ia64-*-hpux*) 2299 # Find out which ABI we are using. 2300 echo 'int i;' > conftest.$ac_ext 2301 if AC_TRY_EVAL(ac_compile); then 2302 case `/usr/bin/file conftest.$ac_objext` in 2303 *ELF-32*) 2304 HPUX_IA64_MODE="32" 2305 ;; 2306 *ELF-64*) 2307 HPUX_IA64_MODE="64" 2308 ;; 2309 esac 2310 fi 2311 rm -rf conftest* 2312 ;; 2313*-*-irix6*) 2314 # Find out which ABI we are using. 2315 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2316 if AC_TRY_EVAL(ac_compile); then 2317 if test "$lt_cv_prog_gnu_ld" = yes; then 2318 case `/usr/bin/file conftest.$ac_objext` in 2319 *32-bit*) 2320 LD="${LD-ld} -melf32bsmip" 2321 ;; 2322 *N32*) 2323 LD="${LD-ld} -melf32bmipn32" 2324 ;; 2325 *64-bit*) 2326 LD="${LD-ld} -melf64bmip" 2327 ;; 2328 esac 2329 else 2330 case `/usr/bin/file conftest.$ac_objext` in 2331 *32-bit*) 2332 LD="${LD-ld} -32" 2333 ;; 2334 *N32*) 2335 LD="${LD-ld} -n32" 2336 ;; 2337 *64-bit*) 2338 LD="${LD-ld} -64" 2339 ;; 2340 esac 2341 fi 2342 fi 2343 rm -rf conftest* 2344 ;; 2345 2346x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2347s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2348 # Find out which ABI we are using. 2349 echo 'int i;' > conftest.$ac_ext 2350 if AC_TRY_EVAL(ac_compile); then 2351 case `/usr/bin/file conftest.o` in 2352 *32-bit*) 2353 case $host in 2354 x86_64-*kfreebsd*-gnu) 2355 LD="${LD-ld} -m elf_i386_fbsd" 2356 ;; 2357 x86_64-*linux*) 2358 LD="${LD-ld} -m elf_i386" 2359 ;; 2360 ppc64-*linux*|powerpc64-*linux*) 2361 LD="${LD-ld} -m elf32ppclinux" 2362 ;; 2363 s390x-*linux*) 2364 LD="${LD-ld} -m elf_s390" 2365 ;; 2366 sparc64-*linux*) 2367 LD="${LD-ld} -m elf32_sparc" 2368 ;; 2369 esac 2370 ;; 2371 *64-bit*) 2372 case $host in 2373 x86_64-*kfreebsd*-gnu) 2374 LD="${LD-ld} -m elf_x86_64_fbsd" 2375 ;; 2376 x86_64-*linux*) 2377 LD="${LD-ld} -m elf_x86_64" 2378 ;; 2379 ppc*-*linux*|powerpc*-*linux*) 2380 LD="${LD-ld} -m elf64ppc" 2381 ;; 2382 s390*-*linux*|s390*-*tpf*) 2383 LD="${LD-ld} -m elf64_s390" 2384 ;; 2385 sparc*-*linux*) 2386 LD="${LD-ld} -m elf64_sparc" 2387 ;; 2388 esac 2389 ;; 2390 esac 2391 fi 2392 rm -rf conftest* 2393 ;; 2394 2395*-*-sco3.2v5*) 2396 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2397 SAVE_CFLAGS="$CFLAGS" 2398 CFLAGS="$CFLAGS -belf" 2399 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2400 [AC_LANG_PUSH(C) 2401 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2402 AC_LANG_POP]) 2403 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2404 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2405 CFLAGS="$SAVE_CFLAGS" 2406 fi 2407 ;; 2408*-*solaris*) 2409 # Find out which ABI we are using. 2410 echo 'int i;' > conftest.$ac_ext 2411 if AC_TRY_EVAL(ac_compile); then 2412 case `/usr/bin/file conftest.o` in 2413 *64-bit*) 2414 case $lt_cv_prog_gnu_ld in 2415 yes*) 2416 case $host in 2417 i?86-*-solaris*) 2418 LD="${LD-ld} -m elf_x86_64" 2419 ;; 2420 sparc*-*-solaris*) 2421 LD="${LD-ld} -m elf64_sparc" 2422 ;; 2423 esac 2424 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2425 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2426 LD="${LD-ld}_sol2" 2427 fi 2428 ;; 2429 *) 2430 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2431 LD="${LD-ld} -64" 2432 fi 2433 ;; 2434 esac 2435 ;; 2436 esac 2437 fi 2438 rm -rf conftest* 2439 ;; 2440esac 2441 2442need_locks="$enable_libtool_lock" 2443])# _LT_ENABLE_LOCK 2444 2445 2446# _LT_PROG_AR 2447# ----------- 2448m4_defun([_LT_PROG_AR], 2449[AC_CHECK_TOOLS(AR, [ar], false) 2450: ${AR=ar} 2451: ${AR_FLAGS=cru} 2452_LT_DECL([], [AR], [1], [The archiver]) 2453_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2454 2455AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2456 [lt_cv_ar_at_file=no 2457 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2458 [echo conftest.$ac_objext > conftest.lst 2459 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2460 AC_TRY_EVAL([lt_ar_try]) 2461 if test "$ac_status" -eq 0; then 2462 # Ensure the archiver fails upon bogus file names. 2463 rm -f conftest.$ac_objext libconftest.a 2464 AC_TRY_EVAL([lt_ar_try]) 2465 if test "$ac_status" -ne 0; then 2466 lt_cv_ar_at_file=@ 2467 fi 2468 fi 2469 rm -f conftest.* libconftest.a 2470 ]) 2471 ]) 2472 2473if test "x$lt_cv_ar_at_file" = xno; then 2474 archiver_list_spec= 2475else 2476 archiver_list_spec=$lt_cv_ar_at_file 2477fi 2478_LT_DECL([], [archiver_list_spec], [1], 2479 [How to feed a file listing to the archiver]) 2480])# _LT_PROG_AR 2481 2482 2483# _LT_CMD_OLD_ARCHIVE 2484# ------------------- 2485m4_defun([_LT_CMD_OLD_ARCHIVE], 2486[_LT_PROG_AR 2487 2488AC_CHECK_TOOL(STRIP, strip, :) 2489test -z "$STRIP" && STRIP=: 2490_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2491 2492AC_CHECK_TOOL(RANLIB, ranlib, :) 2493test -z "$RANLIB" && RANLIB=: 2494_LT_DECL([], [RANLIB], [1], 2495 [Commands used to install an old-style archive]) 2496 2497# Determine commands to create old-style static archives. 2498old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2499old_postinstall_cmds='chmod 644 $oldlib' 2500old_postuninstall_cmds= 2501 2502if test -n "$RANLIB"; then 2503 case $host_os in 2504 openbsd*) 2505 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2506 ;; 2507 *) 2508 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2509 ;; 2510 esac 2511 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2512fi 2513 2514case $host_os in 2515 darwin*) 2516 lock_old_archive_extraction=yes ;; 2517 *) 2518 lock_old_archive_extraction=no ;; 2519esac 2520_LT_DECL([], [old_postinstall_cmds], [2]) 2521_LT_DECL([], [old_postuninstall_cmds], [2]) 2522_LT_TAGDECL([], [old_archive_cmds], [2], 2523 [Commands used to build an old-style archive]) 2524_LT_DECL([], [lock_old_archive_extraction], [0], 2525 [Whether to use a lock for old archive extraction]) 2526])# _LT_CMD_OLD_ARCHIVE 2527 2528 2529# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2530# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2531# ---------------------------------------------------------------- 2532# Check whether the given compiler option works 2533AC_DEFUN([_LT_COMPILER_OPTION], 2534[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2535m4_require([_LT_DECL_SED])dnl 2536AC_CACHE_CHECK([$1], [$2], 2537 [$2=no 2538 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2539 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2540 lt_compiler_flag="$3" 2541 # Insert the option either (1) after the last *FLAGS variable, or 2542 # (2) before a word containing "conftest.", or (3) at the end. 2543 # Note that $ac_compile itself does not contain backslashes and begins 2544 # with a dollar sign (not a hyphen), so the echo should work correctly. 2545 # The option is referenced via a variable to avoid confusing sed. 2546 lt_compile=`echo "$ac_compile" | $SED \ 2547 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2548 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2549 -e 's:$: $lt_compiler_flag:'` 2550 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2551 (eval "$lt_compile" 2>conftest.err) 2552 ac_status=$? 2553 cat conftest.err >&AS_MESSAGE_LOG_FD 2554 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2555 if (exit $ac_status) && test -s "$ac_outfile"; then 2556 # The compiler can only warn and ignore the option if not recognized 2557 # So say no if there are warnings other than the usual output. 2558 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2559 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2560 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2561 $2=yes 2562 fi 2563 fi 2564 $RM conftest* 2565]) 2566 2567if test x"[$]$2" = xyes; then 2568 m4_if([$5], , :, [$5]) 2569else 2570 m4_if([$6], , :, [$6]) 2571fi 2572])# _LT_COMPILER_OPTION 2573 2574# Old name: 2575AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2576dnl aclocal-1.4 backwards compatibility: 2577dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578 2579 2580# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2581# [ACTION-SUCCESS], [ACTION-FAILURE]) 2582# ---------------------------------------------------- 2583# Check whether the given linker option works 2584AC_DEFUN([_LT_LINKER_OPTION], 2585[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2586m4_require([_LT_DECL_SED])dnl 2587AC_CACHE_CHECK([$1], [$2], 2588 [$2=no 2589 save_LDFLAGS="$LDFLAGS" 2590 LDFLAGS="$LDFLAGS $3" 2591 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2592 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2593 # The linker can only warn and ignore the option if not recognized 2594 # So say no if there are warnings 2595 if test -s conftest.err; then 2596 # Append any errors to the config.log. 2597 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2598 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2599 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2600 if diff conftest.exp conftest.er2 >/dev/null; then 2601 $2=yes 2602 fi 2603 else 2604 $2=yes 2605 fi 2606 fi 2607 $RM -r conftest* 2608 LDFLAGS="$save_LDFLAGS" 2609]) 2610 2611if test x"[$]$2" = xyes; then 2612 m4_if([$4], , :, [$4]) 2613else 2614 m4_if([$5], , :, [$5]) 2615fi 2616])# _LT_LINKER_OPTION 2617 2618# Old name: 2619AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2620dnl aclocal-1.4 backwards compatibility: 2621dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2622 2623 2624# LT_CMD_MAX_LEN 2625#--------------- 2626AC_DEFUN([LT_CMD_MAX_LEN], 2627[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2628# find the maximum length of command line arguments 2629AC_MSG_CHECKING([the maximum length of command line arguments]) 2630AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2631 i=0 2632 teststring="ABCD" 2633 2634 case $build_os in 2635 msdosdjgpp*) 2636 # On DJGPP, this test can blow up pretty badly due to problems in libc 2637 # (any single argument exceeding 2000 bytes causes a buffer overrun 2638 # during glob expansion). Even if it were fixed, the result of this 2639 # check would be larger than it should be. 2640 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2641 ;; 2642 2643 gnu*) 2644 # Under GNU Hurd, this test is not required because there is 2645 # no limit to the length of command line arguments. 2646 # Libtool will interpret -1 as no limit whatsoever 2647 lt_cv_sys_max_cmd_len=-1; 2648 ;; 2649 2650 cygwin* | mingw* | cegcc*) 2651 # On Win9x/ME, this test blows up -- it succeeds, but takes 2652 # about 5 minutes as the teststring grows exponentially. 2653 # Worse, since 9x/ME are not pre-emptively multitasking, 2654 # you end up with a "frozen" computer, even though with patience 2655 # the test eventually succeeds (with a max line length of 256k). 2656 # Instead, let's just punt: use the minimum linelength reported by 2657 # all of the supported platforms: 8192 (on NT/2K/XP). 2658 lt_cv_sys_max_cmd_len=8192; 2659 ;; 2660 2661 mint*) 2662 # On MiNT this can take a long time and run out of memory. 2663 lt_cv_sys_max_cmd_len=8192; 2664 ;; 2665 2666 amigaos*) 2667 # On AmigaOS with pdksh, this test takes hours, literally. 2668 # So we just punt and use a minimum line length of 8192. 2669 lt_cv_sys_max_cmd_len=8192; 2670 ;; 2671 2672 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2673 # This has been around since 386BSD, at least. Likely further. 2674 if test -x /sbin/sysctl; then 2675 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2676 elif test -x /usr/sbin/sysctl; then 2677 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2678 else 2679 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2680 fi 2681 # And add a safety zone 2682 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2683 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2684 ;; 2685 2686 interix*) 2687 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2688 lt_cv_sys_max_cmd_len=196608 2689 ;; 2690 2691 os2*) 2692 # The test takes a long time on OS/2. 2693 lt_cv_sys_max_cmd_len=8192 2694 ;; 2695 2696 osf*) 2697 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2698 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2699 # nice to cause kernel panics so lets avoid the loop below. 2700 # First set a reasonable default. 2701 lt_cv_sys_max_cmd_len=16384 2702 # 2703 if test -x /sbin/sysconfig; then 2704 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2705 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2706 esac 2707 fi 2708 ;; 2709 sco3.2v5*) 2710 lt_cv_sys_max_cmd_len=102400 2711 ;; 2712 sysv5* | sco5v6* | sysv4.2uw2*) 2713 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2714 if test -n "$kargmax"; then 2715 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2716 else 2717 lt_cv_sys_max_cmd_len=32768 2718 fi 2719 ;; 2720 *) 2721 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2722 if test -n "$lt_cv_sys_max_cmd_len"; then 2723 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2724 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2725 else 2726 # Make teststring a little bigger before we do anything with it. 2727 # a 1K string should be a reasonable start. 2728 for i in 1 2 3 4 5 6 7 8 ; do 2729 teststring=$teststring$teststring 2730 done 2731 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2732 # If test is not a shell built-in, we'll probably end up computing a 2733 # maximum length that is only half of the actual maximum length, but 2734 # we can't tell. 2735 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2736 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2737 test $i != 17 # 1/2 MB should be enough 2738 do 2739 i=`expr $i + 1` 2740 teststring=$teststring$teststring 2741 done 2742 # Only check the string length outside the loop. 2743 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2744 teststring= 2745 # Add a significant safety factor because C++ compilers can tack on 2746 # massive amounts of additional arguments before passing them to the 2747 # linker. It appears as though 1/2 is a usable value. 2748 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2749 fi 2750 ;; 2751 esac 2752]) 2753if test -n $lt_cv_sys_max_cmd_len ; then 2754 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2755else 2756 AC_MSG_RESULT(none) 2757fi 2758max_cmd_len=$lt_cv_sys_max_cmd_len 2759_LT_DECL([], [max_cmd_len], [0], 2760 [What is the maximum length of a command?]) 2761])# LT_CMD_MAX_LEN 2762 2763# Old name: 2764AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2765dnl aclocal-1.4 backwards compatibility: 2766dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2767 2768 2769# _LT_HEADER_DLFCN 2770# ---------------- 2771m4_defun([_LT_HEADER_DLFCN], 2772[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2773])# _LT_HEADER_DLFCN 2774 2775 2776# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2777# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2778# ---------------------------------------------------------------- 2779m4_defun([_LT_TRY_DLOPEN_SELF], 2780[m4_require([_LT_HEADER_DLFCN])dnl 2781if test "$cross_compiling" = yes; then : 2782 [$4] 2783else 2784 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2785 lt_status=$lt_dlunknown 2786 cat > conftest.$ac_ext <<_LT_EOF 2787[#line $LINENO "configure" 2788#include "confdefs.h" 2789 2790#if HAVE_DLFCN_H 2791#include <dlfcn.h> 2792#endif 2793 2794#include <stdio.h> 2795 2796#ifdef RTLD_GLOBAL 2797# define LT_DLGLOBAL RTLD_GLOBAL 2798#else 2799# ifdef DL_GLOBAL 2800# define LT_DLGLOBAL DL_GLOBAL 2801# else 2802# define LT_DLGLOBAL 0 2803# endif 2804#endif 2805 2806/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2807 find out it does not work in some platform. */ 2808#ifndef LT_DLLAZY_OR_NOW 2809# ifdef RTLD_LAZY 2810# define LT_DLLAZY_OR_NOW RTLD_LAZY 2811# else 2812# ifdef DL_LAZY 2813# define LT_DLLAZY_OR_NOW DL_LAZY 2814# else 2815# ifdef RTLD_NOW 2816# define LT_DLLAZY_OR_NOW RTLD_NOW 2817# else 2818# ifdef DL_NOW 2819# define LT_DLLAZY_OR_NOW DL_NOW 2820# else 2821# define LT_DLLAZY_OR_NOW 0 2822# endif 2823# endif 2824# endif 2825# endif 2826#endif 2827 2828/* When -fvisbility=hidden is used, assume the code has been annotated 2829 correspondingly for the symbols needed. */ 2830#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2831int fnord () __attribute__((visibility("default"))); 2832#endif 2833 2834int fnord () { return 42; } 2835int main () 2836{ 2837 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2838 int status = $lt_dlunknown; 2839 2840 if (self) 2841 { 2842 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2843 else 2844 { 2845 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2846 else puts (dlerror ()); 2847 } 2848 /* dlclose (self); */ 2849 } 2850 else 2851 puts (dlerror ()); 2852 2853 return status; 2854}] 2855_LT_EOF 2856 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2857 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2858 lt_status=$? 2859 case x$lt_status in 2860 x$lt_dlno_uscore) $1 ;; 2861 x$lt_dlneed_uscore) $2 ;; 2862 x$lt_dlunknown|x*) $3 ;; 2863 esac 2864 else : 2865 # compilation failed 2866 $3 2867 fi 2868fi 2869rm -fr conftest* 2870])# _LT_TRY_DLOPEN_SELF 2871 2872 2873# LT_SYS_DLOPEN_SELF 2874# ------------------ 2875AC_DEFUN([LT_SYS_DLOPEN_SELF], 2876[m4_require([_LT_HEADER_DLFCN])dnl 2877if test "x$enable_dlopen" != xyes; then 2878 enable_dlopen=unknown 2879 enable_dlopen_self=unknown 2880 enable_dlopen_self_static=unknown 2881else 2882 lt_cv_dlopen=no 2883 lt_cv_dlopen_libs= 2884 2885 case $host_os in 2886 beos*) 2887 lt_cv_dlopen="load_add_on" 2888 lt_cv_dlopen_libs= 2889 lt_cv_dlopen_self=yes 2890 ;; 2891 2892 mingw* | pw32* | cegcc*) 2893 lt_cv_dlopen="LoadLibrary" 2894 lt_cv_dlopen_libs= 2895 ;; 2896 2897 cygwin*) 2898 lt_cv_dlopen="dlopen" 2899 lt_cv_dlopen_libs= 2900 ;; 2901 2902 darwin*) 2903 # if libdl is installed we need to link against it 2904 AC_CHECK_LIB([dl], [dlopen], 2905 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2906 lt_cv_dlopen="dyld" 2907 lt_cv_dlopen_libs= 2908 lt_cv_dlopen_self=yes 2909 ]) 2910 ;; 2911 2912 *) 2913 AC_CHECK_FUNC([shl_load], 2914 [lt_cv_dlopen="shl_load"], 2915 [AC_CHECK_LIB([dld], [shl_load], 2916 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 2917 [AC_CHECK_FUNC([dlopen], 2918 [lt_cv_dlopen="dlopen"], 2919 [AC_CHECK_LIB([dl], [dlopen], 2920 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2921 [AC_CHECK_LIB([svld], [dlopen], 2922 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2923 [AC_CHECK_LIB([dld], [dld_link], 2924 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 2925 ]) 2926 ]) 2927 ]) 2928 ]) 2929 ]) 2930 ;; 2931 esac 2932 2933 if test "x$lt_cv_dlopen" != xno; then 2934 enable_dlopen=yes 2935 else 2936 enable_dlopen=no 2937 fi 2938 2939 case $lt_cv_dlopen in 2940 dlopen) 2941 save_CPPFLAGS="$CPPFLAGS" 2942 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2943 2944 save_LDFLAGS="$LDFLAGS" 2945 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2946 2947 save_LIBS="$LIBS" 2948 LIBS="$lt_cv_dlopen_libs $LIBS" 2949 2950 AC_CACHE_CHECK([whether a program can dlopen itself], 2951 lt_cv_dlopen_self, [dnl 2952 _LT_TRY_DLOPEN_SELF( 2953 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2954 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2955 ]) 2956 2957 if test "x$lt_cv_dlopen_self" = xyes; then 2958 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2959 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2960 lt_cv_dlopen_self_static, [dnl 2961 _LT_TRY_DLOPEN_SELF( 2962 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2963 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2964 ]) 2965 fi 2966 2967 CPPFLAGS="$save_CPPFLAGS" 2968 LDFLAGS="$save_LDFLAGS" 2969 LIBS="$save_LIBS" 2970 ;; 2971 esac 2972 2973 case $lt_cv_dlopen_self in 2974 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2975 *) enable_dlopen_self=unknown ;; 2976 esac 2977 2978 case $lt_cv_dlopen_self_static in 2979 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2980 *) enable_dlopen_self_static=unknown ;; 2981 esac 2982fi 2983_LT_DECL([dlopen_support], [enable_dlopen], [0], 2984 [Whether dlopen is supported]) 2985_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2986 [Whether dlopen of programs is supported]) 2987_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2988 [Whether dlopen of statically linked programs is supported]) 2989])# LT_SYS_DLOPEN_SELF 2990 2991# Old name: 2992AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2993dnl aclocal-1.4 backwards compatibility: 2994dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2995 2996 2997# _LT_COMPILER_C_O([TAGNAME]) 2998# --------------------------- 2999# Check to see if options -c and -o are simultaneously supported by compiler. 3000# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3001m4_defun([_LT_COMPILER_C_O], 3002[m4_require([_LT_DECL_SED])dnl 3003m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3004m4_require([_LT_TAG_COMPILER])dnl 3005AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3006 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3007 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3008 $RM -r conftest 2>/dev/null 3009 mkdir conftest 3010 cd conftest 3011 mkdir out 3012 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3013 3014 lt_compiler_flag="-o out/conftest2.$ac_objext" 3015 # Insert the option either (1) after the last *FLAGS variable, or 3016 # (2) before a word containing "conftest.", or (3) at the end. 3017 # Note that $ac_compile itself does not contain backslashes and begins 3018 # with a dollar sign (not a hyphen), so the echo should work correctly. 3019 lt_compile=`echo "$ac_compile" | $SED \ 3020 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3021 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3022 -e 's:$: $lt_compiler_flag:'` 3023 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3024 (eval "$lt_compile" 2>out/conftest.err) 3025 ac_status=$? 3026 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3027 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3028 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3029 then 3030 # The compiler can only warn and ignore the option if not recognized 3031 # So say no if there are warnings 3032 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3033 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3034 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3035 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3036 fi 3037 fi 3038 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3039 $RM conftest* 3040 # SGI C++ compiler will create directory out/ii_files/ for 3041 # template instantiation 3042 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3043 $RM out/* && rmdir out 3044 cd .. 3045 $RM -r conftest 3046 $RM conftest* 3047]) 3048_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3049 [Does compiler simultaneously support -c and -o options?]) 3050])# _LT_COMPILER_C_O 3051 3052 3053# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3054# ---------------------------------- 3055# Check to see if we can do hard links to lock some files if needed 3056m4_defun([_LT_COMPILER_FILE_LOCKS], 3057[m4_require([_LT_ENABLE_LOCK])dnl 3058m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3059_LT_COMPILER_C_O([$1]) 3060 3061hard_links="nottested" 3062if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3063 # do not overwrite the value of need_locks provided by the user 3064 AC_MSG_CHECKING([if we can lock with hard links]) 3065 hard_links=yes 3066 $RM conftest* 3067 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3068 touch conftest.a 3069 ln conftest.a conftest.b 2>&5 || hard_links=no 3070 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3071 AC_MSG_RESULT([$hard_links]) 3072 if test "$hard_links" = no; then 3073 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3074 need_locks=warn 3075 fi 3076else 3077 need_locks=no 3078fi 3079_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3080])# _LT_COMPILER_FILE_LOCKS 3081 3082 3083# _LT_CHECK_OBJDIR 3084# ---------------- 3085m4_defun([_LT_CHECK_OBJDIR], 3086[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3087[rm -f .libs 2>/dev/null 3088mkdir .libs 2>/dev/null 3089if test -d .libs; then 3090 lt_cv_objdir=.libs 3091else 3092 # MS-DOS does not allow filenames that begin with a dot. 3093 lt_cv_objdir=_libs 3094fi 3095rmdir .libs 2>/dev/null]) 3096objdir=$lt_cv_objdir 3097_LT_DECL([], [objdir], [0], 3098 [The name of the directory that contains temporary libtool files])dnl 3099m4_pattern_allow([LT_OBJDIR])dnl 3100AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3101 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3102])# _LT_CHECK_OBJDIR 3103 3104 3105# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3106# -------------------------------------- 3107# Check hardcoding attributes. 3108m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3109[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3110_LT_TAGVAR(hardcode_action, $1)= 3111if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3112 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3113 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3114 3115 # We can hardcode non-existent directories. 3116 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3117 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3118 # have to relink, otherwise we might link with an installed library 3119 # when we should be linking with a yet-to-be-installed one 3120 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3121 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3122 # Linking always hardcodes the temporary library directory. 3123 _LT_TAGVAR(hardcode_action, $1)=relink 3124 else 3125 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3126 _LT_TAGVAR(hardcode_action, $1)=immediate 3127 fi 3128else 3129 # We cannot hardcode anything, or else we can only hardcode existing 3130 # directories. 3131 _LT_TAGVAR(hardcode_action, $1)=unsupported 3132fi 3133AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3134 3135if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3136 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3137 # Fast installation is not supported 3138 enable_fast_install=no 3139elif test "$shlibpath_overrides_runpath" = yes || 3140 test "$enable_shared" = no; then 3141 # Fast installation is not necessary 3142 enable_fast_install=needless 3143fi 3144_LT_TAGDECL([], [hardcode_action], [0], 3145 [How to hardcode a shared library path into an executable]) 3146])# _LT_LINKER_HARDCODE_LIBPATH 3147 3148 3149# _LT_CMD_STRIPLIB 3150# ---------------- 3151m4_defun([_LT_CMD_STRIPLIB], 3152[m4_require([_LT_DECL_EGREP]) 3153striplib= 3154old_striplib= 3155AC_MSG_CHECKING([whether stripping libraries is possible]) 3156if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3157 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3158 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3159 AC_MSG_RESULT([yes]) 3160else 3161# FIXME - insert some real tests, host_os isn't really good enough 3162 case $host_os in 3163 darwin*) 3164 if test -n "$STRIP" ; then 3165 striplib="$STRIP -x" 3166 old_striplib="$STRIP -S" 3167 AC_MSG_RESULT([yes]) 3168 else 3169 AC_MSG_RESULT([no]) 3170 fi 3171 ;; 3172 *) 3173 AC_MSG_RESULT([no]) 3174 ;; 3175 esac 3176fi 3177_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3178_LT_DECL([], [striplib], [1]) 3179])# _LT_CMD_STRIPLIB 3180 3181 3182# _LT_SYS_DYNAMIC_LINKER([TAG]) 3183# ----------------------------- 3184# PORTME Fill in your ld.so characteristics 3185m4_defun([_LT_SYS_DYNAMIC_LINKER], 3186[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3187m4_require([_LT_DECL_EGREP])dnl 3188m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3189m4_require([_LT_DECL_OBJDUMP])dnl 3190m4_require([_LT_DECL_SED])dnl 3191m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3192AC_MSG_CHECKING([dynamic linker characteristics]) 3193m4_if([$1], 3194 [], [ 3195if test "$GCC" = yes; then 3196 case $host_os in 3197 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3198 *) lt_awk_arg="/^libraries:/" ;; 3199 esac 3200 case $host_os in 3201 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3202 *) lt_sed_strip_eq="s,=/,/,g" ;; 3203 esac 3204 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3205 case $lt_search_path_spec in 3206 *\;*) 3207 # if the path contains ";" then we assume it to be the separator 3208 # otherwise default to the standard path separator (i.e. ":") - it is 3209 # assumed that no part of a normal pathname contains ";" but that should 3210 # okay in the real world where ";" in dirpaths is itself problematic. 3211 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3212 ;; 3213 *) 3214 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3215 ;; 3216 esac 3217 # Ok, now we have the path, separated by spaces, we can step through it 3218 # and add multilib dir if necessary. 3219 lt_tmp_lt_search_path_spec= 3220 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3221 for lt_sys_path in $lt_search_path_spec; do 3222 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3223 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3224 else 3225 test -d "$lt_sys_path" && \ 3226 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3227 fi 3228 done 3229 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3230BEGIN {RS=" "; FS="/|\n";} { 3231 lt_foo=""; 3232 lt_count=0; 3233 for (lt_i = NF; lt_i > 0; lt_i--) { 3234 if ($lt_i != "" && $lt_i != ".") { 3235 if ($lt_i == "..") { 3236 lt_count++; 3237 } else { 3238 if (lt_count == 0) { 3239 lt_foo="/" $lt_i lt_foo; 3240 } else { 3241 lt_count--; 3242 } 3243 } 3244 } 3245 } 3246 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3247 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3248}'` 3249 # AWK program above erroneously prepends '/' to C:/dos/paths 3250 # for these hosts. 3251 case $host_os in 3252 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3253 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3254 esac 3255 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3256else 3257 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3258fi]) 3259library_names_spec= 3260libname_spec='lib$name' 3261soname_spec= 3262shrext_cmds=".so" 3263postinstall_cmds= 3264postuninstall_cmds= 3265finish_cmds= 3266finish_eval= 3267shlibpath_var= 3268shlibpath_overrides_runpath=unknown 3269version_type=none 3270dynamic_linker="$host_os ld.so" 3271sys_lib_dlsearch_path_spec="/lib /usr/lib" 3272need_lib_prefix=unknown 3273hardcode_into_libs=no 3274 3275# when you set need_version to no, make sure it does not cause -set_version 3276# flags to be left without arguments 3277need_version=unknown 3278 3279case $host_os in 3280aix3*) 3281 version_type=linux # correct to gnu/linux during the next big refactor 3282 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3283 shlibpath_var=LIBPATH 3284 3285 # AIX 3 has no versioning support, so we append a major version to the name. 3286 soname_spec='${libname}${release}${shared_ext}$major' 3287 ;; 3288 3289aix[[4-9]]*) 3290 version_type=linux # correct to gnu/linux during the next big refactor 3291 need_lib_prefix=no 3292 need_version=no 3293 hardcode_into_libs=yes 3294 if test "$host_cpu" = ia64; then 3295 # AIX 5 supports IA64 3296 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3297 shlibpath_var=LD_LIBRARY_PATH 3298 else 3299 # With GCC up to 2.95.x, collect2 would create an import file 3300 # for dependence libraries. The import file would start with 3301 # the line `#! .'. This would cause the generated library to 3302 # depend on `.', always an invalid library. This was fixed in 3303 # development snapshots of GCC prior to 3.0. 3304 case $host_os in 3305 aix4 | aix4.[[01]] | aix4.[[01]].*) 3306 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3307 echo ' yes ' 3308 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3309 : 3310 else 3311 can_build_shared=no 3312 fi 3313 ;; 3314 esac 3315 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3316 # soname into executable. Probably we can add versioning support to 3317 # collect2, so additional links can be useful in future. 3318 if test "$aix_use_runtimelinking" = yes; then 3319 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3320 # instead of lib<name>.a to let people know that these are not 3321 # typical AIX shared libraries. 3322 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3323 else 3324 # We preserve .a as extension for shared libraries through AIX4.2 3325 # and later when we are not doing run time linking. 3326 library_names_spec='${libname}${release}.a $libname.a' 3327 soname_spec='${libname}${release}${shared_ext}$major' 3328 fi 3329 shlibpath_var=LIBPATH 3330 fi 3331 ;; 3332 3333amigaos*) 3334 case $host_cpu in 3335 powerpc) 3336 # Since July 2007 AmigaOS4 officially supports .so libraries. 3337 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3338 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3339 ;; 3340 m68k) 3341 library_names_spec='$libname.ixlibrary $libname.a' 3342 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3343 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' 3344 ;; 3345 esac 3346 ;; 3347 3348beos*) 3349 library_names_spec='${libname}${shared_ext}' 3350 dynamic_linker="$host_os ld.so" 3351 shlibpath_var=LIBRARY_PATH 3352 ;; 3353 3354bsdi[[45]]*) 3355 version_type=linux # correct to gnu/linux during the next big refactor 3356 need_version=no 3357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3358 soname_spec='${libname}${release}${shared_ext}$major' 3359 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3360 shlibpath_var=LD_LIBRARY_PATH 3361 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3362 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3363 # the default ld.so.conf also contains /usr/contrib/lib and 3364 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3365 # libtool to hard-code these into programs 3366 ;; 3367 3368cygwin* | mingw* | pw32* | cegcc*) 3369 version_type=windows 3370 shrext_cmds=".dll" 3371 need_version=no 3372 need_lib_prefix=no 3373 3374 case $GCC,$cc_basename in 3375 yes,*) 3376 # gcc 3377 library_names_spec='$libname.dll.a' 3378 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3379 postinstall_cmds='base_file=`basename \${file}`~ 3380 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3381 dldir=$destdir/`dirname \$dlpath`~ 3382 test -d \$dldir || mkdir -p \$dldir~ 3383 $install_prog $dir/$dlname \$dldir/$dlname~ 3384 chmod a+x \$dldir/$dlname~ 3385 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3386 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3387 fi' 3388 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3389 dlpath=$dir/\$dldll~ 3390 $RM \$dlpath' 3391 shlibpath_overrides_runpath=yes 3392 3393 case $host_os in 3394 cygwin*) 3395 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3396 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3397m4_if([$1], [],[ 3398 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3399 ;; 3400 mingw* | cegcc*) 3401 # MinGW DLLs use traditional 'lib' prefix 3402 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3403 ;; 3404 pw32*) 3405 # pw32 DLLs use 'pw' prefix rather than 'lib' 3406 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3407 ;; 3408 esac 3409 dynamic_linker='Win32 ld.exe' 3410 ;; 3411 3412 *,cl*) 3413 # Native MSVC 3414 libname_spec='$name' 3415 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3416 library_names_spec='${libname}.dll.lib' 3417 3418 case $build_os in 3419 mingw*) 3420 sys_lib_search_path_spec= 3421 lt_save_ifs=$IFS 3422 IFS=';' 3423 for lt_path in $LIB 3424 do 3425 IFS=$lt_save_ifs 3426 # Let DOS variable expansion print the short 8.3 style file name. 3427 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3428 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3429 done 3430 IFS=$lt_save_ifs 3431 # Convert to MSYS style. 3432 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3433 ;; 3434 cygwin*) 3435 # Convert to unix form, then to dos form, then back to unix form 3436 # but this time dos style (no spaces!) so that the unix form looks 3437 # like /cygdrive/c/PROGRA~1:/cygdr... 3438 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3439 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3440 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3441 ;; 3442 *) 3443 sys_lib_search_path_spec="$LIB" 3444 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3445 # It is most probably a Windows format PATH. 3446 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3447 else 3448 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3449 fi 3450 # FIXME: find the short name or the path components, as spaces are 3451 # common. (e.g. "Program Files" -> "PROGRA~1") 3452 ;; 3453 esac 3454 3455 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3456 postinstall_cmds='base_file=`basename \${file}`~ 3457 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3458 dldir=$destdir/`dirname \$dlpath`~ 3459 test -d \$dldir || mkdir -p \$dldir~ 3460 $install_prog $dir/$dlname \$dldir/$dlname' 3461 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3462 dlpath=$dir/\$dldll~ 3463 $RM \$dlpath' 3464 shlibpath_overrides_runpath=yes 3465 dynamic_linker='Win32 link.exe' 3466 ;; 3467 3468 *) 3469 # Assume MSVC wrapper 3470 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3471 dynamic_linker='Win32 ld.exe' 3472 ;; 3473 esac 3474 # FIXME: first we should search . and the directory the executable is in 3475 shlibpath_var=PATH 3476 ;; 3477 3478darwin* | rhapsody*) 3479 dynamic_linker="$host_os dyld" 3480 version_type=darwin 3481 need_lib_prefix=no 3482 need_version=no 3483 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3484 soname_spec='${libname}${release}${major}$shared_ext' 3485 shlibpath_overrides_runpath=yes 3486 shlibpath_var=DYLD_LIBRARY_PATH 3487 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3488m4_if([$1], [],[ 3489 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3490 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3491 ;; 3492 3493dgux*) 3494 version_type=linux # correct to gnu/linux during the next big refactor 3495 need_lib_prefix=no 3496 need_version=no 3497 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3498 soname_spec='${libname}${release}${shared_ext}$major' 3499 shlibpath_var=LD_LIBRARY_PATH 3500 ;; 3501 3502freebsd* | dragonfly*) 3503 # DragonFly does not have aout. When/if they implement a new 3504 # versioning mechanism, adjust this. 3505 if test -x /usr/bin/objformat; then 3506 objformat=`/usr/bin/objformat` 3507 else 3508 case $host_os in 3509 freebsd[[23]].*) objformat=aout ;; 3510 *) objformat=elf ;; 3511 esac 3512 fi 3513 version_type=freebsd-$objformat 3514 case $version_type in 3515 freebsd-elf*) 3516 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3517 need_version=no 3518 need_lib_prefix=no 3519 ;; 3520 freebsd-*) 3521 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3522 need_version=yes 3523 ;; 3524 esac 3525 shlibpath_var=LD_LIBRARY_PATH 3526 case $host_os in 3527 freebsd2.*) 3528 shlibpath_overrides_runpath=yes 3529 ;; 3530 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3531 shlibpath_overrides_runpath=yes 3532 hardcode_into_libs=yes 3533 ;; 3534 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3535 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3536 shlibpath_overrides_runpath=no 3537 hardcode_into_libs=yes 3538 ;; 3539 *) # from 4.6 on, and DragonFly 3540 shlibpath_overrides_runpath=yes 3541 hardcode_into_libs=yes 3542 ;; 3543 esac 3544 ;; 3545 3546gnu*) 3547 version_type=linux # correct to gnu/linux during the next big refactor 3548 need_lib_prefix=no 3549 need_version=no 3550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3551 soname_spec='${libname}${release}${shared_ext}$major' 3552 shlibpath_var=LD_LIBRARY_PATH 3553 shlibpath_overrides_runpath=no 3554 hardcode_into_libs=yes 3555 ;; 3556 3557haiku*) 3558 version_type=linux # correct to gnu/linux during the next big refactor 3559 need_lib_prefix=no 3560 need_version=no 3561 dynamic_linker="$host_os runtime_loader" 3562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3563 soname_spec='${libname}${release}${shared_ext}$major' 3564 shlibpath_var=LIBRARY_PATH 3565 shlibpath_overrides_runpath=yes 3566 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3567 hardcode_into_libs=yes 3568 ;; 3569 3570hpux9* | hpux10* | hpux11*) 3571 # Give a soname corresponding to the major version so that dld.sl refuses to 3572 # link against other versions. 3573 version_type=sunos 3574 need_lib_prefix=no 3575 need_version=no 3576 case $host_cpu in 3577 ia64*) 3578 shrext_cmds='.so' 3579 hardcode_into_libs=yes 3580 dynamic_linker="$host_os dld.so" 3581 shlibpath_var=LD_LIBRARY_PATH 3582 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3584 soname_spec='${libname}${release}${shared_ext}$major' 3585 if test "X$HPUX_IA64_MODE" = X32; then 3586 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3587 else 3588 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3589 fi 3590 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3591 ;; 3592 hppa*64*) 3593 shrext_cmds='.sl' 3594 hardcode_into_libs=yes 3595 dynamic_linker="$host_os dld.sl" 3596 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3597 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3598 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3599 soname_spec='${libname}${release}${shared_ext}$major' 3600 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3601 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3602 ;; 3603 *) 3604 shrext_cmds='.sl' 3605 dynamic_linker="$host_os dld.sl" 3606 shlibpath_var=SHLIB_PATH 3607 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3608 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3609 soname_spec='${libname}${release}${shared_ext}$major' 3610 ;; 3611 esac 3612 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3613 postinstall_cmds='chmod 555 $lib' 3614 # or fails outright, so override atomically: 3615 install_override_mode=555 3616 ;; 3617 3618interix[[3-9]]*) 3619 version_type=linux # correct to gnu/linux during the next big refactor 3620 need_lib_prefix=no 3621 need_version=no 3622 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3623 soname_spec='${libname}${release}${shared_ext}$major' 3624 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3625 shlibpath_var=LD_LIBRARY_PATH 3626 shlibpath_overrides_runpath=no 3627 hardcode_into_libs=yes 3628 ;; 3629 3630irix5* | irix6* | nonstopux*) 3631 case $host_os in 3632 nonstopux*) version_type=nonstopux ;; 3633 *) 3634 if test "$lt_cv_prog_gnu_ld" = yes; then 3635 version_type=linux # correct to gnu/linux during the next big refactor 3636 else 3637 version_type=irix 3638 fi ;; 3639 esac 3640 need_lib_prefix=no 3641 need_version=no 3642 soname_spec='${libname}${release}${shared_ext}$major' 3643 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3644 case $host_os in 3645 irix5* | nonstopux*) 3646 libsuff= shlibsuff= 3647 ;; 3648 *) 3649 case $LD in # libtool.m4 will add one of these switches to LD 3650 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3651 libsuff= shlibsuff= libmagic=32-bit;; 3652 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3653 libsuff=32 shlibsuff=N32 libmagic=N32;; 3654 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3655 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3656 *) libsuff= shlibsuff= libmagic=never-match;; 3657 esac 3658 ;; 3659 esac 3660 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3661 shlibpath_overrides_runpath=no 3662 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3663 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3664 hardcode_into_libs=yes 3665 ;; 3666 3667# No shared lib support for Linux oldld, aout, or coff. 3668linux*oldld* | linux*aout* | linux*coff*) 3669 dynamic_linker=no 3670 ;; 3671 3672# This must be glibc/ELF. 3673linux* | k*bsd*-gnu | kopensolaris*-gnu) 3674 version_type=linux # correct to gnu/linux during the next big refactor 3675 need_lib_prefix=no 3676 need_version=no 3677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3678 soname_spec='${libname}${release}${shared_ext}$major' 3679 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3680 shlibpath_var=LD_LIBRARY_PATH 3681 shlibpath_overrides_runpath=no 3682 3683 # Some binutils ld are patched to set DT_RUNPATH 3684 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3685 [lt_cv_shlibpath_overrides_runpath=no 3686 save_LDFLAGS=$LDFLAGS 3687 save_libdir=$libdir 3688 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3689 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3690 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3691 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3692 [lt_cv_shlibpath_overrides_runpath=yes])]) 3693 LDFLAGS=$save_LDFLAGS 3694 libdir=$save_libdir 3695 ]) 3696 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3697 3698 # This implies no fast_install, which is unacceptable. 3699 # Some rework will be needed to allow for fast_install 3700 # before this can be enabled. 3701 hardcode_into_libs=yes 3702 3703 # Add ABI-specific directories to the system library path. 3704 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 3705 3706 # Append ld.so.conf contents to the search path 3707 if test -f /etc/ld.so.conf; then 3708 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' ' '` 3709 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 3710 3711 fi 3712 3713 # We used to test for /lib/ld.so.1 and disable shared libraries on 3714 # powerpc, because MkLinux only supported shared libraries with the 3715 # GNU dynamic linker. Since this was broken with cross compilers, 3716 # most powerpc-linux boxes support dynamic linking these days and 3717 # people can always --disable-shared, the test was removed, and we 3718 # assume the GNU/Linux dynamic linker is in use. 3719 dynamic_linker='GNU/Linux ld.so' 3720 ;; 3721 3722netbsd*) 3723 version_type=sunos 3724 need_lib_prefix=no 3725 need_version=no 3726 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3727 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3728 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3729 dynamic_linker='NetBSD (a.out) ld.so' 3730 else 3731 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3732 soname_spec='${libname}${release}${shared_ext}$major' 3733 dynamic_linker='NetBSD ld.elf_so' 3734 fi 3735 shlibpath_var=LD_LIBRARY_PATH 3736 shlibpath_overrides_runpath=yes 3737 hardcode_into_libs=yes 3738 ;; 3739 3740newsos6) 3741 version_type=linux # correct to gnu/linux during the next big refactor 3742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3743 shlibpath_var=LD_LIBRARY_PATH 3744 shlibpath_overrides_runpath=yes 3745 ;; 3746 3747*nto* | *qnx*) 3748 version_type=qnx 3749 need_lib_prefix=no 3750 need_version=no 3751 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3752 soname_spec='${libname}${release}${shared_ext}$major' 3753 shlibpath_var=LD_LIBRARY_PATH 3754 shlibpath_overrides_runpath=no 3755 hardcode_into_libs=yes 3756 dynamic_linker='ldqnx.so' 3757 ;; 3758 3759openbsd*) 3760 version_type=sunos 3761 sys_lib_dlsearch_path_spec="/usr/lib" 3762 need_lib_prefix=no 3763 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3764 case $host_os in 3765 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3766 *) need_version=no ;; 3767 esac 3768 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3769 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3770 shlibpath_var=LD_LIBRARY_PATH 3771 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3772 case $host_os in 3773 openbsd2.[[89]] | openbsd2.[[89]].*) 3774 shlibpath_overrides_runpath=no 3775 ;; 3776 *) 3777 shlibpath_overrides_runpath=yes 3778 ;; 3779 esac 3780 else 3781 shlibpath_overrides_runpath=yes 3782 fi 3783 ;; 3784 3785os2*) 3786 libname_spec='$name' 3787 shrext_cmds=".dll" 3788 need_lib_prefix=no 3789 library_names_spec='$libname${shared_ext} $libname.a' 3790 dynamic_linker='OS/2 ld.exe' 3791 shlibpath_var=LIBPATH 3792 ;; 3793 3794osf3* | osf4* | osf5*) 3795 version_type=osf 3796 need_lib_prefix=no 3797 need_version=no 3798 soname_spec='${libname}${release}${shared_ext}$major' 3799 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3800 shlibpath_var=LD_LIBRARY_PATH 3801 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3802 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3803 ;; 3804 3805rdos*) 3806 dynamic_linker=no 3807 ;; 3808 3809solaris*) 3810 version_type=linux # correct to gnu/linux during the next big refactor 3811 need_lib_prefix=no 3812 need_version=no 3813 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3814 soname_spec='${libname}${release}${shared_ext}$major' 3815 shlibpath_var=LD_LIBRARY_PATH 3816 shlibpath_overrides_runpath=yes 3817 hardcode_into_libs=yes 3818 # ldd complains unless libraries are executable 3819 postinstall_cmds='chmod +x $lib' 3820 ;; 3821 3822sunos4*) 3823 version_type=sunos 3824 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3825 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3826 shlibpath_var=LD_LIBRARY_PATH 3827 shlibpath_overrides_runpath=yes 3828 if test "$with_gnu_ld" = yes; then 3829 need_lib_prefix=no 3830 fi 3831 need_version=yes 3832 ;; 3833 3834sysv4 | sysv4.3*) 3835 version_type=linux # correct to gnu/linux during the next big refactor 3836 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3837 soname_spec='${libname}${release}${shared_ext}$major' 3838 shlibpath_var=LD_LIBRARY_PATH 3839 case $host_vendor in 3840 sni) 3841 shlibpath_overrides_runpath=no 3842 need_lib_prefix=no 3843 runpath_var=LD_RUN_PATH 3844 ;; 3845 siemens) 3846 need_lib_prefix=no 3847 ;; 3848 motorola) 3849 need_lib_prefix=no 3850 need_version=no 3851 shlibpath_overrides_runpath=no 3852 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3853 ;; 3854 esac 3855 ;; 3856 3857sysv4*MP*) 3858 if test -d /usr/nec ;then 3859 version_type=linux # correct to gnu/linux during the next big refactor 3860 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3861 soname_spec='$libname${shared_ext}.$major' 3862 shlibpath_var=LD_LIBRARY_PATH 3863 fi 3864 ;; 3865 3866sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3867 version_type=freebsd-elf 3868 need_lib_prefix=no 3869 need_version=no 3870 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3871 soname_spec='${libname}${release}${shared_ext}$major' 3872 shlibpath_var=LD_LIBRARY_PATH 3873 shlibpath_overrides_runpath=yes 3874 hardcode_into_libs=yes 3875 if test "$with_gnu_ld" = yes; then 3876 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3877 else 3878 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3879 case $host_os in 3880 sco3.2v5*) 3881 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3882 ;; 3883 esac 3884 fi 3885 sys_lib_dlsearch_path_spec='/usr/lib' 3886 ;; 3887 3888tpf*) 3889 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3890 version_type=linux # correct to gnu/linux during the next big refactor 3891 need_lib_prefix=no 3892 need_version=no 3893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3894 shlibpath_var=LD_LIBRARY_PATH 3895 shlibpath_overrides_runpath=no 3896 hardcode_into_libs=yes 3897 ;; 3898 3899uts4*) 3900 version_type=linux # correct to gnu/linux during the next big refactor 3901 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3902 soname_spec='${libname}${release}${shared_ext}$major' 3903 shlibpath_var=LD_LIBRARY_PATH 3904 ;; 3905 3906*) 3907 dynamic_linker=no 3908 ;; 3909esac 3910AC_MSG_RESULT([$dynamic_linker]) 3911test "$dynamic_linker" = no && can_build_shared=no 3912 3913variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3914if test "$GCC" = yes; then 3915 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3916fi 3917 3918if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 3919 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 3920fi 3921if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 3922 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3923fi 3924 3925_LT_DECL([], [variables_saved_for_relink], [1], 3926 [Variables whose values should be saved in libtool wrapper scripts and 3927 restored at link time]) 3928_LT_DECL([], [need_lib_prefix], [0], 3929 [Do we need the "lib" prefix for modules?]) 3930_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3931_LT_DECL([], [version_type], [0], [Library versioning type]) 3932_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3933_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3934_LT_DECL([], [shlibpath_overrides_runpath], [0], 3935 [Is shlibpath searched before the hard-coded library search path?]) 3936_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3937_LT_DECL([], [library_names_spec], [1], 3938 [[List of archive names. First name is the real one, the rest are links. 3939 The last name is the one that the linker finds with -lNAME]]) 3940_LT_DECL([], [soname_spec], [1], 3941 [[The coded name of the library, if different from the real name]]) 3942_LT_DECL([], [install_override_mode], [1], 3943 [Permission mode override for installation of shared libraries]) 3944_LT_DECL([], [postinstall_cmds], [2], 3945 [Command to use after installation of a shared archive]) 3946_LT_DECL([], [postuninstall_cmds], [2], 3947 [Command to use after uninstallation of a shared archive]) 3948_LT_DECL([], [finish_cmds], [2], 3949 [Commands used to finish a libtool library installation in a directory]) 3950_LT_DECL([], [finish_eval], [1], 3951 [[As "finish_cmds", except a single script fragment to be evaled but 3952 not shown]]) 3953_LT_DECL([], [hardcode_into_libs], [0], 3954 [Whether we should hardcode library paths into libraries]) 3955_LT_DECL([], [sys_lib_search_path_spec], [2], 3956 [Compile-time system search path for libraries]) 3957_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 3958 [Run-time system search path for libraries]) 3959])# _LT_SYS_DYNAMIC_LINKER 3960 3961 3962# _LT_PATH_TOOL_PREFIX(TOOL) 3963# -------------------------- 3964# find a file program which can recognize shared library 3965AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3966[m4_require([_LT_DECL_EGREP])dnl 3967AC_MSG_CHECKING([for $1]) 3968AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3969[case $MAGIC_CMD in 3970[[\\/*] | ?:[\\/]*]) 3971 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3972 ;; 3973*) 3974 lt_save_MAGIC_CMD="$MAGIC_CMD" 3975 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3976dnl $ac_dummy forces splitting on constant user-supplied paths. 3977dnl POSIX.2 word splitting is done only on the output of word expansions, 3978dnl not every word. This closes a longstanding sh security hole. 3979 ac_dummy="m4_if([$2], , $PATH, [$2])" 3980 for ac_dir in $ac_dummy; do 3981 IFS="$lt_save_ifs" 3982 test -z "$ac_dir" && ac_dir=. 3983 if test -f $ac_dir/$1; then 3984 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 3985 if test -n "$file_magic_test_file"; then 3986 case $deplibs_check_method in 3987 "file_magic "*) 3988 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3989 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3990 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3991 $EGREP "$file_magic_regex" > /dev/null; then 3992 : 3993 else 3994 cat <<_LT_EOF 1>&2 3995 3996*** Warning: the command libtool uses to detect shared libraries, 3997*** $file_magic_cmd, produces output that libtool cannot recognize. 3998*** The result is that libtool may fail to recognize shared libraries 3999*** as such. This will affect the creation of libtool libraries that 4000*** depend on shared libraries, but programs linked with such libtool 4001*** libraries will work regardless of this problem. Nevertheless, you 4002*** may want to report the problem to your system manager and/or to 4003*** bug-libtool@gnu.org 4004 4005_LT_EOF 4006 fi ;; 4007 esac 4008 fi 4009 break 4010 fi 4011 done 4012 IFS="$lt_save_ifs" 4013 MAGIC_CMD="$lt_save_MAGIC_CMD" 4014 ;; 4015esac]) 4016MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4017if test -n "$MAGIC_CMD"; then 4018 AC_MSG_RESULT($MAGIC_CMD) 4019else 4020 AC_MSG_RESULT(no) 4021fi 4022_LT_DECL([], [MAGIC_CMD], [0], 4023 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4024])# _LT_PATH_TOOL_PREFIX 4025 4026# Old name: 4027AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4028dnl aclocal-1.4 backwards compatibility: 4029dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4030 4031 4032# _LT_PATH_MAGIC 4033# -------------- 4034# find a file program which can recognize a shared library 4035m4_defun([_LT_PATH_MAGIC], 4036[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4037if test -z "$lt_cv_path_MAGIC_CMD"; then 4038 if test -n "$ac_tool_prefix"; then 4039 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4040 else 4041 MAGIC_CMD=: 4042 fi 4043fi 4044])# _LT_PATH_MAGIC 4045 4046 4047# LT_PATH_LD 4048# ---------- 4049# find the pathname to the GNU or non-GNU linker 4050AC_DEFUN([LT_PATH_LD], 4051[AC_REQUIRE([AC_PROG_CC])dnl 4052AC_REQUIRE([AC_CANONICAL_HOST])dnl 4053AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4054m4_require([_LT_DECL_SED])dnl 4055m4_require([_LT_DECL_EGREP])dnl 4056m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4057 4058AC_ARG_WITH([gnu-ld], 4059 [AS_HELP_STRING([--with-gnu-ld], 4060 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4061 [test "$withval" = no || with_gnu_ld=yes], 4062 [with_gnu_ld=no])dnl 4063 4064ac_prog=ld 4065if test "$GCC" = yes; then 4066 # Check if gcc -print-prog-name=ld gives a path. 4067 AC_MSG_CHECKING([for ld used by $CC]) 4068 case $host in 4069 *-*-mingw*) 4070 # gcc leaves a trailing carriage return which upsets mingw 4071 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4072 *) 4073 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4074 esac 4075 case $ac_prog in 4076 # Accept absolute paths. 4077 [[\\/]]* | ?:[[\\/]]*) 4078 re_direlt='/[[^/]][[^/]]*/\.\./' 4079 # Canonicalize the pathname of ld 4080 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4081 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4082 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4083 done 4084 test -z "$LD" && LD="$ac_prog" 4085 ;; 4086 "") 4087 # If it fails, then pretend we aren't using GCC. 4088 ac_prog=ld 4089 ;; 4090 *) 4091 # If it is relative, then search for the first ld in PATH. 4092 with_gnu_ld=unknown 4093 ;; 4094 esac 4095elif test "$with_gnu_ld" = yes; then 4096 AC_MSG_CHECKING([for GNU ld]) 4097else 4098 AC_MSG_CHECKING([for non-GNU ld]) 4099fi 4100AC_CACHE_VAL(lt_cv_path_LD, 4101[if test -z "$LD"; then 4102 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4103 for ac_dir in $PATH; do 4104 IFS="$lt_save_ifs" 4105 test -z "$ac_dir" && ac_dir=. 4106 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4107 lt_cv_path_LD="$ac_dir/$ac_prog" 4108 # Check to see if the program is GNU ld. I'd rather use --version, 4109 # but apparently some variants of GNU ld only accept -v. 4110 # Break only if it was the GNU/non-GNU ld that we prefer. 4111 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4112 *GNU* | *'with BFD'*) 4113 test "$with_gnu_ld" != no && break 4114 ;; 4115 *) 4116 test "$with_gnu_ld" != yes && break 4117 ;; 4118 esac 4119 fi 4120 done 4121 IFS="$lt_save_ifs" 4122else 4123 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4124fi]) 4125LD="$lt_cv_path_LD" 4126if test -n "$LD"; then 4127 AC_MSG_RESULT($LD) 4128else 4129 AC_MSG_RESULT(no) 4130fi 4131test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4132_LT_PATH_LD_GNU 4133AC_SUBST([LD]) 4134 4135_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4136])# LT_PATH_LD 4137 4138# Old names: 4139AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4140AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4141dnl aclocal-1.4 backwards compatibility: 4142dnl AC_DEFUN([AM_PROG_LD], []) 4143dnl AC_DEFUN([AC_PROG_LD], []) 4144 4145 4146# _LT_PATH_LD_GNU 4147#- -------------- 4148m4_defun([_LT_PATH_LD_GNU], 4149[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4150[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4151case `$LD -v 2>&1 </dev/null` in 4152*GNU* | *'with BFD'*) 4153 lt_cv_prog_gnu_ld=yes 4154 ;; 4155*) 4156 lt_cv_prog_gnu_ld=no 4157 ;; 4158esac]) 4159with_gnu_ld=$lt_cv_prog_gnu_ld 4160])# _LT_PATH_LD_GNU 4161 4162 4163# _LT_CMD_RELOAD 4164# -------------- 4165# find reload flag for linker 4166# -- PORTME Some linkers may need a different reload flag. 4167m4_defun([_LT_CMD_RELOAD], 4168[AC_CACHE_CHECK([for $LD option to reload object files], 4169 lt_cv_ld_reload_flag, 4170 [lt_cv_ld_reload_flag='-r']) 4171reload_flag=$lt_cv_ld_reload_flag 4172case $reload_flag in 4173"" | " "*) ;; 4174*) reload_flag=" $reload_flag" ;; 4175esac 4176reload_cmds='$LD$reload_flag -o $output$reload_objs' 4177case $host_os in 4178 cygwin* | mingw* | pw32* | cegcc*) 4179 if test "$GCC" != yes; then 4180 reload_cmds=false 4181 fi 4182 ;; 4183 darwin*) 4184 if test "$GCC" = yes; then 4185 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4186 else 4187 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4188 fi 4189 ;; 4190esac 4191_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4192_LT_TAGDECL([], [reload_cmds], [2])dnl 4193])# _LT_CMD_RELOAD 4194 4195 4196# _LT_CHECK_MAGIC_METHOD 4197# ---------------------- 4198# how to check for library dependencies 4199# -- PORTME fill in with the dynamic library characteristics 4200m4_defun([_LT_CHECK_MAGIC_METHOD], 4201[m4_require([_LT_DECL_EGREP]) 4202m4_require([_LT_DECL_OBJDUMP]) 4203AC_CACHE_CHECK([how to recognize dependent libraries], 4204lt_cv_deplibs_check_method, 4205[lt_cv_file_magic_cmd='$MAGIC_CMD' 4206lt_cv_file_magic_test_file= 4207lt_cv_deplibs_check_method='unknown' 4208# Need to set the preceding variable on all platforms that support 4209# interlibrary dependencies. 4210# 'none' -- dependencies not supported. 4211# `unknown' -- same as none, but documents that we really don't know. 4212# 'pass_all' -- all dependencies passed with no checks. 4213# 'test_compile' -- check by making test program. 4214# 'file_magic [[regex]]' -- check by looking for files in library path 4215# which responds to the $file_magic_cmd with a given extended regex. 4216# If you have `file' or equivalent on your system and you're not sure 4217# whether `pass_all' will *always* work, you probably want this one. 4218 4219case $host_os in 4220aix[[4-9]]*) 4221 lt_cv_deplibs_check_method=pass_all 4222 ;; 4223 4224beos*) 4225 lt_cv_deplibs_check_method=pass_all 4226 ;; 4227 4228bsdi[[45]]*) 4229 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4230 lt_cv_file_magic_cmd='/usr/bin/file -L' 4231 lt_cv_file_magic_test_file=/shlib/libc.so 4232 ;; 4233 4234cygwin*) 4235 # func_win32_libid is a shell function defined in ltmain.sh 4236 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4237 lt_cv_file_magic_cmd='func_win32_libid' 4238 ;; 4239 4240mingw* | pw32*) 4241 # Base MSYS/MinGW do not provide the 'file' command needed by 4242 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4243 # unless we find 'file', for example because we are cross-compiling. 4244 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4245 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4246 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4247 lt_cv_file_magic_cmd='func_win32_libid' 4248 else 4249 # Keep this pattern in sync with the one in func_win32_libid. 4250 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4251 lt_cv_file_magic_cmd='$OBJDUMP -f' 4252 fi 4253 ;; 4254 4255cegcc*) 4256 # use the weaker test based on 'objdump'. See mingw*. 4257 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4258 lt_cv_file_magic_cmd='$OBJDUMP -f' 4259 ;; 4260 4261darwin* | rhapsody*) 4262 lt_cv_deplibs_check_method=pass_all 4263 ;; 4264 4265freebsd* | dragonfly*) 4266 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4267 case $host_cpu in 4268 i*86 ) 4269 # Not sure whether the presence of OpenBSD here was a mistake. 4270 # Let's accept both of them until this is cleared up. 4271 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4272 lt_cv_file_magic_cmd=/usr/bin/file 4273 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4274 ;; 4275 esac 4276 else 4277 lt_cv_deplibs_check_method=pass_all 4278 fi 4279 ;; 4280 4281gnu*) 4282 lt_cv_deplibs_check_method=pass_all 4283 ;; 4284 4285haiku*) 4286 lt_cv_deplibs_check_method=pass_all 4287 ;; 4288 4289hpux10.20* | hpux11*) 4290 lt_cv_file_magic_cmd=/usr/bin/file 4291 case $host_cpu in 4292 ia64*) 4293 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4294 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4295 ;; 4296 hppa*64*) 4297 [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]'] 4298 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4299 ;; 4300 *) 4301 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4302 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4303 ;; 4304 esac 4305 ;; 4306 4307interix[[3-9]]*) 4308 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4309 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4310 ;; 4311 4312irix5* | irix6* | nonstopux*) 4313 case $LD in 4314 *-32|*"-32 ") libmagic=32-bit;; 4315 *-n32|*"-n32 ") libmagic=N32;; 4316 *-64|*"-64 ") libmagic=64-bit;; 4317 *) libmagic=never-match;; 4318 esac 4319 lt_cv_deplibs_check_method=pass_all 4320 ;; 4321 4322# This must be glibc/ELF. 4323linux* | k*bsd*-gnu | kopensolaris*-gnu) 4324 lt_cv_deplibs_check_method=pass_all 4325 ;; 4326 4327netbsd*) 4328 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4329 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4330 else 4331 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4332 fi 4333 ;; 4334 4335newos6*) 4336 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4337 lt_cv_file_magic_cmd=/usr/bin/file 4338 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4339 ;; 4340 4341*nto* | *qnx*) 4342 lt_cv_deplibs_check_method=pass_all 4343 ;; 4344 4345openbsd*) 4346 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4347 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4348 else 4349 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4350 fi 4351 ;; 4352 4353osf3* | osf4* | osf5*) 4354 lt_cv_deplibs_check_method=pass_all 4355 ;; 4356 4357rdos*) 4358 lt_cv_deplibs_check_method=pass_all 4359 ;; 4360 4361solaris*) 4362 lt_cv_deplibs_check_method=pass_all 4363 ;; 4364 4365sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4366 lt_cv_deplibs_check_method=pass_all 4367 ;; 4368 4369sysv4 | sysv4.3*) 4370 case $host_vendor in 4371 motorola) 4372 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]]' 4373 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4374 ;; 4375 ncr) 4376 lt_cv_deplibs_check_method=pass_all 4377 ;; 4378 sequent) 4379 lt_cv_file_magic_cmd='/bin/file' 4380 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4381 ;; 4382 sni) 4383 lt_cv_file_magic_cmd='/bin/file' 4384 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4385 lt_cv_file_magic_test_file=/lib/libc.so 4386 ;; 4387 siemens) 4388 lt_cv_deplibs_check_method=pass_all 4389 ;; 4390 pc) 4391 lt_cv_deplibs_check_method=pass_all 4392 ;; 4393 esac 4394 ;; 4395 4396tpf*) 4397 lt_cv_deplibs_check_method=pass_all 4398 ;; 4399esac 4400]) 4401 4402file_magic_glob= 4403want_nocaseglob=no 4404if test "$build" = "$host"; then 4405 case $host_os in 4406 mingw* | pw32*) 4407 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4408 want_nocaseglob=yes 4409 else 4410 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4411 fi 4412 ;; 4413 esac 4414fi 4415 4416file_magic_cmd=$lt_cv_file_magic_cmd 4417deplibs_check_method=$lt_cv_deplibs_check_method 4418test -z "$deplibs_check_method" && deplibs_check_method=unknown 4419 4420_LT_DECL([], [deplibs_check_method], [1], 4421 [Method to check whether dependent libraries are shared objects]) 4422_LT_DECL([], [file_magic_cmd], [1], 4423 [Command to use when deplibs_check_method = "file_magic"]) 4424_LT_DECL([], [file_magic_glob], [1], 4425 [How to find potential files when deplibs_check_method = "file_magic"]) 4426_LT_DECL([], [want_nocaseglob], [1], 4427 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4428])# _LT_CHECK_MAGIC_METHOD 4429 4430 4431# LT_PATH_NM 4432# ---------- 4433# find the pathname to a BSD- or MS-compatible name lister 4434AC_DEFUN([LT_PATH_NM], 4435[AC_REQUIRE([AC_PROG_CC])dnl 4436AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4437[if test -n "$NM"; then 4438 # Let the user override the test. 4439 lt_cv_path_NM="$NM" 4440else 4441 lt_nm_to_check="${ac_tool_prefix}nm" 4442 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4443 lt_nm_to_check="$lt_nm_to_check nm" 4444 fi 4445 for lt_tmp_nm in $lt_nm_to_check; do 4446 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4447 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4448 IFS="$lt_save_ifs" 4449 test -z "$ac_dir" && ac_dir=. 4450 tmp_nm="$ac_dir/$lt_tmp_nm" 4451 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4452 # Check to see if the nm accepts a BSD-compat flag. 4453 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4454 # nm: unknown option "B" ignored 4455 # Tru64's nm complains that /dev/null is an invalid object file 4456 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4457 */dev/null* | *'Invalid file or object type'*) 4458 lt_cv_path_NM="$tmp_nm -B" 4459 break 4460 ;; 4461 *) 4462 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4463 */dev/null*) 4464 lt_cv_path_NM="$tmp_nm -p" 4465 break 4466 ;; 4467 *) 4468 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4469 continue # so that we can try to find one that supports BSD flags 4470 ;; 4471 esac 4472 ;; 4473 esac 4474 fi 4475 done 4476 IFS="$lt_save_ifs" 4477 done 4478 : ${lt_cv_path_NM=no} 4479fi]) 4480if test "$lt_cv_path_NM" != "no"; then 4481 NM="$lt_cv_path_NM" 4482else 4483 # Didn't find any BSD compatible name lister, look for dumpbin. 4484 if test -n "$DUMPBIN"; then : 4485 # Let the user override the test. 4486 else 4487 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4488 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4489 *COFF*) 4490 DUMPBIN="$DUMPBIN -symbols" 4491 ;; 4492 *) 4493 DUMPBIN=: 4494 ;; 4495 esac 4496 fi 4497 AC_SUBST([DUMPBIN]) 4498 if test "$DUMPBIN" != ":"; then 4499 NM="$DUMPBIN" 4500 fi 4501fi 4502test -z "$NM" && NM=nm 4503AC_SUBST([NM]) 4504_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4505 4506AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4507 [lt_cv_nm_interface="BSD nm" 4508 echo "int some_variable = 0;" > conftest.$ac_ext 4509 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4510 (eval "$ac_compile" 2>conftest.err) 4511 cat conftest.err >&AS_MESSAGE_LOG_FD 4512 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4513 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4514 cat conftest.err >&AS_MESSAGE_LOG_FD 4515 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4516 cat conftest.out >&AS_MESSAGE_LOG_FD 4517 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4518 lt_cv_nm_interface="MS dumpbin" 4519 fi 4520 rm -f conftest*]) 4521])# LT_PATH_NM 4522 4523# Old names: 4524AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4525AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4526dnl aclocal-1.4 backwards compatibility: 4527dnl AC_DEFUN([AM_PROG_NM], []) 4528dnl AC_DEFUN([AC_PROG_NM], []) 4529 4530# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4531# -------------------------------- 4532# how to determine the name of the shared library 4533# associated with a specific link library. 4534# -- PORTME fill in with the dynamic library characteristics 4535m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4536[m4_require([_LT_DECL_EGREP]) 4537m4_require([_LT_DECL_OBJDUMP]) 4538m4_require([_LT_DECL_DLLTOOL]) 4539AC_CACHE_CHECK([how to associate runtime and link libraries], 4540lt_cv_sharedlib_from_linklib_cmd, 4541[lt_cv_sharedlib_from_linklib_cmd='unknown' 4542 4543case $host_os in 4544cygwin* | mingw* | pw32* | cegcc*) 4545 # two different shell functions defined in ltmain.sh 4546 # decide which to use based on capabilities of $DLLTOOL 4547 case `$DLLTOOL --help 2>&1` in 4548 *--identify-strict*) 4549 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4550 ;; 4551 *) 4552 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4553 ;; 4554 esac 4555 ;; 4556*) 4557 # fallback: assume linklib IS sharedlib 4558 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4559 ;; 4560esac 4561]) 4562sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4563test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4564 4565_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4566 [Command to associate shared and link libraries]) 4567])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4568 4569 4570# _LT_PATH_MANIFEST_TOOL 4571# ---------------------- 4572# locate the manifest tool 4573m4_defun([_LT_PATH_MANIFEST_TOOL], 4574[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4575test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4576AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4577 [lt_cv_path_mainfest_tool=no 4578 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4579 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4580 cat conftest.err >&AS_MESSAGE_LOG_FD 4581 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4582 lt_cv_path_mainfest_tool=yes 4583 fi 4584 rm -f conftest*]) 4585if test "x$lt_cv_path_mainfest_tool" != xyes; then 4586 MANIFEST_TOOL=: 4587fi 4588_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4589])# _LT_PATH_MANIFEST_TOOL 4590 4591 4592# LT_LIB_M 4593# -------- 4594# check for math library 4595AC_DEFUN([LT_LIB_M], 4596[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4597LIBM= 4598case $host in 4599*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4600 # These system don't have libm, or don't need it 4601 ;; 4602*-ncr-sysv4.3*) 4603 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4604 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4605 ;; 4606*) 4607 AC_CHECK_LIB(m, cos, LIBM="-lm") 4608 ;; 4609esac 4610AC_SUBST([LIBM]) 4611])# LT_LIB_M 4612 4613# Old name: 4614AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4615dnl aclocal-1.4 backwards compatibility: 4616dnl AC_DEFUN([AC_CHECK_LIBM], []) 4617 4618 4619# _LT_COMPILER_NO_RTTI([TAGNAME]) 4620# ------------------------------- 4621m4_defun([_LT_COMPILER_NO_RTTI], 4622[m4_require([_LT_TAG_COMPILER])dnl 4623 4624_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4625 4626if test "$GCC" = yes; then 4627 case $cc_basename in 4628 nvcc*) 4629 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4630 *) 4631 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4632 esac 4633 4634 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4635 lt_cv_prog_compiler_rtti_exceptions, 4636 [-fno-rtti -fno-exceptions], [], 4637 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4638fi 4639_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4640 [Compiler flag to turn off builtin functions]) 4641])# _LT_COMPILER_NO_RTTI 4642 4643 4644# _LT_CMD_GLOBAL_SYMBOLS 4645# ---------------------- 4646m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4647[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4648AC_REQUIRE([AC_PROG_CC])dnl 4649AC_REQUIRE([AC_PROG_AWK])dnl 4650AC_REQUIRE([LT_PATH_NM])dnl 4651AC_REQUIRE([LT_PATH_LD])dnl 4652m4_require([_LT_DECL_SED])dnl 4653m4_require([_LT_DECL_EGREP])dnl 4654m4_require([_LT_TAG_COMPILER])dnl 4655 4656# Check for command to grab the raw symbol name followed by C symbol from nm. 4657AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4658AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4659[ 4660# These are sane defaults that work on at least a few old systems. 4661# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4662 4663# Character class describing NM global symbol codes. 4664symcode='[[BCDEGRST]]' 4665 4666# Regexp to match symbols that can be accessed directly from C. 4667sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4668 4669# Define system-specific variables. 4670case $host_os in 4671aix*) 4672 symcode='[[BCDT]]' 4673 ;; 4674cygwin* | mingw* | pw32* | cegcc*) 4675 symcode='[[ABCDGISTW]]' 4676 ;; 4677hpux*) 4678 if test "$host_cpu" = ia64; then 4679 symcode='[[ABCDEGRST]]' 4680 fi 4681 ;; 4682irix* | nonstopux*) 4683 symcode='[[BCDEGRST]]' 4684 ;; 4685osf*) 4686 symcode='[[BCDEGQRST]]' 4687 ;; 4688solaris*) 4689 symcode='[[BDRT]]' 4690 ;; 4691sco3.2v5*) 4692 symcode='[[DT]]' 4693 ;; 4694sysv4.2uw2*) 4695 symcode='[[DT]]' 4696 ;; 4697sysv5* | sco5v6* | unixware* | OpenUNIX*) 4698 symcode='[[ABDT]]' 4699 ;; 4700sysv4) 4701 symcode='[[DFNSTU]]' 4702 ;; 4703esac 4704 4705# If we're using GNU nm, then use its standard symbol codes. 4706case `$NM -V 2>&1` in 4707*GNU* | *'with BFD'*) 4708 symcode='[[ABCDGIRSTW]]' ;; 4709esac 4710 4711# Transform an extracted symbol line into a proper C declaration. 4712# Some systems (esp. on ia64) link data and code symbols differently, 4713# so use this general approach. 4714lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4715 4716# Transform an extracted symbol line into symbol name and symbol address 4717lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4718lt_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'" 4719 4720# Handle CRLF in mingw tool chain 4721opt_cr= 4722case $build_os in 4723mingw*) 4724 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4725 ;; 4726esac 4727 4728# Try without a prefix underscore, then with it. 4729for ac_symprfx in "" "_"; do 4730 4731 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4732 symxfrm="\\1 $ac_symprfx\\2 \\2" 4733 4734 # Write the raw and C identifiers. 4735 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4736 # Fake it for dumpbin and say T for any non-static function 4737 # and D for any global variable. 4738 # Also find C++ and __fastcall symbols from MSVC++, 4739 # which start with @ or ?. 4740 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4741" {last_section=section; section=\$ 3};"\ 4742" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4743" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4744" \$ 0!~/External *\|/{next};"\ 4745" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4746" {if(hide[section]) next};"\ 4747" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4748" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4749" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4750" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4751" ' prfx=^$ac_symprfx]" 4752 else 4753 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4754 fi 4755 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4756 4757 # Check to see that the pipe works correctly. 4758 pipe_works=no 4759 4760 rm -f conftest* 4761 cat > conftest.$ac_ext <<_LT_EOF 4762#ifdef __cplusplus 4763extern "C" { 4764#endif 4765char nm_test_var; 4766void nm_test_func(void); 4767void nm_test_func(void){} 4768#ifdef __cplusplus 4769} 4770#endif 4771int main(){nm_test_var='a';nm_test_func();return(0);} 4772_LT_EOF 4773 4774 if AC_TRY_EVAL(ac_compile); then 4775 # Now try to grab the symbols. 4776 nlist=conftest.nm 4777 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4778 # Try sorting and uniquifying the output. 4779 if sort "$nlist" | uniq > "$nlist"T; then 4780 mv -f "$nlist"T "$nlist" 4781 else 4782 rm -f "$nlist"T 4783 fi 4784 4785 # Make sure that we snagged all the symbols we need. 4786 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4787 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4788 cat <<_LT_EOF > conftest.$ac_ext 4789/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4790#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4791/* DATA imports from DLLs on WIN32 con't be const, because runtime 4792 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4793# define LT@&t@_DLSYM_CONST 4794#elif defined(__osf__) 4795/* This system does not cope well with relocations in const data. */ 4796# define LT@&t@_DLSYM_CONST 4797#else 4798# define LT@&t@_DLSYM_CONST const 4799#endif 4800 4801#ifdef __cplusplus 4802extern "C" { 4803#endif 4804 4805_LT_EOF 4806 # Now generate the symbol file. 4807 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4808 4809 cat <<_LT_EOF >> conftest.$ac_ext 4810 4811/* The mapping between symbol names and symbols. */ 4812LT@&t@_DLSYM_CONST struct { 4813 const char *name; 4814 void *address; 4815} 4816lt__PROGRAM__LTX_preloaded_symbols[[]] = 4817{ 4818 { "@PROGRAM@", (void *) 0 }, 4819_LT_EOF 4820 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4821 cat <<\_LT_EOF >> conftest.$ac_ext 4822 {0, (void *) 0} 4823}; 4824 4825/* This works around a problem in FreeBSD linker */ 4826#ifdef FREEBSD_WORKAROUND 4827static const void *lt_preloaded_setup() { 4828 return lt__PROGRAM__LTX_preloaded_symbols; 4829} 4830#endif 4831 4832#ifdef __cplusplus 4833} 4834#endif 4835_LT_EOF 4836 # Now try linking the two files. 4837 mv conftest.$ac_objext conftstm.$ac_objext 4838 lt_globsym_save_LIBS=$LIBS 4839 lt_globsym_save_CFLAGS=$CFLAGS 4840 LIBS="conftstm.$ac_objext" 4841 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4842 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4843 pipe_works=yes 4844 fi 4845 LIBS=$lt_globsym_save_LIBS 4846 CFLAGS=$lt_globsym_save_CFLAGS 4847 else 4848 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4849 fi 4850 else 4851 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4852 fi 4853 else 4854 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4855 fi 4856 else 4857 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4858 cat conftest.$ac_ext >&5 4859 fi 4860 rm -rf conftest* conftst* 4861 4862 # Do not use the global_symbol_pipe unless it works. 4863 if test "$pipe_works" = yes; then 4864 break 4865 else 4866 lt_cv_sys_global_symbol_pipe= 4867 fi 4868done 4869]) 4870if test -z "$lt_cv_sys_global_symbol_pipe"; then 4871 lt_cv_sys_global_symbol_to_cdecl= 4872fi 4873if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4874 AC_MSG_RESULT(failed) 4875else 4876 AC_MSG_RESULT(ok) 4877fi 4878 4879# Response file support. 4880if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4881 nm_file_list_spec='@' 4882elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4883 nm_file_list_spec='@' 4884fi 4885 4886_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4887 [Take the output of nm and produce a listing of raw symbols and C names]) 4888_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4889 [Transform the output of nm in a proper C declaration]) 4890_LT_DECL([global_symbol_to_c_name_address], 4891 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4892 [Transform the output of nm in a C name address pair]) 4893_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4894 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4895 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4896_LT_DECL([], [nm_file_list_spec], [1], 4897 [Specify filename containing input files for $NM]) 4898]) # _LT_CMD_GLOBAL_SYMBOLS 4899 4900 4901# _LT_COMPILER_PIC([TAGNAME]) 4902# --------------------------- 4903m4_defun([_LT_COMPILER_PIC], 4904[m4_require([_LT_TAG_COMPILER])dnl 4905_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4906_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4907_LT_TAGVAR(lt_prog_compiler_static, $1)= 4908 4909m4_if([$1], [CXX], [ 4910 # C++ specific cases for pic, static, wl, etc. 4911 if test "$GXX" = yes; then 4912 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4913 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4914 4915 case $host_os in 4916 aix*) 4917 # All AIX code is PIC. 4918 if test "$host_cpu" = ia64; then 4919 # AIX 5 now supports IA64 processor 4920 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4921 fi 4922 ;; 4923 4924 amigaos*) 4925 case $host_cpu in 4926 powerpc) 4927 # see comment about AmigaOS4 .so support 4928 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4929 ;; 4930 m68k) 4931 # FIXME: we need at least 68020 code to build shared libraries, but 4932 # adding the `-m68020' flag to GCC prevents building anything better, 4933 # like `-m68040'. 4934 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4935 ;; 4936 esac 4937 ;; 4938 4939 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4940 # PIC is the default for these OSes. 4941 ;; 4942 mingw* | cygwin* | os2* | pw32* | cegcc*) 4943 # This hack is so that the source file can tell whether it is being 4944 # built for inclusion in a dll (and should export symbols for example). 4945 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4946 # (--disable-auto-import) libraries 4947 m4_if([$1], [GCJ], [], 4948 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4949 ;; 4950 darwin* | rhapsody*) 4951 # PIC is the default on this platform 4952 # Common symbols not allowed in MH_DYLIB files 4953 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4954 ;; 4955 *djgpp*) 4956 # DJGPP does not support shared libraries at all 4957 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4958 ;; 4959 haiku*) 4960 # PIC is the default for Haiku. 4961 # The "-static" flag exists, but is broken. 4962 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4963 ;; 4964 interix[[3-9]]*) 4965 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4966 # Instead, we relocate shared libraries at runtime. 4967 ;; 4968 sysv4*MP*) 4969 if test -d /usr/nec; then 4970 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4971 fi 4972 ;; 4973 hpux*) 4974 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4975 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4976 # sets the default TLS model and affects inlining. 4977 case $host_cpu in 4978 hppa*64*) 4979 ;; 4980 *) 4981 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4982 ;; 4983 esac 4984 ;; 4985 *qnx* | *nto*) 4986 # QNX uses GNU C++, but need to define -shared option too, otherwise 4987 # it will coredump. 4988 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4989 ;; 4990 *) 4991 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4992 ;; 4993 esac 4994 else 4995 case $host_os in 4996 aix[[4-9]]*) 4997 # All AIX code is PIC. 4998 if test "$host_cpu" = ia64; then 4999 # AIX 5 now supports IA64 processor 5000 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5001 else 5002 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5003 fi 5004 ;; 5005 chorus*) 5006 case $cc_basename in 5007 cxch68*) 5008 # Green Hills C++ Compiler 5009 # _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" 5010 ;; 5011 esac 5012 ;; 5013 mingw* | cygwin* | os2* | pw32* | cegcc*) 5014 # This hack is so that the source file can tell whether it is being 5015 # built for inclusion in a dll (and should export symbols for example). 5016 m4_if([$1], [GCJ], [], 5017 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5018 ;; 5019 dgux*) 5020 case $cc_basename in 5021 ec++*) 5022 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5023 ;; 5024 ghcx*) 5025 # Green Hills C++ Compiler 5026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5027 ;; 5028 *) 5029 ;; 5030 esac 5031 ;; 5032 freebsd* | dragonfly*) 5033 # FreeBSD uses GNU C++ 5034 ;; 5035 hpux9* | hpux10* | hpux11*) 5036 case $cc_basename in 5037 CC*) 5038 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5039 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5040 if test "$host_cpu" != ia64; then 5041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5042 fi 5043 ;; 5044 aCC*) 5045 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5046 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5047 case $host_cpu in 5048 hppa*64*|ia64*) 5049 # +Z the default 5050 ;; 5051 *) 5052 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5053 ;; 5054 esac 5055 ;; 5056 *) 5057 ;; 5058 esac 5059 ;; 5060 interix*) 5061 # This is c89, which is MS Visual C++ (no shared libs) 5062 # Anyone wants to do a port? 5063 ;; 5064 irix5* | irix6* | nonstopux*) 5065 case $cc_basename in 5066 CC*) 5067 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5068 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5069 # CC pic flag -KPIC is the default. 5070 ;; 5071 *) 5072 ;; 5073 esac 5074 ;; 5075 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5076 case $cc_basename in 5077 KCC*) 5078 # KAI C++ Compiler 5079 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5080 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5081 ;; 5082 ecpc* ) 5083 # old Intel C++ for x86_64 which still supported -KPIC. 5084 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5085 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5086 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5087 ;; 5088 icpc* ) 5089 # Intel C++, used to be incompatible with GCC. 5090 # ICC 10 doesn't accept -KPIC any more. 5091 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5092 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5093 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5094 ;; 5095 pgCC* | pgcpp*) 5096 # Portland Group C++ compiler 5097 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5099 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5100 ;; 5101 cxx*) 5102 # Compaq C++ 5103 # Make sure the PIC flag is empty. It appears that all Alpha 5104 # Linux and Compaq Tru64 Unix objects are PIC. 5105 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5106 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5107 ;; 5108 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5109 # IBM XL 8.0, 9.0 on PPC and BlueGene 5110 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5111 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5112 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5113 ;; 5114 *) 5115 case `$CC -V 2>&1 | sed 5q` in 5116 *Sun\ C*) 5117 # Sun C++ 5.9 5118 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5119 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5120 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5121 ;; 5122 esac 5123 ;; 5124 esac 5125 ;; 5126 lynxos*) 5127 ;; 5128 m88k*) 5129 ;; 5130 mvs*) 5131 case $cc_basename in 5132 cxx*) 5133 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5134 ;; 5135 *) 5136 ;; 5137 esac 5138 ;; 5139 netbsd*) 5140 ;; 5141 *qnx* | *nto*) 5142 # QNX uses GNU C++, but need to define -shared option too, otherwise 5143 # it will coredump. 5144 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5145 ;; 5146 osf3* | osf4* | osf5*) 5147 case $cc_basename in 5148 KCC*) 5149 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5150 ;; 5151 RCC*) 5152 # Rational C++ 2.4.1 5153 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5154 ;; 5155 cxx*) 5156 # Digital/Compaq C++ 5157 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5158 # Make sure the PIC flag is empty. It appears that all Alpha 5159 # Linux and Compaq Tru64 Unix objects are PIC. 5160 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5161 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5162 ;; 5163 *) 5164 ;; 5165 esac 5166 ;; 5167 psos*) 5168 ;; 5169 solaris*) 5170 case $cc_basename in 5171 CC* | sunCC*) 5172 # Sun C++ 4.2, 5.x and Centerline C++ 5173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5174 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5175 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5176 ;; 5177 gcx*) 5178 # Green Hills C++ Compiler 5179 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5180 ;; 5181 *) 5182 ;; 5183 esac 5184 ;; 5185 sunos4*) 5186 case $cc_basename in 5187 CC*) 5188 # Sun C++ 4.x 5189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5190 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5191 ;; 5192 lcc*) 5193 # Lucid 5194 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5195 ;; 5196 *) 5197 ;; 5198 esac 5199 ;; 5200 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5201 case $cc_basename in 5202 CC*) 5203 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5204 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5205 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5206 ;; 5207 esac 5208 ;; 5209 tandem*) 5210 case $cc_basename in 5211 NCC*) 5212 # NonStop-UX NCC 3.20 5213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5214 ;; 5215 *) 5216 ;; 5217 esac 5218 ;; 5219 vxworks*) 5220 ;; 5221 *) 5222 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5223 ;; 5224 esac 5225 fi 5226], 5227[ 5228 if test "$GCC" = yes; then 5229 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5230 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5231 5232 case $host_os in 5233 aix*) 5234 # All AIX code is PIC. 5235 if test "$host_cpu" = ia64; then 5236 # AIX 5 now supports IA64 processor 5237 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5238 fi 5239 ;; 5240 5241 amigaos*) 5242 case $host_cpu in 5243 powerpc) 5244 # see comment about AmigaOS4 .so support 5245 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5246 ;; 5247 m68k) 5248 # FIXME: we need at least 68020 code to build shared libraries, but 5249 # adding the `-m68020' flag to GCC prevents building anything better, 5250 # like `-m68040'. 5251 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5252 ;; 5253 esac 5254 ;; 5255 5256 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5257 # PIC is the default for these OSes. 5258 ;; 5259 5260 mingw* | cygwin* | pw32* | os2* | cegcc*) 5261 # This hack is so that the source file can tell whether it is being 5262 # built for inclusion in a dll (and should export symbols for example). 5263 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5264 # (--disable-auto-import) libraries 5265 m4_if([$1], [GCJ], [], 5266 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5267 ;; 5268 5269 darwin* | rhapsody*) 5270 # PIC is the default on this platform 5271 # Common symbols not allowed in MH_DYLIB files 5272 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5273 ;; 5274 5275 haiku*) 5276 # PIC is the default for Haiku. 5277 # The "-static" flag exists, but is broken. 5278 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5279 ;; 5280 5281 hpux*) 5282 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5283 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5284 # sets the default TLS model and affects inlining. 5285 case $host_cpu in 5286 hppa*64*) 5287 # +Z the default 5288 ;; 5289 *) 5290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5291 ;; 5292 esac 5293 ;; 5294 5295 interix[[3-9]]*) 5296 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5297 # Instead, we relocate shared libraries at runtime. 5298 ;; 5299 5300 msdosdjgpp*) 5301 # Just because we use GCC doesn't mean we suddenly get shared libraries 5302 # on systems that don't support them. 5303 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5304 enable_shared=no 5305 ;; 5306 5307 *nto* | *qnx*) 5308 # QNX uses GNU C++, but need to define -shared option too, otherwise 5309 # it will coredump. 5310 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5311 ;; 5312 5313 sysv4*MP*) 5314 if test -d /usr/nec; then 5315 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5316 fi 5317 ;; 5318 5319 *) 5320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5321 ;; 5322 esac 5323 5324 case $cc_basename in 5325 nvcc*) # Cuda Compiler Driver 2.2 5326 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5327 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5328 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5329 fi 5330 ;; 5331 esac 5332 else 5333 # PORTME Check for flag to pass linker flags through the system compiler. 5334 case $host_os in 5335 aix*) 5336 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5337 if test "$host_cpu" = ia64; then 5338 # AIX 5 now supports IA64 processor 5339 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5340 else 5341 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5342 fi 5343 ;; 5344 5345 mingw* | cygwin* | pw32* | os2* | cegcc*) 5346 # This hack is so that the source file can tell whether it is being 5347 # built for inclusion in a dll (and should export symbols for example). 5348 m4_if([$1], [GCJ], [], 5349 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5350 ;; 5351 5352 hpux9* | hpux10* | hpux11*) 5353 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5354 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5355 # not for PA HP-UX. 5356 case $host_cpu in 5357 hppa*64*|ia64*) 5358 # +Z the default 5359 ;; 5360 *) 5361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5362 ;; 5363 esac 5364 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5365 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5366 ;; 5367 5368 irix5* | irix6* | nonstopux*) 5369 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5370 # PIC (with -KPIC) is the default. 5371 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5372 ;; 5373 5374 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5375 case $cc_basename in 5376 # old Intel for x86_64 which still supported -KPIC. 5377 ecc*) 5378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5380 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5381 ;; 5382 # icc used to be incompatible with GCC. 5383 # ICC 10 doesn't accept -KPIC any more. 5384 icc* | ifort*) 5385 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5387 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5388 ;; 5389 # Lahey Fortran 8.1. 5390 lf95*) 5391 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5393 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5394 ;; 5395 nagfor*) 5396 # NAG Fortran compiler 5397 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5398 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5399 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5400 ;; 5401 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5402 # Portland Group compilers (*not* the Pentium gcc compiler, 5403 # which looks to be a dead project) 5404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5407 ;; 5408 ccc*) 5409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5410 # All Alpha code is PIC. 5411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5412 ;; 5413 xl* | bgxl* | bgf* | mpixl*) 5414 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5415 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5417 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5418 ;; 5419 *) 5420 case `$CC -V 2>&1 | sed 5q` in 5421 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5422 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5425 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5426 ;; 5427 *Sun\ F* | *Sun*Fortran*) 5428 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5430 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5431 ;; 5432 *Sun\ C*) 5433 # Sun C 5.9 5434 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5435 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5436 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5437 ;; 5438 *Intel*\ [[CF]]*Compiler*) 5439 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5441 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5442 ;; 5443 *Portland\ Group*) 5444 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5445 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5446 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5447 ;; 5448 esac 5449 ;; 5450 esac 5451 ;; 5452 5453 newsos6) 5454 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5455 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5456 ;; 5457 5458 *nto* | *qnx*) 5459 # QNX uses GNU C++, but need to define -shared option too, otherwise 5460 # it will coredump. 5461 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5462 ;; 5463 5464 osf3* | osf4* | osf5*) 5465 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5466 # All OSF/1 code is PIC. 5467 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5468 ;; 5469 5470 rdos*) 5471 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5472 ;; 5473 5474 solaris*) 5475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5477 case $cc_basename in 5478 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5479 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5480 *) 5481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5482 esac 5483 ;; 5484 5485 sunos4*) 5486 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5488 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5489 ;; 5490 5491 sysv4 | sysv4.2uw2* | sysv4.3*) 5492 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5495 ;; 5496 5497 sysv4*MP*) 5498 if test -d /usr/nec ;then 5499 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5500 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5501 fi 5502 ;; 5503 5504 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5505 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5506 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5507 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5508 ;; 5509 5510 unicos*) 5511 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5512 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5513 ;; 5514 5515 uts4*) 5516 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5517 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5518 ;; 5519 5520 *) 5521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5522 ;; 5523 esac 5524 fi 5525]) 5526case $host_os in 5527 # For platforms which do not support PIC, -DPIC is meaningless: 5528 *djgpp*) 5529 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5530 ;; 5531 *) 5532 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5533 ;; 5534esac 5535 5536AC_CACHE_CHECK([for $compiler option to produce PIC], 5537 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5538 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5539_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5540 5541# 5542# Check to make sure the PIC flag actually works. 5543# 5544if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5545 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5546 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5547 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5548 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5549 "" | " "*) ;; 5550 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5551 esac], 5552 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5553 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5554fi 5555_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5556 [Additional compiler flags for building library objects]) 5557 5558_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5559 [How to pass a linker flag through the compiler]) 5560# 5561# Check to make sure the static flag actually works. 5562# 5563wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5564_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5565 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5566 $lt_tmp_static_flag, 5567 [], 5568 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5569_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5570 [Compiler flag to prevent dynamic linking]) 5571])# _LT_COMPILER_PIC 5572 5573 5574# _LT_LINKER_SHLIBS([TAGNAME]) 5575# ---------------------------- 5576# See if the linker supports building shared libraries. 5577m4_defun([_LT_LINKER_SHLIBS], 5578[AC_REQUIRE([LT_PATH_LD])dnl 5579AC_REQUIRE([LT_PATH_NM])dnl 5580m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5581m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5582m4_require([_LT_DECL_EGREP])dnl 5583m4_require([_LT_DECL_SED])dnl 5584m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5585m4_require([_LT_TAG_COMPILER])dnl 5586AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5587m4_if([$1], [CXX], [ 5588 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5589 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5590 case $host_os in 5591 aix[[4-9]]*) 5592 # If we're using GNU nm, then we don't want the "-C" option. 5593 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5594 # Also, AIX nm treats weak defined symbols like other global defined 5595 # symbols, whereas GNU nm marks them as "W". 5596 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5597 _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' 5598 else 5599 _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' 5600 fi 5601 ;; 5602 pw32*) 5603 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5604 ;; 5605 cygwin* | mingw* | cegcc*) 5606 case $cc_basename in 5607 cl*) 5608 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5609 ;; 5610 *) 5611 _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' 5612 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5613 ;; 5614 esac 5615 ;; 5616 *) 5617 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5618 ;; 5619 esac 5620], [ 5621 runpath_var= 5622 _LT_TAGVAR(allow_undefined_flag, $1)= 5623 _LT_TAGVAR(always_export_symbols, $1)=no 5624 _LT_TAGVAR(archive_cmds, $1)= 5625 _LT_TAGVAR(archive_expsym_cmds, $1)= 5626 _LT_TAGVAR(compiler_needs_object, $1)=no 5627 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5628 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5629 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5630 _LT_TAGVAR(hardcode_automatic, $1)=no 5631 _LT_TAGVAR(hardcode_direct, $1)=no 5632 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5634 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5635 _LT_TAGVAR(hardcode_minus_L, $1)=no 5636 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5637 _LT_TAGVAR(inherit_rpath, $1)=no 5638 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5639 _LT_TAGVAR(module_cmds, $1)= 5640 _LT_TAGVAR(module_expsym_cmds, $1)= 5641 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5642 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5643 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5644 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5645 # include_expsyms should be a list of space-separated symbols to be *always* 5646 # included in the symbol list 5647 _LT_TAGVAR(include_expsyms, $1)= 5648 # exclude_expsyms can be an extended regexp of symbols to exclude 5649 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5650 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5651 # as well as any symbol that contains `d'. 5652 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5653 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5654 # platforms (ab)use it in PIC code, but their linkers get confused if 5655 # the symbol is explicitly referenced. Since portable code cannot 5656 # rely on this symbol name, it's probably fine to never include it in 5657 # preloaded symbol tables. 5658 # Exclude shared library initialization/finalization symbols. 5659dnl Note also adjust exclude_expsyms for C++ above. 5660 extract_expsyms_cmds= 5661 5662 case $host_os in 5663 cygwin* | mingw* | pw32* | cegcc*) 5664 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5665 # When not using gcc, we currently assume that we are using 5666 # Microsoft Visual C++. 5667 if test "$GCC" != yes; then 5668 with_gnu_ld=no 5669 fi 5670 ;; 5671 interix*) 5672 # we just hope/assume this is gcc and not c89 (= MSVC++) 5673 with_gnu_ld=yes 5674 ;; 5675 openbsd*) 5676 with_gnu_ld=no 5677 ;; 5678 esac 5679 5680 _LT_TAGVAR(ld_shlibs, $1)=yes 5681 5682 # On some targets, GNU ld is compatible enough with the native linker 5683 # that we're better off using the native interface for both. 5684 lt_use_gnu_ld_interface=no 5685 if test "$with_gnu_ld" = yes; then 5686 case $host_os in 5687 aix*) 5688 # The AIX port of GNU ld has always aspired to compatibility 5689 # with the native linker. However, as the warning in the GNU ld 5690 # block says, versions before 2.19.5* couldn't really create working 5691 # shared libraries, regardless of the interface used. 5692 case `$LD -v 2>&1` in 5693 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5694 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5695 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5696 *) 5697 lt_use_gnu_ld_interface=yes 5698 ;; 5699 esac 5700 ;; 5701 *) 5702 lt_use_gnu_ld_interface=yes 5703 ;; 5704 esac 5705 fi 5706 5707 if test "$lt_use_gnu_ld_interface" = yes; then 5708 # If archive_cmds runs LD, not CC, wlarc should be empty 5709 wlarc='${wl}' 5710 5711 # Set some defaults for GNU ld with shared library support. These 5712 # are reset later if shared libraries are not supported. Putting them 5713 # here allows them to be overridden if necessary. 5714 runpath_var=LD_RUN_PATH 5715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5716 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5717 # ancient GNU ld didn't support --whole-archive et. al. 5718 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5719 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5720 else 5721 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5722 fi 5723 supports_anon_versioning=no 5724 case `$LD -v 2>&1` in 5725 *GNU\ gold*) supports_anon_versioning=yes ;; 5726 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5727 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5728 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5729 *\ 2.11.*) ;; # other 2.11 versions 5730 *) supports_anon_versioning=yes ;; 5731 esac 5732 5733 # See if GNU ld supports shared libraries. 5734 case $host_os in 5735 aix[[3-9]]*) 5736 # On AIX/PPC, the GNU linker is very broken 5737 if test "$host_cpu" != ia64; then 5738 _LT_TAGVAR(ld_shlibs, $1)=no 5739 cat <<_LT_EOF 1>&2 5740 5741*** Warning: the GNU linker, at least up to release 2.19, is reported 5742*** to be unable to reliably create shared libraries on AIX. 5743*** Therefore, libtool is disabling shared libraries support. If you 5744*** really care for shared libraries, you may want to install binutils 5745*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5746*** You will then need to restart the configuration process. 5747 5748_LT_EOF 5749 fi 5750 ;; 5751 5752 amigaos*) 5753 case $host_cpu in 5754 powerpc) 5755 # see comment about AmigaOS4 .so support 5756 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5757 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5758 ;; 5759 m68k) 5760 _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)' 5761 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5762 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5763 ;; 5764 esac 5765 ;; 5766 5767 beos*) 5768 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5769 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5770 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5771 # support --undefined. This deserves some investigation. FIXME 5772 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5773 else 5774 _LT_TAGVAR(ld_shlibs, $1)=no 5775 fi 5776 ;; 5777 5778 cygwin* | mingw* | pw32* | cegcc*) 5779 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5780 # as there is no search path for DLLs. 5781 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5782 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5783 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5784 _LT_TAGVAR(always_export_symbols, $1)=no 5785 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5786 _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' 5787 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5788 5789 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5790 _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' 5791 # If the export-symbols file already is a .def file (1st line 5792 # is EXPORTS), use it as is; otherwise, prepend... 5793 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5794 cp $export_symbols $output_objdir/$soname.def; 5795 else 5796 echo EXPORTS > $output_objdir/$soname.def; 5797 cat $export_symbols >> $output_objdir/$soname.def; 5798 fi~ 5799 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5800 else 5801 _LT_TAGVAR(ld_shlibs, $1)=no 5802 fi 5803 ;; 5804 5805 haiku*) 5806 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5807 _LT_TAGVAR(link_all_deplibs, $1)=yes 5808 ;; 5809 5810 interix[[3-9]]*) 5811 _LT_TAGVAR(hardcode_direct, $1)=no 5812 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5813 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5814 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5815 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5816 # Instead, shared libraries are loaded at an image base (0x10000000 by 5817 # default) and relocated if they conflict, which is a slow very memory 5818 # consuming and fragmenting process. To avoid this, we pick a random, 5819 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5820 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5821 _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' 5822 _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' 5823 ;; 5824 5825 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5826 tmp_diet=no 5827 if test "$host_os" = linux-dietlibc; then 5828 case $cc_basename in 5829 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5830 esac 5831 fi 5832 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5833 && test "$tmp_diet" = no 5834 then 5835 tmp_addflag=' $pic_flag' 5836 tmp_sharedflag='-shared' 5837 case $cc_basename,$host_cpu in 5838 pgcc*) # Portland Group C compiler 5839 _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' 5840 tmp_addflag=' $pic_flag' 5841 ;; 5842 pgf77* | pgf90* | pgf95* | pgfortran*) 5843 # Portland Group f77 and f90 compilers 5844 _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' 5845 tmp_addflag=' $pic_flag -Mnomain' ;; 5846 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5847 tmp_addflag=' -i_dynamic' ;; 5848 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5849 tmp_addflag=' -i_dynamic -nofor_main' ;; 5850 ifc* | ifort*) # Intel Fortran compiler 5851 tmp_addflag=' -nofor_main' ;; 5852 lf95*) # Lahey Fortran 8.1 5853 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5854 tmp_sharedflag='--shared' ;; 5855 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5856 tmp_sharedflag='-qmkshrobj' 5857 tmp_addflag= ;; 5858 nvcc*) # Cuda Compiler Driver 2.2 5859 _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' 5860 _LT_TAGVAR(compiler_needs_object, $1)=yes 5861 ;; 5862 esac 5863 case `$CC -V 2>&1 | sed 5q` in 5864 *Sun\ C*) # Sun C 5.9 5865 _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' 5866 _LT_TAGVAR(compiler_needs_object, $1)=yes 5867 tmp_sharedflag='-G' ;; 5868 *Sun\ F*) # Sun Fortran 8.3 5869 tmp_sharedflag='-G' ;; 5870 esac 5871 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5872 5873 if test "x$supports_anon_versioning" = xyes; then 5874 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5875 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5876 echo "local: *; };" >> $output_objdir/$libname.ver~ 5877 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5878 fi 5879 5880 case $cc_basename in 5881 xlf* | bgf* | bgxlf* | mpixlf*) 5882 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5883 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5885 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5886 if test "x$supports_anon_versioning" = xyes; then 5887 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5888 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5889 echo "local: *; };" >> $output_objdir/$libname.ver~ 5890 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5891 fi 5892 ;; 5893 esac 5894 else 5895 _LT_TAGVAR(ld_shlibs, $1)=no 5896 fi 5897 ;; 5898 5899 netbsd*) 5900 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5901 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5902 wlarc= 5903 else 5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5905 _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' 5906 fi 5907 ;; 5908 5909 solaris*) 5910 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5911 _LT_TAGVAR(ld_shlibs, $1)=no 5912 cat <<_LT_EOF 1>&2 5913 5914*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5915*** create shared libraries on Solaris systems. Therefore, libtool 5916*** is disabling shared libraries support. We urge you to upgrade GNU 5917*** binutils to release 2.9.1 or newer. Another option is to modify 5918*** your PATH or compiler configuration so that the native linker is 5919*** used, and then restart. 5920 5921_LT_EOF 5922 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5923 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5924 _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' 5925 else 5926 _LT_TAGVAR(ld_shlibs, $1)=no 5927 fi 5928 ;; 5929 5930 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5931 case `$LD -v 2>&1` in 5932 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5933 _LT_TAGVAR(ld_shlibs, $1)=no 5934 cat <<_LT_EOF 1>&2 5935 5936*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5937*** reliably create shared libraries on SCO systems. Therefore, libtool 5938*** is disabling shared libraries support. We urge you to upgrade GNU 5939*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5940*** your PATH or compiler configuration so that the native linker is 5941*** used, and then restart. 5942 5943_LT_EOF 5944 ;; 5945 *) 5946 # For security reasons, it is highly recommended that you always 5947 # use absolute paths for naming shared libraries, and exclude the 5948 # DT_RUNPATH tag from executables and libraries. But doing so 5949 # requires that you compile everything twice, which is a pain. 5950 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5951 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5952 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5953 _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' 5954 else 5955 _LT_TAGVAR(ld_shlibs, $1)=no 5956 fi 5957 ;; 5958 esac 5959 ;; 5960 5961 sunos4*) 5962 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5963 wlarc= 5964 _LT_TAGVAR(hardcode_direct, $1)=yes 5965 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5966 ;; 5967 5968 *) 5969 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5971 _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' 5972 else 5973 _LT_TAGVAR(ld_shlibs, $1)=no 5974 fi 5975 ;; 5976 esac 5977 5978 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 5979 runpath_var= 5980 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5981 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5982 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5983 fi 5984 else 5985 # PORTME fill in a description of your system's linker (not GNU ld) 5986 case $host_os in 5987 aix3*) 5988 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5989 _LT_TAGVAR(always_export_symbols, $1)=yes 5990 _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' 5991 # Note: this linker hardcodes the directories in LIBPATH if there 5992 # are no directories specified by -L. 5993 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5994 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5995 # Neither direct hardcoding nor static linking is supported with a 5996 # broken collect2. 5997 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5998 fi 5999 ;; 6000 6001 aix[[4-9]]*) 6002 if test "$host_cpu" = ia64; then 6003 # On IA64, the linker does run time linking by default, so we don't 6004 # have to do anything special. 6005 aix_use_runtimelinking=no 6006 exp_sym_flag='-Bexport' 6007 no_entry_flag="" 6008 else 6009 # If we're using GNU nm, then we don't want the "-C" option. 6010 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6011 # Also, AIX nm treats weak defined symbols like other global 6012 # defined symbols, whereas GNU nm marks them as "W". 6013 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6014 _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' 6015 else 6016 _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' 6017 fi 6018 aix_use_runtimelinking=no 6019 6020 # Test if we are trying to use run time linking or normal 6021 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6022 # need to do runtime linking. 6023 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6024 for ld_flag in $LDFLAGS; do 6025 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6026 aix_use_runtimelinking=yes 6027 break 6028 fi 6029 done 6030 ;; 6031 esac 6032 6033 exp_sym_flag='-bexport' 6034 no_entry_flag='-bnoentry' 6035 fi 6036 6037 # When large executables or shared objects are built, AIX ld can 6038 # have problems creating the table of contents. If linking a library 6039 # or program results in "error TOC overflow" add -mminimal-toc to 6040 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6041 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6042 6043 _LT_TAGVAR(archive_cmds, $1)='' 6044 _LT_TAGVAR(hardcode_direct, $1)=yes 6045 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6046 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6047 _LT_TAGVAR(link_all_deplibs, $1)=yes 6048 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6049 6050 if test "$GCC" = yes; then 6051 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6052 # We only want to do this on AIX 4.2 and lower, the check 6053 # below for broken collect2 doesn't work under 4.3+ 6054 collect2name=`${CC} -print-prog-name=collect2` 6055 if test -f "$collect2name" && 6056 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6057 then 6058 # We have reworked collect2 6059 : 6060 else 6061 # We have old collect2 6062 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6063 # It fails to find uninstalled libraries when the uninstalled 6064 # path is not listed in the libpath. Setting hardcode_minus_L 6065 # to unsupported forces relinking 6066 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6067 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6068 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6069 fi 6070 ;; 6071 esac 6072 shared_flag='-shared' 6073 if test "$aix_use_runtimelinking" = yes; then 6074 shared_flag="$shared_flag "'${wl}-G' 6075 fi 6076 else 6077 # not using gcc 6078 if test "$host_cpu" = ia64; then 6079 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6080 # chokes on -Wl,-G. The following line is correct: 6081 shared_flag='-G' 6082 else 6083 if test "$aix_use_runtimelinking" = yes; then 6084 shared_flag='${wl}-G' 6085 else 6086 shared_flag='${wl}-bM:SRE' 6087 fi 6088 fi 6089 fi 6090 6091 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6092 # It seems that -bexpall does not export symbols beginning with 6093 # underscore (_), so it is better to generate a list of symbols to export. 6094 _LT_TAGVAR(always_export_symbols, $1)=yes 6095 if test "$aix_use_runtimelinking" = yes; then 6096 # Warning - without using the other runtime loading flags (-brtl), 6097 # -berok will link without error, but may produce a broken library. 6098 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6099 # Determine the default libpath from the value encoded in an 6100 # empty executable. 6101 _LT_SYS_MODULE_PATH_AIX([$1]) 6102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6103 _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" 6104 else 6105 if test "$host_cpu" = ia64; then 6106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6107 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6108 _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" 6109 else 6110 # Determine the default libpath from the value encoded in an 6111 # empty executable. 6112 _LT_SYS_MODULE_PATH_AIX([$1]) 6113 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6114 # Warning - without using the other run time loading flags, 6115 # -berok will link without error, but may produce a broken library. 6116 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6117 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6118 if test "$with_gnu_ld" = yes; then 6119 # We only use this code for GNU lds that support --whole-archive. 6120 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6121 else 6122 # Exported symbols can be pulled into shared objects from archives 6123 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6124 fi 6125 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6126 # This is similar to how AIX traditionally builds its shared libraries. 6127 _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' 6128 fi 6129 fi 6130 ;; 6131 6132 amigaos*) 6133 case $host_cpu in 6134 powerpc) 6135 # see comment about AmigaOS4 .so support 6136 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6137 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6138 ;; 6139 m68k) 6140 _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)' 6141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6142 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6143 ;; 6144 esac 6145 ;; 6146 6147 bsdi[[45]]*) 6148 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6149 ;; 6150 6151 cygwin* | mingw* | pw32* | cegcc*) 6152 # When not using gcc, we currently assume that we are using 6153 # Microsoft Visual C++. 6154 # hardcode_libdir_flag_spec is actually meaningless, as there is 6155 # no search path for DLLs. 6156 case $cc_basename in 6157 cl*) 6158 # Native MSVC 6159 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6160 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6161 _LT_TAGVAR(always_export_symbols, $1)=yes 6162 _LT_TAGVAR(file_list_spec, $1)='@' 6163 # Tell ltmain to make .lib files, not .a files. 6164 libext=lib 6165 # Tell ltmain to make .dll files, not .so files. 6166 shrext_cmds=".dll" 6167 # FIXME: Setting linknames here is a bad hack. 6168 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6169 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6170 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6171 else 6172 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6173 fi~ 6174 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6175 linknames=' 6176 # The linker will not automatically build a static lib if we build a DLL. 6177 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6178 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6179 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6180 _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' 6181 # Don't use ranlib 6182 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6183 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6184 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6185 case $lt_outputfile in 6186 *.exe|*.EXE) ;; 6187 *) 6188 lt_outputfile="$lt_outputfile.exe" 6189 lt_tool_outputfile="$lt_tool_outputfile.exe" 6190 ;; 6191 esac~ 6192 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6193 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6194 $RM "$lt_outputfile.manifest"; 6195 fi' 6196 ;; 6197 *) 6198 # Assume MSVC wrapper 6199 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6200 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6201 # Tell ltmain to make .lib files, not .a files. 6202 libext=lib 6203 # Tell ltmain to make .dll files, not .so files. 6204 shrext_cmds=".dll" 6205 # FIXME: Setting linknames here is a bad hack. 6206 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6207 # The linker will automatically build a .lib file if we build a DLL. 6208 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6209 # FIXME: Should let the user specify the lib program. 6210 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6211 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6212 ;; 6213 esac 6214 ;; 6215 6216 darwin* | rhapsody*) 6217 _LT_DARWIN_LINKER_FEATURES($1) 6218 ;; 6219 6220 dgux*) 6221 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6222 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6223 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6224 ;; 6225 6226 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6227 # support. Future versions do this automatically, but an explicit c++rt0.o 6228 # does not break anything, and helps significantly (at the cost of a little 6229 # extra space). 6230 freebsd2.2*) 6231 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6232 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6233 _LT_TAGVAR(hardcode_direct, $1)=yes 6234 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6235 ;; 6236 6237 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6238 freebsd2.*) 6239 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6240 _LT_TAGVAR(hardcode_direct, $1)=yes 6241 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6242 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6243 ;; 6244 6245 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6246 freebsd* | dragonfly*) 6247 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6248 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6249 _LT_TAGVAR(hardcode_direct, $1)=yes 6250 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6251 ;; 6252 6253 hpux9*) 6254 if test "$GCC" = yes; then 6255 _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' 6256 else 6257 _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' 6258 fi 6259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6260 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6261 _LT_TAGVAR(hardcode_direct, $1)=yes 6262 6263 # hardcode_minus_L: Not really in the search PATH, 6264 # but as the default location of the library. 6265 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6266 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6267 ;; 6268 6269 hpux10*) 6270 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6271 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6272 else 6273 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6274 fi 6275 if test "$with_gnu_ld" = no; then 6276 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6277 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6278 _LT_TAGVAR(hardcode_direct, $1)=yes 6279 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6280 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6281 # hardcode_minus_L: Not really in the search PATH, 6282 # but as the default location of the library. 6283 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6284 fi 6285 ;; 6286 6287 hpux11*) 6288 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6289 case $host_cpu in 6290 hppa*64*) 6291 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6292 ;; 6293 ia64*) 6294 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6295 ;; 6296 *) 6297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6298 ;; 6299 esac 6300 else 6301 case $host_cpu in 6302 hppa*64*) 6303 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6304 ;; 6305 ia64*) 6306 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6307 ;; 6308 *) 6309 m4_if($1, [], [ 6310 # Older versions of the 11.00 compiler do not understand -b yet 6311 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6312 _LT_LINKER_OPTION([if $CC understands -b], 6313 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6314 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6315 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6316 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6317 ;; 6318 esac 6319 fi 6320 if test "$with_gnu_ld" = no; then 6321 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6322 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6323 6324 case $host_cpu in 6325 hppa*64*|ia64*) 6326 _LT_TAGVAR(hardcode_direct, $1)=no 6327 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6328 ;; 6329 *) 6330 _LT_TAGVAR(hardcode_direct, $1)=yes 6331 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6332 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6333 6334 # hardcode_minus_L: Not really in the search PATH, 6335 # but as the default location of the library. 6336 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6337 ;; 6338 esac 6339 fi 6340 ;; 6341 6342 irix5* | irix6* | nonstopux*) 6343 if test "$GCC" = yes; then 6344 _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' 6345 # Try to use the -exported_symbol ld option, if it does not 6346 # work, assume that -exports_file does not work either and 6347 # implicitly export all symbols. 6348 # This should be the same for all languages, so no per-tag cache variable. 6349 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6350 [lt_cv_irix_exported_symbol], 6351 [save_LDFLAGS="$LDFLAGS" 6352 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6353 AC_LINK_IFELSE( 6354 [AC_LANG_SOURCE( 6355 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6356 [C++], [[int foo (void) { return 0; }]], 6357 [Fortran 77], [[ 6358 subroutine foo 6359 end]], 6360 [Fortran], [[ 6361 subroutine foo 6362 end]])])], 6363 [lt_cv_irix_exported_symbol=yes], 6364 [lt_cv_irix_exported_symbol=no]) 6365 LDFLAGS="$save_LDFLAGS"]) 6366 if test "$lt_cv_irix_exported_symbol" = yes; then 6367 _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' 6368 fi 6369 else 6370 _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' 6371 _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' 6372 fi 6373 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6375 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6376 _LT_TAGVAR(inherit_rpath, $1)=yes 6377 _LT_TAGVAR(link_all_deplibs, $1)=yes 6378 ;; 6379 6380 netbsd*) 6381 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6382 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6383 else 6384 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6385 fi 6386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6387 _LT_TAGVAR(hardcode_direct, $1)=yes 6388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6389 ;; 6390 6391 newsos6) 6392 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6393 _LT_TAGVAR(hardcode_direct, $1)=yes 6394 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6395 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6396 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6397 ;; 6398 6399 *nto* | *qnx*) 6400 ;; 6401 6402 openbsd*) 6403 if test -f /usr/libexec/ld.so; then 6404 _LT_TAGVAR(hardcode_direct, $1)=yes 6405 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6406 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6407 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6408 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6409 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6411 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6412 else 6413 case $host_os in 6414 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6415 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6416 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6417 ;; 6418 *) 6419 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6421 ;; 6422 esac 6423 fi 6424 else 6425 _LT_TAGVAR(ld_shlibs, $1)=no 6426 fi 6427 ;; 6428 6429 os2*) 6430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6431 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6432 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6433 _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' 6434 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6435 ;; 6436 6437 osf3*) 6438 if test "$GCC" = yes; then 6439 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6440 _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' 6441 else 6442 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6443 _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' 6444 fi 6445 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6447 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6448 ;; 6449 6450 osf4* | osf5*) # as osf3* with the addition of -msym flag 6451 if test "$GCC" = yes; then 6452 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6453 _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' 6454 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6455 else 6456 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6457 _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' 6458 _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~ 6459 $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' 6460 6461 # Both c and cxx compiler support -rpath directly 6462 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6463 fi 6464 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6465 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6466 ;; 6467 6468 solaris*) 6469 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6470 if test "$GCC" = yes; then 6471 wlarc='${wl}' 6472 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6473 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6474 $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' 6475 else 6476 case `$CC -V 2>&1` in 6477 *"Compilers 5.0"*) 6478 wlarc='' 6479 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6480 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6481 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6482 ;; 6483 *) 6484 wlarc='${wl}' 6485 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6486 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6487 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6488 ;; 6489 esac 6490 fi 6491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6492 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6493 case $host_os in 6494 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6495 *) 6496 # The compiler driver will combine and reorder linker options, 6497 # but understands `-z linker_flag'. GCC discards it without `$wl', 6498 # but is careful enough not to reorder. 6499 # Supported since Solaris 2.6 (maybe 2.5.1?) 6500 if test "$GCC" = yes; then 6501 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6502 else 6503 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6504 fi 6505 ;; 6506 esac 6507 _LT_TAGVAR(link_all_deplibs, $1)=yes 6508 ;; 6509 6510 sunos4*) 6511 if test "x$host_vendor" = xsequent; then 6512 # Use $CC to link under sequent, because it throws in some extra .o 6513 # files that make .init and .fini sections work. 6514 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6515 else 6516 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6517 fi 6518 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6519 _LT_TAGVAR(hardcode_direct, $1)=yes 6520 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6521 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6522 ;; 6523 6524 sysv4) 6525 case $host_vendor in 6526 sni) 6527 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6528 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6529 ;; 6530 siemens) 6531 ## LD is ld it makes a PLAMLIB 6532 ## CC just makes a GrossModule. 6533 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6534 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6535 _LT_TAGVAR(hardcode_direct, $1)=no 6536 ;; 6537 motorola) 6538 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6539 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6540 ;; 6541 esac 6542 runpath_var='LD_RUN_PATH' 6543 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6544 ;; 6545 6546 sysv4.3*) 6547 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6548 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6549 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6550 ;; 6551 6552 sysv4*MP*) 6553 if test -d /usr/nec; then 6554 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6555 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6556 runpath_var=LD_RUN_PATH 6557 hardcode_runpath_var=yes 6558 _LT_TAGVAR(ld_shlibs, $1)=yes 6559 fi 6560 ;; 6561 6562 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6563 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6564 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6565 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6566 runpath_var='LD_RUN_PATH' 6567 6568 if test "$GCC" = yes; then 6569 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6570 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6571 else 6572 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6573 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6574 fi 6575 ;; 6576 6577 sysv5* | sco3.2v5* | sco5v6*) 6578 # Note: We can NOT use -z defs as we might desire, because we do not 6579 # link with -lc, and that would cause any symbols used from libc to 6580 # always be unresolved, which means just about no library would 6581 # ever link correctly. If we're not using GNU ld we use -z text 6582 # though, which does catch some bad symbols but isn't as heavy-handed 6583 # as -z defs. 6584 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6585 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6586 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6587 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6589 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6590 _LT_TAGVAR(link_all_deplibs, $1)=yes 6591 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6592 runpath_var='LD_RUN_PATH' 6593 6594 if test "$GCC" = yes; then 6595 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6596 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6597 else 6598 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6599 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6600 fi 6601 ;; 6602 6603 uts4*) 6604 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6606 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6607 ;; 6608 6609 *) 6610 _LT_TAGVAR(ld_shlibs, $1)=no 6611 ;; 6612 esac 6613 6614 if test x$host_vendor = xsni; then 6615 case $host in 6616 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6617 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6618 ;; 6619 esac 6620 fi 6621 fi 6622]) 6623AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6624test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6625 6626_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6627 6628_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6629_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6630_LT_DECL([], [extract_expsyms_cmds], [2], 6631 [The commands to extract the exported symbol list from a shared archive]) 6632 6633# 6634# Do we need to explicitly link libc? 6635# 6636case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6637x|xyes) 6638 # Assume -lc should be added 6639 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6640 6641 if test "$enable_shared" = yes && test "$GCC" = yes; then 6642 case $_LT_TAGVAR(archive_cmds, $1) in 6643 *'~'*) 6644 # FIXME: we may have to deal with multi-command sequences. 6645 ;; 6646 '$CC '*) 6647 # Test whether the compiler implicitly links with -lc since on some 6648 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6649 # to ld, don't add -lc before -lgcc. 6650 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6651 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6652 [$RM conftest* 6653 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6654 6655 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6656 soname=conftest 6657 lib=conftest 6658 libobjs=conftest.$ac_objext 6659 deplibs= 6660 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6661 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6662 compiler_flags=-v 6663 linker_flags=-v 6664 verstring= 6665 output_objdir=. 6666 libname=conftest 6667 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6668 _LT_TAGVAR(allow_undefined_flag, $1)= 6669 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6670 then 6671 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6672 else 6673 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6674 fi 6675 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6676 else 6677 cat conftest.err 1>&5 6678 fi 6679 $RM conftest* 6680 ]) 6681 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6682 ;; 6683 esac 6684 fi 6685 ;; 6686esac 6687 6688_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6689 [Whether or not to add -lc for building shared libraries]) 6690_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6691 [enable_shared_with_static_runtimes], [0], 6692 [Whether or not to disallow shared libs when runtime libs are static]) 6693_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6694 [Compiler flag to allow reflexive dlopens]) 6695_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6696 [Compiler flag to generate shared objects directly from archives]) 6697_LT_TAGDECL([], [compiler_needs_object], [1], 6698 [Whether the compiler copes with passing no objects directly]) 6699_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6700 [Create an old-style archive from a shared archive]) 6701_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6702 [Create a temporary old-style archive to link instead of a shared archive]) 6703_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6704_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6705_LT_TAGDECL([], [module_cmds], [2], 6706 [Commands used to build a loadable module if different from building 6707 a shared archive.]) 6708_LT_TAGDECL([], [module_expsym_cmds], [2]) 6709_LT_TAGDECL([], [with_gnu_ld], [1], 6710 [Whether we are building with GNU ld or not]) 6711_LT_TAGDECL([], [allow_undefined_flag], [1], 6712 [Flag that allows shared libraries with undefined symbols to be built]) 6713_LT_TAGDECL([], [no_undefined_flag], [1], 6714 [Flag that enforces no undefined symbols]) 6715_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6716 [Flag to hardcode $libdir into a binary during linking. 6717 This must work even if $libdir does not exist]) 6718_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6719 [Whether we need a single "-rpath" flag with a separated argument]) 6720_LT_TAGDECL([], [hardcode_direct], [0], 6721 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6722 DIR into the resulting binary]) 6723_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6724 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6725 DIR into the resulting binary and the resulting library dependency is 6726 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6727 library is relocated]) 6728_LT_TAGDECL([], [hardcode_minus_L], [0], 6729 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6730 into the resulting binary]) 6731_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6732 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6733 into the resulting binary]) 6734_LT_TAGDECL([], [hardcode_automatic], [0], 6735 [Set to "yes" if building a shared library automatically hardcodes DIR 6736 into the library and all subsequent libraries and executables linked 6737 against it]) 6738_LT_TAGDECL([], [inherit_rpath], [0], 6739 [Set to yes if linker adds runtime paths of dependent libraries 6740 to runtime path list]) 6741_LT_TAGDECL([], [link_all_deplibs], [0], 6742 [Whether libtool must link a program against all its dependency libraries]) 6743_LT_TAGDECL([], [always_export_symbols], [0], 6744 [Set to "yes" if exported symbols are required]) 6745_LT_TAGDECL([], [export_symbols_cmds], [2], 6746 [The commands to list exported symbols]) 6747_LT_TAGDECL([], [exclude_expsyms], [1], 6748 [Symbols that should not be listed in the preloaded symbols]) 6749_LT_TAGDECL([], [include_expsyms], [1], 6750 [Symbols that must always be exported]) 6751_LT_TAGDECL([], [prelink_cmds], [2], 6752 [Commands necessary for linking programs (against libraries) with templates]) 6753_LT_TAGDECL([], [postlink_cmds], [2], 6754 [Commands necessary for finishing linking programs]) 6755_LT_TAGDECL([], [file_list_spec], [1], 6756 [Specify filename containing input files]) 6757dnl FIXME: Not yet implemented 6758dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6759dnl [Compiler flag to generate thread safe objects]) 6760])# _LT_LINKER_SHLIBS 6761 6762 6763# _LT_LANG_C_CONFIG([TAG]) 6764# ------------------------ 6765# Ensure that the configuration variables for a C compiler are suitably 6766# defined. These variables are subsequently used by _LT_CONFIG to write 6767# the compiler configuration to `libtool'. 6768m4_defun([_LT_LANG_C_CONFIG], 6769[m4_require([_LT_DECL_EGREP])dnl 6770lt_save_CC="$CC" 6771AC_LANG_PUSH(C) 6772 6773# Source file extension for C test sources. 6774ac_ext=c 6775 6776# Object file extension for compiled C test sources. 6777objext=o 6778_LT_TAGVAR(objext, $1)=$objext 6779 6780# Code to be used in simple compile tests 6781lt_simple_compile_test_code="int some_variable = 0;" 6782 6783# Code to be used in simple link tests 6784lt_simple_link_test_code='int main(){return(0);}' 6785 6786_LT_TAG_COMPILER 6787# Save the default compiler, since it gets overwritten when the other 6788# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6789compiler_DEFAULT=$CC 6790 6791# save warnings/boilerplate of simple test code 6792_LT_COMPILER_BOILERPLATE 6793_LT_LINKER_BOILERPLATE 6794 6795if test -n "$compiler"; then 6796 _LT_COMPILER_NO_RTTI($1) 6797 _LT_COMPILER_PIC($1) 6798 _LT_COMPILER_C_O($1) 6799 _LT_COMPILER_FILE_LOCKS($1) 6800 _LT_LINKER_SHLIBS($1) 6801 _LT_SYS_DYNAMIC_LINKER($1) 6802 _LT_LINKER_HARDCODE_LIBPATH($1) 6803 LT_SYS_DLOPEN_SELF 6804 _LT_CMD_STRIPLIB 6805 6806 # Report which library types will actually be built 6807 AC_MSG_CHECKING([if libtool supports shared libraries]) 6808 AC_MSG_RESULT([$can_build_shared]) 6809 6810 AC_MSG_CHECKING([whether to build shared libraries]) 6811 test "$can_build_shared" = "no" && enable_shared=no 6812 6813 # On AIX, shared libraries and static libraries use the same namespace, and 6814 # are all built from PIC. 6815 case $host_os in 6816 aix3*) 6817 test "$enable_shared" = yes && enable_static=no 6818 if test -n "$RANLIB"; then 6819 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6820 postinstall_cmds='$RANLIB $lib' 6821 fi 6822 ;; 6823 6824 aix[[4-9]]*) 6825 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826 test "$enable_shared" = yes && enable_static=no 6827 fi 6828 ;; 6829 esac 6830 AC_MSG_RESULT([$enable_shared]) 6831 6832 AC_MSG_CHECKING([whether to build static libraries]) 6833 # Make sure either enable_shared or enable_static is yes. 6834 test "$enable_shared" = yes || enable_static=yes 6835 AC_MSG_RESULT([$enable_static]) 6836 6837 _LT_CONFIG($1) 6838fi 6839AC_LANG_POP 6840CC="$lt_save_CC" 6841])# _LT_LANG_C_CONFIG 6842 6843 6844# _LT_LANG_CXX_CONFIG([TAG]) 6845# -------------------------- 6846# Ensure that the configuration variables for a C++ compiler are suitably 6847# defined. These variables are subsequently used by _LT_CONFIG to write 6848# the compiler configuration to `libtool'. 6849m4_defun([_LT_LANG_CXX_CONFIG], 6850[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6851m4_require([_LT_DECL_EGREP])dnl 6852m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6853if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6854 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6855 (test "X$CXX" != "Xg++"))) ; then 6856 AC_PROG_CXXCPP 6857else 6858 _lt_caught_CXX_error=yes 6859fi 6860 6861AC_LANG_PUSH(C++) 6862_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6863_LT_TAGVAR(allow_undefined_flag, $1)= 6864_LT_TAGVAR(always_export_symbols, $1)=no 6865_LT_TAGVAR(archive_expsym_cmds, $1)= 6866_LT_TAGVAR(compiler_needs_object, $1)=no 6867_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6868_LT_TAGVAR(hardcode_direct, $1)=no 6869_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6870_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6871_LT_TAGVAR(hardcode_libdir_separator, $1)= 6872_LT_TAGVAR(hardcode_minus_L, $1)=no 6873_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6874_LT_TAGVAR(hardcode_automatic, $1)=no 6875_LT_TAGVAR(inherit_rpath, $1)=no 6876_LT_TAGVAR(module_cmds, $1)= 6877_LT_TAGVAR(module_expsym_cmds, $1)= 6878_LT_TAGVAR(link_all_deplibs, $1)=unknown 6879_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6880_LT_TAGVAR(reload_flag, $1)=$reload_flag 6881_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6882_LT_TAGVAR(no_undefined_flag, $1)= 6883_LT_TAGVAR(whole_archive_flag_spec, $1)= 6884_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6885 6886# Source file extension for C++ test sources. 6887ac_ext=cpp 6888 6889# Object file extension for compiled C++ test sources. 6890objext=o 6891_LT_TAGVAR(objext, $1)=$objext 6892 6893# No sense in running all these tests if we already determined that 6894# the CXX compiler isn't working. Some variables (like enable_shared) 6895# are currently assumed to apply to all compilers on this platform, 6896# and will be corrupted by setting them based on a non-working compiler. 6897if test "$_lt_caught_CXX_error" != yes; then 6898 # Code to be used in simple compile tests 6899 lt_simple_compile_test_code="int some_variable = 0;" 6900 6901 # Code to be used in simple link tests 6902 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6903 6904 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6905 _LT_TAG_COMPILER 6906 6907 # save warnings/boilerplate of simple test code 6908 _LT_COMPILER_BOILERPLATE 6909 _LT_LINKER_BOILERPLATE 6910 6911 # Allow CC to be a program name with arguments. 6912 lt_save_CC=$CC 6913 lt_save_CFLAGS=$CFLAGS 6914 lt_save_LD=$LD 6915 lt_save_GCC=$GCC 6916 GCC=$GXX 6917 lt_save_with_gnu_ld=$with_gnu_ld 6918 lt_save_path_LD=$lt_cv_path_LD 6919 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6920 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6921 else 6922 $as_unset lt_cv_prog_gnu_ld 6923 fi 6924 if test -n "${lt_cv_path_LDCXX+set}"; then 6925 lt_cv_path_LD=$lt_cv_path_LDCXX 6926 else 6927 $as_unset lt_cv_path_LD 6928 fi 6929 test -z "${LDCXX+set}" || LD=$LDCXX 6930 CC=${CXX-"c++"} 6931 CFLAGS=$CXXFLAGS 6932 compiler=$CC 6933 _LT_TAGVAR(compiler, $1)=$CC 6934 _LT_CC_BASENAME([$compiler]) 6935 6936 if test -n "$compiler"; then 6937 # We don't want -fno-exception when compiling C++ code, so set the 6938 # no_builtin_flag separately 6939 if test "$GXX" = yes; then 6940 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6941 else 6942 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6943 fi 6944 6945 if test "$GXX" = yes; then 6946 # Set up default GNU C++ configuration 6947 6948 LT_PATH_LD 6949 6950 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6951 # archiving commands below assume that GNU ld is being used. 6952 if test "$with_gnu_ld" = yes; then 6953 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6954 _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' 6955 6956 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6957 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6958 6959 # If archive_cmds runs LD, not CC, wlarc should be empty 6960 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6961 # investigate it a little bit more. (MM) 6962 wlarc='${wl}' 6963 6964 # ancient GNU ld didn't support --whole-archive et. al. 6965 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6966 $GREP 'no-whole-archive' > /dev/null; then 6967 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6968 else 6969 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6970 fi 6971 else 6972 with_gnu_ld=no 6973 wlarc= 6974 6975 # A generic and very simple default shared library creation 6976 # command for GNU C++ for the case where it uses the native 6977 # linker, instead of GNU ld. If possible, this setting should 6978 # overridden to take advantage of the native linker features on 6979 # the platform it is being used on. 6980 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6981 fi 6982 6983 # Commands to make compiler produce verbose output that lists 6984 # what "hidden" libraries, object files and flags are used when 6985 # linking a shared library. 6986 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6987 6988 else 6989 GXX=no 6990 with_gnu_ld=no 6991 wlarc= 6992 fi 6993 6994 # PORTME: fill in a description of your system's C++ link characteristics 6995 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6996 _LT_TAGVAR(ld_shlibs, $1)=yes 6997 case $host_os in 6998 aix3*) 6999 # FIXME: insert proper C++ library support 7000 _LT_TAGVAR(ld_shlibs, $1)=no 7001 ;; 7002 aix[[4-9]]*) 7003 if test "$host_cpu" = ia64; then 7004 # On IA64, the linker does run time linking by default, so we don't 7005 # have to do anything special. 7006 aix_use_runtimelinking=no 7007 exp_sym_flag='-Bexport' 7008 no_entry_flag="" 7009 else 7010 aix_use_runtimelinking=no 7011 7012 # Test if we are trying to use run time linking or normal 7013 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7014 # need to do runtime linking. 7015 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7016 for ld_flag in $LDFLAGS; do 7017 case $ld_flag in 7018 *-brtl*) 7019 aix_use_runtimelinking=yes 7020 break 7021 ;; 7022 esac 7023 done 7024 ;; 7025 esac 7026 7027 exp_sym_flag='-bexport' 7028 no_entry_flag='-bnoentry' 7029 fi 7030 7031 # When large executables or shared objects are built, AIX ld can 7032 # have problems creating the table of contents. If linking a library 7033 # or program results in "error TOC overflow" add -mminimal-toc to 7034 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7035 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7036 7037 _LT_TAGVAR(archive_cmds, $1)='' 7038 _LT_TAGVAR(hardcode_direct, $1)=yes 7039 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7040 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7041 _LT_TAGVAR(link_all_deplibs, $1)=yes 7042 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7043 7044 if test "$GXX" = yes; then 7045 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7046 # We only want to do this on AIX 4.2 and lower, the check 7047 # below for broken collect2 doesn't work under 4.3+ 7048 collect2name=`${CC} -print-prog-name=collect2` 7049 if test -f "$collect2name" && 7050 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7051 then 7052 # We have reworked collect2 7053 : 7054 else 7055 # We have old collect2 7056 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7057 # It fails to find uninstalled libraries when the uninstalled 7058 # path is not listed in the libpath. Setting hardcode_minus_L 7059 # to unsupported forces relinking 7060 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7062 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7063 fi 7064 esac 7065 shared_flag='-shared' 7066 if test "$aix_use_runtimelinking" = yes; then 7067 shared_flag="$shared_flag "'${wl}-G' 7068 fi 7069 else 7070 # not using gcc 7071 if test "$host_cpu" = ia64; then 7072 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7073 # chokes on -Wl,-G. The following line is correct: 7074 shared_flag='-G' 7075 else 7076 if test "$aix_use_runtimelinking" = yes; then 7077 shared_flag='${wl}-G' 7078 else 7079 shared_flag='${wl}-bM:SRE' 7080 fi 7081 fi 7082 fi 7083 7084 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7085 # It seems that -bexpall does not export symbols beginning with 7086 # underscore (_), so it is better to generate a list of symbols to 7087 # export. 7088 _LT_TAGVAR(always_export_symbols, $1)=yes 7089 if test "$aix_use_runtimelinking" = yes; then 7090 # Warning - without using the other runtime loading flags (-brtl), 7091 # -berok will link without error, but may produce a broken library. 7092 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7093 # Determine the default libpath from the value encoded in an empty 7094 # executable. 7095 _LT_SYS_MODULE_PATH_AIX([$1]) 7096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7097 7098 _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" 7099 else 7100 if test "$host_cpu" = ia64; then 7101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7102 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7103 _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" 7104 else 7105 # Determine the default libpath from the value encoded in an 7106 # empty executable. 7107 _LT_SYS_MODULE_PATH_AIX([$1]) 7108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7109 # Warning - without using the other run time loading flags, 7110 # -berok will link without error, but may produce a broken library. 7111 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7112 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7113 if test "$with_gnu_ld" = yes; then 7114 # We only use this code for GNU lds that support --whole-archive. 7115 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7116 else 7117 # Exported symbols can be pulled into shared objects from archives 7118 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7119 fi 7120 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7121 # This is similar to how AIX traditionally builds its shared 7122 # libraries. 7123 _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' 7124 fi 7125 fi 7126 ;; 7127 7128 beos*) 7129 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7130 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7131 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7132 # support --undefined. This deserves some investigation. FIXME 7133 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7134 else 7135 _LT_TAGVAR(ld_shlibs, $1)=no 7136 fi 7137 ;; 7138 7139 chorus*) 7140 case $cc_basename in 7141 *) 7142 # FIXME: insert proper C++ library support 7143 _LT_TAGVAR(ld_shlibs, $1)=no 7144 ;; 7145 esac 7146 ;; 7147 7148 cygwin* | mingw* | pw32* | cegcc*) 7149 case $GXX,$cc_basename in 7150 ,cl* | no,cl*) 7151 # Native MSVC 7152 # hardcode_libdir_flag_spec is actually meaningless, as there is 7153 # no search path for DLLs. 7154 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7155 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7156 _LT_TAGVAR(always_export_symbols, $1)=yes 7157 _LT_TAGVAR(file_list_spec, $1)='@' 7158 # Tell ltmain to make .lib files, not .a files. 7159 libext=lib 7160 # Tell ltmain to make .dll files, not .so files. 7161 shrext_cmds=".dll" 7162 # FIXME: Setting linknames here is a bad hack. 7163 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7164 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7165 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7166 else 7167 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7168 fi~ 7169 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7170 linknames=' 7171 # The linker will not automatically build a static lib if we build a DLL. 7172 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7173 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7174 # Don't use ranlib 7175 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7176 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7177 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7178 case $lt_outputfile in 7179 *.exe|*.EXE) ;; 7180 *) 7181 lt_outputfile="$lt_outputfile.exe" 7182 lt_tool_outputfile="$lt_tool_outputfile.exe" 7183 ;; 7184 esac~ 7185 func_to_tool_file "$lt_outputfile"~ 7186 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7187 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7188 $RM "$lt_outputfile.manifest"; 7189 fi' 7190 ;; 7191 *) 7192 # g++ 7193 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7194 # as there is no search path for DLLs. 7195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7196 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7197 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7198 _LT_TAGVAR(always_export_symbols, $1)=no 7199 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7200 7201 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7202 _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' 7203 # If the export-symbols file already is a .def file (1st line 7204 # is EXPORTS), use it as is; otherwise, prepend... 7205 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7206 cp $export_symbols $output_objdir/$soname.def; 7207 else 7208 echo EXPORTS > $output_objdir/$soname.def; 7209 cat $export_symbols >> $output_objdir/$soname.def; 7210 fi~ 7211 $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' 7212 else 7213 _LT_TAGVAR(ld_shlibs, $1)=no 7214 fi 7215 ;; 7216 esac 7217 ;; 7218 darwin* | rhapsody*) 7219 _LT_DARWIN_LINKER_FEATURES($1) 7220 ;; 7221 7222 dgux*) 7223 case $cc_basename in 7224 ec++*) 7225 # FIXME: insert proper C++ library support 7226 _LT_TAGVAR(ld_shlibs, $1)=no 7227 ;; 7228 ghcx*) 7229 # Green Hills C++ Compiler 7230 # FIXME: insert proper C++ library support 7231 _LT_TAGVAR(ld_shlibs, $1)=no 7232 ;; 7233 *) 7234 # FIXME: insert proper C++ library support 7235 _LT_TAGVAR(ld_shlibs, $1)=no 7236 ;; 7237 esac 7238 ;; 7239 7240 freebsd2.*) 7241 # C++ shared libraries reported to be fairly broken before 7242 # switch to ELF 7243 _LT_TAGVAR(ld_shlibs, $1)=no 7244 ;; 7245 7246 freebsd-elf*) 7247 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7248 ;; 7249 7250 freebsd* | dragonfly*) 7251 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7252 # conventions 7253 _LT_TAGVAR(ld_shlibs, $1)=yes 7254 ;; 7255 7256 gnu*) 7257 ;; 7258 7259 haiku*) 7260 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7261 _LT_TAGVAR(link_all_deplibs, $1)=yes 7262 ;; 7263 7264 hpux9*) 7265 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7266 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7267 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7268 _LT_TAGVAR(hardcode_direct, $1)=yes 7269 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7270 # but as the default 7271 # location of the library. 7272 7273 case $cc_basename in 7274 CC*) 7275 # FIXME: insert proper C++ library support 7276 _LT_TAGVAR(ld_shlibs, $1)=no 7277 ;; 7278 aCC*) 7279 _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' 7280 # Commands to make compiler produce verbose output that lists 7281 # what "hidden" libraries, object files and flags are used when 7282 # linking a shared library. 7283 # 7284 # There doesn't appear to be a way to prevent this compiler from 7285 # explicitly linking system object files so we need to strip them 7286 # from the output so that they don't get included in the library 7287 # dependencies. 7288 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"' 7289 ;; 7290 *) 7291 if test "$GXX" = yes; then 7292 _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' 7293 else 7294 # FIXME: insert proper C++ library support 7295 _LT_TAGVAR(ld_shlibs, $1)=no 7296 fi 7297 ;; 7298 esac 7299 ;; 7300 7301 hpux10*|hpux11*) 7302 if test $with_gnu_ld = no; then 7303 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7304 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7305 7306 case $host_cpu in 7307 hppa*64*|ia64*) 7308 ;; 7309 *) 7310 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7311 ;; 7312 esac 7313 fi 7314 case $host_cpu in 7315 hppa*64*|ia64*) 7316 _LT_TAGVAR(hardcode_direct, $1)=no 7317 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7318 ;; 7319 *) 7320 _LT_TAGVAR(hardcode_direct, $1)=yes 7321 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7322 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7323 # but as the default 7324 # location of the library. 7325 ;; 7326 esac 7327 7328 case $cc_basename in 7329 CC*) 7330 # FIXME: insert proper C++ library support 7331 _LT_TAGVAR(ld_shlibs, $1)=no 7332 ;; 7333 aCC*) 7334 case $host_cpu in 7335 hppa*64*) 7336 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7337 ;; 7338 ia64*) 7339 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7340 ;; 7341 *) 7342 _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' 7343 ;; 7344 esac 7345 # Commands to make compiler produce verbose output that lists 7346 # what "hidden" libraries, object files and flags are used when 7347 # linking a shared library. 7348 # 7349 # There doesn't appear to be a way to prevent this compiler from 7350 # explicitly linking system object files so we need to strip them 7351 # from the output so that they don't get included in the library 7352 # dependencies. 7353 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"' 7354 ;; 7355 *) 7356 if test "$GXX" = yes; then 7357 if test $with_gnu_ld = no; then 7358 case $host_cpu in 7359 hppa*64*) 7360 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7361 ;; 7362 ia64*) 7363 _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' 7364 ;; 7365 *) 7366 _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' 7367 ;; 7368 esac 7369 fi 7370 else 7371 # FIXME: insert proper C++ library support 7372 _LT_TAGVAR(ld_shlibs, $1)=no 7373 fi 7374 ;; 7375 esac 7376 ;; 7377 7378 interix[[3-9]]*) 7379 _LT_TAGVAR(hardcode_direct, $1)=no 7380 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7381 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7382 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7383 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7384 # Instead, shared libraries are loaded at an image base (0x10000000 by 7385 # default) and relocated if they conflict, which is a slow very memory 7386 # consuming and fragmenting process. To avoid this, we pick a random, 7387 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7388 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7389 _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' 7390 _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' 7391 ;; 7392 irix5* | irix6*) 7393 case $cc_basename in 7394 CC*) 7395 # SGI C++ 7396 _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' 7397 7398 # Archives containing C++ object files must be created using 7399 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7400 # necessary to make sure instantiated templates are included 7401 # in the archive. 7402 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7403 ;; 7404 *) 7405 if test "$GXX" = yes; then 7406 if test "$with_gnu_ld" = no; then 7407 _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' 7408 else 7409 _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' 7410 fi 7411 fi 7412 _LT_TAGVAR(link_all_deplibs, $1)=yes 7413 ;; 7414 esac 7415 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7416 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7417 _LT_TAGVAR(inherit_rpath, $1)=yes 7418 ;; 7419 7420 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7421 case $cc_basename in 7422 KCC*) 7423 # Kuck and Associates, Inc. (KAI) C++ Compiler 7424 7425 # KCC will only create a shared library if the output file 7426 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7427 # to its proper name (with version) after linking. 7428 _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' 7429 _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' 7430 # Commands to make compiler produce verbose output that lists 7431 # what "hidden" libraries, object files and flags are used when 7432 # linking a shared library. 7433 # 7434 # There doesn't appear to be a way to prevent this compiler from 7435 # explicitly linking system object files so we need to strip them 7436 # from the output so that they don't get included in the library 7437 # dependencies. 7438 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"' 7439 7440 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7441 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7442 7443 # Archives containing C++ object files must be created using 7444 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7445 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7446 ;; 7447 icpc* | ecpc* ) 7448 # Intel C++ 7449 with_gnu_ld=yes 7450 # version 8.0 and above of icpc choke on multiply defined symbols 7451 # if we add $predep_objects and $postdep_objects, however 7.1 and 7452 # earlier do not add the objects themselves. 7453 case `$CC -V 2>&1` in 7454 *"Version 7."*) 7455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7456 _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' 7457 ;; 7458 *) # Version 8.0 or newer 7459 tmp_idyn= 7460 case $host_cpu in 7461 ia64*) tmp_idyn=' -i_dynamic';; 7462 esac 7463 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7464 _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' 7465 ;; 7466 esac 7467 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7468 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7469 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7470 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7471 ;; 7472 pgCC* | pgcpp*) 7473 # Portland Group C++ compiler 7474 case `$CC -V` in 7475 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7476 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7477 rm -rf $tpldir~ 7478 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7479 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7480 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7481 rm -rf $tpldir~ 7482 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7483 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7484 $RANLIB $oldlib' 7485 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7486 rm -rf $tpldir~ 7487 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7488 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7489 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7490 rm -rf $tpldir~ 7491 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7492 $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' 7493 ;; 7494 *) # Version 6 and above use weak symbols 7495 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7496 _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' 7497 ;; 7498 esac 7499 7500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7501 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7502 _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' 7503 ;; 7504 cxx*) 7505 # Compaq C++ 7506 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7507 _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' 7508 7509 runpath_var=LD_RUN_PATH 7510 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7511 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7512 7513 # Commands to make compiler produce verbose output that lists 7514 # what "hidden" libraries, object files and flags are used when 7515 # linking a shared library. 7516 # 7517 # There doesn't appear to be a way to prevent this compiler from 7518 # explicitly linking system object files so we need to strip them 7519 # from the output so that they don't get included in the library 7520 # dependencies. 7521 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' 7522 ;; 7523 xl* | mpixl* | bgxl*) 7524 # IBM XL 8.0 on PPC, with GNU ld 7525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7526 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7527 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7528 if test "x$supports_anon_versioning" = xyes; then 7529 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7530 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7531 echo "local: *; };" >> $output_objdir/$libname.ver~ 7532 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7533 fi 7534 ;; 7535 *) 7536 case `$CC -V 2>&1 | sed 5q` in 7537 *Sun\ C*) 7538 # Sun C++ 5.9 7539 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7540 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7541 _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' 7542 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7543 _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' 7544 _LT_TAGVAR(compiler_needs_object, $1)=yes 7545 7546 # Not sure whether something based on 7547 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7548 # would be better. 7549 output_verbose_link_cmd='func_echo_all' 7550 7551 # Archives containing C++ object files must be created using 7552 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7553 # necessary to make sure instantiated templates are included 7554 # in the archive. 7555 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7556 ;; 7557 esac 7558 ;; 7559 esac 7560 ;; 7561 7562 lynxos*) 7563 # FIXME: insert proper C++ library support 7564 _LT_TAGVAR(ld_shlibs, $1)=no 7565 ;; 7566 7567 m88k*) 7568 # FIXME: insert proper C++ library support 7569 _LT_TAGVAR(ld_shlibs, $1)=no 7570 ;; 7571 7572 mvs*) 7573 case $cc_basename in 7574 cxx*) 7575 # FIXME: insert proper C++ library support 7576 _LT_TAGVAR(ld_shlibs, $1)=no 7577 ;; 7578 *) 7579 # FIXME: insert proper C++ library support 7580 _LT_TAGVAR(ld_shlibs, $1)=no 7581 ;; 7582 esac 7583 ;; 7584 7585 netbsd*) 7586 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7587 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7588 wlarc= 7589 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7590 _LT_TAGVAR(hardcode_direct, $1)=yes 7591 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7592 fi 7593 # Workaround some broken pre-1.5 toolchains 7594 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7595 ;; 7596 7597 *nto* | *qnx*) 7598 _LT_TAGVAR(ld_shlibs, $1)=yes 7599 ;; 7600 7601 openbsd2*) 7602 # C++ shared libraries are fairly broken 7603 _LT_TAGVAR(ld_shlibs, $1)=no 7604 ;; 7605 7606 openbsd*) 7607 if test -f /usr/libexec/ld.so; then 7608 _LT_TAGVAR(hardcode_direct, $1)=yes 7609 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7610 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7611 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7613 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7614 _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' 7615 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7616 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7617 fi 7618 output_verbose_link_cmd=func_echo_all 7619 else 7620 _LT_TAGVAR(ld_shlibs, $1)=no 7621 fi 7622 ;; 7623 7624 osf3* | osf4* | osf5*) 7625 case $cc_basename in 7626 KCC*) 7627 # Kuck and Associates, Inc. (KAI) C++ Compiler 7628 7629 # KCC will only create a shared library if the output file 7630 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7631 # to its proper name (with version) after linking. 7632 _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' 7633 7634 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7635 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7636 7637 # Archives containing C++ object files must be created using 7638 # the KAI C++ compiler. 7639 case $host in 7640 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7641 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7642 esac 7643 ;; 7644 RCC*) 7645 # Rational C++ 2.4.1 7646 # FIXME: insert proper C++ library support 7647 _LT_TAGVAR(ld_shlibs, $1)=no 7648 ;; 7649 cxx*) 7650 case $host in 7651 osf3*) 7652 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7653 _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' 7654 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7655 ;; 7656 *) 7657 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7658 _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' 7659 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7660 echo "-hidden">> $lib.exp~ 7661 $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~ 7662 $RM $lib.exp' 7663 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7664 ;; 7665 esac 7666 7667 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7668 7669 # Commands to make compiler produce verbose output that lists 7670 # what "hidden" libraries, object files and flags are used when 7671 # linking a shared library. 7672 # 7673 # There doesn't appear to be a way to prevent this compiler from 7674 # explicitly linking system object files so we need to strip them 7675 # from the output so that they don't get included in the library 7676 # dependencies. 7677 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"' 7678 ;; 7679 *) 7680 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7681 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7682 case $host in 7683 osf3*) 7684 _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' 7685 ;; 7686 *) 7687 _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' 7688 ;; 7689 esac 7690 7691 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7692 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7693 7694 # Commands to make compiler produce verbose output that lists 7695 # what "hidden" libraries, object files and flags are used when 7696 # linking a shared library. 7697 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7698 7699 else 7700 # FIXME: insert proper C++ library support 7701 _LT_TAGVAR(ld_shlibs, $1)=no 7702 fi 7703 ;; 7704 esac 7705 ;; 7706 7707 psos*) 7708 # FIXME: insert proper C++ library support 7709 _LT_TAGVAR(ld_shlibs, $1)=no 7710 ;; 7711 7712 sunos4*) 7713 case $cc_basename in 7714 CC*) 7715 # Sun C++ 4.x 7716 # FIXME: insert proper C++ library support 7717 _LT_TAGVAR(ld_shlibs, $1)=no 7718 ;; 7719 lcc*) 7720 # Lucid 7721 # FIXME: insert proper C++ library support 7722 _LT_TAGVAR(ld_shlibs, $1)=no 7723 ;; 7724 *) 7725 # FIXME: insert proper C++ library support 7726 _LT_TAGVAR(ld_shlibs, $1)=no 7727 ;; 7728 esac 7729 ;; 7730 7731 solaris*) 7732 case $cc_basename in 7733 CC* | sunCC*) 7734 # Sun C++ 4.2, 5.x and Centerline C++ 7735 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7736 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7737 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7738 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7739 $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' 7740 7741 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7742 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7743 case $host_os in 7744 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7745 *) 7746 # The compiler driver will combine and reorder linker options, 7747 # but understands `-z linker_flag'. 7748 # Supported since Solaris 2.6 (maybe 2.5.1?) 7749 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7750 ;; 7751 esac 7752 _LT_TAGVAR(link_all_deplibs, $1)=yes 7753 7754 output_verbose_link_cmd='func_echo_all' 7755 7756 # Archives containing C++ object files must be created using 7757 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7758 # necessary to make sure instantiated templates are included 7759 # in the archive. 7760 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7761 ;; 7762 gcx*) 7763 # Green Hills C++ Compiler 7764 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7765 7766 # The C++ compiler must be used to create the archive. 7767 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7768 ;; 7769 *) 7770 # GNU C++ compiler with Solaris linker 7771 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7772 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7773 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7774 _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' 7775 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7776 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7777 7778 # Commands to make compiler produce verbose output that lists 7779 # what "hidden" libraries, object files and flags are used when 7780 # linking a shared library. 7781 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7782 else 7783 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7784 # platform. 7785 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7786 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7787 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7788 7789 # Commands to make compiler produce verbose output that lists 7790 # what "hidden" libraries, object files and flags are used when 7791 # linking a shared library. 7792 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7793 fi 7794 7795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7796 case $host_os in 7797 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7798 *) 7799 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7800 ;; 7801 esac 7802 fi 7803 ;; 7804 esac 7805 ;; 7806 7807 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7808 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7809 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7810 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7811 runpath_var='LD_RUN_PATH' 7812 7813 case $cc_basename in 7814 CC*) 7815 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7816 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7817 ;; 7818 *) 7819 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7820 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7821 ;; 7822 esac 7823 ;; 7824 7825 sysv5* | sco3.2v5* | sco5v6*) 7826 # Note: We can NOT use -z defs as we might desire, because we do not 7827 # link with -lc, and that would cause any symbols used from libc to 7828 # always be unresolved, which means just about no library would 7829 # ever link correctly. If we're not using GNU ld we use -z text 7830 # though, which does catch some bad symbols but isn't as heavy-handed 7831 # as -z defs. 7832 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7833 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7834 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7835 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7837 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7838 _LT_TAGVAR(link_all_deplibs, $1)=yes 7839 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7840 runpath_var='LD_RUN_PATH' 7841 7842 case $cc_basename in 7843 CC*) 7844 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7845 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7846 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7847 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7848 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7849 '"$_LT_TAGVAR(reload_cmds, $1)" 7850 ;; 7851 *) 7852 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7853 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7854 ;; 7855 esac 7856 ;; 7857 7858 tandem*) 7859 case $cc_basename in 7860 NCC*) 7861 # NonStop-UX NCC 3.20 7862 # FIXME: insert proper C++ library support 7863 _LT_TAGVAR(ld_shlibs, $1)=no 7864 ;; 7865 *) 7866 # FIXME: insert proper C++ library support 7867 _LT_TAGVAR(ld_shlibs, $1)=no 7868 ;; 7869 esac 7870 ;; 7871 7872 vxworks*) 7873 # FIXME: insert proper C++ library support 7874 _LT_TAGVAR(ld_shlibs, $1)=no 7875 ;; 7876 7877 *) 7878 # FIXME: insert proper C++ library support 7879 _LT_TAGVAR(ld_shlibs, $1)=no 7880 ;; 7881 esac 7882 7883 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7884 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7885 7886 _LT_TAGVAR(GCC, $1)="$GXX" 7887 _LT_TAGVAR(LD, $1)="$LD" 7888 7889 ## CAVEAT EMPTOR: 7890 ## There is no encapsulation within the following macros, do not change 7891 ## the running order or otherwise move them around unless you know exactly 7892 ## what you are doing... 7893 _LT_SYS_HIDDEN_LIBDEPS($1) 7894 _LT_COMPILER_PIC($1) 7895 _LT_COMPILER_C_O($1) 7896 _LT_COMPILER_FILE_LOCKS($1) 7897 _LT_LINKER_SHLIBS($1) 7898 _LT_SYS_DYNAMIC_LINKER($1) 7899 _LT_LINKER_HARDCODE_LIBPATH($1) 7900 7901 _LT_CONFIG($1) 7902 fi # test -n "$compiler" 7903 7904 CC=$lt_save_CC 7905 CFLAGS=$lt_save_CFLAGS 7906 LDCXX=$LD 7907 LD=$lt_save_LD 7908 GCC=$lt_save_GCC 7909 with_gnu_ld=$lt_save_with_gnu_ld 7910 lt_cv_path_LDCXX=$lt_cv_path_LD 7911 lt_cv_path_LD=$lt_save_path_LD 7912 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7913 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7914fi # test "$_lt_caught_CXX_error" != yes 7915 7916AC_LANG_POP 7917])# _LT_LANG_CXX_CONFIG 7918 7919 7920# _LT_FUNC_STRIPNAME_CNF 7921# ---------------------- 7922# func_stripname_cnf prefix suffix name 7923# strip PREFIX and SUFFIX off of NAME. 7924# PREFIX and SUFFIX must not contain globbing or regex special 7925# characters, hashes, percent signs, but SUFFIX may contain a leading 7926# dot (in which case that matches only a dot). 7927# 7928# This function is identical to the (non-XSI) version of func_stripname, 7929# except this one can be used by m4 code that may be executed by configure, 7930# rather than the libtool script. 7931m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7932AC_REQUIRE([_LT_DECL_SED]) 7933AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7934func_stripname_cnf () 7935{ 7936 case ${2} in 7937 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 7938 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7939 esac 7940} # func_stripname_cnf 7941])# _LT_FUNC_STRIPNAME_CNF 7942 7943# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7944# --------------------------------- 7945# Figure out "hidden" library dependencies from verbose 7946# compiler output when linking a shared library. 7947# Parse the compiler output and extract the necessary 7948# objects, libraries and library flags. 7949m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7950[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7951AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7952# Dependencies to place before and after the object being linked: 7953_LT_TAGVAR(predep_objects, $1)= 7954_LT_TAGVAR(postdep_objects, $1)= 7955_LT_TAGVAR(predeps, $1)= 7956_LT_TAGVAR(postdeps, $1)= 7957_LT_TAGVAR(compiler_lib_search_path, $1)= 7958 7959dnl we can't use the lt_simple_compile_test_code here, 7960dnl because it contains code intended for an executable, 7961dnl not a library. It's possible we should let each 7962dnl tag define a new lt_????_link_test_code variable, 7963dnl but it's only used here... 7964m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7965int a; 7966void foo (void) { a = 0; } 7967_LT_EOF 7968], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7969class Foo 7970{ 7971public: 7972 Foo (void) { a = 0; } 7973private: 7974 int a; 7975}; 7976_LT_EOF 7977], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7978 subroutine foo 7979 implicit none 7980 integer*4 a 7981 a=0 7982 return 7983 end 7984_LT_EOF 7985], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7986 subroutine foo 7987 implicit none 7988 integer a 7989 a=0 7990 return 7991 end 7992_LT_EOF 7993], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7994public class foo { 7995 private int a; 7996 public void bar (void) { 7997 a = 0; 7998 } 7999}; 8000_LT_EOF 8001], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8002package foo 8003func foo() { 8004} 8005_LT_EOF 8006]) 8007 8008_lt_libdeps_save_CFLAGS=$CFLAGS 8009case "$CC $CFLAGS " in #( 8010*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8011*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8012*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8013esac 8014 8015dnl Parse the compiler output and extract the necessary 8016dnl objects, libraries and library flags. 8017if AC_TRY_EVAL(ac_compile); then 8018 # Parse the compiler output and extract the necessary 8019 # objects, libraries and library flags. 8020 8021 # Sentinel used to keep track of whether or not we are before 8022 # the conftest object file. 8023 pre_test_object_deps_done=no 8024 8025 for p in `eval "$output_verbose_link_cmd"`; do 8026 case ${prev}${p} in 8027 8028 -L* | -R* | -l*) 8029 # Some compilers place space between "-{L,R}" and the path. 8030 # Remove the space. 8031 if test $p = "-L" || 8032 test $p = "-R"; then 8033 prev=$p 8034 continue 8035 fi 8036 8037 # Expand the sysroot to ease extracting the directories later. 8038 if test -z "$prev"; then 8039 case $p in 8040 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8041 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8042 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8043 esac 8044 fi 8045 case $p in 8046 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8047 esac 8048 if test "$pre_test_object_deps_done" = no; then 8049 case ${prev} in 8050 -L | -R) 8051 # Internal compiler library paths should come after those 8052 # provided the user. The postdeps already come after the 8053 # user supplied libs so there is no need to process them. 8054 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8055 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8056 else 8057 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8058 fi 8059 ;; 8060 # The "-l" case would never come before the object being 8061 # linked, so don't bother handling this case. 8062 esac 8063 else 8064 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8065 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8066 else 8067 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8068 fi 8069 fi 8070 prev= 8071 ;; 8072 8073 *.lto.$objext) ;; # Ignore GCC LTO objects 8074 *.$objext) 8075 # This assumes that the test object file only shows up 8076 # once in the compiler output. 8077 if test "$p" = "conftest.$objext"; then 8078 pre_test_object_deps_done=yes 8079 continue 8080 fi 8081 8082 if test "$pre_test_object_deps_done" = no; then 8083 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8084 _LT_TAGVAR(predep_objects, $1)="$p" 8085 else 8086 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8087 fi 8088 else 8089 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8090 _LT_TAGVAR(postdep_objects, $1)="$p" 8091 else 8092 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8093 fi 8094 fi 8095 ;; 8096 8097 *) ;; # Ignore the rest. 8098 8099 esac 8100 done 8101 8102 # Clean up. 8103 rm -f a.out a.exe 8104else 8105 echo "libtool.m4: error: problem compiling $1 test program" 8106fi 8107 8108$RM -f confest.$objext 8109CFLAGS=$_lt_libdeps_save_CFLAGS 8110 8111# PORTME: override above test on systems where it is broken 8112m4_if([$1], [CXX], 8113[case $host_os in 8114interix[[3-9]]*) 8115 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8116 # hack all around it, let's just trust "g++" to DTRT. 8117 _LT_TAGVAR(predep_objects,$1)= 8118 _LT_TAGVAR(postdep_objects,$1)= 8119 _LT_TAGVAR(postdeps,$1)= 8120 ;; 8121 8122linux*) 8123 case `$CC -V 2>&1 | sed 5q` in 8124 *Sun\ C*) 8125 # Sun C++ 5.9 8126 8127 # The more standards-conforming stlport4 library is 8128 # incompatible with the Cstd library. Avoid specifying 8129 # it if it's in CXXFLAGS. Ignore libCrun as 8130 # -library=stlport4 depends on it. 8131 case " $CXX $CXXFLAGS " in 8132 *" -library=stlport4 "*) 8133 solaris_use_stlport4=yes 8134 ;; 8135 esac 8136 8137 if test "$solaris_use_stlport4" != yes; then 8138 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8139 fi 8140 ;; 8141 esac 8142 ;; 8143 8144solaris*) 8145 case $cc_basename in 8146 CC* | sunCC*) 8147 # The more standards-conforming stlport4 library is 8148 # incompatible with the Cstd library. Avoid specifying 8149 # it if it's in CXXFLAGS. Ignore libCrun as 8150 # -library=stlport4 depends on it. 8151 case " $CXX $CXXFLAGS " in 8152 *" -library=stlport4 "*) 8153 solaris_use_stlport4=yes 8154 ;; 8155 esac 8156 8157 # Adding this requires a known-good setup of shared libraries for 8158 # Sun compiler versions before 5.6, else PIC objects from an old 8159 # archive will be linked into the output, leading to subtle bugs. 8160 if test "$solaris_use_stlport4" != yes; then 8161 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8162 fi 8163 ;; 8164 esac 8165 ;; 8166esac 8167]) 8168 8169case " $_LT_TAGVAR(postdeps, $1) " in 8170*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8171esac 8172 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8173if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8174 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8175fi 8176_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8177 [The directories searched by this compiler when creating a shared library]) 8178_LT_TAGDECL([], [predep_objects], [1], 8179 [Dependencies to place before and after the objects being linked to 8180 create a shared library]) 8181_LT_TAGDECL([], [postdep_objects], [1]) 8182_LT_TAGDECL([], [predeps], [1]) 8183_LT_TAGDECL([], [postdeps], [1]) 8184_LT_TAGDECL([], [compiler_lib_search_path], [1], 8185 [The library search path used internally by the compiler when linking 8186 a shared library]) 8187])# _LT_SYS_HIDDEN_LIBDEPS 8188 8189 8190# _LT_LANG_F77_CONFIG([TAG]) 8191# -------------------------- 8192# Ensure that the configuration variables for a Fortran 77 compiler are 8193# suitably defined. These variables are subsequently used by _LT_CONFIG 8194# to write the compiler configuration to `libtool'. 8195m4_defun([_LT_LANG_F77_CONFIG], 8196[AC_LANG_PUSH(Fortran 77) 8197if test -z "$F77" || test "X$F77" = "Xno"; then 8198 _lt_disable_F77=yes 8199fi 8200 8201_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8202_LT_TAGVAR(allow_undefined_flag, $1)= 8203_LT_TAGVAR(always_export_symbols, $1)=no 8204_LT_TAGVAR(archive_expsym_cmds, $1)= 8205_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8206_LT_TAGVAR(hardcode_direct, $1)=no 8207_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8208_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8209_LT_TAGVAR(hardcode_libdir_separator, $1)= 8210_LT_TAGVAR(hardcode_minus_L, $1)=no 8211_LT_TAGVAR(hardcode_automatic, $1)=no 8212_LT_TAGVAR(inherit_rpath, $1)=no 8213_LT_TAGVAR(module_cmds, $1)= 8214_LT_TAGVAR(module_expsym_cmds, $1)= 8215_LT_TAGVAR(link_all_deplibs, $1)=unknown 8216_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8217_LT_TAGVAR(reload_flag, $1)=$reload_flag 8218_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8219_LT_TAGVAR(no_undefined_flag, $1)= 8220_LT_TAGVAR(whole_archive_flag_spec, $1)= 8221_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8222 8223# Source file extension for f77 test sources. 8224ac_ext=f 8225 8226# Object file extension for compiled f77 test sources. 8227objext=o 8228_LT_TAGVAR(objext, $1)=$objext 8229 8230# No sense in running all these tests if we already determined that 8231# the F77 compiler isn't working. Some variables (like enable_shared) 8232# are currently assumed to apply to all compilers on this platform, 8233# and will be corrupted by setting them based on a non-working compiler. 8234if test "$_lt_disable_F77" != yes; then 8235 # Code to be used in simple compile tests 8236 lt_simple_compile_test_code="\ 8237 subroutine t 8238 return 8239 end 8240" 8241 8242 # Code to be used in simple link tests 8243 lt_simple_link_test_code="\ 8244 program t 8245 end 8246" 8247 8248 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8249 _LT_TAG_COMPILER 8250 8251 # save warnings/boilerplate of simple test code 8252 _LT_COMPILER_BOILERPLATE 8253 _LT_LINKER_BOILERPLATE 8254 8255 # Allow CC to be a program name with arguments. 8256 lt_save_CC="$CC" 8257 lt_save_GCC=$GCC 8258 lt_save_CFLAGS=$CFLAGS 8259 CC=${F77-"f77"} 8260 CFLAGS=$FFLAGS 8261 compiler=$CC 8262 _LT_TAGVAR(compiler, $1)=$CC 8263 _LT_CC_BASENAME([$compiler]) 8264 GCC=$G77 8265 if test -n "$compiler"; then 8266 AC_MSG_CHECKING([if libtool supports shared libraries]) 8267 AC_MSG_RESULT([$can_build_shared]) 8268 8269 AC_MSG_CHECKING([whether to build shared libraries]) 8270 test "$can_build_shared" = "no" && enable_shared=no 8271 8272 # On AIX, shared libraries and static libraries use the same namespace, and 8273 # are all built from PIC. 8274 case $host_os in 8275 aix3*) 8276 test "$enable_shared" = yes && enable_static=no 8277 if test -n "$RANLIB"; then 8278 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8279 postinstall_cmds='$RANLIB $lib' 8280 fi 8281 ;; 8282 aix[[4-9]]*) 8283 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8284 test "$enable_shared" = yes && enable_static=no 8285 fi 8286 ;; 8287 esac 8288 AC_MSG_RESULT([$enable_shared]) 8289 8290 AC_MSG_CHECKING([whether to build static libraries]) 8291 # Make sure either enable_shared or enable_static is yes. 8292 test "$enable_shared" = yes || enable_static=yes 8293 AC_MSG_RESULT([$enable_static]) 8294 8295 _LT_TAGVAR(GCC, $1)="$G77" 8296 _LT_TAGVAR(LD, $1)="$LD" 8297 8298 ## CAVEAT EMPTOR: 8299 ## There is no encapsulation within the following macros, do not change 8300 ## the running order or otherwise move them around unless you know exactly 8301 ## what you are doing... 8302 _LT_COMPILER_PIC($1) 8303 _LT_COMPILER_C_O($1) 8304 _LT_COMPILER_FILE_LOCKS($1) 8305 _LT_LINKER_SHLIBS($1) 8306 _LT_SYS_DYNAMIC_LINKER($1) 8307 _LT_LINKER_HARDCODE_LIBPATH($1) 8308 8309 _LT_CONFIG($1) 8310 fi # test -n "$compiler" 8311 8312 GCC=$lt_save_GCC 8313 CC="$lt_save_CC" 8314 CFLAGS="$lt_save_CFLAGS" 8315fi # test "$_lt_disable_F77" != yes 8316 8317AC_LANG_POP 8318])# _LT_LANG_F77_CONFIG 8319 8320 8321# _LT_LANG_FC_CONFIG([TAG]) 8322# ------------------------- 8323# Ensure that the configuration variables for a Fortran compiler are 8324# suitably defined. These variables are subsequently used by _LT_CONFIG 8325# to write the compiler configuration to `libtool'. 8326m4_defun([_LT_LANG_FC_CONFIG], 8327[AC_LANG_PUSH(Fortran) 8328 8329if test -z "$FC" || test "X$FC" = "Xno"; then 8330 _lt_disable_FC=yes 8331fi 8332 8333_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8334_LT_TAGVAR(allow_undefined_flag, $1)= 8335_LT_TAGVAR(always_export_symbols, $1)=no 8336_LT_TAGVAR(archive_expsym_cmds, $1)= 8337_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8338_LT_TAGVAR(hardcode_direct, $1)=no 8339_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8340_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8341_LT_TAGVAR(hardcode_libdir_separator, $1)= 8342_LT_TAGVAR(hardcode_minus_L, $1)=no 8343_LT_TAGVAR(hardcode_automatic, $1)=no 8344_LT_TAGVAR(inherit_rpath, $1)=no 8345_LT_TAGVAR(module_cmds, $1)= 8346_LT_TAGVAR(module_expsym_cmds, $1)= 8347_LT_TAGVAR(link_all_deplibs, $1)=unknown 8348_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8349_LT_TAGVAR(reload_flag, $1)=$reload_flag 8350_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8351_LT_TAGVAR(no_undefined_flag, $1)= 8352_LT_TAGVAR(whole_archive_flag_spec, $1)= 8353_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8354 8355# Source file extension for fc test sources. 8356ac_ext=${ac_fc_srcext-f} 8357 8358# Object file extension for compiled fc test sources. 8359objext=o 8360_LT_TAGVAR(objext, $1)=$objext 8361 8362# No sense in running all these tests if we already determined that 8363# the FC compiler isn't working. Some variables (like enable_shared) 8364# are currently assumed to apply to all compilers on this platform, 8365# and will be corrupted by setting them based on a non-working compiler. 8366if test "$_lt_disable_FC" != yes; then 8367 # Code to be used in simple compile tests 8368 lt_simple_compile_test_code="\ 8369 subroutine t 8370 return 8371 end 8372" 8373 8374 # Code to be used in simple link tests 8375 lt_simple_link_test_code="\ 8376 program t 8377 end 8378" 8379 8380 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8381 _LT_TAG_COMPILER 8382 8383 # save warnings/boilerplate of simple test code 8384 _LT_COMPILER_BOILERPLATE 8385 _LT_LINKER_BOILERPLATE 8386 8387 # Allow CC to be a program name with arguments. 8388 lt_save_CC="$CC" 8389 lt_save_GCC=$GCC 8390 lt_save_CFLAGS=$CFLAGS 8391 CC=${FC-"f95"} 8392 CFLAGS=$FCFLAGS 8393 compiler=$CC 8394 GCC=$ac_cv_fc_compiler_gnu 8395 8396 _LT_TAGVAR(compiler, $1)=$CC 8397 _LT_CC_BASENAME([$compiler]) 8398 8399 if test -n "$compiler"; then 8400 AC_MSG_CHECKING([if libtool supports shared libraries]) 8401 AC_MSG_RESULT([$can_build_shared]) 8402 8403 AC_MSG_CHECKING([whether to build shared libraries]) 8404 test "$can_build_shared" = "no" && enable_shared=no 8405 8406 # On AIX, shared libraries and static libraries use the same namespace, and 8407 # are all built from PIC. 8408 case $host_os in 8409 aix3*) 8410 test "$enable_shared" = yes && enable_static=no 8411 if test -n "$RANLIB"; then 8412 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8413 postinstall_cmds='$RANLIB $lib' 8414 fi 8415 ;; 8416 aix[[4-9]]*) 8417 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8418 test "$enable_shared" = yes && enable_static=no 8419 fi 8420 ;; 8421 esac 8422 AC_MSG_RESULT([$enable_shared]) 8423 8424 AC_MSG_CHECKING([whether to build static libraries]) 8425 # Make sure either enable_shared or enable_static is yes. 8426 test "$enable_shared" = yes || enable_static=yes 8427 AC_MSG_RESULT([$enable_static]) 8428 8429 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8430 _LT_TAGVAR(LD, $1)="$LD" 8431 8432 ## CAVEAT EMPTOR: 8433 ## There is no encapsulation within the following macros, do not change 8434 ## the running order or otherwise move them around unless you know exactly 8435 ## what you are doing... 8436 _LT_SYS_HIDDEN_LIBDEPS($1) 8437 _LT_COMPILER_PIC($1) 8438 _LT_COMPILER_C_O($1) 8439 _LT_COMPILER_FILE_LOCKS($1) 8440 _LT_LINKER_SHLIBS($1) 8441 _LT_SYS_DYNAMIC_LINKER($1) 8442 _LT_LINKER_HARDCODE_LIBPATH($1) 8443 8444 _LT_CONFIG($1) 8445 fi # test -n "$compiler" 8446 8447 GCC=$lt_save_GCC 8448 CC=$lt_save_CC 8449 CFLAGS=$lt_save_CFLAGS 8450fi # test "$_lt_disable_FC" != yes 8451 8452AC_LANG_POP 8453])# _LT_LANG_FC_CONFIG 8454 8455 8456# _LT_LANG_GCJ_CONFIG([TAG]) 8457# -------------------------- 8458# Ensure that the configuration variables for the GNU Java Compiler compiler 8459# are suitably defined. These variables are subsequently used by _LT_CONFIG 8460# to write the compiler configuration to `libtool'. 8461m4_defun([_LT_LANG_GCJ_CONFIG], 8462[AC_REQUIRE([LT_PROG_GCJ])dnl 8463AC_LANG_SAVE 8464 8465# Source file extension for Java test sources. 8466ac_ext=java 8467 8468# Object file extension for compiled Java test sources. 8469objext=o 8470_LT_TAGVAR(objext, $1)=$objext 8471 8472# Code to be used in simple compile tests 8473lt_simple_compile_test_code="class foo {}" 8474 8475# Code to be used in simple link tests 8476lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8477 8478# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8479_LT_TAG_COMPILER 8480 8481# save warnings/boilerplate of simple test code 8482_LT_COMPILER_BOILERPLATE 8483_LT_LINKER_BOILERPLATE 8484 8485# Allow CC to be a program name with arguments. 8486lt_save_CC=$CC 8487lt_save_CFLAGS=$CFLAGS 8488lt_save_GCC=$GCC 8489GCC=yes 8490CC=${GCJ-"gcj"} 8491CFLAGS=$GCJFLAGS 8492compiler=$CC 8493_LT_TAGVAR(compiler, $1)=$CC 8494_LT_TAGVAR(LD, $1)="$LD" 8495_LT_CC_BASENAME([$compiler]) 8496 8497# GCJ did not exist at the time GCC didn't implicitly link libc in. 8498_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8499 8500_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8501_LT_TAGVAR(reload_flag, $1)=$reload_flag 8502_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8503 8504if test -n "$compiler"; then 8505 _LT_COMPILER_NO_RTTI($1) 8506 _LT_COMPILER_PIC($1) 8507 _LT_COMPILER_C_O($1) 8508 _LT_COMPILER_FILE_LOCKS($1) 8509 _LT_LINKER_SHLIBS($1) 8510 _LT_LINKER_HARDCODE_LIBPATH($1) 8511 8512 _LT_CONFIG($1) 8513fi 8514 8515AC_LANG_RESTORE 8516 8517GCC=$lt_save_GCC 8518CC=$lt_save_CC 8519CFLAGS=$lt_save_CFLAGS 8520])# _LT_LANG_GCJ_CONFIG 8521 8522 8523# _LT_LANG_GO_CONFIG([TAG]) 8524# -------------------------- 8525# Ensure that the configuration variables for the GNU Go compiler 8526# are suitably defined. These variables are subsequently used by _LT_CONFIG 8527# to write the compiler configuration to `libtool'. 8528m4_defun([_LT_LANG_GO_CONFIG], 8529[AC_REQUIRE([LT_PROG_GO])dnl 8530AC_LANG_SAVE 8531 8532# Source file extension for Go test sources. 8533ac_ext=go 8534 8535# Object file extension for compiled Go test sources. 8536objext=o 8537_LT_TAGVAR(objext, $1)=$objext 8538 8539# Code to be used in simple compile tests 8540lt_simple_compile_test_code="package main; func main() { }" 8541 8542# Code to be used in simple link tests 8543lt_simple_link_test_code='package main; func main() { }' 8544 8545# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8546_LT_TAG_COMPILER 8547 8548# save warnings/boilerplate of simple test code 8549_LT_COMPILER_BOILERPLATE 8550_LT_LINKER_BOILERPLATE 8551 8552# Allow CC to be a program name with arguments. 8553lt_save_CC=$CC 8554lt_save_CFLAGS=$CFLAGS 8555lt_save_GCC=$GCC 8556GCC=yes 8557CC=${GOC-"gccgo"} 8558CFLAGS=$GOFLAGS 8559compiler=$CC 8560_LT_TAGVAR(compiler, $1)=$CC 8561_LT_TAGVAR(LD, $1)="$LD" 8562_LT_CC_BASENAME([$compiler]) 8563 8564# Go did not exist at the time GCC didn't implicitly link libc in. 8565_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8566 8567_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8568_LT_TAGVAR(reload_flag, $1)=$reload_flag 8569_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8570 8571if test -n "$compiler"; then 8572 _LT_COMPILER_NO_RTTI($1) 8573 _LT_COMPILER_PIC($1) 8574 _LT_COMPILER_C_O($1) 8575 _LT_COMPILER_FILE_LOCKS($1) 8576 _LT_LINKER_SHLIBS($1) 8577 _LT_LINKER_HARDCODE_LIBPATH($1) 8578 8579 _LT_CONFIG($1) 8580fi 8581 8582AC_LANG_RESTORE 8583 8584GCC=$lt_save_GCC 8585CC=$lt_save_CC 8586CFLAGS=$lt_save_CFLAGS 8587])# _LT_LANG_GO_CONFIG 8588 8589 8590# _LT_LANG_RC_CONFIG([TAG]) 8591# ------------------------- 8592# Ensure that the configuration variables for the Windows resource compiler 8593# are suitably defined. These variables are subsequently used by _LT_CONFIG 8594# to write the compiler configuration to `libtool'. 8595m4_defun([_LT_LANG_RC_CONFIG], 8596[AC_REQUIRE([LT_PROG_RC])dnl 8597AC_LANG_SAVE 8598 8599# Source file extension for RC test sources. 8600ac_ext=rc 8601 8602# Object file extension for compiled RC test sources. 8603objext=o 8604_LT_TAGVAR(objext, $1)=$objext 8605 8606# Code to be used in simple compile tests 8607lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8608 8609# Code to be used in simple link tests 8610lt_simple_link_test_code="$lt_simple_compile_test_code" 8611 8612# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8613_LT_TAG_COMPILER 8614 8615# save warnings/boilerplate of simple test code 8616_LT_COMPILER_BOILERPLATE 8617_LT_LINKER_BOILERPLATE 8618 8619# Allow CC to be a program name with arguments. 8620lt_save_CC="$CC" 8621lt_save_CFLAGS=$CFLAGS 8622lt_save_GCC=$GCC 8623GCC= 8624CC=${RC-"windres"} 8625CFLAGS= 8626compiler=$CC 8627_LT_TAGVAR(compiler, $1)=$CC 8628_LT_CC_BASENAME([$compiler]) 8629_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8630 8631if test -n "$compiler"; then 8632 : 8633 _LT_CONFIG($1) 8634fi 8635 8636GCC=$lt_save_GCC 8637AC_LANG_RESTORE 8638CC=$lt_save_CC 8639CFLAGS=$lt_save_CFLAGS 8640])# _LT_LANG_RC_CONFIG 8641 8642 8643# LT_PROG_GCJ 8644# ----------- 8645AC_DEFUN([LT_PROG_GCJ], 8646[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8647 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8648 [AC_CHECK_TOOL(GCJ, gcj,) 8649 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8650 AC_SUBST(GCJFLAGS)])])[]dnl 8651]) 8652 8653# Old name: 8654AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8655dnl aclocal-1.4 backwards compatibility: 8656dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8657 8658 8659# LT_PROG_GO 8660# ---------- 8661AC_DEFUN([LT_PROG_GO], 8662[AC_CHECK_TOOL(GOC, gccgo,) 8663]) 8664 8665 8666# LT_PROG_RC 8667# ---------- 8668AC_DEFUN([LT_PROG_RC], 8669[AC_CHECK_TOOL(RC, windres,) 8670]) 8671 8672# Old name: 8673AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8674dnl aclocal-1.4 backwards compatibility: 8675dnl AC_DEFUN([LT_AC_PROG_RC], []) 8676 8677 8678# _LT_DECL_EGREP 8679# -------------- 8680# If we don't have a new enough Autoconf to choose the best grep 8681# available, choose the one first in the user's PATH. 8682m4_defun([_LT_DECL_EGREP], 8683[AC_REQUIRE([AC_PROG_EGREP])dnl 8684AC_REQUIRE([AC_PROG_FGREP])dnl 8685test -z "$GREP" && GREP=grep 8686_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8687_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8688_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8689dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8690AC_SUBST([GREP]) 8691]) 8692 8693 8694# _LT_DECL_OBJDUMP 8695# -------------- 8696# If we don't have a new enough Autoconf to choose the best objdump 8697# available, choose the one first in the user's PATH. 8698m4_defun([_LT_DECL_OBJDUMP], 8699[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8700test -z "$OBJDUMP" && OBJDUMP=objdump 8701_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8702AC_SUBST([OBJDUMP]) 8703]) 8704 8705# _LT_DECL_DLLTOOL 8706# ---------------- 8707# Ensure DLLTOOL variable is set. 8708m4_defun([_LT_DECL_DLLTOOL], 8709[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8710test -z "$DLLTOOL" && DLLTOOL=dlltool 8711_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8712AC_SUBST([DLLTOOL]) 8713]) 8714 8715# _LT_DECL_SED 8716# ------------ 8717# Check for a fully-functional sed program, that truncates 8718# as few characters as possible. Prefer GNU sed if found. 8719m4_defun([_LT_DECL_SED], 8720[AC_PROG_SED 8721test -z "$SED" && SED=sed 8722Xsed="$SED -e 1s/^X//" 8723_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8724_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8725 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8726])# _LT_DECL_SED 8727 8728m4_ifndef([AC_PROG_SED], [ 8729# NOTE: This macro has been submitted for inclusion into # 8730# GNU Autoconf as AC_PROG_SED. When it is available in # 8731# a released version of Autoconf we should remove this # 8732# macro and use it instead. # 8733 8734m4_defun([AC_PROG_SED], 8735[AC_MSG_CHECKING([for a sed that does not truncate output]) 8736AC_CACHE_VAL(lt_cv_path_SED, 8737[# Loop through the user's path and test for sed and gsed. 8738# Then use that list of sed's as ones to test for truncation. 8739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8740for as_dir in $PATH 8741do 8742 IFS=$as_save_IFS 8743 test -z "$as_dir" && as_dir=. 8744 for lt_ac_prog in sed gsed; do 8745 for ac_exec_ext in '' $ac_executable_extensions; do 8746 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8747 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8748 fi 8749 done 8750 done 8751done 8752IFS=$as_save_IFS 8753lt_ac_max=0 8754lt_ac_count=0 8755# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8756# along with /bin/sed that truncates output. 8757for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8758 test ! -f $lt_ac_sed && continue 8759 cat /dev/null > conftest.in 8760 lt_ac_count=0 8761 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8762 # Check for GNU sed and select it if it is found. 8763 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8764 lt_cv_path_SED=$lt_ac_sed 8765 break 8766 fi 8767 while true; do 8768 cat conftest.in conftest.in >conftest.tmp 8769 mv conftest.tmp conftest.in 8770 cp conftest.in conftest.nl 8771 echo >>conftest.nl 8772 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8773 cmp -s conftest.out conftest.nl || break 8774 # 10000 chars as input seems more than enough 8775 test $lt_ac_count -gt 10 && break 8776 lt_ac_count=`expr $lt_ac_count + 1` 8777 if test $lt_ac_count -gt $lt_ac_max; then 8778 lt_ac_max=$lt_ac_count 8779 lt_cv_path_SED=$lt_ac_sed 8780 fi 8781 done 8782done 8783]) 8784SED=$lt_cv_path_SED 8785AC_SUBST([SED]) 8786AC_MSG_RESULT([$SED]) 8787])#AC_PROG_SED 8788])#m4_ifndef 8789 8790# Old name: 8791AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8792dnl aclocal-1.4 backwards compatibility: 8793dnl AC_DEFUN([LT_AC_PROG_SED], []) 8794 8795 8796# _LT_CHECK_SHELL_FEATURES 8797# ------------------------ 8798# Find out whether the shell is Bourne or XSI compatible, 8799# or has some other useful features. 8800m4_defun([_LT_CHECK_SHELL_FEATURES], 8801[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8802# Try some XSI features 8803xsi_shell=no 8804( _lt_dummy="a/b/c" 8805 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8806 = c,a/b,b/c, \ 8807 && eval 'test $(( 1 + 1 )) -eq 2 \ 8808 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8809 && xsi_shell=yes 8810AC_MSG_RESULT([$xsi_shell]) 8811_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8812 8813AC_MSG_CHECKING([whether the shell understands "+="]) 8814lt_shell_append=no 8815( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8816 >/dev/null 2>&1 \ 8817 && lt_shell_append=yes 8818AC_MSG_RESULT([$lt_shell_append]) 8819_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8820 8821if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8822 lt_unset=unset 8823else 8824 lt_unset=false 8825fi 8826_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8827 8828# test EBCDIC or ASCII 8829case `echo X|tr X '\101'` in 8830 A) # ASCII based system 8831 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8832 lt_SP2NL='tr \040 \012' 8833 lt_NL2SP='tr \015\012 \040\040' 8834 ;; 8835 *) # EBCDIC based system 8836 lt_SP2NL='tr \100 \n' 8837 lt_NL2SP='tr \r\n \100\100' 8838 ;; 8839esac 8840_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8841_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8842])# _LT_CHECK_SHELL_FEATURES 8843 8844 8845# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8846# ------------------------------------------------------ 8847# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8848# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8849m4_defun([_LT_PROG_FUNCTION_REPLACE], 8850[dnl { 8851sed -e '/^$1 ()$/,/^} # $1 /c\ 8852$1 ()\ 8853{\ 8854m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8855} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8856 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8857 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8858test 0 -eq $? || _lt_function_replace_fail=: 8859]) 8860 8861 8862# _LT_PROG_REPLACE_SHELLFNS 8863# ------------------------- 8864# Replace existing portable implementations of several shell functions with 8865# equivalent extended shell implementations where those features are available.. 8866m4_defun([_LT_PROG_REPLACE_SHELLFNS], 8867[if test x"$xsi_shell" = xyes; then 8868 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8869 case ${1} in 8870 */*) func_dirname_result="${1%/*}${2}" ;; 8871 * ) func_dirname_result="${3}" ;; 8872 esac]) 8873 8874 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8875 func_basename_result="${1##*/}"]) 8876 8877 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8878 case ${1} in 8879 */*) func_dirname_result="${1%/*}${2}" ;; 8880 * ) func_dirname_result="${3}" ;; 8881 esac 8882 func_basename_result="${1##*/}"]) 8883 8884 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8885 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8886 # positional parameters, so assign one to ordinary parameter first. 8887 func_stripname_result=${3} 8888 func_stripname_result=${func_stripname_result#"${1}"} 8889 func_stripname_result=${func_stripname_result%"${2}"}]) 8890 8891 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 8892 func_split_long_opt_name=${1%%=*} 8893 func_split_long_opt_arg=${1#*=}]) 8894 8895 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 8896 func_split_short_opt_arg=${1#??} 8897 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8898 8899 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 8900 case ${1} in 8901 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 8902 *) func_lo2o_result=${1} ;; 8903 esac]) 8904 8905 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8906 8907 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8908 8909 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8910fi 8911 8912if test x"$lt_shell_append" = xyes; then 8913 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8914 8915 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 8916 func_quote_for_eval "${2}" 8917dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 8918 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8919 8920 # Save a `func_append' function call where possible by direct use of '+=' 8921 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 8922 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8923 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8924 test 0 -eq $? || _lt_function_replace_fail=: 8925else 8926 # Save a `func_append' function call even when '+=' is not available 8927 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 8928 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8929 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8930 test 0 -eq $? || _lt_function_replace_fail=: 8931fi 8932 8933if test x"$_lt_function_replace_fail" = x":"; then 8934 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 8935fi 8936]) 8937 8938# _LT_PATH_CONVERSION_FUNCTIONS 8939# ----------------------------- 8940# Determine which file name conversion functions should be used by 8941# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8942# for certain cross-compile configurations and native mingw. 8943m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8944[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8945AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8946AC_MSG_CHECKING([how to convert $build file names to $host format]) 8947AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8948[case $host in 8949 *-*-mingw* ) 8950 case $build in 8951 *-*-mingw* ) # actually msys 8952 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8953 ;; 8954 *-*-cygwin* ) 8955 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8956 ;; 8957 * ) # otherwise, assume *nix 8958 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8959 ;; 8960 esac 8961 ;; 8962 *-*-cygwin* ) 8963 case $build in 8964 *-*-mingw* ) # actually msys 8965 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8966 ;; 8967 *-*-cygwin* ) 8968 lt_cv_to_host_file_cmd=func_convert_file_noop 8969 ;; 8970 * ) # otherwise, assume *nix 8971 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8972 ;; 8973 esac 8974 ;; 8975 * ) # unhandled hosts (and "normal" native builds) 8976 lt_cv_to_host_file_cmd=func_convert_file_noop 8977 ;; 8978esac 8979]) 8980to_host_file_cmd=$lt_cv_to_host_file_cmd 8981AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8982_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8983 [0], [convert $build file names to $host format])dnl 8984 8985AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8986AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8987[#assume ordinary cross tools, or native build. 8988lt_cv_to_tool_file_cmd=func_convert_file_noop 8989case $host in 8990 *-*-mingw* ) 8991 case $build in 8992 *-*-mingw* ) # actually msys 8993 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8994 ;; 8995 esac 8996 ;; 8997esac 8998]) 8999to_tool_file_cmd=$lt_cv_to_tool_file_cmd 9000AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9001_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9002 [0], [convert $build files to toolchain format])dnl 9003])# _LT_PATH_CONVERSION_FUNCTIONS 9004 9005# Helper functions for option handling. -*- Autoconf -*- 9006# 9007# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9008# Inc. 9009# Written by Gary V. Vaughan, 2004 9010# 9011# This file is free software; the Free Software Foundation gives 9012# unlimited permission to copy and/or distribute it, with or without 9013# modifications, as long as this notice is preserved. 9014 9015# serial 7 ltoptions.m4 9016 9017# This is to help aclocal find these macros, as it can't see m4_define. 9018AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9019 9020 9021# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9022# ------------------------------------------ 9023m4_define([_LT_MANGLE_OPTION], 9024[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9025 9026 9027# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9028# --------------------------------------- 9029# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9030# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9031# saved as a flag. 9032m4_define([_LT_SET_OPTION], 9033[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9034m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9035 _LT_MANGLE_DEFUN([$1], [$2]), 9036 [m4_warning([Unknown $1 option `$2'])])[]dnl 9037]) 9038 9039 9040# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9041# ------------------------------------------------------------ 9042# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9043m4_define([_LT_IF_OPTION], 9044[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9045 9046 9047# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9048# ------------------------------------------------------- 9049# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9050# are set. 9051m4_define([_LT_UNLESS_OPTIONS], 9052[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9053 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9054 [m4_define([$0_found])])])[]dnl 9055m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9056])[]dnl 9057]) 9058 9059 9060# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9061# ---------------------------------------- 9062# OPTION-LIST is a space-separated list of Libtool options associated 9063# with MACRO-NAME. If any OPTION has a matching handler declared with 9064# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9065# the unknown option and exit. 9066m4_defun([_LT_SET_OPTIONS], 9067[# Set options 9068m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9069 [_LT_SET_OPTION([$1], _LT_Option)]) 9070 9071m4_if([$1],[LT_INIT],[ 9072 dnl 9073 dnl Simply set some default values (i.e off) if boolean options were not 9074 dnl specified: 9075 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9076 ]) 9077 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9078 ]) 9079 dnl 9080 dnl If no reference was made to various pairs of opposing options, then 9081 dnl we run the default mode handler for the pair. For example, if neither 9082 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9083 dnl archives by default: 9084 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9085 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9086 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9087 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9088 [_LT_ENABLE_FAST_INSTALL]) 9089 ]) 9090])# _LT_SET_OPTIONS 9091 9092 9093 9094# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9095# ----------------------------------------- 9096m4_define([_LT_MANGLE_DEFUN], 9097[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9098 9099 9100# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9101# ----------------------------------------------- 9102m4_define([LT_OPTION_DEFINE], 9103[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9104])# LT_OPTION_DEFINE 9105 9106 9107# dlopen 9108# ------ 9109LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9110]) 9111 9112AU_DEFUN([AC_LIBTOOL_DLOPEN], 9113[_LT_SET_OPTION([LT_INIT], [dlopen]) 9114AC_DIAGNOSE([obsolete], 9115[$0: Remove this warning and the call to _LT_SET_OPTION when you 9116put the `dlopen' option into LT_INIT's first parameter.]) 9117]) 9118 9119dnl aclocal-1.4 backwards compatibility: 9120dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9121 9122 9123# win32-dll 9124# --------- 9125# Declare package support for building win32 dll's. 9126LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9127[enable_win32_dll=yes 9128 9129case $host in 9130*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9131 AC_CHECK_TOOL(AS, as, false) 9132 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9133 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9134 ;; 9135esac 9136 9137test -z "$AS" && AS=as 9138_LT_DECL([], [AS], [1], [Assembler program])dnl 9139 9140test -z "$DLLTOOL" && DLLTOOL=dlltool 9141_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9142 9143test -z "$OBJDUMP" && OBJDUMP=objdump 9144_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9145])# win32-dll 9146 9147AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9148[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9149_LT_SET_OPTION([LT_INIT], [win32-dll]) 9150AC_DIAGNOSE([obsolete], 9151[$0: Remove this warning and the call to _LT_SET_OPTION when you 9152put the `win32-dll' option into LT_INIT's first parameter.]) 9153]) 9154 9155dnl aclocal-1.4 backwards compatibility: 9156dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9157 9158 9159# _LT_ENABLE_SHARED([DEFAULT]) 9160# ---------------------------- 9161# implement the --enable-shared flag, and supports the `shared' and 9162# `disable-shared' LT_INIT options. 9163# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9164m4_define([_LT_ENABLE_SHARED], 9165[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9166AC_ARG_ENABLE([shared], 9167 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9168 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9169 [p=${PACKAGE-default} 9170 case $enableval in 9171 yes) enable_shared=yes ;; 9172 no) enable_shared=no ;; 9173 *) 9174 enable_shared=no 9175 # Look at the argument we got. We use all the common list separators. 9176 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9177 for pkg in $enableval; do 9178 IFS="$lt_save_ifs" 9179 if test "X$pkg" = "X$p"; then 9180 enable_shared=yes 9181 fi 9182 done 9183 IFS="$lt_save_ifs" 9184 ;; 9185 esac], 9186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9187 9188 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9189 [Whether or not to build shared libraries]) 9190])# _LT_ENABLE_SHARED 9191 9192LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9193LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9194 9195# Old names: 9196AC_DEFUN([AC_ENABLE_SHARED], 9197[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9198]) 9199 9200AC_DEFUN([AC_DISABLE_SHARED], 9201[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9202]) 9203 9204AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9205AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9206 9207dnl aclocal-1.4 backwards compatibility: 9208dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9209dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9210 9211 9212 9213# _LT_ENABLE_STATIC([DEFAULT]) 9214# ---------------------------- 9215# implement the --enable-static flag, and support the `static' and 9216# `disable-static' LT_INIT options. 9217# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9218m4_define([_LT_ENABLE_STATIC], 9219[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9220AC_ARG_ENABLE([static], 9221 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9222 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9223 [p=${PACKAGE-default} 9224 case $enableval in 9225 yes) enable_static=yes ;; 9226 no) enable_static=no ;; 9227 *) 9228 enable_static=no 9229 # Look at the argument we got. We use all the common list separators. 9230 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9231 for pkg in $enableval; do 9232 IFS="$lt_save_ifs" 9233 if test "X$pkg" = "X$p"; then 9234 enable_static=yes 9235 fi 9236 done 9237 IFS="$lt_save_ifs" 9238 ;; 9239 esac], 9240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9241 9242 _LT_DECL([build_old_libs], [enable_static], [0], 9243 [Whether or not to build static libraries]) 9244])# _LT_ENABLE_STATIC 9245 9246LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9247LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9248 9249# Old names: 9250AC_DEFUN([AC_ENABLE_STATIC], 9251[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9252]) 9253 9254AC_DEFUN([AC_DISABLE_STATIC], 9255[_LT_SET_OPTION([LT_INIT], [disable-static]) 9256]) 9257 9258AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9259AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9260 9261dnl aclocal-1.4 backwards compatibility: 9262dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9263dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9264 9265 9266 9267# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9268# ---------------------------------- 9269# implement the --enable-fast-install flag, and support the `fast-install' 9270# and `disable-fast-install' LT_INIT options. 9271# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9272m4_define([_LT_ENABLE_FAST_INSTALL], 9273[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9274AC_ARG_ENABLE([fast-install], 9275 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9276 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9277 [p=${PACKAGE-default} 9278 case $enableval in 9279 yes) enable_fast_install=yes ;; 9280 no) enable_fast_install=no ;; 9281 *) 9282 enable_fast_install=no 9283 # Look at the argument we got. We use all the common list separators. 9284 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9285 for pkg in $enableval; do 9286 IFS="$lt_save_ifs" 9287 if test "X$pkg" = "X$p"; then 9288 enable_fast_install=yes 9289 fi 9290 done 9291 IFS="$lt_save_ifs" 9292 ;; 9293 esac], 9294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9295 9296_LT_DECL([fast_install], [enable_fast_install], [0], 9297 [Whether or not to optimize for fast installation])dnl 9298])# _LT_ENABLE_FAST_INSTALL 9299 9300LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9301LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9302 9303# Old names: 9304AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9305[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9306AC_DIAGNOSE([obsolete], 9307[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9308the `fast-install' option into LT_INIT's first parameter.]) 9309]) 9310 9311AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9312[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9313AC_DIAGNOSE([obsolete], 9314[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9315the `disable-fast-install' option into LT_INIT's first parameter.]) 9316]) 9317 9318dnl aclocal-1.4 backwards compatibility: 9319dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9320dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9321 9322 9323# _LT_WITH_PIC([MODE]) 9324# -------------------- 9325# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9326# LT_INIT options. 9327# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9328m4_define([_LT_WITH_PIC], 9329[AC_ARG_WITH([pic], 9330 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9331 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9332 [lt_p=${PACKAGE-default} 9333 case $withval in 9334 yes|no) pic_mode=$withval ;; 9335 *) 9336 pic_mode=default 9337 # Look at the argument we got. We use all the common list separators. 9338 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9339 for lt_pkg in $withval; do 9340 IFS="$lt_save_ifs" 9341 if test "X$lt_pkg" = "X$lt_p"; then 9342 pic_mode=yes 9343 fi 9344 done 9345 IFS="$lt_save_ifs" 9346 ;; 9347 esac], 9348 [pic_mode=default]) 9349 9350test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9351 9352_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9353])# _LT_WITH_PIC 9354 9355LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9356LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9357 9358# Old name: 9359AU_DEFUN([AC_LIBTOOL_PICMODE], 9360[_LT_SET_OPTION([LT_INIT], [pic-only]) 9361AC_DIAGNOSE([obsolete], 9362[$0: Remove this warning and the call to _LT_SET_OPTION when you 9363put the `pic-only' option into LT_INIT's first parameter.]) 9364]) 9365 9366dnl aclocal-1.4 backwards compatibility: 9367dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9368 9369 9370m4_define([_LTDL_MODE], []) 9371LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9372 [m4_define([_LTDL_MODE], [nonrecursive])]) 9373LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9374 [m4_define([_LTDL_MODE], [recursive])]) 9375LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9376 [m4_define([_LTDL_MODE], [subproject])]) 9377 9378m4_define([_LTDL_TYPE], []) 9379LT_OPTION_DEFINE([LTDL_INIT], [installable], 9380 [m4_define([_LTDL_TYPE], [installable])]) 9381LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9382 [m4_define([_LTDL_TYPE], [convenience])]) 9383 9384# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9385# 9386# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9387# Written by Gary V. Vaughan, 2004 9388# 9389# This file is free software; the Free Software Foundation gives 9390# unlimited permission to copy and/or distribute it, with or without 9391# modifications, as long as this notice is preserved. 9392 9393# serial 6 ltsugar.m4 9394 9395# This is to help aclocal find these macros, as it can't see m4_define. 9396AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9397 9398 9399# lt_join(SEP, ARG1, [ARG2...]) 9400# ----------------------------- 9401# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9402# associated separator. 9403# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9404# versions in m4sugar had bugs. 9405m4_define([lt_join], 9406[m4_if([$#], [1], [], 9407 [$#], [2], [[$2]], 9408 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9409m4_define([_lt_join], 9410[m4_if([$#$2], [2], [], 9411 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9412 9413 9414# lt_car(LIST) 9415# lt_cdr(LIST) 9416# ------------ 9417# Manipulate m4 lists. 9418# These macros are necessary as long as will still need to support 9419# Autoconf-2.59 which quotes differently. 9420m4_define([lt_car], [[$1]]) 9421m4_define([lt_cdr], 9422[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9423 [$#], 1, [], 9424 [m4_dquote(m4_shift($@))])]) 9425m4_define([lt_unquote], $1) 9426 9427 9428# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9429# ------------------------------------------ 9430# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9431# Note that neither SEPARATOR nor STRING are expanded; they are appended 9432# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9433# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9434# than defined and empty). 9435# 9436# This macro is needed until we can rely on Autoconf 2.62, since earlier 9437# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9438m4_define([lt_append], 9439[m4_define([$1], 9440 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9441 9442 9443 9444# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9445# ---------------------------------------------------------- 9446# Produce a SEP delimited list of all paired combinations of elements of 9447# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9448# has the form PREFIXmINFIXSUFFIXn. 9449# Needed until we can rely on m4_combine added in Autoconf 2.62. 9450m4_define([lt_combine], 9451[m4_if(m4_eval([$# > 3]), [1], 9452 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9453[[m4_foreach([_Lt_prefix], [$2], 9454 [m4_foreach([_Lt_suffix], 9455 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9456 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9457 9458 9459# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9460# ----------------------------------------------------------------------- 9461# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9462# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9463m4_define([lt_if_append_uniq], 9464[m4_ifdef([$1], 9465 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9466 [lt_append([$1], [$2], [$3])$4], 9467 [$5])], 9468 [lt_append([$1], [$2], [$3])$4])]) 9469 9470 9471# lt_dict_add(DICT, KEY, VALUE) 9472# ----------------------------- 9473m4_define([lt_dict_add], 9474[m4_define([$1($2)], [$3])]) 9475 9476 9477# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9478# -------------------------------------------- 9479m4_define([lt_dict_add_subkey], 9480[m4_define([$1($2:$3)], [$4])]) 9481 9482 9483# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9484# ---------------------------------- 9485m4_define([lt_dict_fetch], 9486[m4_ifval([$3], 9487 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9488 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9489 9490 9491# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9492# ----------------------------------------------------------------- 9493m4_define([lt_if_dict_fetch], 9494[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9495 [$5], 9496 [$6])]) 9497 9498 9499# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9500# -------------------------------------------------------------- 9501m4_define([lt_dict_filter], 9502[m4_if([$5], [], [], 9503 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9504 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9505 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9506]) 9507 9508# ltversion.m4 -- version numbers -*- Autoconf -*- 9509# 9510# Copyright (C) 2004 Free Software Foundation, Inc. 9511# Written by Scott James Remnant, 2004 9512# 9513# This file is free software; the Free Software Foundation gives 9514# unlimited permission to copy and/or distribute it, with or without 9515# modifications, as long as this notice is preserved. 9516 9517# @configure_input@ 9518 9519# serial 3337 ltversion.m4 9520# This file is part of GNU Libtool 9521 9522m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9523m4_define([LT_PACKAGE_REVISION], [1.3337]) 9524 9525AC_DEFUN([LTVERSION_VERSION], 9526[macro_version='2.4.2' 9527macro_revision='1.3337' 9528_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9529_LT_DECL(, macro_revision, 0) 9530]) 9531 9532# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9533# 9534# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9535# Written by Scott James Remnant, 2004. 9536# 9537# This file is free software; the Free Software Foundation gives 9538# unlimited permission to copy and/or distribute it, with or without 9539# modifications, as long as this notice is preserved. 9540 9541# serial 5 lt~obsolete.m4 9542 9543# These exist entirely to fool aclocal when bootstrapping libtool. 9544# 9545# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9546# which have later been changed to m4_define as they aren't part of the 9547# exported API, or moved to Autoconf or Automake where they belong. 9548# 9549# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9550# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9551# using a macro with the same name in our local m4/libtool.m4 it'll 9552# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9553# and doesn't know about Autoconf macros at all.) 9554# 9555# So we provide this file, which has a silly filename so it's always 9556# included after everything else. This provides aclocal with the 9557# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9558# because those macros already exist, or will be overwritten later. 9559# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9560# 9561# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9562# Yes, that means every name once taken will need to remain here until 9563# we give up compatibility with versions before 1.7, at which point 9564# we need to keep only those names which we still refer to. 9565 9566# This is to help aclocal find these macros, as it can't see m4_define. 9567AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9568 9569m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9570m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9571m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9572m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9573m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9574m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9575m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9576m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9577m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9578m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9579m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9580m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9581m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9582m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9583m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9584m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9585m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9586m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9587m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9588m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9589m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9590m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9591m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9592m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9593m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9594m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9595m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9596m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9597m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9598m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9599m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9600m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9601m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9602m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9603m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9604m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9605m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9606m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9607m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9608m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9609m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9610m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9611m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9612m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9613m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9614m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9615m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9616m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9617m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9618m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9619m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9620m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9621m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9622m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9623m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9624m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9625m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9626m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9627m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9628m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9629m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9630 9631# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9632# serial 1 (pkg-config-0.24) 9633# 9634# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9635# 9636# This program is free software; you can redistribute it and/or modify 9637# it under the terms of the GNU General Public License as published by 9638# the Free Software Foundation; either version 2 of the License, or 9639# (at your option) any later version. 9640# 9641# This program is distributed in the hope that it will be useful, but 9642# WITHOUT ANY WARRANTY; without even the implied warranty of 9643# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9644# General Public License for more details. 9645# 9646# You should have received a copy of the GNU General Public License 9647# along with this program; if not, write to the Free Software 9648# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9649# 9650# As a special exception to the GNU General Public License, if you 9651# distribute this file as part of a program that contains a 9652# configuration script generated by Autoconf, you may include it under 9653# the same distribution terms that you use for the rest of that program. 9654 9655# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9656# ---------------------------------- 9657AC_DEFUN([PKG_PROG_PKG_CONFIG], 9658[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9659m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9660AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9661AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9662AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9663 9664if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9665 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9666fi 9667if test -n "$PKG_CONFIG"; then 9668 _pkg_min_version=m4_default([$1], [0.9.0]) 9669 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9670 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9671 AC_MSG_RESULT([yes]) 9672 else 9673 AC_MSG_RESULT([no]) 9674 PKG_CONFIG="" 9675 fi 9676fi[]dnl 9677])# PKG_PROG_PKG_CONFIG 9678 9679# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9680# 9681# Check to see whether a particular set of modules exists. Similar 9682# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9683# 9684# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9685# only at the first occurence in configure.ac, so if the first place 9686# it's called might be skipped (such as if it is within an "if", you 9687# have to call PKG_CHECK_EXISTS manually 9688# -------------------------------------------------------------- 9689AC_DEFUN([PKG_CHECK_EXISTS], 9690[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9691if test -n "$PKG_CONFIG" && \ 9692 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9693 m4_default([$2], [:]) 9694m4_ifvaln([$3], [else 9695 $3])dnl 9696fi]) 9697 9698# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9699# --------------------------------------------- 9700m4_define([_PKG_CONFIG], 9701[if test -n "$$1"; then 9702 pkg_cv_[]$1="$$1" 9703 elif test -n "$PKG_CONFIG"; then 9704 PKG_CHECK_EXISTS([$3], 9705 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9706 [pkg_failed=yes]) 9707 else 9708 pkg_failed=untried 9709fi[]dnl 9710])# _PKG_CONFIG 9711 9712# _PKG_SHORT_ERRORS_SUPPORTED 9713# ----------------------------- 9714AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9715[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9716if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9717 _pkg_short_errors_supported=yes 9718else 9719 _pkg_short_errors_supported=no 9720fi[]dnl 9721])# _PKG_SHORT_ERRORS_SUPPORTED 9722 9723 9724# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9725# [ACTION-IF-NOT-FOUND]) 9726# 9727# 9728# Note that if there is a possibility the first call to 9729# PKG_CHECK_MODULES might not happen, you should be sure to include an 9730# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9731# 9732# 9733# -------------------------------------------------------------- 9734AC_DEFUN([PKG_CHECK_MODULES], 9735[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9736AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9737AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9738 9739pkg_failed=no 9740AC_MSG_CHECKING([for $1]) 9741 9742_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9743_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9744 9745m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9746and $1[]_LIBS to avoid the need to call pkg-config. 9747See the pkg-config man page for more details.]) 9748 9749if test $pkg_failed = yes; then 9750 AC_MSG_RESULT([no]) 9751 _PKG_SHORT_ERRORS_SUPPORTED 9752 if test $_pkg_short_errors_supported = yes; then 9753 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9754 else 9755 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9756 fi 9757 # Put the nasty error message in config.log where it belongs 9758 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9759 9760 m4_default([$4], [AC_MSG_ERROR( 9761[Package requirements ($2) were not met: 9762 9763$$1_PKG_ERRORS 9764 9765Consider adjusting the PKG_CONFIG_PATH environment variable if you 9766installed software in a non-standard prefix. 9767 9768_PKG_TEXT]) 9769 ]) 9770elif test $pkg_failed = untried; then 9771 AC_MSG_RESULT([no]) 9772 m4_default([$4], [AC_MSG_FAILURE( 9773[The pkg-config script could not be found or is too old. Make sure it 9774is in your PATH or set the PKG_CONFIG environment variable to the full 9775path to pkg-config. 9776 9777_PKG_TEXT 9778 9779To get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 9780 ]) 9781else 9782 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9783 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9784 AC_MSG_RESULT([yes]) 9785 $3 9786fi[]dnl 9787])# PKG_CHECK_MODULES 9788 9789dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9790dnl 9791dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9792dnl 9793dnl Permission is hereby granted, free of charge, to any person obtaining a 9794dnl copy of this software and associated documentation files (the "Software"), 9795dnl to deal in the Software without restriction, including without limitation 9796dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9797dnl and/or sell copies of the Software, and to permit persons to whom the 9798dnl Software is furnished to do so, subject to the following conditions: 9799dnl 9800dnl The above copyright notice and this permission notice (including the next 9801dnl paragraph) shall be included in all copies or substantial portions of the 9802dnl Software. 9803dnl 9804dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9805dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9806dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9807dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9808dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9809dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9810dnl DEALINGS IN THE SOFTWARE. 9811 9812# XORG_MACROS_VERSION(required-version) 9813# ------------------------------------- 9814# Minimum version: 1.1.0 9815# 9816# If you're using a macro added in Version 1.1 or newer, include this in 9817# your configure.ac with the minimum required version, such as: 9818# XORG_MACROS_VERSION(1.1) 9819# 9820# To ensure that this macro is defined, also add: 9821# m4_ifndef([XORG_MACROS_VERSION], 9822# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9823# 9824# 9825# See the "minimum version" comment for each macro you use to see what 9826# version you require. 9827m4_defun([XORG_MACROS_VERSION],[ 9828m4_define([vers_have], [1.17]) 9829m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9830m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9831m4_if(m4_cmp(maj_have, maj_needed), 0,, 9832 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9833m4_if(m4_version_compare(vers_have, [$1]), -1, 9834 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9835m4_undefine([vers_have]) 9836m4_undefine([maj_have]) 9837m4_undefine([maj_needed]) 9838]) # XORG_MACROS_VERSION 9839 9840# XORG_PROG_RAWCPP() 9841# ------------------ 9842# Minimum version: 1.0.0 9843# 9844# Find cpp program and necessary flags for use in pre-processing text files 9845# such as man pages and config files 9846AC_DEFUN([XORG_PROG_RAWCPP],[ 9847AC_REQUIRE([AC_PROG_CPP]) 9848AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9849 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9850 9851# Check for flag to avoid builtin definitions - assumes unix is predefined, 9852# which is not the best choice for supporting other OS'es, but covers most 9853# of the ones we need for now. 9854AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9855AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9856if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9857 AC_MSG_RESULT([no]) 9858else 9859 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9860 RAWCPPFLAGS=-undef 9861 AC_MSG_RESULT([yes]) 9862 # under Cygwin unix is still defined even with -undef 9863 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9864 RAWCPPFLAGS="-undef -ansi" 9865 AC_MSG_RESULT([yes, with -ansi]) 9866 else 9867 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9868 fi 9869fi 9870rm -f conftest.$ac_ext 9871 9872AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9873AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9874if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9875 AC_MSG_RESULT([no]) 9876else 9877 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9878 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9879 AC_MSG_RESULT([yes]) 9880 else 9881 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9882 fi 9883fi 9884rm -f conftest.$ac_ext 9885AC_SUBST(RAWCPPFLAGS) 9886]) # XORG_PROG_RAWCPP 9887 9888# XORG_MANPAGE_SECTIONS() 9889# ----------------------- 9890# Minimum version: 1.0.0 9891# 9892# Determine which sections man pages go in for the different man page types 9893# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9894# Not sure if there's any better way than just hardcoding by OS name. 9895# Override default settings by setting environment variables 9896# Added MAN_SUBSTS in version 1.8 9897# Added AC_PROG_SED in version 1.8 9898 9899AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9900AC_REQUIRE([AC_CANONICAL_HOST]) 9901AC_REQUIRE([AC_PROG_SED]) 9902 9903if test x$APP_MAN_SUFFIX = x ; then 9904 APP_MAN_SUFFIX=1 9905fi 9906if test x$APP_MAN_DIR = x ; then 9907 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9908fi 9909 9910if test x$LIB_MAN_SUFFIX = x ; then 9911 LIB_MAN_SUFFIX=3 9912fi 9913if test x$LIB_MAN_DIR = x ; then 9914 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9915fi 9916 9917if test x$FILE_MAN_SUFFIX = x ; then 9918 case $host_os in 9919 solaris*) FILE_MAN_SUFFIX=4 ;; 9920 *) FILE_MAN_SUFFIX=5 ;; 9921 esac 9922fi 9923if test x$FILE_MAN_DIR = x ; then 9924 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9925fi 9926 9927if test x$MISC_MAN_SUFFIX = x ; then 9928 case $host_os in 9929 solaris*) MISC_MAN_SUFFIX=5 ;; 9930 *) MISC_MAN_SUFFIX=7 ;; 9931 esac 9932fi 9933if test x$MISC_MAN_DIR = x ; then 9934 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9935fi 9936 9937if test x$DRIVER_MAN_SUFFIX = x ; then 9938 case $host_os in 9939 solaris*) DRIVER_MAN_SUFFIX=7 ;; 9940 *) DRIVER_MAN_SUFFIX=4 ;; 9941 esac 9942fi 9943if test x$DRIVER_MAN_DIR = x ; then 9944 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9945fi 9946 9947if test x$ADMIN_MAN_SUFFIX = x ; then 9948 case $host_os in 9949 solaris*) ADMIN_MAN_SUFFIX=1m ;; 9950 *) ADMIN_MAN_SUFFIX=8 ;; 9951 esac 9952fi 9953if test x$ADMIN_MAN_DIR = x ; then 9954 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9955fi 9956 9957 9958AC_SUBST([APP_MAN_SUFFIX]) 9959AC_SUBST([LIB_MAN_SUFFIX]) 9960AC_SUBST([FILE_MAN_SUFFIX]) 9961AC_SUBST([MISC_MAN_SUFFIX]) 9962AC_SUBST([DRIVER_MAN_SUFFIX]) 9963AC_SUBST([ADMIN_MAN_SUFFIX]) 9964AC_SUBST([APP_MAN_DIR]) 9965AC_SUBST([LIB_MAN_DIR]) 9966AC_SUBST([FILE_MAN_DIR]) 9967AC_SUBST([MISC_MAN_DIR]) 9968AC_SUBST([DRIVER_MAN_DIR]) 9969AC_SUBST([ADMIN_MAN_DIR]) 9970 9971XORG_MAN_PAGE="X Version 11" 9972AC_SUBST([XORG_MAN_PAGE]) 9973MAN_SUBSTS="\ 9974 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9975 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9976 -e 's|__xservername__|Xorg|g' \ 9977 -e 's|__xconfigfile__|xorg.conf|g' \ 9978 -e 's|__xorgconfdir__|xorg.conf.d|g' \ 9979 -e 's|__projectroot__|\$(prefix)|g' \ 9980 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9981 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9982 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9983 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9984 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9985 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9986 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9987AC_SUBST([MAN_SUBSTS]) 9988 9989]) # XORG_MANPAGE_SECTIONS 9990 9991# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9992# ------------------------ 9993# Minimum version: 1.7.0 9994# 9995# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9996# provided by xorg-sgml-doctools, if installed. 9997AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9998AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9999XORG_SGML_PATH= 10000PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10001 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10002 [m4_ifval([$1],[:], 10003 [if test x"$cross_compiling" != x"yes" ; then 10004 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10005 [XORG_SGML_PATH=$prefix/share/sgml]) 10006 fi]) 10007 ]) 10008 10009# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10010# the path and the name of the doc stylesheet 10011if test "x$XORG_SGML_PATH" != "x" ; then 10012 AC_MSG_RESULT([$XORG_SGML_PATH]) 10013 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10014 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10015else 10016 AC_MSG_RESULT([no]) 10017fi 10018 10019AC_SUBST(XORG_SGML_PATH) 10020AC_SUBST(STYLESHEET_SRCDIR) 10021AC_SUBST(XSL_STYLESHEET) 10022AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10023]) # XORG_CHECK_SGML_DOCTOOLS 10024 10025# XORG_CHECK_LINUXDOC 10026# ------------------- 10027# Minimum version: 1.0.0 10028# 10029# Defines the variable MAKE_TEXT if the necessary tools and 10030# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10031# Whether or not the necessary tools and files are found can be checked 10032# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10033AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10034AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10035AC_REQUIRE([XORG_WITH_PS2PDF]) 10036 10037AC_PATH_PROG(LINUXDOC, linuxdoc) 10038 10039AC_MSG_CHECKING([whether to build documentation]) 10040 10041if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10042 BUILDDOC=yes 10043else 10044 BUILDDOC=no 10045fi 10046 10047AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10048 10049AC_MSG_RESULT([$BUILDDOC]) 10050 10051AC_MSG_CHECKING([whether to build pdf documentation]) 10052 10053if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10054 BUILDPDFDOC=yes 10055else 10056 BUILDPDFDOC=no 10057fi 10058 10059AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10060 10061AC_MSG_RESULT([$BUILDPDFDOC]) 10062 10063MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10064MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10065MAKE_PDF="$PS2PDF" 10066MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10067 10068AC_SUBST(MAKE_TEXT) 10069AC_SUBST(MAKE_PS) 10070AC_SUBST(MAKE_PDF) 10071AC_SUBST(MAKE_HTML) 10072]) # XORG_CHECK_LINUXDOC 10073 10074# XORG_CHECK_DOCBOOK 10075# ------------------- 10076# Minimum version: 1.0.0 10077# 10078# Checks for the ability to build output formats from SGML DocBook source. 10079# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10080# indicates whether the necessary tools and files are found and, if set, 10081# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10082AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10083AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10084 10085BUILDTXTDOC=no 10086BUILDPDFDOC=no 10087BUILDPSDOC=no 10088BUILDHTMLDOC=no 10089 10090AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10091AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10092AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10093AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10094 10095AC_MSG_CHECKING([whether to build text documentation]) 10096if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10097 test x$BUILD_TXTDOC != xno; then 10098 BUILDTXTDOC=yes 10099fi 10100AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10101AC_MSG_RESULT([$BUILDTXTDOC]) 10102 10103AC_MSG_CHECKING([whether to build PDF documentation]) 10104if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10105 test x$BUILD_PDFDOC != xno; then 10106 BUILDPDFDOC=yes 10107fi 10108AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10109AC_MSG_RESULT([$BUILDPDFDOC]) 10110 10111AC_MSG_CHECKING([whether to build PostScript documentation]) 10112if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10113 test x$BUILD_PSDOC != xno; then 10114 BUILDPSDOC=yes 10115fi 10116AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10117AC_MSG_RESULT([$BUILDPSDOC]) 10118 10119AC_MSG_CHECKING([whether to build HTML documentation]) 10120if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10121 test x$BUILD_HTMLDOC != xno; then 10122 BUILDHTMLDOC=yes 10123fi 10124AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10125AC_MSG_RESULT([$BUILDHTMLDOC]) 10126 10127MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10128MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10129MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10130MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10131 10132AC_SUBST(MAKE_TEXT) 10133AC_SUBST(MAKE_PS) 10134AC_SUBST(MAKE_PDF) 10135AC_SUBST(MAKE_HTML) 10136]) # XORG_CHECK_DOCBOOK 10137 10138# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10139# ---------------- 10140# Minimum version: 1.5.0 10141# Minimum version for optional DEFAULT argument: 1.11.0 10142# 10143# Documentation tools are not always available on all platforms and sometimes 10144# not at the appropriate level. This macro enables a module to test for the 10145# presence of the tool and obtain it's path in separate variables. Coupled with 10146# the --with-xmlto option, it allows maximum flexibilty in making decisions 10147# as whether or not to use the xmlto package. When DEFAULT is not specified, 10148# --with-xmlto assumes 'auto'. 10149# 10150# Interface to module: 10151# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10152# XMLTO: returns the path of the xmlto program found 10153# returns the path set by the user in the environment 10154# --with-xmlto: 'yes' user instructs the module to use xmlto 10155# 'no' user instructs the module not to use xmlto 10156# 10157# Added in version 1.10.0 10158# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10159# xmlto for text output requires either lynx, links, or w3m browsers 10160# 10161# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10162# 10163AC_DEFUN([XORG_WITH_XMLTO],[ 10164AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10165m4_define([_defopt], m4_default([$2], [auto])) 10166AC_ARG_WITH(xmlto, 10167 AS_HELP_STRING([--with-xmlto], 10168 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10169 [use_xmlto=$withval], [use_xmlto=]_defopt) 10170m4_undefine([_defopt]) 10171 10172if test "x$use_xmlto" = x"auto"; then 10173 AC_PATH_PROG([XMLTO], [xmlto]) 10174 if test "x$XMLTO" = "x"; then 10175 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10176 have_xmlto=no 10177 else 10178 have_xmlto=yes 10179 fi 10180elif test "x$use_xmlto" = x"yes" ; then 10181 AC_PATH_PROG([XMLTO], [xmlto]) 10182 if test "x$XMLTO" = "x"; then 10183 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10184 fi 10185 have_xmlto=yes 10186elif test "x$use_xmlto" = x"no" ; then 10187 if test "x$XMLTO" != "x"; then 10188 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10189 fi 10190 have_xmlto=no 10191else 10192 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10193fi 10194 10195# Test for a minimum version of xmlto, if provided. 10196m4_ifval([$1], 10197[if test "$have_xmlto" = yes; then 10198 # scrape the xmlto version 10199 AC_MSG_CHECKING([the xmlto version]) 10200 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10201 AC_MSG_RESULT([$xmlto_version]) 10202 AS_VERSION_COMPARE([$xmlto_version], [$1], 10203 [if test "x$use_xmlto" = xauto; then 10204 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10205 have_xmlto=no 10206 else 10207 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10208 fi]) 10209fi]) 10210 10211# Test for the ability of xmlto to generate a text target 10212have_xmlto_text=no 10213cat > conftest.xml << "EOF" 10214EOF 10215AS_IF([test "$have_xmlto" = yes], 10216 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10217 [have_xmlto_text=yes], 10218 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10219rm -f conftest.xml 10220AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10221AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10222]) # XORG_WITH_XMLTO 10223 10224# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10225# -------------------------------------------- 10226# Minimum version: 1.12.0 10227# Minimum version for optional DEFAULT argument: 1.12.0 10228# 10229# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10230# XML-based language used for the transformation of XML documents. 10231# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10232# It is used under the cover by xmlto to generate html files from DocBook/XML. 10233# The XSLT processor is often used as a standalone tool for transformations. 10234# It should not be assumed that this tool is used only to work with documnetation. 10235# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10236# 10237# Interface to module: 10238# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10239# XSLTPROC: returns the path of the xsltproc program found 10240# returns the path set by the user in the environment 10241# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10242# 'no' user instructs the module not to use xsltproc 10243# have_xsltproc: returns yes if xsltproc found in PATH or no 10244# 10245# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10246# 10247AC_DEFUN([XORG_WITH_XSLTPROC],[ 10248AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10249# Preserves the interface, should it be implemented later 10250m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10251m4_define([_defopt], m4_default([$2], [auto])) 10252AC_ARG_WITH(xsltproc, 10253 AS_HELP_STRING([--with-xsltproc], 10254 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10255 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10256m4_undefine([_defopt]) 10257 10258if test "x$use_xsltproc" = x"auto"; then 10259 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10260 if test "x$XSLTPROC" = "x"; then 10261 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10262 have_xsltproc=no 10263 else 10264 have_xsltproc=yes 10265 fi 10266elif test "x$use_xsltproc" = x"yes" ; then 10267 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10268 if test "x$XSLTPROC" = "x"; then 10269 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10270 fi 10271 have_xsltproc=yes 10272elif test "x$use_xsltproc" = x"no" ; then 10273 if test "x$XSLTPROC" != "x"; then 10274 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10275 fi 10276 have_xsltproc=no 10277else 10278 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10279fi 10280 10281AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10282]) # XORG_WITH_XSLTPROC 10283 10284# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10285# ---------------------------------------- 10286# Minimum version: 1.15.0 10287# 10288# PERL (Practical Extraction and Report Language) is a language optimized for 10289# scanning arbitrary text files, extracting information from those text files, 10290# and printing reports based on that information. 10291# 10292# When DEFAULT is not specified, --with-perl assumes 'auto'. 10293# 10294# Interface to module: 10295# HAVE_PERL: used in makefiles to conditionally scan text files 10296# PERL: returns the path of the perl program found 10297# returns the path set by the user in the environment 10298# --with-perl: 'yes' user instructs the module to use perl 10299# 'no' user instructs the module not to use perl 10300# have_perl: returns yes if perl found in PATH or no 10301# 10302# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10303# 10304AC_DEFUN([XORG_WITH_PERL],[ 10305AC_ARG_VAR([PERL], [Path to perl command]) 10306# Preserves the interface, should it be implemented later 10307m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10308m4_define([_defopt], m4_default([$2], [auto])) 10309AC_ARG_WITH(perl, 10310 AS_HELP_STRING([--with-perl], 10311 [Use perl for extracting information from files (default: ]_defopt[)]), 10312 [use_perl=$withval], [use_perl=]_defopt) 10313m4_undefine([_defopt]) 10314 10315if test "x$use_perl" = x"auto"; then 10316 AC_PATH_PROG([PERL], [perl]) 10317 if test "x$PERL" = "x"; then 10318 AC_MSG_WARN([perl not found - cannot extract information and report]) 10319 have_perl=no 10320 else 10321 have_perl=yes 10322 fi 10323elif test "x$use_perl" = x"yes" ; then 10324 AC_PATH_PROG([PERL], [perl]) 10325 if test "x$PERL" = "x"; then 10326 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10327 fi 10328 have_perl=yes 10329elif test "x$use_perl" = x"no" ; then 10330 if test "x$PERL" != "x"; then 10331 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10332 fi 10333 have_perl=no 10334else 10335 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10336fi 10337 10338AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10339]) # XORG_WITH_PERL 10340 10341# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10342# ---------------- 10343# Minimum version: 1.5.0 10344# Minimum version for optional DEFAULT argument: 1.11.0 10345# 10346# Documentation tools are not always available on all platforms and sometimes 10347# not at the appropriate level. This macro enables a module to test for the 10348# presence of the tool and obtain it's path in separate variables. Coupled with 10349# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10350# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10351# --with-asciidoc assumes 'auto'. 10352# 10353# Interface to module: 10354# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10355# ASCIIDOC: returns the path of the asciidoc program found 10356# returns the path set by the user in the environment 10357# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10358# 'no' user instructs the module not to use asciidoc 10359# 10360# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10361# 10362AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10363AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10364m4_define([_defopt], m4_default([$2], [auto])) 10365AC_ARG_WITH(asciidoc, 10366 AS_HELP_STRING([--with-asciidoc], 10367 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10368 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10369m4_undefine([_defopt]) 10370 10371if test "x$use_asciidoc" = x"auto"; then 10372 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10373 if test "x$ASCIIDOC" = "x"; then 10374 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10375 have_asciidoc=no 10376 else 10377 have_asciidoc=yes 10378 fi 10379elif test "x$use_asciidoc" = x"yes" ; then 10380 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10381 if test "x$ASCIIDOC" = "x"; then 10382 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10383 fi 10384 have_asciidoc=yes 10385elif test "x$use_asciidoc" = x"no" ; then 10386 if test "x$ASCIIDOC" != "x"; then 10387 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10388 fi 10389 have_asciidoc=no 10390else 10391 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10392fi 10393m4_ifval([$1], 10394[if test "$have_asciidoc" = yes; then 10395 # scrape the asciidoc version 10396 AC_MSG_CHECKING([the asciidoc version]) 10397 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10398 AC_MSG_RESULT([$asciidoc_version]) 10399 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10400 [if test "x$use_asciidoc" = xauto; then 10401 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10402 have_asciidoc=no 10403 else 10404 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10405 fi]) 10406fi]) 10407AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10408]) # XORG_WITH_ASCIIDOC 10409 10410# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10411# -------------------------------- 10412# Minimum version: 1.5.0 10413# Minimum version for optional DEFAULT argument: 1.11.0 10414# 10415# Documentation tools are not always available on all platforms and sometimes 10416# not at the appropriate level. This macro enables a module to test for the 10417# presence of the tool and obtain it's path in separate variables. Coupled with 10418# the --with-doxygen option, it allows maximum flexibilty in making decisions 10419# as whether or not to use the doxygen package. When DEFAULT is not specified, 10420# --with-doxygen assumes 'auto'. 10421# 10422# Interface to module: 10423# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10424# DOXYGEN: returns the path of the doxygen program found 10425# returns the path set by the user in the environment 10426# --with-doxygen: 'yes' user instructs the module to use doxygen 10427# 'no' user instructs the module not to use doxygen 10428# 10429# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10430# 10431AC_DEFUN([XORG_WITH_DOXYGEN],[ 10432AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10433m4_define([_defopt], m4_default([$2], [auto])) 10434AC_ARG_WITH(doxygen, 10435 AS_HELP_STRING([--with-doxygen], 10436 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10437 [use_doxygen=$withval], [use_doxygen=]_defopt) 10438m4_undefine([_defopt]) 10439 10440if test "x$use_doxygen" = x"auto"; then 10441 AC_PATH_PROG([DOXYGEN], [doxygen]) 10442 if test "x$DOXYGEN" = "x"; then 10443 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10444 have_doxygen=no 10445 else 10446 have_doxygen=yes 10447 fi 10448elif test "x$use_doxygen" = x"yes" ; then 10449 AC_PATH_PROG([DOXYGEN], [doxygen]) 10450 if test "x$DOXYGEN" = "x"; then 10451 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10452 fi 10453 have_doxygen=yes 10454elif test "x$use_doxygen" = x"no" ; then 10455 if test "x$DOXYGEN" != "x"; then 10456 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10457 fi 10458 have_doxygen=no 10459else 10460 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10461fi 10462m4_ifval([$1], 10463[if test "$have_doxygen" = yes; then 10464 # scrape the doxygen version 10465 AC_MSG_CHECKING([the doxygen version]) 10466 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10467 AC_MSG_RESULT([$doxygen_version]) 10468 AS_VERSION_COMPARE([$doxygen_version], [$1], 10469 [if test "x$use_doxygen" = xauto; then 10470 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10471 have_doxygen=no 10472 else 10473 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10474 fi]) 10475fi]) 10476AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10477]) # XORG_WITH_DOXYGEN 10478 10479# XORG_WITH_GROFF([DEFAULT]) 10480# ---------------- 10481# Minimum version: 1.6.0 10482# Minimum version for optional DEFAULT argument: 1.11.0 10483# 10484# Documentation tools are not always available on all platforms and sometimes 10485# not at the appropriate level. This macro enables a module to test for the 10486# presence of the tool and obtain it's path in separate variables. Coupled with 10487# the --with-groff option, it allows maximum flexibilty in making decisions 10488# as whether or not to use the groff package. When DEFAULT is not specified, 10489# --with-groff assumes 'auto'. 10490# 10491# Interface to module: 10492# HAVE_GROFF: used in makefiles to conditionally generate documentation 10493# HAVE_GROFF_MM: the memorandum macros (-mm) package 10494# HAVE_GROFF_MS: the -ms macros package 10495# GROFF: returns the path of the groff program found 10496# returns the path set by the user in the environment 10497# --with-groff: 'yes' user instructs the module to use groff 10498# 'no' user instructs the module not to use groff 10499# 10500# Added in version 1.9.0: 10501# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10502# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10503# psselect from the psutils package. 10504# the ghostcript package. Refer to the grohtml man pages 10505# 10506# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10507# 10508# OS and distros often splits groff in a basic and full package, the former 10509# having the groff program and the later having devices, fonts and macros 10510# Checking for the groff executable is not enough. 10511# 10512# If macros are missing, we cannot assume that groff is useless, so we don't 10513# unset HAVE_GROFF or GROFF env variables. 10514# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10515# 10516AC_DEFUN([XORG_WITH_GROFF],[ 10517AC_ARG_VAR([GROFF], [Path to groff command]) 10518m4_define([_defopt], m4_default([$1], [auto])) 10519AC_ARG_WITH(groff, 10520 AS_HELP_STRING([--with-groff], 10521 [Use groff to regenerate documentation (default: ]_defopt[)]), 10522 [use_groff=$withval], [use_groff=]_defopt) 10523m4_undefine([_defopt]) 10524 10525if test "x$use_groff" = x"auto"; then 10526 AC_PATH_PROG([GROFF], [groff]) 10527 if test "x$GROFF" = "x"; then 10528 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10529 have_groff=no 10530 else 10531 have_groff=yes 10532 fi 10533elif test "x$use_groff" = x"yes" ; then 10534 AC_PATH_PROG([GROFF], [groff]) 10535 if test "x$GROFF" = "x"; then 10536 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10537 fi 10538 have_groff=yes 10539elif test "x$use_groff" = x"no" ; then 10540 if test "x$GROFF" != "x"; then 10541 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10542 fi 10543 have_groff=no 10544else 10545 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10546fi 10547 10548# We have groff, test for the presence of the macro packages 10549if test "x$have_groff" = x"yes"; then 10550 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10551 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10552 groff_ms_works=yes 10553 else 10554 groff_ms_works=no 10555 fi 10556 AC_MSG_RESULT([$groff_ms_works]) 10557 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10558 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10559 groff_mm_works=yes 10560 else 10561 groff_mm_works=no 10562 fi 10563 AC_MSG_RESULT([$groff_mm_works]) 10564fi 10565 10566# We have groff, test for HTML dependencies, one command per package 10567if test "x$have_groff" = x"yes"; then 10568 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10569 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10570 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10571 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10572 have_groff_html=yes 10573 else 10574 have_groff_html=no 10575 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10576 fi 10577fi 10578 10579# Set Automake conditionals for Makefiles 10580AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10581AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10582AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10583AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10584]) # XORG_WITH_GROFF 10585 10586# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10587# --------------------------------------- 10588# Minimum version: 1.6.0 10589# Minimum version for optional DEFAULT argument: 1.11.0 10590# Minimum version for optional MIN-VERSION argument: 1.15.0 10591# 10592# Documentation tools are not always available on all platforms and sometimes 10593# not at the appropriate level. This macro enables a module to test for the 10594# presence of the tool and obtain it's path in separate variables. Coupled with 10595# the --with-fop option, it allows maximum flexibilty in making decisions 10596# as whether or not to use the fop package. When DEFAULT is not specified, 10597# --with-fop assumes 'auto'. 10598# 10599# Interface to module: 10600# HAVE_FOP: used in makefiles to conditionally generate documentation 10601# FOP: returns the path of the fop program found 10602# returns the path set by the user in the environment 10603# --with-fop: 'yes' user instructs the module to use fop 10604# 'no' user instructs the module not to use fop 10605# 10606# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10607# 10608AC_DEFUN([XORG_WITH_FOP],[ 10609AC_ARG_VAR([FOP], [Path to fop command]) 10610m4_define([_defopt], m4_default([$2], [auto])) 10611AC_ARG_WITH(fop, 10612 AS_HELP_STRING([--with-fop], 10613 [Use fop to regenerate documentation (default: ]_defopt[)]), 10614 [use_fop=$withval], [use_fop=]_defopt) 10615m4_undefine([_defopt]) 10616 10617if test "x$use_fop" = x"auto"; then 10618 AC_PATH_PROG([FOP], [fop]) 10619 if test "x$FOP" = "x"; then 10620 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10621 have_fop=no 10622 else 10623 have_fop=yes 10624 fi 10625elif test "x$use_fop" = x"yes" ; then 10626 AC_PATH_PROG([FOP], [fop]) 10627 if test "x$FOP" = "x"; then 10628 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10629 fi 10630 have_fop=yes 10631elif test "x$use_fop" = x"no" ; then 10632 if test "x$FOP" != "x"; then 10633 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10634 fi 10635 have_fop=no 10636else 10637 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10638fi 10639 10640# Test for a minimum version of fop, if provided. 10641m4_ifval([$1], 10642[if test "$have_fop" = yes; then 10643 # scrape the fop version 10644 AC_MSG_CHECKING([for fop minimum version]) 10645 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10646 AC_MSG_RESULT([$fop_version]) 10647 AS_VERSION_COMPARE([$fop_version], [$1], 10648 [if test "x$use_fop" = xauto; then 10649 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10650 have_fop=no 10651 else 10652 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10653 fi]) 10654fi]) 10655AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10656]) # XORG_WITH_FOP 10657 10658# XORG_WITH_PS2PDF([DEFAULT]) 10659# ---------------- 10660# Minimum version: 1.6.0 10661# Minimum version for optional DEFAULT argument: 1.11.0 10662# 10663# Documentation tools are not always available on all platforms and sometimes 10664# not at the appropriate level. This macro enables a module to test for the 10665# presence of the tool and obtain it's path in separate variables. Coupled with 10666# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10667# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10668# --with-ps2pdf assumes 'auto'. 10669# 10670# Interface to module: 10671# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10672# PS2PDF: returns the path of the ps2pdf program found 10673# returns the path set by the user in the environment 10674# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10675# 'no' user instructs the module not to use ps2pdf 10676# 10677# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10678# 10679AC_DEFUN([XORG_WITH_PS2PDF],[ 10680AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10681m4_define([_defopt], m4_default([$1], [auto])) 10682AC_ARG_WITH(ps2pdf, 10683 AS_HELP_STRING([--with-ps2pdf], 10684 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10685 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10686m4_undefine([_defopt]) 10687 10688if test "x$use_ps2pdf" = x"auto"; then 10689 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10690 if test "x$PS2PDF" = "x"; then 10691 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10692 have_ps2pdf=no 10693 else 10694 have_ps2pdf=yes 10695 fi 10696elif test "x$use_ps2pdf" = x"yes" ; then 10697 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10698 if test "x$PS2PDF" = "x"; then 10699 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10700 fi 10701 have_ps2pdf=yes 10702elif test "x$use_ps2pdf" = x"no" ; then 10703 if test "x$PS2PDF" != "x"; then 10704 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10705 fi 10706 have_ps2pdf=no 10707else 10708 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10709fi 10710AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10711]) # XORG_WITH_PS2PDF 10712 10713# XORG_ENABLE_DOCS (enable_docs=yes) 10714# ---------------- 10715# Minimum version: 1.6.0 10716# 10717# Documentation tools are not always available on all platforms and sometimes 10718# not at the appropriate level. This macro enables a builder to skip all 10719# documentation targets except traditional man pages. 10720# Combined with the specific tool checking macros XORG_WITH_*, it provides 10721# maximum flexibilty in controlling documentation building. 10722# Refer to: 10723# XORG_WITH_XMLTO --with-xmlto 10724# XORG_WITH_ASCIIDOC --with-asciidoc 10725# XORG_WITH_DOXYGEN --with-doxygen 10726# XORG_WITH_FOP --with-fop 10727# XORG_WITH_GROFF --with-groff 10728# XORG_WITH_PS2PDF --with-ps2pdf 10729# 10730# Interface to module: 10731# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10732# --enable-docs: 'yes' user instructs the module to generate docs 10733# 'no' user instructs the module not to generate docs 10734# parm1: specify the default value, yes or no. 10735# 10736AC_DEFUN([XORG_ENABLE_DOCS],[ 10737m4_define([docs_default], m4_default([$1], [yes])) 10738AC_ARG_ENABLE(docs, 10739 AS_HELP_STRING([--enable-docs], 10740 [Enable building the documentation (default: ]docs_default[)]), 10741 [build_docs=$enableval], [build_docs=]docs_default) 10742m4_undefine([docs_default]) 10743AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10744AC_MSG_CHECKING([whether to build documentation]) 10745AC_MSG_RESULT([$build_docs]) 10746]) # XORG_ENABLE_DOCS 10747 10748# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10749# ---------------- 10750# Minimum version: 1.6.0 10751# 10752# This macro enables a builder to skip all developer documentation. 10753# Combined with the specific tool checking macros XORG_WITH_*, it provides 10754# maximum flexibilty in controlling documentation building. 10755# Refer to: 10756# XORG_WITH_XMLTO --with-xmlto 10757# XORG_WITH_ASCIIDOC --with-asciidoc 10758# XORG_WITH_DOXYGEN --with-doxygen 10759# XORG_WITH_FOP --with-fop 10760# XORG_WITH_GROFF --with-groff 10761# XORG_WITH_PS2PDF --with-ps2pdf 10762# 10763# Interface to module: 10764# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10765# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10766# 'no' user instructs the module not to generate developer docs 10767# parm1: specify the default value, yes or no. 10768# 10769AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10770m4_define([devel_default], m4_default([$1], [yes])) 10771AC_ARG_ENABLE(devel-docs, 10772 AS_HELP_STRING([--enable-devel-docs], 10773 [Enable building the developer documentation (default: ]devel_default[)]), 10774 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10775m4_undefine([devel_default]) 10776AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10777AC_MSG_CHECKING([whether to build developer documentation]) 10778AC_MSG_RESULT([$build_devel_docs]) 10779]) # XORG_ENABLE_DEVEL_DOCS 10780 10781# XORG_ENABLE_SPECS (enable_specs=yes) 10782# ---------------- 10783# Minimum version: 1.6.0 10784# 10785# This macro enables a builder to skip all functional specification targets. 10786# Combined with the specific tool checking macros XORG_WITH_*, it provides 10787# maximum flexibilty in controlling documentation building. 10788# Refer to: 10789# XORG_WITH_XMLTO --with-xmlto 10790# XORG_WITH_ASCIIDOC --with-asciidoc 10791# XORG_WITH_DOXYGEN --with-doxygen 10792# XORG_WITH_FOP --with-fop 10793# XORG_WITH_GROFF --with-groff 10794# XORG_WITH_PS2PDF --with-ps2pdf 10795# 10796# Interface to module: 10797# ENABLE_SPECS: used in makefiles to conditionally generate specs 10798# --enable-specs: 'yes' user instructs the module to generate specs 10799# 'no' user instructs the module not to generate specs 10800# parm1: specify the default value, yes or no. 10801# 10802AC_DEFUN([XORG_ENABLE_SPECS],[ 10803m4_define([spec_default], m4_default([$1], [yes])) 10804AC_ARG_ENABLE(specs, 10805 AS_HELP_STRING([--enable-specs], 10806 [Enable building the specs (default: ]spec_default[)]), 10807 [build_specs=$enableval], [build_specs=]spec_default) 10808m4_undefine([spec_default]) 10809AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10810AC_MSG_CHECKING([whether to build functional specifications]) 10811AC_MSG_RESULT([$build_specs]) 10812]) # XORG_ENABLE_SPECS 10813 10814# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10815# ---------------------------------------------- 10816# Minimum version: 1.13.0 10817# 10818# This macro enables a builder to enable/disable unit testing 10819# It makes no assumption about the test cases implementation 10820# Test cases may or may not use Automake "Support for test suites" 10821# They may or may not use the software utility library GLib 10822# 10823# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10824# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10825# The variable enable_unit_tests is used by other macros in this file. 10826# 10827# Interface to module: 10828# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10829# enable_unit_tests: used in configure.ac for additional configuration 10830# --enable-unit-tests: 'yes' user instructs the module to build tests 10831# 'no' user instructs the module not to build tests 10832# parm1: specify the default value, yes or no. 10833# 10834AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10835AC_BEFORE([$0], [XORG_WITH_GLIB]) 10836AC_BEFORE([$0], [XORG_LD_WRAP]) 10837AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10838m4_define([_defopt], m4_default([$1], [auto])) 10839AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10840 [Enable building unit test cases (default: ]_defopt[)]), 10841 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10842m4_undefine([_defopt]) 10843AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10844AC_MSG_CHECKING([whether to build unit test cases]) 10845AC_MSG_RESULT([$enable_unit_tests]) 10846]) # XORG_ENABLE_UNIT_TESTS 10847 10848# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10849# ------------------------------------------------------ 10850# Minimum version: 1.17.0 10851# 10852# This macro enables a builder to enable/disable integration testing 10853# It makes no assumption about the test cases' implementation 10854# Test cases may or may not use Automake "Support for test suites" 10855# 10856# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10857# usually requires less dependencies and may be built and run under less 10858# stringent environments than integration tests. 10859# 10860# Interface to module: 10861# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10862# enable_integration_tests: used in configure.ac for additional configuration 10863# --enable-integration-tests: 'yes' user instructs the module to build tests 10864# 'no' user instructs the module not to build tests 10865# parm1: specify the default value, yes or no. 10866# 10867AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10868AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10869m4_define([_defopt], m4_default([$1], [auto])) 10870AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10871 [Enable building integration test cases (default: ]_defopt[)]), 10872 [enable_integration_tests=$enableval], 10873 [enable_integration_tests=]_defopt) 10874m4_undefine([_defopt]) 10875AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10876 [test "x$enable_integration_tests" != xno]) 10877AC_MSG_CHECKING([whether to build unit test cases]) 10878AC_MSG_RESULT([$enable_integration_tests]) 10879]) # XORG_ENABLE_INTEGRATION_TESTS 10880 10881# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10882# ---------------------------------------- 10883# Minimum version: 1.13.0 10884# 10885# GLib is a library which provides advanced data structures and functions. 10886# This macro enables a module to test for the presence of Glib. 10887# 10888# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10889# Otherwise the value of $enable_unit_tests is blank. 10890# 10891# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10892# test support usually requires less dependencies and may be built and run under 10893# less stringent environments than integration tests. 10894# 10895# Interface to module: 10896# HAVE_GLIB: used in makefiles to conditionally build targets 10897# with_glib: used in configure.ac to know if GLib has been found 10898# --with-glib: 'yes' user instructs the module to use glib 10899# 'no' user instructs the module not to use glib 10900# 10901AC_DEFUN([XORG_WITH_GLIB],[ 10902AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10903m4_define([_defopt], m4_default([$2], [auto])) 10904AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10905 [Use GLib library for unit testing (default: ]_defopt[)]), 10906 [with_glib=$withval], [with_glib=]_defopt) 10907m4_undefine([_defopt]) 10908 10909have_glib=no 10910# Do not probe GLib if user explicitly disabled unit testing 10911if test "x$enable_unit_tests" != x"no"; then 10912 # Do not probe GLib if user explicitly disabled it 10913 if test "x$with_glib" != x"no"; then 10914 m4_ifval( 10915 [$1], 10916 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10917 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10918 ) 10919 fi 10920fi 10921 10922# Not having GLib when unit testing has been explicitly requested is an error 10923if test "x$enable_unit_tests" = x"yes"; then 10924 if test "x$have_glib" = x"no"; then 10925 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10926 fi 10927fi 10928 10929# Having unit testing disabled when GLib has been explicitly requested is an error 10930if test "x$enable_unit_tests" = x"no"; then 10931 if test "x$with_glib" = x"yes"; then 10932 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10933 fi 10934fi 10935 10936# Not having GLib when it has been explicitly requested is an error 10937if test "x$with_glib" = x"yes"; then 10938 if test "x$have_glib" = x"no"; then 10939 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10940 fi 10941fi 10942 10943AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10944]) # XORG_WITH_GLIB 10945 10946# XORG_LD_WRAP([required|optional]) 10947# --------------------------------- 10948# Minimum version: 1.13.0 10949# 10950# Check if linker supports -wrap, passed via compiler flags 10951# 10952# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10953# Otherwise the value of $enable_unit_tests is blank. 10954# 10955# Argument added in 1.16.0 - default is "required", to match existing behavior 10956# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10957# available, an argument of "optional" allows use when some unit tests require 10958# ld -wrap and others do not. 10959# 10960AC_DEFUN([XORG_LD_WRAP],[ 10961XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10962 [AC_LANG_PROGRAM([#include <stdlib.h> 10963 void __wrap_exit(int status) { return; }], 10964 [exit(0);])]) 10965# Not having ld wrap when unit testing has been explicitly requested is an error 10966if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10967 if test "x$have_ld_wrap" = x"no"; then 10968 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10969 fi 10970fi 10971AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10972# 10973]) # XORG_LD_WRAP 10974 10975# XORG_CHECK_LINKER_FLAGS 10976# ----------------------- 10977# SYNOPSIS 10978# 10979# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10980# 10981# DESCRIPTION 10982# 10983# Check whether the given linker FLAGS work with the current language's 10984# linker, or whether they give an error. 10985# 10986# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10987# success/failure. 10988# 10989# PROGRAM-SOURCE is the program source to link with, if needed 10990# 10991# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10992# 10993# LICENSE 10994# 10995# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10996# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10997# Copyright (c) 2009 Matteo Frigo 10998# 10999# This program is free software: you can redistribute it and/or modify it 11000# under the terms of the GNU General Public License as published by the 11001# Free Software Foundation, either version 3 of the License, or (at your 11002# option) any later version. 11003# 11004# This program is distributed in the hope that it will be useful, but 11005# WITHOUT ANY WARRANTY; without even the implied warranty of 11006# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11007# Public License for more details. 11008# 11009# You should have received a copy of the GNU General Public License along 11010# with this program. If not, see <http://www.gnu.org/licenses/>. 11011# 11012# As a special exception, the respective Autoconf Macro's copyright owner 11013# gives unlimited permission to copy, distribute and modify the configure 11014# scripts that are the output of Autoconf when processing the Macro. You 11015# need not follow the terms of the GNU General Public License when using 11016# or distributing such scripts, even though portions of the text of the 11017# Macro appear in them. The GNU General Public License (GPL) does govern 11018# all other use of the material that constitutes the Autoconf Macro. 11019# 11020# This special exception to the GPL applies to versions of the Autoconf 11021# Macro released by the Autoconf Archive. When you make and distribute a 11022# modified version of the Autoconf Macro, you may extend this special 11023# exception to the GPL to apply to your modified version as well.# 11024AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11025[AC_MSG_CHECKING([whether the linker accepts $1]) 11026dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11027AS_LITERAL_IF([$1], 11028 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11029 ax_save_FLAGS=$LDFLAGS 11030 LDFLAGS="$1" 11031 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11032 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11033 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11034 LDFLAGS=$ax_save_FLAGS])], 11035 [ax_save_FLAGS=$LDFLAGS 11036 LDFLAGS="$1" 11037 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11038 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11039 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11040 LDFLAGS=$ax_save_FLAGS]) 11041eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11042AC_MSG_RESULT($xorg_check_linker_flags) 11043if test "x$xorg_check_linker_flags" = xyes; then 11044 m4_default([$2], :) 11045else 11046 m4_default([$3], :) 11047fi 11048]) # XORG_CHECK_LINKER_FLAGS 11049 11050# XORG_MEMORY_CHECK_FLAGS 11051# ----------------------- 11052# Minimum version: 1.16.0 11053# 11054# This macro attempts to find appropriate memory checking functionality 11055# for various platforms which unit testing code may use to catch various 11056# forms of memory allocation and access errors in testing. 11057# 11058# Interface to module: 11059# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11060# Usually added to TESTS_ENVIRONMENT in Makefile.am 11061# 11062# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11063# 11064AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11065 11066AC_REQUIRE([AC_CANONICAL_HOST]) 11067AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11068 [Environment variables to enable memory checking in tests]) 11069 11070# Check for different types of support on different platforms 11071case $host_os in 11072 solaris*) 11073 AC_CHECK_LIB([umem], [umem_alloc], 11074 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11075 ;; 11076 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11077 # both directly and inverted, so should not be 0 or 255. 11078 malloc_debug_env='MALLOC_PERTURB_=15' 11079 ;; 11080 darwin*) 11081 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11082 ;; 11083 *bsd*) 11084 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11085 ;; 11086esac 11087 11088# User supplied flags override default flags 11089if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11090 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11091fi 11092 11093AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11094]) # XORG_WITH_LINT 11095 11096# XORG_CHECK_MALLOC_ZERO 11097# ---------------------- 11098# Minimum version: 1.0.0 11099# 11100# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11101# malloc(0) returns NULL. Packages should add one of these cflags to 11102# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11103AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11104AC_ARG_ENABLE(malloc0returnsnull, 11105 AS_HELP_STRING([--enable-malloc0returnsnull], 11106 [malloc(0) returns NULL (default: auto)]), 11107 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11108 [MALLOC_ZERO_RETURNS_NULL=auto]) 11109 11110AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11111if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11112 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11113#include <stdlib.h> 11114],[ 11115 char *m0, *r0, *c0, *p; 11116 m0 = malloc(0); 11117 p = malloc(10); 11118 r0 = realloc(p,0); 11119 c0 = calloc(0,10); 11120 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11121])], 11122 [MALLOC_ZERO_RETURNS_NULL=yes], 11123 [MALLOC_ZERO_RETURNS_NULL=no], 11124 [MALLOC_ZERO_RETURNS_NULL=yes]) 11125fi 11126AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11127 11128if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11129 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11130 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11131 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11132else 11133 MALLOC_ZERO_CFLAGS="" 11134 XMALLOC_ZERO_CFLAGS="" 11135 XTMALLOC_ZERO_CFLAGS="" 11136fi 11137 11138AC_SUBST([MALLOC_ZERO_CFLAGS]) 11139AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11140AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11141]) # XORG_CHECK_MALLOC_ZERO 11142 11143# XORG_WITH_LINT() 11144# ---------------- 11145# Minimum version: 1.1.0 11146# 11147# This macro enables the use of a tool that flags some suspicious and 11148# non-portable constructs (likely to be bugs) in C language source code. 11149# It will attempt to locate the tool and use appropriate options. 11150# There are various lint type tools on different platforms. 11151# 11152# Interface to module: 11153# LINT: returns the path to the tool found on the platform 11154# or the value set to LINT on the configure cmd line 11155# also an Automake conditional 11156# LINT_FLAGS: an Automake variable with appropriate flags 11157# 11158# --with-lint: 'yes' user instructs the module to use lint 11159# 'no' user instructs the module not to use lint (default) 11160# 11161# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11162# If the user sets the value of LINT_FLAGS, they are used verbatim. 11163# 11164AC_DEFUN([XORG_WITH_LINT],[ 11165 11166AC_ARG_VAR([LINT], [Path to a lint-style command]) 11167AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11168AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11169 [Use a lint-style source code checker (default: disabled)])], 11170 [use_lint=$withval], [use_lint=no]) 11171 11172# Obtain platform specific info like program name and options 11173# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11174case $host_os in 11175 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11176 lint_name=splint 11177 lint_options="-badflag" 11178 ;; 11179 *freebsd* | *netbsd*) 11180 lint_name=lint 11181 lint_options="-u -b" 11182 ;; 11183 *solaris*) 11184 lint_name=lint 11185 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11186 ;; 11187esac 11188 11189# Test for the presence of the program (either guessed by the code or spelled out by the user) 11190if test "x$use_lint" = x"yes" ; then 11191 AC_PATH_PROG([LINT], [$lint_name]) 11192 if test "x$LINT" = "x"; then 11193 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11194 fi 11195elif test "x$use_lint" = x"no" ; then 11196 if test "x$LINT" != "x"; then 11197 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11198 fi 11199else 11200 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11201fi 11202 11203# User supplied flags override default flags 11204if test "x$LINT_FLAGS" != "x"; then 11205 lint_options=$LINT_FLAGS 11206fi 11207 11208AC_SUBST([LINT_FLAGS],[$lint_options]) 11209AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11210 11211]) # XORG_WITH_LINT 11212 11213# XORG_LINT_LIBRARY(LIBNAME) 11214# -------------------------- 11215# Minimum version: 1.1.0 11216# 11217# Sets up flags for building lint libraries for checking programs that call 11218# functions in the library. 11219# 11220# Interface to module: 11221# LINTLIB - Automake variable with the name of lint library file to make 11222# MAKE_LINT_LIB - Automake conditional 11223# 11224# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11225# - 'no' user instructs the module not to create a lint library (default) 11226 11227AC_DEFUN([XORG_LINT_LIBRARY],[ 11228AC_REQUIRE([XORG_WITH_LINT]) 11229AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11230 [Create lint library (default: disabled)])], 11231 [make_lint_lib=$enableval], [make_lint_lib=no]) 11232 11233if test "x$make_lint_lib" = x"yes" ; then 11234 LINTLIB=llib-l$1.ln 11235 if test "x$LINT" = "x"; then 11236 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11237 fi 11238elif test "x$make_lint_lib" != x"no" ; then 11239 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11240fi 11241 11242AC_SUBST(LINTLIB) 11243AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11244 11245]) # XORG_LINT_LIBRARY 11246 11247# XORG_COMPILER_BRAND 11248# ------------------- 11249# Minimum version: 1.14.0 11250# 11251# Checks for various brands of compilers and sets flags as appropriate: 11252# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11253# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11254# clang compiler - sets CLANGCC to "yes" 11255# Intel compiler - sets INTELCC to "yes" 11256# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11257# 11258AC_DEFUN([XORG_COMPILER_BRAND], [ 11259AC_LANG_CASE( 11260 [C], [ 11261 AC_REQUIRE([AC_PROG_CC_C99]) 11262 ], 11263 [C++], [ 11264 AC_REQUIRE([AC_PROG_CXX]) 11265 ] 11266) 11267AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11268AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11269AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11270]) # XORG_COMPILER_BRAND 11271 11272# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11273# --------------- 11274# Minimum version: 1.16.0 11275# 11276# Test if the compiler works when passed the given flag as a command line argument. 11277# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11278# next flag in the list until there are no more options. 11279# 11280# Note that this does not guarantee that the compiler supports the flag as some 11281# compilers will simply ignore arguments that they do not understand, but we do 11282# attempt to weed out false positives by using -Werror=unknown-warning-option and 11283# -Werror=unused-command-line-argument 11284# 11285AC_DEFUN([XORG_TESTSET_CFLAG], [ 11286m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11287m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11288 11289AC_LANG_COMPILER_REQUIRE 11290 11291AC_LANG_CASE( 11292 [C], [ 11293 AC_REQUIRE([AC_PROG_CC_C99]) 11294 define([PREFIX], [C]) 11295 define([CACHE_PREFIX], [cc]) 11296 define([COMPILER], [$CC]) 11297 ], 11298 [C++], [ 11299 define([PREFIX], [CXX]) 11300 define([CACHE_PREFIX], [cxx]) 11301 define([COMPILER], [$CXX]) 11302 ] 11303) 11304 11305[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11306 11307if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11308 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11309 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11310 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11311 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11312 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11313 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11314 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11315 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11316fi 11317 11318if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11319 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11320 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11321 fi 11322 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11323 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11324 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11325 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11326 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11327 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11328 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11329 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11330fi 11331 11332found="no" 11333m4_foreach([flag], m4_cdr($@), [ 11334 if test $found = "no" ; then 11335 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 11336 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11337 fi 11338 11339 if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 11340 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11341 fi 11342 11343 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11344 11345dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11346 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11347 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11348 AC_CACHE_VAL($cacheid, 11349 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11350 [eval $cacheid=yes], 11351 [eval $cacheid=no])]) 11352 11353 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11354 11355 eval supported=\$$cacheid 11356 AC_MSG_RESULT([$supported]) 11357 if test "$supported" = "yes" ; then 11358 $1="$$1 ]flag[" 11359 found="yes" 11360 fi 11361 fi 11362]) 11363]) # XORG_TESTSET_CFLAG 11364 11365# XORG_COMPILER_FLAGS 11366# --------------- 11367# Minimum version: 1.16.0 11368# 11369# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11370# arguments supported by the selected compiler which do NOT alter the generated 11371# code. These arguments will cause the compiler to print various warnings 11372# during compilation AND turn a conservative set of warnings into errors. 11373# 11374# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11375# future versions of util-macros as options are added to new compilers. 11376# 11377AC_DEFUN([XORG_COMPILER_FLAGS], [ 11378AC_REQUIRE([XORG_COMPILER_BRAND]) 11379 11380AC_ARG_ENABLE(selective-werror, 11381 AS_HELP_STRING([--disable-selective-werror], 11382 [Turn off selective compiler errors. (default: enabled)]), 11383 [SELECTIVE_WERROR=$enableval], 11384 [SELECTIVE_WERROR=yes]) 11385 11386AC_LANG_CASE( 11387 [C], [ 11388 define([PREFIX], [C]) 11389 ], 11390 [C++], [ 11391 define([PREFIX], [CXX]) 11392 ] 11393) 11394# -v is too short to test reliably with XORG_TESTSET_CFLAG 11395if test "x$SUNCC" = "xyes"; then 11396 [BASE_]PREFIX[FLAGS]="-v" 11397else 11398 [BASE_]PREFIX[FLAGS]="" 11399fi 11400 11401# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11402XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11403XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11404XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11405XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11406 11407AC_LANG_CASE( 11408 [C], [ 11409 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11410 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11411 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11412 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11413 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 11414 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11415 ] 11416) 11417 11418# This chunk adds additional warnings that could catch undesired effects. 11419XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11420XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11421XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11422XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11423XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11424XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11425XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11426 11427# These are currently disabled because they are noisy. They will be enabled 11428# in the future once the codebase is sufficiently modernized to silence 11429# them. For now, I don't want them to drown out the other warnings. 11430# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11431# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11432# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11433 11434# Turn some warnings into errors, so we don't accidently get successful builds 11435# when there are problems that should be fixed. 11436 11437if test "x$SELECTIVE_WERROR" = "xyes" ; then 11438XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11439XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11440XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11441XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11442XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11443XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11444XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11445XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11446XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11447XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11448XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11449XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11450XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11451else 11452AC_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]) 11453XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11454XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11455XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11456XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11457XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11458XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11459XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11460XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11461XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11462XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11463XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11464XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11465XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11466fi 11467 11468AC_SUBST([BASE_]PREFIX[FLAGS]) 11469]) # XORG_COMPILER_FLAGS 11470 11471# XORG_CWARNFLAGS 11472# --------------- 11473# Minimum version: 1.2.0 11474# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11475# 11476# Defines CWARNFLAGS to enable C compiler warnings. 11477# 11478# This function is deprecated because it defines -fno-strict-aliasing 11479# which alters the code generated by the compiler. If -fno-strict-aliasing 11480# is needed, then it should be added explicitly in the module when 11481# it is updated to use BASE_CFLAGS. 11482# 11483AC_DEFUN([XORG_CWARNFLAGS], [ 11484AC_REQUIRE([XORG_COMPILER_FLAGS]) 11485AC_REQUIRE([XORG_COMPILER_BRAND]) 11486AC_LANG_CASE( 11487 [C], [ 11488 CWARNFLAGS="$BASE_CFLAGS" 11489 if test "x$GCC" = xyes ; then 11490 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11491 fi 11492 AC_SUBST(CWARNFLAGS) 11493 ] 11494) 11495]) # XORG_CWARNFLAGS 11496 11497# XORG_STRICT_OPTION 11498# ----------------------- 11499# Minimum version: 1.3.0 11500# 11501# Add configure option to enable strict compilation flags, such as treating 11502# warnings as fatal errors. 11503# If --enable-strict-compilation is passed to configure, adds strict flags to 11504# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11505# 11506# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11507# when strict compilation is unconditionally desired. 11508AC_DEFUN([XORG_STRICT_OPTION], [ 11509AC_REQUIRE([XORG_CWARNFLAGS]) 11510AC_REQUIRE([XORG_COMPILER_FLAGS]) 11511 11512AC_ARG_ENABLE(strict-compilation, 11513 AS_HELP_STRING([--enable-strict-compilation], 11514 [Enable all warnings from compiler and make them errors (default: disabled)]), 11515 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11516 11517AC_LANG_CASE( 11518 [C], [ 11519 define([PREFIX], [C]) 11520 ], 11521 [C++], [ 11522 define([PREFIX], [CXX]) 11523 ] 11524) 11525 11526[STRICT_]PREFIX[FLAGS]="" 11527XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11528XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11529 11530# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11531# activate it with -Werror, so we add it here explicitly. 11532XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11533 11534if test "x$STRICT_COMPILE" = "xyes"; then 11535 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11536 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11537fi 11538AC_SUBST([STRICT_]PREFIX[FLAGS]) 11539AC_SUBST([BASE_]PREFIX[FLAGS]) 11540AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11541]) # XORG_STRICT_OPTION 11542 11543# XORG_DEFAULT_OPTIONS 11544# -------------------- 11545# Minimum version: 1.3.0 11546# 11547# Defines default options for X.Org modules. 11548# 11549AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11550AC_REQUIRE([AC_PROG_INSTALL]) 11551XORG_COMPILER_FLAGS 11552XORG_CWARNFLAGS 11553XORG_STRICT_OPTION 11554XORG_RELEASE_VERSION 11555XORG_CHANGELOG 11556XORG_INSTALL 11557XORG_MANPAGE_SECTIONS 11558m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11559 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11560]) # XORG_DEFAULT_OPTIONS 11561 11562# XORG_INSTALL() 11563# ---------------- 11564# Minimum version: 1.4.0 11565# 11566# Defines the variable INSTALL_CMD as the command to copy 11567# INSTALL from $prefix/share/util-macros. 11568# 11569AC_DEFUN([XORG_INSTALL], [ 11570AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11571macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11572INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11573mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11574|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11575echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11576AC_SUBST([INSTALL_CMD]) 11577]) # XORG_INSTALL 11578dnl Copyright 2005 Red Hat, Inc 11579dnl 11580dnl Permission to use, copy, modify, distribute, and sell this software and its 11581dnl documentation for any purpose is hereby granted without fee, provided that 11582dnl the above copyright notice appear in all copies and that both that 11583dnl copyright notice and this permission notice appear in supporting 11584dnl documentation. 11585dnl 11586dnl The above copyright notice and this permission notice shall be included 11587dnl in all copies or substantial portions of the Software. 11588dnl 11589dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11590dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11591dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11592dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11593dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11594dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11595dnl OTHER DEALINGS IN THE SOFTWARE. 11596dnl 11597dnl Except as contained in this notice, the name of the copyright holders shall 11598dnl not be used in advertising or otherwise to promote the sale, use or 11599dnl other dealings in this Software without prior written authorization 11600dnl from the copyright holders. 11601dnl 11602 11603# XORG_RELEASE_VERSION 11604# -------------------- 11605# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11606 11607AC_DEFUN([XORG_RELEASE_VERSION],[ 11608 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11609 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11610 [Major version of this package]) 11611 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11612 if test "x$PVM" = "x"; then 11613 PVM="0" 11614 fi 11615 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11616 [$PVM], 11617 [Minor version of this package]) 11618 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11619 if test "x$PVP" = "x"; then 11620 PVP="0" 11621 fi 11622 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11623 [$PVP], 11624 [Patch version of this package]) 11625]) 11626 11627# XORG_CHANGELOG() 11628# ---------------- 11629# Minimum version: 1.2.0 11630# 11631# Defines the variable CHANGELOG_CMD as the command to generate 11632# ChangeLog from git. 11633# 11634# 11635AC_DEFUN([XORG_CHANGELOG], [ 11636CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11637mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11638|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11639echo 'git directory not found: installing possibly empty changelog.' >&2)" 11640AC_SUBST([CHANGELOG_CMD]) 11641]) # XORG_CHANGELOG 11642 11643