aclocal.m4 revision c889a3bf
1# generated automatically by aclocal 1.14 -*- 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.68],, 18[m4_warning([this file was generated for autoconf 2.68. 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.14' 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.14], [], 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.14])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 421dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 422m4_define([AC_PROG_CC], 423m4_defn([AC_PROG_CC]) 424[_AM_PROG_CC_C_O 425]) 426 427# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 428# AM_INIT_AUTOMAKE([OPTIONS]) 429# ----------------------------------------------- 430# The call with PACKAGE and VERSION arguments is the old style 431# call (pre autoconf-2.50), which is being phased out. PACKAGE 432# and VERSION should now be passed to AC_INIT and removed from 433# the call to AM_INIT_AUTOMAKE. 434# We support both call styles for the transition. After 435# the next Automake release, Autoconf can make the AC_INIT 436# arguments mandatory, and then we can depend on a new Autoconf 437# release and drop the old call support. 438AC_DEFUN([AM_INIT_AUTOMAKE], 439[AC_PREREQ([2.65])dnl 440dnl Autoconf wants to disallow AM_ names. We explicitly allow 441dnl the ones we care about. 442m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 443AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 444AC_REQUIRE([AC_PROG_INSTALL])dnl 445if test "`cd $srcdir && pwd`" != "`pwd`"; then 446 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 447 # is not polluted with repeated "-I." 448 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 449 # test to see if srcdir already configured 450 if test -f $srcdir/config.status; then 451 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 452 fi 453fi 454 455# test whether we have cygpath 456if test -z "$CYGPATH_W"; then 457 if (cygpath --version) >/dev/null 2>/dev/null; then 458 CYGPATH_W='cygpath -w' 459 else 460 CYGPATH_W=echo 461 fi 462fi 463AC_SUBST([CYGPATH_W]) 464 465# Define the identity of the package. 466dnl Distinguish between old-style and new-style calls. 467m4_ifval([$2], 468[AC_DIAGNOSE([obsolete], 469 [$0: two- and three-arguments forms are deprecated.]) 470m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 471 AC_SUBST([PACKAGE], [$1])dnl 472 AC_SUBST([VERSION], [$2])], 473[_AM_SET_OPTIONS([$1])dnl 474dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 475m4_if( 476 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 477 [ok:ok],, 478 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 479 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 480 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 481 482_AM_IF_OPTION([no-define],, 483[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 484 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 485 486# Some tools Automake needs. 487AC_REQUIRE([AM_SANITY_CHECK])dnl 488AC_REQUIRE([AC_ARG_PROGRAM])dnl 489AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 490AM_MISSING_PROG([AUTOCONF], [autoconf]) 491AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 492AM_MISSING_PROG([AUTOHEADER], [autoheader]) 493AM_MISSING_PROG([MAKEINFO], [makeinfo]) 494AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 495AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 496AC_REQUIRE([AC_PROG_MKDIR_P])dnl 497# For better backward compatibility. To be removed once Automake 1.9.x 498# dies out for good. For more background, see: 499# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 500# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 501AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 502# We need awk for the "check" target. The system "awk" is bad on 503# some platforms. 504AC_REQUIRE([AC_PROG_AWK])dnl 505AC_REQUIRE([AC_PROG_MAKE_SET])dnl 506AC_REQUIRE([AM_SET_LEADING_DOT])dnl 507_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 508 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 509 [_AM_PROG_TAR([v7])])]) 510_AM_IF_OPTION([no-dependencies],, 511[AC_PROVIDE_IFELSE([AC_PROG_CC], 512 [_AM_DEPENDENCIES([CC])], 513 [m4_define([AC_PROG_CC], 514 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 515AC_PROVIDE_IFELSE([AC_PROG_CXX], 516 [_AM_DEPENDENCIES([CXX])], 517 [m4_define([AC_PROG_CXX], 518 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 519AC_PROVIDE_IFELSE([AC_PROG_OBJC], 520 [_AM_DEPENDENCIES([OBJC])], 521 [m4_define([AC_PROG_OBJC], 522 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 523AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 524 [_AM_DEPENDENCIES([OBJCXX])], 525 [m4_define([AC_PROG_OBJCXX], 526 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 527]) 528AC_REQUIRE([AM_SILENT_RULES])dnl 529dnl The testsuite driver may need to know about EXEEXT, so add the 530dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 531dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 532AC_CONFIG_COMMANDS_PRE(dnl 533[m4_provide_if([_AM_COMPILER_EXEEXT], 534 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 535 536# POSIX will say in a future version that running "rm -f" with no argument 537# is OK; and we want to be able to make that assumption in our Makefile 538# recipes. So use an aggressive probe to check that the usage we want is 539# actually supported "in the wild" to an acceptable degree. 540# See automake bug#10828. 541# To make any issue more visible, cause the running configure to be aborted 542# by default if the 'rm' program in use doesn't match our expectations; the 543# user can still override this though. 544if rm -f && rm -fr && rm -rf; then : OK; else 545 cat >&2 <<'END' 546Oops! 547 548Your 'rm' program seems unable to run without file operands specified 549on the command line, even when the '-f' option is present. This is contrary 550to the behaviour of most rm programs out there, and not conforming with 551the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 552 553Please tell bug-automake@gnu.org about your system, including the value 554of your $PATH and any error possibly output before this message. This 555can help us improve future automake versions. 556 557END 558 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 559 echo 'Configuration will proceed anyway, since you have set the' >&2 560 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 561 echo >&2 562 else 563 cat >&2 <<'END' 564Aborting the configuration process, to ensure you take notice of the issue. 565 566You can download and install GNU coreutils to get an 'rm' implementation 567that behaves properly: <http://www.gnu.org/software/coreutils/>. 568 569If you want to complete the configuration process using your problematic 570'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 571to "yes", and re-run configure. 572 573END 574 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 575 fi 576fi]) 577 578dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 579dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 580dnl mangled by Autoconf and run in a shell conditional statement. 581m4_define([_AC_COMPILER_EXEEXT], 582m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 583 584# When config.status generates a header, we must update the stamp-h file. 585# This file resides in the same directory as the config header 586# that is generated. The stamp files are numbered to have different names. 587 588# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 589# loop where config.status creates the headers, so we can generate 590# our stamp files there. 591AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 592[# Compute $1's index in $config_headers. 593_am_arg=$1 594_am_stamp_count=1 595for _am_header in $config_headers :; do 596 case $_am_header in 597 $_am_arg | $_am_arg:* ) 598 break ;; 599 * ) 600 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 601 esac 602done 603echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 604 605# Copyright (C) 2001-2013 Free Software Foundation, Inc. 606# 607# This file is free software; the Free Software Foundation 608# gives unlimited permission to copy and/or distribute it, 609# with or without modifications, as long as this notice is preserved. 610 611# AM_PROG_INSTALL_SH 612# ------------------ 613# Define $install_sh. 614AC_DEFUN([AM_PROG_INSTALL_SH], 615[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 616if test x"${install_sh}" != xset; then 617 case $am_aux_dir in 618 *\ * | *\ *) 619 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 620 *) 621 install_sh="\${SHELL} $am_aux_dir/install-sh" 622 esac 623fi 624AC_SUBST([install_sh])]) 625 626# Copyright (C) 2003-2013 Free Software Foundation, Inc. 627# 628# This file is free software; the Free Software Foundation 629# gives unlimited permission to copy and/or distribute it, 630# with or without modifications, as long as this notice is preserved. 631 632# Check whether the underlying file-system supports filenames 633# with a leading dot. For instance MS-DOS doesn't. 634AC_DEFUN([AM_SET_LEADING_DOT], 635[rm -rf .tst 2>/dev/null 636mkdir .tst 2>/dev/null 637if test -d .tst; then 638 am__leading_dot=. 639else 640 am__leading_dot=_ 641fi 642rmdir .tst 2>/dev/null 643AC_SUBST([am__leading_dot])]) 644 645# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 646# From Jim Meyering 647 648# Copyright (C) 1996-2013 Free Software Foundation, Inc. 649# 650# This file is free software; the Free Software Foundation 651# gives unlimited permission to copy and/or distribute it, 652# with or without modifications, as long as this notice is preserved. 653 654# AM_MAINTAINER_MODE([DEFAULT-MODE]) 655# ---------------------------------- 656# Control maintainer-specific portions of Makefiles. 657# Default is to disable them, unless 'enable' is passed literally. 658# For symmetry, 'disable' may be passed as well. Anyway, the user 659# can override the default with the --enable/--disable switch. 660AC_DEFUN([AM_MAINTAINER_MODE], 661[m4_case(m4_default([$1], [disable]), 662 [enable], [m4_define([am_maintainer_other], [disable])], 663 [disable], [m4_define([am_maintainer_other], [enable])], 664 [m4_define([am_maintainer_other], [enable]) 665 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 666AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 667 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 668 AC_ARG_ENABLE([maintainer-mode], 669 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 670 am_maintainer_other[ make rules and dependencies not useful 671 (and sometimes confusing) to the casual installer])], 672 [USE_MAINTAINER_MODE=$enableval], 673 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 674 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 675 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 676 MAINT=$MAINTAINER_MODE_TRUE 677 AC_SUBST([MAINT])dnl 678] 679) 680 681# Check to see how 'make' treats includes. -*- Autoconf -*- 682 683# Copyright (C) 2001-2013 Free Software Foundation, Inc. 684# 685# This file is free software; the Free Software Foundation 686# gives unlimited permission to copy and/or distribute it, 687# with or without modifications, as long as this notice is preserved. 688 689# AM_MAKE_INCLUDE() 690# ----------------- 691# Check to see how make treats includes. 692AC_DEFUN([AM_MAKE_INCLUDE], 693[am_make=${MAKE-make} 694cat > confinc << 'END' 695am__doit: 696 @echo this is the am__doit target 697.PHONY: am__doit 698END 699# If we don't find an include directive, just comment out the code. 700AC_MSG_CHECKING([for style of include used by $am_make]) 701am__include="#" 702am__quote= 703_am_result=none 704# First try GNU make style include. 705echo "include confinc" > confmf 706# Ignore all kinds of additional output from 'make'. 707case `$am_make -s -f confmf 2> /dev/null` in #( 708*the\ am__doit\ target*) 709 am__include=include 710 am__quote= 711 _am_result=GNU 712 ;; 713esac 714# Now try BSD make style include. 715if test "$am__include" = "#"; then 716 echo '.include "confinc"' > confmf 717 case `$am_make -s -f confmf 2> /dev/null` in #( 718 *the\ am__doit\ target*) 719 am__include=.include 720 am__quote="\"" 721 _am_result=BSD 722 ;; 723 esac 724fi 725AC_SUBST([am__include]) 726AC_SUBST([am__quote]) 727AC_MSG_RESULT([$_am_result]) 728rm -f confinc confmf 729]) 730 731# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 732 733# Copyright (C) 1997-2013 Free Software Foundation, Inc. 734# 735# This file is free software; the Free Software Foundation 736# gives unlimited permission to copy and/or distribute it, 737# with or without modifications, as long as this notice is preserved. 738 739# AM_MISSING_PROG(NAME, PROGRAM) 740# ------------------------------ 741AC_DEFUN([AM_MISSING_PROG], 742[AC_REQUIRE([AM_MISSING_HAS_RUN]) 743$1=${$1-"${am_missing_run}$2"} 744AC_SUBST($1)]) 745 746# AM_MISSING_HAS_RUN 747# ------------------ 748# Define MISSING if not defined so far and test if it is modern enough. 749# If it is, set am_missing_run to use it, otherwise, to nothing. 750AC_DEFUN([AM_MISSING_HAS_RUN], 751[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 752AC_REQUIRE_AUX_FILE([missing])dnl 753if test x"${MISSING+set}" != xset; then 754 case $am_aux_dir in 755 *\ * | *\ *) 756 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 757 *) 758 MISSING="\${SHELL} $am_aux_dir/missing" ;; 759 esac 760fi 761# Use eval to expand $SHELL 762if eval "$MISSING --is-lightweight"; then 763 am_missing_run="$MISSING " 764else 765 am_missing_run= 766 AC_MSG_WARN(['missing' script is too old or missing]) 767fi 768]) 769 770# Helper functions for option handling. -*- Autoconf -*- 771 772# Copyright (C) 2001-2013 Free Software Foundation, Inc. 773# 774# This file is free software; the Free Software Foundation 775# gives unlimited permission to copy and/or distribute it, 776# with or without modifications, as long as this notice is preserved. 777 778# _AM_MANGLE_OPTION(NAME) 779# ----------------------- 780AC_DEFUN([_AM_MANGLE_OPTION], 781[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 782 783# _AM_SET_OPTION(NAME) 784# -------------------- 785# Set option NAME. Presently that only means defining a flag for this option. 786AC_DEFUN([_AM_SET_OPTION], 787[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 788 789# _AM_SET_OPTIONS(OPTIONS) 790# ------------------------ 791# OPTIONS is a space-separated list of Automake options. 792AC_DEFUN([_AM_SET_OPTIONS], 793[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 794 795# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 796# ------------------------------------------- 797# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 798AC_DEFUN([_AM_IF_OPTION], 799[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 800 801# Copyright (C) 1999-2013 Free Software Foundation, Inc. 802# 803# This file is free software; the Free Software Foundation 804# gives unlimited permission to copy and/or distribute it, 805# with or without modifications, as long as this notice is preserved. 806 807# _AM_PROG_CC_C_O 808# --------------- 809# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 810# to automatically call this. 811AC_DEFUN([_AM_PROG_CC_C_O], 812[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 813AC_REQUIRE_AUX_FILE([compile])dnl 814AC_LANG_PUSH([C])dnl 815AC_CACHE_CHECK( 816 [whether $CC understands -c and -o together], 817 [am_cv_prog_cc_c_o], 818 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 819 # Make sure it works both with $CC and with simple cc. 820 # Following AC_PROG_CC_C_O, we do the test twice because some 821 # compilers refuse to overwrite an existing .o file with -o, 822 # though they will create one. 823 am_cv_prog_cc_c_o=yes 824 for am_i in 1 2; do 825 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 826 && test -f conftest2.$ac_objext; then 827 : OK 828 else 829 am_cv_prog_cc_c_o=no 830 break 831 fi 832 done 833 rm -f core conftest* 834 unset am_i]) 835if test "$am_cv_prog_cc_c_o" != yes; then 836 # Losing compiler, so override with the script. 837 # FIXME: It is wrong to rewrite CC. 838 # But if we don't then we get into trouble of one sort or another. 839 # A longer-term fix would be to have automake use am__CC in this case, 840 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 841 CC="$am_aux_dir/compile $CC" 842fi 843AC_LANG_POP([C])]) 844 845# For backward compatibility. 846AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 847 848# Copyright (C) 2001-2013 Free Software Foundation, Inc. 849# 850# This file is free software; the Free Software Foundation 851# gives unlimited permission to copy and/or distribute it, 852# with or without modifications, as long as this notice is preserved. 853 854# AM_RUN_LOG(COMMAND) 855# ------------------- 856# Run COMMAND, save the exit status in ac_status, and log it. 857# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 858AC_DEFUN([AM_RUN_LOG], 859[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 860 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 861 ac_status=$? 862 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 863 (exit $ac_status); }]) 864 865# Check to make sure that the build environment is sane. -*- Autoconf -*- 866 867# Copyright (C) 1996-2013 Free Software Foundation, Inc. 868# 869# This file is free software; the Free Software Foundation 870# gives unlimited permission to copy and/or distribute it, 871# with or without modifications, as long as this notice is preserved. 872 873# AM_SANITY_CHECK 874# --------------- 875AC_DEFUN([AM_SANITY_CHECK], 876[AC_MSG_CHECKING([whether build environment is sane]) 877# Reject unsafe characters in $srcdir or the absolute working directory 878# name. Accept space and tab only in the latter. 879am_lf=' 880' 881case `pwd` in 882 *[[\\\"\#\$\&\'\`$am_lf]]*) 883 AC_MSG_ERROR([unsafe absolute working directory name]);; 884esac 885case $srcdir in 886 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 887 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 888esac 889 890# Do 'set' in a subshell so we don't clobber the current shell's 891# arguments. Must try -L first in case configure is actually a 892# symlink; some systems play weird games with the mod time of symlinks 893# (eg FreeBSD returns the mod time of the symlink's containing 894# directory). 895if ( 896 am_has_slept=no 897 for am_try in 1 2; do 898 echo "timestamp, slept: $am_has_slept" > conftest.file 899 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 900 if test "$[*]" = "X"; then 901 # -L didn't work. 902 set X `ls -t "$srcdir/configure" conftest.file` 903 fi 904 if test "$[*]" != "X $srcdir/configure conftest.file" \ 905 && test "$[*]" != "X conftest.file $srcdir/configure"; then 906 907 # If neither matched, then we have a broken ls. This can happen 908 # if, for instance, CONFIG_SHELL is bash and it inherits a 909 # broken ls alias from the environment. This has actually 910 # happened. Such a system could not be considered "sane". 911 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 912 alias in your environment]) 913 fi 914 if test "$[2]" = conftest.file || test $am_try -eq 2; then 915 break 916 fi 917 # Just in case. 918 sleep 1 919 am_has_slept=yes 920 done 921 test "$[2]" = conftest.file 922 ) 923then 924 # Ok. 925 : 926else 927 AC_MSG_ERROR([newly created file is older than distributed files! 928Check your system clock]) 929fi 930AC_MSG_RESULT([yes]) 931# If we didn't sleep, we still need to ensure time stamps of config.status and 932# generated files are strictly newer. 933am_sleep_pid= 934if grep 'slept: no' conftest.file >/dev/null 2>&1; then 935 ( sleep 1 ) & 936 am_sleep_pid=$! 937fi 938AC_CONFIG_COMMANDS_PRE( 939 [AC_MSG_CHECKING([that generated files are newer than configure]) 940 if test -n "$am_sleep_pid"; then 941 # Hide warnings about reused PIDs. 942 wait $am_sleep_pid 2>/dev/null 943 fi 944 AC_MSG_RESULT([done])]) 945rm -f conftest.file 946]) 947 948# Copyright (C) 2009-2013 Free Software Foundation, Inc. 949# 950# This file is free software; the Free Software Foundation 951# gives unlimited permission to copy and/or distribute it, 952# with or without modifications, as long as this notice is preserved. 953 954# AM_SILENT_RULES([DEFAULT]) 955# -------------------------- 956# Enable less verbose build rules; with the default set to DEFAULT 957# ("yes" being less verbose, "no" or empty being verbose). 958AC_DEFUN([AM_SILENT_RULES], 959[AC_ARG_ENABLE([silent-rules], [dnl 960AS_HELP_STRING( 961 [--enable-silent-rules], 962 [less verbose build output (undo: "make V=1")]) 963AS_HELP_STRING( 964 [--disable-silent-rules], 965 [verbose build output (undo: "make V=0")])dnl 966]) 967case $enable_silent_rules in @%:@ ((( 968 yes) AM_DEFAULT_VERBOSITY=0;; 969 no) AM_DEFAULT_VERBOSITY=1;; 970 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 971esac 972dnl 973dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 974dnl do not support nested variable expansions. 975dnl See automake bug#9928 and bug#10237. 976am_make=${MAKE-make} 977AC_CACHE_CHECK([whether $am_make supports nested variables], 978 [am_cv_make_support_nested_variables], 979 [if AS_ECHO([['TRUE=$(BAR$(V)) 980BAR0=false 981BAR1=true 982V=1 983am__doit: 984 @$(TRUE) 985.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 986 am_cv_make_support_nested_variables=yes 987else 988 am_cv_make_support_nested_variables=no 989fi]) 990if test $am_cv_make_support_nested_variables = yes; then 991 dnl Using '$V' instead of '$(V)' breaks IRIX make. 992 AM_V='$(V)' 993 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 994else 995 AM_V=$AM_DEFAULT_VERBOSITY 996 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 997fi 998AC_SUBST([AM_V])dnl 999AM_SUBST_NOTMAKE([AM_V])dnl 1000AC_SUBST([AM_DEFAULT_V])dnl 1001AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1002AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1003AM_BACKSLASH='\' 1004AC_SUBST([AM_BACKSLASH])dnl 1005_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1006]) 1007 1008# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1009# 1010# This file is free software; the Free Software Foundation 1011# gives unlimited permission to copy and/or distribute it, 1012# with or without modifications, as long as this notice is preserved. 1013 1014# AM_PROG_INSTALL_STRIP 1015# --------------------- 1016# One issue with vendor 'install' (even GNU) is that you can't 1017# specify the program used to strip binaries. This is especially 1018# annoying in cross-compiling environments, where the build's strip 1019# is unlikely to handle the host's binaries. 1020# Fortunately install-sh will honor a STRIPPROG variable, so we 1021# always use install-sh in "make install-strip", and initialize 1022# STRIPPROG with the value of the STRIP variable (set by the user). 1023AC_DEFUN([AM_PROG_INSTALL_STRIP], 1024[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1025# Installed binaries are usually stripped using 'strip' when the user 1026# run "make install-strip". However 'strip' might not be the right 1027# tool to use in cross-compilation environments, therefore Automake 1028# will honor the 'STRIP' environment variable to overrule this program. 1029dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1030if test "$cross_compiling" != no; then 1031 AC_CHECK_TOOL([STRIP], [strip], :) 1032fi 1033INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1034AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1035 1036# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1037# 1038# This file is free software; the Free Software Foundation 1039# gives unlimited permission to copy and/or distribute it, 1040# with or without modifications, as long as this notice is preserved. 1041 1042# _AM_SUBST_NOTMAKE(VARIABLE) 1043# --------------------------- 1044# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1045# This macro is traced by Automake. 1046AC_DEFUN([_AM_SUBST_NOTMAKE]) 1047 1048# AM_SUBST_NOTMAKE(VARIABLE) 1049# -------------------------- 1050# Public sister of _AM_SUBST_NOTMAKE. 1051AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1052 1053# Check how to create a tarball. -*- Autoconf -*- 1054 1055# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1056# 1057# This file is free software; the Free Software Foundation 1058# gives unlimited permission to copy and/or distribute it, 1059# with or without modifications, as long as this notice is preserved. 1060 1061# _AM_PROG_TAR(FORMAT) 1062# -------------------- 1063# Check how to create a tarball in format FORMAT. 1064# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1065# 1066# Substitute a variable $(am__tar) that is a command 1067# writing to stdout a FORMAT-tarball containing the directory 1068# $tardir. 1069# tardir=directory && $(am__tar) > result.tar 1070# 1071# Substitute a variable $(am__untar) that extract such 1072# a tarball read from stdin. 1073# $(am__untar) < result.tar 1074# 1075AC_DEFUN([_AM_PROG_TAR], 1076[# Always define AMTAR for backward compatibility. Yes, it's still used 1077# in the wild :-( We should find a proper way to deprecate it ... 1078AC_SUBST([AMTAR], ['$${TAR-tar}']) 1079 1080# We'll loop over all known methods to create a tar archive until one works. 1081_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1082 1083m4_if([$1], [v7], 1084 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1085 1086 [m4_case([$1], 1087 [ustar], 1088 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1089 # There is notably a 21 bits limit for the UID and the GID. In fact, 1090 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1091 # and bug#13588). 1092 am_max_uid=2097151 # 2^21 - 1 1093 am_max_gid=$am_max_uid 1094 # The $UID and $GID variables are not portable, so we need to resort 1095 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1096 # below are definitely unexpected, so allow the users to see them 1097 # (that is, avoid stderr redirection). 1098 am_uid=`id -u || echo unknown` 1099 am_gid=`id -g || echo unknown` 1100 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1101 if test $am_uid -le $am_max_uid; then 1102 AC_MSG_RESULT([yes]) 1103 else 1104 AC_MSG_RESULT([no]) 1105 _am_tools=none 1106 fi 1107 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1108 if test $am_gid -le $am_max_gid; then 1109 AC_MSG_RESULT([yes]) 1110 else 1111 AC_MSG_RESULT([no]) 1112 _am_tools=none 1113 fi], 1114 1115 [pax], 1116 [], 1117 1118 [m4_fatal([Unknown tar format])]) 1119 1120 AC_MSG_CHECKING([how to create a $1 tar archive]) 1121 1122 # Go ahead even if we have the value already cached. We do so because we 1123 # need to set the values for the 'am__tar' and 'am__untar' variables. 1124 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1125 1126 for _am_tool in $_am_tools; do 1127 case $_am_tool in 1128 gnutar) 1129 for _am_tar in tar gnutar gtar; do 1130 AM_RUN_LOG([$_am_tar --version]) && break 1131 done 1132 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1133 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1134 am__untar="$_am_tar -xf -" 1135 ;; 1136 plaintar) 1137 # Must skip GNU tar: if it does not support --format= it doesn't create 1138 # ustar tarball either. 1139 (tar --version) >/dev/null 2>&1 && continue 1140 am__tar='tar chf - "$$tardir"' 1141 am__tar_='tar chf - "$tardir"' 1142 am__untar='tar xf -' 1143 ;; 1144 pax) 1145 am__tar='pax -L -x $1 -w "$$tardir"' 1146 am__tar_='pax -L -x $1 -w "$tardir"' 1147 am__untar='pax -r' 1148 ;; 1149 cpio) 1150 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1151 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1152 am__untar='cpio -i -H $1 -d' 1153 ;; 1154 none) 1155 am__tar=false 1156 am__tar_=false 1157 am__untar=false 1158 ;; 1159 esac 1160 1161 # If the value was cached, stop now. We just wanted to have am__tar 1162 # and am__untar set. 1163 test -n "${am_cv_prog_tar_$1}" && break 1164 1165 # tar/untar a dummy directory, and stop if the command works. 1166 rm -rf conftest.dir 1167 mkdir conftest.dir 1168 echo GrepMe > conftest.dir/file 1169 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1170 rm -rf conftest.dir 1171 if test -s conftest.tar; then 1172 AM_RUN_LOG([$am__untar <conftest.tar]) 1173 AM_RUN_LOG([cat conftest.dir/file]) 1174 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1175 fi 1176 done 1177 rm -rf conftest.dir 1178 1179 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1180 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1181 1182AC_SUBST([am__tar]) 1183AC_SUBST([am__untar]) 1184]) # _AM_PROG_TAR 1185 1186# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1187# 1188# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1189# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1190# Foundation, Inc. 1191# Written by Gordon Matzigkeit, 1996 1192# 1193# This file is free software; the Free Software Foundation gives 1194# unlimited permission to copy and/or distribute it, with or without 1195# modifications, as long as this notice is preserved. 1196 1197m4_define([_LT_COPYING], [dnl 1198# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1199# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1200# Foundation, Inc. 1201# Written by Gordon Matzigkeit, 1996 1202# 1203# This file is part of GNU Libtool. 1204# 1205# GNU Libtool is free software; you can redistribute it and/or 1206# modify it under the terms of the GNU General Public License as 1207# published by the Free Software Foundation; either version 2 of 1208# the License, or (at your option) any later version. 1209# 1210# As a special exception to the GNU General Public License, 1211# if you distribute this file as part of a program or library that 1212# is built using GNU Libtool, you may include this file under the 1213# same distribution terms that you use for the rest of that program. 1214# 1215# GNU Libtool is distributed in the hope that it will be useful, 1216# but WITHOUT ANY WARRANTY; without even the implied warranty of 1217# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1218# GNU General Public License for more details. 1219# 1220# You should have received a copy of the GNU General Public License 1221# along with GNU Libtool; see the file COPYING. If not, a copy 1222# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1223# obtained by writing to the Free Software Foundation, Inc., 1224# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1225]) 1226 1227# serial 57 LT_INIT 1228 1229 1230# LT_PREREQ(VERSION) 1231# ------------------ 1232# Complain and exit if this libtool version is less that VERSION. 1233m4_defun([LT_PREREQ], 1234[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1235 [m4_default([$3], 1236 [m4_fatal([Libtool version $1 or higher is required], 1237 63)])], 1238 [$2])]) 1239 1240 1241# _LT_CHECK_BUILDDIR 1242# ------------------ 1243# Complain if the absolute build directory name contains unusual characters 1244m4_defun([_LT_CHECK_BUILDDIR], 1245[case `pwd` in 1246 *\ * | *\ *) 1247 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1248esac 1249]) 1250 1251 1252# LT_INIT([OPTIONS]) 1253# ------------------ 1254AC_DEFUN([LT_INIT], 1255[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1256AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1257AC_BEFORE([$0], [LT_LANG])dnl 1258AC_BEFORE([$0], [LT_OUTPUT])dnl 1259AC_BEFORE([$0], [LTDL_INIT])dnl 1260m4_require([_LT_CHECK_BUILDDIR])dnl 1261 1262dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1263m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1264m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1265dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1266dnl unless we require an AC_DEFUNed macro: 1267AC_REQUIRE([LTOPTIONS_VERSION])dnl 1268AC_REQUIRE([LTSUGAR_VERSION])dnl 1269AC_REQUIRE([LTVERSION_VERSION])dnl 1270AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1271m4_require([_LT_PROG_LTMAIN])dnl 1272 1273_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1274 1275dnl Parse OPTIONS 1276_LT_SET_OPTIONS([$0], [$1]) 1277 1278# This can be used to rebuild libtool when needed 1279LIBTOOL_DEPS="$ltmain" 1280 1281# Always use our own libtool. 1282LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1283AC_SUBST(LIBTOOL)dnl 1284 1285_LT_SETUP 1286 1287# Only expand once: 1288m4_define([LT_INIT]) 1289])# LT_INIT 1290 1291# Old names: 1292AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1293AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1294dnl aclocal-1.4 backwards compatibility: 1295dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1296dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1297 1298 1299# _LT_CC_BASENAME(CC) 1300# ------------------- 1301# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1302m4_defun([_LT_CC_BASENAME], 1303[for cc_temp in $1""; do 1304 case $cc_temp in 1305 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1306 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1307 \-*) ;; 1308 *) break;; 1309 esac 1310done 1311cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1312]) 1313 1314 1315# _LT_FILEUTILS_DEFAULTS 1316# ---------------------- 1317# It is okay to use these file commands and assume they have been set 1318# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1319m4_defun([_LT_FILEUTILS_DEFAULTS], 1320[: ${CP="cp -f"} 1321: ${MV="mv -f"} 1322: ${RM="rm -f"} 1323])# _LT_FILEUTILS_DEFAULTS 1324 1325 1326# _LT_SETUP 1327# --------- 1328m4_defun([_LT_SETUP], 1329[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1330AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1331AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1332AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1333 1334_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1335dnl 1336_LT_DECL([], [host_alias], [0], [The host system])dnl 1337_LT_DECL([], [host], [0])dnl 1338_LT_DECL([], [host_os], [0])dnl 1339dnl 1340_LT_DECL([], [build_alias], [0], [The build system])dnl 1341_LT_DECL([], [build], [0])dnl 1342_LT_DECL([], [build_os], [0])dnl 1343dnl 1344AC_REQUIRE([AC_PROG_CC])dnl 1345AC_REQUIRE([LT_PATH_LD])dnl 1346AC_REQUIRE([LT_PATH_NM])dnl 1347dnl 1348AC_REQUIRE([AC_PROG_LN_S])dnl 1349test -z "$LN_S" && LN_S="ln -s" 1350_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1351dnl 1352AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1353_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1354_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1355dnl 1356m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1357m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1358m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1359m4_require([_LT_CMD_RELOAD])dnl 1360m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1361m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1362m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1363m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1364m4_require([_LT_WITH_SYSROOT])dnl 1365 1366_LT_CONFIG_LIBTOOL_INIT([ 1367# See if we are running on zsh, and set the options which allow our 1368# commands through without removal of \ escapes INIT. 1369if test -n "\${ZSH_VERSION+set}" ; then 1370 setopt NO_GLOB_SUBST 1371fi 1372]) 1373if test -n "${ZSH_VERSION+set}" ; then 1374 setopt NO_GLOB_SUBST 1375fi 1376 1377_LT_CHECK_OBJDIR 1378 1379m4_require([_LT_TAG_COMPILER])dnl 1380 1381case $host_os in 1382aix3*) 1383 # AIX sometimes has problems with the GCC collect2 program. For some 1384 # reason, if we set the COLLECT_NAMES environment variable, the problems 1385 # vanish in a puff of smoke. 1386 if test "X${COLLECT_NAMES+set}" != Xset; then 1387 COLLECT_NAMES= 1388 export COLLECT_NAMES 1389 fi 1390 ;; 1391esac 1392 1393# Global variables: 1394ofile=libtool 1395can_build_shared=yes 1396 1397# All known linkers require a `.a' archive for static linking (except MSVC, 1398# which needs '.lib'). 1399libext=a 1400 1401with_gnu_ld="$lt_cv_prog_gnu_ld" 1402 1403old_CC="$CC" 1404old_CFLAGS="$CFLAGS" 1405 1406# Set sane defaults for various variables 1407test -z "$CC" && CC=cc 1408test -z "$LTCC" && LTCC=$CC 1409test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1410test -z "$LD" && LD=ld 1411test -z "$ac_objext" && ac_objext=o 1412 1413_LT_CC_BASENAME([$compiler]) 1414 1415# Only perform the check for file, if the check method requires it 1416test -z "$MAGIC_CMD" && MAGIC_CMD=file 1417case $deplibs_check_method in 1418file_magic*) 1419 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1420 _LT_PATH_MAGIC 1421 fi 1422 ;; 1423esac 1424 1425# Use C for the default configuration in the libtool script 1426LT_SUPPORTED_TAG([CC]) 1427_LT_LANG_C_CONFIG 1428_LT_LANG_DEFAULT_CONFIG 1429_LT_CONFIG_COMMANDS 1430])# _LT_SETUP 1431 1432 1433# _LT_PREPARE_SED_QUOTE_VARS 1434# -------------------------- 1435# Define a few sed substitution that help us do robust quoting. 1436m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1437[# Backslashify metacharacters that are still active within 1438# double-quoted strings. 1439sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1440 1441# Same as above, but do not quote variable references. 1442double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1443 1444# Sed substitution to delay expansion of an escaped shell variable in a 1445# double_quote_subst'ed string. 1446delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1447 1448# Sed substitution to delay expansion of an escaped single quote. 1449delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1450 1451# Sed substitution to avoid accidental globbing in evaled expressions 1452no_glob_subst='s/\*/\\\*/g' 1453]) 1454 1455# _LT_PROG_LTMAIN 1456# --------------- 1457# Note that this code is called both from `configure', and `config.status' 1458# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1459# `config.status' has no value for ac_aux_dir unless we are using Automake, 1460# so we pass a copy along to make sure it has a sensible value anyway. 1461m4_defun([_LT_PROG_LTMAIN], 1462[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1463_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1464ltmain="$ac_aux_dir/ltmain.sh" 1465])# _LT_PROG_LTMAIN 1466 1467 1468 1469# So that we can recreate a full libtool script including additional 1470# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1471# in macros and then make a single call at the end using the `libtool' 1472# label. 1473 1474 1475# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1476# ---------------------------------------- 1477# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1478m4_define([_LT_CONFIG_LIBTOOL_INIT], 1479[m4_ifval([$1], 1480 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1481 [$1 1482])])]) 1483 1484# Initialize. 1485m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1486 1487 1488# _LT_CONFIG_LIBTOOL([COMMANDS]) 1489# ------------------------------ 1490# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1491m4_define([_LT_CONFIG_LIBTOOL], 1492[m4_ifval([$1], 1493 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1494 [$1 1495])])]) 1496 1497# Initialize. 1498m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1499 1500 1501# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1502# ----------------------------------------------------- 1503m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1504[_LT_CONFIG_LIBTOOL([$1]) 1505_LT_CONFIG_LIBTOOL_INIT([$2]) 1506]) 1507 1508 1509# _LT_FORMAT_COMMENT([COMMENT]) 1510# ----------------------------- 1511# Add leading comment marks to the start of each line, and a trailing 1512# full-stop to the whole comment if one is not present already. 1513m4_define([_LT_FORMAT_COMMENT], 1514[m4_ifval([$1], [ 1515m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1516 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1517)]) 1518 1519 1520 1521 1522 1523# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1524# ------------------------------------------------------------------- 1525# CONFIGNAME is the name given to the value in the libtool script. 1526# VARNAME is the (base) name used in the configure script. 1527# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1528# VARNAME. Any other value will be used directly. 1529m4_define([_LT_DECL], 1530[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1531 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1532 [m4_ifval([$1], [$1], [$2])]) 1533 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1534 m4_ifval([$4], 1535 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1536 lt_dict_add_subkey([lt_decl_dict], [$2], 1537 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1538]) 1539 1540 1541# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1542# -------------------------------------------------------- 1543m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1544 1545 1546# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1547# ------------------------------------------------ 1548m4_define([lt_decl_tag_varnames], 1549[_lt_decl_filter([tagged?], [yes], $@)]) 1550 1551 1552# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1553# --------------------------------------------------------- 1554m4_define([_lt_decl_filter], 1555[m4_case([$#], 1556 [0], [m4_fatal([$0: too few arguments: $#])], 1557 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1558 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1559 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1560 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1561]) 1562 1563 1564# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1565# -------------------------------------------------- 1566m4_define([lt_decl_quote_varnames], 1567[_lt_decl_filter([value], [1], $@)]) 1568 1569 1570# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1571# --------------------------------------------------- 1572m4_define([lt_decl_dquote_varnames], 1573[_lt_decl_filter([value], [2], $@)]) 1574 1575 1576# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1577# --------------------------------------------------- 1578m4_define([lt_decl_varnames_tagged], 1579[m4_assert([$# <= 2])dnl 1580_$0(m4_quote(m4_default([$1], [[, ]])), 1581 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1582 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1583m4_define([_lt_decl_varnames_tagged], 1584[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1585 1586 1587# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1588# ------------------------------------------------ 1589m4_define([lt_decl_all_varnames], 1590[_$0(m4_quote(m4_default([$1], [[, ]])), 1591 m4_if([$2], [], 1592 m4_quote(lt_decl_varnames), 1593 m4_quote(m4_shift($@))))[]dnl 1594]) 1595m4_define([_lt_decl_all_varnames], 1596[lt_join($@, lt_decl_varnames_tagged([$1], 1597 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1598]) 1599 1600 1601# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1602# ------------------------------------ 1603# Quote a variable value, and forward it to `config.status' so that its 1604# declaration there will have the same value as in `configure'. VARNAME 1605# must have a single quote delimited value for this to work. 1606m4_define([_LT_CONFIG_STATUS_DECLARE], 1607[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1608 1609 1610# _LT_CONFIG_STATUS_DECLARATIONS 1611# ------------------------------ 1612# We delimit libtool config variables with single quotes, so when 1613# we write them to config.status, we have to be sure to quote all 1614# embedded single quotes properly. In configure, this macro expands 1615# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1616# 1617# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1618m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1619[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1620 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1621 1622 1623# _LT_LIBTOOL_TAGS 1624# ---------------- 1625# Output comment and list of tags supported by the script 1626m4_defun([_LT_LIBTOOL_TAGS], 1627[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1628available_tags="_LT_TAGS"dnl 1629]) 1630 1631 1632# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1633# ----------------------------------- 1634# Extract the dictionary values for VARNAME (optionally with TAG) and 1635# expand to a commented shell variable setting: 1636# 1637# # Some comment about what VAR is for. 1638# visible_name=$lt_internal_name 1639m4_define([_LT_LIBTOOL_DECLARE], 1640[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1641 [description])))[]dnl 1642m4_pushdef([_libtool_name], 1643 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1644m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1645 [0], [_libtool_name=[$]$1], 1646 [1], [_libtool_name=$lt_[]$1], 1647 [2], [_libtool_name=$lt_[]$1], 1648 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1649m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1650]) 1651 1652 1653# _LT_LIBTOOL_CONFIG_VARS 1654# ----------------------- 1655# Produce commented declarations of non-tagged libtool config variables 1656# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1657# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1658# section) are produced by _LT_LIBTOOL_TAG_VARS. 1659m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1660[m4_foreach([_lt_var], 1661 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1662 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1663 1664 1665# _LT_LIBTOOL_TAG_VARS(TAG) 1666# ------------------------- 1667m4_define([_LT_LIBTOOL_TAG_VARS], 1668[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1669 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1670 1671 1672# _LT_TAGVAR(VARNAME, [TAGNAME]) 1673# ------------------------------ 1674m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1675 1676 1677# _LT_CONFIG_COMMANDS 1678# ------------------- 1679# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1680# variables for single and double quote escaping we saved from calls 1681# to _LT_DECL, we can put quote escaped variables declarations 1682# into `config.status', and then the shell code to quote escape them in 1683# for loops in `config.status'. Finally, any additional code accumulated 1684# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1685m4_defun([_LT_CONFIG_COMMANDS], 1686[AC_PROVIDE_IFELSE([LT_OUTPUT], 1687 dnl If the libtool generation code has been placed in $CONFIG_LT, 1688 dnl instead of duplicating it all over again into config.status, 1689 dnl then we will have config.status run $CONFIG_LT later, so it 1690 dnl needs to know what name is stored there: 1691 [AC_CONFIG_COMMANDS([libtool], 1692 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1693 dnl If the libtool generation code is destined for config.status, 1694 dnl expand the accumulated commands and init code now: 1695 [AC_CONFIG_COMMANDS([libtool], 1696 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1697])#_LT_CONFIG_COMMANDS 1698 1699 1700# Initialize. 1701m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1702[ 1703 1704# The HP-UX ksh and POSIX shell print the target directory to stdout 1705# if CDPATH is set. 1706(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1707 1708sed_quote_subst='$sed_quote_subst' 1709double_quote_subst='$double_quote_subst' 1710delay_variable_subst='$delay_variable_subst' 1711_LT_CONFIG_STATUS_DECLARATIONS 1712LTCC='$LTCC' 1713LTCFLAGS='$LTCFLAGS' 1714compiler='$compiler_DEFAULT' 1715 1716# A function that is used when there is no print builtin or printf. 1717func_fallback_echo () 1718{ 1719 eval 'cat <<_LTECHO_EOF 1720\$[]1 1721_LTECHO_EOF' 1722} 1723 1724# Quote evaled strings. 1725for var in lt_decl_all_varnames([[ \ 1726]], lt_decl_quote_varnames); do 1727 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1728 *[[\\\\\\\`\\"\\\$]]*) 1729 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1730 ;; 1731 *) 1732 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1733 ;; 1734 esac 1735done 1736 1737# Double-quote double-evaled strings. 1738for var in lt_decl_all_varnames([[ \ 1739]], lt_decl_dquote_varnames); do 1740 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1741 *[[\\\\\\\`\\"\\\$]]*) 1742 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1743 ;; 1744 *) 1745 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1746 ;; 1747 esac 1748done 1749 1750_LT_OUTPUT_LIBTOOL_INIT 1751]) 1752 1753# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1754# ------------------------------------ 1755# Generate a child script FILE with all initialization necessary to 1756# reuse the environment learned by the parent script, and make the 1757# file executable. If COMMENT is supplied, it is inserted after the 1758# `#!' sequence but before initialization text begins. After this 1759# macro, additional text can be appended to FILE to form the body of 1760# the child script. The macro ends with non-zero status if the 1761# file could not be fully written (such as if the disk is full). 1762m4_ifdef([AS_INIT_GENERATED], 1763[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1764[m4_defun([_LT_GENERATED_FILE_INIT], 1765[m4_require([AS_PREPARE])]dnl 1766[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1767[lt_write_fail=0 1768cat >$1 <<_ASEOF || lt_write_fail=1 1769#! $SHELL 1770# Generated by $as_me. 1771$2 1772SHELL=\${CONFIG_SHELL-$SHELL} 1773export SHELL 1774_ASEOF 1775cat >>$1 <<\_ASEOF || lt_write_fail=1 1776AS_SHELL_SANITIZE 1777_AS_PREPARE 1778exec AS_MESSAGE_FD>&1 1779_ASEOF 1780test $lt_write_fail = 0 && chmod +x $1[]dnl 1781m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1782 1783# LT_OUTPUT 1784# --------- 1785# This macro allows early generation of the libtool script (before 1786# AC_OUTPUT is called), incase it is used in configure for compilation 1787# tests. 1788AC_DEFUN([LT_OUTPUT], 1789[: ${CONFIG_LT=./config.lt} 1790AC_MSG_NOTICE([creating $CONFIG_LT]) 1791_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1792[# Run this file to recreate a libtool stub with the current configuration.]) 1793 1794cat >>"$CONFIG_LT" <<\_LTEOF 1795lt_cl_silent=false 1796exec AS_MESSAGE_LOG_FD>>config.log 1797{ 1798 echo 1799 AS_BOX([Running $as_me.]) 1800} >&AS_MESSAGE_LOG_FD 1801 1802lt_cl_help="\ 1803\`$as_me' creates a local libtool stub from the current configuration, 1804for use in further configure time tests before the real libtool is 1805generated. 1806 1807Usage: $[0] [[OPTIONS]] 1808 1809 -h, --help print this help, then exit 1810 -V, --version print version number, then exit 1811 -q, --quiet do not print progress messages 1812 -d, --debug don't remove temporary files 1813 1814Report bugs to <bug-libtool@gnu.org>." 1815 1816lt_cl_version="\ 1817m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1818m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1819configured by $[0], generated by m4_PACKAGE_STRING. 1820 1821Copyright (C) 2011 Free Software Foundation, Inc. 1822This config.lt script is free software; the Free Software Foundation 1823gives unlimited permision to copy, distribute and modify it." 1824 1825while test $[#] != 0 1826do 1827 case $[1] in 1828 --version | --v* | -V ) 1829 echo "$lt_cl_version"; exit 0 ;; 1830 --help | --h* | -h ) 1831 echo "$lt_cl_help"; exit 0 ;; 1832 --debug | --d* | -d ) 1833 debug=: ;; 1834 --quiet | --q* | --silent | --s* | -q ) 1835 lt_cl_silent=: ;; 1836 1837 -*) AC_MSG_ERROR([unrecognized option: $[1] 1838Try \`$[0] --help' for more information.]) ;; 1839 1840 *) AC_MSG_ERROR([unrecognized argument: $[1] 1841Try \`$[0] --help' for more information.]) ;; 1842 esac 1843 shift 1844done 1845 1846if $lt_cl_silent; then 1847 exec AS_MESSAGE_FD>/dev/null 1848fi 1849_LTEOF 1850 1851cat >>"$CONFIG_LT" <<_LTEOF 1852_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1853_LTEOF 1854 1855cat >>"$CONFIG_LT" <<\_LTEOF 1856AC_MSG_NOTICE([creating $ofile]) 1857_LT_OUTPUT_LIBTOOL_COMMANDS 1858AS_EXIT(0) 1859_LTEOF 1860chmod +x "$CONFIG_LT" 1861 1862# configure is writing to config.log, but config.lt does its own redirection, 1863# appending to config.log, which fails on DOS, as config.log is still kept 1864# open by configure. Here we exec the FD to /dev/null, effectively closing 1865# config.log, so it can be properly (re)opened and appended to by config.lt. 1866lt_cl_success=: 1867test "$silent" = yes && 1868 lt_config_lt_args="$lt_config_lt_args --quiet" 1869exec AS_MESSAGE_LOG_FD>/dev/null 1870$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1871exec AS_MESSAGE_LOG_FD>>config.log 1872$lt_cl_success || AS_EXIT(1) 1873])# LT_OUTPUT 1874 1875 1876# _LT_CONFIG(TAG) 1877# --------------- 1878# If TAG is the built-in tag, create an initial libtool script with a 1879# default configuration from the untagged config vars. Otherwise add code 1880# to config.status for appending the configuration named by TAG from the 1881# matching tagged config vars. 1882m4_defun([_LT_CONFIG], 1883[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1884_LT_CONFIG_SAVE_COMMANDS([ 1885 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1886 m4_if(_LT_TAG, [C], [ 1887 # See if we are running on zsh, and set the options which allow our 1888 # commands through without removal of \ escapes. 1889 if test -n "${ZSH_VERSION+set}" ; then 1890 setopt NO_GLOB_SUBST 1891 fi 1892 1893 cfgfile="${ofile}T" 1894 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1895 $RM "$cfgfile" 1896 1897 cat <<_LT_EOF >> "$cfgfile" 1898#! $SHELL 1899 1900# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1901# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1902# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1903# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1904# 1905_LT_COPYING 1906_LT_LIBTOOL_TAGS 1907 1908# ### BEGIN LIBTOOL CONFIG 1909_LT_LIBTOOL_CONFIG_VARS 1910_LT_LIBTOOL_TAG_VARS 1911# ### END LIBTOOL CONFIG 1912 1913_LT_EOF 1914 1915 case $host_os in 1916 aix3*) 1917 cat <<\_LT_EOF >> "$cfgfile" 1918# AIX sometimes has problems with the GCC collect2 program. For some 1919# reason, if we set the COLLECT_NAMES environment variable, the problems 1920# vanish in a puff of smoke. 1921if test "X${COLLECT_NAMES+set}" != Xset; then 1922 COLLECT_NAMES= 1923 export COLLECT_NAMES 1924fi 1925_LT_EOF 1926 ;; 1927 esac 1928 1929 _LT_PROG_LTMAIN 1930 1931 # We use sed instead of cat because bash on DJGPP gets confused if 1932 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1933 # text mode, it properly converts lines to CR/LF. This bash problem 1934 # is reportedly fixed, but why not run on old versions too? 1935 sed '$q' "$ltmain" >> "$cfgfile" \ 1936 || (rm -f "$cfgfile"; exit 1) 1937 1938 _LT_PROG_REPLACE_SHELLFNS 1939 1940 mv -f "$cfgfile" "$ofile" || 1941 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1942 chmod +x "$ofile" 1943], 1944[cat <<_LT_EOF >> "$ofile" 1945 1946dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1947dnl in a comment (ie after a #). 1948# ### BEGIN LIBTOOL TAG CONFIG: $1 1949_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1950# ### END LIBTOOL TAG CONFIG: $1 1951_LT_EOF 1952])dnl /m4_if 1953], 1954[m4_if([$1], [], [ 1955 PACKAGE='$PACKAGE' 1956 VERSION='$VERSION' 1957 TIMESTAMP='$TIMESTAMP' 1958 RM='$RM' 1959 ofile='$ofile'], []) 1960])dnl /_LT_CONFIG_SAVE_COMMANDS 1961])# _LT_CONFIG 1962 1963 1964# LT_SUPPORTED_TAG(TAG) 1965# --------------------- 1966# Trace this macro to discover what tags are supported by the libtool 1967# --tag option, using: 1968# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1969AC_DEFUN([LT_SUPPORTED_TAG], []) 1970 1971 1972# C support is built-in for now 1973m4_define([_LT_LANG_C_enabled], []) 1974m4_define([_LT_TAGS], []) 1975 1976 1977# LT_LANG(LANG) 1978# ------------- 1979# Enable libtool support for the given language if not already enabled. 1980AC_DEFUN([LT_LANG], 1981[AC_BEFORE([$0], [LT_OUTPUT])dnl 1982m4_case([$1], 1983 [C], [_LT_LANG(C)], 1984 [C++], [_LT_LANG(CXX)], 1985 [Go], [_LT_LANG(GO)], 1986 [Java], [_LT_LANG(GCJ)], 1987 [Fortran 77], [_LT_LANG(F77)], 1988 [Fortran], [_LT_LANG(FC)], 1989 [Windows Resource], [_LT_LANG(RC)], 1990 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1991 [_LT_LANG($1)], 1992 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1993])# LT_LANG 1994 1995 1996# _LT_LANG(LANGNAME) 1997# ------------------ 1998m4_defun([_LT_LANG], 1999[m4_ifdef([_LT_LANG_]$1[_enabled], [], 2000 [LT_SUPPORTED_TAG([$1])dnl 2001 m4_append([_LT_TAGS], [$1 ])dnl 2002 m4_define([_LT_LANG_]$1[_enabled], [])dnl 2003 _LT_LANG_$1_CONFIG($1)])dnl 2004])# _LT_LANG 2005 2006 2007m4_ifndef([AC_PROG_GO], [ 2008# NOTE: This macro has been submitted for inclusion into # 2009# GNU Autoconf as AC_PROG_GO. When it is available in # 2010# a released version of Autoconf we should remove this # 2011# macro and use it instead. # 2012m4_defun([AC_PROG_GO], 2013[AC_LANG_PUSH(Go)dnl 2014AC_ARG_VAR([GOC], [Go compiler command])dnl 2015AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 2016_AC_ARG_VAR_LDFLAGS()dnl 2017AC_CHECK_TOOL(GOC, gccgo) 2018if test -z "$GOC"; then 2019 if test -n "$ac_tool_prefix"; then 2020 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 2021 fi 2022fi 2023if test -z "$GOC"; then 2024 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 2025fi 2026])#m4_defun 2027])#m4_ifndef 2028 2029 2030# _LT_LANG_DEFAULT_CONFIG 2031# ----------------------- 2032m4_defun([_LT_LANG_DEFAULT_CONFIG], 2033[AC_PROVIDE_IFELSE([AC_PROG_CXX], 2034 [LT_LANG(CXX)], 2035 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2036 2037AC_PROVIDE_IFELSE([AC_PROG_F77], 2038 [LT_LANG(F77)], 2039 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2040 2041AC_PROVIDE_IFELSE([AC_PROG_FC], 2042 [LT_LANG(FC)], 2043 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2044 2045dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 2046dnl pulling things in needlessly. 2047AC_PROVIDE_IFELSE([AC_PROG_GCJ], 2048 [LT_LANG(GCJ)], 2049 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2050 [LT_LANG(GCJ)], 2051 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 2052 [LT_LANG(GCJ)], 2053 [m4_ifdef([AC_PROG_GCJ], 2054 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 2055 m4_ifdef([A][M_PROG_GCJ], 2056 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 2057 m4_ifdef([LT_PROG_GCJ], 2058 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2059 2060AC_PROVIDE_IFELSE([AC_PROG_GO], 2061 [LT_LANG(GO)], 2062 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2063 2064AC_PROVIDE_IFELSE([LT_PROG_RC], 2065 [LT_LANG(RC)], 2066 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 2067])# _LT_LANG_DEFAULT_CONFIG 2068 2069# Obsolete macros: 2070AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 2071AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 2072AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 2073AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 2074AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 2075dnl aclocal-1.4 backwards compatibility: 2076dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 2077dnl AC_DEFUN([AC_LIBTOOL_F77], []) 2078dnl AC_DEFUN([AC_LIBTOOL_FC], []) 2079dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 2080dnl AC_DEFUN([AC_LIBTOOL_RC], []) 2081 2082 2083# _LT_TAG_COMPILER 2084# ---------------- 2085m4_defun([_LT_TAG_COMPILER], 2086[AC_REQUIRE([AC_PROG_CC])dnl 2087 2088_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 2089_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 2090_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 2091_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2092 2093# If no C compiler was specified, use CC. 2094LTCC=${LTCC-"$CC"} 2095 2096# If no C compiler flags were specified, use CFLAGS. 2097LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2098 2099# Allow CC to be a program name with arguments. 2100compiler=$CC 2101])# _LT_TAG_COMPILER 2102 2103 2104# _LT_COMPILER_BOILERPLATE 2105# ------------------------ 2106# Check for compiler boilerplate output or warnings with 2107# the simple compiler test code. 2108m4_defun([_LT_COMPILER_BOILERPLATE], 2109[m4_require([_LT_DECL_SED])dnl 2110ac_outfile=conftest.$ac_objext 2111echo "$lt_simple_compile_test_code" >conftest.$ac_ext 2112eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2113_lt_compiler_boilerplate=`cat conftest.err` 2114$RM conftest* 2115])# _LT_COMPILER_BOILERPLATE 2116 2117 2118# _LT_LINKER_BOILERPLATE 2119# ---------------------- 2120# Check for linker boilerplate output or warnings with 2121# the simple link test code. 2122m4_defun([_LT_LINKER_BOILERPLATE], 2123[m4_require([_LT_DECL_SED])dnl 2124ac_outfile=conftest.$ac_objext 2125echo "$lt_simple_link_test_code" >conftest.$ac_ext 2126eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2127_lt_linker_boilerplate=`cat conftest.err` 2128$RM -r conftest* 2129])# _LT_LINKER_BOILERPLATE 2130 2131# _LT_REQUIRED_DARWIN_CHECKS 2132# ------------------------- 2133m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2134 case $host_os in 2135 rhapsody* | darwin*) 2136 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2137 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2138 AC_CHECK_TOOL([LIPO], [lipo], [:]) 2139 AC_CHECK_TOOL([OTOOL], [otool], [:]) 2140 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2141 _LT_DECL([], [DSYMUTIL], [1], 2142 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2143 _LT_DECL([], [NMEDIT], [1], 2144 [Tool to change global to local symbols on Mac OS X]) 2145 _LT_DECL([], [LIPO], [1], 2146 [Tool to manipulate fat objects and archives on Mac OS X]) 2147 _LT_DECL([], [OTOOL], [1], 2148 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2149 _LT_DECL([], [OTOOL64], [1], 2150 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2151 2152 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2153 [lt_cv_apple_cc_single_mod=no 2154 if test -z "${LT_MULTI_MODULE}"; then 2155 # By default we will add the -single_module flag. You can override 2156 # by either setting the environment variable LT_MULTI_MODULE 2157 # non-empty at configure time, or by adding -multi_module to the 2158 # link flags. 2159 rm -rf libconftest.dylib* 2160 echo "int foo(void){return 1;}" > conftest.c 2161 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2162-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2163 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2164 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2165 _lt_result=$? 2166 # If there is a non-empty error log, and "single_module" 2167 # appears in it, assume the flag caused a linker warning 2168 if test -s conftest.err && $GREP single_module conftest.err; then 2169 cat conftest.err >&AS_MESSAGE_LOG_FD 2170 # Otherwise, if the output was created with a 0 exit code from 2171 # the compiler, it worked. 2172 elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2173 lt_cv_apple_cc_single_mod=yes 2174 else 2175 cat conftest.err >&AS_MESSAGE_LOG_FD 2176 fi 2177 rm -rf libconftest.dylib* 2178 rm -f conftest.* 2179 fi]) 2180 2181 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2182 [lt_cv_ld_exported_symbols_list], 2183 [lt_cv_ld_exported_symbols_list=no 2184 save_LDFLAGS=$LDFLAGS 2185 echo "_main" > conftest.sym 2186 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2187 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2188 [lt_cv_ld_exported_symbols_list=yes], 2189 [lt_cv_ld_exported_symbols_list=no]) 2190 LDFLAGS="$save_LDFLAGS" 2191 ]) 2192 2193 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2194 [lt_cv_ld_force_load=no 2195 cat > conftest.c << _LT_EOF 2196int forced_loaded() { return 2;} 2197_LT_EOF 2198 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2199 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2200 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2201 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2202 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2203 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2204 cat > conftest.c << _LT_EOF 2205int main() { return 0;} 2206_LT_EOF 2207 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2208 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2209 _lt_result=$? 2210 if test -s conftest.err && $GREP force_load conftest.err; then 2211 cat conftest.err >&AS_MESSAGE_LOG_FD 2212 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2213 lt_cv_ld_force_load=yes 2214 else 2215 cat conftest.err >&AS_MESSAGE_LOG_FD 2216 fi 2217 rm -f conftest.err libconftest.a conftest conftest.c 2218 rm -rf conftest.dSYM 2219 ]) 2220 case $host_os in 2221 rhapsody* | darwin1.[[012]]) 2222 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2223 darwin1.*) 2224 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2225 darwin*) # darwin 5.x on 2226 # if running on 10.5 or later, the deployment target defaults 2227 # to the OS version, if on x86, and 10.4, the deployment 2228 # target defaults to 10.4. Don't you love it? 2229 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2230 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2231 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2232 10.[[012]]*) 2233 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2234 10.*) 2235 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2236 esac 2237 ;; 2238 esac 2239 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2240 _lt_dar_single_mod='$single_module' 2241 fi 2242 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2243 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2244 else 2245 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2246 fi 2247 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2248 _lt_dsymutil='~$DSYMUTIL $lib || :' 2249 else 2250 _lt_dsymutil= 2251 fi 2252 ;; 2253 esac 2254]) 2255 2256 2257# _LT_DARWIN_LINKER_FEATURES([TAG]) 2258# --------------------------------- 2259# Checks for linker and compiler features on darwin 2260m4_defun([_LT_DARWIN_LINKER_FEATURES], 2261[ 2262 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2263 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2264 _LT_TAGVAR(hardcode_direct, $1)=no 2265 _LT_TAGVAR(hardcode_automatic, $1)=yes 2266 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2267 if test "$lt_cv_ld_force_load" = "yes"; then 2268 _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\"`' 2269 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2270 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2271 else 2272 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2273 fi 2274 _LT_TAGVAR(link_all_deplibs, $1)=yes 2275 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2276 case $cc_basename in 2277 ifort*) _lt_dar_can_shared=yes ;; 2278 *) _lt_dar_can_shared=$GCC ;; 2279 esac 2280 if test "$_lt_dar_can_shared" = "yes"; then 2281 output_verbose_link_cmd=func_echo_all 2282 _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}" 2283 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2284 _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}" 2285 _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}" 2286 m4_if([$1], [CXX], 2287[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2288 _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}" 2289 _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}" 2290 fi 2291],[]) 2292 else 2293 _LT_TAGVAR(ld_shlibs, $1)=no 2294 fi 2295]) 2296 2297# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2298# ---------------------------------- 2299# Links a minimal program and checks the executable 2300# for the system default hardcoded library path. In most cases, 2301# this is /usr/lib:/lib, but when the MPI compilers are used 2302# the location of the communication and MPI libs are included too. 2303# If we don't find anything, use the default library path according 2304# to the aix ld manual. 2305# Store the results from the different compilers for each TAGNAME. 2306# Allow to override them for all tags through lt_cv_aix_libpath. 2307m4_defun([_LT_SYS_MODULE_PATH_AIX], 2308[m4_require([_LT_DECL_SED])dnl 2309if test "${lt_cv_aix_libpath+set}" = set; then 2310 aix_libpath=$lt_cv_aix_libpath 2311else 2312 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2313 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2314 lt_aix_libpath_sed='[ 2315 /Import File Strings/,/^$/ { 2316 /^0/ { 2317 s/^0 *\([^ ]*\) *$/\1/ 2318 p 2319 } 2320 }]' 2321 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2322 # Check for a 64-bit object if we didn't find anything. 2323 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2324 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2325 fi],[]) 2326 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2327 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2328 fi 2329 ]) 2330 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2331fi 2332])# _LT_SYS_MODULE_PATH_AIX 2333 2334 2335# _LT_SHELL_INIT(ARG) 2336# ------------------- 2337m4_define([_LT_SHELL_INIT], 2338[m4_divert_text([M4SH-INIT], [$1 2339])])# _LT_SHELL_INIT 2340 2341 2342 2343# _LT_PROG_ECHO_BACKSLASH 2344# ----------------------- 2345# Find how we can fake an echo command that does not interpret backslash. 2346# In particular, with Autoconf 2.60 or later we add some code to the start 2347# of the generated configure script which will find a shell with a builtin 2348# printf (which we can use as an echo command). 2349m4_defun([_LT_PROG_ECHO_BACKSLASH], 2350[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2351ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2352ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2353 2354AC_MSG_CHECKING([how to print strings]) 2355# Test print first, because it will be a builtin if present. 2356if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2357 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2358 ECHO='print -r --' 2359elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2360 ECHO='printf %s\n' 2361else 2362 # Use this function as a fallback that always works. 2363 func_fallback_echo () 2364 { 2365 eval 'cat <<_LTECHO_EOF 2366$[]1 2367_LTECHO_EOF' 2368 } 2369 ECHO='func_fallback_echo' 2370fi 2371 2372# func_echo_all arg... 2373# Invoke $ECHO with all args, space-separated. 2374func_echo_all () 2375{ 2376 $ECHO "$*" 2377} 2378 2379case "$ECHO" in 2380 printf*) AC_MSG_RESULT([printf]) ;; 2381 print*) AC_MSG_RESULT([print -r]) ;; 2382 *) AC_MSG_RESULT([cat]) ;; 2383esac 2384 2385m4_ifdef([_AS_DETECT_SUGGESTED], 2386[_AS_DETECT_SUGGESTED([ 2387 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2388 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2389 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2390 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2391 PATH=/empty FPATH=/empty; export PATH FPATH 2392 test "X`printf %s $ECHO`" = "X$ECHO" \ 2393 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2394 2395_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2396_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2397])# _LT_PROG_ECHO_BACKSLASH 2398 2399 2400# _LT_WITH_SYSROOT 2401# ---------------- 2402AC_DEFUN([_LT_WITH_SYSROOT], 2403[AC_MSG_CHECKING([for sysroot]) 2404AC_ARG_WITH([sysroot], 2405[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2406 (or the compiler's sysroot if not specified).], 2407[], [with_sysroot=no]) 2408 2409dnl lt_sysroot will always be passed unquoted. We quote it here 2410dnl in case the user passed a directory name. 2411lt_sysroot= 2412case ${with_sysroot} in #( 2413 yes) 2414 if test "$GCC" = yes; then 2415 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2416 fi 2417 ;; #( 2418 /*) 2419 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2420 ;; #( 2421 no|'') 2422 ;; #( 2423 *) 2424 AC_MSG_RESULT([${with_sysroot}]) 2425 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2426 ;; 2427esac 2428 2429 AC_MSG_RESULT([${lt_sysroot:-no}]) 2430_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2431[dependent libraries, and in which our libraries should be installed.])]) 2432 2433# _LT_ENABLE_LOCK 2434# --------------- 2435m4_defun([_LT_ENABLE_LOCK], 2436[AC_ARG_ENABLE([libtool-lock], 2437 [AS_HELP_STRING([--disable-libtool-lock], 2438 [avoid locking (might break parallel builds)])]) 2439test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2440 2441# Some flags need to be propagated to the compiler or linker for good 2442# libtool support. 2443case $host in 2444ia64-*-hpux*) 2445 # Find out which ABI we are using. 2446 echo 'int i;' > conftest.$ac_ext 2447 if AC_TRY_EVAL(ac_compile); then 2448 case `/usr/bin/file conftest.$ac_objext` in 2449 *ELF-32*) 2450 HPUX_IA64_MODE="32" 2451 ;; 2452 *ELF-64*) 2453 HPUX_IA64_MODE="64" 2454 ;; 2455 esac 2456 fi 2457 rm -rf conftest* 2458 ;; 2459*-*-irix6*) 2460 # Find out which ABI we are using. 2461 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2462 if AC_TRY_EVAL(ac_compile); then 2463 if test "$lt_cv_prog_gnu_ld" = yes; then 2464 case `/usr/bin/file conftest.$ac_objext` in 2465 *32-bit*) 2466 LD="${LD-ld} -melf32bsmip" 2467 ;; 2468 *N32*) 2469 LD="${LD-ld} -melf32bmipn32" 2470 ;; 2471 *64-bit*) 2472 LD="${LD-ld} -melf64bmip" 2473 ;; 2474 esac 2475 else 2476 case `/usr/bin/file conftest.$ac_objext` in 2477 *32-bit*) 2478 LD="${LD-ld} -32" 2479 ;; 2480 *N32*) 2481 LD="${LD-ld} -n32" 2482 ;; 2483 *64-bit*) 2484 LD="${LD-ld} -64" 2485 ;; 2486 esac 2487 fi 2488 fi 2489 rm -rf conftest* 2490 ;; 2491 2492x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2493s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2494 # Find out which ABI we are using. 2495 echo 'int i;' > conftest.$ac_ext 2496 if AC_TRY_EVAL(ac_compile); then 2497 case `/usr/bin/file conftest.o` in 2498 *32-bit*) 2499 case $host in 2500 x86_64-*kfreebsd*-gnu) 2501 LD="${LD-ld} -m elf_i386_fbsd" 2502 ;; 2503 x86_64-*linux*) 2504 LD="${LD-ld} -m elf_i386" 2505 ;; 2506 ppc64-*linux*|powerpc64-*linux*) 2507 LD="${LD-ld} -m elf32ppclinux" 2508 ;; 2509 s390x-*linux*) 2510 LD="${LD-ld} -m elf_s390" 2511 ;; 2512 sparc64-*linux*) 2513 LD="${LD-ld} -m elf32_sparc" 2514 ;; 2515 esac 2516 ;; 2517 *64-bit*) 2518 case $host in 2519 x86_64-*kfreebsd*-gnu) 2520 LD="${LD-ld} -m elf_x86_64_fbsd" 2521 ;; 2522 x86_64-*linux*) 2523 LD="${LD-ld} -m elf_x86_64" 2524 ;; 2525 ppc*-*linux*|powerpc*-*linux*) 2526 LD="${LD-ld} -m elf64ppc" 2527 ;; 2528 s390*-*linux*|s390*-*tpf*) 2529 LD="${LD-ld} -m elf64_s390" 2530 ;; 2531 sparc*-*linux*) 2532 LD="${LD-ld} -m elf64_sparc" 2533 ;; 2534 esac 2535 ;; 2536 esac 2537 fi 2538 rm -rf conftest* 2539 ;; 2540 2541*-*-sco3.2v5*) 2542 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2543 SAVE_CFLAGS="$CFLAGS" 2544 CFLAGS="$CFLAGS -belf" 2545 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2546 [AC_LANG_PUSH(C) 2547 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2548 AC_LANG_POP]) 2549 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2550 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2551 CFLAGS="$SAVE_CFLAGS" 2552 fi 2553 ;; 2554*-*solaris*) 2555 # Find out which ABI we are using. 2556 echo 'int i;' > conftest.$ac_ext 2557 if AC_TRY_EVAL(ac_compile); then 2558 case `/usr/bin/file conftest.o` in 2559 *64-bit*) 2560 case $lt_cv_prog_gnu_ld in 2561 yes*) 2562 case $host in 2563 i?86-*-solaris*) 2564 LD="${LD-ld} -m elf_x86_64" 2565 ;; 2566 sparc*-*-solaris*) 2567 LD="${LD-ld} -m elf64_sparc" 2568 ;; 2569 esac 2570 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2571 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2572 LD="${LD-ld}_sol2" 2573 fi 2574 ;; 2575 *) 2576 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2577 LD="${LD-ld} -64" 2578 fi 2579 ;; 2580 esac 2581 ;; 2582 esac 2583 fi 2584 rm -rf conftest* 2585 ;; 2586esac 2587 2588need_locks="$enable_libtool_lock" 2589])# _LT_ENABLE_LOCK 2590 2591 2592# _LT_PROG_AR 2593# ----------- 2594m4_defun([_LT_PROG_AR], 2595[AC_CHECK_TOOLS(AR, [ar], false) 2596: ${AR=ar} 2597: ${AR_FLAGS=cru} 2598_LT_DECL([], [AR], [1], [The archiver]) 2599_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2600 2601AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2602 [lt_cv_ar_at_file=no 2603 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2604 [echo conftest.$ac_objext > conftest.lst 2605 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2606 AC_TRY_EVAL([lt_ar_try]) 2607 if test "$ac_status" -eq 0; then 2608 # Ensure the archiver fails upon bogus file names. 2609 rm -f conftest.$ac_objext libconftest.a 2610 AC_TRY_EVAL([lt_ar_try]) 2611 if test "$ac_status" -ne 0; then 2612 lt_cv_ar_at_file=@ 2613 fi 2614 fi 2615 rm -f conftest.* libconftest.a 2616 ]) 2617 ]) 2618 2619if test "x$lt_cv_ar_at_file" = xno; then 2620 archiver_list_spec= 2621else 2622 archiver_list_spec=$lt_cv_ar_at_file 2623fi 2624_LT_DECL([], [archiver_list_spec], [1], 2625 [How to feed a file listing to the archiver]) 2626])# _LT_PROG_AR 2627 2628 2629# _LT_CMD_OLD_ARCHIVE 2630# ------------------- 2631m4_defun([_LT_CMD_OLD_ARCHIVE], 2632[_LT_PROG_AR 2633 2634AC_CHECK_TOOL(STRIP, strip, :) 2635test -z "$STRIP" && STRIP=: 2636_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2637 2638AC_CHECK_TOOL(RANLIB, ranlib, :) 2639test -z "$RANLIB" && RANLIB=: 2640_LT_DECL([], [RANLIB], [1], 2641 [Commands used to install an old-style archive]) 2642 2643# Determine commands to create old-style static archives. 2644old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2645old_postinstall_cmds='chmod 644 $oldlib' 2646old_postuninstall_cmds= 2647 2648if test -n "$RANLIB"; then 2649 case $host_os in 2650 openbsd*) 2651 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2652 ;; 2653 *) 2654 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2655 ;; 2656 esac 2657 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2658fi 2659 2660case $host_os in 2661 darwin*) 2662 lock_old_archive_extraction=yes ;; 2663 *) 2664 lock_old_archive_extraction=no ;; 2665esac 2666_LT_DECL([], [old_postinstall_cmds], [2]) 2667_LT_DECL([], [old_postuninstall_cmds], [2]) 2668_LT_TAGDECL([], [old_archive_cmds], [2], 2669 [Commands used to build an old-style archive]) 2670_LT_DECL([], [lock_old_archive_extraction], [0], 2671 [Whether to use a lock for old archive extraction]) 2672])# _LT_CMD_OLD_ARCHIVE 2673 2674 2675# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2676# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2677# ---------------------------------------------------------------- 2678# Check whether the given compiler option works 2679AC_DEFUN([_LT_COMPILER_OPTION], 2680[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2681m4_require([_LT_DECL_SED])dnl 2682AC_CACHE_CHECK([$1], [$2], 2683 [$2=no 2684 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2685 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2686 lt_compiler_flag="$3" 2687 # Insert the option either (1) after the last *FLAGS variable, or 2688 # (2) before a word containing "conftest.", or (3) at the end. 2689 # Note that $ac_compile itself does not contain backslashes and begins 2690 # with a dollar sign (not a hyphen), so the echo should work correctly. 2691 # The option is referenced via a variable to avoid confusing sed. 2692 lt_compile=`echo "$ac_compile" | $SED \ 2693 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2694 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2695 -e 's:$: $lt_compiler_flag:'` 2696 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2697 (eval "$lt_compile" 2>conftest.err) 2698 ac_status=$? 2699 cat conftest.err >&AS_MESSAGE_LOG_FD 2700 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2701 if (exit $ac_status) && test -s "$ac_outfile"; then 2702 # The compiler can only warn and ignore the option if not recognized 2703 # So say no if there are warnings other than the usual output. 2704 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2705 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2706 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2707 $2=yes 2708 fi 2709 fi 2710 $RM conftest* 2711]) 2712 2713if test x"[$]$2" = xyes; then 2714 m4_if([$5], , :, [$5]) 2715else 2716 m4_if([$6], , :, [$6]) 2717fi 2718])# _LT_COMPILER_OPTION 2719 2720# Old name: 2721AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2722dnl aclocal-1.4 backwards compatibility: 2723dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2724 2725 2726# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2727# [ACTION-SUCCESS], [ACTION-FAILURE]) 2728# ---------------------------------------------------- 2729# Check whether the given linker option works 2730AC_DEFUN([_LT_LINKER_OPTION], 2731[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2732m4_require([_LT_DECL_SED])dnl 2733AC_CACHE_CHECK([$1], [$2], 2734 [$2=no 2735 save_LDFLAGS="$LDFLAGS" 2736 LDFLAGS="$LDFLAGS $3" 2737 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2738 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2739 # The linker can only warn and ignore the option if not recognized 2740 # So say no if there are warnings 2741 if test -s conftest.err; then 2742 # Append any errors to the config.log. 2743 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2744 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2745 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2746 if diff conftest.exp conftest.er2 >/dev/null; then 2747 $2=yes 2748 fi 2749 else 2750 $2=yes 2751 fi 2752 fi 2753 $RM -r conftest* 2754 LDFLAGS="$save_LDFLAGS" 2755]) 2756 2757if test x"[$]$2" = xyes; then 2758 m4_if([$4], , :, [$4]) 2759else 2760 m4_if([$5], , :, [$5]) 2761fi 2762])# _LT_LINKER_OPTION 2763 2764# Old name: 2765AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2766dnl aclocal-1.4 backwards compatibility: 2767dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2768 2769 2770# LT_CMD_MAX_LEN 2771#--------------- 2772AC_DEFUN([LT_CMD_MAX_LEN], 2773[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2774# find the maximum length of command line arguments 2775AC_MSG_CHECKING([the maximum length of command line arguments]) 2776AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2777 i=0 2778 teststring="ABCD" 2779 2780 case $build_os in 2781 msdosdjgpp*) 2782 # On DJGPP, this test can blow up pretty badly due to problems in libc 2783 # (any single argument exceeding 2000 bytes causes a buffer overrun 2784 # during glob expansion). Even if it were fixed, the result of this 2785 # check would be larger than it should be. 2786 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2787 ;; 2788 2789 gnu*) 2790 # Under GNU Hurd, this test is not required because there is 2791 # no limit to the length of command line arguments. 2792 # Libtool will interpret -1 as no limit whatsoever 2793 lt_cv_sys_max_cmd_len=-1; 2794 ;; 2795 2796 cygwin* | mingw* | cegcc*) 2797 # On Win9x/ME, this test blows up -- it succeeds, but takes 2798 # about 5 minutes as the teststring grows exponentially. 2799 # Worse, since 9x/ME are not pre-emptively multitasking, 2800 # you end up with a "frozen" computer, even though with patience 2801 # the test eventually succeeds (with a max line length of 256k). 2802 # Instead, let's just punt: use the minimum linelength reported by 2803 # all of the supported platforms: 8192 (on NT/2K/XP). 2804 lt_cv_sys_max_cmd_len=8192; 2805 ;; 2806 2807 mint*) 2808 # On MiNT this can take a long time and run out of memory. 2809 lt_cv_sys_max_cmd_len=8192; 2810 ;; 2811 2812 amigaos*) 2813 # On AmigaOS with pdksh, this test takes hours, literally. 2814 # So we just punt and use a minimum line length of 8192. 2815 lt_cv_sys_max_cmd_len=8192; 2816 ;; 2817 2818 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2819 # This has been around since 386BSD, at least. Likely further. 2820 if test -x /sbin/sysctl; then 2821 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2822 elif test -x /usr/sbin/sysctl; then 2823 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2824 else 2825 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2826 fi 2827 # And add a safety zone 2828 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2829 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2830 ;; 2831 2832 interix*) 2833 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2834 lt_cv_sys_max_cmd_len=196608 2835 ;; 2836 2837 os2*) 2838 # The test takes a long time on OS/2. 2839 lt_cv_sys_max_cmd_len=8192 2840 ;; 2841 2842 osf*) 2843 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2844 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2845 # nice to cause kernel panics so lets avoid the loop below. 2846 # First set a reasonable default. 2847 lt_cv_sys_max_cmd_len=16384 2848 # 2849 if test -x /sbin/sysconfig; then 2850 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2851 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2852 esac 2853 fi 2854 ;; 2855 sco3.2v5*) 2856 lt_cv_sys_max_cmd_len=102400 2857 ;; 2858 sysv5* | sco5v6* | sysv4.2uw2*) 2859 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2860 if test -n "$kargmax"; then 2861 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2862 else 2863 lt_cv_sys_max_cmd_len=32768 2864 fi 2865 ;; 2866 *) 2867 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2868 if test -n "$lt_cv_sys_max_cmd_len"; then 2869 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2870 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2871 else 2872 # Make teststring a little bigger before we do anything with it. 2873 # a 1K string should be a reasonable start. 2874 for i in 1 2 3 4 5 6 7 8 ; do 2875 teststring=$teststring$teststring 2876 done 2877 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2878 # If test is not a shell built-in, we'll probably end up computing a 2879 # maximum length that is only half of the actual maximum length, but 2880 # we can't tell. 2881 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2882 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2883 test $i != 17 # 1/2 MB should be enough 2884 do 2885 i=`expr $i + 1` 2886 teststring=$teststring$teststring 2887 done 2888 # Only check the string length outside the loop. 2889 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2890 teststring= 2891 # Add a significant safety factor because C++ compilers can tack on 2892 # massive amounts of additional arguments before passing them to the 2893 # linker. It appears as though 1/2 is a usable value. 2894 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2895 fi 2896 ;; 2897 esac 2898]) 2899if test -n $lt_cv_sys_max_cmd_len ; then 2900 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2901else 2902 AC_MSG_RESULT(none) 2903fi 2904max_cmd_len=$lt_cv_sys_max_cmd_len 2905_LT_DECL([], [max_cmd_len], [0], 2906 [What is the maximum length of a command?]) 2907])# LT_CMD_MAX_LEN 2908 2909# Old name: 2910AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2911dnl aclocal-1.4 backwards compatibility: 2912dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2913 2914 2915# _LT_HEADER_DLFCN 2916# ---------------- 2917m4_defun([_LT_HEADER_DLFCN], 2918[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2919])# _LT_HEADER_DLFCN 2920 2921 2922# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2923# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2924# ---------------------------------------------------------------- 2925m4_defun([_LT_TRY_DLOPEN_SELF], 2926[m4_require([_LT_HEADER_DLFCN])dnl 2927if test "$cross_compiling" = yes; then : 2928 [$4] 2929else 2930 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2931 lt_status=$lt_dlunknown 2932 cat > conftest.$ac_ext <<_LT_EOF 2933[#line $LINENO "configure" 2934#include "confdefs.h" 2935 2936#if HAVE_DLFCN_H 2937#include <dlfcn.h> 2938#endif 2939 2940#include <stdio.h> 2941 2942#ifdef RTLD_GLOBAL 2943# define LT_DLGLOBAL RTLD_GLOBAL 2944#else 2945# ifdef DL_GLOBAL 2946# define LT_DLGLOBAL DL_GLOBAL 2947# else 2948# define LT_DLGLOBAL 0 2949# endif 2950#endif 2951 2952/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2953 find out it does not work in some platform. */ 2954#ifndef LT_DLLAZY_OR_NOW 2955# ifdef RTLD_LAZY 2956# define LT_DLLAZY_OR_NOW RTLD_LAZY 2957# else 2958# ifdef DL_LAZY 2959# define LT_DLLAZY_OR_NOW DL_LAZY 2960# else 2961# ifdef RTLD_NOW 2962# define LT_DLLAZY_OR_NOW RTLD_NOW 2963# else 2964# ifdef DL_NOW 2965# define LT_DLLAZY_OR_NOW DL_NOW 2966# else 2967# define LT_DLLAZY_OR_NOW 0 2968# endif 2969# endif 2970# endif 2971# endif 2972#endif 2973 2974/* When -fvisbility=hidden is used, assume the code has been annotated 2975 correspondingly for the symbols needed. */ 2976#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2977int fnord () __attribute__((visibility("default"))); 2978#endif 2979 2980int fnord () { return 42; } 2981int main () 2982{ 2983 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2984 int status = $lt_dlunknown; 2985 2986 if (self) 2987 { 2988 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2989 else 2990 { 2991 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2992 else puts (dlerror ()); 2993 } 2994 /* dlclose (self); */ 2995 } 2996 else 2997 puts (dlerror ()); 2998 2999 return status; 3000}] 3001_LT_EOF 3002 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 3003 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 3004 lt_status=$? 3005 case x$lt_status in 3006 x$lt_dlno_uscore) $1 ;; 3007 x$lt_dlneed_uscore) $2 ;; 3008 x$lt_dlunknown|x*) $3 ;; 3009 esac 3010 else : 3011 # compilation failed 3012 $3 3013 fi 3014fi 3015rm -fr conftest* 3016])# _LT_TRY_DLOPEN_SELF 3017 3018 3019# LT_SYS_DLOPEN_SELF 3020# ------------------ 3021AC_DEFUN([LT_SYS_DLOPEN_SELF], 3022[m4_require([_LT_HEADER_DLFCN])dnl 3023if test "x$enable_dlopen" != xyes; then 3024 enable_dlopen=unknown 3025 enable_dlopen_self=unknown 3026 enable_dlopen_self_static=unknown 3027else 3028 lt_cv_dlopen=no 3029 lt_cv_dlopen_libs= 3030 3031 case $host_os in 3032 beos*) 3033 lt_cv_dlopen="load_add_on" 3034 lt_cv_dlopen_libs= 3035 lt_cv_dlopen_self=yes 3036 ;; 3037 3038 mingw* | pw32* | cegcc*) 3039 lt_cv_dlopen="LoadLibrary" 3040 lt_cv_dlopen_libs= 3041 ;; 3042 3043 cygwin*) 3044 lt_cv_dlopen="dlopen" 3045 lt_cv_dlopen_libs= 3046 ;; 3047 3048 darwin*) 3049 # if libdl is installed we need to link against it 3050 AC_CHECK_LIB([dl], [dlopen], 3051 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3052 lt_cv_dlopen="dyld" 3053 lt_cv_dlopen_libs= 3054 lt_cv_dlopen_self=yes 3055 ]) 3056 ;; 3057 3058 *) 3059 AC_CHECK_FUNC([shl_load], 3060 [lt_cv_dlopen="shl_load"], 3061 [AC_CHECK_LIB([dld], [shl_load], 3062 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 3063 [AC_CHECK_FUNC([dlopen], 3064 [lt_cv_dlopen="dlopen"], 3065 [AC_CHECK_LIB([dl], [dlopen], 3066 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3067 [AC_CHECK_LIB([svld], [dlopen], 3068 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3069 [AC_CHECK_LIB([dld], [dld_link], 3070 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 3071 ]) 3072 ]) 3073 ]) 3074 ]) 3075 ]) 3076 ;; 3077 esac 3078 3079 if test "x$lt_cv_dlopen" != xno; then 3080 enable_dlopen=yes 3081 else 3082 enable_dlopen=no 3083 fi 3084 3085 case $lt_cv_dlopen in 3086 dlopen) 3087 save_CPPFLAGS="$CPPFLAGS" 3088 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3089 3090 save_LDFLAGS="$LDFLAGS" 3091 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3092 3093 save_LIBS="$LIBS" 3094 LIBS="$lt_cv_dlopen_libs $LIBS" 3095 3096 AC_CACHE_CHECK([whether a program can dlopen itself], 3097 lt_cv_dlopen_self, [dnl 3098 _LT_TRY_DLOPEN_SELF( 3099 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3100 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3101 ]) 3102 3103 if test "x$lt_cv_dlopen_self" = xyes; then 3104 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3105 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3106 lt_cv_dlopen_self_static, [dnl 3107 _LT_TRY_DLOPEN_SELF( 3108 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3109 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3110 ]) 3111 fi 3112 3113 CPPFLAGS="$save_CPPFLAGS" 3114 LDFLAGS="$save_LDFLAGS" 3115 LIBS="$save_LIBS" 3116 ;; 3117 esac 3118 3119 case $lt_cv_dlopen_self in 3120 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3121 *) enable_dlopen_self=unknown ;; 3122 esac 3123 3124 case $lt_cv_dlopen_self_static in 3125 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3126 *) enable_dlopen_self_static=unknown ;; 3127 esac 3128fi 3129_LT_DECL([dlopen_support], [enable_dlopen], [0], 3130 [Whether dlopen is supported]) 3131_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3132 [Whether dlopen of programs is supported]) 3133_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3134 [Whether dlopen of statically linked programs is supported]) 3135])# LT_SYS_DLOPEN_SELF 3136 3137# Old name: 3138AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3139dnl aclocal-1.4 backwards compatibility: 3140dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3141 3142 3143# _LT_COMPILER_C_O([TAGNAME]) 3144# --------------------------- 3145# Check to see if options -c and -o are simultaneously supported by compiler. 3146# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3147m4_defun([_LT_COMPILER_C_O], 3148[m4_require([_LT_DECL_SED])dnl 3149m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3150m4_require([_LT_TAG_COMPILER])dnl 3151AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3152 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3153 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3154 $RM -r conftest 2>/dev/null 3155 mkdir conftest 3156 cd conftest 3157 mkdir out 3158 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3159 3160 lt_compiler_flag="-o out/conftest2.$ac_objext" 3161 # Insert the option either (1) after the last *FLAGS variable, or 3162 # (2) before a word containing "conftest.", or (3) at the end. 3163 # Note that $ac_compile itself does not contain backslashes and begins 3164 # with a dollar sign (not a hyphen), so the echo should work correctly. 3165 lt_compile=`echo "$ac_compile" | $SED \ 3166 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3167 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3168 -e 's:$: $lt_compiler_flag:'` 3169 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3170 (eval "$lt_compile" 2>out/conftest.err) 3171 ac_status=$? 3172 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3173 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3174 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3175 then 3176 # The compiler can only warn and ignore the option if not recognized 3177 # So say no if there are warnings 3178 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3179 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3180 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3181 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3182 fi 3183 fi 3184 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3185 $RM conftest* 3186 # SGI C++ compiler will create directory out/ii_files/ for 3187 # template instantiation 3188 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3189 $RM out/* && rmdir out 3190 cd .. 3191 $RM -r conftest 3192 $RM conftest* 3193]) 3194_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3195 [Does compiler simultaneously support -c and -o options?]) 3196])# _LT_COMPILER_C_O 3197 3198 3199# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3200# ---------------------------------- 3201# Check to see if we can do hard links to lock some files if needed 3202m4_defun([_LT_COMPILER_FILE_LOCKS], 3203[m4_require([_LT_ENABLE_LOCK])dnl 3204m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3205_LT_COMPILER_C_O([$1]) 3206 3207hard_links="nottested" 3208if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3209 # do not overwrite the value of need_locks provided by the user 3210 AC_MSG_CHECKING([if we can lock with hard links]) 3211 hard_links=yes 3212 $RM conftest* 3213 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3214 touch conftest.a 3215 ln conftest.a conftest.b 2>&5 || hard_links=no 3216 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3217 AC_MSG_RESULT([$hard_links]) 3218 if test "$hard_links" = no; then 3219 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3220 need_locks=warn 3221 fi 3222else 3223 need_locks=no 3224fi 3225_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3226])# _LT_COMPILER_FILE_LOCKS 3227 3228 3229# _LT_CHECK_OBJDIR 3230# ---------------- 3231m4_defun([_LT_CHECK_OBJDIR], 3232[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3233[rm -f .libs 2>/dev/null 3234mkdir .libs 2>/dev/null 3235if test -d .libs; then 3236 lt_cv_objdir=.libs 3237else 3238 # MS-DOS does not allow filenames that begin with a dot. 3239 lt_cv_objdir=_libs 3240fi 3241rmdir .libs 2>/dev/null]) 3242objdir=$lt_cv_objdir 3243_LT_DECL([], [objdir], [0], 3244 [The name of the directory that contains temporary libtool files])dnl 3245m4_pattern_allow([LT_OBJDIR])dnl 3246AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3247 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3248])# _LT_CHECK_OBJDIR 3249 3250 3251# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3252# -------------------------------------- 3253# Check hardcoding attributes. 3254m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3255[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3256_LT_TAGVAR(hardcode_action, $1)= 3257if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3258 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3259 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3260 3261 # We can hardcode non-existent directories. 3262 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3263 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3264 # have to relink, otherwise we might link with an installed library 3265 # when we should be linking with a yet-to-be-installed one 3266 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3267 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3268 # Linking always hardcodes the temporary library directory. 3269 _LT_TAGVAR(hardcode_action, $1)=relink 3270 else 3271 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3272 _LT_TAGVAR(hardcode_action, $1)=immediate 3273 fi 3274else 3275 # We cannot hardcode anything, or else we can only hardcode existing 3276 # directories. 3277 _LT_TAGVAR(hardcode_action, $1)=unsupported 3278fi 3279AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3280 3281if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3282 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3283 # Fast installation is not supported 3284 enable_fast_install=no 3285elif test "$shlibpath_overrides_runpath" = yes || 3286 test "$enable_shared" = no; then 3287 # Fast installation is not necessary 3288 enable_fast_install=needless 3289fi 3290_LT_TAGDECL([], [hardcode_action], [0], 3291 [How to hardcode a shared library path into an executable]) 3292])# _LT_LINKER_HARDCODE_LIBPATH 3293 3294 3295# _LT_CMD_STRIPLIB 3296# ---------------- 3297m4_defun([_LT_CMD_STRIPLIB], 3298[m4_require([_LT_DECL_EGREP]) 3299striplib= 3300old_striplib= 3301AC_MSG_CHECKING([whether stripping libraries is possible]) 3302if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3303 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3304 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3305 AC_MSG_RESULT([yes]) 3306else 3307# FIXME - insert some real tests, host_os isn't really good enough 3308 case $host_os in 3309 darwin*) 3310 if test -n "$STRIP" ; then 3311 striplib="$STRIP -x" 3312 old_striplib="$STRIP -S" 3313 AC_MSG_RESULT([yes]) 3314 else 3315 AC_MSG_RESULT([no]) 3316 fi 3317 ;; 3318 *) 3319 AC_MSG_RESULT([no]) 3320 ;; 3321 esac 3322fi 3323_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3324_LT_DECL([], [striplib], [1]) 3325])# _LT_CMD_STRIPLIB 3326 3327 3328# _LT_SYS_DYNAMIC_LINKER([TAG]) 3329# ----------------------------- 3330# PORTME Fill in your ld.so characteristics 3331m4_defun([_LT_SYS_DYNAMIC_LINKER], 3332[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3333m4_require([_LT_DECL_EGREP])dnl 3334m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3335m4_require([_LT_DECL_OBJDUMP])dnl 3336m4_require([_LT_DECL_SED])dnl 3337m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3338AC_MSG_CHECKING([dynamic linker characteristics]) 3339m4_if([$1], 3340 [], [ 3341if test "$GCC" = yes; then 3342 case $host_os in 3343 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3344 *) lt_awk_arg="/^libraries:/" ;; 3345 esac 3346 case $host_os in 3347 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3348 *) lt_sed_strip_eq="s,=/,/,g" ;; 3349 esac 3350 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3351 case $lt_search_path_spec in 3352 *\;*) 3353 # if the path contains ";" then we assume it to be the separator 3354 # otherwise default to the standard path separator (i.e. ":") - it is 3355 # assumed that no part of a normal pathname contains ";" but that should 3356 # okay in the real world where ";" in dirpaths is itself problematic. 3357 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3358 ;; 3359 *) 3360 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3361 ;; 3362 esac 3363 # Ok, now we have the path, separated by spaces, we can step through it 3364 # and add multilib dir if necessary. 3365 lt_tmp_lt_search_path_spec= 3366 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3367 for lt_sys_path in $lt_search_path_spec; do 3368 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3369 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3370 else 3371 test -d "$lt_sys_path" && \ 3372 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3373 fi 3374 done 3375 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3376BEGIN {RS=" "; FS="/|\n";} { 3377 lt_foo=""; 3378 lt_count=0; 3379 for (lt_i = NF; lt_i > 0; lt_i--) { 3380 if ($lt_i != "" && $lt_i != ".") { 3381 if ($lt_i == "..") { 3382 lt_count++; 3383 } else { 3384 if (lt_count == 0) { 3385 lt_foo="/" $lt_i lt_foo; 3386 } else { 3387 lt_count--; 3388 } 3389 } 3390 } 3391 } 3392 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3393 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3394}'` 3395 # AWK program above erroneously prepends '/' to C:/dos/paths 3396 # for these hosts. 3397 case $host_os in 3398 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3399 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3400 esac 3401 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3402else 3403 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3404fi]) 3405library_names_spec= 3406libname_spec='lib$name' 3407soname_spec= 3408shrext_cmds=".so" 3409postinstall_cmds= 3410postuninstall_cmds= 3411finish_cmds= 3412finish_eval= 3413shlibpath_var= 3414shlibpath_overrides_runpath=unknown 3415version_type=none 3416dynamic_linker="$host_os ld.so" 3417sys_lib_dlsearch_path_spec="/lib /usr/lib" 3418need_lib_prefix=unknown 3419hardcode_into_libs=no 3420 3421# when you set need_version to no, make sure it does not cause -set_version 3422# flags to be left without arguments 3423need_version=unknown 3424 3425case $host_os in 3426aix3*) 3427 version_type=linux # correct to gnu/linux during the next big refactor 3428 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3429 shlibpath_var=LIBPATH 3430 3431 # AIX 3 has no versioning support, so we append a major version to the name. 3432 soname_spec='${libname}${release}${shared_ext}$major' 3433 ;; 3434 3435aix[[4-9]]*) 3436 version_type=linux # correct to gnu/linux during the next big refactor 3437 need_lib_prefix=no 3438 need_version=no 3439 hardcode_into_libs=yes 3440 if test "$host_cpu" = ia64; then 3441 # AIX 5 supports IA64 3442 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3443 shlibpath_var=LD_LIBRARY_PATH 3444 else 3445 # With GCC up to 2.95.x, collect2 would create an import file 3446 # for dependence libraries. The import file would start with 3447 # the line `#! .'. This would cause the generated library to 3448 # depend on `.', always an invalid library. This was fixed in 3449 # development snapshots of GCC prior to 3.0. 3450 case $host_os in 3451 aix4 | aix4.[[01]] | aix4.[[01]].*) 3452 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3453 echo ' yes ' 3454 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3455 : 3456 else 3457 can_build_shared=no 3458 fi 3459 ;; 3460 esac 3461 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3462 # soname into executable. Probably we can add versioning support to 3463 # collect2, so additional links can be useful in future. 3464 if test "$aix_use_runtimelinking" = yes; then 3465 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3466 # instead of lib<name>.a to let people know that these are not 3467 # typical AIX shared libraries. 3468 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3469 else 3470 # We preserve .a as extension for shared libraries through AIX4.2 3471 # and later when we are not doing run time linking. 3472 library_names_spec='${libname}${release}.a $libname.a' 3473 soname_spec='${libname}${release}${shared_ext}$major' 3474 fi 3475 shlibpath_var=LIBPATH 3476 fi 3477 ;; 3478 3479amigaos*) 3480 case $host_cpu in 3481 powerpc) 3482 # Since July 2007 AmigaOS4 officially supports .so libraries. 3483 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3484 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3485 ;; 3486 m68k) 3487 library_names_spec='$libname.ixlibrary $libname.a' 3488 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3489 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' 3490 ;; 3491 esac 3492 ;; 3493 3494beos*) 3495 library_names_spec='${libname}${shared_ext}' 3496 dynamic_linker="$host_os ld.so" 3497 shlibpath_var=LIBRARY_PATH 3498 ;; 3499 3500bsdi[[45]]*) 3501 version_type=linux # correct to gnu/linux during the next big refactor 3502 need_version=no 3503 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3504 soname_spec='${libname}${release}${shared_ext}$major' 3505 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3506 shlibpath_var=LD_LIBRARY_PATH 3507 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3508 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3509 # the default ld.so.conf also contains /usr/contrib/lib and 3510 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3511 # libtool to hard-code these into programs 3512 ;; 3513 3514cygwin* | mingw* | pw32* | cegcc*) 3515 version_type=windows 3516 shrext_cmds=".dll" 3517 need_version=no 3518 need_lib_prefix=no 3519 3520 case $GCC,$cc_basename in 3521 yes,*) 3522 # gcc 3523 library_names_spec='$libname.dll.a' 3524 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3525 postinstall_cmds='base_file=`basename \${file}`~ 3526 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3527 dldir=$destdir/`dirname \$dlpath`~ 3528 test -d \$dldir || mkdir -p \$dldir~ 3529 $install_prog $dir/$dlname \$dldir/$dlname~ 3530 chmod a+x \$dldir/$dlname~ 3531 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3532 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3533 fi' 3534 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3535 dlpath=$dir/\$dldll~ 3536 $RM \$dlpath' 3537 shlibpath_overrides_runpath=yes 3538 3539 case $host_os in 3540 cygwin*) 3541 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3542 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3543m4_if([$1], [],[ 3544 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3545 ;; 3546 mingw* | cegcc*) 3547 # MinGW DLLs use traditional 'lib' prefix 3548 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3549 ;; 3550 pw32*) 3551 # pw32 DLLs use 'pw' prefix rather than 'lib' 3552 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3553 ;; 3554 esac 3555 dynamic_linker='Win32 ld.exe' 3556 ;; 3557 3558 *,cl*) 3559 # Native MSVC 3560 libname_spec='$name' 3561 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3562 library_names_spec='${libname}.dll.lib' 3563 3564 case $build_os in 3565 mingw*) 3566 sys_lib_search_path_spec= 3567 lt_save_ifs=$IFS 3568 IFS=';' 3569 for lt_path in $LIB 3570 do 3571 IFS=$lt_save_ifs 3572 # Let DOS variable expansion print the short 8.3 style file name. 3573 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3574 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3575 done 3576 IFS=$lt_save_ifs 3577 # Convert to MSYS style. 3578 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3579 ;; 3580 cygwin*) 3581 # Convert to unix form, then to dos form, then back to unix form 3582 # but this time dos style (no spaces!) so that the unix form looks 3583 # like /cygdrive/c/PROGRA~1:/cygdr... 3584 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3585 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3586 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3587 ;; 3588 *) 3589 sys_lib_search_path_spec="$LIB" 3590 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3591 # It is most probably a Windows format PATH. 3592 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3593 else 3594 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3595 fi 3596 # FIXME: find the short name or the path components, as spaces are 3597 # common. (e.g. "Program Files" -> "PROGRA~1") 3598 ;; 3599 esac 3600 3601 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3602 postinstall_cmds='base_file=`basename \${file}`~ 3603 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3604 dldir=$destdir/`dirname \$dlpath`~ 3605 test -d \$dldir || mkdir -p \$dldir~ 3606 $install_prog $dir/$dlname \$dldir/$dlname' 3607 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3608 dlpath=$dir/\$dldll~ 3609 $RM \$dlpath' 3610 shlibpath_overrides_runpath=yes 3611 dynamic_linker='Win32 link.exe' 3612 ;; 3613 3614 *) 3615 # Assume MSVC wrapper 3616 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3617 dynamic_linker='Win32 ld.exe' 3618 ;; 3619 esac 3620 # FIXME: first we should search . and the directory the executable is in 3621 shlibpath_var=PATH 3622 ;; 3623 3624darwin* | rhapsody*) 3625 dynamic_linker="$host_os dyld" 3626 version_type=darwin 3627 need_lib_prefix=no 3628 need_version=no 3629 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3630 soname_spec='${libname}${release}${major}$shared_ext' 3631 shlibpath_overrides_runpath=yes 3632 shlibpath_var=DYLD_LIBRARY_PATH 3633 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3634m4_if([$1], [],[ 3635 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3636 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3637 ;; 3638 3639dgux*) 3640 version_type=linux # correct to gnu/linux during the next big refactor 3641 need_lib_prefix=no 3642 need_version=no 3643 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3644 soname_spec='${libname}${release}${shared_ext}$major' 3645 shlibpath_var=LD_LIBRARY_PATH 3646 ;; 3647 3648freebsd* | dragonfly*) 3649 # DragonFly does not have aout. When/if they implement a new 3650 # versioning mechanism, adjust this. 3651 if test -x /usr/bin/objformat; then 3652 objformat=`/usr/bin/objformat` 3653 else 3654 case $host_os in 3655 freebsd[[23]].*) objformat=aout ;; 3656 *) objformat=elf ;; 3657 esac 3658 fi 3659 version_type=freebsd-$objformat 3660 case $version_type in 3661 freebsd-elf*) 3662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3663 need_version=no 3664 need_lib_prefix=no 3665 ;; 3666 freebsd-*) 3667 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3668 need_version=yes 3669 ;; 3670 esac 3671 shlibpath_var=LD_LIBRARY_PATH 3672 case $host_os in 3673 freebsd2.*) 3674 shlibpath_overrides_runpath=yes 3675 ;; 3676 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3677 shlibpath_overrides_runpath=yes 3678 hardcode_into_libs=yes 3679 ;; 3680 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3681 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3682 shlibpath_overrides_runpath=no 3683 hardcode_into_libs=yes 3684 ;; 3685 *) # from 4.6 on, and DragonFly 3686 shlibpath_overrides_runpath=yes 3687 hardcode_into_libs=yes 3688 ;; 3689 esac 3690 ;; 3691 3692gnu*) 3693 version_type=linux # correct to gnu/linux during the next big refactor 3694 need_lib_prefix=no 3695 need_version=no 3696 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3697 soname_spec='${libname}${release}${shared_ext}$major' 3698 shlibpath_var=LD_LIBRARY_PATH 3699 shlibpath_overrides_runpath=no 3700 hardcode_into_libs=yes 3701 ;; 3702 3703haiku*) 3704 version_type=linux # correct to gnu/linux during the next big refactor 3705 need_lib_prefix=no 3706 need_version=no 3707 dynamic_linker="$host_os runtime_loader" 3708 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3709 soname_spec='${libname}${release}${shared_ext}$major' 3710 shlibpath_var=LIBRARY_PATH 3711 shlibpath_overrides_runpath=yes 3712 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3713 hardcode_into_libs=yes 3714 ;; 3715 3716hpux9* | hpux10* | hpux11*) 3717 # Give a soname corresponding to the major version so that dld.sl refuses to 3718 # link against other versions. 3719 version_type=sunos 3720 need_lib_prefix=no 3721 need_version=no 3722 case $host_cpu in 3723 ia64*) 3724 shrext_cmds='.so' 3725 hardcode_into_libs=yes 3726 dynamic_linker="$host_os dld.so" 3727 shlibpath_var=LD_LIBRARY_PATH 3728 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3729 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3730 soname_spec='${libname}${release}${shared_ext}$major' 3731 if test "X$HPUX_IA64_MODE" = X32; then 3732 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3733 else 3734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3735 fi 3736 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3737 ;; 3738 hppa*64*) 3739 shrext_cmds='.sl' 3740 hardcode_into_libs=yes 3741 dynamic_linker="$host_os dld.sl" 3742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3744 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3745 soname_spec='${libname}${release}${shared_ext}$major' 3746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3748 ;; 3749 *) 3750 shrext_cmds='.sl' 3751 dynamic_linker="$host_os dld.sl" 3752 shlibpath_var=SHLIB_PATH 3753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3754 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3755 soname_spec='${libname}${release}${shared_ext}$major' 3756 ;; 3757 esac 3758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3759 postinstall_cmds='chmod 555 $lib' 3760 # or fails outright, so override atomically: 3761 install_override_mode=555 3762 ;; 3763 3764interix[[3-9]]*) 3765 version_type=linux # correct to gnu/linux during the next big refactor 3766 need_lib_prefix=no 3767 need_version=no 3768 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3769 soname_spec='${libname}${release}${shared_ext}$major' 3770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3771 shlibpath_var=LD_LIBRARY_PATH 3772 shlibpath_overrides_runpath=no 3773 hardcode_into_libs=yes 3774 ;; 3775 3776irix5* | irix6* | nonstopux*) 3777 case $host_os in 3778 nonstopux*) version_type=nonstopux ;; 3779 *) 3780 if test "$lt_cv_prog_gnu_ld" = yes; then 3781 version_type=linux # correct to gnu/linux during the next big refactor 3782 else 3783 version_type=irix 3784 fi ;; 3785 esac 3786 need_lib_prefix=no 3787 need_version=no 3788 soname_spec='${libname}${release}${shared_ext}$major' 3789 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3790 case $host_os in 3791 irix5* | nonstopux*) 3792 libsuff= shlibsuff= 3793 ;; 3794 *) 3795 case $LD in # libtool.m4 will add one of these switches to LD 3796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3797 libsuff= shlibsuff= libmagic=32-bit;; 3798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3799 libsuff=32 shlibsuff=N32 libmagic=N32;; 3800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3801 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3802 *) libsuff= shlibsuff= libmagic=never-match;; 3803 esac 3804 ;; 3805 esac 3806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3807 shlibpath_overrides_runpath=no 3808 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3809 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3810 hardcode_into_libs=yes 3811 ;; 3812 3813# No shared lib support for Linux oldld, aout, or coff. 3814linux*oldld* | linux*aout* | linux*coff*) 3815 dynamic_linker=no 3816 ;; 3817 3818# This must be glibc/ELF. 3819linux* | k*bsd*-gnu | kopensolaris*-gnu) 3820 version_type=linux # correct to gnu/linux during the next big refactor 3821 need_lib_prefix=no 3822 need_version=no 3823 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3824 soname_spec='${libname}${release}${shared_ext}$major' 3825 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3826 shlibpath_var=LD_LIBRARY_PATH 3827 shlibpath_overrides_runpath=no 3828 3829 # Some binutils ld are patched to set DT_RUNPATH 3830 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3831 [lt_cv_shlibpath_overrides_runpath=no 3832 save_LDFLAGS=$LDFLAGS 3833 save_libdir=$libdir 3834 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3835 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3836 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3837 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3838 [lt_cv_shlibpath_overrides_runpath=yes])]) 3839 LDFLAGS=$save_LDFLAGS 3840 libdir=$save_libdir 3841 ]) 3842 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3843 3844 # This implies no fast_install, which is unacceptable. 3845 # Some rework will be needed to allow for fast_install 3846 # before this can be enabled. 3847 hardcode_into_libs=yes 3848 3849 # Append ld.so.conf contents to the search path 3850 if test -f /etc/ld.so.conf; then 3851 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' ' '` 3852 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3853 fi 3854 3855 # We used to test for /lib/ld.so.1 and disable shared libraries on 3856 # powerpc, because MkLinux only supported shared libraries with the 3857 # GNU dynamic linker. Since this was broken with cross compilers, 3858 # most powerpc-linux boxes support dynamic linking these days and 3859 # people can always --disable-shared, the test was removed, and we 3860 # assume the GNU/Linux dynamic linker is in use. 3861 dynamic_linker='GNU/Linux ld.so' 3862 ;; 3863 3864netbsd*) 3865 version_type=sunos 3866 need_lib_prefix=no 3867 need_version=no 3868 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3869 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3870 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3871 dynamic_linker='NetBSD (a.out) ld.so' 3872 else 3873 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3874 soname_spec='${libname}${release}${shared_ext}$major' 3875 dynamic_linker='NetBSD ld.elf_so' 3876 fi 3877 shlibpath_var=LD_LIBRARY_PATH 3878 shlibpath_overrides_runpath=yes 3879 hardcode_into_libs=yes 3880 ;; 3881 3882newsos6) 3883 version_type=linux # correct to gnu/linux during the next big refactor 3884 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3885 shlibpath_var=LD_LIBRARY_PATH 3886 shlibpath_overrides_runpath=yes 3887 ;; 3888 3889*nto* | *qnx*) 3890 version_type=qnx 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 soname_spec='${libname}${release}${shared_ext}$major' 3895 shlibpath_var=LD_LIBRARY_PATH 3896 shlibpath_overrides_runpath=no 3897 hardcode_into_libs=yes 3898 dynamic_linker='ldqnx.so' 3899 ;; 3900 3901openbsd*) 3902 version_type=sunos 3903 sys_lib_dlsearch_path_spec="/usr/lib" 3904 need_lib_prefix=no 3905 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3906 case $host_os in 3907 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3908 *) need_version=no ;; 3909 esac 3910 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3911 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3912 shlibpath_var=LD_LIBRARY_PATH 3913 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3914 case $host_os in 3915 openbsd2.[[89]] | openbsd2.[[89]].*) 3916 shlibpath_overrides_runpath=no 3917 ;; 3918 *) 3919 shlibpath_overrides_runpath=yes 3920 ;; 3921 esac 3922 else 3923 shlibpath_overrides_runpath=yes 3924 fi 3925 ;; 3926 3927os2*) 3928 libname_spec='$name' 3929 shrext_cmds=".dll" 3930 need_lib_prefix=no 3931 library_names_spec='$libname${shared_ext} $libname.a' 3932 dynamic_linker='OS/2 ld.exe' 3933 shlibpath_var=LIBPATH 3934 ;; 3935 3936osf3* | osf4* | osf5*) 3937 version_type=osf 3938 need_lib_prefix=no 3939 need_version=no 3940 soname_spec='${libname}${release}${shared_ext}$major' 3941 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3942 shlibpath_var=LD_LIBRARY_PATH 3943 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3944 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3945 ;; 3946 3947rdos*) 3948 dynamic_linker=no 3949 ;; 3950 3951solaris*) 3952 version_type=linux # correct to gnu/linux during the next big refactor 3953 need_lib_prefix=no 3954 need_version=no 3955 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3956 soname_spec='${libname}${release}${shared_ext}$major' 3957 shlibpath_var=LD_LIBRARY_PATH 3958 shlibpath_overrides_runpath=yes 3959 hardcode_into_libs=yes 3960 # ldd complains unless libraries are executable 3961 postinstall_cmds='chmod +x $lib' 3962 ;; 3963 3964sunos4*) 3965 version_type=sunos 3966 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3967 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3968 shlibpath_var=LD_LIBRARY_PATH 3969 shlibpath_overrides_runpath=yes 3970 if test "$with_gnu_ld" = yes; then 3971 need_lib_prefix=no 3972 fi 3973 need_version=yes 3974 ;; 3975 3976sysv4 | sysv4.3*) 3977 version_type=linux # correct to gnu/linux during the next big refactor 3978 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3979 soname_spec='${libname}${release}${shared_ext}$major' 3980 shlibpath_var=LD_LIBRARY_PATH 3981 case $host_vendor in 3982 sni) 3983 shlibpath_overrides_runpath=no 3984 need_lib_prefix=no 3985 runpath_var=LD_RUN_PATH 3986 ;; 3987 siemens) 3988 need_lib_prefix=no 3989 ;; 3990 motorola) 3991 need_lib_prefix=no 3992 need_version=no 3993 shlibpath_overrides_runpath=no 3994 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3995 ;; 3996 esac 3997 ;; 3998 3999sysv4*MP*) 4000 if test -d /usr/nec ;then 4001 version_type=linux # correct to gnu/linux during the next big refactor 4002 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 4003 soname_spec='$libname${shared_ext}.$major' 4004 shlibpath_var=LD_LIBRARY_PATH 4005 fi 4006 ;; 4007 4008sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4009 version_type=freebsd-elf 4010 need_lib_prefix=no 4011 need_version=no 4012 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4013 soname_spec='${libname}${release}${shared_ext}$major' 4014 shlibpath_var=LD_LIBRARY_PATH 4015 shlibpath_overrides_runpath=yes 4016 hardcode_into_libs=yes 4017 if test "$with_gnu_ld" = yes; then 4018 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 4019 else 4020 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 4021 case $host_os in 4022 sco3.2v5*) 4023 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 4024 ;; 4025 esac 4026 fi 4027 sys_lib_dlsearch_path_spec='/usr/lib' 4028 ;; 4029 4030tpf*) 4031 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 4032 version_type=linux # correct to gnu/linux during the next big refactor 4033 need_lib_prefix=no 4034 need_version=no 4035 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4036 shlibpath_var=LD_LIBRARY_PATH 4037 shlibpath_overrides_runpath=no 4038 hardcode_into_libs=yes 4039 ;; 4040 4041uts4*) 4042 version_type=linux # correct to gnu/linux during the next big refactor 4043 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4044 soname_spec='${libname}${release}${shared_ext}$major' 4045 shlibpath_var=LD_LIBRARY_PATH 4046 ;; 4047 4048*) 4049 dynamic_linker=no 4050 ;; 4051esac 4052AC_MSG_RESULT([$dynamic_linker]) 4053test "$dynamic_linker" = no && can_build_shared=no 4054 4055variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4056if test "$GCC" = yes; then 4057 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4058fi 4059 4060if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4061 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4062fi 4063if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4064 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4065fi 4066 4067_LT_DECL([], [variables_saved_for_relink], [1], 4068 [Variables whose values should be saved in libtool wrapper scripts and 4069 restored at link time]) 4070_LT_DECL([], [need_lib_prefix], [0], 4071 [Do we need the "lib" prefix for modules?]) 4072_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4073_LT_DECL([], [version_type], [0], [Library versioning type]) 4074_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4075_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4076_LT_DECL([], [shlibpath_overrides_runpath], [0], 4077 [Is shlibpath searched before the hard-coded library search path?]) 4078_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4079_LT_DECL([], [library_names_spec], [1], 4080 [[List of archive names. First name is the real one, the rest are links. 4081 The last name is the one that the linker finds with -lNAME]]) 4082_LT_DECL([], [soname_spec], [1], 4083 [[The coded name of the library, if different from the real name]]) 4084_LT_DECL([], [install_override_mode], [1], 4085 [Permission mode override for installation of shared libraries]) 4086_LT_DECL([], [postinstall_cmds], [2], 4087 [Command to use after installation of a shared archive]) 4088_LT_DECL([], [postuninstall_cmds], [2], 4089 [Command to use after uninstallation of a shared archive]) 4090_LT_DECL([], [finish_cmds], [2], 4091 [Commands used to finish a libtool library installation in a directory]) 4092_LT_DECL([], [finish_eval], [1], 4093 [[As "finish_cmds", except a single script fragment to be evaled but 4094 not shown]]) 4095_LT_DECL([], [hardcode_into_libs], [0], 4096 [Whether we should hardcode library paths into libraries]) 4097_LT_DECL([], [sys_lib_search_path_spec], [2], 4098 [Compile-time system search path for libraries]) 4099_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4100 [Run-time system search path for libraries]) 4101])# _LT_SYS_DYNAMIC_LINKER 4102 4103 4104# _LT_PATH_TOOL_PREFIX(TOOL) 4105# -------------------------- 4106# find a file program which can recognize shared library 4107AC_DEFUN([_LT_PATH_TOOL_PREFIX], 4108[m4_require([_LT_DECL_EGREP])dnl 4109AC_MSG_CHECKING([for $1]) 4110AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4111[case $MAGIC_CMD in 4112[[\\/*] | ?:[\\/]*]) 4113 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4114 ;; 4115*) 4116 lt_save_MAGIC_CMD="$MAGIC_CMD" 4117 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4118dnl $ac_dummy forces splitting on constant user-supplied paths. 4119dnl POSIX.2 word splitting is done only on the output of word expansions, 4120dnl not every word. This closes a longstanding sh security hole. 4121 ac_dummy="m4_if([$2], , $PATH, [$2])" 4122 for ac_dir in $ac_dummy; do 4123 IFS="$lt_save_ifs" 4124 test -z "$ac_dir" && ac_dir=. 4125 if test -f $ac_dir/$1; then 4126 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4127 if test -n "$file_magic_test_file"; then 4128 case $deplibs_check_method in 4129 "file_magic "*) 4130 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4131 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4132 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4133 $EGREP "$file_magic_regex" > /dev/null; then 4134 : 4135 else 4136 cat <<_LT_EOF 1>&2 4137 4138*** Warning: the command libtool uses to detect shared libraries, 4139*** $file_magic_cmd, produces output that libtool cannot recognize. 4140*** The result is that libtool may fail to recognize shared libraries 4141*** as such. This will affect the creation of libtool libraries that 4142*** depend on shared libraries, but programs linked with such libtool 4143*** libraries will work regardless of this problem. Nevertheless, you 4144*** may want to report the problem to your system manager and/or to 4145*** bug-libtool@gnu.org 4146 4147_LT_EOF 4148 fi ;; 4149 esac 4150 fi 4151 break 4152 fi 4153 done 4154 IFS="$lt_save_ifs" 4155 MAGIC_CMD="$lt_save_MAGIC_CMD" 4156 ;; 4157esac]) 4158MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4159if test -n "$MAGIC_CMD"; then 4160 AC_MSG_RESULT($MAGIC_CMD) 4161else 4162 AC_MSG_RESULT(no) 4163fi 4164_LT_DECL([], [MAGIC_CMD], [0], 4165 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4166])# _LT_PATH_TOOL_PREFIX 4167 4168# Old name: 4169AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4170dnl aclocal-1.4 backwards compatibility: 4171dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4172 4173 4174# _LT_PATH_MAGIC 4175# -------------- 4176# find a file program which can recognize a shared library 4177m4_defun([_LT_PATH_MAGIC], 4178[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4179if test -z "$lt_cv_path_MAGIC_CMD"; then 4180 if test -n "$ac_tool_prefix"; then 4181 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4182 else 4183 MAGIC_CMD=: 4184 fi 4185fi 4186])# _LT_PATH_MAGIC 4187 4188 4189# LT_PATH_LD 4190# ---------- 4191# find the pathname to the GNU or non-GNU linker 4192AC_DEFUN([LT_PATH_LD], 4193[AC_REQUIRE([AC_PROG_CC])dnl 4194AC_REQUIRE([AC_CANONICAL_HOST])dnl 4195AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4196m4_require([_LT_DECL_SED])dnl 4197m4_require([_LT_DECL_EGREP])dnl 4198m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4199 4200AC_ARG_WITH([gnu-ld], 4201 [AS_HELP_STRING([--with-gnu-ld], 4202 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4203 [test "$withval" = no || with_gnu_ld=yes], 4204 [with_gnu_ld=no])dnl 4205 4206ac_prog=ld 4207if test "$GCC" = yes; then 4208 # Check if gcc -print-prog-name=ld gives a path. 4209 AC_MSG_CHECKING([for ld used by $CC]) 4210 case $host in 4211 *-*-mingw*) 4212 # gcc leaves a trailing carriage return which upsets mingw 4213 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4214 *) 4215 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4216 esac 4217 case $ac_prog in 4218 # Accept absolute paths. 4219 [[\\/]]* | ?:[[\\/]]*) 4220 re_direlt='/[[^/]][[^/]]*/\.\./' 4221 # Canonicalize the pathname of ld 4222 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4223 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4224 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4225 done 4226 test -z "$LD" && LD="$ac_prog" 4227 ;; 4228 "") 4229 # If it fails, then pretend we aren't using GCC. 4230 ac_prog=ld 4231 ;; 4232 *) 4233 # If it is relative, then search for the first ld in PATH. 4234 with_gnu_ld=unknown 4235 ;; 4236 esac 4237elif test "$with_gnu_ld" = yes; then 4238 AC_MSG_CHECKING([for GNU ld]) 4239else 4240 AC_MSG_CHECKING([for non-GNU ld]) 4241fi 4242AC_CACHE_VAL(lt_cv_path_LD, 4243[if test -z "$LD"; then 4244 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4245 for ac_dir in $PATH; do 4246 IFS="$lt_save_ifs" 4247 test -z "$ac_dir" && ac_dir=. 4248 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4249 lt_cv_path_LD="$ac_dir/$ac_prog" 4250 # Check to see if the program is GNU ld. I'd rather use --version, 4251 # but apparently some variants of GNU ld only accept -v. 4252 # Break only if it was the GNU/non-GNU ld that we prefer. 4253 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4254 *GNU* | *'with BFD'*) 4255 test "$with_gnu_ld" != no && break 4256 ;; 4257 *) 4258 test "$with_gnu_ld" != yes && break 4259 ;; 4260 esac 4261 fi 4262 done 4263 IFS="$lt_save_ifs" 4264else 4265 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4266fi]) 4267LD="$lt_cv_path_LD" 4268if test -n "$LD"; then 4269 AC_MSG_RESULT($LD) 4270else 4271 AC_MSG_RESULT(no) 4272fi 4273test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4274_LT_PATH_LD_GNU 4275AC_SUBST([LD]) 4276 4277_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4278])# LT_PATH_LD 4279 4280# Old names: 4281AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4282AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4283dnl aclocal-1.4 backwards compatibility: 4284dnl AC_DEFUN([AM_PROG_LD], []) 4285dnl AC_DEFUN([AC_PROG_LD], []) 4286 4287 4288# _LT_PATH_LD_GNU 4289#- -------------- 4290m4_defun([_LT_PATH_LD_GNU], 4291[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4292[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4293case `$LD -v 2>&1 </dev/null` in 4294*GNU* | *'with BFD'*) 4295 lt_cv_prog_gnu_ld=yes 4296 ;; 4297*) 4298 lt_cv_prog_gnu_ld=no 4299 ;; 4300esac]) 4301with_gnu_ld=$lt_cv_prog_gnu_ld 4302])# _LT_PATH_LD_GNU 4303 4304 4305# _LT_CMD_RELOAD 4306# -------------- 4307# find reload flag for linker 4308# -- PORTME Some linkers may need a different reload flag. 4309m4_defun([_LT_CMD_RELOAD], 4310[AC_CACHE_CHECK([for $LD option to reload object files], 4311 lt_cv_ld_reload_flag, 4312 [lt_cv_ld_reload_flag='-r']) 4313reload_flag=$lt_cv_ld_reload_flag 4314case $reload_flag in 4315"" | " "*) ;; 4316*) reload_flag=" $reload_flag" ;; 4317esac 4318reload_cmds='$LD$reload_flag -o $output$reload_objs' 4319case $host_os in 4320 cygwin* | mingw* | pw32* | cegcc*) 4321 if test "$GCC" != yes; then 4322 reload_cmds=false 4323 fi 4324 ;; 4325 darwin*) 4326 if test "$GCC" = yes; then 4327 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4328 else 4329 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4330 fi 4331 ;; 4332esac 4333_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4334_LT_TAGDECL([], [reload_cmds], [2])dnl 4335])# _LT_CMD_RELOAD 4336 4337 4338# _LT_CHECK_MAGIC_METHOD 4339# ---------------------- 4340# how to check for library dependencies 4341# -- PORTME fill in with the dynamic library characteristics 4342m4_defun([_LT_CHECK_MAGIC_METHOD], 4343[m4_require([_LT_DECL_EGREP]) 4344m4_require([_LT_DECL_OBJDUMP]) 4345AC_CACHE_CHECK([how to recognize dependent libraries], 4346lt_cv_deplibs_check_method, 4347[lt_cv_file_magic_cmd='$MAGIC_CMD' 4348lt_cv_file_magic_test_file= 4349lt_cv_deplibs_check_method='unknown' 4350# Need to set the preceding variable on all platforms that support 4351# interlibrary dependencies. 4352# 'none' -- dependencies not supported. 4353# `unknown' -- same as none, but documents that we really don't know. 4354# 'pass_all' -- all dependencies passed with no checks. 4355# 'test_compile' -- check by making test program. 4356# 'file_magic [[regex]]' -- check by looking for files in library path 4357# which responds to the $file_magic_cmd with a given extended regex. 4358# If you have `file' or equivalent on your system and you're not sure 4359# whether `pass_all' will *always* work, you probably want this one. 4360 4361case $host_os in 4362aix[[4-9]]*) 4363 lt_cv_deplibs_check_method=pass_all 4364 ;; 4365 4366beos*) 4367 lt_cv_deplibs_check_method=pass_all 4368 ;; 4369 4370bsdi[[45]]*) 4371 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4372 lt_cv_file_magic_cmd='/usr/bin/file -L' 4373 lt_cv_file_magic_test_file=/shlib/libc.so 4374 ;; 4375 4376cygwin*) 4377 # func_win32_libid is a shell function defined in ltmain.sh 4378 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4379 lt_cv_file_magic_cmd='func_win32_libid' 4380 ;; 4381 4382mingw* | pw32*) 4383 # Base MSYS/MinGW do not provide the 'file' command needed by 4384 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4385 # unless we find 'file', for example because we are cross-compiling. 4386 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4387 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4388 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4389 lt_cv_file_magic_cmd='func_win32_libid' 4390 else 4391 # Keep this pattern in sync with the one in func_win32_libid. 4392 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4393 lt_cv_file_magic_cmd='$OBJDUMP -f' 4394 fi 4395 ;; 4396 4397cegcc*) 4398 # use the weaker test based on 'objdump'. See mingw*. 4399 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4400 lt_cv_file_magic_cmd='$OBJDUMP -f' 4401 ;; 4402 4403darwin* | rhapsody*) 4404 lt_cv_deplibs_check_method=pass_all 4405 ;; 4406 4407freebsd* | dragonfly*) 4408 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4409 case $host_cpu in 4410 i*86 ) 4411 # Not sure whether the presence of OpenBSD here was a mistake. 4412 # Let's accept both of them until this is cleared up. 4413 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4414 lt_cv_file_magic_cmd=/usr/bin/file 4415 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4416 ;; 4417 esac 4418 else 4419 lt_cv_deplibs_check_method=pass_all 4420 fi 4421 ;; 4422 4423gnu*) 4424 lt_cv_deplibs_check_method=pass_all 4425 ;; 4426 4427haiku*) 4428 lt_cv_deplibs_check_method=pass_all 4429 ;; 4430 4431hpux10.20* | hpux11*) 4432 lt_cv_file_magic_cmd=/usr/bin/file 4433 case $host_cpu in 4434 ia64*) 4435 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4436 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4437 ;; 4438 hppa*64*) 4439 [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]'] 4440 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4441 ;; 4442 *) 4443 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4444 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4445 ;; 4446 esac 4447 ;; 4448 4449interix[[3-9]]*) 4450 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4451 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4452 ;; 4453 4454irix5* | irix6* | nonstopux*) 4455 case $LD in 4456 *-32|*"-32 ") libmagic=32-bit;; 4457 *-n32|*"-n32 ") libmagic=N32;; 4458 *-64|*"-64 ") libmagic=64-bit;; 4459 *) libmagic=never-match;; 4460 esac 4461 lt_cv_deplibs_check_method=pass_all 4462 ;; 4463 4464# This must be glibc/ELF. 4465linux* | k*bsd*-gnu | kopensolaris*-gnu) 4466 lt_cv_deplibs_check_method=pass_all 4467 ;; 4468 4469netbsd*) 4470 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4471 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4472 else 4473 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4474 fi 4475 ;; 4476 4477newos6*) 4478 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4479 lt_cv_file_magic_cmd=/usr/bin/file 4480 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4481 ;; 4482 4483*nto* | *qnx*) 4484 lt_cv_deplibs_check_method=pass_all 4485 ;; 4486 4487openbsd*) 4488 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4489 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4490 else 4491 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4492 fi 4493 ;; 4494 4495osf3* | osf4* | osf5*) 4496 lt_cv_deplibs_check_method=pass_all 4497 ;; 4498 4499rdos*) 4500 lt_cv_deplibs_check_method=pass_all 4501 ;; 4502 4503solaris*) 4504 lt_cv_deplibs_check_method=pass_all 4505 ;; 4506 4507sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4508 lt_cv_deplibs_check_method=pass_all 4509 ;; 4510 4511sysv4 | sysv4.3*) 4512 case $host_vendor in 4513 motorola) 4514 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]]' 4515 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4516 ;; 4517 ncr) 4518 lt_cv_deplibs_check_method=pass_all 4519 ;; 4520 sequent) 4521 lt_cv_file_magic_cmd='/bin/file' 4522 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4523 ;; 4524 sni) 4525 lt_cv_file_magic_cmd='/bin/file' 4526 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4527 lt_cv_file_magic_test_file=/lib/libc.so 4528 ;; 4529 siemens) 4530 lt_cv_deplibs_check_method=pass_all 4531 ;; 4532 pc) 4533 lt_cv_deplibs_check_method=pass_all 4534 ;; 4535 esac 4536 ;; 4537 4538tpf*) 4539 lt_cv_deplibs_check_method=pass_all 4540 ;; 4541esac 4542]) 4543 4544file_magic_glob= 4545want_nocaseglob=no 4546if test "$build" = "$host"; then 4547 case $host_os in 4548 mingw* | pw32*) 4549 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4550 want_nocaseglob=yes 4551 else 4552 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4553 fi 4554 ;; 4555 esac 4556fi 4557 4558file_magic_cmd=$lt_cv_file_magic_cmd 4559deplibs_check_method=$lt_cv_deplibs_check_method 4560test -z "$deplibs_check_method" && deplibs_check_method=unknown 4561 4562_LT_DECL([], [deplibs_check_method], [1], 4563 [Method to check whether dependent libraries are shared objects]) 4564_LT_DECL([], [file_magic_cmd], [1], 4565 [Command to use when deplibs_check_method = "file_magic"]) 4566_LT_DECL([], [file_magic_glob], [1], 4567 [How to find potential files when deplibs_check_method = "file_magic"]) 4568_LT_DECL([], [want_nocaseglob], [1], 4569 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4570])# _LT_CHECK_MAGIC_METHOD 4571 4572 4573# LT_PATH_NM 4574# ---------- 4575# find the pathname to a BSD- or MS-compatible name lister 4576AC_DEFUN([LT_PATH_NM], 4577[AC_REQUIRE([AC_PROG_CC])dnl 4578AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4579[if test -n "$NM"; then 4580 # Let the user override the test. 4581 lt_cv_path_NM="$NM" 4582else 4583 lt_nm_to_check="${ac_tool_prefix}nm" 4584 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4585 lt_nm_to_check="$lt_nm_to_check nm" 4586 fi 4587 for lt_tmp_nm in $lt_nm_to_check; do 4588 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4589 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4590 IFS="$lt_save_ifs" 4591 test -z "$ac_dir" && ac_dir=. 4592 tmp_nm="$ac_dir/$lt_tmp_nm" 4593 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4594 # Check to see if the nm accepts a BSD-compat flag. 4595 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4596 # nm: unknown option "B" ignored 4597 # Tru64's nm complains that /dev/null is an invalid object file 4598 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4599 */dev/null* | *'Invalid file or object type'*) 4600 lt_cv_path_NM="$tmp_nm -B" 4601 break 4602 ;; 4603 *) 4604 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4605 */dev/null*) 4606 lt_cv_path_NM="$tmp_nm -p" 4607 break 4608 ;; 4609 *) 4610 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4611 continue # so that we can try to find one that supports BSD flags 4612 ;; 4613 esac 4614 ;; 4615 esac 4616 fi 4617 done 4618 IFS="$lt_save_ifs" 4619 done 4620 : ${lt_cv_path_NM=no} 4621fi]) 4622if test "$lt_cv_path_NM" != "no"; then 4623 NM="$lt_cv_path_NM" 4624else 4625 # Didn't find any BSD compatible name lister, look for dumpbin. 4626 if test -n "$DUMPBIN"; then : 4627 # Let the user override the test. 4628 else 4629 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4630 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4631 *COFF*) 4632 DUMPBIN="$DUMPBIN -symbols" 4633 ;; 4634 *) 4635 DUMPBIN=: 4636 ;; 4637 esac 4638 fi 4639 AC_SUBST([DUMPBIN]) 4640 if test "$DUMPBIN" != ":"; then 4641 NM="$DUMPBIN" 4642 fi 4643fi 4644test -z "$NM" && NM=nm 4645AC_SUBST([NM]) 4646_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4647 4648AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4649 [lt_cv_nm_interface="BSD nm" 4650 echo "int some_variable = 0;" > conftest.$ac_ext 4651 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4652 (eval "$ac_compile" 2>conftest.err) 4653 cat conftest.err >&AS_MESSAGE_LOG_FD 4654 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4655 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4656 cat conftest.err >&AS_MESSAGE_LOG_FD 4657 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4658 cat conftest.out >&AS_MESSAGE_LOG_FD 4659 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4660 lt_cv_nm_interface="MS dumpbin" 4661 fi 4662 rm -f conftest*]) 4663])# LT_PATH_NM 4664 4665# Old names: 4666AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4667AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4668dnl aclocal-1.4 backwards compatibility: 4669dnl AC_DEFUN([AM_PROG_NM], []) 4670dnl AC_DEFUN([AC_PROG_NM], []) 4671 4672# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4673# -------------------------------- 4674# how to determine the name of the shared library 4675# associated with a specific link library. 4676# -- PORTME fill in with the dynamic library characteristics 4677m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4678[m4_require([_LT_DECL_EGREP]) 4679m4_require([_LT_DECL_OBJDUMP]) 4680m4_require([_LT_DECL_DLLTOOL]) 4681AC_CACHE_CHECK([how to associate runtime and link libraries], 4682lt_cv_sharedlib_from_linklib_cmd, 4683[lt_cv_sharedlib_from_linklib_cmd='unknown' 4684 4685case $host_os in 4686cygwin* | mingw* | pw32* | cegcc*) 4687 # two different shell functions defined in ltmain.sh 4688 # decide which to use based on capabilities of $DLLTOOL 4689 case `$DLLTOOL --help 2>&1` in 4690 *--identify-strict*) 4691 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4692 ;; 4693 *) 4694 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4695 ;; 4696 esac 4697 ;; 4698*) 4699 # fallback: assume linklib IS sharedlib 4700 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4701 ;; 4702esac 4703]) 4704sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4705test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4706 4707_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4708 [Command to associate shared and link libraries]) 4709])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4710 4711 4712# _LT_PATH_MANIFEST_TOOL 4713# ---------------------- 4714# locate the manifest tool 4715m4_defun([_LT_PATH_MANIFEST_TOOL], 4716[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4717test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4718AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4719 [lt_cv_path_mainfest_tool=no 4720 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4721 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4722 cat conftest.err >&AS_MESSAGE_LOG_FD 4723 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4724 lt_cv_path_mainfest_tool=yes 4725 fi 4726 rm -f conftest*]) 4727if test "x$lt_cv_path_mainfest_tool" != xyes; then 4728 MANIFEST_TOOL=: 4729fi 4730_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4731])# _LT_PATH_MANIFEST_TOOL 4732 4733 4734# LT_LIB_M 4735# -------- 4736# check for math library 4737AC_DEFUN([LT_LIB_M], 4738[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4739LIBM= 4740case $host in 4741*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4742 # These system don't have libm, or don't need it 4743 ;; 4744*-ncr-sysv4.3*) 4745 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4746 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4747 ;; 4748*) 4749 AC_CHECK_LIB(m, cos, LIBM="-lm") 4750 ;; 4751esac 4752AC_SUBST([LIBM]) 4753])# LT_LIB_M 4754 4755# Old name: 4756AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4757dnl aclocal-1.4 backwards compatibility: 4758dnl AC_DEFUN([AC_CHECK_LIBM], []) 4759 4760 4761# _LT_COMPILER_NO_RTTI([TAGNAME]) 4762# ------------------------------- 4763m4_defun([_LT_COMPILER_NO_RTTI], 4764[m4_require([_LT_TAG_COMPILER])dnl 4765 4766_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4767 4768if test "$GCC" = yes; then 4769 case $cc_basename in 4770 nvcc*) 4771 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4772 *) 4773 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4774 esac 4775 4776 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4777 lt_cv_prog_compiler_rtti_exceptions, 4778 [-fno-rtti -fno-exceptions], [], 4779 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4780fi 4781_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4782 [Compiler flag to turn off builtin functions]) 4783])# _LT_COMPILER_NO_RTTI 4784 4785 4786# _LT_CMD_GLOBAL_SYMBOLS 4787# ---------------------- 4788m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4789[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4790AC_REQUIRE([AC_PROG_CC])dnl 4791AC_REQUIRE([AC_PROG_AWK])dnl 4792AC_REQUIRE([LT_PATH_NM])dnl 4793AC_REQUIRE([LT_PATH_LD])dnl 4794m4_require([_LT_DECL_SED])dnl 4795m4_require([_LT_DECL_EGREP])dnl 4796m4_require([_LT_TAG_COMPILER])dnl 4797 4798# Check for command to grab the raw symbol name followed by C symbol from nm. 4799AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4800AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4801[ 4802# These are sane defaults that work on at least a few old systems. 4803# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4804 4805# Character class describing NM global symbol codes. 4806symcode='[[BCDEGRST]]' 4807 4808# Regexp to match symbols that can be accessed directly from C. 4809sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4810 4811# Define system-specific variables. 4812case $host_os in 4813aix*) 4814 symcode='[[BCDT]]' 4815 ;; 4816cygwin* | mingw* | pw32* | cegcc*) 4817 symcode='[[ABCDGISTW]]' 4818 ;; 4819hpux*) 4820 if test "$host_cpu" = ia64; then 4821 symcode='[[ABCDEGRST]]' 4822 fi 4823 ;; 4824irix* | nonstopux*) 4825 symcode='[[BCDEGRST]]' 4826 ;; 4827osf*) 4828 symcode='[[BCDEGQRST]]' 4829 ;; 4830solaris*) 4831 symcode='[[BDRT]]' 4832 ;; 4833sco3.2v5*) 4834 symcode='[[DT]]' 4835 ;; 4836sysv4.2uw2*) 4837 symcode='[[DT]]' 4838 ;; 4839sysv5* | sco5v6* | unixware* | OpenUNIX*) 4840 symcode='[[ABDT]]' 4841 ;; 4842sysv4) 4843 symcode='[[DFNSTU]]' 4844 ;; 4845esac 4846 4847# If we're using GNU nm, then use its standard symbol codes. 4848case `$NM -V 2>&1` in 4849*GNU* | *'with BFD'*) 4850 symcode='[[ABCDGIRSTW]]' ;; 4851esac 4852 4853# Transform an extracted symbol line into a proper C declaration. 4854# Some systems (esp. on ia64) link data and code symbols differently, 4855# so use this general approach. 4856lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4857 4858# Transform an extracted symbol line into symbol name and symbol address 4859lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4860lt_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'" 4861 4862# Handle CRLF in mingw tool chain 4863opt_cr= 4864case $build_os in 4865mingw*) 4866 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4867 ;; 4868esac 4869 4870# Try without a prefix underscore, then with it. 4871for ac_symprfx in "" "_"; do 4872 4873 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4874 symxfrm="\\1 $ac_symprfx\\2 \\2" 4875 4876 # Write the raw and C identifiers. 4877 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4878 # Fake it for dumpbin and say T for any non-static function 4879 # and D for any global variable. 4880 # Also find C++ and __fastcall symbols from MSVC++, 4881 # which start with @ or ?. 4882 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4883" {last_section=section; section=\$ 3};"\ 4884" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4885" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4886" \$ 0!~/External *\|/{next};"\ 4887" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4888" {if(hide[section]) next};"\ 4889" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4890" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4891" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4892" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4893" ' prfx=^$ac_symprfx]" 4894 else 4895 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4896 fi 4897 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4898 4899 # Check to see that the pipe works correctly. 4900 pipe_works=no 4901 4902 rm -f conftest* 4903 cat > conftest.$ac_ext <<_LT_EOF 4904#ifdef __cplusplus 4905extern "C" { 4906#endif 4907char nm_test_var; 4908void nm_test_func(void); 4909void nm_test_func(void){} 4910#ifdef __cplusplus 4911} 4912#endif 4913int main(){nm_test_var='a';nm_test_func();return(0);} 4914_LT_EOF 4915 4916 if AC_TRY_EVAL(ac_compile); then 4917 # Now try to grab the symbols. 4918 nlist=conftest.nm 4919 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4920 # Try sorting and uniquifying the output. 4921 if sort "$nlist" | uniq > "$nlist"T; then 4922 mv -f "$nlist"T "$nlist" 4923 else 4924 rm -f "$nlist"T 4925 fi 4926 4927 # Make sure that we snagged all the symbols we need. 4928 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4929 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4930 cat <<_LT_EOF > conftest.$ac_ext 4931/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4932#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4933/* DATA imports from DLLs on WIN32 con't be const, because runtime 4934 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4935# define LT@&t@_DLSYM_CONST 4936#elif defined(__osf__) 4937/* This system does not cope well with relocations in const data. */ 4938# define LT@&t@_DLSYM_CONST 4939#else 4940# define LT@&t@_DLSYM_CONST const 4941#endif 4942 4943#ifdef __cplusplus 4944extern "C" { 4945#endif 4946 4947_LT_EOF 4948 # Now generate the symbol file. 4949 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4950 4951 cat <<_LT_EOF >> conftest.$ac_ext 4952 4953/* The mapping between symbol names and symbols. */ 4954LT@&t@_DLSYM_CONST struct { 4955 const char *name; 4956 void *address; 4957} 4958lt__PROGRAM__LTX_preloaded_symbols[[]] = 4959{ 4960 { "@PROGRAM@", (void *) 0 }, 4961_LT_EOF 4962 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4963 cat <<\_LT_EOF >> conftest.$ac_ext 4964 {0, (void *) 0} 4965}; 4966 4967/* This works around a problem in FreeBSD linker */ 4968#ifdef FREEBSD_WORKAROUND 4969static const void *lt_preloaded_setup() { 4970 return lt__PROGRAM__LTX_preloaded_symbols; 4971} 4972#endif 4973 4974#ifdef __cplusplus 4975} 4976#endif 4977_LT_EOF 4978 # Now try linking the two files. 4979 mv conftest.$ac_objext conftstm.$ac_objext 4980 lt_globsym_save_LIBS=$LIBS 4981 lt_globsym_save_CFLAGS=$CFLAGS 4982 LIBS="conftstm.$ac_objext" 4983 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4984 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4985 pipe_works=yes 4986 fi 4987 LIBS=$lt_globsym_save_LIBS 4988 CFLAGS=$lt_globsym_save_CFLAGS 4989 else 4990 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4991 fi 4992 else 4993 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4994 fi 4995 else 4996 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4997 fi 4998 else 4999 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5000 cat conftest.$ac_ext >&5 5001 fi 5002 rm -rf conftest* conftst* 5003 5004 # Do not use the global_symbol_pipe unless it works. 5005 if test "$pipe_works" = yes; then 5006 break 5007 else 5008 lt_cv_sys_global_symbol_pipe= 5009 fi 5010done 5011]) 5012if test -z "$lt_cv_sys_global_symbol_pipe"; then 5013 lt_cv_sys_global_symbol_to_cdecl= 5014fi 5015if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5016 AC_MSG_RESULT(failed) 5017else 5018 AC_MSG_RESULT(ok) 5019fi 5020 5021# Response file support. 5022if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5023 nm_file_list_spec='@' 5024elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 5025 nm_file_list_spec='@' 5026fi 5027 5028_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 5029 [Take the output of nm and produce a listing of raw symbols and C names]) 5030_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 5031 [Transform the output of nm in a proper C declaration]) 5032_LT_DECL([global_symbol_to_c_name_address], 5033 [lt_cv_sys_global_symbol_to_c_name_address], [1], 5034 [Transform the output of nm in a C name address pair]) 5035_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5036 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5037 [Transform the output of nm in a C name address pair when lib prefix is needed]) 5038_LT_DECL([], [nm_file_list_spec], [1], 5039 [Specify filename containing input files for $NM]) 5040]) # _LT_CMD_GLOBAL_SYMBOLS 5041 5042 5043# _LT_COMPILER_PIC([TAGNAME]) 5044# --------------------------- 5045m4_defun([_LT_COMPILER_PIC], 5046[m4_require([_LT_TAG_COMPILER])dnl 5047_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5048_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5049_LT_TAGVAR(lt_prog_compiler_static, $1)= 5050 5051m4_if([$1], [CXX], [ 5052 # C++ specific cases for pic, static, wl, etc. 5053 if test "$GXX" = yes; then 5054 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5055 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5056 5057 case $host_os in 5058 aix*) 5059 # All AIX code is PIC. 5060 if test "$host_cpu" = ia64; then 5061 # AIX 5 now supports IA64 processor 5062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5063 fi 5064 ;; 5065 5066 amigaos*) 5067 case $host_cpu in 5068 powerpc) 5069 # see comment about AmigaOS4 .so support 5070 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071 ;; 5072 m68k) 5073 # FIXME: we need at least 68020 code to build shared libraries, but 5074 # adding the `-m68020' flag to GCC prevents building anything better, 5075 # like `-m68040'. 5076 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5077 ;; 5078 esac 5079 ;; 5080 5081 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5082 # PIC is the default for these OSes. 5083 ;; 5084 mingw* | cygwin* | os2* | pw32* | cegcc*) 5085 # This hack is so that the source file can tell whether it is being 5086 # built for inclusion in a dll (and should export symbols for example). 5087 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5088 # (--disable-auto-import) libraries 5089 m4_if([$1], [GCJ], [], 5090 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5091 ;; 5092 darwin* | rhapsody*) 5093 # PIC is the default on this platform 5094 # Common symbols not allowed in MH_DYLIB files 5095 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5096 ;; 5097 *djgpp*) 5098 # DJGPP does not support shared libraries at all 5099 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5100 ;; 5101 haiku*) 5102 # PIC is the default for Haiku. 5103 # The "-static" flag exists, but is broken. 5104 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5105 ;; 5106 interix[[3-9]]*) 5107 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5108 # Instead, we relocate shared libraries at runtime. 5109 ;; 5110 sysv4*MP*) 5111 if test -d /usr/nec; then 5112 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5113 fi 5114 ;; 5115 hpux*) 5116 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5117 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5118 # sets the default TLS model and affects inlining. 5119 case $host_cpu in 5120 hppa*64*) 5121 ;; 5122 *) 5123 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5124 ;; 5125 esac 5126 ;; 5127 *qnx* | *nto*) 5128 # QNX uses GNU C++, but need to define -shared option too, otherwise 5129 # it will coredump. 5130 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5131 ;; 5132 *) 5133 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5134 ;; 5135 esac 5136 else 5137 case $host_os in 5138 aix[[4-9]]*) 5139 # All AIX code is PIC. 5140 if test "$host_cpu" = ia64; then 5141 # AIX 5 now supports IA64 processor 5142 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5143 else 5144 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5145 fi 5146 ;; 5147 chorus*) 5148 case $cc_basename in 5149 cxch68*) 5150 # Green Hills C++ Compiler 5151 # _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" 5152 ;; 5153 esac 5154 ;; 5155 mingw* | cygwin* | os2* | pw32* | cegcc*) 5156 # This hack is so that the source file can tell whether it is being 5157 # built for inclusion in a dll (and should export symbols for example). 5158 m4_if([$1], [GCJ], [], 5159 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5160 ;; 5161 dgux*) 5162 case $cc_basename in 5163 ec++*) 5164 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5165 ;; 5166 ghcx*) 5167 # Green Hills C++ Compiler 5168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5169 ;; 5170 *) 5171 ;; 5172 esac 5173 ;; 5174 freebsd* | dragonfly*) 5175 # FreeBSD uses GNU C++ 5176 ;; 5177 hpux9* | hpux10* | hpux11*) 5178 case $cc_basename in 5179 CC*) 5180 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5181 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5182 if test "$host_cpu" != ia64; then 5183 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5184 fi 5185 ;; 5186 aCC*) 5187 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5188 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5189 case $host_cpu in 5190 hppa*64*|ia64*) 5191 # +Z the default 5192 ;; 5193 *) 5194 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5195 ;; 5196 esac 5197 ;; 5198 *) 5199 ;; 5200 esac 5201 ;; 5202 interix*) 5203 # This is c89, which is MS Visual C++ (no shared libs) 5204 # Anyone wants to do a port? 5205 ;; 5206 irix5* | irix6* | nonstopux*) 5207 case $cc_basename in 5208 CC*) 5209 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5210 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5211 # CC pic flag -KPIC is the default. 5212 ;; 5213 *) 5214 ;; 5215 esac 5216 ;; 5217 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5218 case $cc_basename in 5219 KCC*) 5220 # KAI C++ Compiler 5221 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5223 ;; 5224 ecpc* ) 5225 # old Intel C++ for x86_64 which still supported -KPIC. 5226 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5228 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5229 ;; 5230 icpc* ) 5231 # Intel C++, used to be incompatible with GCC. 5232 # ICC 10 doesn't accept -KPIC any more. 5233 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5234 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5235 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5236 ;; 5237 pgCC* | pgcpp*) 5238 # Portland Group C++ compiler 5239 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5240 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5241 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5242 ;; 5243 cxx*) 5244 # Compaq C++ 5245 # Make sure the PIC flag is empty. It appears that all Alpha 5246 # Linux and Compaq Tru64 Unix objects are PIC. 5247 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5248 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5249 ;; 5250 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5251 # IBM XL 8.0, 9.0 on PPC and BlueGene 5252 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5253 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5254 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5255 ;; 5256 *) 5257 case `$CC -V 2>&1 | sed 5q` in 5258 *Sun\ C*) 5259 # Sun C++ 5.9 5260 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5261 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5262 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5263 ;; 5264 esac 5265 ;; 5266 esac 5267 ;; 5268 lynxos*) 5269 ;; 5270 m88k*) 5271 ;; 5272 mvs*) 5273 case $cc_basename in 5274 cxx*) 5275 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5276 ;; 5277 *) 5278 ;; 5279 esac 5280 ;; 5281 netbsd*) 5282 ;; 5283 *qnx* | *nto*) 5284 # QNX uses GNU C++, but need to define -shared option too, otherwise 5285 # it will coredump. 5286 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5287 ;; 5288 osf3* | osf4* | osf5*) 5289 case $cc_basename in 5290 KCC*) 5291 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5292 ;; 5293 RCC*) 5294 # Rational C++ 2.4.1 5295 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5296 ;; 5297 cxx*) 5298 # Digital/Compaq C++ 5299 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5300 # Make sure the PIC flag is empty. It appears that all Alpha 5301 # Linux and Compaq Tru64 Unix objects are PIC. 5302 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5304 ;; 5305 *) 5306 ;; 5307 esac 5308 ;; 5309 psos*) 5310 ;; 5311 solaris*) 5312 case $cc_basename in 5313 CC* | sunCC*) 5314 # Sun C++ 4.2, 5.x and Centerline C++ 5315 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5316 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5318 ;; 5319 gcx*) 5320 # Green Hills C++ Compiler 5321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5322 ;; 5323 *) 5324 ;; 5325 esac 5326 ;; 5327 sunos4*) 5328 case $cc_basename in 5329 CC*) 5330 # Sun C++ 4.x 5331 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5332 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5333 ;; 5334 lcc*) 5335 # Lucid 5336 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5337 ;; 5338 *) 5339 ;; 5340 esac 5341 ;; 5342 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5343 case $cc_basename in 5344 CC*) 5345 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5346 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5347 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5348 ;; 5349 esac 5350 ;; 5351 tandem*) 5352 case $cc_basename in 5353 NCC*) 5354 # NonStop-UX NCC 3.20 5355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5356 ;; 5357 *) 5358 ;; 5359 esac 5360 ;; 5361 vxworks*) 5362 ;; 5363 *) 5364 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5365 ;; 5366 esac 5367 fi 5368], 5369[ 5370 if test "$GCC" = yes; then 5371 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5373 5374 case $host_os in 5375 aix*) 5376 # All AIX code is PIC. 5377 if test "$host_cpu" = ia64; then 5378 # AIX 5 now supports IA64 processor 5379 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5380 fi 5381 ;; 5382 5383 amigaos*) 5384 case $host_cpu in 5385 powerpc) 5386 # see comment about AmigaOS4 .so support 5387 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5388 ;; 5389 m68k) 5390 # FIXME: we need at least 68020 code to build shared libraries, but 5391 # adding the `-m68020' flag to GCC prevents building anything better, 5392 # like `-m68040'. 5393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5394 ;; 5395 esac 5396 ;; 5397 5398 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5399 # PIC is the default for these OSes. 5400 ;; 5401 5402 mingw* | cygwin* | pw32* | os2* | cegcc*) 5403 # This hack is so that the source file can tell whether it is being 5404 # built for inclusion in a dll (and should export symbols for example). 5405 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5406 # (--disable-auto-import) libraries 5407 m4_if([$1], [GCJ], [], 5408 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5409 ;; 5410 5411 darwin* | rhapsody*) 5412 # PIC is the default on this platform 5413 # Common symbols not allowed in MH_DYLIB files 5414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5415 ;; 5416 5417 haiku*) 5418 # PIC is the default for Haiku. 5419 # The "-static" flag exists, but is broken. 5420 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5421 ;; 5422 5423 hpux*) 5424 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5425 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5426 # sets the default TLS model and affects inlining. 5427 case $host_cpu in 5428 hppa*64*) 5429 # +Z the default 5430 ;; 5431 *) 5432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5433 ;; 5434 esac 5435 ;; 5436 5437 interix[[3-9]]*) 5438 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5439 # Instead, we relocate shared libraries at runtime. 5440 ;; 5441 5442 msdosdjgpp*) 5443 # Just because we use GCC doesn't mean we suddenly get shared libraries 5444 # on systems that don't support them. 5445 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5446 enable_shared=no 5447 ;; 5448 5449 *nto* | *qnx*) 5450 # QNX uses GNU C++, but need to define -shared option too, otherwise 5451 # it will coredump. 5452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5453 ;; 5454 5455 sysv4*MP*) 5456 if test -d /usr/nec; then 5457 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5458 fi 5459 ;; 5460 5461 *) 5462 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5463 ;; 5464 esac 5465 5466 case $cc_basename in 5467 nvcc*) # Cuda Compiler Driver 2.2 5468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5469 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5470 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5471 fi 5472 ;; 5473 esac 5474 else 5475 # PORTME Check for flag to pass linker flags through the system compiler. 5476 case $host_os in 5477 aix*) 5478 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5479 if test "$host_cpu" = ia64; then 5480 # AIX 5 now supports IA64 processor 5481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5482 else 5483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5484 fi 5485 ;; 5486 5487 mingw* | cygwin* | pw32* | os2* | cegcc*) 5488 # This hack is so that the source file can tell whether it is being 5489 # built for inclusion in a dll (and should export symbols for example). 5490 m4_if([$1], [GCJ], [], 5491 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5492 ;; 5493 5494 hpux9* | hpux10* | hpux11*) 5495 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5496 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5497 # not for PA HP-UX. 5498 case $host_cpu in 5499 hppa*64*|ia64*) 5500 # +Z the default 5501 ;; 5502 *) 5503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5504 ;; 5505 esac 5506 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5507 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5508 ;; 5509 5510 irix5* | irix6* | nonstopux*) 5511 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5512 # PIC (with -KPIC) is the default. 5513 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5514 ;; 5515 5516 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5517 case $cc_basename in 5518 # old Intel for x86_64 which still supported -KPIC. 5519 ecc*) 5520 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5521 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5522 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5523 ;; 5524 # icc used to be incompatible with GCC. 5525 # ICC 10 doesn't accept -KPIC any more. 5526 icc* | ifort*) 5527 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5528 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5530 ;; 5531 # Lahey Fortran 8.1. 5532 lf95*) 5533 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5534 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5535 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5536 ;; 5537 nagfor*) 5538 # NAG Fortran compiler 5539 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5540 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5541 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5542 ;; 5543 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5544 # Portland Group compilers (*not* the Pentium gcc compiler, 5545 # which looks to be a dead project) 5546 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5547 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5548 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5549 ;; 5550 ccc*) 5551 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5552 # All Alpha code is PIC. 5553 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5554 ;; 5555 xl* | bgxl* | bgf* | mpixl*) 5556 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5557 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5558 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5559 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5560 ;; 5561 *) 5562 case `$CC -V 2>&1 | sed 5q` in 5563 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5564 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5565 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5566 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5567 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5568 ;; 5569 *Sun\ F* | *Sun*Fortran*) 5570 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5571 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5572 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5573 ;; 5574 *Sun\ C*) 5575 # Sun C 5.9 5576 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5577 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5578 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5579 ;; 5580 *Intel*\ [[CF]]*Compiler*) 5581 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5582 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5583 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5584 ;; 5585 *Portland\ Group*) 5586 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5587 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5588 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5589 ;; 5590 esac 5591 ;; 5592 esac 5593 ;; 5594 5595 newsos6) 5596 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5597 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5598 ;; 5599 5600 *nto* | *qnx*) 5601 # QNX uses GNU C++, but need to define -shared option too, otherwise 5602 # it will coredump. 5603 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5604 ;; 5605 5606 osf3* | osf4* | osf5*) 5607 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5608 # All OSF/1 code is PIC. 5609 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5610 ;; 5611 5612 rdos*) 5613 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5614 ;; 5615 5616 solaris*) 5617 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5618 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5619 case $cc_basename in 5620 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5621 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5622 *) 5623 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5624 esac 5625 ;; 5626 5627 sunos4*) 5628 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5629 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5630 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5631 ;; 5632 5633 sysv4 | sysv4.2uw2* | sysv4.3*) 5634 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5635 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5636 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5637 ;; 5638 5639 sysv4*MP*) 5640 if test -d /usr/nec ;then 5641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5642 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5643 fi 5644 ;; 5645 5646 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5647 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5648 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5649 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5650 ;; 5651 5652 unicos*) 5653 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5654 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5655 ;; 5656 5657 uts4*) 5658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5660 ;; 5661 5662 *) 5663 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5664 ;; 5665 esac 5666 fi 5667]) 5668case $host_os in 5669 # For platforms which do not support PIC, -DPIC is meaningless: 5670 *djgpp*) 5671 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5672 ;; 5673 *) 5674 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5675 ;; 5676esac 5677 5678AC_CACHE_CHECK([for $compiler option to produce PIC], 5679 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5680 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5681_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5682 5683# 5684# Check to make sure the PIC flag actually works. 5685# 5686if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5687 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5688 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5689 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5690 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5691 "" | " "*) ;; 5692 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5693 esac], 5694 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5695 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5696fi 5697_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5698 [Additional compiler flags for building library objects]) 5699 5700_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5701 [How to pass a linker flag through the compiler]) 5702# 5703# Check to make sure the static flag actually works. 5704# 5705wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5706_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5707 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5708 $lt_tmp_static_flag, 5709 [], 5710 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5711_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5712 [Compiler flag to prevent dynamic linking]) 5713])# _LT_COMPILER_PIC 5714 5715 5716# _LT_LINKER_SHLIBS([TAGNAME]) 5717# ---------------------------- 5718# See if the linker supports building shared libraries. 5719m4_defun([_LT_LINKER_SHLIBS], 5720[AC_REQUIRE([LT_PATH_LD])dnl 5721AC_REQUIRE([LT_PATH_NM])dnl 5722m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5723m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5724m4_require([_LT_DECL_EGREP])dnl 5725m4_require([_LT_DECL_SED])dnl 5726m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5727m4_require([_LT_TAG_COMPILER])dnl 5728AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5729m4_if([$1], [CXX], [ 5730 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5731 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5732 case $host_os in 5733 aix[[4-9]]*) 5734 # If we're using GNU nm, then we don't want the "-C" option. 5735 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5736 # Also, AIX nm treats weak defined symbols like other global defined 5737 # symbols, whereas GNU nm marks them as "W". 5738 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5739 _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' 5740 else 5741 _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' 5742 fi 5743 ;; 5744 pw32*) 5745 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5746 ;; 5747 cygwin* | mingw* | cegcc*) 5748 case $cc_basename in 5749 cl*) 5750 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5751 ;; 5752 *) 5753 _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' 5754 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5755 ;; 5756 esac 5757 ;; 5758 *) 5759 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5760 ;; 5761 esac 5762], [ 5763 runpath_var= 5764 _LT_TAGVAR(allow_undefined_flag, $1)= 5765 _LT_TAGVAR(always_export_symbols, $1)=no 5766 _LT_TAGVAR(archive_cmds, $1)= 5767 _LT_TAGVAR(archive_expsym_cmds, $1)= 5768 _LT_TAGVAR(compiler_needs_object, $1)=no 5769 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5770 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5771 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5772 _LT_TAGVAR(hardcode_automatic, $1)=no 5773 _LT_TAGVAR(hardcode_direct, $1)=no 5774 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5775 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5776 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5777 _LT_TAGVAR(hardcode_minus_L, $1)=no 5778 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5779 _LT_TAGVAR(inherit_rpath, $1)=no 5780 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5781 _LT_TAGVAR(module_cmds, $1)= 5782 _LT_TAGVAR(module_expsym_cmds, $1)= 5783 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5784 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5785 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5786 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5787 # include_expsyms should be a list of space-separated symbols to be *always* 5788 # included in the symbol list 5789 _LT_TAGVAR(include_expsyms, $1)= 5790 # exclude_expsyms can be an extended regexp of symbols to exclude 5791 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5792 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5793 # as well as any symbol that contains `d'. 5794 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5795 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5796 # platforms (ab)use it in PIC code, but their linkers get confused if 5797 # the symbol is explicitly referenced. Since portable code cannot 5798 # rely on this symbol name, it's probably fine to never include it in 5799 # preloaded symbol tables. 5800 # Exclude shared library initialization/finalization symbols. 5801dnl Note also adjust exclude_expsyms for C++ above. 5802 extract_expsyms_cmds= 5803 5804 case $host_os in 5805 cygwin* | mingw* | pw32* | cegcc*) 5806 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5807 # When not using gcc, we currently assume that we are using 5808 # Microsoft Visual C++. 5809 if test "$GCC" != yes; then 5810 with_gnu_ld=no 5811 fi 5812 ;; 5813 interix*) 5814 # we just hope/assume this is gcc and not c89 (= MSVC++) 5815 with_gnu_ld=yes 5816 ;; 5817 openbsd*) 5818 with_gnu_ld=no 5819 ;; 5820 esac 5821 5822 _LT_TAGVAR(ld_shlibs, $1)=yes 5823 5824 # On some targets, GNU ld is compatible enough with the native linker 5825 # that we're better off using the native interface for both. 5826 lt_use_gnu_ld_interface=no 5827 if test "$with_gnu_ld" = yes; then 5828 case $host_os in 5829 aix*) 5830 # The AIX port of GNU ld has always aspired to compatibility 5831 # with the native linker. However, as the warning in the GNU ld 5832 # block says, versions before 2.19.5* couldn't really create working 5833 # shared libraries, regardless of the interface used. 5834 case `$LD -v 2>&1` in 5835 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5836 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5837 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5838 *) 5839 lt_use_gnu_ld_interface=yes 5840 ;; 5841 esac 5842 ;; 5843 *) 5844 lt_use_gnu_ld_interface=yes 5845 ;; 5846 esac 5847 fi 5848 5849 if test "$lt_use_gnu_ld_interface" = yes; then 5850 # If archive_cmds runs LD, not CC, wlarc should be empty 5851 wlarc='${wl}' 5852 5853 # Set some defaults for GNU ld with shared library support. These 5854 # are reset later if shared libraries are not supported. Putting them 5855 # here allows them to be overridden if necessary. 5856 runpath_var=LD_RUN_PATH 5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5858 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5859 # ancient GNU ld didn't support --whole-archive et. al. 5860 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5861 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5862 else 5863 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5864 fi 5865 supports_anon_versioning=no 5866 case `$LD -v 2>&1` in 5867 *GNU\ gold*) supports_anon_versioning=yes ;; 5868 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5869 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5870 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5871 *\ 2.11.*) ;; # other 2.11 versions 5872 *) supports_anon_versioning=yes ;; 5873 esac 5874 5875 # See if GNU ld supports shared libraries. 5876 case $host_os in 5877 aix[[3-9]]*) 5878 # On AIX/PPC, the GNU linker is very broken 5879 if test "$host_cpu" != ia64; then 5880 _LT_TAGVAR(ld_shlibs, $1)=no 5881 cat <<_LT_EOF 1>&2 5882 5883*** Warning: the GNU linker, at least up to release 2.19, is reported 5884*** to be unable to reliably create shared libraries on AIX. 5885*** Therefore, libtool is disabling shared libraries support. If you 5886*** really care for shared libraries, you may want to install binutils 5887*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5888*** You will then need to restart the configuration process. 5889 5890_LT_EOF 5891 fi 5892 ;; 5893 5894 amigaos*) 5895 case $host_cpu in 5896 powerpc) 5897 # see comment about AmigaOS4 .so support 5898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5899 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5900 ;; 5901 m68k) 5902 _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)' 5903 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5904 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5905 ;; 5906 esac 5907 ;; 5908 5909 beos*) 5910 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5911 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5912 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5913 # support --undefined. This deserves some investigation. FIXME 5914 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5915 else 5916 _LT_TAGVAR(ld_shlibs, $1)=no 5917 fi 5918 ;; 5919 5920 cygwin* | mingw* | pw32* | cegcc*) 5921 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5922 # as there is no search path for DLLs. 5923 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5924 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5925 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5926 _LT_TAGVAR(always_export_symbols, $1)=no 5927 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5928 _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' 5929 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5930 5931 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5932 _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' 5933 # If the export-symbols file already is a .def file (1st line 5934 # is EXPORTS), use it as is; otherwise, prepend... 5935 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5936 cp $export_symbols $output_objdir/$soname.def; 5937 else 5938 echo EXPORTS > $output_objdir/$soname.def; 5939 cat $export_symbols >> $output_objdir/$soname.def; 5940 fi~ 5941 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5942 else 5943 _LT_TAGVAR(ld_shlibs, $1)=no 5944 fi 5945 ;; 5946 5947 haiku*) 5948 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5949 _LT_TAGVAR(link_all_deplibs, $1)=yes 5950 ;; 5951 5952 interix[[3-9]]*) 5953 _LT_TAGVAR(hardcode_direct, $1)=no 5954 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5955 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5956 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5957 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5958 # Instead, shared libraries are loaded at an image base (0x10000000 by 5959 # default) and relocated if they conflict, which is a slow very memory 5960 # consuming and fragmenting process. To avoid this, we pick a random, 5961 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5962 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5963 _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' 5964 _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' 5965 ;; 5966 5967 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5968 tmp_diet=no 5969 if test "$host_os" = linux-dietlibc; then 5970 case $cc_basename in 5971 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5972 esac 5973 fi 5974 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5975 && test "$tmp_diet" = no 5976 then 5977 tmp_addflag=' $pic_flag' 5978 tmp_sharedflag='-shared' 5979 case $cc_basename,$host_cpu in 5980 pgcc*) # Portland Group C compiler 5981 _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' 5982 tmp_addflag=' $pic_flag' 5983 ;; 5984 pgf77* | pgf90* | pgf95* | pgfortran*) 5985 # Portland Group f77 and f90 compilers 5986 _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' 5987 tmp_addflag=' $pic_flag -Mnomain' ;; 5988 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5989 tmp_addflag=' -i_dynamic' ;; 5990 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5991 tmp_addflag=' -i_dynamic -nofor_main' ;; 5992 ifc* | ifort*) # Intel Fortran compiler 5993 tmp_addflag=' -nofor_main' ;; 5994 lf95*) # Lahey Fortran 8.1 5995 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5996 tmp_sharedflag='--shared' ;; 5997 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5998 tmp_sharedflag='-qmkshrobj' 5999 tmp_addflag= ;; 6000 nvcc*) # Cuda Compiler Driver 2.2 6001 _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' 6002 _LT_TAGVAR(compiler_needs_object, $1)=yes 6003 ;; 6004 esac 6005 case `$CC -V 2>&1 | sed 5q` in 6006 *Sun\ C*) # Sun C 5.9 6007 _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' 6008 _LT_TAGVAR(compiler_needs_object, $1)=yes 6009 tmp_sharedflag='-G' ;; 6010 *Sun\ F*) # Sun Fortran 8.3 6011 tmp_sharedflag='-G' ;; 6012 esac 6013 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6014 6015 if test "x$supports_anon_versioning" = xyes; then 6016 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6017 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6018 echo "local: *; };" >> $output_objdir/$libname.ver~ 6019 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6020 fi 6021 6022 case $cc_basename in 6023 xlf* | bgf* | bgxlf* | mpixlf*) 6024 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 6025 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 6026 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6027 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 6028 if test "x$supports_anon_versioning" = xyes; then 6029 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6030 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6031 echo "local: *; };" >> $output_objdir/$libname.ver~ 6032 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6033 fi 6034 ;; 6035 esac 6036 else 6037 _LT_TAGVAR(ld_shlibs, $1)=no 6038 fi 6039 ;; 6040 6041 netbsd*) 6042 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6043 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6044 wlarc= 6045 else 6046 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6047 _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' 6048 fi 6049 ;; 6050 6051 solaris*) 6052 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6053 _LT_TAGVAR(ld_shlibs, $1)=no 6054 cat <<_LT_EOF 1>&2 6055 6056*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6057*** create shared libraries on Solaris systems. Therefore, libtool 6058*** is disabling shared libraries support. We urge you to upgrade GNU 6059*** binutils to release 2.9.1 or newer. Another option is to modify 6060*** your PATH or compiler configuration so that the native linker is 6061*** used, and then restart. 6062 6063_LT_EOF 6064 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6065 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6066 _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' 6067 else 6068 _LT_TAGVAR(ld_shlibs, $1)=no 6069 fi 6070 ;; 6071 6072 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6073 case `$LD -v 2>&1` in 6074 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6075 _LT_TAGVAR(ld_shlibs, $1)=no 6076 cat <<_LT_EOF 1>&2 6077 6078*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6079*** reliably create shared libraries on SCO systems. Therefore, libtool 6080*** is disabling shared libraries support. We urge you to upgrade GNU 6081*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6082*** your PATH or compiler configuration so that the native linker is 6083*** used, and then restart. 6084 6085_LT_EOF 6086 ;; 6087 *) 6088 # For security reasons, it is highly recommended that you always 6089 # use absolute paths for naming shared libraries, and exclude the 6090 # DT_RUNPATH tag from executables and libraries. But doing so 6091 # requires that you compile everything twice, which is a pain. 6092 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6093 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6094 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6095 _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' 6096 else 6097 _LT_TAGVAR(ld_shlibs, $1)=no 6098 fi 6099 ;; 6100 esac 6101 ;; 6102 6103 sunos4*) 6104 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6105 wlarc= 6106 _LT_TAGVAR(hardcode_direct, $1)=yes 6107 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6108 ;; 6109 6110 *) 6111 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6113 _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' 6114 else 6115 _LT_TAGVAR(ld_shlibs, $1)=no 6116 fi 6117 ;; 6118 esac 6119 6120 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6121 runpath_var= 6122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6123 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6124 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6125 fi 6126 else 6127 # PORTME fill in a description of your system's linker (not GNU ld) 6128 case $host_os in 6129 aix3*) 6130 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6131 _LT_TAGVAR(always_export_symbols, $1)=yes 6132 _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' 6133 # Note: this linker hardcodes the directories in LIBPATH if there 6134 # are no directories specified by -L. 6135 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6136 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6137 # Neither direct hardcoding nor static linking is supported with a 6138 # broken collect2. 6139 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6140 fi 6141 ;; 6142 6143 aix[[4-9]]*) 6144 if test "$host_cpu" = ia64; then 6145 # On IA64, the linker does run time linking by default, so we don't 6146 # have to do anything special. 6147 aix_use_runtimelinking=no 6148 exp_sym_flag='-Bexport' 6149 no_entry_flag="" 6150 else 6151 # If we're using GNU nm, then we don't want the "-C" option. 6152 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6153 # Also, AIX nm treats weak defined symbols like other global 6154 # defined symbols, whereas GNU nm marks them as "W". 6155 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6156 _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' 6157 else 6158 _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' 6159 fi 6160 aix_use_runtimelinking=no 6161 6162 # Test if we are trying to use run time linking or normal 6163 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6164 # need to do runtime linking. 6165 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6166 for ld_flag in $LDFLAGS; do 6167 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6168 aix_use_runtimelinking=yes 6169 break 6170 fi 6171 done 6172 ;; 6173 esac 6174 6175 exp_sym_flag='-bexport' 6176 no_entry_flag='-bnoentry' 6177 fi 6178 6179 # When large executables or shared objects are built, AIX ld can 6180 # have problems creating the table of contents. If linking a library 6181 # or program results in "error TOC overflow" add -mminimal-toc to 6182 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6183 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6184 6185 _LT_TAGVAR(archive_cmds, $1)='' 6186 _LT_TAGVAR(hardcode_direct, $1)=yes 6187 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6188 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6189 _LT_TAGVAR(link_all_deplibs, $1)=yes 6190 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6191 6192 if test "$GCC" = yes; then 6193 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6194 # We only want to do this on AIX 4.2 and lower, the check 6195 # below for broken collect2 doesn't work under 4.3+ 6196 collect2name=`${CC} -print-prog-name=collect2` 6197 if test -f "$collect2name" && 6198 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6199 then 6200 # We have reworked collect2 6201 : 6202 else 6203 # We have old collect2 6204 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6205 # It fails to find uninstalled libraries when the uninstalled 6206 # path is not listed in the libpath. Setting hardcode_minus_L 6207 # to unsupported forces relinking 6208 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6209 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6210 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6211 fi 6212 ;; 6213 esac 6214 shared_flag='-shared' 6215 if test "$aix_use_runtimelinking" = yes; then 6216 shared_flag="$shared_flag "'${wl}-G' 6217 fi 6218 else 6219 # not using gcc 6220 if test "$host_cpu" = ia64; then 6221 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6222 # chokes on -Wl,-G. The following line is correct: 6223 shared_flag='-G' 6224 else 6225 if test "$aix_use_runtimelinking" = yes; then 6226 shared_flag='${wl}-G' 6227 else 6228 shared_flag='${wl}-bM:SRE' 6229 fi 6230 fi 6231 fi 6232 6233 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6234 # It seems that -bexpall does not export symbols beginning with 6235 # underscore (_), so it is better to generate a list of symbols to export. 6236 _LT_TAGVAR(always_export_symbols, $1)=yes 6237 if test "$aix_use_runtimelinking" = yes; then 6238 # Warning - without using the other runtime loading flags (-brtl), 6239 # -berok will link without error, but may produce a broken library. 6240 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6241 # Determine the default libpath from the value encoded in an 6242 # empty executable. 6243 _LT_SYS_MODULE_PATH_AIX([$1]) 6244 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6245 _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" 6246 else 6247 if test "$host_cpu" = ia64; then 6248 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6249 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6250 _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" 6251 else 6252 # Determine the default libpath from the value encoded in an 6253 # empty executable. 6254 _LT_SYS_MODULE_PATH_AIX([$1]) 6255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6256 # Warning - without using the other run time loading flags, 6257 # -berok will link without error, but may produce a broken library. 6258 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6259 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6260 if test "$with_gnu_ld" = yes; then 6261 # We only use this code for GNU lds that support --whole-archive. 6262 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6263 else 6264 # Exported symbols can be pulled into shared objects from archives 6265 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6266 fi 6267 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6268 # This is similar to how AIX traditionally builds its shared libraries. 6269 _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' 6270 fi 6271 fi 6272 ;; 6273 6274 amigaos*) 6275 case $host_cpu in 6276 powerpc) 6277 # see comment about AmigaOS4 .so support 6278 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6279 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6280 ;; 6281 m68k) 6282 _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)' 6283 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6284 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6285 ;; 6286 esac 6287 ;; 6288 6289 bsdi[[45]]*) 6290 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6291 ;; 6292 6293 cygwin* | mingw* | pw32* | cegcc*) 6294 # When not using gcc, we currently assume that we are using 6295 # Microsoft Visual C++. 6296 # hardcode_libdir_flag_spec is actually meaningless, as there is 6297 # no search path for DLLs. 6298 case $cc_basename in 6299 cl*) 6300 # Native MSVC 6301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6302 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6303 _LT_TAGVAR(always_export_symbols, $1)=yes 6304 _LT_TAGVAR(file_list_spec, $1)='@' 6305 # Tell ltmain to make .lib files, not .a files. 6306 libext=lib 6307 # Tell ltmain to make .dll files, not .so files. 6308 shrext_cmds=".dll" 6309 # FIXME: Setting linknames here is a bad hack. 6310 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6311 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6312 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6313 else 6314 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6315 fi~ 6316 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6317 linknames=' 6318 # The linker will not automatically build a static lib if we build a DLL. 6319 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6320 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6321 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6322 _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' 6323 # Don't use ranlib 6324 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6325 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6326 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6327 case $lt_outputfile in 6328 *.exe|*.EXE) ;; 6329 *) 6330 lt_outputfile="$lt_outputfile.exe" 6331 lt_tool_outputfile="$lt_tool_outputfile.exe" 6332 ;; 6333 esac~ 6334 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6335 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6336 $RM "$lt_outputfile.manifest"; 6337 fi' 6338 ;; 6339 *) 6340 # Assume MSVC wrapper 6341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6342 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6343 # Tell ltmain to make .lib files, not .a files. 6344 libext=lib 6345 # Tell ltmain to make .dll files, not .so files. 6346 shrext_cmds=".dll" 6347 # FIXME: Setting linknames here is a bad hack. 6348 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6349 # The linker will automatically build a .lib file if we build a DLL. 6350 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6351 # FIXME: Should let the user specify the lib program. 6352 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6353 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6354 ;; 6355 esac 6356 ;; 6357 6358 darwin* | rhapsody*) 6359 _LT_DARWIN_LINKER_FEATURES($1) 6360 ;; 6361 6362 dgux*) 6363 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6365 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6366 ;; 6367 6368 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6369 # support. Future versions do this automatically, but an explicit c++rt0.o 6370 # does not break anything, and helps significantly (at the cost of a little 6371 # extra space). 6372 freebsd2.2*) 6373 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6375 _LT_TAGVAR(hardcode_direct, $1)=yes 6376 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6377 ;; 6378 6379 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6380 freebsd2.*) 6381 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6382 _LT_TAGVAR(hardcode_direct, $1)=yes 6383 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6384 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6385 ;; 6386 6387 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6388 freebsd* | dragonfly*) 6389 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6391 _LT_TAGVAR(hardcode_direct, $1)=yes 6392 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6393 ;; 6394 6395 hpux9*) 6396 if test "$GCC" = yes; then 6397 _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' 6398 else 6399 _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' 6400 fi 6401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6402 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6403 _LT_TAGVAR(hardcode_direct, $1)=yes 6404 6405 # hardcode_minus_L: Not really in the search PATH, 6406 # but as the default location of the library. 6407 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6408 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6409 ;; 6410 6411 hpux10*) 6412 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6413 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6414 else 6415 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6416 fi 6417 if test "$with_gnu_ld" = no; then 6418 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6419 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6420 _LT_TAGVAR(hardcode_direct, $1)=yes 6421 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6422 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6423 # hardcode_minus_L: Not really in the search PATH, 6424 # but as the default location of the library. 6425 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6426 fi 6427 ;; 6428 6429 hpux11*) 6430 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6431 case $host_cpu in 6432 hppa*64*) 6433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6434 ;; 6435 ia64*) 6436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6437 ;; 6438 *) 6439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6440 ;; 6441 esac 6442 else 6443 case $host_cpu in 6444 hppa*64*) 6445 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6446 ;; 6447 ia64*) 6448 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6449 ;; 6450 *) 6451 m4_if($1, [], [ 6452 # Older versions of the 11.00 compiler do not understand -b yet 6453 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6454 _LT_LINKER_OPTION([if $CC understands -b], 6455 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6456 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6457 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6458 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6459 ;; 6460 esac 6461 fi 6462 if test "$with_gnu_ld" = no; then 6463 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6464 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6465 6466 case $host_cpu in 6467 hppa*64*|ia64*) 6468 _LT_TAGVAR(hardcode_direct, $1)=no 6469 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6470 ;; 6471 *) 6472 _LT_TAGVAR(hardcode_direct, $1)=yes 6473 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6474 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6475 6476 # hardcode_minus_L: Not really in the search PATH, 6477 # but as the default location of the library. 6478 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6479 ;; 6480 esac 6481 fi 6482 ;; 6483 6484 irix5* | irix6* | nonstopux*) 6485 if test "$GCC" = yes; then 6486 _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' 6487 # Try to use the -exported_symbol ld option, if it does not 6488 # work, assume that -exports_file does not work either and 6489 # implicitly export all symbols. 6490 # This should be the same for all languages, so no per-tag cache variable. 6491 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6492 [lt_cv_irix_exported_symbol], 6493 [save_LDFLAGS="$LDFLAGS" 6494 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6495 AC_LINK_IFELSE( 6496 [AC_LANG_SOURCE( 6497 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6498 [C++], [[int foo (void) { return 0; }]], 6499 [Fortran 77], [[ 6500 subroutine foo 6501 end]], 6502 [Fortran], [[ 6503 subroutine foo 6504 end]])])], 6505 [lt_cv_irix_exported_symbol=yes], 6506 [lt_cv_irix_exported_symbol=no]) 6507 LDFLAGS="$save_LDFLAGS"]) 6508 if test "$lt_cv_irix_exported_symbol" = yes; then 6509 _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' 6510 fi 6511 else 6512 _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' 6513 _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' 6514 fi 6515 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6517 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6518 _LT_TAGVAR(inherit_rpath, $1)=yes 6519 _LT_TAGVAR(link_all_deplibs, $1)=yes 6520 ;; 6521 6522 netbsd*) 6523 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6524 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6525 else 6526 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6527 fi 6528 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6529 _LT_TAGVAR(hardcode_direct, $1)=yes 6530 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6531 ;; 6532 6533 newsos6) 6534 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6535 _LT_TAGVAR(hardcode_direct, $1)=yes 6536 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6537 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6538 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6539 ;; 6540 6541 *nto* | *qnx*) 6542 ;; 6543 6544 openbsd*) 6545 if test -f /usr/libexec/ld.so; then 6546 _LT_TAGVAR(hardcode_direct, $1)=yes 6547 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6548 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6549 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6550 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6551 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6552 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6553 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6554 else 6555 case $host_os in 6556 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6557 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6558 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6559 ;; 6560 *) 6561 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6562 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6563 ;; 6564 esac 6565 fi 6566 else 6567 _LT_TAGVAR(ld_shlibs, $1)=no 6568 fi 6569 ;; 6570 6571 os2*) 6572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6573 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6574 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6575 _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' 6576 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6577 ;; 6578 6579 osf3*) 6580 if test "$GCC" = yes; then 6581 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6582 _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' 6583 else 6584 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6585 _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' 6586 fi 6587 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6589 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6590 ;; 6591 6592 osf4* | osf5*) # as osf3* with the addition of -msym flag 6593 if test "$GCC" = yes; then 6594 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6595 _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' 6596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6597 else 6598 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6599 _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' 6600 _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~ 6601 $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' 6602 6603 # Both c and cxx compiler support -rpath directly 6604 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6605 fi 6606 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6607 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6608 ;; 6609 6610 solaris*) 6611 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6612 if test "$GCC" = yes; then 6613 wlarc='${wl}' 6614 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6615 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6616 $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' 6617 else 6618 case `$CC -V 2>&1` in 6619 *"Compilers 5.0"*) 6620 wlarc='' 6621 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6622 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6623 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6624 ;; 6625 *) 6626 wlarc='${wl}' 6627 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6628 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6629 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6630 ;; 6631 esac 6632 fi 6633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6634 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6635 case $host_os in 6636 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6637 *) 6638 # The compiler driver will combine and reorder linker options, 6639 # but understands `-z linker_flag'. GCC discards it without `$wl', 6640 # but is careful enough not to reorder. 6641 # Supported since Solaris 2.6 (maybe 2.5.1?) 6642 if test "$GCC" = yes; then 6643 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6644 else 6645 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6646 fi 6647 ;; 6648 esac 6649 _LT_TAGVAR(link_all_deplibs, $1)=yes 6650 ;; 6651 6652 sunos4*) 6653 if test "x$host_vendor" = xsequent; then 6654 # Use $CC to link under sequent, because it throws in some extra .o 6655 # files that make .init and .fini sections work. 6656 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6657 else 6658 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6659 fi 6660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6661 _LT_TAGVAR(hardcode_direct, $1)=yes 6662 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6663 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6664 ;; 6665 6666 sysv4) 6667 case $host_vendor in 6668 sni) 6669 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6670 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6671 ;; 6672 siemens) 6673 ## LD is ld it makes a PLAMLIB 6674 ## CC just makes a GrossModule. 6675 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6676 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6677 _LT_TAGVAR(hardcode_direct, $1)=no 6678 ;; 6679 motorola) 6680 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6681 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6682 ;; 6683 esac 6684 runpath_var='LD_RUN_PATH' 6685 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6686 ;; 6687 6688 sysv4.3*) 6689 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6690 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6691 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6692 ;; 6693 6694 sysv4*MP*) 6695 if test -d /usr/nec; then 6696 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6697 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6698 runpath_var=LD_RUN_PATH 6699 hardcode_runpath_var=yes 6700 _LT_TAGVAR(ld_shlibs, $1)=yes 6701 fi 6702 ;; 6703 6704 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6705 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6706 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6707 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6708 runpath_var='LD_RUN_PATH' 6709 6710 if test "$GCC" = yes; then 6711 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6712 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6713 else 6714 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6715 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6716 fi 6717 ;; 6718 6719 sysv5* | sco3.2v5* | sco5v6*) 6720 # Note: We can NOT use -z defs as we might desire, because we do not 6721 # link with -lc, and that would cause any symbols used from libc to 6722 # always be unresolved, which means just about no library would 6723 # ever link correctly. If we're not using GNU ld we use -z text 6724 # though, which does catch some bad symbols but isn't as heavy-handed 6725 # as -z defs. 6726 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6727 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6728 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6729 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6730 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6731 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6732 _LT_TAGVAR(link_all_deplibs, $1)=yes 6733 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6734 runpath_var='LD_RUN_PATH' 6735 6736 if test "$GCC" = yes; then 6737 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6738 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6739 else 6740 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6741 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6742 fi 6743 ;; 6744 6745 uts4*) 6746 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6747 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6748 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6749 ;; 6750 6751 *) 6752 _LT_TAGVAR(ld_shlibs, $1)=no 6753 ;; 6754 esac 6755 6756 if test x$host_vendor = xsni; then 6757 case $host in 6758 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6759 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6760 ;; 6761 esac 6762 fi 6763 fi 6764]) 6765AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6766test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6767 6768_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6769 6770_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6771_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6772_LT_DECL([], [extract_expsyms_cmds], [2], 6773 [The commands to extract the exported symbol list from a shared archive]) 6774 6775# 6776# Do we need to explicitly link libc? 6777# 6778case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6779x|xyes) 6780 # Assume -lc should be added 6781 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6782 6783 if test "$enable_shared" = yes && test "$GCC" = yes; then 6784 case $_LT_TAGVAR(archive_cmds, $1) in 6785 *'~'*) 6786 # FIXME: we may have to deal with multi-command sequences. 6787 ;; 6788 '$CC '*) 6789 # Test whether the compiler implicitly links with -lc since on some 6790 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6791 # to ld, don't add -lc before -lgcc. 6792 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6793 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6794 [$RM conftest* 6795 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6796 6797 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6798 soname=conftest 6799 lib=conftest 6800 libobjs=conftest.$ac_objext 6801 deplibs= 6802 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6803 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6804 compiler_flags=-v 6805 linker_flags=-v 6806 verstring= 6807 output_objdir=. 6808 libname=conftest 6809 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6810 _LT_TAGVAR(allow_undefined_flag, $1)= 6811 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6812 then 6813 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6814 else 6815 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6816 fi 6817 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6818 else 6819 cat conftest.err 1>&5 6820 fi 6821 $RM conftest* 6822 ]) 6823 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6824 ;; 6825 esac 6826 fi 6827 ;; 6828esac 6829 6830_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6831 [Whether or not to add -lc for building shared libraries]) 6832_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6833 [enable_shared_with_static_runtimes], [0], 6834 [Whether or not to disallow shared libs when runtime libs are static]) 6835_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6836 [Compiler flag to allow reflexive dlopens]) 6837_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6838 [Compiler flag to generate shared objects directly from archives]) 6839_LT_TAGDECL([], [compiler_needs_object], [1], 6840 [Whether the compiler copes with passing no objects directly]) 6841_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6842 [Create an old-style archive from a shared archive]) 6843_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6844 [Create a temporary old-style archive to link instead of a shared archive]) 6845_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6846_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6847_LT_TAGDECL([], [module_cmds], [2], 6848 [Commands used to build a loadable module if different from building 6849 a shared archive.]) 6850_LT_TAGDECL([], [module_expsym_cmds], [2]) 6851_LT_TAGDECL([], [with_gnu_ld], [1], 6852 [Whether we are building with GNU ld or not]) 6853_LT_TAGDECL([], [allow_undefined_flag], [1], 6854 [Flag that allows shared libraries with undefined symbols to be built]) 6855_LT_TAGDECL([], [no_undefined_flag], [1], 6856 [Flag that enforces no undefined symbols]) 6857_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6858 [Flag to hardcode $libdir into a binary during linking. 6859 This must work even if $libdir does not exist]) 6860_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6861 [Whether we need a single "-rpath" flag with a separated argument]) 6862_LT_TAGDECL([], [hardcode_direct], [0], 6863 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6864 DIR into the resulting binary]) 6865_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6866 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6867 DIR into the resulting binary and the resulting library dependency is 6868 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6869 library is relocated]) 6870_LT_TAGDECL([], [hardcode_minus_L], [0], 6871 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6872 into the resulting binary]) 6873_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6874 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6875 into the resulting binary]) 6876_LT_TAGDECL([], [hardcode_automatic], [0], 6877 [Set to "yes" if building a shared library automatically hardcodes DIR 6878 into the library and all subsequent libraries and executables linked 6879 against it]) 6880_LT_TAGDECL([], [inherit_rpath], [0], 6881 [Set to yes if linker adds runtime paths of dependent libraries 6882 to runtime path list]) 6883_LT_TAGDECL([], [link_all_deplibs], [0], 6884 [Whether libtool must link a program against all its dependency libraries]) 6885_LT_TAGDECL([], [always_export_symbols], [0], 6886 [Set to "yes" if exported symbols are required]) 6887_LT_TAGDECL([], [export_symbols_cmds], [2], 6888 [The commands to list exported symbols]) 6889_LT_TAGDECL([], [exclude_expsyms], [1], 6890 [Symbols that should not be listed in the preloaded symbols]) 6891_LT_TAGDECL([], [include_expsyms], [1], 6892 [Symbols that must always be exported]) 6893_LT_TAGDECL([], [prelink_cmds], [2], 6894 [Commands necessary for linking programs (against libraries) with templates]) 6895_LT_TAGDECL([], [postlink_cmds], [2], 6896 [Commands necessary for finishing linking programs]) 6897_LT_TAGDECL([], [file_list_spec], [1], 6898 [Specify filename containing input files]) 6899dnl FIXME: Not yet implemented 6900dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6901dnl [Compiler flag to generate thread safe objects]) 6902])# _LT_LINKER_SHLIBS 6903 6904 6905# _LT_LANG_C_CONFIG([TAG]) 6906# ------------------------ 6907# Ensure that the configuration variables for a C compiler are suitably 6908# defined. These variables are subsequently used by _LT_CONFIG to write 6909# the compiler configuration to `libtool'. 6910m4_defun([_LT_LANG_C_CONFIG], 6911[m4_require([_LT_DECL_EGREP])dnl 6912lt_save_CC="$CC" 6913AC_LANG_PUSH(C) 6914 6915# Source file extension for C test sources. 6916ac_ext=c 6917 6918# Object file extension for compiled C test sources. 6919objext=o 6920_LT_TAGVAR(objext, $1)=$objext 6921 6922# Code to be used in simple compile tests 6923lt_simple_compile_test_code="int some_variable = 0;" 6924 6925# Code to be used in simple link tests 6926lt_simple_link_test_code='int main(){return(0);}' 6927 6928_LT_TAG_COMPILER 6929# Save the default compiler, since it gets overwritten when the other 6930# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6931compiler_DEFAULT=$CC 6932 6933# save warnings/boilerplate of simple test code 6934_LT_COMPILER_BOILERPLATE 6935_LT_LINKER_BOILERPLATE 6936 6937if test -n "$compiler"; then 6938 _LT_COMPILER_NO_RTTI($1) 6939 _LT_COMPILER_PIC($1) 6940 _LT_COMPILER_C_O($1) 6941 _LT_COMPILER_FILE_LOCKS($1) 6942 _LT_LINKER_SHLIBS($1) 6943 _LT_SYS_DYNAMIC_LINKER($1) 6944 _LT_LINKER_HARDCODE_LIBPATH($1) 6945 LT_SYS_DLOPEN_SELF 6946 _LT_CMD_STRIPLIB 6947 6948 # Report which library types will actually be built 6949 AC_MSG_CHECKING([if libtool supports shared libraries]) 6950 AC_MSG_RESULT([$can_build_shared]) 6951 6952 AC_MSG_CHECKING([whether to build shared libraries]) 6953 test "$can_build_shared" = "no" && enable_shared=no 6954 6955 # On AIX, shared libraries and static libraries use the same namespace, and 6956 # are all built from PIC. 6957 case $host_os in 6958 aix3*) 6959 test "$enable_shared" = yes && enable_static=no 6960 if test -n "$RANLIB"; then 6961 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6962 postinstall_cmds='$RANLIB $lib' 6963 fi 6964 ;; 6965 6966 aix[[4-9]]*) 6967 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6968 test "$enable_shared" = yes && enable_static=no 6969 fi 6970 ;; 6971 esac 6972 AC_MSG_RESULT([$enable_shared]) 6973 6974 AC_MSG_CHECKING([whether to build static libraries]) 6975 # Make sure either enable_shared or enable_static is yes. 6976 test "$enable_shared" = yes || enable_static=yes 6977 AC_MSG_RESULT([$enable_static]) 6978 6979 _LT_CONFIG($1) 6980fi 6981AC_LANG_POP 6982CC="$lt_save_CC" 6983])# _LT_LANG_C_CONFIG 6984 6985 6986# _LT_LANG_CXX_CONFIG([TAG]) 6987# -------------------------- 6988# Ensure that the configuration variables for a C++ compiler are suitably 6989# defined. These variables are subsequently used by _LT_CONFIG to write 6990# the compiler configuration to `libtool'. 6991m4_defun([_LT_LANG_CXX_CONFIG], 6992[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6993m4_require([_LT_DECL_EGREP])dnl 6994m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6995if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6996 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6997 (test "X$CXX" != "Xg++"))) ; then 6998 AC_PROG_CXXCPP 6999else 7000 _lt_caught_CXX_error=yes 7001fi 7002 7003AC_LANG_PUSH(C++) 7004_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7005_LT_TAGVAR(allow_undefined_flag, $1)= 7006_LT_TAGVAR(always_export_symbols, $1)=no 7007_LT_TAGVAR(archive_expsym_cmds, $1)= 7008_LT_TAGVAR(compiler_needs_object, $1)=no 7009_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7010_LT_TAGVAR(hardcode_direct, $1)=no 7011_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7012_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7013_LT_TAGVAR(hardcode_libdir_separator, $1)= 7014_LT_TAGVAR(hardcode_minus_L, $1)=no 7015_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7016_LT_TAGVAR(hardcode_automatic, $1)=no 7017_LT_TAGVAR(inherit_rpath, $1)=no 7018_LT_TAGVAR(module_cmds, $1)= 7019_LT_TAGVAR(module_expsym_cmds, $1)= 7020_LT_TAGVAR(link_all_deplibs, $1)=unknown 7021_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7022_LT_TAGVAR(reload_flag, $1)=$reload_flag 7023_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7024_LT_TAGVAR(no_undefined_flag, $1)= 7025_LT_TAGVAR(whole_archive_flag_spec, $1)= 7026_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7027 7028# Source file extension for C++ test sources. 7029ac_ext=cpp 7030 7031# Object file extension for compiled C++ test sources. 7032objext=o 7033_LT_TAGVAR(objext, $1)=$objext 7034 7035# No sense in running all these tests if we already determined that 7036# the CXX compiler isn't working. Some variables (like enable_shared) 7037# are currently assumed to apply to all compilers on this platform, 7038# and will be corrupted by setting them based on a non-working compiler. 7039if test "$_lt_caught_CXX_error" != yes; then 7040 # Code to be used in simple compile tests 7041 lt_simple_compile_test_code="int some_variable = 0;" 7042 7043 # Code to be used in simple link tests 7044 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7045 7046 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7047 _LT_TAG_COMPILER 7048 7049 # save warnings/boilerplate of simple test code 7050 _LT_COMPILER_BOILERPLATE 7051 _LT_LINKER_BOILERPLATE 7052 7053 # Allow CC to be a program name with arguments. 7054 lt_save_CC=$CC 7055 lt_save_CFLAGS=$CFLAGS 7056 lt_save_LD=$LD 7057 lt_save_GCC=$GCC 7058 GCC=$GXX 7059 lt_save_with_gnu_ld=$with_gnu_ld 7060 lt_save_path_LD=$lt_cv_path_LD 7061 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7062 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7063 else 7064 $as_unset lt_cv_prog_gnu_ld 7065 fi 7066 if test -n "${lt_cv_path_LDCXX+set}"; then 7067 lt_cv_path_LD=$lt_cv_path_LDCXX 7068 else 7069 $as_unset lt_cv_path_LD 7070 fi 7071 test -z "${LDCXX+set}" || LD=$LDCXX 7072 CC=${CXX-"c++"} 7073 CFLAGS=$CXXFLAGS 7074 compiler=$CC 7075 _LT_TAGVAR(compiler, $1)=$CC 7076 _LT_CC_BASENAME([$compiler]) 7077 7078 if test -n "$compiler"; then 7079 # We don't want -fno-exception when compiling C++ code, so set the 7080 # no_builtin_flag separately 7081 if test "$GXX" = yes; then 7082 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7083 else 7084 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7085 fi 7086 7087 if test "$GXX" = yes; then 7088 # Set up default GNU C++ configuration 7089 7090 LT_PATH_LD 7091 7092 # Check if GNU C++ uses GNU ld as the underlying linker, since the 7093 # archiving commands below assume that GNU ld is being used. 7094 if test "$with_gnu_ld" = yes; then 7095 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7096 _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' 7097 7098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7099 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7100 7101 # If archive_cmds runs LD, not CC, wlarc should be empty 7102 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7103 # investigate it a little bit more. (MM) 7104 wlarc='${wl}' 7105 7106 # ancient GNU ld didn't support --whole-archive et. al. 7107 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7108 $GREP 'no-whole-archive' > /dev/null; then 7109 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7110 else 7111 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7112 fi 7113 else 7114 with_gnu_ld=no 7115 wlarc= 7116 7117 # A generic and very simple default shared library creation 7118 # command for GNU C++ for the case where it uses the native 7119 # linker, instead of GNU ld. If possible, this setting should 7120 # overridden to take advantage of the native linker features on 7121 # the platform it is being used on. 7122 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7123 fi 7124 7125 # Commands to make compiler produce verbose output that lists 7126 # what "hidden" libraries, object files and flags are used when 7127 # linking a shared library. 7128 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7129 7130 else 7131 GXX=no 7132 with_gnu_ld=no 7133 wlarc= 7134 fi 7135 7136 # PORTME: fill in a description of your system's C++ link characteristics 7137 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7138 _LT_TAGVAR(ld_shlibs, $1)=yes 7139 case $host_os in 7140 aix3*) 7141 # FIXME: insert proper C++ library support 7142 _LT_TAGVAR(ld_shlibs, $1)=no 7143 ;; 7144 aix[[4-9]]*) 7145 if test "$host_cpu" = ia64; then 7146 # On IA64, the linker does run time linking by default, so we don't 7147 # have to do anything special. 7148 aix_use_runtimelinking=no 7149 exp_sym_flag='-Bexport' 7150 no_entry_flag="" 7151 else 7152 aix_use_runtimelinking=no 7153 7154 # Test if we are trying to use run time linking or normal 7155 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7156 # need to do runtime linking. 7157 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7158 for ld_flag in $LDFLAGS; do 7159 case $ld_flag in 7160 *-brtl*) 7161 aix_use_runtimelinking=yes 7162 break 7163 ;; 7164 esac 7165 done 7166 ;; 7167 esac 7168 7169 exp_sym_flag='-bexport' 7170 no_entry_flag='-bnoentry' 7171 fi 7172 7173 # When large executables or shared objects are built, AIX ld can 7174 # have problems creating the table of contents. If linking a library 7175 # or program results in "error TOC overflow" add -mminimal-toc to 7176 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7177 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7178 7179 _LT_TAGVAR(archive_cmds, $1)='' 7180 _LT_TAGVAR(hardcode_direct, $1)=yes 7181 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7182 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7183 _LT_TAGVAR(link_all_deplibs, $1)=yes 7184 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7185 7186 if test "$GXX" = yes; then 7187 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7188 # We only want to do this on AIX 4.2 and lower, the check 7189 # below for broken collect2 doesn't work under 4.3+ 7190 collect2name=`${CC} -print-prog-name=collect2` 7191 if test -f "$collect2name" && 7192 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7193 then 7194 # We have reworked collect2 7195 : 7196 else 7197 # We have old collect2 7198 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7199 # It fails to find uninstalled libraries when the uninstalled 7200 # path is not listed in the libpath. Setting hardcode_minus_L 7201 # to unsupported forces relinking 7202 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7203 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7204 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7205 fi 7206 esac 7207 shared_flag='-shared' 7208 if test "$aix_use_runtimelinking" = yes; then 7209 shared_flag="$shared_flag "'${wl}-G' 7210 fi 7211 else 7212 # not using gcc 7213 if test "$host_cpu" = ia64; then 7214 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7215 # chokes on -Wl,-G. The following line is correct: 7216 shared_flag='-G' 7217 else 7218 if test "$aix_use_runtimelinking" = yes; then 7219 shared_flag='${wl}-G' 7220 else 7221 shared_flag='${wl}-bM:SRE' 7222 fi 7223 fi 7224 fi 7225 7226 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7227 # It seems that -bexpall does not export symbols beginning with 7228 # underscore (_), so it is better to generate a list of symbols to 7229 # export. 7230 _LT_TAGVAR(always_export_symbols, $1)=yes 7231 if test "$aix_use_runtimelinking" = yes; then 7232 # Warning - without using the other runtime loading flags (-brtl), 7233 # -berok will link without error, but may produce a broken library. 7234 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7235 # Determine the default libpath from the value encoded in an empty 7236 # executable. 7237 _LT_SYS_MODULE_PATH_AIX([$1]) 7238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7239 7240 _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" 7241 else 7242 if test "$host_cpu" = ia64; then 7243 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7244 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7245 _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" 7246 else 7247 # Determine the default libpath from the value encoded in an 7248 # empty executable. 7249 _LT_SYS_MODULE_PATH_AIX([$1]) 7250 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7251 # Warning - without using the other run time loading flags, 7252 # -berok will link without error, but may produce a broken library. 7253 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7254 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7255 if test "$with_gnu_ld" = yes; then 7256 # We only use this code for GNU lds that support --whole-archive. 7257 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7258 else 7259 # Exported symbols can be pulled into shared objects from archives 7260 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7261 fi 7262 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7263 # This is similar to how AIX traditionally builds its shared 7264 # libraries. 7265 _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' 7266 fi 7267 fi 7268 ;; 7269 7270 beos*) 7271 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7272 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7273 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7274 # support --undefined. This deserves some investigation. FIXME 7275 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7276 else 7277 _LT_TAGVAR(ld_shlibs, $1)=no 7278 fi 7279 ;; 7280 7281 chorus*) 7282 case $cc_basename in 7283 *) 7284 # FIXME: insert proper C++ library support 7285 _LT_TAGVAR(ld_shlibs, $1)=no 7286 ;; 7287 esac 7288 ;; 7289 7290 cygwin* | mingw* | pw32* | cegcc*) 7291 case $GXX,$cc_basename in 7292 ,cl* | no,cl*) 7293 # Native MSVC 7294 # hardcode_libdir_flag_spec is actually meaningless, as there is 7295 # no search path for DLLs. 7296 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7297 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7298 _LT_TAGVAR(always_export_symbols, $1)=yes 7299 _LT_TAGVAR(file_list_spec, $1)='@' 7300 # Tell ltmain to make .lib files, not .a files. 7301 libext=lib 7302 # Tell ltmain to make .dll files, not .so files. 7303 shrext_cmds=".dll" 7304 # FIXME: Setting linknames here is a bad hack. 7305 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7306 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7307 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7308 else 7309 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7310 fi~ 7311 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7312 linknames=' 7313 # The linker will not automatically build a static lib if we build a DLL. 7314 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7315 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7316 # Don't use ranlib 7317 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7318 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7319 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7320 case $lt_outputfile in 7321 *.exe|*.EXE) ;; 7322 *) 7323 lt_outputfile="$lt_outputfile.exe" 7324 lt_tool_outputfile="$lt_tool_outputfile.exe" 7325 ;; 7326 esac~ 7327 func_to_tool_file "$lt_outputfile"~ 7328 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7329 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7330 $RM "$lt_outputfile.manifest"; 7331 fi' 7332 ;; 7333 *) 7334 # g++ 7335 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7336 # as there is no search path for DLLs. 7337 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7338 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7339 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7340 _LT_TAGVAR(always_export_symbols, $1)=no 7341 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7342 7343 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7344 _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' 7345 # If the export-symbols file already is a .def file (1st line 7346 # is EXPORTS), use it as is; otherwise, prepend... 7347 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7348 cp $export_symbols $output_objdir/$soname.def; 7349 else 7350 echo EXPORTS > $output_objdir/$soname.def; 7351 cat $export_symbols >> $output_objdir/$soname.def; 7352 fi~ 7353 $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' 7354 else 7355 _LT_TAGVAR(ld_shlibs, $1)=no 7356 fi 7357 ;; 7358 esac 7359 ;; 7360 darwin* | rhapsody*) 7361 _LT_DARWIN_LINKER_FEATURES($1) 7362 ;; 7363 7364 dgux*) 7365 case $cc_basename in 7366 ec++*) 7367 # FIXME: insert proper C++ library support 7368 _LT_TAGVAR(ld_shlibs, $1)=no 7369 ;; 7370 ghcx*) 7371 # Green Hills C++ Compiler 7372 # FIXME: insert proper C++ library support 7373 _LT_TAGVAR(ld_shlibs, $1)=no 7374 ;; 7375 *) 7376 # FIXME: insert proper C++ library support 7377 _LT_TAGVAR(ld_shlibs, $1)=no 7378 ;; 7379 esac 7380 ;; 7381 7382 freebsd2.*) 7383 # C++ shared libraries reported to be fairly broken before 7384 # switch to ELF 7385 _LT_TAGVAR(ld_shlibs, $1)=no 7386 ;; 7387 7388 freebsd-elf*) 7389 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7390 ;; 7391 7392 freebsd* | dragonfly*) 7393 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7394 # conventions 7395 _LT_TAGVAR(ld_shlibs, $1)=yes 7396 ;; 7397 7398 gnu*) 7399 ;; 7400 7401 haiku*) 7402 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7403 _LT_TAGVAR(link_all_deplibs, $1)=yes 7404 ;; 7405 7406 hpux9*) 7407 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7408 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7409 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7410 _LT_TAGVAR(hardcode_direct, $1)=yes 7411 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7412 # but as the default 7413 # location of the library. 7414 7415 case $cc_basename in 7416 CC*) 7417 # FIXME: insert proper C++ library support 7418 _LT_TAGVAR(ld_shlibs, $1)=no 7419 ;; 7420 aCC*) 7421 _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' 7422 # Commands to make compiler produce verbose output that lists 7423 # what "hidden" libraries, object files and flags are used when 7424 # linking a shared library. 7425 # 7426 # There doesn't appear to be a way to prevent this compiler from 7427 # explicitly linking system object files so we need to strip them 7428 # from the output so that they don't get included in the library 7429 # dependencies. 7430 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"' 7431 ;; 7432 *) 7433 if test "$GXX" = yes; then 7434 _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' 7435 else 7436 # FIXME: insert proper C++ library support 7437 _LT_TAGVAR(ld_shlibs, $1)=no 7438 fi 7439 ;; 7440 esac 7441 ;; 7442 7443 hpux10*|hpux11*) 7444 if test $with_gnu_ld = no; then 7445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7446 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7447 7448 case $host_cpu in 7449 hppa*64*|ia64*) 7450 ;; 7451 *) 7452 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7453 ;; 7454 esac 7455 fi 7456 case $host_cpu in 7457 hppa*64*|ia64*) 7458 _LT_TAGVAR(hardcode_direct, $1)=no 7459 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7460 ;; 7461 *) 7462 _LT_TAGVAR(hardcode_direct, $1)=yes 7463 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7464 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7465 # but as the default 7466 # location of the library. 7467 ;; 7468 esac 7469 7470 case $cc_basename in 7471 CC*) 7472 # FIXME: insert proper C++ library support 7473 _LT_TAGVAR(ld_shlibs, $1)=no 7474 ;; 7475 aCC*) 7476 case $host_cpu in 7477 hppa*64*) 7478 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7479 ;; 7480 ia64*) 7481 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7482 ;; 7483 *) 7484 _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' 7485 ;; 7486 esac 7487 # Commands to make compiler produce verbose output that lists 7488 # what "hidden" libraries, object files and flags are used when 7489 # linking a shared library. 7490 # 7491 # There doesn't appear to be a way to prevent this compiler from 7492 # explicitly linking system object files so we need to strip them 7493 # from the output so that they don't get included in the library 7494 # dependencies. 7495 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"' 7496 ;; 7497 *) 7498 if test "$GXX" = yes; then 7499 if test $with_gnu_ld = no; then 7500 case $host_cpu in 7501 hppa*64*) 7502 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7503 ;; 7504 ia64*) 7505 _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' 7506 ;; 7507 *) 7508 _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' 7509 ;; 7510 esac 7511 fi 7512 else 7513 # FIXME: insert proper C++ library support 7514 _LT_TAGVAR(ld_shlibs, $1)=no 7515 fi 7516 ;; 7517 esac 7518 ;; 7519 7520 interix[[3-9]]*) 7521 _LT_TAGVAR(hardcode_direct, $1)=no 7522 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7524 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7525 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7526 # Instead, shared libraries are loaded at an image base (0x10000000 by 7527 # default) and relocated if they conflict, which is a slow very memory 7528 # consuming and fragmenting process. To avoid this, we pick a random, 7529 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7530 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7531 _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' 7532 _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' 7533 ;; 7534 irix5* | irix6*) 7535 case $cc_basename in 7536 CC*) 7537 # SGI C++ 7538 _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' 7539 7540 # Archives containing C++ object files must be created using 7541 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7542 # necessary to make sure instantiated templates are included 7543 # in the archive. 7544 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7545 ;; 7546 *) 7547 if test "$GXX" = yes; then 7548 if test "$with_gnu_ld" = no; then 7549 _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' 7550 else 7551 _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' 7552 fi 7553 fi 7554 _LT_TAGVAR(link_all_deplibs, $1)=yes 7555 ;; 7556 esac 7557 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7558 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7559 _LT_TAGVAR(inherit_rpath, $1)=yes 7560 ;; 7561 7562 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7563 case $cc_basename in 7564 KCC*) 7565 # Kuck and Associates, Inc. (KAI) C++ Compiler 7566 7567 # KCC will only create a shared library if the output file 7568 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7569 # to its proper name (with version) after linking. 7570 _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' 7571 _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' 7572 # Commands to make compiler produce verbose output that lists 7573 # what "hidden" libraries, object files and flags are used when 7574 # linking a shared library. 7575 # 7576 # There doesn't appear to be a way to prevent this compiler from 7577 # explicitly linking system object files so we need to strip them 7578 # from the output so that they don't get included in the library 7579 # dependencies. 7580 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"' 7581 7582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7583 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7584 7585 # Archives containing C++ object files must be created using 7586 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7587 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7588 ;; 7589 icpc* | ecpc* ) 7590 # Intel C++ 7591 with_gnu_ld=yes 7592 # version 8.0 and above of icpc choke on multiply defined symbols 7593 # if we add $predep_objects and $postdep_objects, however 7.1 and 7594 # earlier do not add the objects themselves. 7595 case `$CC -V 2>&1` in 7596 *"Version 7."*) 7597 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7598 _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' 7599 ;; 7600 *) # Version 8.0 or newer 7601 tmp_idyn= 7602 case $host_cpu in 7603 ia64*) tmp_idyn=' -i_dynamic';; 7604 esac 7605 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7606 _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' 7607 ;; 7608 esac 7609 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7610 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7611 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7612 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7613 ;; 7614 pgCC* | pgcpp*) 7615 # Portland Group C++ compiler 7616 case `$CC -V` in 7617 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7618 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7619 rm -rf $tpldir~ 7620 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7621 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7622 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7623 rm -rf $tpldir~ 7624 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7625 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7626 $RANLIB $oldlib' 7627 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7628 rm -rf $tpldir~ 7629 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7630 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7631 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7632 rm -rf $tpldir~ 7633 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7634 $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' 7635 ;; 7636 *) # Version 6 and above use weak symbols 7637 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7638 _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' 7639 ;; 7640 esac 7641 7642 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7643 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7644 _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' 7645 ;; 7646 cxx*) 7647 # Compaq C++ 7648 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7649 _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' 7650 7651 runpath_var=LD_RUN_PATH 7652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7653 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7654 7655 # Commands to make compiler produce verbose output that lists 7656 # what "hidden" libraries, object files and flags are used when 7657 # linking a shared library. 7658 # 7659 # There doesn't appear to be a way to prevent this compiler from 7660 # explicitly linking system object files so we need to strip them 7661 # from the output so that they don't get included in the library 7662 # dependencies. 7663 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' 7664 ;; 7665 xl* | mpixl* | bgxl*) 7666 # IBM XL 8.0 on PPC, with GNU ld 7667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7668 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7669 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7670 if test "x$supports_anon_versioning" = xyes; then 7671 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7672 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7673 echo "local: *; };" >> $output_objdir/$libname.ver~ 7674 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7675 fi 7676 ;; 7677 *) 7678 case `$CC -V 2>&1 | sed 5q` in 7679 *Sun\ C*) 7680 # Sun C++ 5.9 7681 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7682 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7683 _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' 7684 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7685 _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' 7686 _LT_TAGVAR(compiler_needs_object, $1)=yes 7687 7688 # Not sure whether something based on 7689 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7690 # would be better. 7691 output_verbose_link_cmd='func_echo_all' 7692 7693 # Archives containing C++ object files must be created using 7694 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7695 # necessary to make sure instantiated templates are included 7696 # in the archive. 7697 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7698 ;; 7699 esac 7700 ;; 7701 esac 7702 ;; 7703 7704 lynxos*) 7705 # FIXME: insert proper C++ library support 7706 _LT_TAGVAR(ld_shlibs, $1)=no 7707 ;; 7708 7709 m88k*) 7710 # FIXME: insert proper C++ library support 7711 _LT_TAGVAR(ld_shlibs, $1)=no 7712 ;; 7713 7714 mvs*) 7715 case $cc_basename in 7716 cxx*) 7717 # FIXME: insert proper C++ library support 7718 _LT_TAGVAR(ld_shlibs, $1)=no 7719 ;; 7720 *) 7721 # FIXME: insert proper C++ library support 7722 _LT_TAGVAR(ld_shlibs, $1)=no 7723 ;; 7724 esac 7725 ;; 7726 7727 netbsd*) 7728 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7729 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7730 wlarc= 7731 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7732 _LT_TAGVAR(hardcode_direct, $1)=yes 7733 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7734 fi 7735 # Workaround some broken pre-1.5 toolchains 7736 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7737 ;; 7738 7739 *nto* | *qnx*) 7740 _LT_TAGVAR(ld_shlibs, $1)=yes 7741 ;; 7742 7743 openbsd2*) 7744 # C++ shared libraries are fairly broken 7745 _LT_TAGVAR(ld_shlibs, $1)=no 7746 ;; 7747 7748 openbsd*) 7749 if test -f /usr/libexec/ld.so; then 7750 _LT_TAGVAR(hardcode_direct, $1)=yes 7751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7752 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7753 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7754 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7755 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7756 _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' 7757 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7758 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7759 fi 7760 output_verbose_link_cmd=func_echo_all 7761 else 7762 _LT_TAGVAR(ld_shlibs, $1)=no 7763 fi 7764 ;; 7765 7766 osf3* | osf4* | osf5*) 7767 case $cc_basename in 7768 KCC*) 7769 # Kuck and Associates, Inc. (KAI) C++ Compiler 7770 7771 # KCC will only create a shared library if the output file 7772 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7773 # to its proper name (with version) after linking. 7774 _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' 7775 7776 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7777 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7778 7779 # Archives containing C++ object files must be created using 7780 # the KAI C++ compiler. 7781 case $host in 7782 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7783 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7784 esac 7785 ;; 7786 RCC*) 7787 # Rational C++ 2.4.1 7788 # FIXME: insert proper C++ library support 7789 _LT_TAGVAR(ld_shlibs, $1)=no 7790 ;; 7791 cxx*) 7792 case $host in 7793 osf3*) 7794 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7795 _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' 7796 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7797 ;; 7798 *) 7799 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7800 _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' 7801 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7802 echo "-hidden">> $lib.exp~ 7803 $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~ 7804 $RM $lib.exp' 7805 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7806 ;; 7807 esac 7808 7809 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7810 7811 # Commands to make compiler produce verbose output that lists 7812 # what "hidden" libraries, object files and flags are used when 7813 # linking a shared library. 7814 # 7815 # There doesn't appear to be a way to prevent this compiler from 7816 # explicitly linking system object files so we need to strip them 7817 # from the output so that they don't get included in the library 7818 # dependencies. 7819 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"' 7820 ;; 7821 *) 7822 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7823 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7824 case $host in 7825 osf3*) 7826 _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' 7827 ;; 7828 *) 7829 _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' 7830 ;; 7831 esac 7832 7833 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7834 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7835 7836 # Commands to make compiler produce verbose output that lists 7837 # what "hidden" libraries, object files and flags are used when 7838 # linking a shared library. 7839 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7840 7841 else 7842 # FIXME: insert proper C++ library support 7843 _LT_TAGVAR(ld_shlibs, $1)=no 7844 fi 7845 ;; 7846 esac 7847 ;; 7848 7849 psos*) 7850 # FIXME: insert proper C++ library support 7851 _LT_TAGVAR(ld_shlibs, $1)=no 7852 ;; 7853 7854 sunos4*) 7855 case $cc_basename in 7856 CC*) 7857 # Sun C++ 4.x 7858 # FIXME: insert proper C++ library support 7859 _LT_TAGVAR(ld_shlibs, $1)=no 7860 ;; 7861 lcc*) 7862 # Lucid 7863 # FIXME: insert proper C++ library support 7864 _LT_TAGVAR(ld_shlibs, $1)=no 7865 ;; 7866 *) 7867 # FIXME: insert proper C++ library support 7868 _LT_TAGVAR(ld_shlibs, $1)=no 7869 ;; 7870 esac 7871 ;; 7872 7873 solaris*) 7874 case $cc_basename in 7875 CC* | sunCC*) 7876 # Sun C++ 4.2, 5.x and Centerline C++ 7877 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7878 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7879 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7880 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7881 $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' 7882 7883 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7884 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7885 case $host_os in 7886 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7887 *) 7888 # The compiler driver will combine and reorder linker options, 7889 # but understands `-z linker_flag'. 7890 # Supported since Solaris 2.6 (maybe 2.5.1?) 7891 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7892 ;; 7893 esac 7894 _LT_TAGVAR(link_all_deplibs, $1)=yes 7895 7896 output_verbose_link_cmd='func_echo_all' 7897 7898 # Archives containing C++ object files must be created using 7899 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7900 # necessary to make sure instantiated templates are included 7901 # in the archive. 7902 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7903 ;; 7904 gcx*) 7905 # Green Hills C++ Compiler 7906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7907 7908 # The C++ compiler must be used to create the archive. 7909 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7910 ;; 7911 *) 7912 # GNU C++ compiler with Solaris linker 7913 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7914 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7915 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7916 _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' 7917 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7918 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7919 7920 # Commands to make compiler produce verbose output that lists 7921 # what "hidden" libraries, object files and flags are used when 7922 # linking a shared library. 7923 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7924 else 7925 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7926 # platform. 7927 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7928 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7929 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7930 7931 # Commands to make compiler produce verbose output that lists 7932 # what "hidden" libraries, object files and flags are used when 7933 # linking a shared library. 7934 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7935 fi 7936 7937 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7938 case $host_os in 7939 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7940 *) 7941 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7942 ;; 7943 esac 7944 fi 7945 ;; 7946 esac 7947 ;; 7948 7949 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7950 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7951 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7952 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7953 runpath_var='LD_RUN_PATH' 7954 7955 case $cc_basename in 7956 CC*) 7957 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7958 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7959 ;; 7960 *) 7961 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7962 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7963 ;; 7964 esac 7965 ;; 7966 7967 sysv5* | sco3.2v5* | sco5v6*) 7968 # Note: We can NOT use -z defs as we might desire, because we do not 7969 # link with -lc, and that would cause any symbols used from libc to 7970 # always be unresolved, which means just about no library would 7971 # ever link correctly. If we're not using GNU ld we use -z text 7972 # though, which does catch some bad symbols but isn't as heavy-handed 7973 # as -z defs. 7974 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7975 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7976 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7977 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7978 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7979 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7980 _LT_TAGVAR(link_all_deplibs, $1)=yes 7981 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7982 runpath_var='LD_RUN_PATH' 7983 7984 case $cc_basename in 7985 CC*) 7986 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7987 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7988 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7989 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7990 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7991 '"$_LT_TAGVAR(reload_cmds, $1)" 7992 ;; 7993 *) 7994 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7995 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7996 ;; 7997 esac 7998 ;; 7999 8000 tandem*) 8001 case $cc_basename in 8002 NCC*) 8003 # NonStop-UX NCC 3.20 8004 # FIXME: insert proper C++ library support 8005 _LT_TAGVAR(ld_shlibs, $1)=no 8006 ;; 8007 *) 8008 # FIXME: insert proper C++ library support 8009 _LT_TAGVAR(ld_shlibs, $1)=no 8010 ;; 8011 esac 8012 ;; 8013 8014 vxworks*) 8015 # FIXME: insert proper C++ library support 8016 _LT_TAGVAR(ld_shlibs, $1)=no 8017 ;; 8018 8019 *) 8020 # FIXME: insert proper C++ library support 8021 _LT_TAGVAR(ld_shlibs, $1)=no 8022 ;; 8023 esac 8024 8025 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8026 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8027 8028 _LT_TAGVAR(GCC, $1)="$GXX" 8029 _LT_TAGVAR(LD, $1)="$LD" 8030 8031 ## CAVEAT EMPTOR: 8032 ## There is no encapsulation within the following macros, do not change 8033 ## the running order or otherwise move them around unless you know exactly 8034 ## what you are doing... 8035 _LT_SYS_HIDDEN_LIBDEPS($1) 8036 _LT_COMPILER_PIC($1) 8037 _LT_COMPILER_C_O($1) 8038 _LT_COMPILER_FILE_LOCKS($1) 8039 _LT_LINKER_SHLIBS($1) 8040 _LT_SYS_DYNAMIC_LINKER($1) 8041 _LT_LINKER_HARDCODE_LIBPATH($1) 8042 8043 _LT_CONFIG($1) 8044 fi # test -n "$compiler" 8045 8046 CC=$lt_save_CC 8047 CFLAGS=$lt_save_CFLAGS 8048 LDCXX=$LD 8049 LD=$lt_save_LD 8050 GCC=$lt_save_GCC 8051 with_gnu_ld=$lt_save_with_gnu_ld 8052 lt_cv_path_LDCXX=$lt_cv_path_LD 8053 lt_cv_path_LD=$lt_save_path_LD 8054 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8055 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8056fi # test "$_lt_caught_CXX_error" != yes 8057 8058AC_LANG_POP 8059])# _LT_LANG_CXX_CONFIG 8060 8061 8062# _LT_FUNC_STRIPNAME_CNF 8063# ---------------------- 8064# func_stripname_cnf prefix suffix name 8065# strip PREFIX and SUFFIX off of NAME. 8066# PREFIX and SUFFIX must not contain globbing or regex special 8067# characters, hashes, percent signs, but SUFFIX may contain a leading 8068# dot (in which case that matches only a dot). 8069# 8070# This function is identical to the (non-XSI) version of func_stripname, 8071# except this one can be used by m4 code that may be executed by configure, 8072# rather than the libtool script. 8073m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 8074AC_REQUIRE([_LT_DECL_SED]) 8075AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 8076func_stripname_cnf () 8077{ 8078 case ${2} in 8079 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8080 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8081 esac 8082} # func_stripname_cnf 8083])# _LT_FUNC_STRIPNAME_CNF 8084 8085# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8086# --------------------------------- 8087# Figure out "hidden" library dependencies from verbose 8088# compiler output when linking a shared library. 8089# Parse the compiler output and extract the necessary 8090# objects, libraries and library flags. 8091m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8092[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8093AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8094# Dependencies to place before and after the object being linked: 8095_LT_TAGVAR(predep_objects, $1)= 8096_LT_TAGVAR(postdep_objects, $1)= 8097_LT_TAGVAR(predeps, $1)= 8098_LT_TAGVAR(postdeps, $1)= 8099_LT_TAGVAR(compiler_lib_search_path, $1)= 8100 8101dnl we can't use the lt_simple_compile_test_code here, 8102dnl because it contains code intended for an executable, 8103dnl not a library. It's possible we should let each 8104dnl tag define a new lt_????_link_test_code variable, 8105dnl but it's only used here... 8106m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8107int a; 8108void foo (void) { a = 0; } 8109_LT_EOF 8110], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8111class Foo 8112{ 8113public: 8114 Foo (void) { a = 0; } 8115private: 8116 int a; 8117}; 8118_LT_EOF 8119], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8120 subroutine foo 8121 implicit none 8122 integer*4 a 8123 a=0 8124 return 8125 end 8126_LT_EOF 8127], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8128 subroutine foo 8129 implicit none 8130 integer a 8131 a=0 8132 return 8133 end 8134_LT_EOF 8135], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8136public class foo { 8137 private int a; 8138 public void bar (void) { 8139 a = 0; 8140 } 8141}; 8142_LT_EOF 8143], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8144package foo 8145func foo() { 8146} 8147_LT_EOF 8148]) 8149 8150_lt_libdeps_save_CFLAGS=$CFLAGS 8151case "$CC $CFLAGS " in #( 8152*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8153*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8154*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8155esac 8156 8157dnl Parse the compiler output and extract the necessary 8158dnl objects, libraries and library flags. 8159if AC_TRY_EVAL(ac_compile); then 8160 # Parse the compiler output and extract the necessary 8161 # objects, libraries and library flags. 8162 8163 # Sentinel used to keep track of whether or not we are before 8164 # the conftest object file. 8165 pre_test_object_deps_done=no 8166 8167 for p in `eval "$output_verbose_link_cmd"`; do 8168 case ${prev}${p} in 8169 8170 -L* | -R* | -l*) 8171 # Some compilers place space between "-{L,R}" and the path. 8172 # Remove the space. 8173 if test $p = "-L" || 8174 test $p = "-R"; then 8175 prev=$p 8176 continue 8177 fi 8178 8179 # Expand the sysroot to ease extracting the directories later. 8180 if test -z "$prev"; then 8181 case $p in 8182 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8183 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8184 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8185 esac 8186 fi 8187 case $p in 8188 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8189 esac 8190 if test "$pre_test_object_deps_done" = no; then 8191 case ${prev} in 8192 -L | -R) 8193 # Internal compiler library paths should come after those 8194 # provided the user. The postdeps already come after the 8195 # user supplied libs so there is no need to process them. 8196 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8197 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8198 else 8199 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8200 fi 8201 ;; 8202 # The "-l" case would never come before the object being 8203 # linked, so don't bother handling this case. 8204 esac 8205 else 8206 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8207 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8208 else 8209 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8210 fi 8211 fi 8212 prev= 8213 ;; 8214 8215 *.lto.$objext) ;; # Ignore GCC LTO objects 8216 *.$objext) 8217 # This assumes that the test object file only shows up 8218 # once in the compiler output. 8219 if test "$p" = "conftest.$objext"; then 8220 pre_test_object_deps_done=yes 8221 continue 8222 fi 8223 8224 if test "$pre_test_object_deps_done" = no; then 8225 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8226 _LT_TAGVAR(predep_objects, $1)="$p" 8227 else 8228 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8229 fi 8230 else 8231 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8232 _LT_TAGVAR(postdep_objects, $1)="$p" 8233 else 8234 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8235 fi 8236 fi 8237 ;; 8238 8239 *) ;; # Ignore the rest. 8240 8241 esac 8242 done 8243 8244 # Clean up. 8245 rm -f a.out a.exe 8246else 8247 echo "libtool.m4: error: problem compiling $1 test program" 8248fi 8249 8250$RM -f confest.$objext 8251CFLAGS=$_lt_libdeps_save_CFLAGS 8252 8253# PORTME: override above test on systems where it is broken 8254m4_if([$1], [CXX], 8255[case $host_os in 8256interix[[3-9]]*) 8257 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8258 # hack all around it, let's just trust "g++" to DTRT. 8259 _LT_TAGVAR(predep_objects,$1)= 8260 _LT_TAGVAR(postdep_objects,$1)= 8261 _LT_TAGVAR(postdeps,$1)= 8262 ;; 8263 8264linux*) 8265 case `$CC -V 2>&1 | sed 5q` in 8266 *Sun\ C*) 8267 # Sun C++ 5.9 8268 8269 # The more standards-conforming stlport4 library is 8270 # incompatible with the Cstd library. Avoid specifying 8271 # it if it's in CXXFLAGS. Ignore libCrun as 8272 # -library=stlport4 depends on it. 8273 case " $CXX $CXXFLAGS " in 8274 *" -library=stlport4 "*) 8275 solaris_use_stlport4=yes 8276 ;; 8277 esac 8278 8279 if test "$solaris_use_stlport4" != yes; then 8280 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8281 fi 8282 ;; 8283 esac 8284 ;; 8285 8286solaris*) 8287 case $cc_basename in 8288 CC* | sunCC*) 8289 # The more standards-conforming stlport4 library is 8290 # incompatible with the Cstd library. Avoid specifying 8291 # it if it's in CXXFLAGS. Ignore libCrun as 8292 # -library=stlport4 depends on it. 8293 case " $CXX $CXXFLAGS " in 8294 *" -library=stlport4 "*) 8295 solaris_use_stlport4=yes 8296 ;; 8297 esac 8298 8299 # Adding this requires a known-good setup of shared libraries for 8300 # Sun compiler versions before 5.6, else PIC objects from an old 8301 # archive will be linked into the output, leading to subtle bugs. 8302 if test "$solaris_use_stlport4" != yes; then 8303 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8304 fi 8305 ;; 8306 esac 8307 ;; 8308esac 8309]) 8310 8311case " $_LT_TAGVAR(postdeps, $1) " in 8312*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8313esac 8314 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8315if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8316 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8317fi 8318_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8319 [The directories searched by this compiler when creating a shared library]) 8320_LT_TAGDECL([], [predep_objects], [1], 8321 [Dependencies to place before and after the objects being linked to 8322 create a shared library]) 8323_LT_TAGDECL([], [postdep_objects], [1]) 8324_LT_TAGDECL([], [predeps], [1]) 8325_LT_TAGDECL([], [postdeps], [1]) 8326_LT_TAGDECL([], [compiler_lib_search_path], [1], 8327 [The library search path used internally by the compiler when linking 8328 a shared library]) 8329])# _LT_SYS_HIDDEN_LIBDEPS 8330 8331 8332# _LT_LANG_F77_CONFIG([TAG]) 8333# -------------------------- 8334# Ensure that the configuration variables for a Fortran 77 compiler are 8335# suitably defined. These variables are subsequently used by _LT_CONFIG 8336# to write the compiler configuration to `libtool'. 8337m4_defun([_LT_LANG_F77_CONFIG], 8338[AC_LANG_PUSH(Fortran 77) 8339if test -z "$F77" || test "X$F77" = "Xno"; then 8340 _lt_disable_F77=yes 8341fi 8342 8343_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8344_LT_TAGVAR(allow_undefined_flag, $1)= 8345_LT_TAGVAR(always_export_symbols, $1)=no 8346_LT_TAGVAR(archive_expsym_cmds, $1)= 8347_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8348_LT_TAGVAR(hardcode_direct, $1)=no 8349_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8350_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8351_LT_TAGVAR(hardcode_libdir_separator, $1)= 8352_LT_TAGVAR(hardcode_minus_L, $1)=no 8353_LT_TAGVAR(hardcode_automatic, $1)=no 8354_LT_TAGVAR(inherit_rpath, $1)=no 8355_LT_TAGVAR(module_cmds, $1)= 8356_LT_TAGVAR(module_expsym_cmds, $1)= 8357_LT_TAGVAR(link_all_deplibs, $1)=unknown 8358_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8359_LT_TAGVAR(reload_flag, $1)=$reload_flag 8360_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8361_LT_TAGVAR(no_undefined_flag, $1)= 8362_LT_TAGVAR(whole_archive_flag_spec, $1)= 8363_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8364 8365# Source file extension for f77 test sources. 8366ac_ext=f 8367 8368# Object file extension for compiled f77 test sources. 8369objext=o 8370_LT_TAGVAR(objext, $1)=$objext 8371 8372# No sense in running all these tests if we already determined that 8373# the F77 compiler isn't working. Some variables (like enable_shared) 8374# are currently assumed to apply to all compilers on this platform, 8375# and will be corrupted by setting them based on a non-working compiler. 8376if test "$_lt_disable_F77" != yes; then 8377 # Code to be used in simple compile tests 8378 lt_simple_compile_test_code="\ 8379 subroutine t 8380 return 8381 end 8382" 8383 8384 # Code to be used in simple link tests 8385 lt_simple_link_test_code="\ 8386 program t 8387 end 8388" 8389 8390 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8391 _LT_TAG_COMPILER 8392 8393 # save warnings/boilerplate of simple test code 8394 _LT_COMPILER_BOILERPLATE 8395 _LT_LINKER_BOILERPLATE 8396 8397 # Allow CC to be a program name with arguments. 8398 lt_save_CC="$CC" 8399 lt_save_GCC=$GCC 8400 lt_save_CFLAGS=$CFLAGS 8401 CC=${F77-"f77"} 8402 CFLAGS=$FFLAGS 8403 compiler=$CC 8404 _LT_TAGVAR(compiler, $1)=$CC 8405 _LT_CC_BASENAME([$compiler]) 8406 GCC=$G77 8407 if test -n "$compiler"; then 8408 AC_MSG_CHECKING([if libtool supports shared libraries]) 8409 AC_MSG_RESULT([$can_build_shared]) 8410 8411 AC_MSG_CHECKING([whether to build shared libraries]) 8412 test "$can_build_shared" = "no" && enable_shared=no 8413 8414 # On AIX, shared libraries and static libraries use the same namespace, and 8415 # are all built from PIC. 8416 case $host_os in 8417 aix3*) 8418 test "$enable_shared" = yes && enable_static=no 8419 if test -n "$RANLIB"; then 8420 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8421 postinstall_cmds='$RANLIB $lib' 8422 fi 8423 ;; 8424 aix[[4-9]]*) 8425 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8426 test "$enable_shared" = yes && enable_static=no 8427 fi 8428 ;; 8429 esac 8430 AC_MSG_RESULT([$enable_shared]) 8431 8432 AC_MSG_CHECKING([whether to build static libraries]) 8433 # Make sure either enable_shared or enable_static is yes. 8434 test "$enable_shared" = yes || enable_static=yes 8435 AC_MSG_RESULT([$enable_static]) 8436 8437 _LT_TAGVAR(GCC, $1)="$G77" 8438 _LT_TAGVAR(LD, $1)="$LD" 8439 8440 ## CAVEAT EMPTOR: 8441 ## There is no encapsulation within the following macros, do not change 8442 ## the running order or otherwise move them around unless you know exactly 8443 ## what you are doing... 8444 _LT_COMPILER_PIC($1) 8445 _LT_COMPILER_C_O($1) 8446 _LT_COMPILER_FILE_LOCKS($1) 8447 _LT_LINKER_SHLIBS($1) 8448 _LT_SYS_DYNAMIC_LINKER($1) 8449 _LT_LINKER_HARDCODE_LIBPATH($1) 8450 8451 _LT_CONFIG($1) 8452 fi # test -n "$compiler" 8453 8454 GCC=$lt_save_GCC 8455 CC="$lt_save_CC" 8456 CFLAGS="$lt_save_CFLAGS" 8457fi # test "$_lt_disable_F77" != yes 8458 8459AC_LANG_POP 8460])# _LT_LANG_F77_CONFIG 8461 8462 8463# _LT_LANG_FC_CONFIG([TAG]) 8464# ------------------------- 8465# Ensure that the configuration variables for a Fortran compiler are 8466# suitably defined. These variables are subsequently used by _LT_CONFIG 8467# to write the compiler configuration to `libtool'. 8468m4_defun([_LT_LANG_FC_CONFIG], 8469[AC_LANG_PUSH(Fortran) 8470 8471if test -z "$FC" || test "X$FC" = "Xno"; then 8472 _lt_disable_FC=yes 8473fi 8474 8475_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8476_LT_TAGVAR(allow_undefined_flag, $1)= 8477_LT_TAGVAR(always_export_symbols, $1)=no 8478_LT_TAGVAR(archive_expsym_cmds, $1)= 8479_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8480_LT_TAGVAR(hardcode_direct, $1)=no 8481_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8482_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8483_LT_TAGVAR(hardcode_libdir_separator, $1)= 8484_LT_TAGVAR(hardcode_minus_L, $1)=no 8485_LT_TAGVAR(hardcode_automatic, $1)=no 8486_LT_TAGVAR(inherit_rpath, $1)=no 8487_LT_TAGVAR(module_cmds, $1)= 8488_LT_TAGVAR(module_expsym_cmds, $1)= 8489_LT_TAGVAR(link_all_deplibs, $1)=unknown 8490_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8491_LT_TAGVAR(reload_flag, $1)=$reload_flag 8492_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8493_LT_TAGVAR(no_undefined_flag, $1)= 8494_LT_TAGVAR(whole_archive_flag_spec, $1)= 8495_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8496 8497# Source file extension for fc test sources. 8498ac_ext=${ac_fc_srcext-f} 8499 8500# Object file extension for compiled fc test sources. 8501objext=o 8502_LT_TAGVAR(objext, $1)=$objext 8503 8504# No sense in running all these tests if we already determined that 8505# the FC compiler isn't working. Some variables (like enable_shared) 8506# are currently assumed to apply to all compilers on this platform, 8507# and will be corrupted by setting them based on a non-working compiler. 8508if test "$_lt_disable_FC" != yes; then 8509 # Code to be used in simple compile tests 8510 lt_simple_compile_test_code="\ 8511 subroutine t 8512 return 8513 end 8514" 8515 8516 # Code to be used in simple link tests 8517 lt_simple_link_test_code="\ 8518 program t 8519 end 8520" 8521 8522 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8523 _LT_TAG_COMPILER 8524 8525 # save warnings/boilerplate of simple test code 8526 _LT_COMPILER_BOILERPLATE 8527 _LT_LINKER_BOILERPLATE 8528 8529 # Allow CC to be a program name with arguments. 8530 lt_save_CC="$CC" 8531 lt_save_GCC=$GCC 8532 lt_save_CFLAGS=$CFLAGS 8533 CC=${FC-"f95"} 8534 CFLAGS=$FCFLAGS 8535 compiler=$CC 8536 GCC=$ac_cv_fc_compiler_gnu 8537 8538 _LT_TAGVAR(compiler, $1)=$CC 8539 _LT_CC_BASENAME([$compiler]) 8540 8541 if test -n "$compiler"; then 8542 AC_MSG_CHECKING([if libtool supports shared libraries]) 8543 AC_MSG_RESULT([$can_build_shared]) 8544 8545 AC_MSG_CHECKING([whether to build shared libraries]) 8546 test "$can_build_shared" = "no" && enable_shared=no 8547 8548 # On AIX, shared libraries and static libraries use the same namespace, and 8549 # are all built from PIC. 8550 case $host_os in 8551 aix3*) 8552 test "$enable_shared" = yes && enable_static=no 8553 if test -n "$RANLIB"; then 8554 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8555 postinstall_cmds='$RANLIB $lib' 8556 fi 8557 ;; 8558 aix[[4-9]]*) 8559 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8560 test "$enable_shared" = yes && enable_static=no 8561 fi 8562 ;; 8563 esac 8564 AC_MSG_RESULT([$enable_shared]) 8565 8566 AC_MSG_CHECKING([whether to build static libraries]) 8567 # Make sure either enable_shared or enable_static is yes. 8568 test "$enable_shared" = yes || enable_static=yes 8569 AC_MSG_RESULT([$enable_static]) 8570 8571 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8572 _LT_TAGVAR(LD, $1)="$LD" 8573 8574 ## CAVEAT EMPTOR: 8575 ## There is no encapsulation within the following macros, do not change 8576 ## the running order or otherwise move them around unless you know exactly 8577 ## what you are doing... 8578 _LT_SYS_HIDDEN_LIBDEPS($1) 8579 _LT_COMPILER_PIC($1) 8580 _LT_COMPILER_C_O($1) 8581 _LT_COMPILER_FILE_LOCKS($1) 8582 _LT_LINKER_SHLIBS($1) 8583 _LT_SYS_DYNAMIC_LINKER($1) 8584 _LT_LINKER_HARDCODE_LIBPATH($1) 8585 8586 _LT_CONFIG($1) 8587 fi # test -n "$compiler" 8588 8589 GCC=$lt_save_GCC 8590 CC=$lt_save_CC 8591 CFLAGS=$lt_save_CFLAGS 8592fi # test "$_lt_disable_FC" != yes 8593 8594AC_LANG_POP 8595])# _LT_LANG_FC_CONFIG 8596 8597 8598# _LT_LANG_GCJ_CONFIG([TAG]) 8599# -------------------------- 8600# Ensure that the configuration variables for the GNU Java Compiler compiler 8601# are suitably defined. These variables are subsequently used by _LT_CONFIG 8602# to write the compiler configuration to `libtool'. 8603m4_defun([_LT_LANG_GCJ_CONFIG], 8604[AC_REQUIRE([LT_PROG_GCJ])dnl 8605AC_LANG_SAVE 8606 8607# Source file extension for Java test sources. 8608ac_ext=java 8609 8610# Object file extension for compiled Java test sources. 8611objext=o 8612_LT_TAGVAR(objext, $1)=$objext 8613 8614# Code to be used in simple compile tests 8615lt_simple_compile_test_code="class foo {}" 8616 8617# Code to be used in simple link tests 8618lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8619 8620# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8621_LT_TAG_COMPILER 8622 8623# save warnings/boilerplate of simple test code 8624_LT_COMPILER_BOILERPLATE 8625_LT_LINKER_BOILERPLATE 8626 8627# Allow CC to be a program name with arguments. 8628lt_save_CC=$CC 8629lt_save_CFLAGS=$CFLAGS 8630lt_save_GCC=$GCC 8631GCC=yes 8632CC=${GCJ-"gcj"} 8633CFLAGS=$GCJFLAGS 8634compiler=$CC 8635_LT_TAGVAR(compiler, $1)=$CC 8636_LT_TAGVAR(LD, $1)="$LD" 8637_LT_CC_BASENAME([$compiler]) 8638 8639# GCJ did not exist at the time GCC didn't implicitly link libc in. 8640_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8641 8642_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8643_LT_TAGVAR(reload_flag, $1)=$reload_flag 8644_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8645 8646if test -n "$compiler"; then 8647 _LT_COMPILER_NO_RTTI($1) 8648 _LT_COMPILER_PIC($1) 8649 _LT_COMPILER_C_O($1) 8650 _LT_COMPILER_FILE_LOCKS($1) 8651 _LT_LINKER_SHLIBS($1) 8652 _LT_LINKER_HARDCODE_LIBPATH($1) 8653 8654 _LT_CONFIG($1) 8655fi 8656 8657AC_LANG_RESTORE 8658 8659GCC=$lt_save_GCC 8660CC=$lt_save_CC 8661CFLAGS=$lt_save_CFLAGS 8662])# _LT_LANG_GCJ_CONFIG 8663 8664 8665# _LT_LANG_GO_CONFIG([TAG]) 8666# -------------------------- 8667# Ensure that the configuration variables for the GNU Go compiler 8668# are suitably defined. These variables are subsequently used by _LT_CONFIG 8669# to write the compiler configuration to `libtool'. 8670m4_defun([_LT_LANG_GO_CONFIG], 8671[AC_REQUIRE([LT_PROG_GO])dnl 8672AC_LANG_SAVE 8673 8674# Source file extension for Go test sources. 8675ac_ext=go 8676 8677# Object file extension for compiled Go test sources. 8678objext=o 8679_LT_TAGVAR(objext, $1)=$objext 8680 8681# Code to be used in simple compile tests 8682lt_simple_compile_test_code="package main; func main() { }" 8683 8684# Code to be used in simple link tests 8685lt_simple_link_test_code='package main; func main() { }' 8686 8687# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8688_LT_TAG_COMPILER 8689 8690# save warnings/boilerplate of simple test code 8691_LT_COMPILER_BOILERPLATE 8692_LT_LINKER_BOILERPLATE 8693 8694# Allow CC to be a program name with arguments. 8695lt_save_CC=$CC 8696lt_save_CFLAGS=$CFLAGS 8697lt_save_GCC=$GCC 8698GCC=yes 8699CC=${GOC-"gccgo"} 8700CFLAGS=$GOFLAGS 8701compiler=$CC 8702_LT_TAGVAR(compiler, $1)=$CC 8703_LT_TAGVAR(LD, $1)="$LD" 8704_LT_CC_BASENAME([$compiler]) 8705 8706# Go did not exist at the time GCC didn't implicitly link libc in. 8707_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8708 8709_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8710_LT_TAGVAR(reload_flag, $1)=$reload_flag 8711_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8712 8713if test -n "$compiler"; then 8714 _LT_COMPILER_NO_RTTI($1) 8715 _LT_COMPILER_PIC($1) 8716 _LT_COMPILER_C_O($1) 8717 _LT_COMPILER_FILE_LOCKS($1) 8718 _LT_LINKER_SHLIBS($1) 8719 _LT_LINKER_HARDCODE_LIBPATH($1) 8720 8721 _LT_CONFIG($1) 8722fi 8723 8724AC_LANG_RESTORE 8725 8726GCC=$lt_save_GCC 8727CC=$lt_save_CC 8728CFLAGS=$lt_save_CFLAGS 8729])# _LT_LANG_GO_CONFIG 8730 8731 8732# _LT_LANG_RC_CONFIG([TAG]) 8733# ------------------------- 8734# Ensure that the configuration variables for the Windows resource compiler 8735# are suitably defined. These variables are subsequently used by _LT_CONFIG 8736# to write the compiler configuration to `libtool'. 8737m4_defun([_LT_LANG_RC_CONFIG], 8738[AC_REQUIRE([LT_PROG_RC])dnl 8739AC_LANG_SAVE 8740 8741# Source file extension for RC test sources. 8742ac_ext=rc 8743 8744# Object file extension for compiled RC test sources. 8745objext=o 8746_LT_TAGVAR(objext, $1)=$objext 8747 8748# Code to be used in simple compile tests 8749lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8750 8751# Code to be used in simple link tests 8752lt_simple_link_test_code="$lt_simple_compile_test_code" 8753 8754# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8755_LT_TAG_COMPILER 8756 8757# save warnings/boilerplate of simple test code 8758_LT_COMPILER_BOILERPLATE 8759_LT_LINKER_BOILERPLATE 8760 8761# Allow CC to be a program name with arguments. 8762lt_save_CC="$CC" 8763lt_save_CFLAGS=$CFLAGS 8764lt_save_GCC=$GCC 8765GCC= 8766CC=${RC-"windres"} 8767CFLAGS= 8768compiler=$CC 8769_LT_TAGVAR(compiler, $1)=$CC 8770_LT_CC_BASENAME([$compiler]) 8771_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8772 8773if test -n "$compiler"; then 8774 : 8775 _LT_CONFIG($1) 8776fi 8777 8778GCC=$lt_save_GCC 8779AC_LANG_RESTORE 8780CC=$lt_save_CC 8781CFLAGS=$lt_save_CFLAGS 8782])# _LT_LANG_RC_CONFIG 8783 8784 8785# LT_PROG_GCJ 8786# ----------- 8787AC_DEFUN([LT_PROG_GCJ], 8788[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8789 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8790 [AC_CHECK_TOOL(GCJ, gcj,) 8791 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8792 AC_SUBST(GCJFLAGS)])])[]dnl 8793]) 8794 8795# Old name: 8796AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8797dnl aclocal-1.4 backwards compatibility: 8798dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8799 8800 8801# LT_PROG_GO 8802# ---------- 8803AC_DEFUN([LT_PROG_GO], 8804[AC_CHECK_TOOL(GOC, gccgo,) 8805]) 8806 8807 8808# LT_PROG_RC 8809# ---------- 8810AC_DEFUN([LT_PROG_RC], 8811[AC_CHECK_TOOL(RC, windres,) 8812]) 8813 8814# Old name: 8815AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8816dnl aclocal-1.4 backwards compatibility: 8817dnl AC_DEFUN([LT_AC_PROG_RC], []) 8818 8819 8820# _LT_DECL_EGREP 8821# -------------- 8822# If we don't have a new enough Autoconf to choose the best grep 8823# available, choose the one first in the user's PATH. 8824m4_defun([_LT_DECL_EGREP], 8825[AC_REQUIRE([AC_PROG_EGREP])dnl 8826AC_REQUIRE([AC_PROG_FGREP])dnl 8827test -z "$GREP" && GREP=grep 8828_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8829_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8830_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8831dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8832AC_SUBST([GREP]) 8833]) 8834 8835 8836# _LT_DECL_OBJDUMP 8837# -------------- 8838# If we don't have a new enough Autoconf to choose the best objdump 8839# available, choose the one first in the user's PATH. 8840m4_defun([_LT_DECL_OBJDUMP], 8841[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8842test -z "$OBJDUMP" && OBJDUMP=objdump 8843_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8844AC_SUBST([OBJDUMP]) 8845]) 8846 8847# _LT_DECL_DLLTOOL 8848# ---------------- 8849# Ensure DLLTOOL variable is set. 8850m4_defun([_LT_DECL_DLLTOOL], 8851[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8852test -z "$DLLTOOL" && DLLTOOL=dlltool 8853_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8854AC_SUBST([DLLTOOL]) 8855]) 8856 8857# _LT_DECL_SED 8858# ------------ 8859# Check for a fully-functional sed program, that truncates 8860# as few characters as possible. Prefer GNU sed if found. 8861m4_defun([_LT_DECL_SED], 8862[AC_PROG_SED 8863test -z "$SED" && SED=sed 8864Xsed="$SED -e 1s/^X//" 8865_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8866_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8867 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8868])# _LT_DECL_SED 8869 8870m4_ifndef([AC_PROG_SED], [ 8871# NOTE: This macro has been submitted for inclusion into # 8872# GNU Autoconf as AC_PROG_SED. When it is available in # 8873# a released version of Autoconf we should remove this # 8874# macro and use it instead. # 8875 8876m4_defun([AC_PROG_SED], 8877[AC_MSG_CHECKING([for a sed that does not truncate output]) 8878AC_CACHE_VAL(lt_cv_path_SED, 8879[# Loop through the user's path and test for sed and gsed. 8880# Then use that list of sed's as ones to test for truncation. 8881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8882for as_dir in $PATH 8883do 8884 IFS=$as_save_IFS 8885 test -z "$as_dir" && as_dir=. 8886 for lt_ac_prog in sed gsed; do 8887 for ac_exec_ext in '' $ac_executable_extensions; do 8888 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8889 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8890 fi 8891 done 8892 done 8893done 8894IFS=$as_save_IFS 8895lt_ac_max=0 8896lt_ac_count=0 8897# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8898# along with /bin/sed that truncates output. 8899for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8900 test ! -f $lt_ac_sed && continue 8901 cat /dev/null > conftest.in 8902 lt_ac_count=0 8903 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8904 # Check for GNU sed and select it if it is found. 8905 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8906 lt_cv_path_SED=$lt_ac_sed 8907 break 8908 fi 8909 while true; do 8910 cat conftest.in conftest.in >conftest.tmp 8911 mv conftest.tmp conftest.in 8912 cp conftest.in conftest.nl 8913 echo >>conftest.nl 8914 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8915 cmp -s conftest.out conftest.nl || break 8916 # 10000 chars as input seems more than enough 8917 test $lt_ac_count -gt 10 && break 8918 lt_ac_count=`expr $lt_ac_count + 1` 8919 if test $lt_ac_count -gt $lt_ac_max; then 8920 lt_ac_max=$lt_ac_count 8921 lt_cv_path_SED=$lt_ac_sed 8922 fi 8923 done 8924done 8925]) 8926SED=$lt_cv_path_SED 8927AC_SUBST([SED]) 8928AC_MSG_RESULT([$SED]) 8929])#AC_PROG_SED 8930])#m4_ifndef 8931 8932# Old name: 8933AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8934dnl aclocal-1.4 backwards compatibility: 8935dnl AC_DEFUN([LT_AC_PROG_SED], []) 8936 8937 8938# _LT_CHECK_SHELL_FEATURES 8939# ------------------------ 8940# Find out whether the shell is Bourne or XSI compatible, 8941# or has some other useful features. 8942m4_defun([_LT_CHECK_SHELL_FEATURES], 8943[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8944# Try some XSI features 8945xsi_shell=no 8946( _lt_dummy="a/b/c" 8947 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8948 = c,a/b,b/c, \ 8949 && eval 'test $(( 1 + 1 )) -eq 2 \ 8950 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8951 && xsi_shell=yes 8952AC_MSG_RESULT([$xsi_shell]) 8953_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8954 8955AC_MSG_CHECKING([whether the shell understands "+="]) 8956lt_shell_append=no 8957( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8958 >/dev/null 2>&1 \ 8959 && lt_shell_append=yes 8960AC_MSG_RESULT([$lt_shell_append]) 8961_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8962 8963if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8964 lt_unset=unset 8965else 8966 lt_unset=false 8967fi 8968_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8969 8970# test EBCDIC or ASCII 8971case `echo X|tr X '\101'` in 8972 A) # ASCII based system 8973 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8974 lt_SP2NL='tr \040 \012' 8975 lt_NL2SP='tr \015\012 \040\040' 8976 ;; 8977 *) # EBCDIC based system 8978 lt_SP2NL='tr \100 \n' 8979 lt_NL2SP='tr \r\n \100\100' 8980 ;; 8981esac 8982_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8983_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8984])# _LT_CHECK_SHELL_FEATURES 8985 8986 8987# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8988# ------------------------------------------------------ 8989# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8990# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8991m4_defun([_LT_PROG_FUNCTION_REPLACE], 8992[dnl { 8993sed -e '/^$1 ()$/,/^} # $1 /c\ 8994$1 ()\ 8995{\ 8996m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8997} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8998 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8999 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9000test 0 -eq $? || _lt_function_replace_fail=: 9001]) 9002 9003 9004# _LT_PROG_REPLACE_SHELLFNS 9005# ------------------------- 9006# Replace existing portable implementations of several shell functions with 9007# equivalent extended shell implementations where those features are available.. 9008m4_defun([_LT_PROG_REPLACE_SHELLFNS], 9009[if test x"$xsi_shell" = xyes; then 9010 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 9011 case ${1} in 9012 */*) func_dirname_result="${1%/*}${2}" ;; 9013 * ) func_dirname_result="${3}" ;; 9014 esac]) 9015 9016 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 9017 func_basename_result="${1##*/}"]) 9018 9019 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 9020 case ${1} in 9021 */*) func_dirname_result="${1%/*}${2}" ;; 9022 * ) func_dirname_result="${3}" ;; 9023 esac 9024 func_basename_result="${1##*/}"]) 9025 9026 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 9027 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9028 # positional parameters, so assign one to ordinary parameter first. 9029 func_stripname_result=${3} 9030 func_stripname_result=${func_stripname_result#"${1}"} 9031 func_stripname_result=${func_stripname_result%"${2}"}]) 9032 9033 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 9034 func_split_long_opt_name=${1%%=*} 9035 func_split_long_opt_arg=${1#*=}]) 9036 9037 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 9038 func_split_short_opt_arg=${1#??} 9039 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9040 9041 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 9042 case ${1} in 9043 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9044 *) func_lo2o_result=${1} ;; 9045 esac]) 9046 9047 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9048 9049 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9050 9051 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 9052fi 9053 9054if test x"$lt_shell_append" = xyes; then 9055 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 9056 9057 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 9058 func_quote_for_eval "${2}" 9059dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 9060 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 9061 9062 # Save a `func_append' function call where possible by direct use of '+=' 9063 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 9064 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9065 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9066 test 0 -eq $? || _lt_function_replace_fail=: 9067else 9068 # Save a `func_append' function call even when '+=' is not available 9069 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 9070 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9071 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9072 test 0 -eq $? || _lt_function_replace_fail=: 9073fi 9074 9075if test x"$_lt_function_replace_fail" = x":"; then 9076 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 9077fi 9078]) 9079 9080# _LT_PATH_CONVERSION_FUNCTIONS 9081# ----------------------------- 9082# Determine which file name conversion functions should be used by 9083# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 9084# for certain cross-compile configurations and native mingw. 9085m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 9086[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9087AC_REQUIRE([AC_CANONICAL_BUILD])dnl 9088AC_MSG_CHECKING([how to convert $build file names to $host format]) 9089AC_CACHE_VAL(lt_cv_to_host_file_cmd, 9090[case $host in 9091 *-*-mingw* ) 9092 case $build in 9093 *-*-mingw* ) # actually msys 9094 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 9095 ;; 9096 *-*-cygwin* ) 9097 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 9098 ;; 9099 * ) # otherwise, assume *nix 9100 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 9101 ;; 9102 esac 9103 ;; 9104 *-*-cygwin* ) 9105 case $build in 9106 *-*-mingw* ) # actually msys 9107 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 9108 ;; 9109 *-*-cygwin* ) 9110 lt_cv_to_host_file_cmd=func_convert_file_noop 9111 ;; 9112 * ) # otherwise, assume *nix 9113 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9114 ;; 9115 esac 9116 ;; 9117 * ) # unhandled hosts (and "normal" native builds) 9118 lt_cv_to_host_file_cmd=func_convert_file_noop 9119 ;; 9120esac 9121]) 9122to_host_file_cmd=$lt_cv_to_host_file_cmd 9123AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9124_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9125 [0], [convert $build file names to $host format])dnl 9126 9127AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9128AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9129[#assume ordinary cross tools, or native build. 9130lt_cv_to_tool_file_cmd=func_convert_file_noop 9131case $host in 9132 *-*-mingw* ) 9133 case $build in 9134 *-*-mingw* ) # actually msys 9135 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9136 ;; 9137 esac 9138 ;; 9139esac 9140]) 9141to_tool_file_cmd=$lt_cv_to_tool_file_cmd 9142AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9143_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9144 [0], [convert $build files to toolchain format])dnl 9145])# _LT_PATH_CONVERSION_FUNCTIONS 9146 9147# Helper functions for option handling. -*- Autoconf -*- 9148# 9149# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9150# Inc. 9151# Written by Gary V. Vaughan, 2004 9152# 9153# This file is free software; the Free Software Foundation gives 9154# unlimited permission to copy and/or distribute it, with or without 9155# modifications, as long as this notice is preserved. 9156 9157# serial 7 ltoptions.m4 9158 9159# This is to help aclocal find these macros, as it can't see m4_define. 9160AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9161 9162 9163# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9164# ------------------------------------------ 9165m4_define([_LT_MANGLE_OPTION], 9166[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9167 9168 9169# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9170# --------------------------------------- 9171# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9172# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9173# saved as a flag. 9174m4_define([_LT_SET_OPTION], 9175[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9176m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9177 _LT_MANGLE_DEFUN([$1], [$2]), 9178 [m4_warning([Unknown $1 option `$2'])])[]dnl 9179]) 9180 9181 9182# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9183# ------------------------------------------------------------ 9184# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9185m4_define([_LT_IF_OPTION], 9186[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9187 9188 9189# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9190# ------------------------------------------------------- 9191# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9192# are set. 9193m4_define([_LT_UNLESS_OPTIONS], 9194[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9195 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9196 [m4_define([$0_found])])])[]dnl 9197m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9198])[]dnl 9199]) 9200 9201 9202# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9203# ---------------------------------------- 9204# OPTION-LIST is a space-separated list of Libtool options associated 9205# with MACRO-NAME. If any OPTION has a matching handler declared with 9206# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9207# the unknown option and exit. 9208m4_defun([_LT_SET_OPTIONS], 9209[# Set options 9210m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9211 [_LT_SET_OPTION([$1], _LT_Option)]) 9212 9213m4_if([$1],[LT_INIT],[ 9214 dnl 9215 dnl Simply set some default values (i.e off) if boolean options were not 9216 dnl specified: 9217 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9218 ]) 9219 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9220 ]) 9221 dnl 9222 dnl If no reference was made to various pairs of opposing options, then 9223 dnl we run the default mode handler for the pair. For example, if neither 9224 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9225 dnl archives by default: 9226 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9227 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9228 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9229 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9230 [_LT_ENABLE_FAST_INSTALL]) 9231 ]) 9232])# _LT_SET_OPTIONS 9233 9234 9235 9236# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9237# ----------------------------------------- 9238m4_define([_LT_MANGLE_DEFUN], 9239[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9240 9241 9242# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9243# ----------------------------------------------- 9244m4_define([LT_OPTION_DEFINE], 9245[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9246])# LT_OPTION_DEFINE 9247 9248 9249# dlopen 9250# ------ 9251LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9252]) 9253 9254AU_DEFUN([AC_LIBTOOL_DLOPEN], 9255[_LT_SET_OPTION([LT_INIT], [dlopen]) 9256AC_DIAGNOSE([obsolete], 9257[$0: Remove this warning and the call to _LT_SET_OPTION when you 9258put the `dlopen' option into LT_INIT's first parameter.]) 9259]) 9260 9261dnl aclocal-1.4 backwards compatibility: 9262dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9263 9264 9265# win32-dll 9266# --------- 9267# Declare package support for building win32 dll's. 9268LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9269[enable_win32_dll=yes 9270 9271case $host in 9272*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9273 AC_CHECK_TOOL(AS, as, false) 9274 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9275 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9276 ;; 9277esac 9278 9279test -z "$AS" && AS=as 9280_LT_DECL([], [AS], [1], [Assembler program])dnl 9281 9282test -z "$DLLTOOL" && DLLTOOL=dlltool 9283_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9284 9285test -z "$OBJDUMP" && OBJDUMP=objdump 9286_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9287])# win32-dll 9288 9289AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9290[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9291_LT_SET_OPTION([LT_INIT], [win32-dll]) 9292AC_DIAGNOSE([obsolete], 9293[$0: Remove this warning and the call to _LT_SET_OPTION when you 9294put the `win32-dll' option into LT_INIT's first parameter.]) 9295]) 9296 9297dnl aclocal-1.4 backwards compatibility: 9298dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9299 9300 9301# _LT_ENABLE_SHARED([DEFAULT]) 9302# ---------------------------- 9303# implement the --enable-shared flag, and supports the `shared' and 9304# `disable-shared' LT_INIT options. 9305# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9306m4_define([_LT_ENABLE_SHARED], 9307[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9308AC_ARG_ENABLE([shared], 9309 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9310 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9311 [p=${PACKAGE-default} 9312 case $enableval in 9313 yes) enable_shared=yes ;; 9314 no) enable_shared=no ;; 9315 *) 9316 enable_shared=no 9317 # Look at the argument we got. We use all the common list separators. 9318 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9319 for pkg in $enableval; do 9320 IFS="$lt_save_ifs" 9321 if test "X$pkg" = "X$p"; then 9322 enable_shared=yes 9323 fi 9324 done 9325 IFS="$lt_save_ifs" 9326 ;; 9327 esac], 9328 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9329 9330 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9331 [Whether or not to build shared libraries]) 9332])# _LT_ENABLE_SHARED 9333 9334LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9335LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9336 9337# Old names: 9338AC_DEFUN([AC_ENABLE_SHARED], 9339[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9340]) 9341 9342AC_DEFUN([AC_DISABLE_SHARED], 9343[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9344]) 9345 9346AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9347AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9348 9349dnl aclocal-1.4 backwards compatibility: 9350dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9351dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9352 9353 9354 9355# _LT_ENABLE_STATIC([DEFAULT]) 9356# ---------------------------- 9357# implement the --enable-static flag, and support the `static' and 9358# `disable-static' LT_INIT options. 9359# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9360m4_define([_LT_ENABLE_STATIC], 9361[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9362AC_ARG_ENABLE([static], 9363 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9364 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9365 [p=${PACKAGE-default} 9366 case $enableval in 9367 yes) enable_static=yes ;; 9368 no) enable_static=no ;; 9369 *) 9370 enable_static=no 9371 # Look at the argument we got. We use all the common list separators. 9372 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9373 for pkg in $enableval; do 9374 IFS="$lt_save_ifs" 9375 if test "X$pkg" = "X$p"; then 9376 enable_static=yes 9377 fi 9378 done 9379 IFS="$lt_save_ifs" 9380 ;; 9381 esac], 9382 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9383 9384 _LT_DECL([build_old_libs], [enable_static], [0], 9385 [Whether or not to build static libraries]) 9386])# _LT_ENABLE_STATIC 9387 9388LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9389LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9390 9391# Old names: 9392AC_DEFUN([AC_ENABLE_STATIC], 9393[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9394]) 9395 9396AC_DEFUN([AC_DISABLE_STATIC], 9397[_LT_SET_OPTION([LT_INIT], [disable-static]) 9398]) 9399 9400AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9401AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9402 9403dnl aclocal-1.4 backwards compatibility: 9404dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9405dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9406 9407 9408 9409# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9410# ---------------------------------- 9411# implement the --enable-fast-install flag, and support the `fast-install' 9412# and `disable-fast-install' LT_INIT options. 9413# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9414m4_define([_LT_ENABLE_FAST_INSTALL], 9415[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9416AC_ARG_ENABLE([fast-install], 9417 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9418 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9419 [p=${PACKAGE-default} 9420 case $enableval in 9421 yes) enable_fast_install=yes ;; 9422 no) enable_fast_install=no ;; 9423 *) 9424 enable_fast_install=no 9425 # Look at the argument we got. We use all the common list separators. 9426 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9427 for pkg in $enableval; do 9428 IFS="$lt_save_ifs" 9429 if test "X$pkg" = "X$p"; then 9430 enable_fast_install=yes 9431 fi 9432 done 9433 IFS="$lt_save_ifs" 9434 ;; 9435 esac], 9436 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9437 9438_LT_DECL([fast_install], [enable_fast_install], [0], 9439 [Whether or not to optimize for fast installation])dnl 9440])# _LT_ENABLE_FAST_INSTALL 9441 9442LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9443LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9444 9445# Old names: 9446AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9447[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9448AC_DIAGNOSE([obsolete], 9449[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9450the `fast-install' option into LT_INIT's first parameter.]) 9451]) 9452 9453AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9454[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9455AC_DIAGNOSE([obsolete], 9456[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9457the `disable-fast-install' option into LT_INIT's first parameter.]) 9458]) 9459 9460dnl aclocal-1.4 backwards compatibility: 9461dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9462dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9463 9464 9465# _LT_WITH_PIC([MODE]) 9466# -------------------- 9467# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9468# LT_INIT options. 9469# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9470m4_define([_LT_WITH_PIC], 9471[AC_ARG_WITH([pic], 9472 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9473 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9474 [lt_p=${PACKAGE-default} 9475 case $withval in 9476 yes|no) pic_mode=$withval ;; 9477 *) 9478 pic_mode=default 9479 # Look at the argument we got. We use all the common list separators. 9480 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9481 for lt_pkg in $withval; do 9482 IFS="$lt_save_ifs" 9483 if test "X$lt_pkg" = "X$lt_p"; then 9484 pic_mode=yes 9485 fi 9486 done 9487 IFS="$lt_save_ifs" 9488 ;; 9489 esac], 9490 [pic_mode=default]) 9491 9492test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9493 9494_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9495])# _LT_WITH_PIC 9496 9497LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9498LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9499 9500# Old name: 9501AU_DEFUN([AC_LIBTOOL_PICMODE], 9502[_LT_SET_OPTION([LT_INIT], [pic-only]) 9503AC_DIAGNOSE([obsolete], 9504[$0: Remove this warning and the call to _LT_SET_OPTION when you 9505put the `pic-only' option into LT_INIT's first parameter.]) 9506]) 9507 9508dnl aclocal-1.4 backwards compatibility: 9509dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9510 9511 9512m4_define([_LTDL_MODE], []) 9513LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9514 [m4_define([_LTDL_MODE], [nonrecursive])]) 9515LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9516 [m4_define([_LTDL_MODE], [recursive])]) 9517LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9518 [m4_define([_LTDL_MODE], [subproject])]) 9519 9520m4_define([_LTDL_TYPE], []) 9521LT_OPTION_DEFINE([LTDL_INIT], [installable], 9522 [m4_define([_LTDL_TYPE], [installable])]) 9523LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9524 [m4_define([_LTDL_TYPE], [convenience])]) 9525 9526# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9527# 9528# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9529# Written by Gary V. Vaughan, 2004 9530# 9531# This file is free software; the Free Software Foundation gives 9532# unlimited permission to copy and/or distribute it, with or without 9533# modifications, as long as this notice is preserved. 9534 9535# serial 6 ltsugar.m4 9536 9537# This is to help aclocal find these macros, as it can't see m4_define. 9538AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9539 9540 9541# lt_join(SEP, ARG1, [ARG2...]) 9542# ----------------------------- 9543# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9544# associated separator. 9545# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9546# versions in m4sugar had bugs. 9547m4_define([lt_join], 9548[m4_if([$#], [1], [], 9549 [$#], [2], [[$2]], 9550 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9551m4_define([_lt_join], 9552[m4_if([$#$2], [2], [], 9553 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9554 9555 9556# lt_car(LIST) 9557# lt_cdr(LIST) 9558# ------------ 9559# Manipulate m4 lists. 9560# These macros are necessary as long as will still need to support 9561# Autoconf-2.59 which quotes differently. 9562m4_define([lt_car], [[$1]]) 9563m4_define([lt_cdr], 9564[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9565 [$#], 1, [], 9566 [m4_dquote(m4_shift($@))])]) 9567m4_define([lt_unquote], $1) 9568 9569 9570# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9571# ------------------------------------------ 9572# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9573# Note that neither SEPARATOR nor STRING are expanded; they are appended 9574# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9575# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9576# than defined and empty). 9577# 9578# This macro is needed until we can rely on Autoconf 2.62, since earlier 9579# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9580m4_define([lt_append], 9581[m4_define([$1], 9582 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9583 9584 9585 9586# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9587# ---------------------------------------------------------- 9588# Produce a SEP delimited list of all paired combinations of elements of 9589# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9590# has the form PREFIXmINFIXSUFFIXn. 9591# Needed until we can rely on m4_combine added in Autoconf 2.62. 9592m4_define([lt_combine], 9593[m4_if(m4_eval([$# > 3]), [1], 9594 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9595[[m4_foreach([_Lt_prefix], [$2], 9596 [m4_foreach([_Lt_suffix], 9597 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9598 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9599 9600 9601# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9602# ----------------------------------------------------------------------- 9603# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9604# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9605m4_define([lt_if_append_uniq], 9606[m4_ifdef([$1], 9607 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9608 [lt_append([$1], [$2], [$3])$4], 9609 [$5])], 9610 [lt_append([$1], [$2], [$3])$4])]) 9611 9612 9613# lt_dict_add(DICT, KEY, VALUE) 9614# ----------------------------- 9615m4_define([lt_dict_add], 9616[m4_define([$1($2)], [$3])]) 9617 9618 9619# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9620# -------------------------------------------- 9621m4_define([lt_dict_add_subkey], 9622[m4_define([$1($2:$3)], [$4])]) 9623 9624 9625# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9626# ---------------------------------- 9627m4_define([lt_dict_fetch], 9628[m4_ifval([$3], 9629 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9630 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9631 9632 9633# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9634# ----------------------------------------------------------------- 9635m4_define([lt_if_dict_fetch], 9636[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9637 [$5], 9638 [$6])]) 9639 9640 9641# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9642# -------------------------------------------------------------- 9643m4_define([lt_dict_filter], 9644[m4_if([$5], [], [], 9645 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9646 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9647 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9648]) 9649 9650# ltversion.m4 -- version numbers -*- Autoconf -*- 9651# 9652# Copyright (C) 2004 Free Software Foundation, Inc. 9653# Written by Scott James Remnant, 2004 9654# 9655# This file is free software; the Free Software Foundation gives 9656# unlimited permission to copy and/or distribute it, with or without 9657# modifications, as long as this notice is preserved. 9658 9659# @configure_input@ 9660 9661# serial 3337 ltversion.m4 9662# This file is part of GNU Libtool 9663 9664m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9665m4_define([LT_PACKAGE_REVISION], [1.3337]) 9666 9667AC_DEFUN([LTVERSION_VERSION], 9668[macro_version='2.4.2' 9669macro_revision='1.3337' 9670_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9671_LT_DECL(, macro_revision, 0) 9672]) 9673 9674# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9675# 9676# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9677# Written by Scott James Remnant, 2004. 9678# 9679# This file is free software; the Free Software Foundation gives 9680# unlimited permission to copy and/or distribute it, with or without 9681# modifications, as long as this notice is preserved. 9682 9683# serial 5 lt~obsolete.m4 9684 9685# These exist entirely to fool aclocal when bootstrapping libtool. 9686# 9687# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9688# which have later been changed to m4_define as they aren't part of the 9689# exported API, or moved to Autoconf or Automake where they belong. 9690# 9691# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9692# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9693# using a macro with the same name in our local m4/libtool.m4 it'll 9694# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9695# and doesn't know about Autoconf macros at all.) 9696# 9697# So we provide this file, which has a silly filename so it's always 9698# included after everything else. This provides aclocal with the 9699# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9700# because those macros already exist, or will be overwritten later. 9701# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9702# 9703# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9704# Yes, that means every name once taken will need to remain here until 9705# we give up compatibility with versions before 1.7, at which point 9706# we need to keep only those names which we still refer to. 9707 9708# This is to help aclocal find these macros, as it can't see m4_define. 9709AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9710 9711m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9712m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9713m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9714m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9715m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9716m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9717m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9718m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9719m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9720m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9721m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9722m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9723m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9724m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9725m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9726m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9727m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9728m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9729m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9730m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9731m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9732m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9733m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9734m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9735m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9736m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9737m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9738m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9739m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9740m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9741m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9742m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9743m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9744m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9745m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9746m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9747m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9748m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9749m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9750m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9751m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9752m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9753m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9754m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9755m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9756m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9757m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9758m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9759m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9760m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9761m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9762m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9763m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9764m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9765m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9766m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9767m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9768m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9769m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9770m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9771m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9772 9773# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9774# 9775# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9776# 9777# This program is free software; you can redistribute it and/or modify 9778# it under the terms of the GNU General Public License as published by 9779# the Free Software Foundation; either version 2 of the License, or 9780# (at your option) any later version. 9781# 9782# This program is distributed in the hope that it will be useful, but 9783# WITHOUT ANY WARRANTY; without even the implied warranty of 9784# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9785# General Public License for more details. 9786# 9787# You should have received a copy of the GNU General Public License 9788# along with this program; if not, write to the Free Software 9789# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9790# 9791# As a special exception to the GNU General Public License, if you 9792# distribute this file as part of a program that contains a 9793# configuration script generated by Autoconf, you may include it under 9794# the same distribution terms that you use for the rest of that program. 9795 9796# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9797# ---------------------------------- 9798AC_DEFUN([PKG_PROG_PKG_CONFIG], 9799[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9800m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9801AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9802if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9803 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9804fi 9805if test -n "$PKG_CONFIG"; then 9806 _pkg_min_version=m4_default([$1], [0.9.0]) 9807 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9808 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9809 AC_MSG_RESULT([yes]) 9810 else 9811 AC_MSG_RESULT([no]) 9812 PKG_CONFIG="" 9813 fi 9814 9815fi[]dnl 9816])# PKG_PROG_PKG_CONFIG 9817 9818# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9819# 9820# Check to see whether a particular set of modules exists. Similar 9821# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9822# 9823# 9824# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9825# this or PKG_CHECK_MODULES is called, or make sure to call 9826# PKG_CHECK_EXISTS manually 9827# -------------------------------------------------------------- 9828AC_DEFUN([PKG_CHECK_EXISTS], 9829[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9830if test -n "$PKG_CONFIG" && \ 9831 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9832 m4_ifval([$2], [$2], [:]) 9833m4_ifvaln([$3], [else 9834 $3])dnl 9835fi]) 9836 9837 9838# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9839# --------------------------------------------- 9840m4_define([_PKG_CONFIG], 9841[if test -n "$$1"; then 9842 pkg_cv_[]$1="$$1" 9843 elif test -n "$PKG_CONFIG"; then 9844 PKG_CHECK_EXISTS([$3], 9845 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9846 [pkg_failed=yes]) 9847 else 9848 pkg_failed=untried 9849fi[]dnl 9850])# _PKG_CONFIG 9851 9852# _PKG_SHORT_ERRORS_SUPPORTED 9853# ----------------------------- 9854AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9855[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9856if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9857 _pkg_short_errors_supported=yes 9858else 9859 _pkg_short_errors_supported=no 9860fi[]dnl 9861])# _PKG_SHORT_ERRORS_SUPPORTED 9862 9863 9864# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9865# [ACTION-IF-NOT-FOUND]) 9866# 9867# 9868# Note that if there is a possibility the first call to 9869# PKG_CHECK_MODULES might not happen, you should be sure to include an 9870# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9871# 9872# 9873# -------------------------------------------------------------- 9874AC_DEFUN([PKG_CHECK_MODULES], 9875[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9876AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9877AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9878 9879pkg_failed=no 9880AC_MSG_CHECKING([for $1]) 9881 9882_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9883_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9884 9885m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9886and $1[]_LIBS to avoid the need to call pkg-config. 9887See the pkg-config man page for more details.]) 9888 9889if test $pkg_failed = yes; then 9890 _PKG_SHORT_ERRORS_SUPPORTED 9891 if test $_pkg_short_errors_supported = yes; then 9892 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9893 else 9894 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9895 fi 9896 # Put the nasty error message in config.log where it belongs 9897 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9898 9899 ifelse([$4], , [AC_MSG_ERROR(dnl 9900[Package requirements ($2) were not met: 9901 9902$$1_PKG_ERRORS 9903 9904Consider adjusting the PKG_CONFIG_PATH environment variable if you 9905installed software in a non-standard prefix. 9906 9907_PKG_TEXT 9908])], 9909 [AC_MSG_RESULT([no]) 9910 $4]) 9911elif test $pkg_failed = untried; then 9912 ifelse([$4], , [AC_MSG_FAILURE(dnl 9913[The pkg-config script could not be found or is too old. Make sure it 9914is in your PATH or set the PKG_CONFIG environment variable to the full 9915path to pkg-config. 9916 9917_PKG_TEXT 9918 9919To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9920 [$4]) 9921else 9922 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9923 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9924 AC_MSG_RESULT([yes]) 9925 ifelse([$3], , :, [$3]) 9926fi[]dnl 9927])# PKG_CHECK_MODULES 9928 9929dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9930dnl 9931dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9932dnl 9933dnl Permission is hereby granted, free of charge, to any person obtaining a 9934dnl copy of this software and associated documentation files (the "Software"), 9935dnl to deal in the Software without restriction, including without limitation 9936dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9937dnl and/or sell copies of the Software, and to permit persons to whom the 9938dnl Software is furnished to do so, subject to the following conditions: 9939dnl 9940dnl The above copyright notice and this permission notice (including the next 9941dnl paragraph) shall be included in all copies or substantial portions of the 9942dnl Software. 9943dnl 9944dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9945dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9946dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9947dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9948dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9949dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9950dnl DEALINGS IN THE SOFTWARE. 9951 9952# XORG_MACROS_VERSION(required-version) 9953# ------------------------------------- 9954# Minimum version: 1.1.0 9955# 9956# If you're using a macro added in Version 1.1 or newer, include this in 9957# your configure.ac with the minimum required version, such as: 9958# XORG_MACROS_VERSION(1.1) 9959# 9960# To ensure that this macro is defined, also add: 9961# m4_ifndef([XORG_MACROS_VERSION], 9962# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9963# 9964# 9965# See the "minimum version" comment for each macro you use to see what 9966# version you require. 9967m4_defun([XORG_MACROS_VERSION],[ 9968m4_define([vers_have], [1.17.1]) 9969m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9970m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9971m4_if(m4_cmp(maj_have, maj_needed), 0,, 9972 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9973m4_if(m4_version_compare(vers_have, [$1]), -1, 9974 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9975m4_undefine([vers_have]) 9976m4_undefine([maj_have]) 9977m4_undefine([maj_needed]) 9978]) # XORG_MACROS_VERSION 9979 9980# XORG_PROG_RAWCPP() 9981# ------------------ 9982# Minimum version: 1.0.0 9983# 9984# Find cpp program and necessary flags for use in pre-processing text files 9985# such as man pages and config files 9986AC_DEFUN([XORG_PROG_RAWCPP],[ 9987AC_REQUIRE([AC_PROG_CPP]) 9988AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9989 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9990 9991# Check for flag to avoid builtin definitions - assumes unix is predefined, 9992# which is not the best choice for supporting other OS'es, but covers most 9993# of the ones we need for now. 9994AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9995AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9996if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9997 AC_MSG_RESULT([no]) 9998else 9999 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10000 RAWCPPFLAGS=-undef 10001 AC_MSG_RESULT([yes]) 10002 # under Cygwin unix is still defined even with -undef 10003 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10004 RAWCPPFLAGS="-undef -ansi" 10005 AC_MSG_RESULT([yes, with -ansi]) 10006 else 10007 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 10008 fi 10009fi 10010rm -f conftest.$ac_ext 10011 10012AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 10013AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 10014if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10015 AC_MSG_RESULT([no]) 10016else 10017 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10018 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 10019 AC_MSG_RESULT([yes]) 10020 else 10021 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 10022 fi 10023fi 10024rm -f conftest.$ac_ext 10025AC_SUBST(RAWCPPFLAGS) 10026]) # XORG_PROG_RAWCPP 10027 10028# XORG_MANPAGE_SECTIONS() 10029# ----------------------- 10030# Minimum version: 1.0.0 10031# 10032# Determine which sections man pages go in for the different man page types 10033# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10034# Not sure if there's any better way than just hardcoding by OS name. 10035# Override default settings by setting environment variables 10036# Added MAN_SUBSTS in version 1.8 10037# Added AC_PROG_SED in version 1.8 10038 10039AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10040AC_REQUIRE([AC_CANONICAL_HOST]) 10041AC_REQUIRE([AC_PROG_SED]) 10042 10043if test x$APP_MAN_SUFFIX = x ; then 10044 APP_MAN_SUFFIX=1 10045fi 10046if test x$APP_MAN_DIR = x ; then 10047 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10048fi 10049 10050if test x$LIB_MAN_SUFFIX = x ; then 10051 LIB_MAN_SUFFIX=3 10052fi 10053if test x$LIB_MAN_DIR = x ; then 10054 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10055fi 10056 10057if test x$FILE_MAN_SUFFIX = x ; then 10058 case $host_os in 10059 solaris*) FILE_MAN_SUFFIX=4 ;; 10060 *) FILE_MAN_SUFFIX=5 ;; 10061 esac 10062fi 10063if test x$FILE_MAN_DIR = x ; then 10064 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10065fi 10066 10067if test x$MISC_MAN_SUFFIX = x ; then 10068 case $host_os in 10069 solaris*) MISC_MAN_SUFFIX=5 ;; 10070 *) MISC_MAN_SUFFIX=7 ;; 10071 esac 10072fi 10073if test x$MISC_MAN_DIR = x ; then 10074 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10075fi 10076 10077if test x$DRIVER_MAN_SUFFIX = x ; then 10078 case $host_os in 10079 solaris*) DRIVER_MAN_SUFFIX=7 ;; 10080 *) DRIVER_MAN_SUFFIX=4 ;; 10081 esac 10082fi 10083if test x$DRIVER_MAN_DIR = x ; then 10084 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10085fi 10086 10087if test x$ADMIN_MAN_SUFFIX = x ; then 10088 case $host_os in 10089 solaris*) ADMIN_MAN_SUFFIX=1m ;; 10090 *) ADMIN_MAN_SUFFIX=8 ;; 10091 esac 10092fi 10093if test x$ADMIN_MAN_DIR = x ; then 10094 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10095fi 10096 10097 10098AC_SUBST([APP_MAN_SUFFIX]) 10099AC_SUBST([LIB_MAN_SUFFIX]) 10100AC_SUBST([FILE_MAN_SUFFIX]) 10101AC_SUBST([MISC_MAN_SUFFIX]) 10102AC_SUBST([DRIVER_MAN_SUFFIX]) 10103AC_SUBST([ADMIN_MAN_SUFFIX]) 10104AC_SUBST([APP_MAN_DIR]) 10105AC_SUBST([LIB_MAN_DIR]) 10106AC_SUBST([FILE_MAN_DIR]) 10107AC_SUBST([MISC_MAN_DIR]) 10108AC_SUBST([DRIVER_MAN_DIR]) 10109AC_SUBST([ADMIN_MAN_DIR]) 10110 10111XORG_MAN_PAGE="X Version 11" 10112AC_SUBST([XORG_MAN_PAGE]) 10113MAN_SUBSTS="\ 10114 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10115 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10116 -e 's|__xservername__|Xorg|g' \ 10117 -e 's|__xconfigfile__|xorg.conf|g' \ 10118 -e 's|__projectroot__|\$(prefix)|g' \ 10119 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10120 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10121 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10122 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10123 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10124 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10125 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10126AC_SUBST([MAN_SUBSTS]) 10127 10128]) # XORG_MANPAGE_SECTIONS 10129 10130# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10131# ------------------------ 10132# Minimum version: 1.7.0 10133# 10134# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10135# provided by xorg-sgml-doctools, if installed. 10136AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10137AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10138XORG_SGML_PATH= 10139PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10140 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10141 [m4_ifval([$1],[:], 10142 [if test x"$cross_compiling" != x"yes" ; then 10143 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10144 [XORG_SGML_PATH=$prefix/share/sgml]) 10145 fi]) 10146 ]) 10147 10148# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10149# the path and the name of the doc stylesheet 10150if test "x$XORG_SGML_PATH" != "x" ; then 10151 AC_MSG_RESULT([$XORG_SGML_PATH]) 10152 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10153 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10154else 10155 AC_MSG_RESULT([no]) 10156fi 10157 10158AC_SUBST(XORG_SGML_PATH) 10159AC_SUBST(STYLESHEET_SRCDIR) 10160AC_SUBST(XSL_STYLESHEET) 10161AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10162]) # XORG_CHECK_SGML_DOCTOOLS 10163 10164# XORG_CHECK_LINUXDOC 10165# ------------------- 10166# Minimum version: 1.0.0 10167# 10168# Defines the variable MAKE_TEXT if the necessary tools and 10169# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10170# Whether or not the necessary tools and files are found can be checked 10171# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10172AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10173AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10174AC_REQUIRE([XORG_WITH_PS2PDF]) 10175 10176AC_PATH_PROG(LINUXDOC, linuxdoc) 10177 10178AC_MSG_CHECKING([whether to build documentation]) 10179 10180if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10181 BUILDDOC=yes 10182else 10183 BUILDDOC=no 10184fi 10185 10186AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10187 10188AC_MSG_RESULT([$BUILDDOC]) 10189 10190AC_MSG_CHECKING([whether to build pdf documentation]) 10191 10192if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10193 BUILDPDFDOC=yes 10194else 10195 BUILDPDFDOC=no 10196fi 10197 10198AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10199 10200AC_MSG_RESULT([$BUILDPDFDOC]) 10201 10202MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10203MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10204MAKE_PDF="$PS2PDF" 10205MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10206 10207AC_SUBST(MAKE_TEXT) 10208AC_SUBST(MAKE_PS) 10209AC_SUBST(MAKE_PDF) 10210AC_SUBST(MAKE_HTML) 10211]) # XORG_CHECK_LINUXDOC 10212 10213# XORG_CHECK_DOCBOOK 10214# ------------------- 10215# Minimum version: 1.0.0 10216# 10217# Checks for the ability to build output formats from SGML DocBook source. 10218# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10219# indicates whether the necessary tools and files are found and, if set, 10220# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10221AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10222AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10223 10224BUILDTXTDOC=no 10225BUILDPDFDOC=no 10226BUILDPSDOC=no 10227BUILDHTMLDOC=no 10228 10229AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10230AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10231AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10232AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10233 10234AC_MSG_CHECKING([whether to build text documentation]) 10235if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10236 test x$BUILD_TXTDOC != xno; then 10237 BUILDTXTDOC=yes 10238fi 10239AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10240AC_MSG_RESULT([$BUILDTXTDOC]) 10241 10242AC_MSG_CHECKING([whether to build PDF documentation]) 10243if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10244 test x$BUILD_PDFDOC != xno; then 10245 BUILDPDFDOC=yes 10246fi 10247AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10248AC_MSG_RESULT([$BUILDPDFDOC]) 10249 10250AC_MSG_CHECKING([whether to build PostScript documentation]) 10251if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10252 test x$BUILD_PSDOC != xno; then 10253 BUILDPSDOC=yes 10254fi 10255AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10256AC_MSG_RESULT([$BUILDPSDOC]) 10257 10258AC_MSG_CHECKING([whether to build HTML documentation]) 10259if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10260 test x$BUILD_HTMLDOC != xno; then 10261 BUILDHTMLDOC=yes 10262fi 10263AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10264AC_MSG_RESULT([$BUILDHTMLDOC]) 10265 10266MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10267MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10268MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10269MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10270 10271AC_SUBST(MAKE_TEXT) 10272AC_SUBST(MAKE_PS) 10273AC_SUBST(MAKE_PDF) 10274AC_SUBST(MAKE_HTML) 10275]) # XORG_CHECK_DOCBOOK 10276 10277# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10278# ---------------- 10279# Minimum version: 1.5.0 10280# Minimum version for optional DEFAULT argument: 1.11.0 10281# 10282# Documentation tools are not always available on all platforms and sometimes 10283# not at the appropriate level. This macro enables a module to test for the 10284# presence of the tool and obtain it's path in separate variables. Coupled with 10285# the --with-xmlto option, it allows maximum flexibilty in making decisions 10286# as whether or not to use the xmlto package. When DEFAULT is not specified, 10287# --with-xmlto assumes 'auto'. 10288# 10289# Interface to module: 10290# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10291# XMLTO: returns the path of the xmlto program found 10292# returns the path set by the user in the environment 10293# --with-xmlto: 'yes' user instructs the module to use xmlto 10294# 'no' user instructs the module not to use xmlto 10295# 10296# Added in version 1.10.0 10297# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10298# xmlto for text output requires either lynx, links, or w3m browsers 10299# 10300# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10301# 10302AC_DEFUN([XORG_WITH_XMLTO],[ 10303AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10304m4_define([_defopt], m4_default([$2], [auto])) 10305AC_ARG_WITH(xmlto, 10306 AS_HELP_STRING([--with-xmlto], 10307 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10308 [use_xmlto=$withval], [use_xmlto=]_defopt) 10309m4_undefine([_defopt]) 10310 10311if test "x$use_xmlto" = x"auto"; then 10312 AC_PATH_PROG([XMLTO], [xmlto]) 10313 if test "x$XMLTO" = "x"; then 10314 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10315 have_xmlto=no 10316 else 10317 have_xmlto=yes 10318 fi 10319elif test "x$use_xmlto" = x"yes" ; then 10320 AC_PATH_PROG([XMLTO], [xmlto]) 10321 if test "x$XMLTO" = "x"; then 10322 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10323 fi 10324 have_xmlto=yes 10325elif test "x$use_xmlto" = x"no" ; then 10326 if test "x$XMLTO" != "x"; then 10327 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10328 fi 10329 have_xmlto=no 10330else 10331 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10332fi 10333 10334# Test for a minimum version of xmlto, if provided. 10335m4_ifval([$1], 10336[if test "$have_xmlto" = yes; then 10337 # scrape the xmlto version 10338 AC_MSG_CHECKING([the xmlto version]) 10339 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10340 AC_MSG_RESULT([$xmlto_version]) 10341 AS_VERSION_COMPARE([$xmlto_version], [$1], 10342 [if test "x$use_xmlto" = xauto; then 10343 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10344 have_xmlto=no 10345 else 10346 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10347 fi]) 10348fi]) 10349 10350# Test for the ability of xmlto to generate a text target 10351have_xmlto_text=no 10352cat > conftest.xml << "EOF" 10353EOF 10354AS_IF([test "$have_xmlto" = yes], 10355 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10356 [have_xmlto_text=yes], 10357 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10358rm -f conftest.xml 10359AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10360AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10361]) # XORG_WITH_XMLTO 10362 10363# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10364# -------------------------------------------- 10365# Minimum version: 1.12.0 10366# Minimum version for optional DEFAULT argument: 1.12.0 10367# 10368# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10369# XML-based language used for the transformation of XML documents. 10370# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10371# It is used under the cover by xmlto to generate html files from DocBook/XML. 10372# The XSLT processor is often used as a standalone tool for transformations. 10373# It should not be assumed that this tool is used only to work with documnetation. 10374# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10375# 10376# Interface to module: 10377# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10378# XSLTPROC: returns the path of the xsltproc program found 10379# returns the path set by the user in the environment 10380# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10381# 'no' user instructs the module not to use xsltproc 10382# have_xsltproc: returns yes if xsltproc found in PATH or no 10383# 10384# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10385# 10386AC_DEFUN([XORG_WITH_XSLTPROC],[ 10387AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10388# Preserves the interface, should it be implemented later 10389m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10390m4_define([_defopt], m4_default([$2], [auto])) 10391AC_ARG_WITH(xsltproc, 10392 AS_HELP_STRING([--with-xsltproc], 10393 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10394 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10395m4_undefine([_defopt]) 10396 10397if test "x$use_xsltproc" = x"auto"; then 10398 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10399 if test "x$XSLTPROC" = "x"; then 10400 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10401 have_xsltproc=no 10402 else 10403 have_xsltproc=yes 10404 fi 10405elif test "x$use_xsltproc" = x"yes" ; then 10406 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10407 if test "x$XSLTPROC" = "x"; then 10408 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10409 fi 10410 have_xsltproc=yes 10411elif test "x$use_xsltproc" = x"no" ; then 10412 if test "x$XSLTPROC" != "x"; then 10413 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10414 fi 10415 have_xsltproc=no 10416else 10417 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10418fi 10419 10420AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10421]) # XORG_WITH_XSLTPROC 10422 10423# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10424# ---------------------------------------- 10425# Minimum version: 1.15.0 10426# 10427# PERL (Practical Extraction and Report Language) is a language optimized for 10428# scanning arbitrary text files, extracting information from those text files, 10429# and printing reports based on that information. 10430# 10431# When DEFAULT is not specified, --with-perl assumes 'auto'. 10432# 10433# Interface to module: 10434# HAVE_PERL: used in makefiles to conditionally scan text files 10435# PERL: returns the path of the perl program found 10436# returns the path set by the user in the environment 10437# --with-perl: 'yes' user instructs the module to use perl 10438# 'no' user instructs the module not to use perl 10439# have_perl: returns yes if perl found in PATH or no 10440# 10441# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10442# 10443AC_DEFUN([XORG_WITH_PERL],[ 10444AC_ARG_VAR([PERL], [Path to perl command]) 10445# Preserves the interface, should it be implemented later 10446m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10447m4_define([_defopt], m4_default([$2], [auto])) 10448AC_ARG_WITH(perl, 10449 AS_HELP_STRING([--with-perl], 10450 [Use perl for extracting information from files (default: ]_defopt[)]), 10451 [use_perl=$withval], [use_perl=]_defopt) 10452m4_undefine([_defopt]) 10453 10454if test "x$use_perl" = x"auto"; then 10455 AC_PATH_PROG([PERL], [perl]) 10456 if test "x$PERL" = "x"; then 10457 AC_MSG_WARN([perl not found - cannot extract information and report]) 10458 have_perl=no 10459 else 10460 have_perl=yes 10461 fi 10462elif test "x$use_perl" = x"yes" ; then 10463 AC_PATH_PROG([PERL], [perl]) 10464 if test "x$PERL" = "x"; then 10465 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10466 fi 10467 have_perl=yes 10468elif test "x$use_perl" = x"no" ; then 10469 if test "x$PERL" != "x"; then 10470 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10471 fi 10472 have_perl=no 10473else 10474 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10475fi 10476 10477AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10478]) # XORG_WITH_PERL 10479 10480# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10481# ---------------- 10482# Minimum version: 1.5.0 10483# Minimum version for optional DEFAULT argument: 1.11.0 10484# 10485# Documentation tools are not always available on all platforms and sometimes 10486# not at the appropriate level. This macro enables a module to test for the 10487# presence of the tool and obtain it's path in separate variables. Coupled with 10488# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10489# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10490# --with-asciidoc assumes 'auto'. 10491# 10492# Interface to module: 10493# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10494# ASCIIDOC: returns the path of the asciidoc program found 10495# returns the path set by the user in the environment 10496# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10497# 'no' user instructs the module not to use asciidoc 10498# 10499# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10500# 10501AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10502AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10503m4_define([_defopt], m4_default([$2], [auto])) 10504AC_ARG_WITH(asciidoc, 10505 AS_HELP_STRING([--with-asciidoc], 10506 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10507 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10508m4_undefine([_defopt]) 10509 10510if test "x$use_asciidoc" = x"auto"; then 10511 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10512 if test "x$ASCIIDOC" = "x"; then 10513 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10514 have_asciidoc=no 10515 else 10516 have_asciidoc=yes 10517 fi 10518elif test "x$use_asciidoc" = x"yes" ; then 10519 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10520 if test "x$ASCIIDOC" = "x"; then 10521 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10522 fi 10523 have_asciidoc=yes 10524elif test "x$use_asciidoc" = x"no" ; then 10525 if test "x$ASCIIDOC" != "x"; then 10526 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10527 fi 10528 have_asciidoc=no 10529else 10530 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10531fi 10532m4_ifval([$1], 10533[if test "$have_asciidoc" = yes; then 10534 # scrape the asciidoc version 10535 AC_MSG_CHECKING([the asciidoc version]) 10536 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10537 AC_MSG_RESULT([$asciidoc_version]) 10538 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10539 [if test "x$use_asciidoc" = xauto; then 10540 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10541 have_asciidoc=no 10542 else 10543 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10544 fi]) 10545fi]) 10546AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10547]) # XORG_WITH_ASCIIDOC 10548 10549# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10550# -------------------------------- 10551# Minimum version: 1.5.0 10552# Minimum version for optional DEFAULT argument: 1.11.0 10553# 10554# Documentation tools are not always available on all platforms and sometimes 10555# not at the appropriate level. This macro enables a module to test for the 10556# presence of the tool and obtain it's path in separate variables. Coupled with 10557# the --with-doxygen option, it allows maximum flexibilty in making decisions 10558# as whether or not to use the doxygen package. When DEFAULT is not specified, 10559# --with-doxygen assumes 'auto'. 10560# 10561# Interface to module: 10562# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10563# DOXYGEN: returns the path of the doxygen program found 10564# returns the path set by the user in the environment 10565# --with-doxygen: 'yes' user instructs the module to use doxygen 10566# 'no' user instructs the module not to use doxygen 10567# 10568# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10569# 10570AC_DEFUN([XORG_WITH_DOXYGEN],[ 10571AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10572m4_define([_defopt], m4_default([$2], [auto])) 10573AC_ARG_WITH(doxygen, 10574 AS_HELP_STRING([--with-doxygen], 10575 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10576 [use_doxygen=$withval], [use_doxygen=]_defopt) 10577m4_undefine([_defopt]) 10578 10579if test "x$use_doxygen" = x"auto"; then 10580 AC_PATH_PROG([DOXYGEN], [doxygen]) 10581 if test "x$DOXYGEN" = "x"; then 10582 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10583 have_doxygen=no 10584 else 10585 have_doxygen=yes 10586 fi 10587elif test "x$use_doxygen" = x"yes" ; then 10588 AC_PATH_PROG([DOXYGEN], [doxygen]) 10589 if test "x$DOXYGEN" = "x"; then 10590 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10591 fi 10592 have_doxygen=yes 10593elif test "x$use_doxygen" = x"no" ; then 10594 if test "x$DOXYGEN" != "x"; then 10595 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10596 fi 10597 have_doxygen=no 10598else 10599 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10600fi 10601m4_ifval([$1], 10602[if test "$have_doxygen" = yes; then 10603 # scrape the doxygen version 10604 AC_MSG_CHECKING([the doxygen version]) 10605 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10606 AC_MSG_RESULT([$doxygen_version]) 10607 AS_VERSION_COMPARE([$doxygen_version], [$1], 10608 [if test "x$use_doxygen" = xauto; then 10609 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10610 have_doxygen=no 10611 else 10612 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10613 fi]) 10614fi]) 10615AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10616]) # XORG_WITH_DOXYGEN 10617 10618# XORG_WITH_GROFF([DEFAULT]) 10619# ---------------- 10620# Minimum version: 1.6.0 10621# Minimum version for optional DEFAULT argument: 1.11.0 10622# 10623# Documentation tools are not always available on all platforms and sometimes 10624# not at the appropriate level. This macro enables a module to test for the 10625# presence of the tool and obtain it's path in separate variables. Coupled with 10626# the --with-groff option, it allows maximum flexibilty in making decisions 10627# as whether or not to use the groff package. When DEFAULT is not specified, 10628# --with-groff assumes 'auto'. 10629# 10630# Interface to module: 10631# HAVE_GROFF: used in makefiles to conditionally generate documentation 10632# HAVE_GROFF_MM: the memorandum macros (-mm) package 10633# HAVE_GROFF_MS: the -ms macros package 10634# GROFF: returns the path of the groff program found 10635# returns the path set by the user in the environment 10636# --with-groff: 'yes' user instructs the module to use groff 10637# 'no' user instructs the module not to use groff 10638# 10639# Added in version 1.9.0: 10640# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10641# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10642# psselect from the psutils package. 10643# the ghostcript package. Refer to the grohtml man pages 10644# 10645# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10646# 10647# OS and distros often splits groff in a basic and full package, the former 10648# having the groff program and the later having devices, fonts and macros 10649# Checking for the groff executable is not enough. 10650# 10651# If macros are missing, we cannot assume that groff is useless, so we don't 10652# unset HAVE_GROFF or GROFF env variables. 10653# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10654# 10655AC_DEFUN([XORG_WITH_GROFF],[ 10656AC_ARG_VAR([GROFF], [Path to groff command]) 10657m4_define([_defopt], m4_default([$1], [auto])) 10658AC_ARG_WITH(groff, 10659 AS_HELP_STRING([--with-groff], 10660 [Use groff to regenerate documentation (default: ]_defopt[)]), 10661 [use_groff=$withval], [use_groff=]_defopt) 10662m4_undefine([_defopt]) 10663 10664if test "x$use_groff" = x"auto"; then 10665 AC_PATH_PROG([GROFF], [groff]) 10666 if test "x$GROFF" = "x"; then 10667 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10668 have_groff=no 10669 else 10670 have_groff=yes 10671 fi 10672elif test "x$use_groff" = x"yes" ; then 10673 AC_PATH_PROG([GROFF], [groff]) 10674 if test "x$GROFF" = "x"; then 10675 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10676 fi 10677 have_groff=yes 10678elif test "x$use_groff" = x"no" ; then 10679 if test "x$GROFF" != "x"; then 10680 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10681 fi 10682 have_groff=no 10683else 10684 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10685fi 10686 10687# We have groff, test for the presence of the macro packages 10688if test "x$have_groff" = x"yes"; then 10689 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10690 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10691 groff_ms_works=yes 10692 else 10693 groff_ms_works=no 10694 fi 10695 AC_MSG_RESULT([$groff_ms_works]) 10696 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10697 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10698 groff_mm_works=yes 10699 else 10700 groff_mm_works=no 10701 fi 10702 AC_MSG_RESULT([$groff_mm_works]) 10703fi 10704 10705# We have groff, test for HTML dependencies, one command per package 10706if test "x$have_groff" = x"yes"; then 10707 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10708 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10709 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10710 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10711 have_groff_html=yes 10712 else 10713 have_groff_html=no 10714 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10715 fi 10716fi 10717 10718# Set Automake conditionals for Makefiles 10719AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10720AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10721AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10722AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10723]) # XORG_WITH_GROFF 10724 10725# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10726# --------------------------------------- 10727# Minimum version: 1.6.0 10728# Minimum version for optional DEFAULT argument: 1.11.0 10729# Minimum version for optional MIN-VERSION argument: 1.15.0 10730# 10731# Documentation tools are not always available on all platforms and sometimes 10732# not at the appropriate level. This macro enables a module to test for the 10733# presence of the tool and obtain it's path in separate variables. Coupled with 10734# the --with-fop option, it allows maximum flexibilty in making decisions 10735# as whether or not to use the fop package. When DEFAULT is not specified, 10736# --with-fop assumes 'auto'. 10737# 10738# Interface to module: 10739# HAVE_FOP: used in makefiles to conditionally generate documentation 10740# FOP: returns the path of the fop program found 10741# returns the path set by the user in the environment 10742# --with-fop: 'yes' user instructs the module to use fop 10743# 'no' user instructs the module not to use fop 10744# 10745# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10746# 10747AC_DEFUN([XORG_WITH_FOP],[ 10748AC_ARG_VAR([FOP], [Path to fop command]) 10749m4_define([_defopt], m4_default([$2], [auto])) 10750AC_ARG_WITH(fop, 10751 AS_HELP_STRING([--with-fop], 10752 [Use fop to regenerate documentation (default: ]_defopt[)]), 10753 [use_fop=$withval], [use_fop=]_defopt) 10754m4_undefine([_defopt]) 10755 10756if test "x$use_fop" = x"auto"; then 10757 AC_PATH_PROG([FOP], [fop]) 10758 if test "x$FOP" = "x"; then 10759 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10760 have_fop=no 10761 else 10762 have_fop=yes 10763 fi 10764elif test "x$use_fop" = x"yes" ; then 10765 AC_PATH_PROG([FOP], [fop]) 10766 if test "x$FOP" = "x"; then 10767 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10768 fi 10769 have_fop=yes 10770elif test "x$use_fop" = x"no" ; then 10771 if test "x$FOP" != "x"; then 10772 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10773 fi 10774 have_fop=no 10775else 10776 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10777fi 10778 10779# Test for a minimum version of fop, if provided. 10780m4_ifval([$1], 10781[if test "$have_fop" = yes; then 10782 # scrape the fop version 10783 AC_MSG_CHECKING([for fop minimum version]) 10784 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10785 AC_MSG_RESULT([$fop_version]) 10786 AS_VERSION_COMPARE([$fop_version], [$1], 10787 [if test "x$use_fop" = xauto; then 10788 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10789 have_fop=no 10790 else 10791 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10792 fi]) 10793fi]) 10794AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10795]) # XORG_WITH_FOP 10796 10797# XORG_WITH_PS2PDF([DEFAULT]) 10798# ---------------- 10799# Minimum version: 1.6.0 10800# Minimum version for optional DEFAULT argument: 1.11.0 10801# 10802# Documentation tools are not always available on all platforms and sometimes 10803# not at the appropriate level. This macro enables a module to test for the 10804# presence of the tool and obtain it's path in separate variables. Coupled with 10805# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10806# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10807# --with-ps2pdf assumes 'auto'. 10808# 10809# Interface to module: 10810# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10811# PS2PDF: returns the path of the ps2pdf program found 10812# returns the path set by the user in the environment 10813# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10814# 'no' user instructs the module not to use ps2pdf 10815# 10816# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10817# 10818AC_DEFUN([XORG_WITH_PS2PDF],[ 10819AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10820m4_define([_defopt], m4_default([$1], [auto])) 10821AC_ARG_WITH(ps2pdf, 10822 AS_HELP_STRING([--with-ps2pdf], 10823 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10824 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10825m4_undefine([_defopt]) 10826 10827if test "x$use_ps2pdf" = x"auto"; then 10828 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10829 if test "x$PS2PDF" = "x"; then 10830 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10831 have_ps2pdf=no 10832 else 10833 have_ps2pdf=yes 10834 fi 10835elif test "x$use_ps2pdf" = x"yes" ; then 10836 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10837 if test "x$PS2PDF" = "x"; then 10838 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10839 fi 10840 have_ps2pdf=yes 10841elif test "x$use_ps2pdf" = x"no" ; then 10842 if test "x$PS2PDF" != "x"; then 10843 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10844 fi 10845 have_ps2pdf=no 10846else 10847 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10848fi 10849AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10850]) # XORG_WITH_PS2PDF 10851 10852# XORG_ENABLE_DOCS (enable_docs=yes) 10853# ---------------- 10854# Minimum version: 1.6.0 10855# 10856# Documentation tools are not always available on all platforms and sometimes 10857# not at the appropriate level. This macro enables a builder to skip all 10858# documentation targets except traditional man pages. 10859# Combined with the specific tool checking macros XORG_WITH_*, it provides 10860# maximum flexibilty in controlling documentation building. 10861# Refer to: 10862# XORG_WITH_XMLTO --with-xmlto 10863# XORG_WITH_ASCIIDOC --with-asciidoc 10864# XORG_WITH_DOXYGEN --with-doxygen 10865# XORG_WITH_FOP --with-fop 10866# XORG_WITH_GROFF --with-groff 10867# XORG_WITH_PS2PDF --with-ps2pdf 10868# 10869# Interface to module: 10870# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10871# --enable-docs: 'yes' user instructs the module to generate docs 10872# 'no' user instructs the module not to generate docs 10873# parm1: specify the default value, yes or no. 10874# 10875AC_DEFUN([XORG_ENABLE_DOCS],[ 10876m4_define([docs_default], m4_default([$1], [yes])) 10877AC_ARG_ENABLE(docs, 10878 AS_HELP_STRING([--enable-docs], 10879 [Enable building the documentation (default: ]docs_default[)]), 10880 [build_docs=$enableval], [build_docs=]docs_default) 10881m4_undefine([docs_default]) 10882AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10883AC_MSG_CHECKING([whether to build documentation]) 10884AC_MSG_RESULT([$build_docs]) 10885]) # XORG_ENABLE_DOCS 10886 10887# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10888# ---------------- 10889# Minimum version: 1.6.0 10890# 10891# This macro enables a builder to skip all developer documentation. 10892# Combined with the specific tool checking macros XORG_WITH_*, it provides 10893# maximum flexibilty in controlling documentation building. 10894# Refer to: 10895# XORG_WITH_XMLTO --with-xmlto 10896# XORG_WITH_ASCIIDOC --with-asciidoc 10897# XORG_WITH_DOXYGEN --with-doxygen 10898# XORG_WITH_FOP --with-fop 10899# XORG_WITH_GROFF --with-groff 10900# XORG_WITH_PS2PDF --with-ps2pdf 10901# 10902# Interface to module: 10903# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10904# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10905# 'no' user instructs the module not to generate developer docs 10906# parm1: specify the default value, yes or no. 10907# 10908AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10909m4_define([devel_default], m4_default([$1], [yes])) 10910AC_ARG_ENABLE(devel-docs, 10911 AS_HELP_STRING([--enable-devel-docs], 10912 [Enable building the developer documentation (default: ]devel_default[)]), 10913 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10914m4_undefine([devel_default]) 10915AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10916AC_MSG_CHECKING([whether to build developer documentation]) 10917AC_MSG_RESULT([$build_devel_docs]) 10918]) # XORG_ENABLE_DEVEL_DOCS 10919 10920# XORG_ENABLE_SPECS (enable_specs=yes) 10921# ---------------- 10922# Minimum version: 1.6.0 10923# 10924# This macro enables a builder to skip all functional specification targets. 10925# Combined with the specific tool checking macros XORG_WITH_*, it provides 10926# maximum flexibilty in controlling documentation building. 10927# Refer to: 10928# XORG_WITH_XMLTO --with-xmlto 10929# XORG_WITH_ASCIIDOC --with-asciidoc 10930# XORG_WITH_DOXYGEN --with-doxygen 10931# XORG_WITH_FOP --with-fop 10932# XORG_WITH_GROFF --with-groff 10933# XORG_WITH_PS2PDF --with-ps2pdf 10934# 10935# Interface to module: 10936# ENABLE_SPECS: used in makefiles to conditionally generate specs 10937# --enable-specs: 'yes' user instructs the module to generate specs 10938# 'no' user instructs the module not to generate specs 10939# parm1: specify the default value, yes or no. 10940# 10941AC_DEFUN([XORG_ENABLE_SPECS],[ 10942m4_define([spec_default], m4_default([$1], [yes])) 10943AC_ARG_ENABLE(specs, 10944 AS_HELP_STRING([--enable-specs], 10945 [Enable building the specs (default: ]spec_default[)]), 10946 [build_specs=$enableval], [build_specs=]spec_default) 10947m4_undefine([spec_default]) 10948AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10949AC_MSG_CHECKING([whether to build functional specifications]) 10950AC_MSG_RESULT([$build_specs]) 10951]) # XORG_ENABLE_SPECS 10952 10953# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10954# ---------------------------------------------- 10955# Minimum version: 1.13.0 10956# 10957# This macro enables a builder to enable/disable unit testing 10958# It makes no assumption about the test cases implementation 10959# Test cases may or may not use Automake "Support for test suites" 10960# They may or may not use the software utility library GLib 10961# 10962# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10963# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10964# The variable enable_unit_tests is used by other macros in this file. 10965# 10966# Interface to module: 10967# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10968# enable_unit_tests: used in configure.ac for additional configuration 10969# --enable-unit-tests: 'yes' user instructs the module to build tests 10970# 'no' user instructs the module not to build tests 10971# parm1: specify the default value, yes or no. 10972# 10973AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10974AC_BEFORE([$0], [XORG_WITH_GLIB]) 10975AC_BEFORE([$0], [XORG_LD_WRAP]) 10976AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10977m4_define([_defopt], m4_default([$1], [auto])) 10978AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10979 [Enable building unit test cases (default: ]_defopt[)]), 10980 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10981m4_undefine([_defopt]) 10982AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10983AC_MSG_CHECKING([whether to build unit test cases]) 10984AC_MSG_RESULT([$enable_unit_tests]) 10985]) # XORG_ENABLE_UNIT_TESTS 10986 10987# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10988# ------------------------------------------------------ 10989# Minimum version: 1.17.0 10990# 10991# This macro enables a builder to enable/disable integration testing 10992# It makes no assumption about the test cases' implementation 10993# Test cases may or may not use Automake "Support for test suites" 10994# 10995# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10996# usually requires less dependencies and may be built and run under less 10997# stringent environments than integration tests. 10998# 10999# Interface to module: 11000# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11001# enable_integration_tests: used in configure.ac for additional configuration 11002# --enable-integration-tests: 'yes' user instructs the module to build tests 11003# 'no' user instructs the module not to build tests 11004# parm1: specify the default value, yes or no. 11005# 11006AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11007AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11008m4_define([_defopt], m4_default([$1], [auto])) 11009AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11010 [Enable building integration test cases (default: ]_defopt[)]), 11011 [enable_integration_tests=$enableval], 11012 [enable_integration_tests=]_defopt) 11013m4_undefine([_defopt]) 11014AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11015 [test "x$enable_integration_tests" != xno]) 11016AC_MSG_CHECKING([whether to build unit test cases]) 11017AC_MSG_RESULT([$enable_integration_tests]) 11018]) # XORG_ENABLE_INTEGRATION_TESTS 11019 11020# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11021# ---------------------------------------- 11022# Minimum version: 1.13.0 11023# 11024# GLib is a library which provides advanced data structures and functions. 11025# This macro enables a module to test for the presence of Glib. 11026# 11027# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11028# Otherwise the value of $enable_unit_tests is blank. 11029# 11030# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11031# test support usually requires less dependencies and may be built and run under 11032# less stringent environments than integration tests. 11033# 11034# Interface to module: 11035# HAVE_GLIB: used in makefiles to conditionally build targets 11036# with_glib: used in configure.ac to know if GLib has been found 11037# --with-glib: 'yes' user instructs the module to use glib 11038# 'no' user instructs the module not to use glib 11039# 11040AC_DEFUN([XORG_WITH_GLIB],[ 11041AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11042m4_define([_defopt], m4_default([$2], [auto])) 11043AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11044 [Use GLib library for unit testing (default: ]_defopt[)]), 11045 [with_glib=$withval], [with_glib=]_defopt) 11046m4_undefine([_defopt]) 11047 11048have_glib=no 11049# Do not probe GLib if user explicitly disabled unit testing 11050if test "x$enable_unit_tests" != x"no"; then 11051 # Do not probe GLib if user explicitly disabled it 11052 if test "x$with_glib" != x"no"; then 11053 m4_ifval( 11054 [$1], 11055 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11056 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11057 ) 11058 fi 11059fi 11060 11061# Not having GLib when unit testing has been explicitly requested is an error 11062if test "x$enable_unit_tests" = x"yes"; then 11063 if test "x$have_glib" = x"no"; then 11064 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11065 fi 11066fi 11067 11068# Having unit testing disabled when GLib has been explicitly requested is an error 11069if test "x$enable_unit_tests" = x"no"; then 11070 if test "x$with_glib" = x"yes"; then 11071 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11072 fi 11073fi 11074 11075# Not having GLib when it has been explicitly requested is an error 11076if test "x$with_glib" = x"yes"; then 11077 if test "x$have_glib" = x"no"; then 11078 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11079 fi 11080fi 11081 11082AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11083]) # XORG_WITH_GLIB 11084 11085# XORG_LD_WRAP([required|optional]) 11086# --------------------------------- 11087# Minimum version: 1.13.0 11088# 11089# Check if linker supports -wrap, passed via compiler flags 11090# 11091# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11092# Otherwise the value of $enable_unit_tests is blank. 11093# 11094# Argument added in 1.16.0 - default is "required", to match existing behavior 11095# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11096# available, an argument of "optional" allows use when some unit tests require 11097# ld -wrap and others do not. 11098# 11099AC_DEFUN([XORG_LD_WRAP],[ 11100XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11101 [AC_LANG_PROGRAM([#include <stdlib.h> 11102 void __wrap_exit(int status) { return; }], 11103 [exit(0);])]) 11104# Not having ld wrap when unit testing has been explicitly requested is an error 11105if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11106 if test "x$have_ld_wrap" = x"no"; then 11107 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11108 fi 11109fi 11110AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11111# 11112]) # XORG_LD_WRAP 11113 11114# XORG_CHECK_LINKER_FLAGS 11115# ----------------------- 11116# SYNOPSIS 11117# 11118# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11119# 11120# DESCRIPTION 11121# 11122# Check whether the given linker FLAGS work with the current language's 11123# linker, or whether they give an error. 11124# 11125# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11126# success/failure. 11127# 11128# PROGRAM-SOURCE is the program source to link with, if needed 11129# 11130# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11131# 11132# LICENSE 11133# 11134# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11135# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11136# Copyright (c) 2009 Matteo Frigo 11137# 11138# This program is free software: you can redistribute it and/or modify it 11139# under the terms of the GNU General Public License as published by the 11140# Free Software Foundation, either version 3 of the License, or (at your 11141# option) any later version. 11142# 11143# This program is distributed in the hope that it will be useful, but 11144# WITHOUT ANY WARRANTY; without even the implied warranty of 11145# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11146# Public License for more details. 11147# 11148# You should have received a copy of the GNU General Public License along 11149# with this program. If not, see <http://www.gnu.org/licenses/>. 11150# 11151# As a special exception, the respective Autoconf Macro's copyright owner 11152# gives unlimited permission to copy, distribute and modify the configure 11153# scripts that are the output of Autoconf when processing the Macro. You 11154# need not follow the terms of the GNU General Public License when using 11155# or distributing such scripts, even though portions of the text of the 11156# Macro appear in them. The GNU General Public License (GPL) does govern 11157# all other use of the material that constitutes the Autoconf Macro. 11158# 11159# This special exception to the GPL applies to versions of the Autoconf 11160# Macro released by the Autoconf Archive. When you make and distribute a 11161# modified version of the Autoconf Macro, you may extend this special 11162# exception to the GPL to apply to your modified version as well.# 11163AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11164[AC_MSG_CHECKING([whether the linker accepts $1]) 11165dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11166AS_LITERAL_IF([$1], 11167 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11168 ax_save_FLAGS=$LDFLAGS 11169 LDFLAGS="$1" 11170 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11171 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11172 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11173 LDFLAGS=$ax_save_FLAGS])], 11174 [ax_save_FLAGS=$LDFLAGS 11175 LDFLAGS="$1" 11176 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11177 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11178 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11179 LDFLAGS=$ax_save_FLAGS]) 11180eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11181AC_MSG_RESULT($xorg_check_linker_flags) 11182if test "x$xorg_check_linker_flags" = xyes; then 11183 m4_default([$2], :) 11184else 11185 m4_default([$3], :) 11186fi 11187]) # XORG_CHECK_LINKER_FLAGS 11188 11189# XORG_MEMORY_CHECK_FLAGS 11190# ----------------------- 11191# Minimum version: 1.16.0 11192# 11193# This macro attempts to find appropriate memory checking functionality 11194# for various platforms which unit testing code may use to catch various 11195# forms of memory allocation and access errors in testing. 11196# 11197# Interface to module: 11198# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11199# Usually added to TESTS_ENVIRONMENT in Makefile.am 11200# 11201# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11202# 11203AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11204 11205AC_REQUIRE([AC_CANONICAL_HOST]) 11206AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11207 [Environment variables to enable memory checking in tests]) 11208 11209# Check for different types of support on different platforms 11210case $host_os in 11211 solaris*) 11212 AC_CHECK_LIB([umem], [umem_alloc], 11213 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11214 ;; 11215 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11216 # both directly and inverted, so should not be 0 or 255. 11217 malloc_debug_env='MALLOC_PERTURB_=15' 11218 ;; 11219 darwin*) 11220 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11221 ;; 11222 *bsd*) 11223 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11224 ;; 11225esac 11226 11227# User supplied flags override default flags 11228if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11229 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11230fi 11231 11232AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11233]) # XORG_WITH_LINT 11234 11235# XORG_CHECK_MALLOC_ZERO 11236# ---------------------- 11237# Minimum version: 1.0.0 11238# 11239# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11240# malloc(0) returns NULL. Packages should add one of these cflags to 11241# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11242AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11243AC_ARG_ENABLE(malloc0returnsnull, 11244 AS_HELP_STRING([--enable-malloc0returnsnull], 11245 [malloc(0) returns NULL (default: auto)]), 11246 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11247 [MALLOC_ZERO_RETURNS_NULL=auto]) 11248 11249AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11250if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11251 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11252#include <stdlib.h> 11253],[ 11254 char *m0, *r0, *c0, *p; 11255 m0 = malloc(0); 11256 p = malloc(10); 11257 r0 = realloc(p,0); 11258 c0 = calloc(0,10); 11259 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11260])], 11261 [MALLOC_ZERO_RETURNS_NULL=yes], 11262 [MALLOC_ZERO_RETURNS_NULL=no], 11263 [MALLOC_ZERO_RETURNS_NULL=yes]) 11264fi 11265AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11266 11267if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11268 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11269 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11270 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11271else 11272 MALLOC_ZERO_CFLAGS="" 11273 XMALLOC_ZERO_CFLAGS="" 11274 XTMALLOC_ZERO_CFLAGS="" 11275fi 11276 11277AC_SUBST([MALLOC_ZERO_CFLAGS]) 11278AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11279AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11280]) # XORG_CHECK_MALLOC_ZERO 11281 11282# XORG_WITH_LINT() 11283# ---------------- 11284# Minimum version: 1.1.0 11285# 11286# This macro enables the use of a tool that flags some suspicious and 11287# non-portable constructs (likely to be bugs) in C language source code. 11288# It will attempt to locate the tool and use appropriate options. 11289# There are various lint type tools on different platforms. 11290# 11291# Interface to module: 11292# LINT: returns the path to the tool found on the platform 11293# or the value set to LINT on the configure cmd line 11294# also an Automake conditional 11295# LINT_FLAGS: an Automake variable with appropriate flags 11296# 11297# --with-lint: 'yes' user instructs the module to use lint 11298# 'no' user instructs the module not to use lint (default) 11299# 11300# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11301# If the user sets the value of LINT_FLAGS, they are used verbatim. 11302# 11303AC_DEFUN([XORG_WITH_LINT],[ 11304 11305AC_ARG_VAR([LINT], [Path to a lint-style command]) 11306AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11307AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11308 [Use a lint-style source code checker (default: disabled)])], 11309 [use_lint=$withval], [use_lint=no]) 11310 11311# Obtain platform specific info like program name and options 11312# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11313case $host_os in 11314 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11315 lint_name=splint 11316 lint_options="-badflag" 11317 ;; 11318 *freebsd* | *netbsd*) 11319 lint_name=lint 11320 lint_options="-u -b" 11321 ;; 11322 *solaris*) 11323 lint_name=lint 11324 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11325 ;; 11326esac 11327 11328# Test for the presence of the program (either guessed by the code or spelled out by the user) 11329if test "x$use_lint" = x"yes" ; then 11330 AC_PATH_PROG([LINT], [$lint_name]) 11331 if test "x$LINT" = "x"; then 11332 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11333 fi 11334elif test "x$use_lint" = x"no" ; then 11335 if test "x$LINT" != "x"; then 11336 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11337 fi 11338else 11339 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11340fi 11341 11342# User supplied flags override default flags 11343if test "x$LINT_FLAGS" != "x"; then 11344 lint_options=$LINT_FLAGS 11345fi 11346 11347AC_SUBST([LINT_FLAGS],[$lint_options]) 11348AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11349 11350]) # XORG_WITH_LINT 11351 11352# XORG_LINT_LIBRARY(LIBNAME) 11353# -------------------------- 11354# Minimum version: 1.1.0 11355# 11356# Sets up flags for building lint libraries for checking programs that call 11357# functions in the library. 11358# 11359# Interface to module: 11360# LINTLIB - Automake variable with the name of lint library file to make 11361# MAKE_LINT_LIB - Automake conditional 11362# 11363# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11364# - 'no' user instructs the module not to create a lint library (default) 11365 11366AC_DEFUN([XORG_LINT_LIBRARY],[ 11367AC_REQUIRE([XORG_WITH_LINT]) 11368AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11369 [Create lint library (default: disabled)])], 11370 [make_lint_lib=$enableval], [make_lint_lib=no]) 11371 11372if test "x$make_lint_lib" = x"yes" ; then 11373 LINTLIB=llib-l$1.ln 11374 if test "x$LINT" = "x"; then 11375 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11376 fi 11377elif test "x$make_lint_lib" != x"no" ; then 11378 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11379fi 11380 11381AC_SUBST(LINTLIB) 11382AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11383 11384]) # XORG_LINT_LIBRARY 11385 11386# XORG_COMPILER_BRAND 11387# ------------------- 11388# Minimum version: 1.14.0 11389# 11390# Checks for various brands of compilers and sets flags as appropriate: 11391# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11392# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11393# clang compiler - sets CLANGCC to "yes" 11394# Intel compiler - sets INTELCC to "yes" 11395# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11396# 11397AC_DEFUN([XORG_COMPILER_BRAND], [ 11398AC_LANG_CASE( 11399 [C], [ 11400 AC_REQUIRE([AC_PROG_CC_C99]) 11401 ], 11402 [C++], [ 11403 AC_REQUIRE([AC_PROG_CXX]) 11404 ] 11405) 11406AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11407AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11408AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11409]) # XORG_COMPILER_BRAND 11410 11411# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11412# --------------- 11413# Minimum version: 1.16.0 11414# 11415# Test if the compiler works when passed the given flag as a command line argument. 11416# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11417# next flag in the list until there are no more options. 11418# 11419# Note that this does not guarantee that the compiler supports the flag as some 11420# compilers will simply ignore arguments that they do not understand, but we do 11421# attempt to weed out false positives by using -Werror=unknown-warning-option and 11422# -Werror=unused-command-line-argument 11423# 11424AC_DEFUN([XORG_TESTSET_CFLAG], [ 11425m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11426m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11427 11428AC_LANG_COMPILER_REQUIRE 11429 11430AC_LANG_CASE( 11431 [C], [ 11432 AC_REQUIRE([AC_PROG_CC_C99]) 11433 define([PREFIX], [C]) 11434 define([CACHE_PREFIX], [cc]) 11435 define([COMPILER], [$CC]) 11436 ], 11437 [C++], [ 11438 define([PREFIX], [CXX]) 11439 define([CACHE_PREFIX], [cxx]) 11440 define([COMPILER], [$CXX]) 11441 ] 11442) 11443 11444[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11445 11446if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11447 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11448 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11449 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11450 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11451 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11452 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11453 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11454 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11455fi 11456 11457if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11458 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11459 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11460 fi 11461 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11462 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11463 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11464 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11465 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11466 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11467 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11468 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11469fi 11470 11471found="no" 11472m4_foreach([flag], m4_cdr($@), [ 11473 if test $found = "no" ; then 11474 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11475 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11476 fi 11477 11478 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11479 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11480 fi 11481 11482 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11483 11484dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11485 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11486 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11487 AC_CACHE_VAL($cacheid, 11488 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11489 [eval $cacheid=yes], 11490 [eval $cacheid=no])]) 11491 11492 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11493 11494 eval supported=\$$cacheid 11495 AC_MSG_RESULT([$supported]) 11496 if test "$supported" = "yes" ; then 11497 $1="$$1 ]flag[" 11498 found="yes" 11499 fi 11500 fi 11501]) 11502]) # XORG_TESTSET_CFLAG 11503 11504# XORG_COMPILER_FLAGS 11505# --------------- 11506# Minimum version: 1.16.0 11507# 11508# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11509# arguments supported by the selected compiler which do NOT alter the generated 11510# code. These arguments will cause the compiler to print various warnings 11511# during compilation AND turn a conservative set of warnings into errors. 11512# 11513# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11514# future versions of util-macros as options are added to new compilers. 11515# 11516AC_DEFUN([XORG_COMPILER_FLAGS], [ 11517AC_REQUIRE([XORG_COMPILER_BRAND]) 11518 11519AC_ARG_ENABLE(selective-werror, 11520 AS_HELP_STRING([--disable-selective-werror], 11521 [Turn off selective compiler errors. (default: enabled)]), 11522 [SELECTIVE_WERROR=$enableval], 11523 [SELECTIVE_WERROR=yes]) 11524 11525AC_LANG_CASE( 11526 [C], [ 11527 define([PREFIX], [C]) 11528 ], 11529 [C++], [ 11530 define([PREFIX], [CXX]) 11531 ] 11532) 11533# -v is too short to test reliably with XORG_TESTSET_CFLAG 11534if test "x$SUNCC" = "xyes"; then 11535 [BASE_]PREFIX[FLAGS]="-v" 11536else 11537 [BASE_]PREFIX[FLAGS]="" 11538fi 11539 11540# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11541XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11542XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11543XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11544XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11545 11546AC_LANG_CASE( 11547 [C], [ 11548 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11549 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11550 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11551 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11552 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 11553 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11554 ] 11555) 11556 11557# This chunk adds additional warnings that could catch undesired effects. 11558XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11559XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11560XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11561XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11562XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11563XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11564XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11565 11566# These are currently disabled because they are noisy. They will be enabled 11567# in the future once the codebase is sufficiently modernized to silence 11568# them. For now, I don't want them to drown out the other warnings. 11569# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11570# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11571# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11572 11573# Turn some warnings into errors, so we don't accidently get successful builds 11574# when there are problems that should be fixed. 11575 11576if test "x$SELECTIVE_WERROR" = "xyes" ; then 11577XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11578XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11579XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11580XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11581XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11582XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11583XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11584XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11585XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11586XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11587XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11588XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11589XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11590else 11591AC_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]) 11592XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11593XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11594XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11595XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11596XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11597XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11598XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11599XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11600XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11601XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11602XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11603XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11604XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11605fi 11606 11607AC_SUBST([BASE_]PREFIX[FLAGS]) 11608]) # XORG_COMPILER_FLAGS 11609 11610# XORG_CWARNFLAGS 11611# --------------- 11612# Minimum version: 1.2.0 11613# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11614# 11615# Defines CWARNFLAGS to enable C compiler warnings. 11616# 11617# This function is deprecated because it defines -fno-strict-aliasing 11618# which alters the code generated by the compiler. If -fno-strict-aliasing 11619# is needed, then it should be added explicitly in the module when 11620# it is updated to use BASE_CFLAGS. 11621# 11622AC_DEFUN([XORG_CWARNFLAGS], [ 11623AC_REQUIRE([XORG_COMPILER_FLAGS]) 11624AC_REQUIRE([XORG_COMPILER_BRAND]) 11625AC_LANG_CASE( 11626 [C], [ 11627 CWARNFLAGS="$BASE_CFLAGS" 11628 if test "x$GCC" = xyes ; then 11629 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11630 fi 11631 AC_SUBST(CWARNFLAGS) 11632 ] 11633) 11634]) # XORG_CWARNFLAGS 11635 11636# XORG_STRICT_OPTION 11637# ----------------------- 11638# Minimum version: 1.3.0 11639# 11640# Add configure option to enable strict compilation flags, such as treating 11641# warnings as fatal errors. 11642# If --enable-strict-compilation is passed to configure, adds strict flags to 11643# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11644# 11645# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11646# when strict compilation is unconditionally desired. 11647AC_DEFUN([XORG_STRICT_OPTION], [ 11648AC_REQUIRE([XORG_CWARNFLAGS]) 11649AC_REQUIRE([XORG_COMPILER_FLAGS]) 11650 11651AC_ARG_ENABLE(strict-compilation, 11652 AS_HELP_STRING([--enable-strict-compilation], 11653 [Enable all warnings from compiler and make them errors (default: disabled)]), 11654 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11655 11656AC_LANG_CASE( 11657 [C], [ 11658 define([PREFIX], [C]) 11659 ], 11660 [C++], [ 11661 define([PREFIX], [CXX]) 11662 ] 11663) 11664 11665[STRICT_]PREFIX[FLAGS]="" 11666XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11667XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11668 11669# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11670# activate it with -Werror, so we add it here explicitly. 11671XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11672 11673if test "x$STRICT_COMPILE" = "xyes"; then 11674 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11675 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11676fi 11677AC_SUBST([STRICT_]PREFIX[FLAGS]) 11678AC_SUBST([BASE_]PREFIX[FLAGS]) 11679AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11680]) # XORG_STRICT_OPTION 11681 11682# XORG_DEFAULT_OPTIONS 11683# -------------------- 11684# Minimum version: 1.3.0 11685# 11686# Defines default options for X.Org modules. 11687# 11688AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11689AC_REQUIRE([AC_PROG_INSTALL]) 11690XORG_COMPILER_FLAGS 11691XORG_CWARNFLAGS 11692XORG_STRICT_OPTION 11693XORG_RELEASE_VERSION 11694XORG_CHANGELOG 11695XORG_INSTALL 11696XORG_MANPAGE_SECTIONS 11697m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11698 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11699]) # XORG_DEFAULT_OPTIONS 11700 11701# XORG_INSTALL() 11702# ---------------- 11703# Minimum version: 1.4.0 11704# 11705# Defines the variable INSTALL_CMD as the command to copy 11706# INSTALL from $prefix/share/util-macros. 11707# 11708AC_DEFUN([XORG_INSTALL], [ 11709AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11710macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11711INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11712mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11713|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11714echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11715AC_SUBST([INSTALL_CMD]) 11716]) # XORG_INSTALL 11717dnl Copyright 2005 Red Hat, Inc 11718dnl 11719dnl Permission to use, copy, modify, distribute, and sell this software and its 11720dnl documentation for any purpose is hereby granted without fee, provided that 11721dnl the above copyright notice appear in all copies and that both that 11722dnl copyright notice and this permission notice appear in supporting 11723dnl documentation. 11724dnl 11725dnl The above copyright notice and this permission notice shall be included 11726dnl in all copies or substantial portions of the Software. 11727dnl 11728dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11729dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11730dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11731dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11732dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11733dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11734dnl OTHER DEALINGS IN THE SOFTWARE. 11735dnl 11736dnl Except as contained in this notice, the name of the copyright holders shall 11737dnl not be used in advertising or otherwise to promote the sale, use or 11738dnl other dealings in this Software without prior written authorization 11739dnl from the copyright holders. 11740dnl 11741 11742# XORG_RELEASE_VERSION 11743# -------------------- 11744# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11745 11746AC_DEFUN([XORG_RELEASE_VERSION],[ 11747 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11748 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11749 [Major version of this package]) 11750 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11751 if test "x$PVM" = "x"; then 11752 PVM="0" 11753 fi 11754 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11755 [$PVM], 11756 [Minor version of this package]) 11757 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11758 if test "x$PVP" = "x"; then 11759 PVP="0" 11760 fi 11761 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11762 [$PVP], 11763 [Patch version of this package]) 11764]) 11765 11766# XORG_CHANGELOG() 11767# ---------------- 11768# Minimum version: 1.2.0 11769# 11770# Defines the variable CHANGELOG_CMD as the command to generate 11771# ChangeLog from git. 11772# 11773# 11774AC_DEFUN([XORG_CHANGELOG], [ 11775CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11776mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11777|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11778echo 'git directory not found: installing possibly empty changelog.' >&2)" 11779AC_SUBST([CHANGELOG_CMD]) 11780]) # XORG_CHANGELOG 11781 11782