aclocal.m4 revision 88cd5fc2
1# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 2 3# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24# 25# This file is free software; the Free Software Foundation 26# gives unlimited permission to copy and/or distribute it, 27# with or without modifications, as long as this notice is preserved. 28 29# AM_AUTOMAKE_VERSION(VERSION) 30# ---------------------------- 31# Automake X.Y traces this macro to ensure aclocal.m4 has been 32# generated from the m4 files accompanying Automake X.Y. 33# (This private macro should not be called outside this file.) 34AC_DEFUN([AM_AUTOMAKE_VERSION], 35[am__api_version='1.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.1], [], 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.1])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[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107# Expand $ac_aux_dir to an absolute path. 108am_aux_dir=`cd "$ac_aux_dir" && pwd` 109]) 110 111# AM_CONDITIONAL -*- Autoconf -*- 112 113# Copyright (C) 1997-2013 Free Software Foundation, Inc. 114# 115# This file is free software; the Free Software Foundation 116# gives unlimited permission to copy and/or distribute it, 117# with or without modifications, as long as this notice is preserved. 118 119# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120# ------------------------------------- 121# Define a conditional. 122AC_DEFUN([AM_CONDITIONAL], 123[AC_PREREQ([2.52])dnl 124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126AC_SUBST([$1_TRUE])dnl 127AC_SUBST([$1_FALSE])dnl 128_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130m4_define([_AM_COND_VALUE_$1], [$2])dnl 131if $2; then 132 $1_TRUE= 133 $1_FALSE='#' 134else 135 $1_TRUE='#' 136 $1_FALSE= 137fi 138AC_CONFIG_COMMANDS_PRE( 139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140 AC_MSG_ERROR([[conditional "$1" was never defined. 141Usually this means the macro was only invoked conditionally.]]) 142fi])]) 143 144# Copyright (C) 1999-2013 Free Software Foundation, Inc. 145# 146# This file is free software; the Free Software Foundation 147# gives unlimited permission to copy and/or distribute it, 148# with or without modifications, as long as this notice is preserved. 149 150 151# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152# written in clear, in which case automake, when reading aclocal.m4, 153# will think it sees a *use*, and therefore will trigger all it's 154# C support machinery. Also note that it means that autoscan, seeing 155# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156 157 158# _AM_DEPENDENCIES(NAME) 159# ---------------------- 160# See how the compiler implements dependency checking. 161# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162# We try a few techniques and use that to set a single cache variable. 163# 164# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166# dependency, and given that the user is not expected to run this macro, 167# just rely on AC_PROG_CC. 168AC_DEFUN([_AM_DEPENDENCIES], 169[AC_REQUIRE([AM_SET_DEPDIR])dnl 170AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171AC_REQUIRE([AM_MAKE_INCLUDE])dnl 172AC_REQUIRE([AM_DEP_TRACK])dnl 173 174m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180 [depcc="$$1" am_compiler_list=]) 181 182AC_CACHE_CHECK([dependency style of $depcc], 183 [am_cv_$1_dependencies_compiler_type], 184[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185 # We make a subdir and do the tests there. Otherwise we can end up 186 # making bogus files that we don't know about and never remove. For 187 # instance it was reported that on HP-UX the gcc test will end up 188 # making a dummy file named 'D' -- because '-MD' means "put the output 189 # in D". 190 rm -rf conftest.dir 191 mkdir conftest.dir 192 # Copy depcomp to subdir because otherwise we won't find it if we're 193 # using a relative directory. 194 cp "$am_depcomp" conftest.dir 195 cd conftest.dir 196 # We will build objects and dependencies in a subdirectory because 197 # it helps to detect inapplicable dependency modes. For instance 198 # both Tru64's cc and ICC support -MD to output dependencies as a 199 # side effect of compilation, but ICC will put the dependencies in 200 # the current directory while Tru64 will put them in the object 201 # directory. 202 mkdir sub 203 204 am_cv_$1_dependencies_compiler_type=none 205 if test "$am_compiler_list" = ""; then 206 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207 fi 208 am__universal=false 209 m4_case([$1], [CC], 210 [case " $depcc " in #( 211 *\ -arch\ *\ -arch\ *) am__universal=true ;; 212 esac], 213 [CXX], 214 [case " $depcc " in #( 215 *\ -arch\ *\ -arch\ *) am__universal=true ;; 216 esac]) 217 218 for depmode in $am_compiler_list; do 219 # Setup a source with many dependencies, because some compilers 220 # like to wrap large dependency lists on column 80 (with \), and 221 # we should not choose a depcomp mode which is confused by this. 222 # 223 # We need to recreate these files for each test, as the compiler may 224 # overwrite some of them when testing with obscure command lines. 225 # This happens at least with the AIX C compiler. 226 : > sub/conftest.c 227 for i in 1 2 3 4 5 6; do 228 echo '#include "conftst'$i'.h"' >> sub/conftest.c 229 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230 # Solaris 10 /bin/sh. 231 echo '/* dummy */' > sub/conftst$i.h 232 done 233 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234 235 # We check with '-c' and '-o' for the sake of the "dashmstdout" 236 # mode. It turns out that the SunPro C++ compiler does not properly 237 # handle '-M -o', and we need to detect this. Also, some Intel 238 # versions had trouble with output in subdirs. 239 am__obj=sub/conftest.${OBJEXT-o} 240 am__minus_obj="-o $am__obj" 241 case $depmode in 242 gcc) 243 # This depmode causes a compiler race in universal mode. 244 test "$am__universal" = false || continue 245 ;; 246 nosideeffect) 247 # After this tag, mechanisms are not by side-effect, so they'll 248 # only be used when explicitly requested. 249 if test "x$enable_dependency_tracking" = xyes; then 250 continue 251 else 252 break 253 fi 254 ;; 255 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256 # This compiler won't grok '-c -o', but also, the minuso test has 257 # not run yet. These depmodes are late enough in the game, and 258 # so weak that their functioning should not be impacted. 259 am__obj=conftest.${OBJEXT-o} 260 am__minus_obj= 261 ;; 262 none) break ;; 263 esac 264 if depmode=$depmode \ 265 source=sub/conftest.c object=$am__obj \ 266 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268 >/dev/null 2>conftest.err && 269 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273 # icc doesn't choke on unknown options, it will just issue warnings 274 # or remarks (even with -Werror). So we grep stderr for any message 275 # that says an option was ignored or not supported. 276 # When given -MP, icc 7.0 and 7.1 complain thusly: 277 # icc: Command line warning: ignoring option '-M'; no argument required 278 # The diagnosis changed in icc 8.0: 279 # icc: Command line remark: option '-MP' not supported 280 if (grep 'ignoring option' conftest.err || 281 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282 am_cv_$1_dependencies_compiler_type=$depmode 283 break 284 fi 285 fi 286 done 287 288 cd .. 289 rm -rf conftest.dir 290else 291 am_cv_$1_dependencies_compiler_type=none 292fi 293]) 294AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295AM_CONDITIONAL([am__fastdep$1], [ 296 test "x$enable_dependency_tracking" != xno \ 297 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298]) 299 300 301# AM_SET_DEPDIR 302# ------------- 303# Choose a directory name for dependency files. 304# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305AC_DEFUN([AM_SET_DEPDIR], 306[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308]) 309 310 311# AM_DEP_TRACK 312# ------------ 313AC_DEFUN([AM_DEP_TRACK], 314[AC_ARG_ENABLE([dependency-tracking], [dnl 315AS_HELP_STRING( 316 [--enable-dependency-tracking], 317 [do not reject slow dependency extractors]) 318AS_HELP_STRING( 319 [--disable-dependency-tracking], 320 [speeds up one-time build])]) 321if test "x$enable_dependency_tracking" != xno; then 322 am_depcomp="$ac_aux_dir/depcomp" 323 AMDEPBACKSLASH='\' 324 am__nodep='_no' 325fi 326AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327AC_SUBST([AMDEPBACKSLASH])dnl 328_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329AC_SUBST([am__nodep])dnl 330_AM_SUBST_NOTMAKE([am__nodep])dnl 331]) 332 333# Generate code to set up dependency tracking. -*- Autoconf -*- 334 335# Copyright (C) 1999-2013 Free Software Foundation, Inc. 336# 337# This file is free software; the Free Software Foundation 338# gives unlimited permission to copy and/or distribute it, 339# with or without modifications, as long as this notice is preserved. 340 341 342# _AM_OUTPUT_DEPENDENCY_COMMANDS 343# ------------------------------ 344AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 345[{ 346 # Older Autoconf quotes --file arguments for eval, but not when files 347 # are listed without --file. Let's play safe and only enable the eval 348 # if we detect the quoting. 349 case $CONFIG_FILES in 350 *\'*) eval set x "$CONFIG_FILES" ;; 351 *) set x $CONFIG_FILES ;; 352 esac 353 shift 354 for mf 355 do 356 # Strip MF so we end up with the name of the file. 357 mf=`echo "$mf" | sed -e 's/:.*$//'` 358 # Check whether this is an Automake generated Makefile or not. 359 # We used to match only the files named 'Makefile.in', but 360 # some people rename them; so instead we look at the file content. 361 # Grep'ing the first line is not enough: some people post-process 362 # each Makefile.in and add a new line on top of each file to say so. 363 # Grep'ing the whole file is not good either: AIX grep has a line 364 # limit of 2048, but all sed's we know have understand at least 4000. 365 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 366 dirpart=`AS_DIRNAME("$mf")` 367 else 368 continue 369 fi 370 # Extract the definition of DEPDIR, am__include, and am__quote 371 # from the Makefile without running 'make'. 372 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 373 test -z "$DEPDIR" && continue 374 am__include=`sed -n 's/^am__include = //p' < "$mf"` 375 test -z "$am__include" && continue 376 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 377 # Find all dependency output files, they are included files with 378 # $(DEPDIR) in their names. We invoke sed twice because it is the 379 # simplest approach to changing $(DEPDIR) to its actual value in the 380 # expansion. 381 for file in `sed -n " 382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 384 # Make sure the directory exists. 385 test -f "$dirpart/$file" && continue 386 fdir=`AS_DIRNAME(["$file"])` 387 AS_MKDIR_P([$dirpart/$fdir]) 388 # echo "creating $dirpart/$file" 389 echo '# dummy' > "$dirpart/$file" 390 done 391 done 392} 393])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394 395 396# AM_OUTPUT_DEPENDENCY_COMMANDS 397# ----------------------------- 398# This macro should only be invoked once -- use via AC_REQUIRE. 399# 400# This code is only required when automatic dependency tracking 401# is enabled. FIXME. This creates each '.P' file that we will 402# need in order to bootstrap the dependency handling code. 403AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404[AC_CONFIG_COMMANDS([depfiles], 405 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407]) 408 409# Do all the work for Automake. -*- Autoconf -*- 410 411# Copyright (C) 1996-2013 Free Software Foundation, Inc. 412# 413# This file is free software; the Free Software Foundation 414# gives unlimited permission to copy and/or distribute it, 415# with or without modifications, as long as this notice is preserved. 416 417# This macro actually does too much. Some checks are only needed if 418# your package does certain things. But this isn't really a big deal. 419 420dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 421m4_define([AC_PROG_CC], 422m4_defn([AC_PROG_CC]) 423[_AM_PROG_CC_C_O 424]) 425 426# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 427# AM_INIT_AUTOMAKE([OPTIONS]) 428# ----------------------------------------------- 429# The call with PACKAGE and VERSION arguments is the old style 430# call (pre autoconf-2.50), which is being phased out. PACKAGE 431# and VERSION should now be passed to AC_INIT and removed from 432# the call to AM_INIT_AUTOMAKE. 433# We support both call styles for the transition. After 434# the next Automake release, Autoconf can make the AC_INIT 435# arguments mandatory, and then we can depend on a new Autoconf 436# release and drop the old call support. 437AC_DEFUN([AM_INIT_AUTOMAKE], 438[AC_PREREQ([2.65])dnl 439dnl Autoconf wants to disallow AM_ names. We explicitly allow 440dnl the ones we care about. 441m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 442AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 443AC_REQUIRE([AC_PROG_INSTALL])dnl 444if test "`cd $srcdir && pwd`" != "`pwd`"; then 445 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 446 # is not polluted with repeated "-I." 447 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 448 # test to see if srcdir already configured 449 if test -f $srcdir/config.status; then 450 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 451 fi 452fi 453 454# test whether we have cygpath 455if test -z "$CYGPATH_W"; then 456 if (cygpath --version) >/dev/null 2>/dev/null; then 457 CYGPATH_W='cygpath -w' 458 else 459 CYGPATH_W=echo 460 fi 461fi 462AC_SUBST([CYGPATH_W]) 463 464# Define the identity of the package. 465dnl Distinguish between old-style and new-style calls. 466m4_ifval([$2], 467[AC_DIAGNOSE([obsolete], 468 [$0: two- and three-arguments forms are deprecated.]) 469m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 470 AC_SUBST([PACKAGE], [$1])dnl 471 AC_SUBST([VERSION], [$2])], 472[_AM_SET_OPTIONS([$1])dnl 473dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 474m4_if( 475 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 476 [ok:ok],, 477 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 478 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 479 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 480 481_AM_IF_OPTION([no-define],, 482[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 483 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 484 485# Some tools Automake needs. 486AC_REQUIRE([AM_SANITY_CHECK])dnl 487AC_REQUIRE([AC_ARG_PROGRAM])dnl 488AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 489AM_MISSING_PROG([AUTOCONF], [autoconf]) 490AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 491AM_MISSING_PROG([AUTOHEADER], [autoheader]) 492AM_MISSING_PROG([MAKEINFO], [makeinfo]) 493AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 494AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 495AC_REQUIRE([AC_PROG_MKDIR_P])dnl 496# For better backward compatibility. To be removed once Automake 1.9.x 497# dies out for good. For more background, see: 498# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 499# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 500AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 501# We need awk for the "check" target. The system "awk" is bad on 502# some platforms. 503AC_REQUIRE([AC_PROG_AWK])dnl 504AC_REQUIRE([AC_PROG_MAKE_SET])dnl 505AC_REQUIRE([AM_SET_LEADING_DOT])dnl 506_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508 [_AM_PROG_TAR([v7])])]) 509_AM_IF_OPTION([no-dependencies],, 510[AC_PROVIDE_IFELSE([AC_PROG_CC], 511 [_AM_DEPENDENCIES([CC])], 512 [m4_define([AC_PROG_CC], 513 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 514AC_PROVIDE_IFELSE([AC_PROG_CXX], 515 [_AM_DEPENDENCIES([CXX])], 516 [m4_define([AC_PROG_CXX], 517 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 518AC_PROVIDE_IFELSE([AC_PROG_OBJC], 519 [_AM_DEPENDENCIES([OBJC])], 520 [m4_define([AC_PROG_OBJC], 521 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 522AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 523 [_AM_DEPENDENCIES([OBJCXX])], 524 [m4_define([AC_PROG_OBJCXX], 525 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 526]) 527AC_REQUIRE([AM_SILENT_RULES])dnl 528dnl The testsuite driver may need to know about EXEEXT, so add the 529dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 530dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 531AC_CONFIG_COMMANDS_PRE(dnl 532[m4_provide_if([_AM_COMPILER_EXEEXT], 533 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 534 535# POSIX will say in a future version that running "rm -f" with no argument 536# is OK; and we want to be able to make that assumption in our Makefile 537# recipes. So use an aggressive probe to check that the usage we want is 538# actually supported "in the wild" to an acceptable degree. 539# See automake bug#10828. 540# To make any issue more visible, cause the running configure to be aborted 541# by default if the 'rm' program in use doesn't match our expectations; the 542# user can still override this though. 543if rm -f && rm -fr && rm -rf; then : OK; else 544 cat >&2 <<'END' 545Oops! 546 547Your 'rm' program seems unable to run without file operands specified 548on the command line, even when the '-f' option is present. This is contrary 549to the behaviour of most rm programs out there, and not conforming with 550the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 551 552Please tell bug-automake@gnu.org about your system, including the value 553of your $PATH and any error possibly output before this message. This 554can help us improve future automake versions. 555 556END 557 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 558 echo 'Configuration will proceed anyway, since you have set the' >&2 559 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 560 echo >&2 561 else 562 cat >&2 <<'END' 563Aborting the configuration process, to ensure you take notice of the issue. 564 565You can download and install GNU coreutils to get an 'rm' implementation 566that behaves properly: <http://www.gnu.org/software/coreutils/>. 567 568If you want to complete the configuration process using your problematic 569'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 570to "yes", and re-run configure. 571 572END 573 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 574 fi 575fi 576]) 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 3864netbsdelf*-gnu) 3865 version_type=linux 3866 need_lib_prefix=no 3867 need_version=no 3868 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3869 soname_spec='${libname}${release}${shared_ext}$major' 3870 shlibpath_var=LD_LIBRARY_PATH 3871 shlibpath_overrides_runpath=no 3872 hardcode_into_libs=yes 3873 dynamic_linker='NetBSD ld.elf_so' 3874 ;; 3875 3876netbsd*) 3877 version_type=sunos 3878 need_lib_prefix=no 3879 need_version=no 3880 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3881 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3882 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3883 dynamic_linker='NetBSD (a.out) ld.so' 3884 else 3885 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3886 soname_spec='${libname}${release}${shared_ext}$major' 3887 dynamic_linker='NetBSD ld.elf_so' 3888 fi 3889 shlibpath_var=LD_LIBRARY_PATH 3890 shlibpath_overrides_runpath=yes 3891 hardcode_into_libs=yes 3892 ;; 3893 3894newsos6) 3895 version_type=linux # correct to gnu/linux during the next big refactor 3896 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3897 shlibpath_var=LD_LIBRARY_PATH 3898 shlibpath_overrides_runpath=yes 3899 ;; 3900 3901*nto* | *qnx*) 3902 version_type=qnx 3903 need_lib_prefix=no 3904 need_version=no 3905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3906 soname_spec='${libname}${release}${shared_ext}$major' 3907 shlibpath_var=LD_LIBRARY_PATH 3908 shlibpath_overrides_runpath=no 3909 hardcode_into_libs=yes 3910 dynamic_linker='ldqnx.so' 3911 ;; 3912 3913openbsd*) 3914 version_type=sunos 3915 sys_lib_dlsearch_path_spec="/usr/lib" 3916 need_lib_prefix=no 3917 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3918 case $host_os in 3919 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3920 *) need_version=no ;; 3921 esac 3922 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3923 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3924 shlibpath_var=LD_LIBRARY_PATH 3925 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3926 case $host_os in 3927 openbsd2.[[89]] | openbsd2.[[89]].*) 3928 shlibpath_overrides_runpath=no 3929 ;; 3930 *) 3931 shlibpath_overrides_runpath=yes 3932 ;; 3933 esac 3934 else 3935 shlibpath_overrides_runpath=yes 3936 fi 3937 ;; 3938 3939os2*) 3940 libname_spec='$name' 3941 shrext_cmds=".dll" 3942 need_lib_prefix=no 3943 library_names_spec='$libname${shared_ext} $libname.a' 3944 dynamic_linker='OS/2 ld.exe' 3945 shlibpath_var=LIBPATH 3946 ;; 3947 3948osf3* | osf4* | osf5*) 3949 version_type=osf 3950 need_lib_prefix=no 3951 need_version=no 3952 soname_spec='${libname}${release}${shared_ext}$major' 3953 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3954 shlibpath_var=LD_LIBRARY_PATH 3955 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3956 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3957 ;; 3958 3959rdos*) 3960 dynamic_linker=no 3961 ;; 3962 3963solaris*) 3964 version_type=linux # correct to gnu/linux during the next big refactor 3965 need_lib_prefix=no 3966 need_version=no 3967 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3968 soname_spec='${libname}${release}${shared_ext}$major' 3969 shlibpath_var=LD_LIBRARY_PATH 3970 shlibpath_overrides_runpath=yes 3971 hardcode_into_libs=yes 3972 # ldd complains unless libraries are executable 3973 postinstall_cmds='chmod +x $lib' 3974 ;; 3975 3976sunos4*) 3977 version_type=sunos 3978 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3979 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3980 shlibpath_var=LD_LIBRARY_PATH 3981 shlibpath_overrides_runpath=yes 3982 if test "$with_gnu_ld" = yes; then 3983 need_lib_prefix=no 3984 fi 3985 need_version=yes 3986 ;; 3987 3988sysv4 | sysv4.3*) 3989 version_type=linux # correct to gnu/linux during the next big refactor 3990 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3991 soname_spec='${libname}${release}${shared_ext}$major' 3992 shlibpath_var=LD_LIBRARY_PATH 3993 case $host_vendor in 3994 sni) 3995 shlibpath_overrides_runpath=no 3996 need_lib_prefix=no 3997 runpath_var=LD_RUN_PATH 3998 ;; 3999 siemens) 4000 need_lib_prefix=no 4001 ;; 4002 motorola) 4003 need_lib_prefix=no 4004 need_version=no 4005 shlibpath_overrides_runpath=no 4006 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 4007 ;; 4008 esac 4009 ;; 4010 4011sysv4*MP*) 4012 if test -d /usr/nec ;then 4013 version_type=linux # correct to gnu/linux during the next big refactor 4014 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 4015 soname_spec='$libname${shared_ext}.$major' 4016 shlibpath_var=LD_LIBRARY_PATH 4017 fi 4018 ;; 4019 4020sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4021 version_type=freebsd-elf 4022 need_lib_prefix=no 4023 need_version=no 4024 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4025 soname_spec='${libname}${release}${shared_ext}$major' 4026 shlibpath_var=LD_LIBRARY_PATH 4027 shlibpath_overrides_runpath=yes 4028 hardcode_into_libs=yes 4029 if test "$with_gnu_ld" = yes; then 4030 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 4031 else 4032 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 4033 case $host_os in 4034 sco3.2v5*) 4035 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 4036 ;; 4037 esac 4038 fi 4039 sys_lib_dlsearch_path_spec='/usr/lib' 4040 ;; 4041 4042tpf*) 4043 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 4044 version_type=linux # correct to gnu/linux during the next big refactor 4045 need_lib_prefix=no 4046 need_version=no 4047 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4048 shlibpath_var=LD_LIBRARY_PATH 4049 shlibpath_overrides_runpath=no 4050 hardcode_into_libs=yes 4051 ;; 4052 4053uts4*) 4054 version_type=linux # correct to gnu/linux during the next big refactor 4055 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4056 soname_spec='${libname}${release}${shared_ext}$major' 4057 shlibpath_var=LD_LIBRARY_PATH 4058 ;; 4059 4060*) 4061 dynamic_linker=no 4062 ;; 4063esac 4064AC_MSG_RESULT([$dynamic_linker]) 4065test "$dynamic_linker" = no && can_build_shared=no 4066 4067variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4068if test "$GCC" = yes; then 4069 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4070fi 4071 4072if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4073 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4074fi 4075if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4076 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4077fi 4078 4079_LT_DECL([], [variables_saved_for_relink], [1], 4080 [Variables whose values should be saved in libtool wrapper scripts and 4081 restored at link time]) 4082_LT_DECL([], [need_lib_prefix], [0], 4083 [Do we need the "lib" prefix for modules?]) 4084_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4085_LT_DECL([], [version_type], [0], [Library versioning type]) 4086_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4087_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4088_LT_DECL([], [shlibpath_overrides_runpath], [0], 4089 [Is shlibpath searched before the hard-coded library search path?]) 4090_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4091_LT_DECL([], [library_names_spec], [1], 4092 [[List of archive names. First name is the real one, the rest are links. 4093 The last name is the one that the linker finds with -lNAME]]) 4094_LT_DECL([], [soname_spec], [1], 4095 [[The coded name of the library, if different from the real name]]) 4096_LT_DECL([], [install_override_mode], [1], 4097 [Permission mode override for installation of shared libraries]) 4098_LT_DECL([], [postinstall_cmds], [2], 4099 [Command to use after installation of a shared archive]) 4100_LT_DECL([], [postuninstall_cmds], [2], 4101 [Command to use after uninstallation of a shared archive]) 4102_LT_DECL([], [finish_cmds], [2], 4103 [Commands used to finish a libtool library installation in a directory]) 4104_LT_DECL([], [finish_eval], [1], 4105 [[As "finish_cmds", except a single script fragment to be evaled but 4106 not shown]]) 4107_LT_DECL([], [hardcode_into_libs], [0], 4108 [Whether we should hardcode library paths into libraries]) 4109_LT_DECL([], [sys_lib_search_path_spec], [2], 4110 [Compile-time system search path for libraries]) 4111_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4112 [Run-time system search path for libraries]) 4113])# _LT_SYS_DYNAMIC_LINKER 4114 4115 4116# _LT_PATH_TOOL_PREFIX(TOOL) 4117# -------------------------- 4118# find a file program which can recognize shared library 4119AC_DEFUN([_LT_PATH_TOOL_PREFIX], 4120[m4_require([_LT_DECL_EGREP])dnl 4121AC_MSG_CHECKING([for $1]) 4122AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4123[case $MAGIC_CMD in 4124[[\\/*] | ?:[\\/]*]) 4125 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4126 ;; 4127*) 4128 lt_save_MAGIC_CMD="$MAGIC_CMD" 4129 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4130dnl $ac_dummy forces splitting on constant user-supplied paths. 4131dnl POSIX.2 word splitting is done only on the output of word expansions, 4132dnl not every word. This closes a longstanding sh security hole. 4133 ac_dummy="m4_if([$2], , $PATH, [$2])" 4134 for ac_dir in $ac_dummy; do 4135 IFS="$lt_save_ifs" 4136 test -z "$ac_dir" && ac_dir=. 4137 if test -f $ac_dir/$1; then 4138 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4139 if test -n "$file_magic_test_file"; then 4140 case $deplibs_check_method in 4141 "file_magic "*) 4142 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4143 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4144 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4145 $EGREP "$file_magic_regex" > /dev/null; then 4146 : 4147 else 4148 cat <<_LT_EOF 1>&2 4149 4150*** Warning: the command libtool uses to detect shared libraries, 4151*** $file_magic_cmd, produces output that libtool cannot recognize. 4152*** The result is that libtool may fail to recognize shared libraries 4153*** as such. This will affect the creation of libtool libraries that 4154*** depend on shared libraries, but programs linked with such libtool 4155*** libraries will work regardless of this problem. Nevertheless, you 4156*** may want to report the problem to your system manager and/or to 4157*** bug-libtool@gnu.org 4158 4159_LT_EOF 4160 fi ;; 4161 esac 4162 fi 4163 break 4164 fi 4165 done 4166 IFS="$lt_save_ifs" 4167 MAGIC_CMD="$lt_save_MAGIC_CMD" 4168 ;; 4169esac]) 4170MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4171if test -n "$MAGIC_CMD"; then 4172 AC_MSG_RESULT($MAGIC_CMD) 4173else 4174 AC_MSG_RESULT(no) 4175fi 4176_LT_DECL([], [MAGIC_CMD], [0], 4177 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4178])# _LT_PATH_TOOL_PREFIX 4179 4180# Old name: 4181AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4182dnl aclocal-1.4 backwards compatibility: 4183dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4184 4185 4186# _LT_PATH_MAGIC 4187# -------------- 4188# find a file program which can recognize a shared library 4189m4_defun([_LT_PATH_MAGIC], 4190[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4191if test -z "$lt_cv_path_MAGIC_CMD"; then 4192 if test -n "$ac_tool_prefix"; then 4193 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4194 else 4195 MAGIC_CMD=: 4196 fi 4197fi 4198])# _LT_PATH_MAGIC 4199 4200 4201# LT_PATH_LD 4202# ---------- 4203# find the pathname to the GNU or non-GNU linker 4204AC_DEFUN([LT_PATH_LD], 4205[AC_REQUIRE([AC_PROG_CC])dnl 4206AC_REQUIRE([AC_CANONICAL_HOST])dnl 4207AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4208m4_require([_LT_DECL_SED])dnl 4209m4_require([_LT_DECL_EGREP])dnl 4210m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4211 4212AC_ARG_WITH([gnu-ld], 4213 [AS_HELP_STRING([--with-gnu-ld], 4214 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4215 [test "$withval" = no || with_gnu_ld=yes], 4216 [with_gnu_ld=no])dnl 4217 4218ac_prog=ld 4219if test "$GCC" = yes; then 4220 # Check if gcc -print-prog-name=ld gives a path. 4221 AC_MSG_CHECKING([for ld used by $CC]) 4222 case $host in 4223 *-*-mingw*) 4224 # gcc leaves a trailing carriage return which upsets mingw 4225 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4226 *) 4227 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4228 esac 4229 case $ac_prog in 4230 # Accept absolute paths. 4231 [[\\/]]* | ?:[[\\/]]*) 4232 re_direlt='/[[^/]][[^/]]*/\.\./' 4233 # Canonicalize the pathname of ld 4234 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4235 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4236 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4237 done 4238 test -z "$LD" && LD="$ac_prog" 4239 ;; 4240 "") 4241 # If it fails, then pretend we aren't using GCC. 4242 ac_prog=ld 4243 ;; 4244 *) 4245 # If it is relative, then search for the first ld in PATH. 4246 with_gnu_ld=unknown 4247 ;; 4248 esac 4249elif test "$with_gnu_ld" = yes; then 4250 AC_MSG_CHECKING([for GNU ld]) 4251else 4252 AC_MSG_CHECKING([for non-GNU ld]) 4253fi 4254AC_CACHE_VAL(lt_cv_path_LD, 4255[if test -z "$LD"; then 4256 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4257 for ac_dir in $PATH; do 4258 IFS="$lt_save_ifs" 4259 test -z "$ac_dir" && ac_dir=. 4260 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4261 lt_cv_path_LD="$ac_dir/$ac_prog" 4262 # Check to see if the program is GNU ld. I'd rather use --version, 4263 # but apparently some variants of GNU ld only accept -v. 4264 # Break only if it was the GNU/non-GNU ld that we prefer. 4265 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4266 *GNU* | *'with BFD'*) 4267 test "$with_gnu_ld" != no && break 4268 ;; 4269 *) 4270 test "$with_gnu_ld" != yes && break 4271 ;; 4272 esac 4273 fi 4274 done 4275 IFS="$lt_save_ifs" 4276else 4277 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4278fi]) 4279LD="$lt_cv_path_LD" 4280if test -n "$LD"; then 4281 AC_MSG_RESULT($LD) 4282else 4283 AC_MSG_RESULT(no) 4284fi 4285test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4286_LT_PATH_LD_GNU 4287AC_SUBST([LD]) 4288 4289_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4290])# LT_PATH_LD 4291 4292# Old names: 4293AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4294AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4295dnl aclocal-1.4 backwards compatibility: 4296dnl AC_DEFUN([AM_PROG_LD], []) 4297dnl AC_DEFUN([AC_PROG_LD], []) 4298 4299 4300# _LT_PATH_LD_GNU 4301#- -------------- 4302m4_defun([_LT_PATH_LD_GNU], 4303[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4304[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4305case `$LD -v 2>&1 </dev/null` in 4306*GNU* | *'with BFD'*) 4307 lt_cv_prog_gnu_ld=yes 4308 ;; 4309*) 4310 lt_cv_prog_gnu_ld=no 4311 ;; 4312esac]) 4313with_gnu_ld=$lt_cv_prog_gnu_ld 4314])# _LT_PATH_LD_GNU 4315 4316 4317# _LT_CMD_RELOAD 4318# -------------- 4319# find reload flag for linker 4320# -- PORTME Some linkers may need a different reload flag. 4321m4_defun([_LT_CMD_RELOAD], 4322[AC_CACHE_CHECK([for $LD option to reload object files], 4323 lt_cv_ld_reload_flag, 4324 [lt_cv_ld_reload_flag='-r']) 4325reload_flag=$lt_cv_ld_reload_flag 4326case $reload_flag in 4327"" | " "*) ;; 4328*) reload_flag=" $reload_flag" ;; 4329esac 4330reload_cmds='$LD$reload_flag -o $output$reload_objs' 4331case $host_os in 4332 cygwin* | mingw* | pw32* | cegcc*) 4333 if test "$GCC" != yes; then 4334 reload_cmds=false 4335 fi 4336 ;; 4337 darwin*) 4338 if test "$GCC" = yes; then 4339 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4340 else 4341 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4342 fi 4343 ;; 4344esac 4345_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4346_LT_TAGDECL([], [reload_cmds], [2])dnl 4347])# _LT_CMD_RELOAD 4348 4349 4350# _LT_CHECK_MAGIC_METHOD 4351# ---------------------- 4352# how to check for library dependencies 4353# -- PORTME fill in with the dynamic library characteristics 4354m4_defun([_LT_CHECK_MAGIC_METHOD], 4355[m4_require([_LT_DECL_EGREP]) 4356m4_require([_LT_DECL_OBJDUMP]) 4357AC_CACHE_CHECK([how to recognize dependent libraries], 4358lt_cv_deplibs_check_method, 4359[lt_cv_file_magic_cmd='$MAGIC_CMD' 4360lt_cv_file_magic_test_file= 4361lt_cv_deplibs_check_method='unknown' 4362# Need to set the preceding variable on all platforms that support 4363# interlibrary dependencies. 4364# 'none' -- dependencies not supported. 4365# `unknown' -- same as none, but documents that we really don't know. 4366# 'pass_all' -- all dependencies passed with no checks. 4367# 'test_compile' -- check by making test program. 4368# 'file_magic [[regex]]' -- check by looking for files in library path 4369# which responds to the $file_magic_cmd with a given extended regex. 4370# If you have `file' or equivalent on your system and you're not sure 4371# whether `pass_all' will *always* work, you probably want this one. 4372 4373case $host_os in 4374aix[[4-9]]*) 4375 lt_cv_deplibs_check_method=pass_all 4376 ;; 4377 4378beos*) 4379 lt_cv_deplibs_check_method=pass_all 4380 ;; 4381 4382bsdi[[45]]*) 4383 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4384 lt_cv_file_magic_cmd='/usr/bin/file -L' 4385 lt_cv_file_magic_test_file=/shlib/libc.so 4386 ;; 4387 4388cygwin*) 4389 # func_win32_libid is a shell function defined in ltmain.sh 4390 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4391 lt_cv_file_magic_cmd='func_win32_libid' 4392 ;; 4393 4394mingw* | pw32*) 4395 # Base MSYS/MinGW do not provide the 'file' command needed by 4396 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4397 # unless we find 'file', for example because we are cross-compiling. 4398 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4399 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4400 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4401 lt_cv_file_magic_cmd='func_win32_libid' 4402 else 4403 # Keep this pattern in sync with the one in func_win32_libid. 4404 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4405 lt_cv_file_magic_cmd='$OBJDUMP -f' 4406 fi 4407 ;; 4408 4409cegcc*) 4410 # use the weaker test based on 'objdump'. See mingw*. 4411 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4412 lt_cv_file_magic_cmd='$OBJDUMP -f' 4413 ;; 4414 4415darwin* | rhapsody*) 4416 lt_cv_deplibs_check_method=pass_all 4417 ;; 4418 4419freebsd* | dragonfly*) 4420 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4421 case $host_cpu in 4422 i*86 ) 4423 # Not sure whether the presence of OpenBSD here was a mistake. 4424 # Let's accept both of them until this is cleared up. 4425 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4426 lt_cv_file_magic_cmd=/usr/bin/file 4427 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4428 ;; 4429 esac 4430 else 4431 lt_cv_deplibs_check_method=pass_all 4432 fi 4433 ;; 4434 4435gnu*) 4436 lt_cv_deplibs_check_method=pass_all 4437 ;; 4438 4439haiku*) 4440 lt_cv_deplibs_check_method=pass_all 4441 ;; 4442 4443hpux10.20* | hpux11*) 4444 lt_cv_file_magic_cmd=/usr/bin/file 4445 case $host_cpu in 4446 ia64*) 4447 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4448 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4449 ;; 4450 hppa*64*) 4451 [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]'] 4452 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4453 ;; 4454 *) 4455 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4456 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4457 ;; 4458 esac 4459 ;; 4460 4461interix[[3-9]]*) 4462 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4463 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4464 ;; 4465 4466irix5* | irix6* | nonstopux*) 4467 case $LD in 4468 *-32|*"-32 ") libmagic=32-bit;; 4469 *-n32|*"-n32 ") libmagic=N32;; 4470 *-64|*"-64 ") libmagic=64-bit;; 4471 *) libmagic=never-match;; 4472 esac 4473 lt_cv_deplibs_check_method=pass_all 4474 ;; 4475 4476# This must be glibc/ELF. 4477linux* | k*bsd*-gnu | kopensolaris*-gnu) 4478 lt_cv_deplibs_check_method=pass_all 4479 ;; 4480 4481netbsd* | netbsdelf*-gnu) 4482 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4483 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4484 else 4485 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4486 fi 4487 ;; 4488 4489newos6*) 4490 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4491 lt_cv_file_magic_cmd=/usr/bin/file 4492 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4493 ;; 4494 4495*nto* | *qnx*) 4496 lt_cv_deplibs_check_method=pass_all 4497 ;; 4498 4499openbsd*) 4500 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4501 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4502 else 4503 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4504 fi 4505 ;; 4506 4507osf3* | osf4* | osf5*) 4508 lt_cv_deplibs_check_method=pass_all 4509 ;; 4510 4511rdos*) 4512 lt_cv_deplibs_check_method=pass_all 4513 ;; 4514 4515solaris*) 4516 lt_cv_deplibs_check_method=pass_all 4517 ;; 4518 4519sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4520 lt_cv_deplibs_check_method=pass_all 4521 ;; 4522 4523sysv4 | sysv4.3*) 4524 case $host_vendor in 4525 motorola) 4526 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]]' 4527 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4528 ;; 4529 ncr) 4530 lt_cv_deplibs_check_method=pass_all 4531 ;; 4532 sequent) 4533 lt_cv_file_magic_cmd='/bin/file' 4534 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4535 ;; 4536 sni) 4537 lt_cv_file_magic_cmd='/bin/file' 4538 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4539 lt_cv_file_magic_test_file=/lib/libc.so 4540 ;; 4541 siemens) 4542 lt_cv_deplibs_check_method=pass_all 4543 ;; 4544 pc) 4545 lt_cv_deplibs_check_method=pass_all 4546 ;; 4547 esac 4548 ;; 4549 4550tpf*) 4551 lt_cv_deplibs_check_method=pass_all 4552 ;; 4553esac 4554]) 4555 4556file_magic_glob= 4557want_nocaseglob=no 4558if test "$build" = "$host"; then 4559 case $host_os in 4560 mingw* | pw32*) 4561 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4562 want_nocaseglob=yes 4563 else 4564 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4565 fi 4566 ;; 4567 esac 4568fi 4569 4570file_magic_cmd=$lt_cv_file_magic_cmd 4571deplibs_check_method=$lt_cv_deplibs_check_method 4572test -z "$deplibs_check_method" && deplibs_check_method=unknown 4573 4574_LT_DECL([], [deplibs_check_method], [1], 4575 [Method to check whether dependent libraries are shared objects]) 4576_LT_DECL([], [file_magic_cmd], [1], 4577 [Command to use when deplibs_check_method = "file_magic"]) 4578_LT_DECL([], [file_magic_glob], [1], 4579 [How to find potential files when deplibs_check_method = "file_magic"]) 4580_LT_DECL([], [want_nocaseglob], [1], 4581 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4582])# _LT_CHECK_MAGIC_METHOD 4583 4584 4585# LT_PATH_NM 4586# ---------- 4587# find the pathname to a BSD- or MS-compatible name lister 4588AC_DEFUN([LT_PATH_NM], 4589[AC_REQUIRE([AC_PROG_CC])dnl 4590AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4591[if test -n "$NM"; then 4592 # Let the user override the test. 4593 lt_cv_path_NM="$NM" 4594else 4595 lt_nm_to_check="${ac_tool_prefix}nm" 4596 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4597 lt_nm_to_check="$lt_nm_to_check nm" 4598 fi 4599 for lt_tmp_nm in $lt_nm_to_check; do 4600 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4601 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4602 IFS="$lt_save_ifs" 4603 test -z "$ac_dir" && ac_dir=. 4604 tmp_nm="$ac_dir/$lt_tmp_nm" 4605 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4606 # Check to see if the nm accepts a BSD-compat flag. 4607 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4608 # nm: unknown option "B" ignored 4609 # Tru64's nm complains that /dev/null is an invalid object file 4610 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4611 */dev/null* | *'Invalid file or object type'*) 4612 lt_cv_path_NM="$tmp_nm -B" 4613 break 4614 ;; 4615 *) 4616 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4617 */dev/null*) 4618 lt_cv_path_NM="$tmp_nm -p" 4619 break 4620 ;; 4621 *) 4622 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4623 continue # so that we can try to find one that supports BSD flags 4624 ;; 4625 esac 4626 ;; 4627 esac 4628 fi 4629 done 4630 IFS="$lt_save_ifs" 4631 done 4632 : ${lt_cv_path_NM=no} 4633fi]) 4634if test "$lt_cv_path_NM" != "no"; then 4635 NM="$lt_cv_path_NM" 4636else 4637 # Didn't find any BSD compatible name lister, look for dumpbin. 4638 if test -n "$DUMPBIN"; then : 4639 # Let the user override the test. 4640 else 4641 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4642 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4643 *COFF*) 4644 DUMPBIN="$DUMPBIN -symbols" 4645 ;; 4646 *) 4647 DUMPBIN=: 4648 ;; 4649 esac 4650 fi 4651 AC_SUBST([DUMPBIN]) 4652 if test "$DUMPBIN" != ":"; then 4653 NM="$DUMPBIN" 4654 fi 4655fi 4656test -z "$NM" && NM=nm 4657AC_SUBST([NM]) 4658_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4659 4660AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4661 [lt_cv_nm_interface="BSD nm" 4662 echo "int some_variable = 0;" > conftest.$ac_ext 4663 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4664 (eval "$ac_compile" 2>conftest.err) 4665 cat conftest.err >&AS_MESSAGE_LOG_FD 4666 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4667 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4668 cat conftest.err >&AS_MESSAGE_LOG_FD 4669 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4670 cat conftest.out >&AS_MESSAGE_LOG_FD 4671 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4672 lt_cv_nm_interface="MS dumpbin" 4673 fi 4674 rm -f conftest*]) 4675])# LT_PATH_NM 4676 4677# Old names: 4678AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4679AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4680dnl aclocal-1.4 backwards compatibility: 4681dnl AC_DEFUN([AM_PROG_NM], []) 4682dnl AC_DEFUN([AC_PROG_NM], []) 4683 4684# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4685# -------------------------------- 4686# how to determine the name of the shared library 4687# associated with a specific link library. 4688# -- PORTME fill in with the dynamic library characteristics 4689m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4690[m4_require([_LT_DECL_EGREP]) 4691m4_require([_LT_DECL_OBJDUMP]) 4692m4_require([_LT_DECL_DLLTOOL]) 4693AC_CACHE_CHECK([how to associate runtime and link libraries], 4694lt_cv_sharedlib_from_linklib_cmd, 4695[lt_cv_sharedlib_from_linklib_cmd='unknown' 4696 4697case $host_os in 4698cygwin* | mingw* | pw32* | cegcc*) 4699 # two different shell functions defined in ltmain.sh 4700 # decide which to use based on capabilities of $DLLTOOL 4701 case `$DLLTOOL --help 2>&1` in 4702 *--identify-strict*) 4703 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4704 ;; 4705 *) 4706 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4707 ;; 4708 esac 4709 ;; 4710*) 4711 # fallback: assume linklib IS sharedlib 4712 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4713 ;; 4714esac 4715]) 4716sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4717test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4718 4719_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4720 [Command to associate shared and link libraries]) 4721])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4722 4723 4724# _LT_PATH_MANIFEST_TOOL 4725# ---------------------- 4726# locate the manifest tool 4727m4_defun([_LT_PATH_MANIFEST_TOOL], 4728[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4729test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4730AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4731 [lt_cv_path_mainfest_tool=no 4732 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4733 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4734 cat conftest.err >&AS_MESSAGE_LOG_FD 4735 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4736 lt_cv_path_mainfest_tool=yes 4737 fi 4738 rm -f conftest*]) 4739if test "x$lt_cv_path_mainfest_tool" != xyes; then 4740 MANIFEST_TOOL=: 4741fi 4742_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4743])# _LT_PATH_MANIFEST_TOOL 4744 4745 4746# LT_LIB_M 4747# -------- 4748# check for math library 4749AC_DEFUN([LT_LIB_M], 4750[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4751LIBM= 4752case $host in 4753*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4754 # These system don't have libm, or don't need it 4755 ;; 4756*-ncr-sysv4.3*) 4757 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4758 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4759 ;; 4760*) 4761 AC_CHECK_LIB(m, cos, LIBM="-lm") 4762 ;; 4763esac 4764AC_SUBST([LIBM]) 4765])# LT_LIB_M 4766 4767# Old name: 4768AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4769dnl aclocal-1.4 backwards compatibility: 4770dnl AC_DEFUN([AC_CHECK_LIBM], []) 4771 4772 4773# _LT_COMPILER_NO_RTTI([TAGNAME]) 4774# ------------------------------- 4775m4_defun([_LT_COMPILER_NO_RTTI], 4776[m4_require([_LT_TAG_COMPILER])dnl 4777 4778_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4779 4780if test "$GCC" = yes; then 4781 case $cc_basename in 4782 nvcc*) 4783 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4784 *) 4785 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4786 esac 4787 4788 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4789 lt_cv_prog_compiler_rtti_exceptions, 4790 [-fno-rtti -fno-exceptions], [], 4791 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4792fi 4793_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4794 [Compiler flag to turn off builtin functions]) 4795])# _LT_COMPILER_NO_RTTI 4796 4797 4798# _LT_CMD_GLOBAL_SYMBOLS 4799# ---------------------- 4800m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4801[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4802AC_REQUIRE([AC_PROG_CC])dnl 4803AC_REQUIRE([AC_PROG_AWK])dnl 4804AC_REQUIRE([LT_PATH_NM])dnl 4805AC_REQUIRE([LT_PATH_LD])dnl 4806m4_require([_LT_DECL_SED])dnl 4807m4_require([_LT_DECL_EGREP])dnl 4808m4_require([_LT_TAG_COMPILER])dnl 4809 4810# Check for command to grab the raw symbol name followed by C symbol from nm. 4811AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4812AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4813[ 4814# These are sane defaults that work on at least a few old systems. 4815# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4816 4817# Character class describing NM global symbol codes. 4818symcode='[[BCDEGRST]]' 4819 4820# Regexp to match symbols that can be accessed directly from C. 4821sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4822 4823# Define system-specific variables. 4824case $host_os in 4825aix*) 4826 symcode='[[BCDT]]' 4827 ;; 4828cygwin* | mingw* | pw32* | cegcc*) 4829 symcode='[[ABCDGISTW]]' 4830 ;; 4831hpux*) 4832 if test "$host_cpu" = ia64; then 4833 symcode='[[ABCDEGRST]]' 4834 fi 4835 ;; 4836irix* | nonstopux*) 4837 symcode='[[BCDEGRST]]' 4838 ;; 4839osf*) 4840 symcode='[[BCDEGQRST]]' 4841 ;; 4842solaris*) 4843 symcode='[[BDRT]]' 4844 ;; 4845sco3.2v5*) 4846 symcode='[[DT]]' 4847 ;; 4848sysv4.2uw2*) 4849 symcode='[[DT]]' 4850 ;; 4851sysv5* | sco5v6* | unixware* | OpenUNIX*) 4852 symcode='[[ABDT]]' 4853 ;; 4854sysv4) 4855 symcode='[[DFNSTU]]' 4856 ;; 4857esac 4858 4859# If we're using GNU nm, then use its standard symbol codes. 4860case `$NM -V 2>&1` in 4861*GNU* | *'with BFD'*) 4862 symcode='[[ABCDGIRSTW]]' ;; 4863esac 4864 4865# Transform an extracted symbol line into a proper C declaration. 4866# Some systems (esp. on ia64) link data and code symbols differently, 4867# so use this general approach. 4868lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4869 4870# Transform an extracted symbol line into symbol name and symbol address 4871lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4872lt_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'" 4873 4874# Handle CRLF in mingw tool chain 4875opt_cr= 4876case $build_os in 4877mingw*) 4878 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4879 ;; 4880esac 4881 4882# Try without a prefix underscore, then with it. 4883for ac_symprfx in "" "_"; do 4884 4885 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4886 symxfrm="\\1 $ac_symprfx\\2 \\2" 4887 4888 # Write the raw and C identifiers. 4889 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4890 # Fake it for dumpbin and say T for any non-static function 4891 # and D for any global variable. 4892 # Also find C++ and __fastcall symbols from MSVC++, 4893 # which start with @ or ?. 4894 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4895" {last_section=section; section=\$ 3};"\ 4896" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4897" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4898" \$ 0!~/External *\|/{next};"\ 4899" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4900" {if(hide[section]) next};"\ 4901" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4902" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4903" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4904" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4905" ' prfx=^$ac_symprfx]" 4906 else 4907 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4908 fi 4909 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4910 4911 # Check to see that the pipe works correctly. 4912 pipe_works=no 4913 4914 rm -f conftest* 4915 cat > conftest.$ac_ext <<_LT_EOF 4916#ifdef __cplusplus 4917extern "C" { 4918#endif 4919char nm_test_var; 4920void nm_test_func(void); 4921void nm_test_func(void){} 4922#ifdef __cplusplus 4923} 4924#endif 4925int main(){nm_test_var='a';nm_test_func();return(0);} 4926_LT_EOF 4927 4928 if AC_TRY_EVAL(ac_compile); then 4929 # Now try to grab the symbols. 4930 nlist=conftest.nm 4931 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4932 # Try sorting and uniquifying the output. 4933 if sort "$nlist" | uniq > "$nlist"T; then 4934 mv -f "$nlist"T "$nlist" 4935 else 4936 rm -f "$nlist"T 4937 fi 4938 4939 # Make sure that we snagged all the symbols we need. 4940 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4941 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4942 cat <<_LT_EOF > conftest.$ac_ext 4943/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4944#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4945/* DATA imports from DLLs on WIN32 con't be const, because runtime 4946 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4947# define LT@&t@_DLSYM_CONST 4948#elif defined(__osf__) 4949/* This system does not cope well with relocations in const data. */ 4950# define LT@&t@_DLSYM_CONST 4951#else 4952# define LT@&t@_DLSYM_CONST const 4953#endif 4954 4955#ifdef __cplusplus 4956extern "C" { 4957#endif 4958 4959_LT_EOF 4960 # Now generate the symbol file. 4961 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4962 4963 cat <<_LT_EOF >> conftest.$ac_ext 4964 4965/* The mapping between symbol names and symbols. */ 4966LT@&t@_DLSYM_CONST struct { 4967 const char *name; 4968 void *address; 4969} 4970lt__PROGRAM__LTX_preloaded_symbols[[]] = 4971{ 4972 { "@PROGRAM@", (void *) 0 }, 4973_LT_EOF 4974 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4975 cat <<\_LT_EOF >> conftest.$ac_ext 4976 {0, (void *) 0} 4977}; 4978 4979/* This works around a problem in FreeBSD linker */ 4980#ifdef FREEBSD_WORKAROUND 4981static const void *lt_preloaded_setup() { 4982 return lt__PROGRAM__LTX_preloaded_symbols; 4983} 4984#endif 4985 4986#ifdef __cplusplus 4987} 4988#endif 4989_LT_EOF 4990 # Now try linking the two files. 4991 mv conftest.$ac_objext conftstm.$ac_objext 4992 lt_globsym_save_LIBS=$LIBS 4993 lt_globsym_save_CFLAGS=$CFLAGS 4994 LIBS="conftstm.$ac_objext" 4995 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4996 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4997 pipe_works=yes 4998 fi 4999 LIBS=$lt_globsym_save_LIBS 5000 CFLAGS=$lt_globsym_save_CFLAGS 5001 else 5002 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5003 fi 5004 else 5005 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5006 fi 5007 else 5008 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 5009 fi 5010 else 5011 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5012 cat conftest.$ac_ext >&5 5013 fi 5014 rm -rf conftest* conftst* 5015 5016 # Do not use the global_symbol_pipe unless it works. 5017 if test "$pipe_works" = yes; then 5018 break 5019 else 5020 lt_cv_sys_global_symbol_pipe= 5021 fi 5022done 5023]) 5024if test -z "$lt_cv_sys_global_symbol_pipe"; then 5025 lt_cv_sys_global_symbol_to_cdecl= 5026fi 5027if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5028 AC_MSG_RESULT(failed) 5029else 5030 AC_MSG_RESULT(ok) 5031fi 5032 5033# Response file support. 5034if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5035 nm_file_list_spec='@' 5036elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 5037 nm_file_list_spec='@' 5038fi 5039 5040_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 5041 [Take the output of nm and produce a listing of raw symbols and C names]) 5042_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 5043 [Transform the output of nm in a proper C declaration]) 5044_LT_DECL([global_symbol_to_c_name_address], 5045 [lt_cv_sys_global_symbol_to_c_name_address], [1], 5046 [Transform the output of nm in a C name address pair]) 5047_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5048 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5049 [Transform the output of nm in a C name address pair when lib prefix is needed]) 5050_LT_DECL([], [nm_file_list_spec], [1], 5051 [Specify filename containing input files for $NM]) 5052]) # _LT_CMD_GLOBAL_SYMBOLS 5053 5054 5055# _LT_COMPILER_PIC([TAGNAME]) 5056# --------------------------- 5057m4_defun([_LT_COMPILER_PIC], 5058[m4_require([_LT_TAG_COMPILER])dnl 5059_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5060_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5061_LT_TAGVAR(lt_prog_compiler_static, $1)= 5062 5063m4_if([$1], [CXX], [ 5064 # C++ specific cases for pic, static, wl, etc. 5065 if test "$GXX" = yes; then 5066 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5067 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5068 5069 case $host_os in 5070 aix*) 5071 # All AIX code is PIC. 5072 if test "$host_cpu" = ia64; then 5073 # AIX 5 now supports IA64 processor 5074 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5075 fi 5076 ;; 5077 5078 amigaos*) 5079 case $host_cpu in 5080 powerpc) 5081 # see comment about AmigaOS4 .so support 5082 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5083 ;; 5084 m68k) 5085 # FIXME: we need at least 68020 code to build shared libraries, but 5086 # adding the `-m68020' flag to GCC prevents building anything better, 5087 # like `-m68040'. 5088 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5089 ;; 5090 esac 5091 ;; 5092 5093 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5094 # PIC is the default for these OSes. 5095 ;; 5096 mingw* | cygwin* | os2* | pw32* | cegcc*) 5097 # This hack is so that the source file can tell whether it is being 5098 # built for inclusion in a dll (and should export symbols for example). 5099 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5100 # (--disable-auto-import) libraries 5101 m4_if([$1], [GCJ], [], 5102 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5103 ;; 5104 darwin* | rhapsody*) 5105 # PIC is the default on this platform 5106 # Common symbols not allowed in MH_DYLIB files 5107 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5108 ;; 5109 *djgpp*) 5110 # DJGPP does not support shared libraries at all 5111 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5112 ;; 5113 haiku*) 5114 # PIC is the default for Haiku. 5115 # The "-static" flag exists, but is broken. 5116 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5117 ;; 5118 interix[[3-9]]*) 5119 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5120 # Instead, we relocate shared libraries at runtime. 5121 ;; 5122 sysv4*MP*) 5123 if test -d /usr/nec; then 5124 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5125 fi 5126 ;; 5127 hpux*) 5128 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5129 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5130 # sets the default TLS model and affects inlining. 5131 case $host_cpu in 5132 hppa*64*) 5133 ;; 5134 *) 5135 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5136 ;; 5137 esac 5138 ;; 5139 *qnx* | *nto*) 5140 # QNX uses GNU C++, but need to define -shared option too, otherwise 5141 # it will coredump. 5142 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5143 ;; 5144 *) 5145 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5146 ;; 5147 esac 5148 else 5149 case $host_os in 5150 aix[[4-9]]*) 5151 # All AIX code is PIC. 5152 if test "$host_cpu" = ia64; then 5153 # AIX 5 now supports IA64 processor 5154 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5155 else 5156 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5157 fi 5158 ;; 5159 chorus*) 5160 case $cc_basename in 5161 cxch68*) 5162 # Green Hills C++ Compiler 5163 # _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" 5164 ;; 5165 esac 5166 ;; 5167 mingw* | cygwin* | os2* | pw32* | cegcc*) 5168 # This hack is so that the source file can tell whether it is being 5169 # built for inclusion in a dll (and should export symbols for example). 5170 m4_if([$1], [GCJ], [], 5171 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5172 ;; 5173 dgux*) 5174 case $cc_basename in 5175 ec++*) 5176 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5177 ;; 5178 ghcx*) 5179 # Green Hills C++ Compiler 5180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5181 ;; 5182 *) 5183 ;; 5184 esac 5185 ;; 5186 freebsd* | dragonfly*) 5187 # FreeBSD uses GNU C++ 5188 ;; 5189 hpux9* | hpux10* | hpux11*) 5190 case $cc_basename in 5191 CC*) 5192 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5193 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5194 if test "$host_cpu" != ia64; then 5195 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5196 fi 5197 ;; 5198 aCC*) 5199 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5200 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5201 case $host_cpu in 5202 hppa*64*|ia64*) 5203 # +Z the default 5204 ;; 5205 *) 5206 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5207 ;; 5208 esac 5209 ;; 5210 *) 5211 ;; 5212 esac 5213 ;; 5214 interix*) 5215 # This is c89, which is MS Visual C++ (no shared libs) 5216 # Anyone wants to do a port? 5217 ;; 5218 irix5* | irix6* | nonstopux*) 5219 case $cc_basename in 5220 CC*) 5221 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5223 # CC pic flag -KPIC is the default. 5224 ;; 5225 *) 5226 ;; 5227 esac 5228 ;; 5229 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5230 case $cc_basename in 5231 KCC*) 5232 # KAI C++ Compiler 5233 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5234 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5235 ;; 5236 ecpc* ) 5237 # old Intel C++ for x86_64 which still supported -KPIC. 5238 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5239 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5240 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5241 ;; 5242 icpc* ) 5243 # Intel C++, used to be incompatible with GCC. 5244 # ICC 10 doesn't accept -KPIC any more. 5245 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5247 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5248 ;; 5249 pgCC* | pgcpp*) 5250 # Portland Group C++ compiler 5251 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5253 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5254 ;; 5255 cxx*) 5256 # Compaq C++ 5257 # Make sure the PIC flag is empty. It appears that all Alpha 5258 # Linux and Compaq Tru64 Unix objects are PIC. 5259 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5260 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5261 ;; 5262 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5263 # IBM XL 8.0, 9.0 on PPC and BlueGene 5264 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5265 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5266 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5267 ;; 5268 *) 5269 case `$CC -V 2>&1 | sed 5q` in 5270 *Sun\ C*) 5271 # Sun C++ 5.9 5272 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5273 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5274 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5275 ;; 5276 esac 5277 ;; 5278 esac 5279 ;; 5280 lynxos*) 5281 ;; 5282 m88k*) 5283 ;; 5284 mvs*) 5285 case $cc_basename in 5286 cxx*) 5287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5288 ;; 5289 *) 5290 ;; 5291 esac 5292 ;; 5293 netbsd* | netbsdelf*-gnu) 5294 ;; 5295 *qnx* | *nto*) 5296 # QNX uses GNU C++, but need to define -shared option too, otherwise 5297 # it will coredump. 5298 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5299 ;; 5300 osf3* | osf4* | osf5*) 5301 case $cc_basename in 5302 KCC*) 5303 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5304 ;; 5305 RCC*) 5306 # Rational C++ 2.4.1 5307 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5308 ;; 5309 cxx*) 5310 # Digital/Compaq C++ 5311 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5312 # Make sure the PIC flag is empty. It appears that all Alpha 5313 # Linux and Compaq Tru64 Unix objects are PIC. 5314 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5316 ;; 5317 *) 5318 ;; 5319 esac 5320 ;; 5321 psos*) 5322 ;; 5323 solaris*) 5324 case $cc_basename in 5325 CC* | sunCC*) 5326 # Sun C++ 4.2, 5.x and Centerline C++ 5327 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5328 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5329 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5330 ;; 5331 gcx*) 5332 # Green Hills C++ Compiler 5333 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5334 ;; 5335 *) 5336 ;; 5337 esac 5338 ;; 5339 sunos4*) 5340 case $cc_basename in 5341 CC*) 5342 # Sun C++ 4.x 5343 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5344 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5345 ;; 5346 lcc*) 5347 # Lucid 5348 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5349 ;; 5350 *) 5351 ;; 5352 esac 5353 ;; 5354 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5355 case $cc_basename in 5356 CC*) 5357 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5358 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5359 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5360 ;; 5361 esac 5362 ;; 5363 tandem*) 5364 case $cc_basename in 5365 NCC*) 5366 # NonStop-UX NCC 3.20 5367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5368 ;; 5369 *) 5370 ;; 5371 esac 5372 ;; 5373 vxworks*) 5374 ;; 5375 *) 5376 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5377 ;; 5378 esac 5379 fi 5380], 5381[ 5382 if test "$GCC" = yes; then 5383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5384 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5385 5386 case $host_os in 5387 aix*) 5388 # All AIX code is PIC. 5389 if test "$host_cpu" = ia64; then 5390 # AIX 5 now supports IA64 processor 5391 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5392 fi 5393 ;; 5394 5395 amigaos*) 5396 case $host_cpu in 5397 powerpc) 5398 # see comment about AmigaOS4 .so support 5399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5400 ;; 5401 m68k) 5402 # FIXME: we need at least 68020 code to build shared libraries, but 5403 # adding the `-m68020' flag to GCC prevents building anything better, 5404 # like `-m68040'. 5405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5406 ;; 5407 esac 5408 ;; 5409 5410 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5411 # PIC is the default for these OSes. 5412 ;; 5413 5414 mingw* | cygwin* | pw32* | os2* | cegcc*) 5415 # This hack is so that the source file can tell whether it is being 5416 # built for inclusion in a dll (and should export symbols for example). 5417 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5418 # (--disable-auto-import) libraries 5419 m4_if([$1], [GCJ], [], 5420 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5421 ;; 5422 5423 darwin* | rhapsody*) 5424 # PIC is the default on this platform 5425 # Common symbols not allowed in MH_DYLIB files 5426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5427 ;; 5428 5429 haiku*) 5430 # PIC is the default for Haiku. 5431 # The "-static" flag exists, but is broken. 5432 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5433 ;; 5434 5435 hpux*) 5436 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5437 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5438 # sets the default TLS model and affects inlining. 5439 case $host_cpu in 5440 hppa*64*) 5441 # +Z the default 5442 ;; 5443 *) 5444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5445 ;; 5446 esac 5447 ;; 5448 5449 interix[[3-9]]*) 5450 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5451 # Instead, we relocate shared libraries at runtime. 5452 ;; 5453 5454 msdosdjgpp*) 5455 # Just because we use GCC doesn't mean we suddenly get shared libraries 5456 # on systems that don't support them. 5457 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5458 enable_shared=no 5459 ;; 5460 5461 *nto* | *qnx*) 5462 # QNX uses GNU C++, but need to define -shared option too, otherwise 5463 # it will coredump. 5464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5465 ;; 5466 5467 sysv4*MP*) 5468 if test -d /usr/nec; then 5469 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5470 fi 5471 ;; 5472 5473 *) 5474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5475 ;; 5476 esac 5477 5478 case $cc_basename in 5479 nvcc*) # Cuda Compiler Driver 2.2 5480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5481 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5482 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5483 fi 5484 ;; 5485 esac 5486 else 5487 # PORTME Check for flag to pass linker flags through the system compiler. 5488 case $host_os in 5489 aix*) 5490 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491 if test "$host_cpu" = ia64; then 5492 # AIX 5 now supports IA64 processor 5493 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5494 else 5495 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5496 fi 5497 ;; 5498 5499 mingw* | cygwin* | pw32* | os2* | cegcc*) 5500 # This hack is so that the source file can tell whether it is being 5501 # built for inclusion in a dll (and should export symbols for example). 5502 m4_if([$1], [GCJ], [], 5503 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5504 ;; 5505 5506 hpux9* | hpux10* | hpux11*) 5507 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5508 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5509 # not for PA HP-UX. 5510 case $host_cpu in 5511 hppa*64*|ia64*) 5512 # +Z the default 5513 ;; 5514 *) 5515 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5516 ;; 5517 esac 5518 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5519 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5520 ;; 5521 5522 irix5* | irix6* | nonstopux*) 5523 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5524 # PIC (with -KPIC) is the default. 5525 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5526 ;; 5527 5528 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5529 case $cc_basename in 5530 # old Intel for x86_64 which still supported -KPIC. 5531 ecc*) 5532 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5533 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5534 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5535 ;; 5536 # icc used to be incompatible with GCC. 5537 # ICC 10 doesn't accept -KPIC any more. 5538 icc* | ifort*) 5539 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5540 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5541 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5542 ;; 5543 # Lahey Fortran 8.1. 5544 lf95*) 5545 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5547 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5548 ;; 5549 nagfor*) 5550 # NAG Fortran compiler 5551 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5552 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5553 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5554 ;; 5555 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5556 # Portland Group compilers (*not* the Pentium gcc compiler, 5557 # which looks to be a dead project) 5558 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5559 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5560 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5561 ;; 5562 ccc*) 5563 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5564 # All Alpha code is PIC. 5565 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5566 ;; 5567 xl* | bgxl* | bgf* | mpixl*) 5568 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5569 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5570 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5571 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5572 ;; 5573 *) 5574 case `$CC -V 2>&1 | sed 5q` in 5575 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5576 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5578 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5579 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5580 ;; 5581 *Sun\ F* | *Sun*Fortran*) 5582 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5583 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5584 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5585 ;; 5586 *Sun\ C*) 5587 # Sun C 5.9 5588 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5589 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5590 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5591 ;; 5592 *Intel*\ [[CF]]*Compiler*) 5593 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5594 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5595 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5596 ;; 5597 *Portland\ Group*) 5598 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5599 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5600 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5601 ;; 5602 esac 5603 ;; 5604 esac 5605 ;; 5606 5607 newsos6) 5608 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5609 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5610 ;; 5611 5612 *nto* | *qnx*) 5613 # QNX uses GNU C++, but need to define -shared option too, otherwise 5614 # it will coredump. 5615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5616 ;; 5617 5618 osf3* | osf4* | osf5*) 5619 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5620 # All OSF/1 code is PIC. 5621 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5622 ;; 5623 5624 rdos*) 5625 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5626 ;; 5627 5628 solaris*) 5629 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5630 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5631 case $cc_basename in 5632 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5633 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5634 *) 5635 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5636 esac 5637 ;; 5638 5639 sunos4*) 5640 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5642 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5643 ;; 5644 5645 sysv4 | sysv4.2uw2* | sysv4.3*) 5646 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5647 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5648 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5649 ;; 5650 5651 sysv4*MP*) 5652 if test -d /usr/nec ;then 5653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5654 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5655 fi 5656 ;; 5657 5658 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5659 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5660 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5661 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5662 ;; 5663 5664 unicos*) 5665 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5666 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5667 ;; 5668 5669 uts4*) 5670 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5671 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5672 ;; 5673 5674 *) 5675 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5676 ;; 5677 esac 5678 fi 5679]) 5680case $host_os in 5681 # For platforms which do not support PIC, -DPIC is meaningless: 5682 *djgpp*) 5683 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5684 ;; 5685 *) 5686 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5687 ;; 5688esac 5689 5690AC_CACHE_CHECK([for $compiler option to produce PIC], 5691 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5692 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5693_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5694 5695# 5696# Check to make sure the PIC flag actually works. 5697# 5698if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5699 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5700 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5701 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5702 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5703 "" | " "*) ;; 5704 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5705 esac], 5706 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5707 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5708fi 5709_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5710 [Additional compiler flags for building library objects]) 5711 5712_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5713 [How to pass a linker flag through the compiler]) 5714# 5715# Check to make sure the static flag actually works. 5716# 5717wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5718_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5719 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5720 $lt_tmp_static_flag, 5721 [], 5722 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5723_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5724 [Compiler flag to prevent dynamic linking]) 5725])# _LT_COMPILER_PIC 5726 5727 5728# _LT_LINKER_SHLIBS([TAGNAME]) 5729# ---------------------------- 5730# See if the linker supports building shared libraries. 5731m4_defun([_LT_LINKER_SHLIBS], 5732[AC_REQUIRE([LT_PATH_LD])dnl 5733AC_REQUIRE([LT_PATH_NM])dnl 5734m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5735m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5736m4_require([_LT_DECL_EGREP])dnl 5737m4_require([_LT_DECL_SED])dnl 5738m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5739m4_require([_LT_TAG_COMPILER])dnl 5740AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5741m4_if([$1], [CXX], [ 5742 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5743 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5744 case $host_os in 5745 aix[[4-9]]*) 5746 # If we're using GNU nm, then we don't want the "-C" option. 5747 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5748 # Also, AIX nm treats weak defined symbols like other global defined 5749 # symbols, whereas GNU nm marks them as "W". 5750 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5751 _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' 5752 else 5753 _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' 5754 fi 5755 ;; 5756 pw32*) 5757 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5758 ;; 5759 cygwin* | mingw* | cegcc*) 5760 case $cc_basename in 5761 cl*) 5762 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5763 ;; 5764 *) 5765 _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' 5766 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5767 ;; 5768 esac 5769 ;; 5770 linux* | k*bsd*-gnu | gnu*) 5771 _LT_TAGVAR(link_all_deplibs, $1)=no 5772 ;; 5773 *) 5774 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5775 ;; 5776 esac 5777], [ 5778 runpath_var= 5779 _LT_TAGVAR(allow_undefined_flag, $1)= 5780 _LT_TAGVAR(always_export_symbols, $1)=no 5781 _LT_TAGVAR(archive_cmds, $1)= 5782 _LT_TAGVAR(archive_expsym_cmds, $1)= 5783 _LT_TAGVAR(compiler_needs_object, $1)=no 5784 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5785 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5786 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5787 _LT_TAGVAR(hardcode_automatic, $1)=no 5788 _LT_TAGVAR(hardcode_direct, $1)=no 5789 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5790 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5791 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5792 _LT_TAGVAR(hardcode_minus_L, $1)=no 5793 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5794 _LT_TAGVAR(inherit_rpath, $1)=no 5795 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5796 _LT_TAGVAR(module_cmds, $1)= 5797 _LT_TAGVAR(module_expsym_cmds, $1)= 5798 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5799 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5800 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5801 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5802 # include_expsyms should be a list of space-separated symbols to be *always* 5803 # included in the symbol list 5804 _LT_TAGVAR(include_expsyms, $1)= 5805 # exclude_expsyms can be an extended regexp of symbols to exclude 5806 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5807 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5808 # as well as any symbol that contains `d'. 5809 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5810 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5811 # platforms (ab)use it in PIC code, but their linkers get confused if 5812 # the symbol is explicitly referenced. Since portable code cannot 5813 # rely on this symbol name, it's probably fine to never include it in 5814 # preloaded symbol tables. 5815 # Exclude shared library initialization/finalization symbols. 5816dnl Note also adjust exclude_expsyms for C++ above. 5817 extract_expsyms_cmds= 5818 5819 case $host_os in 5820 cygwin* | mingw* | pw32* | cegcc*) 5821 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5822 # When not using gcc, we currently assume that we are using 5823 # Microsoft Visual C++. 5824 if test "$GCC" != yes; then 5825 with_gnu_ld=no 5826 fi 5827 ;; 5828 interix*) 5829 # we just hope/assume this is gcc and not c89 (= MSVC++) 5830 with_gnu_ld=yes 5831 ;; 5832 openbsd*) 5833 with_gnu_ld=no 5834 ;; 5835 linux* | k*bsd*-gnu | gnu*) 5836 _LT_TAGVAR(link_all_deplibs, $1)=no 5837 ;; 5838 esac 5839 5840 _LT_TAGVAR(ld_shlibs, $1)=yes 5841 5842 # On some targets, GNU ld is compatible enough with the native linker 5843 # that we're better off using the native interface for both. 5844 lt_use_gnu_ld_interface=no 5845 if test "$with_gnu_ld" = yes; then 5846 case $host_os in 5847 aix*) 5848 # The AIX port of GNU ld has always aspired to compatibility 5849 # with the native linker. However, as the warning in the GNU ld 5850 # block says, versions before 2.19.5* couldn't really create working 5851 # shared libraries, regardless of the interface used. 5852 case `$LD -v 2>&1` in 5853 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5854 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5855 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5856 *) 5857 lt_use_gnu_ld_interface=yes 5858 ;; 5859 esac 5860 ;; 5861 *) 5862 lt_use_gnu_ld_interface=yes 5863 ;; 5864 esac 5865 fi 5866 5867 if test "$lt_use_gnu_ld_interface" = yes; then 5868 # If archive_cmds runs LD, not CC, wlarc should be empty 5869 wlarc='${wl}' 5870 5871 # Set some defaults for GNU ld with shared library support. These 5872 # are reset later if shared libraries are not supported. Putting them 5873 # here allows them to be overridden if necessary. 5874 runpath_var=LD_RUN_PATH 5875 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5876 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5877 # ancient GNU ld didn't support --whole-archive et. al. 5878 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5879 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5880 else 5881 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5882 fi 5883 supports_anon_versioning=no 5884 case `$LD -v 2>&1` in 5885 *GNU\ gold*) supports_anon_versioning=yes ;; 5886 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5887 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5888 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5889 *\ 2.11.*) ;; # other 2.11 versions 5890 *) supports_anon_versioning=yes ;; 5891 esac 5892 5893 # See if GNU ld supports shared libraries. 5894 case $host_os in 5895 aix[[3-9]]*) 5896 # On AIX/PPC, the GNU linker is very broken 5897 if test "$host_cpu" != ia64; then 5898 _LT_TAGVAR(ld_shlibs, $1)=no 5899 cat <<_LT_EOF 1>&2 5900 5901*** Warning: the GNU linker, at least up to release 2.19, is reported 5902*** to be unable to reliably create shared libraries on AIX. 5903*** Therefore, libtool is disabling shared libraries support. If you 5904*** really care for shared libraries, you may want to install binutils 5905*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5906*** You will then need to restart the configuration process. 5907 5908_LT_EOF 5909 fi 5910 ;; 5911 5912 amigaos*) 5913 case $host_cpu in 5914 powerpc) 5915 # see comment about AmigaOS4 .so support 5916 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5917 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5918 ;; 5919 m68k) 5920 _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)' 5921 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5922 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5923 ;; 5924 esac 5925 ;; 5926 5927 beos*) 5928 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5929 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5930 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5931 # support --undefined. This deserves some investigation. FIXME 5932 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5933 else 5934 _LT_TAGVAR(ld_shlibs, $1)=no 5935 fi 5936 ;; 5937 5938 cygwin* | mingw* | pw32* | cegcc*) 5939 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5940 # as there is no search path for DLLs. 5941 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5942 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5943 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5944 _LT_TAGVAR(always_export_symbols, $1)=no 5945 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5946 _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' 5947 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5948 5949 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5950 _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' 5951 # If the export-symbols file already is a .def file (1st line 5952 # is EXPORTS), use it as is; otherwise, prepend... 5953 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5954 cp $export_symbols $output_objdir/$soname.def; 5955 else 5956 echo EXPORTS > $output_objdir/$soname.def; 5957 cat $export_symbols >> $output_objdir/$soname.def; 5958 fi~ 5959 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5960 else 5961 _LT_TAGVAR(ld_shlibs, $1)=no 5962 fi 5963 ;; 5964 5965 haiku*) 5966 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5967 _LT_TAGVAR(link_all_deplibs, $1)=yes 5968 ;; 5969 5970 interix[[3-9]]*) 5971 _LT_TAGVAR(hardcode_direct, $1)=no 5972 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5974 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5975 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5976 # Instead, shared libraries are loaded at an image base (0x10000000 by 5977 # default) and relocated if they conflict, which is a slow very memory 5978 # consuming and fragmenting process. To avoid this, we pick a random, 5979 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5980 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5981 _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' 5982 _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' 5983 ;; 5984 5985 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5986 tmp_diet=no 5987 if test "$host_os" = linux-dietlibc; then 5988 case $cc_basename in 5989 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5990 esac 5991 fi 5992 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5993 && test "$tmp_diet" = no 5994 then 5995 tmp_addflag=' $pic_flag' 5996 tmp_sharedflag='-shared' 5997 case $cc_basename,$host_cpu in 5998 pgcc*) # Portland Group C compiler 5999 _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' 6000 tmp_addflag=' $pic_flag' 6001 ;; 6002 pgf77* | pgf90* | pgf95* | pgfortran*) 6003 # Portland Group f77 and f90 compilers 6004 _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' 6005 tmp_addflag=' $pic_flag -Mnomain' ;; 6006 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6007 tmp_addflag=' -i_dynamic' ;; 6008 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6009 tmp_addflag=' -i_dynamic -nofor_main' ;; 6010 ifc* | ifort*) # Intel Fortran compiler 6011 tmp_addflag=' -nofor_main' ;; 6012 lf95*) # Lahey Fortran 8.1 6013 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6014 tmp_sharedflag='--shared' ;; 6015 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6016 tmp_sharedflag='-qmkshrobj' 6017 tmp_addflag= ;; 6018 nvcc*) # Cuda Compiler Driver 2.2 6019 _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' 6020 _LT_TAGVAR(compiler_needs_object, $1)=yes 6021 ;; 6022 esac 6023 case `$CC -V 2>&1 | sed 5q` in 6024 *Sun\ C*) # Sun C 5.9 6025 _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' 6026 _LT_TAGVAR(compiler_needs_object, $1)=yes 6027 tmp_sharedflag='-G' ;; 6028 *Sun\ F*) # Sun Fortran 8.3 6029 tmp_sharedflag='-G' ;; 6030 esac 6031 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6032 6033 if test "x$supports_anon_versioning" = xyes; then 6034 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6035 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6036 echo "local: *; };" >> $output_objdir/$libname.ver~ 6037 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6038 fi 6039 6040 case $cc_basename in 6041 xlf* | bgf* | bgxlf* | mpixlf*) 6042 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 6043 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 6044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6045 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 6046 if test "x$supports_anon_versioning" = xyes; then 6047 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6048 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6049 echo "local: *; };" >> $output_objdir/$libname.ver~ 6050 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6051 fi 6052 ;; 6053 esac 6054 else 6055 _LT_TAGVAR(ld_shlibs, $1)=no 6056 fi 6057 ;; 6058 6059 netbsd* | netbsdelf*-gnu) 6060 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6061 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6062 wlarc= 6063 else 6064 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6065 _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' 6066 fi 6067 ;; 6068 6069 solaris*) 6070 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6071 _LT_TAGVAR(ld_shlibs, $1)=no 6072 cat <<_LT_EOF 1>&2 6073 6074*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6075*** create shared libraries on Solaris systems. Therefore, libtool 6076*** is disabling shared libraries support. We urge you to upgrade GNU 6077*** binutils to release 2.9.1 or newer. Another option is to modify 6078*** your PATH or compiler configuration so that the native linker is 6079*** used, and then restart. 6080 6081_LT_EOF 6082 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6083 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6084 _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' 6085 else 6086 _LT_TAGVAR(ld_shlibs, $1)=no 6087 fi 6088 ;; 6089 6090 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6091 case `$LD -v 2>&1` in 6092 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6093 _LT_TAGVAR(ld_shlibs, $1)=no 6094 cat <<_LT_EOF 1>&2 6095 6096*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6097*** reliably create shared libraries on SCO systems. Therefore, libtool 6098*** is disabling shared libraries support. We urge you to upgrade GNU 6099*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6100*** your PATH or compiler configuration so that the native linker is 6101*** used, and then restart. 6102 6103_LT_EOF 6104 ;; 6105 *) 6106 # For security reasons, it is highly recommended that you always 6107 # use absolute paths for naming shared libraries, and exclude the 6108 # DT_RUNPATH tag from executables and libraries. But doing so 6109 # requires that you compile everything twice, which is a pain. 6110 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6111 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6113 _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' 6114 else 6115 _LT_TAGVAR(ld_shlibs, $1)=no 6116 fi 6117 ;; 6118 esac 6119 ;; 6120 6121 sunos4*) 6122 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6123 wlarc= 6124 _LT_TAGVAR(hardcode_direct, $1)=yes 6125 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6126 ;; 6127 6128 *) 6129 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6131 _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' 6132 else 6133 _LT_TAGVAR(ld_shlibs, $1)=no 6134 fi 6135 ;; 6136 esac 6137 6138 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6139 runpath_var= 6140 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6141 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6142 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6143 fi 6144 else 6145 # PORTME fill in a description of your system's linker (not GNU ld) 6146 case $host_os in 6147 aix3*) 6148 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6149 _LT_TAGVAR(always_export_symbols, $1)=yes 6150 _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' 6151 # Note: this linker hardcodes the directories in LIBPATH if there 6152 # are no directories specified by -L. 6153 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6154 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6155 # Neither direct hardcoding nor static linking is supported with a 6156 # broken collect2. 6157 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6158 fi 6159 ;; 6160 6161 aix[[4-9]]*) 6162 if test "$host_cpu" = ia64; then 6163 # On IA64, the linker does run time linking by default, so we don't 6164 # have to do anything special. 6165 aix_use_runtimelinking=no 6166 exp_sym_flag='-Bexport' 6167 no_entry_flag="" 6168 else 6169 # If we're using GNU nm, then we don't want the "-C" option. 6170 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6171 # Also, AIX nm treats weak defined symbols like other global 6172 # defined symbols, whereas GNU nm marks them as "W". 6173 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6174 _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' 6175 else 6176 _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' 6177 fi 6178 aix_use_runtimelinking=no 6179 6180 # Test if we are trying to use run time linking or normal 6181 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6182 # need to do runtime linking. 6183 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6184 for ld_flag in $LDFLAGS; do 6185 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6186 aix_use_runtimelinking=yes 6187 break 6188 fi 6189 done 6190 ;; 6191 esac 6192 6193 exp_sym_flag='-bexport' 6194 no_entry_flag='-bnoentry' 6195 fi 6196 6197 # When large executables or shared objects are built, AIX ld can 6198 # have problems creating the table of contents. If linking a library 6199 # or program results in "error TOC overflow" add -mminimal-toc to 6200 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6201 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6202 6203 _LT_TAGVAR(archive_cmds, $1)='' 6204 _LT_TAGVAR(hardcode_direct, $1)=yes 6205 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6206 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6207 _LT_TAGVAR(link_all_deplibs, $1)=yes 6208 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6209 6210 if test "$GCC" = yes; then 6211 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6212 # We only want to do this on AIX 4.2 and lower, the check 6213 # below for broken collect2 doesn't work under 4.3+ 6214 collect2name=`${CC} -print-prog-name=collect2` 6215 if test -f "$collect2name" && 6216 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6217 then 6218 # We have reworked collect2 6219 : 6220 else 6221 # We have old collect2 6222 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6223 # It fails to find uninstalled libraries when the uninstalled 6224 # path is not listed in the libpath. Setting hardcode_minus_L 6225 # to unsupported forces relinking 6226 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6227 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6228 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6229 fi 6230 ;; 6231 esac 6232 shared_flag='-shared' 6233 if test "$aix_use_runtimelinking" = yes; then 6234 shared_flag="$shared_flag "'${wl}-G' 6235 fi 6236 _LT_TAGVAR(link_all_deplibs, $1)=no 6237 else 6238 # not using gcc 6239 if test "$host_cpu" = ia64; then 6240 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6241 # chokes on -Wl,-G. The following line is correct: 6242 shared_flag='-G' 6243 else 6244 if test "$aix_use_runtimelinking" = yes; then 6245 shared_flag='${wl}-G' 6246 else 6247 shared_flag='${wl}-bM:SRE' 6248 fi 6249 fi 6250 fi 6251 6252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6253 # It seems that -bexpall does not export symbols beginning with 6254 # underscore (_), so it is better to generate a list of symbols to export. 6255 _LT_TAGVAR(always_export_symbols, $1)=yes 6256 if test "$aix_use_runtimelinking" = yes; then 6257 # Warning - without using the other runtime loading flags (-brtl), 6258 # -berok will link without error, but may produce a broken library. 6259 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6260 # Determine the default libpath from the value encoded in an 6261 # empty executable. 6262 _LT_SYS_MODULE_PATH_AIX([$1]) 6263 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6264 _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" 6265 else 6266 if test "$host_cpu" = ia64; then 6267 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6268 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6269 _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" 6270 else 6271 # Determine the default libpath from the value encoded in an 6272 # empty executable. 6273 _LT_SYS_MODULE_PATH_AIX([$1]) 6274 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6275 # Warning - without using the other run time loading flags, 6276 # -berok will link without error, but may produce a broken library. 6277 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6278 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6279 if test "$with_gnu_ld" = yes; then 6280 # We only use this code for GNU lds that support --whole-archive. 6281 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6282 else 6283 # Exported symbols can be pulled into shared objects from archives 6284 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6285 fi 6286 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6287 # This is similar to how AIX traditionally builds its shared libraries. 6288 _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' 6289 fi 6290 fi 6291 ;; 6292 6293 amigaos*) 6294 case $host_cpu in 6295 powerpc) 6296 # see comment about AmigaOS4 .so support 6297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6298 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6299 ;; 6300 m68k) 6301 _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)' 6302 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6303 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6304 ;; 6305 esac 6306 ;; 6307 6308 bsdi[[45]]*) 6309 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6310 ;; 6311 6312 cygwin* | mingw* | pw32* | cegcc*) 6313 # When not using gcc, we currently assume that we are using 6314 # Microsoft Visual C++. 6315 # hardcode_libdir_flag_spec is actually meaningless, as there is 6316 # no search path for DLLs. 6317 case $cc_basename in 6318 cl*) 6319 # Native MSVC 6320 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6321 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6322 _LT_TAGVAR(always_export_symbols, $1)=yes 6323 _LT_TAGVAR(file_list_spec, $1)='@' 6324 # Tell ltmain to make .lib files, not .a files. 6325 libext=lib 6326 # Tell ltmain to make .dll files, not .so files. 6327 shrext_cmds=".dll" 6328 # FIXME: Setting linknames here is a bad hack. 6329 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6330 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6331 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6332 else 6333 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6334 fi~ 6335 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6336 linknames=' 6337 # The linker will not automatically build a static lib if we build a DLL. 6338 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6340 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6341 _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' 6342 # Don't use ranlib 6343 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6344 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6345 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6346 case $lt_outputfile in 6347 *.exe|*.EXE) ;; 6348 *) 6349 lt_outputfile="$lt_outputfile.exe" 6350 lt_tool_outputfile="$lt_tool_outputfile.exe" 6351 ;; 6352 esac~ 6353 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6354 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6355 $RM "$lt_outputfile.manifest"; 6356 fi' 6357 ;; 6358 *) 6359 # Assume MSVC wrapper 6360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6362 # Tell ltmain to make .lib files, not .a files. 6363 libext=lib 6364 # Tell ltmain to make .dll files, not .so files. 6365 shrext_cmds=".dll" 6366 # FIXME: Setting linknames here is a bad hack. 6367 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6368 # The linker will automatically build a .lib file if we build a DLL. 6369 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6370 # FIXME: Should let the user specify the lib program. 6371 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6372 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6373 ;; 6374 esac 6375 ;; 6376 6377 darwin* | rhapsody*) 6378 _LT_DARWIN_LINKER_FEATURES($1) 6379 ;; 6380 6381 dgux*) 6382 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6383 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6384 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6385 ;; 6386 6387 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6388 # support. Future versions do this automatically, but an explicit c++rt0.o 6389 # does not break anything, and helps significantly (at the cost of a little 6390 # extra space). 6391 freebsd2.2*) 6392 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6394 _LT_TAGVAR(hardcode_direct, $1)=yes 6395 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6396 ;; 6397 6398 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6399 freebsd2.*) 6400 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6401 _LT_TAGVAR(hardcode_direct, $1)=yes 6402 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6403 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6404 ;; 6405 6406 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6407 freebsd* | dragonfly*) 6408 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6410 _LT_TAGVAR(hardcode_direct, $1)=yes 6411 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6412 ;; 6413 6414 hpux9*) 6415 if test "$GCC" = yes; then 6416 _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' 6417 else 6418 _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' 6419 fi 6420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6421 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6422 _LT_TAGVAR(hardcode_direct, $1)=yes 6423 6424 # hardcode_minus_L: Not really in the search PATH, 6425 # but as the default location of the library. 6426 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6427 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6428 ;; 6429 6430 hpux10*) 6431 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6432 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6433 else 6434 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6435 fi 6436 if test "$with_gnu_ld" = no; then 6437 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6438 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6439 _LT_TAGVAR(hardcode_direct, $1)=yes 6440 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6441 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6442 # hardcode_minus_L: Not really in the search PATH, 6443 # but as the default location of the library. 6444 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6445 fi 6446 ;; 6447 6448 hpux11*) 6449 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6450 case $host_cpu in 6451 hppa*64*) 6452 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6453 ;; 6454 ia64*) 6455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6456 ;; 6457 *) 6458 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6459 ;; 6460 esac 6461 else 6462 case $host_cpu in 6463 hppa*64*) 6464 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6465 ;; 6466 ia64*) 6467 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6468 ;; 6469 *) 6470 m4_if($1, [], [ 6471 # Older versions of the 11.00 compiler do not understand -b yet 6472 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6473 _LT_LINKER_OPTION([if $CC understands -b], 6474 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6475 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6476 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6477 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6478 ;; 6479 esac 6480 fi 6481 if test "$with_gnu_ld" = no; then 6482 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6483 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6484 6485 case $host_cpu in 6486 hppa*64*|ia64*) 6487 _LT_TAGVAR(hardcode_direct, $1)=no 6488 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6489 ;; 6490 *) 6491 _LT_TAGVAR(hardcode_direct, $1)=yes 6492 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6493 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6494 6495 # hardcode_minus_L: Not really in the search PATH, 6496 # but as the default location of the library. 6497 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6498 ;; 6499 esac 6500 fi 6501 ;; 6502 6503 irix5* | irix6* | nonstopux*) 6504 if test "$GCC" = yes; then 6505 _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' 6506 # Try to use the -exported_symbol ld option, if it does not 6507 # work, assume that -exports_file does not work either and 6508 # implicitly export all symbols. 6509 # This should be the same for all languages, so no per-tag cache variable. 6510 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6511 [lt_cv_irix_exported_symbol], 6512 [save_LDFLAGS="$LDFLAGS" 6513 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6514 AC_LINK_IFELSE( 6515 [AC_LANG_SOURCE( 6516 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6517 [C++], [[int foo (void) { return 0; }]], 6518 [Fortran 77], [[ 6519 subroutine foo 6520 end]], 6521 [Fortran], [[ 6522 subroutine foo 6523 end]])])], 6524 [lt_cv_irix_exported_symbol=yes], 6525 [lt_cv_irix_exported_symbol=no]) 6526 LDFLAGS="$save_LDFLAGS"]) 6527 if test "$lt_cv_irix_exported_symbol" = yes; then 6528 _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' 6529 fi 6530 else 6531 _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' 6532 _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' 6533 fi 6534 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6535 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6536 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6537 _LT_TAGVAR(inherit_rpath, $1)=yes 6538 _LT_TAGVAR(link_all_deplibs, $1)=yes 6539 ;; 6540 6541 netbsd* | netbsdelf*-gnu) 6542 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6543 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6544 else 6545 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6546 fi 6547 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6548 _LT_TAGVAR(hardcode_direct, $1)=yes 6549 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6550 ;; 6551 6552 newsos6) 6553 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6554 _LT_TAGVAR(hardcode_direct, $1)=yes 6555 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6556 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6557 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6558 ;; 6559 6560 *nto* | *qnx*) 6561 ;; 6562 6563 openbsd*) 6564 if test -f /usr/libexec/ld.so; then 6565 _LT_TAGVAR(hardcode_direct, $1)=yes 6566 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6567 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6568 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6569 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6570 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6572 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6573 else 6574 case $host_os in 6575 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6576 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6577 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6578 ;; 6579 *) 6580 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6581 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6582 ;; 6583 esac 6584 fi 6585 else 6586 _LT_TAGVAR(ld_shlibs, $1)=no 6587 fi 6588 ;; 6589 6590 os2*) 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6592 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6593 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6594 _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' 6595 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6596 ;; 6597 6598 osf3*) 6599 if test "$GCC" = yes; then 6600 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6601 _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' 6602 else 6603 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6604 _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' 6605 fi 6606 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6608 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6609 ;; 6610 6611 osf4* | osf5*) # as osf3* with the addition of -msym flag 6612 if test "$GCC" = yes; then 6613 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6614 _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' 6615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6616 else 6617 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6618 _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' 6619 _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~ 6620 $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' 6621 6622 # Both c and cxx compiler support -rpath directly 6623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6624 fi 6625 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6626 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6627 ;; 6628 6629 solaris*) 6630 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6631 if test "$GCC" = yes; then 6632 wlarc='${wl}' 6633 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6634 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6635 $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' 6636 else 6637 case `$CC -V 2>&1` in 6638 *"Compilers 5.0"*) 6639 wlarc='' 6640 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6641 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6642 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6643 ;; 6644 *) 6645 wlarc='${wl}' 6646 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6647 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6648 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6649 ;; 6650 esac 6651 fi 6652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6653 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6654 case $host_os in 6655 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6656 *) 6657 # The compiler driver will combine and reorder linker options, 6658 # but understands `-z linker_flag'. GCC discards it without `$wl', 6659 # but is careful enough not to reorder. 6660 # Supported since Solaris 2.6 (maybe 2.5.1?) 6661 if test "$GCC" = yes; then 6662 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6663 else 6664 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6665 fi 6666 ;; 6667 esac 6668 _LT_TAGVAR(link_all_deplibs, $1)=yes 6669 ;; 6670 6671 sunos4*) 6672 if test "x$host_vendor" = xsequent; then 6673 # Use $CC to link under sequent, because it throws in some extra .o 6674 # files that make .init and .fini sections work. 6675 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6676 else 6677 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6678 fi 6679 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6680 _LT_TAGVAR(hardcode_direct, $1)=yes 6681 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6682 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6683 ;; 6684 6685 sysv4) 6686 case $host_vendor in 6687 sni) 6688 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6689 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6690 ;; 6691 siemens) 6692 ## LD is ld it makes a PLAMLIB 6693 ## CC just makes a GrossModule. 6694 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6695 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6696 _LT_TAGVAR(hardcode_direct, $1)=no 6697 ;; 6698 motorola) 6699 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6700 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6701 ;; 6702 esac 6703 runpath_var='LD_RUN_PATH' 6704 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6705 ;; 6706 6707 sysv4.3*) 6708 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6709 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6710 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6711 ;; 6712 6713 sysv4*MP*) 6714 if test -d /usr/nec; then 6715 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6716 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6717 runpath_var=LD_RUN_PATH 6718 hardcode_runpath_var=yes 6719 _LT_TAGVAR(ld_shlibs, $1)=yes 6720 fi 6721 ;; 6722 6723 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6724 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6725 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6726 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6727 runpath_var='LD_RUN_PATH' 6728 6729 if test "$GCC" = yes; then 6730 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6731 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6732 else 6733 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6734 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6735 fi 6736 ;; 6737 6738 sysv5* | sco3.2v5* | sco5v6*) 6739 # Note: We can NOT use -z defs as we might desire, because we do not 6740 # link with -lc, and that would cause any symbols used from libc to 6741 # always be unresolved, which means just about no library would 6742 # ever link correctly. If we're not using GNU ld we use -z text 6743 # though, which does catch some bad symbols but isn't as heavy-handed 6744 # as -z defs. 6745 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6746 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6747 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6748 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6749 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6750 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6751 _LT_TAGVAR(link_all_deplibs, $1)=yes 6752 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6753 runpath_var='LD_RUN_PATH' 6754 6755 if test "$GCC" = yes; then 6756 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6757 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6758 else 6759 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6760 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6761 fi 6762 ;; 6763 6764 uts4*) 6765 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6766 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6767 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6768 ;; 6769 6770 *) 6771 _LT_TAGVAR(ld_shlibs, $1)=no 6772 ;; 6773 esac 6774 6775 if test x$host_vendor = xsni; then 6776 case $host in 6777 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6778 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6779 ;; 6780 esac 6781 fi 6782 fi 6783]) 6784AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6785test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6786 6787_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6788 6789_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6790_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6791_LT_DECL([], [extract_expsyms_cmds], [2], 6792 [The commands to extract the exported symbol list from a shared archive]) 6793 6794# 6795# Do we need to explicitly link libc? 6796# 6797case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6798x|xyes) 6799 # Assume -lc should be added 6800 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6801 6802 if test "$enable_shared" = yes && test "$GCC" = yes; then 6803 case $_LT_TAGVAR(archive_cmds, $1) in 6804 *'~'*) 6805 # FIXME: we may have to deal with multi-command sequences. 6806 ;; 6807 '$CC '*) 6808 # Test whether the compiler implicitly links with -lc since on some 6809 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6810 # to ld, don't add -lc before -lgcc. 6811 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6812 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6813 [$RM conftest* 6814 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6815 6816 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6817 soname=conftest 6818 lib=conftest 6819 libobjs=conftest.$ac_objext 6820 deplibs= 6821 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6822 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6823 compiler_flags=-v 6824 linker_flags=-v 6825 verstring= 6826 output_objdir=. 6827 libname=conftest 6828 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6829 _LT_TAGVAR(allow_undefined_flag, $1)= 6830 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6831 then 6832 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6833 else 6834 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6835 fi 6836 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6837 else 6838 cat conftest.err 1>&5 6839 fi 6840 $RM conftest* 6841 ]) 6842 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6843 ;; 6844 esac 6845 fi 6846 ;; 6847esac 6848 6849_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6850 [Whether or not to add -lc for building shared libraries]) 6851_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6852 [enable_shared_with_static_runtimes], [0], 6853 [Whether or not to disallow shared libs when runtime libs are static]) 6854_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6855 [Compiler flag to allow reflexive dlopens]) 6856_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6857 [Compiler flag to generate shared objects directly from archives]) 6858_LT_TAGDECL([], [compiler_needs_object], [1], 6859 [Whether the compiler copes with passing no objects directly]) 6860_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6861 [Create an old-style archive from a shared archive]) 6862_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6863 [Create a temporary old-style archive to link instead of a shared archive]) 6864_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6865_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6866_LT_TAGDECL([], [module_cmds], [2], 6867 [Commands used to build a loadable module if different from building 6868 a shared archive.]) 6869_LT_TAGDECL([], [module_expsym_cmds], [2]) 6870_LT_TAGDECL([], [with_gnu_ld], [1], 6871 [Whether we are building with GNU ld or not]) 6872_LT_TAGDECL([], [allow_undefined_flag], [1], 6873 [Flag that allows shared libraries with undefined symbols to be built]) 6874_LT_TAGDECL([], [no_undefined_flag], [1], 6875 [Flag that enforces no undefined symbols]) 6876_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6877 [Flag to hardcode $libdir into a binary during linking. 6878 This must work even if $libdir does not exist]) 6879_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6880 [Whether we need a single "-rpath" flag with a separated argument]) 6881_LT_TAGDECL([], [hardcode_direct], [0], 6882 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6883 DIR into the resulting binary]) 6884_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6885 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6886 DIR into the resulting binary and the resulting library dependency is 6887 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6888 library is relocated]) 6889_LT_TAGDECL([], [hardcode_minus_L], [0], 6890 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6891 into the resulting binary]) 6892_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6893 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6894 into the resulting binary]) 6895_LT_TAGDECL([], [hardcode_automatic], [0], 6896 [Set to "yes" if building a shared library automatically hardcodes DIR 6897 into the library and all subsequent libraries and executables linked 6898 against it]) 6899_LT_TAGDECL([], [inherit_rpath], [0], 6900 [Set to yes if linker adds runtime paths of dependent libraries 6901 to runtime path list]) 6902_LT_TAGDECL([], [link_all_deplibs], [0], 6903 [Whether libtool must link a program against all its dependency libraries]) 6904_LT_TAGDECL([], [always_export_symbols], [0], 6905 [Set to "yes" if exported symbols are required]) 6906_LT_TAGDECL([], [export_symbols_cmds], [2], 6907 [The commands to list exported symbols]) 6908_LT_TAGDECL([], [exclude_expsyms], [1], 6909 [Symbols that should not be listed in the preloaded symbols]) 6910_LT_TAGDECL([], [include_expsyms], [1], 6911 [Symbols that must always be exported]) 6912_LT_TAGDECL([], [prelink_cmds], [2], 6913 [Commands necessary for linking programs (against libraries) with templates]) 6914_LT_TAGDECL([], [postlink_cmds], [2], 6915 [Commands necessary for finishing linking programs]) 6916_LT_TAGDECL([], [file_list_spec], [1], 6917 [Specify filename containing input files]) 6918dnl FIXME: Not yet implemented 6919dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6920dnl [Compiler flag to generate thread safe objects]) 6921])# _LT_LINKER_SHLIBS 6922 6923 6924# _LT_LANG_C_CONFIG([TAG]) 6925# ------------------------ 6926# Ensure that the configuration variables for a C compiler are suitably 6927# defined. These variables are subsequently used by _LT_CONFIG to write 6928# the compiler configuration to `libtool'. 6929m4_defun([_LT_LANG_C_CONFIG], 6930[m4_require([_LT_DECL_EGREP])dnl 6931lt_save_CC="$CC" 6932AC_LANG_PUSH(C) 6933 6934# Source file extension for C test sources. 6935ac_ext=c 6936 6937# Object file extension for compiled C test sources. 6938objext=o 6939_LT_TAGVAR(objext, $1)=$objext 6940 6941# Code to be used in simple compile tests 6942lt_simple_compile_test_code="int some_variable = 0;" 6943 6944# Code to be used in simple link tests 6945lt_simple_link_test_code='int main(){return(0);}' 6946 6947_LT_TAG_COMPILER 6948# Save the default compiler, since it gets overwritten when the other 6949# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6950compiler_DEFAULT=$CC 6951 6952# save warnings/boilerplate of simple test code 6953_LT_COMPILER_BOILERPLATE 6954_LT_LINKER_BOILERPLATE 6955 6956if test -n "$compiler"; then 6957 _LT_COMPILER_NO_RTTI($1) 6958 _LT_COMPILER_PIC($1) 6959 _LT_COMPILER_C_O($1) 6960 _LT_COMPILER_FILE_LOCKS($1) 6961 _LT_LINKER_SHLIBS($1) 6962 _LT_SYS_DYNAMIC_LINKER($1) 6963 _LT_LINKER_HARDCODE_LIBPATH($1) 6964 LT_SYS_DLOPEN_SELF 6965 _LT_CMD_STRIPLIB 6966 6967 # Report which library types will actually be built 6968 AC_MSG_CHECKING([if libtool supports shared libraries]) 6969 AC_MSG_RESULT([$can_build_shared]) 6970 6971 AC_MSG_CHECKING([whether to build shared libraries]) 6972 test "$can_build_shared" = "no" && enable_shared=no 6973 6974 # On AIX, shared libraries and static libraries use the same namespace, and 6975 # are all built from PIC. 6976 case $host_os in 6977 aix3*) 6978 test "$enable_shared" = yes && enable_static=no 6979 if test -n "$RANLIB"; then 6980 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6981 postinstall_cmds='$RANLIB $lib' 6982 fi 6983 ;; 6984 6985 aix[[4-9]]*) 6986 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6987 test "$enable_shared" = yes && enable_static=no 6988 fi 6989 ;; 6990 esac 6991 AC_MSG_RESULT([$enable_shared]) 6992 6993 AC_MSG_CHECKING([whether to build static libraries]) 6994 # Make sure either enable_shared or enable_static is yes. 6995 test "$enable_shared" = yes || enable_static=yes 6996 AC_MSG_RESULT([$enable_static]) 6997 6998 _LT_CONFIG($1) 6999fi 7000AC_LANG_POP 7001CC="$lt_save_CC" 7002])# _LT_LANG_C_CONFIG 7003 7004 7005# _LT_LANG_CXX_CONFIG([TAG]) 7006# -------------------------- 7007# Ensure that the configuration variables for a C++ compiler are suitably 7008# defined. These variables are subsequently used by _LT_CONFIG to write 7009# the compiler configuration to `libtool'. 7010m4_defun([_LT_LANG_CXX_CONFIG], 7011[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7012m4_require([_LT_DECL_EGREP])dnl 7013m4_require([_LT_PATH_MANIFEST_TOOL])dnl 7014if test -n "$CXX" && ( test "X$CXX" != "Xno" && 7015 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7016 (test "X$CXX" != "Xg++"))) ; then 7017 AC_PROG_CXXCPP 7018else 7019 _lt_caught_CXX_error=yes 7020fi 7021 7022AC_LANG_PUSH(C++) 7023_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7024_LT_TAGVAR(allow_undefined_flag, $1)= 7025_LT_TAGVAR(always_export_symbols, $1)=no 7026_LT_TAGVAR(archive_expsym_cmds, $1)= 7027_LT_TAGVAR(compiler_needs_object, $1)=no 7028_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7029_LT_TAGVAR(hardcode_direct, $1)=no 7030_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7031_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7032_LT_TAGVAR(hardcode_libdir_separator, $1)= 7033_LT_TAGVAR(hardcode_minus_L, $1)=no 7034_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7035_LT_TAGVAR(hardcode_automatic, $1)=no 7036_LT_TAGVAR(inherit_rpath, $1)=no 7037_LT_TAGVAR(module_cmds, $1)= 7038_LT_TAGVAR(module_expsym_cmds, $1)= 7039_LT_TAGVAR(link_all_deplibs, $1)=unknown 7040_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7041_LT_TAGVAR(reload_flag, $1)=$reload_flag 7042_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7043_LT_TAGVAR(no_undefined_flag, $1)= 7044_LT_TAGVAR(whole_archive_flag_spec, $1)= 7045_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7046 7047# Source file extension for C++ test sources. 7048ac_ext=cpp 7049 7050# Object file extension for compiled C++ test sources. 7051objext=o 7052_LT_TAGVAR(objext, $1)=$objext 7053 7054# No sense in running all these tests if we already determined that 7055# the CXX compiler isn't working. Some variables (like enable_shared) 7056# are currently assumed to apply to all compilers on this platform, 7057# and will be corrupted by setting them based on a non-working compiler. 7058if test "$_lt_caught_CXX_error" != yes; then 7059 # Code to be used in simple compile tests 7060 lt_simple_compile_test_code="int some_variable = 0;" 7061 7062 # Code to be used in simple link tests 7063 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7064 7065 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7066 _LT_TAG_COMPILER 7067 7068 # save warnings/boilerplate of simple test code 7069 _LT_COMPILER_BOILERPLATE 7070 _LT_LINKER_BOILERPLATE 7071 7072 # Allow CC to be a program name with arguments. 7073 lt_save_CC=$CC 7074 lt_save_CFLAGS=$CFLAGS 7075 lt_save_LD=$LD 7076 lt_save_GCC=$GCC 7077 GCC=$GXX 7078 lt_save_with_gnu_ld=$with_gnu_ld 7079 lt_save_path_LD=$lt_cv_path_LD 7080 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7081 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7082 else 7083 $as_unset lt_cv_prog_gnu_ld 7084 fi 7085 if test -n "${lt_cv_path_LDCXX+set}"; then 7086 lt_cv_path_LD=$lt_cv_path_LDCXX 7087 else 7088 $as_unset lt_cv_path_LD 7089 fi 7090 test -z "${LDCXX+set}" || LD=$LDCXX 7091 CC=${CXX-"c++"} 7092 CFLAGS=$CXXFLAGS 7093 compiler=$CC 7094 _LT_TAGVAR(compiler, $1)=$CC 7095 _LT_CC_BASENAME([$compiler]) 7096 7097 if test -n "$compiler"; then 7098 # We don't want -fno-exception when compiling C++ code, so set the 7099 # no_builtin_flag separately 7100 if test "$GXX" = yes; then 7101 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7102 else 7103 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7104 fi 7105 7106 if test "$GXX" = yes; then 7107 # Set up default GNU C++ configuration 7108 7109 LT_PATH_LD 7110 7111 # Check if GNU C++ uses GNU ld as the underlying linker, since the 7112 # archiving commands below assume that GNU ld is being used. 7113 if test "$with_gnu_ld" = yes; then 7114 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7115 _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' 7116 7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7118 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7119 7120 # If archive_cmds runs LD, not CC, wlarc should be empty 7121 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7122 # investigate it a little bit more. (MM) 7123 wlarc='${wl}' 7124 7125 # ancient GNU ld didn't support --whole-archive et. al. 7126 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7127 $GREP 'no-whole-archive' > /dev/null; then 7128 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7129 else 7130 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7131 fi 7132 else 7133 with_gnu_ld=no 7134 wlarc= 7135 7136 # A generic and very simple default shared library creation 7137 # command for GNU C++ for the case where it uses the native 7138 # linker, instead of GNU ld. If possible, this setting should 7139 # overridden to take advantage of the native linker features on 7140 # the platform it is being used on. 7141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7142 fi 7143 7144 # Commands to make compiler produce verbose output that lists 7145 # what "hidden" libraries, object files and flags are used when 7146 # linking a shared library. 7147 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7148 7149 else 7150 GXX=no 7151 with_gnu_ld=no 7152 wlarc= 7153 fi 7154 7155 # PORTME: fill in a description of your system's C++ link characteristics 7156 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7157 _LT_TAGVAR(ld_shlibs, $1)=yes 7158 case $host_os in 7159 aix3*) 7160 # FIXME: insert proper C++ library support 7161 _LT_TAGVAR(ld_shlibs, $1)=no 7162 ;; 7163 aix[[4-9]]*) 7164 if test "$host_cpu" = ia64; then 7165 # On IA64, the linker does run time linking by default, so we don't 7166 # have to do anything special. 7167 aix_use_runtimelinking=no 7168 exp_sym_flag='-Bexport' 7169 no_entry_flag="" 7170 else 7171 aix_use_runtimelinking=no 7172 7173 # Test if we are trying to use run time linking or normal 7174 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7175 # need to do runtime linking. 7176 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7177 for ld_flag in $LDFLAGS; do 7178 case $ld_flag in 7179 *-brtl*) 7180 aix_use_runtimelinking=yes 7181 break 7182 ;; 7183 esac 7184 done 7185 ;; 7186 esac 7187 7188 exp_sym_flag='-bexport' 7189 no_entry_flag='-bnoentry' 7190 fi 7191 7192 # When large executables or shared objects are built, AIX ld can 7193 # have problems creating the table of contents. If linking a library 7194 # or program results in "error TOC overflow" add -mminimal-toc to 7195 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7196 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7197 7198 _LT_TAGVAR(archive_cmds, $1)='' 7199 _LT_TAGVAR(hardcode_direct, $1)=yes 7200 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7201 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7202 _LT_TAGVAR(link_all_deplibs, $1)=yes 7203 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7204 7205 if test "$GXX" = yes; then 7206 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7207 # We only want to do this on AIX 4.2 and lower, the check 7208 # below for broken collect2 doesn't work under 4.3+ 7209 collect2name=`${CC} -print-prog-name=collect2` 7210 if test -f "$collect2name" && 7211 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7212 then 7213 # We have reworked collect2 7214 : 7215 else 7216 # We have old collect2 7217 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7218 # It fails to find uninstalled libraries when the uninstalled 7219 # path is not listed in the libpath. Setting hardcode_minus_L 7220 # to unsupported forces relinking 7221 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7222 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7223 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7224 fi 7225 esac 7226 shared_flag='-shared' 7227 if test "$aix_use_runtimelinking" = yes; then 7228 shared_flag="$shared_flag "'${wl}-G' 7229 fi 7230 else 7231 # not using gcc 7232 if test "$host_cpu" = ia64; then 7233 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7234 # chokes on -Wl,-G. The following line is correct: 7235 shared_flag='-G' 7236 else 7237 if test "$aix_use_runtimelinking" = yes; then 7238 shared_flag='${wl}-G' 7239 else 7240 shared_flag='${wl}-bM:SRE' 7241 fi 7242 fi 7243 fi 7244 7245 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7246 # It seems that -bexpall does not export symbols beginning with 7247 # underscore (_), so it is better to generate a list of symbols to 7248 # export. 7249 _LT_TAGVAR(always_export_symbols, $1)=yes 7250 if test "$aix_use_runtimelinking" = yes; then 7251 # Warning - without using the other runtime loading flags (-brtl), 7252 # -berok will link without error, but may produce a broken library. 7253 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7254 # Determine the default libpath from the value encoded in an empty 7255 # executable. 7256 _LT_SYS_MODULE_PATH_AIX([$1]) 7257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7258 7259 _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" 7260 else 7261 if test "$host_cpu" = ia64; then 7262 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7263 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7264 _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" 7265 else 7266 # Determine the default libpath from the value encoded in an 7267 # empty executable. 7268 _LT_SYS_MODULE_PATH_AIX([$1]) 7269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7270 # Warning - without using the other run time loading flags, 7271 # -berok will link without error, but may produce a broken library. 7272 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7273 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7274 if test "$with_gnu_ld" = yes; then 7275 # We only use this code for GNU lds that support --whole-archive. 7276 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7277 else 7278 # Exported symbols can be pulled into shared objects from archives 7279 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7280 fi 7281 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7282 # This is similar to how AIX traditionally builds its shared 7283 # libraries. 7284 _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' 7285 fi 7286 fi 7287 ;; 7288 7289 beos*) 7290 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7291 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7292 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7293 # support --undefined. This deserves some investigation. FIXME 7294 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7295 else 7296 _LT_TAGVAR(ld_shlibs, $1)=no 7297 fi 7298 ;; 7299 7300 chorus*) 7301 case $cc_basename in 7302 *) 7303 # FIXME: insert proper C++ library support 7304 _LT_TAGVAR(ld_shlibs, $1)=no 7305 ;; 7306 esac 7307 ;; 7308 7309 cygwin* | mingw* | pw32* | cegcc*) 7310 case $GXX,$cc_basename in 7311 ,cl* | no,cl*) 7312 # Native MSVC 7313 # hardcode_libdir_flag_spec is actually meaningless, as there is 7314 # no search path for DLLs. 7315 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7316 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7317 _LT_TAGVAR(always_export_symbols, $1)=yes 7318 _LT_TAGVAR(file_list_spec, $1)='@' 7319 # Tell ltmain to make .lib files, not .a files. 7320 libext=lib 7321 # Tell ltmain to make .dll files, not .so files. 7322 shrext_cmds=".dll" 7323 # FIXME: Setting linknames here is a bad hack. 7324 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7325 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7326 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7327 else 7328 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7329 fi~ 7330 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7331 linknames=' 7332 # The linker will not automatically build a static lib if we build a DLL. 7333 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7334 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7335 # Don't use ranlib 7336 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7337 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7338 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7339 case $lt_outputfile in 7340 *.exe|*.EXE) ;; 7341 *) 7342 lt_outputfile="$lt_outputfile.exe" 7343 lt_tool_outputfile="$lt_tool_outputfile.exe" 7344 ;; 7345 esac~ 7346 func_to_tool_file "$lt_outputfile"~ 7347 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7348 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7349 $RM "$lt_outputfile.manifest"; 7350 fi' 7351 ;; 7352 *) 7353 # g++ 7354 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7355 # as there is no search path for DLLs. 7356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7357 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7358 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7359 _LT_TAGVAR(always_export_symbols, $1)=no 7360 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7361 7362 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7363 _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' 7364 # If the export-symbols file already is a .def file (1st line 7365 # is EXPORTS), use it as is; otherwise, prepend... 7366 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7367 cp $export_symbols $output_objdir/$soname.def; 7368 else 7369 echo EXPORTS > $output_objdir/$soname.def; 7370 cat $export_symbols >> $output_objdir/$soname.def; 7371 fi~ 7372 $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' 7373 else 7374 _LT_TAGVAR(ld_shlibs, $1)=no 7375 fi 7376 ;; 7377 esac 7378 ;; 7379 darwin* | rhapsody*) 7380 _LT_DARWIN_LINKER_FEATURES($1) 7381 ;; 7382 7383 dgux*) 7384 case $cc_basename in 7385 ec++*) 7386 # FIXME: insert proper C++ library support 7387 _LT_TAGVAR(ld_shlibs, $1)=no 7388 ;; 7389 ghcx*) 7390 # Green Hills C++ Compiler 7391 # FIXME: insert proper C++ library support 7392 _LT_TAGVAR(ld_shlibs, $1)=no 7393 ;; 7394 *) 7395 # FIXME: insert proper C++ library support 7396 _LT_TAGVAR(ld_shlibs, $1)=no 7397 ;; 7398 esac 7399 ;; 7400 7401 freebsd2.*) 7402 # C++ shared libraries reported to be fairly broken before 7403 # switch to ELF 7404 _LT_TAGVAR(ld_shlibs, $1)=no 7405 ;; 7406 7407 freebsd-elf*) 7408 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7409 ;; 7410 7411 freebsd* | dragonfly*) 7412 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7413 # conventions 7414 _LT_TAGVAR(ld_shlibs, $1)=yes 7415 ;; 7416 7417 gnu*) 7418 ;; 7419 7420 haiku*) 7421 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7422 _LT_TAGVAR(link_all_deplibs, $1)=yes 7423 ;; 7424 7425 hpux9*) 7426 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7427 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7428 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7429 _LT_TAGVAR(hardcode_direct, $1)=yes 7430 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7431 # but as the default 7432 # location of the library. 7433 7434 case $cc_basename in 7435 CC*) 7436 # FIXME: insert proper C++ library support 7437 _LT_TAGVAR(ld_shlibs, $1)=no 7438 ;; 7439 aCC*) 7440 _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' 7441 # Commands to make compiler produce verbose output that lists 7442 # what "hidden" libraries, object files and flags are used when 7443 # linking a shared library. 7444 # 7445 # There doesn't appear to be a way to prevent this compiler from 7446 # explicitly linking system object files so we need to strip them 7447 # from the output so that they don't get included in the library 7448 # dependencies. 7449 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"' 7450 ;; 7451 *) 7452 if test "$GXX" = yes; then 7453 _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' 7454 else 7455 # FIXME: insert proper C++ library support 7456 _LT_TAGVAR(ld_shlibs, $1)=no 7457 fi 7458 ;; 7459 esac 7460 ;; 7461 7462 hpux10*|hpux11*) 7463 if test $with_gnu_ld = no; then 7464 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7465 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7466 7467 case $host_cpu in 7468 hppa*64*|ia64*) 7469 ;; 7470 *) 7471 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7472 ;; 7473 esac 7474 fi 7475 case $host_cpu in 7476 hppa*64*|ia64*) 7477 _LT_TAGVAR(hardcode_direct, $1)=no 7478 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7479 ;; 7480 *) 7481 _LT_TAGVAR(hardcode_direct, $1)=yes 7482 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7483 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7484 # but as the default 7485 # location of the library. 7486 ;; 7487 esac 7488 7489 case $cc_basename in 7490 CC*) 7491 # FIXME: insert proper C++ library support 7492 _LT_TAGVAR(ld_shlibs, $1)=no 7493 ;; 7494 aCC*) 7495 case $host_cpu in 7496 hppa*64*) 7497 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7498 ;; 7499 ia64*) 7500 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7501 ;; 7502 *) 7503 _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' 7504 ;; 7505 esac 7506 # Commands to make compiler produce verbose output that lists 7507 # what "hidden" libraries, object files and flags are used when 7508 # linking a shared library. 7509 # 7510 # There doesn't appear to be a way to prevent this compiler from 7511 # explicitly linking system object files so we need to strip them 7512 # from the output so that they don't get included in the library 7513 # dependencies. 7514 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"' 7515 ;; 7516 *) 7517 if test "$GXX" = yes; then 7518 if test $with_gnu_ld = no; then 7519 case $host_cpu in 7520 hppa*64*) 7521 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7522 ;; 7523 ia64*) 7524 _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' 7525 ;; 7526 *) 7527 _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' 7528 ;; 7529 esac 7530 fi 7531 else 7532 # FIXME: insert proper C++ library support 7533 _LT_TAGVAR(ld_shlibs, $1)=no 7534 fi 7535 ;; 7536 esac 7537 ;; 7538 7539 interix[[3-9]]*) 7540 _LT_TAGVAR(hardcode_direct, $1)=no 7541 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7542 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7543 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7544 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7545 # Instead, shared libraries are loaded at an image base (0x10000000 by 7546 # default) and relocated if they conflict, which is a slow very memory 7547 # consuming and fragmenting process. To avoid this, we pick a random, 7548 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7549 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7550 _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' 7551 _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' 7552 ;; 7553 irix5* | irix6*) 7554 case $cc_basename in 7555 CC*) 7556 # SGI C++ 7557 _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' 7558 7559 # Archives containing C++ object files must be created using 7560 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7561 # necessary to make sure instantiated templates are included 7562 # in the archive. 7563 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7564 ;; 7565 *) 7566 if test "$GXX" = yes; then 7567 if test "$with_gnu_ld" = no; then 7568 _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' 7569 else 7570 _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' 7571 fi 7572 fi 7573 _LT_TAGVAR(link_all_deplibs, $1)=yes 7574 ;; 7575 esac 7576 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7577 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7578 _LT_TAGVAR(inherit_rpath, $1)=yes 7579 ;; 7580 7581 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7582 case $cc_basename in 7583 KCC*) 7584 # Kuck and Associates, Inc. (KAI) C++ Compiler 7585 7586 # KCC will only create a shared library if the output file 7587 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7588 # to its proper name (with version) after linking. 7589 _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' 7590 _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' 7591 # Commands to make compiler produce verbose output that lists 7592 # what "hidden" libraries, object files and flags are used when 7593 # linking a shared library. 7594 # 7595 # There doesn't appear to be a way to prevent this compiler from 7596 # explicitly linking system object files so we need to strip them 7597 # from the output so that they don't get included in the library 7598 # dependencies. 7599 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"' 7600 7601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7602 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7603 7604 # Archives containing C++ object files must be created using 7605 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7606 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7607 ;; 7608 icpc* | ecpc* ) 7609 # Intel C++ 7610 with_gnu_ld=yes 7611 # version 8.0 and above of icpc choke on multiply defined symbols 7612 # if we add $predep_objects and $postdep_objects, however 7.1 and 7613 # earlier do not add the objects themselves. 7614 case `$CC -V 2>&1` in 7615 *"Version 7."*) 7616 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7617 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7618 ;; 7619 *) # Version 8.0 or newer 7620 tmp_idyn= 7621 case $host_cpu in 7622 ia64*) tmp_idyn=' -i_dynamic';; 7623 esac 7624 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7625 _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' 7626 ;; 7627 esac 7628 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7629 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7630 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7631 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7632 ;; 7633 pgCC* | pgcpp*) 7634 # Portland Group C++ compiler 7635 case `$CC -V` in 7636 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7637 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7638 rm -rf $tpldir~ 7639 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7640 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7641 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7642 rm -rf $tpldir~ 7643 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7644 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7645 $RANLIB $oldlib' 7646 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7647 rm -rf $tpldir~ 7648 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7649 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7650 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7651 rm -rf $tpldir~ 7652 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7653 $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' 7654 ;; 7655 *) # Version 6 and above use weak symbols 7656 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7657 _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' 7658 ;; 7659 esac 7660 7661 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7662 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7663 _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' 7664 ;; 7665 cxx*) 7666 # Compaq C++ 7667 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7668 _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' 7669 7670 runpath_var=LD_RUN_PATH 7671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7672 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7673 7674 # Commands to make compiler produce verbose output that lists 7675 # what "hidden" libraries, object files and flags are used when 7676 # linking a shared library. 7677 # 7678 # There doesn't appear to be a way to prevent this compiler from 7679 # explicitly linking system object files so we need to strip them 7680 # from the output so that they don't get included in the library 7681 # dependencies. 7682 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' 7683 ;; 7684 xl* | mpixl* | bgxl*) 7685 # IBM XL 8.0 on PPC, with GNU ld 7686 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7687 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7688 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7689 if test "x$supports_anon_versioning" = xyes; then 7690 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7691 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7692 echo "local: *; };" >> $output_objdir/$libname.ver~ 7693 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7694 fi 7695 ;; 7696 *) 7697 case `$CC -V 2>&1 | sed 5q` in 7698 *Sun\ C*) 7699 # Sun C++ 5.9 7700 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7701 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7702 _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' 7703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7704 _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' 7705 _LT_TAGVAR(compiler_needs_object, $1)=yes 7706 7707 # Not sure whether something based on 7708 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7709 # would be better. 7710 output_verbose_link_cmd='func_echo_all' 7711 7712 # Archives containing C++ object files must be created using 7713 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7714 # necessary to make sure instantiated templates are included 7715 # in the archive. 7716 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7717 ;; 7718 esac 7719 ;; 7720 esac 7721 ;; 7722 7723 lynxos*) 7724 # FIXME: insert proper C++ library support 7725 _LT_TAGVAR(ld_shlibs, $1)=no 7726 ;; 7727 7728 m88k*) 7729 # FIXME: insert proper C++ library support 7730 _LT_TAGVAR(ld_shlibs, $1)=no 7731 ;; 7732 7733 mvs*) 7734 case $cc_basename in 7735 cxx*) 7736 # FIXME: insert proper C++ library support 7737 _LT_TAGVAR(ld_shlibs, $1)=no 7738 ;; 7739 *) 7740 # FIXME: insert proper C++ library support 7741 _LT_TAGVAR(ld_shlibs, $1)=no 7742 ;; 7743 esac 7744 ;; 7745 7746 netbsd*) 7747 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7748 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7749 wlarc= 7750 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7751 _LT_TAGVAR(hardcode_direct, $1)=yes 7752 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7753 fi 7754 # Workaround some broken pre-1.5 toolchains 7755 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7756 ;; 7757 7758 *nto* | *qnx*) 7759 _LT_TAGVAR(ld_shlibs, $1)=yes 7760 ;; 7761 7762 openbsd2*) 7763 # C++ shared libraries are fairly broken 7764 _LT_TAGVAR(ld_shlibs, $1)=no 7765 ;; 7766 7767 openbsd*) 7768 if test -f /usr/libexec/ld.so; then 7769 _LT_TAGVAR(hardcode_direct, $1)=yes 7770 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7771 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7773 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7774 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7775 _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' 7776 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7777 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7778 fi 7779 output_verbose_link_cmd=func_echo_all 7780 else 7781 _LT_TAGVAR(ld_shlibs, $1)=no 7782 fi 7783 ;; 7784 7785 osf3* | osf4* | osf5*) 7786 case $cc_basename in 7787 KCC*) 7788 # Kuck and Associates, Inc. (KAI) C++ Compiler 7789 7790 # KCC will only create a shared library if the output file 7791 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7792 # to its proper name (with version) after linking. 7793 _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' 7794 7795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7796 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7797 7798 # Archives containing C++ object files must be created using 7799 # the KAI C++ compiler. 7800 case $host in 7801 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7802 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7803 esac 7804 ;; 7805 RCC*) 7806 # Rational C++ 2.4.1 7807 # FIXME: insert proper C++ library support 7808 _LT_TAGVAR(ld_shlibs, $1)=no 7809 ;; 7810 cxx*) 7811 case $host in 7812 osf3*) 7813 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7814 _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' 7815 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7816 ;; 7817 *) 7818 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7819 _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' 7820 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7821 echo "-hidden">> $lib.exp~ 7822 $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~ 7823 $RM $lib.exp' 7824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7825 ;; 7826 esac 7827 7828 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7829 7830 # Commands to make compiler produce verbose output that lists 7831 # what "hidden" libraries, object files and flags are used when 7832 # linking a shared library. 7833 # 7834 # There doesn't appear to be a way to prevent this compiler from 7835 # explicitly linking system object files so we need to strip them 7836 # from the output so that they don't get included in the library 7837 # dependencies. 7838 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"' 7839 ;; 7840 *) 7841 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7842 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7843 case $host in 7844 osf3*) 7845 _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' 7846 ;; 7847 *) 7848 _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' 7849 ;; 7850 esac 7851 7852 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7853 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7854 7855 # Commands to make compiler produce verbose output that lists 7856 # what "hidden" libraries, object files and flags are used when 7857 # linking a shared library. 7858 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7859 7860 else 7861 # FIXME: insert proper C++ library support 7862 _LT_TAGVAR(ld_shlibs, $1)=no 7863 fi 7864 ;; 7865 esac 7866 ;; 7867 7868 psos*) 7869 # FIXME: insert proper C++ library support 7870 _LT_TAGVAR(ld_shlibs, $1)=no 7871 ;; 7872 7873 sunos4*) 7874 case $cc_basename in 7875 CC*) 7876 # Sun C++ 4.x 7877 # FIXME: insert proper C++ library support 7878 _LT_TAGVAR(ld_shlibs, $1)=no 7879 ;; 7880 lcc*) 7881 # Lucid 7882 # FIXME: insert proper C++ library support 7883 _LT_TAGVAR(ld_shlibs, $1)=no 7884 ;; 7885 *) 7886 # FIXME: insert proper C++ library support 7887 _LT_TAGVAR(ld_shlibs, $1)=no 7888 ;; 7889 esac 7890 ;; 7891 7892 solaris*) 7893 case $cc_basename in 7894 CC* | sunCC*) 7895 # Sun C++ 4.2, 5.x and Centerline C++ 7896 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7897 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7898 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7899 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7900 $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' 7901 7902 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7903 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7904 case $host_os in 7905 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7906 *) 7907 # The compiler driver will combine and reorder linker options, 7908 # but understands `-z linker_flag'. 7909 # Supported since Solaris 2.6 (maybe 2.5.1?) 7910 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7911 ;; 7912 esac 7913 _LT_TAGVAR(link_all_deplibs, $1)=yes 7914 7915 output_verbose_link_cmd='func_echo_all' 7916 7917 # Archives containing C++ object files must be created using 7918 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7919 # necessary to make sure instantiated templates are included 7920 # in the archive. 7921 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7922 ;; 7923 gcx*) 7924 # Green Hills C++ Compiler 7925 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7926 7927 # The C++ compiler must be used to create the archive. 7928 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7929 ;; 7930 *) 7931 # GNU C++ compiler with Solaris linker 7932 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7933 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7934 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7935 _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' 7936 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7937 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7938 7939 # Commands to make compiler produce verbose output that lists 7940 # what "hidden" libraries, object files and flags are used when 7941 # linking a shared library. 7942 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7943 else 7944 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7945 # platform. 7946 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7947 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7948 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7949 7950 # Commands to make compiler produce verbose output that lists 7951 # what "hidden" libraries, object files and flags are used when 7952 # linking a shared library. 7953 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7954 fi 7955 7956 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7957 case $host_os in 7958 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7959 *) 7960 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7961 ;; 7962 esac 7963 fi 7964 ;; 7965 esac 7966 ;; 7967 7968 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7969 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7970 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7971 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7972 runpath_var='LD_RUN_PATH' 7973 7974 case $cc_basename in 7975 CC*) 7976 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7977 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7978 ;; 7979 *) 7980 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7981 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7982 ;; 7983 esac 7984 ;; 7985 7986 sysv5* | sco3.2v5* | sco5v6*) 7987 # Note: We can NOT use -z defs as we might desire, because we do not 7988 # link with -lc, and that would cause any symbols used from libc to 7989 # always be unresolved, which means just about no library would 7990 # ever link correctly. If we're not using GNU ld we use -z text 7991 # though, which does catch some bad symbols but isn't as heavy-handed 7992 # as -z defs. 7993 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7994 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7997 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7998 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7999 _LT_TAGVAR(link_all_deplibs, $1)=yes 8000 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8001 runpath_var='LD_RUN_PATH' 8002 8003 case $cc_basename in 8004 CC*) 8005 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8006 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8007 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 8008 '"$_LT_TAGVAR(old_archive_cmds, $1)" 8009 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 8010 '"$_LT_TAGVAR(reload_cmds, $1)" 8011 ;; 8012 *) 8013 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8014 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8015 ;; 8016 esac 8017 ;; 8018 8019 tandem*) 8020 case $cc_basename in 8021 NCC*) 8022 # NonStop-UX NCC 3.20 8023 # FIXME: insert proper C++ library support 8024 _LT_TAGVAR(ld_shlibs, $1)=no 8025 ;; 8026 *) 8027 # FIXME: insert proper C++ library support 8028 _LT_TAGVAR(ld_shlibs, $1)=no 8029 ;; 8030 esac 8031 ;; 8032 8033 vxworks*) 8034 # FIXME: insert proper C++ library support 8035 _LT_TAGVAR(ld_shlibs, $1)=no 8036 ;; 8037 8038 *) 8039 # FIXME: insert proper C++ library support 8040 _LT_TAGVAR(ld_shlibs, $1)=no 8041 ;; 8042 esac 8043 8044 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8045 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8046 8047 _LT_TAGVAR(GCC, $1)="$GXX" 8048 _LT_TAGVAR(LD, $1)="$LD" 8049 8050 ## CAVEAT EMPTOR: 8051 ## There is no encapsulation within the following macros, do not change 8052 ## the running order or otherwise move them around unless you know exactly 8053 ## what you are doing... 8054 _LT_SYS_HIDDEN_LIBDEPS($1) 8055 _LT_COMPILER_PIC($1) 8056 _LT_COMPILER_C_O($1) 8057 _LT_COMPILER_FILE_LOCKS($1) 8058 _LT_LINKER_SHLIBS($1) 8059 _LT_SYS_DYNAMIC_LINKER($1) 8060 _LT_LINKER_HARDCODE_LIBPATH($1) 8061 8062 _LT_CONFIG($1) 8063 fi # test -n "$compiler" 8064 8065 CC=$lt_save_CC 8066 CFLAGS=$lt_save_CFLAGS 8067 LDCXX=$LD 8068 LD=$lt_save_LD 8069 GCC=$lt_save_GCC 8070 with_gnu_ld=$lt_save_with_gnu_ld 8071 lt_cv_path_LDCXX=$lt_cv_path_LD 8072 lt_cv_path_LD=$lt_save_path_LD 8073 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8074 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8075fi # test "$_lt_caught_CXX_error" != yes 8076 8077AC_LANG_POP 8078])# _LT_LANG_CXX_CONFIG 8079 8080 8081# _LT_FUNC_STRIPNAME_CNF 8082# ---------------------- 8083# func_stripname_cnf prefix suffix name 8084# strip PREFIX and SUFFIX off of NAME. 8085# PREFIX and SUFFIX must not contain globbing or regex special 8086# characters, hashes, percent signs, but SUFFIX may contain a leading 8087# dot (in which case that matches only a dot). 8088# 8089# This function is identical to the (non-XSI) version of func_stripname, 8090# except this one can be used by m4 code that may be executed by configure, 8091# rather than the libtool script. 8092m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 8093AC_REQUIRE([_LT_DECL_SED]) 8094AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 8095func_stripname_cnf () 8096{ 8097 case ${2} in 8098 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8099 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8100 esac 8101} # func_stripname_cnf 8102])# _LT_FUNC_STRIPNAME_CNF 8103 8104# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8105# --------------------------------- 8106# Figure out "hidden" library dependencies from verbose 8107# compiler output when linking a shared library. 8108# Parse the compiler output and extract the necessary 8109# objects, libraries and library flags. 8110m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8111[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8112AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8113# Dependencies to place before and after the object being linked: 8114_LT_TAGVAR(predep_objects, $1)= 8115_LT_TAGVAR(postdep_objects, $1)= 8116_LT_TAGVAR(predeps, $1)= 8117_LT_TAGVAR(postdeps, $1)= 8118_LT_TAGVAR(compiler_lib_search_path, $1)= 8119 8120dnl we can't use the lt_simple_compile_test_code here, 8121dnl because it contains code intended for an executable, 8122dnl not a library. It's possible we should let each 8123dnl tag define a new lt_????_link_test_code variable, 8124dnl but it's only used here... 8125m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8126int a; 8127void foo (void) { a = 0; } 8128_LT_EOF 8129], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8130class Foo 8131{ 8132public: 8133 Foo (void) { a = 0; } 8134private: 8135 int a; 8136}; 8137_LT_EOF 8138], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8139 subroutine foo 8140 implicit none 8141 integer*4 a 8142 a=0 8143 return 8144 end 8145_LT_EOF 8146], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8147 subroutine foo 8148 implicit none 8149 integer a 8150 a=0 8151 return 8152 end 8153_LT_EOF 8154], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8155public class foo { 8156 private int a; 8157 public void bar (void) { 8158 a = 0; 8159 } 8160}; 8161_LT_EOF 8162], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8163package foo 8164func foo() { 8165} 8166_LT_EOF 8167]) 8168 8169_lt_libdeps_save_CFLAGS=$CFLAGS 8170case "$CC $CFLAGS " in #( 8171*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8172*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8173*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8174esac 8175 8176dnl Parse the compiler output and extract the necessary 8177dnl objects, libraries and library flags. 8178if AC_TRY_EVAL(ac_compile); then 8179 # Parse the compiler output and extract the necessary 8180 # objects, libraries and library flags. 8181 8182 # Sentinel used to keep track of whether or not we are before 8183 # the conftest object file. 8184 pre_test_object_deps_done=no 8185 8186 for p in `eval "$output_verbose_link_cmd"`; do 8187 case ${prev}${p} in 8188 8189 -L* | -R* | -l*) 8190 # Some compilers place space between "-{L,R}" and the path. 8191 # Remove the space. 8192 if test $p = "-L" || 8193 test $p = "-R"; then 8194 prev=$p 8195 continue 8196 fi 8197 8198 # Expand the sysroot to ease extracting the directories later. 8199 if test -z "$prev"; then 8200 case $p in 8201 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8202 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8203 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8204 esac 8205 fi 8206 case $p in 8207 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8208 esac 8209 if test "$pre_test_object_deps_done" = no; then 8210 case ${prev} in 8211 -L | -R) 8212 # Internal compiler library paths should come after those 8213 # provided the user. The postdeps already come after the 8214 # user supplied libs so there is no need to process them. 8215 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8216 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8217 else 8218 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8219 fi 8220 ;; 8221 # The "-l" case would never come before the object being 8222 # linked, so don't bother handling this case. 8223 esac 8224 else 8225 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8226 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8227 else 8228 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8229 fi 8230 fi 8231 prev= 8232 ;; 8233 8234 *.lto.$objext) ;; # Ignore GCC LTO objects 8235 *.$objext) 8236 # This assumes that the test object file only shows up 8237 # once in the compiler output. 8238 if test "$p" = "conftest.$objext"; then 8239 pre_test_object_deps_done=yes 8240 continue 8241 fi 8242 8243 if test "$pre_test_object_deps_done" = no; then 8244 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8245 _LT_TAGVAR(predep_objects, $1)="$p" 8246 else 8247 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8248 fi 8249 else 8250 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8251 _LT_TAGVAR(postdep_objects, $1)="$p" 8252 else 8253 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8254 fi 8255 fi 8256 ;; 8257 8258 *) ;; # Ignore the rest. 8259 8260 esac 8261 done 8262 8263 # Clean up. 8264 rm -f a.out a.exe 8265else 8266 echo "libtool.m4: error: problem compiling $1 test program" 8267fi 8268 8269$RM -f confest.$objext 8270CFLAGS=$_lt_libdeps_save_CFLAGS 8271 8272# PORTME: override above test on systems where it is broken 8273m4_if([$1], [CXX], 8274[case $host_os in 8275interix[[3-9]]*) 8276 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8277 # hack all around it, let's just trust "g++" to DTRT. 8278 _LT_TAGVAR(predep_objects,$1)= 8279 _LT_TAGVAR(postdep_objects,$1)= 8280 _LT_TAGVAR(postdeps,$1)= 8281 ;; 8282 8283linux*) 8284 case `$CC -V 2>&1 | sed 5q` in 8285 *Sun\ C*) 8286 # Sun C++ 5.9 8287 8288 # The more standards-conforming stlport4 library is 8289 # incompatible with the Cstd library. Avoid specifying 8290 # it if it's in CXXFLAGS. Ignore libCrun as 8291 # -library=stlport4 depends on it. 8292 case " $CXX $CXXFLAGS " in 8293 *" -library=stlport4 "*) 8294 solaris_use_stlport4=yes 8295 ;; 8296 esac 8297 8298 if test "$solaris_use_stlport4" != yes; then 8299 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8300 fi 8301 ;; 8302 esac 8303 ;; 8304 8305solaris*) 8306 case $cc_basename in 8307 CC* | sunCC*) 8308 # The more standards-conforming stlport4 library is 8309 # incompatible with the Cstd library. Avoid specifying 8310 # it if it's in CXXFLAGS. Ignore libCrun as 8311 # -library=stlport4 depends on it. 8312 case " $CXX $CXXFLAGS " in 8313 *" -library=stlport4 "*) 8314 solaris_use_stlport4=yes 8315 ;; 8316 esac 8317 8318 # Adding this requires a known-good setup of shared libraries for 8319 # Sun compiler versions before 5.6, else PIC objects from an old 8320 # archive will be linked into the output, leading to subtle bugs. 8321 if test "$solaris_use_stlport4" != yes; then 8322 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8323 fi 8324 ;; 8325 esac 8326 ;; 8327esac 8328]) 8329 8330case " $_LT_TAGVAR(postdeps, $1) " in 8331*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8332esac 8333 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8334if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8335 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8336fi 8337_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8338 [The directories searched by this compiler when creating a shared library]) 8339_LT_TAGDECL([], [predep_objects], [1], 8340 [Dependencies to place before and after the objects being linked to 8341 create a shared library]) 8342_LT_TAGDECL([], [postdep_objects], [1]) 8343_LT_TAGDECL([], [predeps], [1]) 8344_LT_TAGDECL([], [postdeps], [1]) 8345_LT_TAGDECL([], [compiler_lib_search_path], [1], 8346 [The library search path used internally by the compiler when linking 8347 a shared library]) 8348])# _LT_SYS_HIDDEN_LIBDEPS 8349 8350 8351# _LT_LANG_F77_CONFIG([TAG]) 8352# -------------------------- 8353# Ensure that the configuration variables for a Fortran 77 compiler are 8354# suitably defined. These variables are subsequently used by _LT_CONFIG 8355# to write the compiler configuration to `libtool'. 8356m4_defun([_LT_LANG_F77_CONFIG], 8357[AC_LANG_PUSH(Fortran 77) 8358if test -z "$F77" || test "X$F77" = "Xno"; then 8359 _lt_disable_F77=yes 8360fi 8361 8362_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8363_LT_TAGVAR(allow_undefined_flag, $1)= 8364_LT_TAGVAR(always_export_symbols, $1)=no 8365_LT_TAGVAR(archive_expsym_cmds, $1)= 8366_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8367_LT_TAGVAR(hardcode_direct, $1)=no 8368_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8369_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8370_LT_TAGVAR(hardcode_libdir_separator, $1)= 8371_LT_TAGVAR(hardcode_minus_L, $1)=no 8372_LT_TAGVAR(hardcode_automatic, $1)=no 8373_LT_TAGVAR(inherit_rpath, $1)=no 8374_LT_TAGVAR(module_cmds, $1)= 8375_LT_TAGVAR(module_expsym_cmds, $1)= 8376_LT_TAGVAR(link_all_deplibs, $1)=unknown 8377_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8378_LT_TAGVAR(reload_flag, $1)=$reload_flag 8379_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8380_LT_TAGVAR(no_undefined_flag, $1)= 8381_LT_TAGVAR(whole_archive_flag_spec, $1)= 8382_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8383 8384# Source file extension for f77 test sources. 8385ac_ext=f 8386 8387# Object file extension for compiled f77 test sources. 8388objext=o 8389_LT_TAGVAR(objext, $1)=$objext 8390 8391# No sense in running all these tests if we already determined that 8392# the F77 compiler isn't working. Some variables (like enable_shared) 8393# are currently assumed to apply to all compilers on this platform, 8394# and will be corrupted by setting them based on a non-working compiler. 8395if test "$_lt_disable_F77" != yes; then 8396 # Code to be used in simple compile tests 8397 lt_simple_compile_test_code="\ 8398 subroutine t 8399 return 8400 end 8401" 8402 8403 # Code to be used in simple link tests 8404 lt_simple_link_test_code="\ 8405 program t 8406 end 8407" 8408 8409 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8410 _LT_TAG_COMPILER 8411 8412 # save warnings/boilerplate of simple test code 8413 _LT_COMPILER_BOILERPLATE 8414 _LT_LINKER_BOILERPLATE 8415 8416 # Allow CC to be a program name with arguments. 8417 lt_save_CC="$CC" 8418 lt_save_GCC=$GCC 8419 lt_save_CFLAGS=$CFLAGS 8420 CC=${F77-"f77"} 8421 CFLAGS=$FFLAGS 8422 compiler=$CC 8423 _LT_TAGVAR(compiler, $1)=$CC 8424 _LT_CC_BASENAME([$compiler]) 8425 GCC=$G77 8426 if test -n "$compiler"; then 8427 AC_MSG_CHECKING([if libtool supports shared libraries]) 8428 AC_MSG_RESULT([$can_build_shared]) 8429 8430 AC_MSG_CHECKING([whether to build shared libraries]) 8431 test "$can_build_shared" = "no" && enable_shared=no 8432 8433 # On AIX, shared libraries and static libraries use the same namespace, and 8434 # are all built from PIC. 8435 case $host_os in 8436 aix3*) 8437 test "$enable_shared" = yes && enable_static=no 8438 if test -n "$RANLIB"; then 8439 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8440 postinstall_cmds='$RANLIB $lib' 8441 fi 8442 ;; 8443 aix[[4-9]]*) 8444 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8445 test "$enable_shared" = yes && enable_static=no 8446 fi 8447 ;; 8448 esac 8449 AC_MSG_RESULT([$enable_shared]) 8450 8451 AC_MSG_CHECKING([whether to build static libraries]) 8452 # Make sure either enable_shared or enable_static is yes. 8453 test "$enable_shared" = yes || enable_static=yes 8454 AC_MSG_RESULT([$enable_static]) 8455 8456 _LT_TAGVAR(GCC, $1)="$G77" 8457 _LT_TAGVAR(LD, $1)="$LD" 8458 8459 ## CAVEAT EMPTOR: 8460 ## There is no encapsulation within the following macros, do not change 8461 ## the running order or otherwise move them around unless you know exactly 8462 ## what you are doing... 8463 _LT_COMPILER_PIC($1) 8464 _LT_COMPILER_C_O($1) 8465 _LT_COMPILER_FILE_LOCKS($1) 8466 _LT_LINKER_SHLIBS($1) 8467 _LT_SYS_DYNAMIC_LINKER($1) 8468 _LT_LINKER_HARDCODE_LIBPATH($1) 8469 8470 _LT_CONFIG($1) 8471 fi # test -n "$compiler" 8472 8473 GCC=$lt_save_GCC 8474 CC="$lt_save_CC" 8475 CFLAGS="$lt_save_CFLAGS" 8476fi # test "$_lt_disable_F77" != yes 8477 8478AC_LANG_POP 8479])# _LT_LANG_F77_CONFIG 8480 8481 8482# _LT_LANG_FC_CONFIG([TAG]) 8483# ------------------------- 8484# Ensure that the configuration variables for a Fortran compiler are 8485# suitably defined. These variables are subsequently used by _LT_CONFIG 8486# to write the compiler configuration to `libtool'. 8487m4_defun([_LT_LANG_FC_CONFIG], 8488[AC_LANG_PUSH(Fortran) 8489 8490if test -z "$FC" || test "X$FC" = "Xno"; then 8491 _lt_disable_FC=yes 8492fi 8493 8494_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8495_LT_TAGVAR(allow_undefined_flag, $1)= 8496_LT_TAGVAR(always_export_symbols, $1)=no 8497_LT_TAGVAR(archive_expsym_cmds, $1)= 8498_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8499_LT_TAGVAR(hardcode_direct, $1)=no 8500_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8501_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8502_LT_TAGVAR(hardcode_libdir_separator, $1)= 8503_LT_TAGVAR(hardcode_minus_L, $1)=no 8504_LT_TAGVAR(hardcode_automatic, $1)=no 8505_LT_TAGVAR(inherit_rpath, $1)=no 8506_LT_TAGVAR(module_cmds, $1)= 8507_LT_TAGVAR(module_expsym_cmds, $1)= 8508_LT_TAGVAR(link_all_deplibs, $1)=unknown 8509_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8510_LT_TAGVAR(reload_flag, $1)=$reload_flag 8511_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8512_LT_TAGVAR(no_undefined_flag, $1)= 8513_LT_TAGVAR(whole_archive_flag_spec, $1)= 8514_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8515 8516# Source file extension for fc test sources. 8517ac_ext=${ac_fc_srcext-f} 8518 8519# Object file extension for compiled fc test sources. 8520objext=o 8521_LT_TAGVAR(objext, $1)=$objext 8522 8523# No sense in running all these tests if we already determined that 8524# the FC compiler isn't working. Some variables (like enable_shared) 8525# are currently assumed to apply to all compilers on this platform, 8526# and will be corrupted by setting them based on a non-working compiler. 8527if test "$_lt_disable_FC" != yes; then 8528 # Code to be used in simple compile tests 8529 lt_simple_compile_test_code="\ 8530 subroutine t 8531 return 8532 end 8533" 8534 8535 # Code to be used in simple link tests 8536 lt_simple_link_test_code="\ 8537 program t 8538 end 8539" 8540 8541 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8542 _LT_TAG_COMPILER 8543 8544 # save warnings/boilerplate of simple test code 8545 _LT_COMPILER_BOILERPLATE 8546 _LT_LINKER_BOILERPLATE 8547 8548 # Allow CC to be a program name with arguments. 8549 lt_save_CC="$CC" 8550 lt_save_GCC=$GCC 8551 lt_save_CFLAGS=$CFLAGS 8552 CC=${FC-"f95"} 8553 CFLAGS=$FCFLAGS 8554 compiler=$CC 8555 GCC=$ac_cv_fc_compiler_gnu 8556 8557 _LT_TAGVAR(compiler, $1)=$CC 8558 _LT_CC_BASENAME([$compiler]) 8559 8560 if test -n "$compiler"; then 8561 AC_MSG_CHECKING([if libtool supports shared libraries]) 8562 AC_MSG_RESULT([$can_build_shared]) 8563 8564 AC_MSG_CHECKING([whether to build shared libraries]) 8565 test "$can_build_shared" = "no" && enable_shared=no 8566 8567 # On AIX, shared libraries and static libraries use the same namespace, and 8568 # are all built from PIC. 8569 case $host_os in 8570 aix3*) 8571 test "$enable_shared" = yes && enable_static=no 8572 if test -n "$RANLIB"; then 8573 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8574 postinstall_cmds='$RANLIB $lib' 8575 fi 8576 ;; 8577 aix[[4-9]]*) 8578 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8579 test "$enable_shared" = yes && enable_static=no 8580 fi 8581 ;; 8582 esac 8583 AC_MSG_RESULT([$enable_shared]) 8584 8585 AC_MSG_CHECKING([whether to build static libraries]) 8586 # Make sure either enable_shared or enable_static is yes. 8587 test "$enable_shared" = yes || enable_static=yes 8588 AC_MSG_RESULT([$enable_static]) 8589 8590 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8591 _LT_TAGVAR(LD, $1)="$LD" 8592 8593 ## CAVEAT EMPTOR: 8594 ## There is no encapsulation within the following macros, do not change 8595 ## the running order or otherwise move them around unless you know exactly 8596 ## what you are doing... 8597 _LT_SYS_HIDDEN_LIBDEPS($1) 8598 _LT_COMPILER_PIC($1) 8599 _LT_COMPILER_C_O($1) 8600 _LT_COMPILER_FILE_LOCKS($1) 8601 _LT_LINKER_SHLIBS($1) 8602 _LT_SYS_DYNAMIC_LINKER($1) 8603 _LT_LINKER_HARDCODE_LIBPATH($1) 8604 8605 _LT_CONFIG($1) 8606 fi # test -n "$compiler" 8607 8608 GCC=$lt_save_GCC 8609 CC=$lt_save_CC 8610 CFLAGS=$lt_save_CFLAGS 8611fi # test "$_lt_disable_FC" != yes 8612 8613AC_LANG_POP 8614])# _LT_LANG_FC_CONFIG 8615 8616 8617# _LT_LANG_GCJ_CONFIG([TAG]) 8618# -------------------------- 8619# Ensure that the configuration variables for the GNU Java Compiler compiler 8620# are suitably defined. These variables are subsequently used by _LT_CONFIG 8621# to write the compiler configuration to `libtool'. 8622m4_defun([_LT_LANG_GCJ_CONFIG], 8623[AC_REQUIRE([LT_PROG_GCJ])dnl 8624AC_LANG_SAVE 8625 8626# Source file extension for Java test sources. 8627ac_ext=java 8628 8629# Object file extension for compiled Java test sources. 8630objext=o 8631_LT_TAGVAR(objext, $1)=$objext 8632 8633# Code to be used in simple compile tests 8634lt_simple_compile_test_code="class foo {}" 8635 8636# Code to be used in simple link tests 8637lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8638 8639# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8640_LT_TAG_COMPILER 8641 8642# save warnings/boilerplate of simple test code 8643_LT_COMPILER_BOILERPLATE 8644_LT_LINKER_BOILERPLATE 8645 8646# Allow CC to be a program name with arguments. 8647lt_save_CC=$CC 8648lt_save_CFLAGS=$CFLAGS 8649lt_save_GCC=$GCC 8650GCC=yes 8651CC=${GCJ-"gcj"} 8652CFLAGS=$GCJFLAGS 8653compiler=$CC 8654_LT_TAGVAR(compiler, $1)=$CC 8655_LT_TAGVAR(LD, $1)="$LD" 8656_LT_CC_BASENAME([$compiler]) 8657 8658# GCJ did not exist at the time GCC didn't implicitly link libc in. 8659_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8660 8661_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8662_LT_TAGVAR(reload_flag, $1)=$reload_flag 8663_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8664 8665if test -n "$compiler"; then 8666 _LT_COMPILER_NO_RTTI($1) 8667 _LT_COMPILER_PIC($1) 8668 _LT_COMPILER_C_O($1) 8669 _LT_COMPILER_FILE_LOCKS($1) 8670 _LT_LINKER_SHLIBS($1) 8671 _LT_LINKER_HARDCODE_LIBPATH($1) 8672 8673 _LT_CONFIG($1) 8674fi 8675 8676AC_LANG_RESTORE 8677 8678GCC=$lt_save_GCC 8679CC=$lt_save_CC 8680CFLAGS=$lt_save_CFLAGS 8681])# _LT_LANG_GCJ_CONFIG 8682 8683 8684# _LT_LANG_GO_CONFIG([TAG]) 8685# -------------------------- 8686# Ensure that the configuration variables for the GNU Go compiler 8687# are suitably defined. These variables are subsequently used by _LT_CONFIG 8688# to write the compiler configuration to `libtool'. 8689m4_defun([_LT_LANG_GO_CONFIG], 8690[AC_REQUIRE([LT_PROG_GO])dnl 8691AC_LANG_SAVE 8692 8693# Source file extension for Go test sources. 8694ac_ext=go 8695 8696# Object file extension for compiled Go test sources. 8697objext=o 8698_LT_TAGVAR(objext, $1)=$objext 8699 8700# Code to be used in simple compile tests 8701lt_simple_compile_test_code="package main; func main() { }" 8702 8703# Code to be used in simple link tests 8704lt_simple_link_test_code='package main; func main() { }' 8705 8706# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8707_LT_TAG_COMPILER 8708 8709# save warnings/boilerplate of simple test code 8710_LT_COMPILER_BOILERPLATE 8711_LT_LINKER_BOILERPLATE 8712 8713# Allow CC to be a program name with arguments. 8714lt_save_CC=$CC 8715lt_save_CFLAGS=$CFLAGS 8716lt_save_GCC=$GCC 8717GCC=yes 8718CC=${GOC-"gccgo"} 8719CFLAGS=$GOFLAGS 8720compiler=$CC 8721_LT_TAGVAR(compiler, $1)=$CC 8722_LT_TAGVAR(LD, $1)="$LD" 8723_LT_CC_BASENAME([$compiler]) 8724 8725# Go did not exist at the time GCC didn't implicitly link libc in. 8726_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8727 8728_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8729_LT_TAGVAR(reload_flag, $1)=$reload_flag 8730_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8731 8732if test -n "$compiler"; then 8733 _LT_COMPILER_NO_RTTI($1) 8734 _LT_COMPILER_PIC($1) 8735 _LT_COMPILER_C_O($1) 8736 _LT_COMPILER_FILE_LOCKS($1) 8737 _LT_LINKER_SHLIBS($1) 8738 _LT_LINKER_HARDCODE_LIBPATH($1) 8739 8740 _LT_CONFIG($1) 8741fi 8742 8743AC_LANG_RESTORE 8744 8745GCC=$lt_save_GCC 8746CC=$lt_save_CC 8747CFLAGS=$lt_save_CFLAGS 8748])# _LT_LANG_GO_CONFIG 8749 8750 8751# _LT_LANG_RC_CONFIG([TAG]) 8752# ------------------------- 8753# Ensure that the configuration variables for the Windows resource compiler 8754# are suitably defined. These variables are subsequently used by _LT_CONFIG 8755# to write the compiler configuration to `libtool'. 8756m4_defun([_LT_LANG_RC_CONFIG], 8757[AC_REQUIRE([LT_PROG_RC])dnl 8758AC_LANG_SAVE 8759 8760# Source file extension for RC test sources. 8761ac_ext=rc 8762 8763# Object file extension for compiled RC test sources. 8764objext=o 8765_LT_TAGVAR(objext, $1)=$objext 8766 8767# Code to be used in simple compile tests 8768lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8769 8770# Code to be used in simple link tests 8771lt_simple_link_test_code="$lt_simple_compile_test_code" 8772 8773# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8774_LT_TAG_COMPILER 8775 8776# save warnings/boilerplate of simple test code 8777_LT_COMPILER_BOILERPLATE 8778_LT_LINKER_BOILERPLATE 8779 8780# Allow CC to be a program name with arguments. 8781lt_save_CC="$CC" 8782lt_save_CFLAGS=$CFLAGS 8783lt_save_GCC=$GCC 8784GCC= 8785CC=${RC-"windres"} 8786CFLAGS= 8787compiler=$CC 8788_LT_TAGVAR(compiler, $1)=$CC 8789_LT_CC_BASENAME([$compiler]) 8790_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8791 8792if test -n "$compiler"; then 8793 : 8794 _LT_CONFIG($1) 8795fi 8796 8797GCC=$lt_save_GCC 8798AC_LANG_RESTORE 8799CC=$lt_save_CC 8800CFLAGS=$lt_save_CFLAGS 8801])# _LT_LANG_RC_CONFIG 8802 8803 8804# LT_PROG_GCJ 8805# ----------- 8806AC_DEFUN([LT_PROG_GCJ], 8807[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8808 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8809 [AC_CHECK_TOOL(GCJ, gcj,) 8810 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8811 AC_SUBST(GCJFLAGS)])])[]dnl 8812]) 8813 8814# Old name: 8815AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8816dnl aclocal-1.4 backwards compatibility: 8817dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8818 8819 8820# LT_PROG_GO 8821# ---------- 8822AC_DEFUN([LT_PROG_GO], 8823[AC_CHECK_TOOL(GOC, gccgo,) 8824]) 8825 8826 8827# LT_PROG_RC 8828# ---------- 8829AC_DEFUN([LT_PROG_RC], 8830[AC_CHECK_TOOL(RC, windres,) 8831]) 8832 8833# Old name: 8834AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8835dnl aclocal-1.4 backwards compatibility: 8836dnl AC_DEFUN([LT_AC_PROG_RC], []) 8837 8838 8839# _LT_DECL_EGREP 8840# -------------- 8841# If we don't have a new enough Autoconf to choose the best grep 8842# available, choose the one first in the user's PATH. 8843m4_defun([_LT_DECL_EGREP], 8844[AC_REQUIRE([AC_PROG_EGREP])dnl 8845AC_REQUIRE([AC_PROG_FGREP])dnl 8846test -z "$GREP" && GREP=grep 8847_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8848_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8849_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8850dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8851AC_SUBST([GREP]) 8852]) 8853 8854 8855# _LT_DECL_OBJDUMP 8856# -------------- 8857# If we don't have a new enough Autoconf to choose the best objdump 8858# available, choose the one first in the user's PATH. 8859m4_defun([_LT_DECL_OBJDUMP], 8860[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8861test -z "$OBJDUMP" && OBJDUMP=objdump 8862_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8863AC_SUBST([OBJDUMP]) 8864]) 8865 8866# _LT_DECL_DLLTOOL 8867# ---------------- 8868# Ensure DLLTOOL variable is set. 8869m4_defun([_LT_DECL_DLLTOOL], 8870[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8871test -z "$DLLTOOL" && DLLTOOL=dlltool 8872_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8873AC_SUBST([DLLTOOL]) 8874]) 8875 8876# _LT_DECL_SED 8877# ------------ 8878# Check for a fully-functional sed program, that truncates 8879# as few characters as possible. Prefer GNU sed if found. 8880m4_defun([_LT_DECL_SED], 8881[AC_PROG_SED 8882test -z "$SED" && SED=sed 8883Xsed="$SED -e 1s/^X//" 8884_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8885_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8886 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8887])# _LT_DECL_SED 8888 8889m4_ifndef([AC_PROG_SED], [ 8890# NOTE: This macro has been submitted for inclusion into # 8891# GNU Autoconf as AC_PROG_SED. When it is available in # 8892# a released version of Autoconf we should remove this # 8893# macro and use it instead. # 8894 8895m4_defun([AC_PROG_SED], 8896[AC_MSG_CHECKING([for a sed that does not truncate output]) 8897AC_CACHE_VAL(lt_cv_path_SED, 8898[# Loop through the user's path and test for sed and gsed. 8899# Then use that list of sed's as ones to test for truncation. 8900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8901for as_dir in $PATH 8902do 8903 IFS=$as_save_IFS 8904 test -z "$as_dir" && as_dir=. 8905 for lt_ac_prog in sed gsed; do 8906 for ac_exec_ext in '' $ac_executable_extensions; do 8907 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8908 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8909 fi 8910 done 8911 done 8912done 8913IFS=$as_save_IFS 8914lt_ac_max=0 8915lt_ac_count=0 8916# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8917# along with /bin/sed that truncates output. 8918for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8919 test ! -f $lt_ac_sed && continue 8920 cat /dev/null > conftest.in 8921 lt_ac_count=0 8922 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8923 # Check for GNU sed and select it if it is found. 8924 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8925 lt_cv_path_SED=$lt_ac_sed 8926 break 8927 fi 8928 while true; do 8929 cat conftest.in conftest.in >conftest.tmp 8930 mv conftest.tmp conftest.in 8931 cp conftest.in conftest.nl 8932 echo >>conftest.nl 8933 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8934 cmp -s conftest.out conftest.nl || break 8935 # 10000 chars as input seems more than enough 8936 test $lt_ac_count -gt 10 && break 8937 lt_ac_count=`expr $lt_ac_count + 1` 8938 if test $lt_ac_count -gt $lt_ac_max; then 8939 lt_ac_max=$lt_ac_count 8940 lt_cv_path_SED=$lt_ac_sed 8941 fi 8942 done 8943done 8944]) 8945SED=$lt_cv_path_SED 8946AC_SUBST([SED]) 8947AC_MSG_RESULT([$SED]) 8948])#AC_PROG_SED 8949])#m4_ifndef 8950 8951# Old name: 8952AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8953dnl aclocal-1.4 backwards compatibility: 8954dnl AC_DEFUN([LT_AC_PROG_SED], []) 8955 8956 8957# _LT_CHECK_SHELL_FEATURES 8958# ------------------------ 8959# Find out whether the shell is Bourne or XSI compatible, 8960# or has some other useful features. 8961m4_defun([_LT_CHECK_SHELL_FEATURES], 8962[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8963# Try some XSI features 8964xsi_shell=no 8965( _lt_dummy="a/b/c" 8966 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8967 = c,a/b,b/c, \ 8968 && eval 'test $(( 1 + 1 )) -eq 2 \ 8969 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8970 && xsi_shell=yes 8971AC_MSG_RESULT([$xsi_shell]) 8972_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8973 8974AC_MSG_CHECKING([whether the shell understands "+="]) 8975lt_shell_append=no 8976( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8977 >/dev/null 2>&1 \ 8978 && lt_shell_append=yes 8979AC_MSG_RESULT([$lt_shell_append]) 8980_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8981 8982if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8983 lt_unset=unset 8984else 8985 lt_unset=false 8986fi 8987_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8988 8989# test EBCDIC or ASCII 8990case `echo X|tr X '\101'` in 8991 A) # ASCII based system 8992 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8993 lt_SP2NL='tr \040 \012' 8994 lt_NL2SP='tr \015\012 \040\040' 8995 ;; 8996 *) # EBCDIC based system 8997 lt_SP2NL='tr \100 \n' 8998 lt_NL2SP='tr \r\n \100\100' 8999 ;; 9000esac 9001_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9002_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9003])# _LT_CHECK_SHELL_FEATURES 9004 9005 9006# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 9007# ------------------------------------------------------ 9008# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 9009# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 9010m4_defun([_LT_PROG_FUNCTION_REPLACE], 9011[dnl { 9012sed -e '/^$1 ()$/,/^} # $1 /c\ 9013$1 ()\ 9014{\ 9015m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 9016} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 9017 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9018 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9019test 0 -eq $? || _lt_function_replace_fail=: 9020]) 9021 9022 9023# _LT_PROG_REPLACE_SHELLFNS 9024# ------------------------- 9025# Replace existing portable implementations of several shell functions with 9026# equivalent extended shell implementations where those features are available.. 9027m4_defun([_LT_PROG_REPLACE_SHELLFNS], 9028[if test x"$xsi_shell" = xyes; then 9029 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 9030 case ${1} in 9031 */*) func_dirname_result="${1%/*}${2}" ;; 9032 * ) func_dirname_result="${3}" ;; 9033 esac]) 9034 9035 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 9036 func_basename_result="${1##*/}"]) 9037 9038 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 9039 case ${1} in 9040 */*) func_dirname_result="${1%/*}${2}" ;; 9041 * ) func_dirname_result="${3}" ;; 9042 esac 9043 func_basename_result="${1##*/}"]) 9044 9045 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 9046 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9047 # positional parameters, so assign one to ordinary parameter first. 9048 func_stripname_result=${3} 9049 func_stripname_result=${func_stripname_result#"${1}"} 9050 func_stripname_result=${func_stripname_result%"${2}"}]) 9051 9052 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 9053 func_split_long_opt_name=${1%%=*} 9054 func_split_long_opt_arg=${1#*=}]) 9055 9056 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 9057 func_split_short_opt_arg=${1#??} 9058 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9059 9060 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 9061 case ${1} in 9062 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9063 *) func_lo2o_result=${1} ;; 9064 esac]) 9065 9066 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9067 9068 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9069 9070 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 9071fi 9072 9073if test x"$lt_shell_append" = xyes; then 9074 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 9075 9076 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 9077 func_quote_for_eval "${2}" 9078dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 9079 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 9080 9081 # Save a `func_append' function call where possible by direct use of '+=' 9082 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 9083 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9084 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9085 test 0 -eq $? || _lt_function_replace_fail=: 9086else 9087 # Save a `func_append' function call even when '+=' is not available 9088 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 9089 && mv -f "$cfgfile.tmp" "$cfgfile" \ 9090 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9091 test 0 -eq $? || _lt_function_replace_fail=: 9092fi 9093 9094if test x"$_lt_function_replace_fail" = x":"; then 9095 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 9096fi 9097]) 9098 9099# _LT_PATH_CONVERSION_FUNCTIONS 9100# ----------------------------- 9101# Determine which file name conversion functions should be used by 9102# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 9103# for certain cross-compile configurations and native mingw. 9104m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 9105[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9106AC_REQUIRE([AC_CANONICAL_BUILD])dnl 9107AC_MSG_CHECKING([how to convert $build file names to $host format]) 9108AC_CACHE_VAL(lt_cv_to_host_file_cmd, 9109[case $host in 9110 *-*-mingw* ) 9111 case $build in 9112 *-*-mingw* ) # actually msys 9113 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 9114 ;; 9115 *-*-cygwin* ) 9116 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 9117 ;; 9118 * ) # otherwise, assume *nix 9119 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 9120 ;; 9121 esac 9122 ;; 9123 *-*-cygwin* ) 9124 case $build in 9125 *-*-mingw* ) # actually msys 9126 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 9127 ;; 9128 *-*-cygwin* ) 9129 lt_cv_to_host_file_cmd=func_convert_file_noop 9130 ;; 9131 * ) # otherwise, assume *nix 9132 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9133 ;; 9134 esac 9135 ;; 9136 * ) # unhandled hosts (and "normal" native builds) 9137 lt_cv_to_host_file_cmd=func_convert_file_noop 9138 ;; 9139esac 9140]) 9141to_host_file_cmd=$lt_cv_to_host_file_cmd 9142AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9143_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9144 [0], [convert $build file names to $host format])dnl 9145 9146AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9147AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9148[#assume ordinary cross tools, or native build. 9149lt_cv_to_tool_file_cmd=func_convert_file_noop 9150case $host in 9151 *-*-mingw* ) 9152 case $build in 9153 *-*-mingw* ) # actually msys 9154 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9155 ;; 9156 esac 9157 ;; 9158esac 9159]) 9160to_tool_file_cmd=$lt_cv_to_tool_file_cmd 9161AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9162_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9163 [0], [convert $build files to toolchain format])dnl 9164])# _LT_PATH_CONVERSION_FUNCTIONS 9165 9166# Helper functions for option handling. -*- Autoconf -*- 9167# 9168# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9169# Inc. 9170# Written by Gary V. Vaughan, 2004 9171# 9172# This file is free software; the Free Software Foundation gives 9173# unlimited permission to copy and/or distribute it, with or without 9174# modifications, as long as this notice is preserved. 9175 9176# serial 7 ltoptions.m4 9177 9178# This is to help aclocal find these macros, as it can't see m4_define. 9179AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9180 9181 9182# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9183# ------------------------------------------ 9184m4_define([_LT_MANGLE_OPTION], 9185[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9186 9187 9188# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9189# --------------------------------------- 9190# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9191# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9192# saved as a flag. 9193m4_define([_LT_SET_OPTION], 9194[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9195m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9196 _LT_MANGLE_DEFUN([$1], [$2]), 9197 [m4_warning([Unknown $1 option `$2'])])[]dnl 9198]) 9199 9200 9201# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9202# ------------------------------------------------------------ 9203# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9204m4_define([_LT_IF_OPTION], 9205[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9206 9207 9208# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9209# ------------------------------------------------------- 9210# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9211# are set. 9212m4_define([_LT_UNLESS_OPTIONS], 9213[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9214 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9215 [m4_define([$0_found])])])[]dnl 9216m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9217])[]dnl 9218]) 9219 9220 9221# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9222# ---------------------------------------- 9223# OPTION-LIST is a space-separated list of Libtool options associated 9224# with MACRO-NAME. If any OPTION has a matching handler declared with 9225# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9226# the unknown option and exit. 9227m4_defun([_LT_SET_OPTIONS], 9228[# Set options 9229m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9230 [_LT_SET_OPTION([$1], _LT_Option)]) 9231 9232m4_if([$1],[LT_INIT],[ 9233 dnl 9234 dnl Simply set some default values (i.e off) if boolean options were not 9235 dnl specified: 9236 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9237 ]) 9238 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9239 ]) 9240 dnl 9241 dnl If no reference was made to various pairs of opposing options, then 9242 dnl we run the default mode handler for the pair. For example, if neither 9243 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9244 dnl archives by default: 9245 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9246 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9247 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9248 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9249 [_LT_ENABLE_FAST_INSTALL]) 9250 ]) 9251])# _LT_SET_OPTIONS 9252 9253 9254 9255# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9256# ----------------------------------------- 9257m4_define([_LT_MANGLE_DEFUN], 9258[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9259 9260 9261# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9262# ----------------------------------------------- 9263m4_define([LT_OPTION_DEFINE], 9264[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9265])# LT_OPTION_DEFINE 9266 9267 9268# dlopen 9269# ------ 9270LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9271]) 9272 9273AU_DEFUN([AC_LIBTOOL_DLOPEN], 9274[_LT_SET_OPTION([LT_INIT], [dlopen]) 9275AC_DIAGNOSE([obsolete], 9276[$0: Remove this warning and the call to _LT_SET_OPTION when you 9277put the `dlopen' option into LT_INIT's first parameter.]) 9278]) 9279 9280dnl aclocal-1.4 backwards compatibility: 9281dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9282 9283 9284# win32-dll 9285# --------- 9286# Declare package support for building win32 dll's. 9287LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9288[enable_win32_dll=yes 9289 9290case $host in 9291*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9292 AC_CHECK_TOOL(AS, as, false) 9293 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9294 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9295 ;; 9296esac 9297 9298test -z "$AS" && AS=as 9299_LT_DECL([], [AS], [1], [Assembler program])dnl 9300 9301test -z "$DLLTOOL" && DLLTOOL=dlltool 9302_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9303 9304test -z "$OBJDUMP" && OBJDUMP=objdump 9305_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9306])# win32-dll 9307 9308AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9309[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9310_LT_SET_OPTION([LT_INIT], [win32-dll]) 9311AC_DIAGNOSE([obsolete], 9312[$0: Remove this warning and the call to _LT_SET_OPTION when you 9313put the `win32-dll' option into LT_INIT's first parameter.]) 9314]) 9315 9316dnl aclocal-1.4 backwards compatibility: 9317dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9318 9319 9320# _LT_ENABLE_SHARED([DEFAULT]) 9321# ---------------------------- 9322# implement the --enable-shared flag, and supports the `shared' and 9323# `disable-shared' LT_INIT options. 9324# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9325m4_define([_LT_ENABLE_SHARED], 9326[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9327AC_ARG_ENABLE([shared], 9328 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9329 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9330 [p=${PACKAGE-default} 9331 case $enableval in 9332 yes) enable_shared=yes ;; 9333 no) enable_shared=no ;; 9334 *) 9335 enable_shared=no 9336 # Look at the argument we got. We use all the common list separators. 9337 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9338 for pkg in $enableval; do 9339 IFS="$lt_save_ifs" 9340 if test "X$pkg" = "X$p"; then 9341 enable_shared=yes 9342 fi 9343 done 9344 IFS="$lt_save_ifs" 9345 ;; 9346 esac], 9347 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9348 9349 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9350 [Whether or not to build shared libraries]) 9351])# _LT_ENABLE_SHARED 9352 9353LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9354LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9355 9356# Old names: 9357AC_DEFUN([AC_ENABLE_SHARED], 9358[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9359]) 9360 9361AC_DEFUN([AC_DISABLE_SHARED], 9362[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9363]) 9364 9365AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9366AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9367 9368dnl aclocal-1.4 backwards compatibility: 9369dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9370dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9371 9372 9373 9374# _LT_ENABLE_STATIC([DEFAULT]) 9375# ---------------------------- 9376# implement the --enable-static flag, and support the `static' and 9377# `disable-static' LT_INIT options. 9378# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9379m4_define([_LT_ENABLE_STATIC], 9380[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9381AC_ARG_ENABLE([static], 9382 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9383 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9384 [p=${PACKAGE-default} 9385 case $enableval in 9386 yes) enable_static=yes ;; 9387 no) enable_static=no ;; 9388 *) 9389 enable_static=no 9390 # Look at the argument we got. We use all the common list separators. 9391 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9392 for pkg in $enableval; do 9393 IFS="$lt_save_ifs" 9394 if test "X$pkg" = "X$p"; then 9395 enable_static=yes 9396 fi 9397 done 9398 IFS="$lt_save_ifs" 9399 ;; 9400 esac], 9401 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9402 9403 _LT_DECL([build_old_libs], [enable_static], [0], 9404 [Whether or not to build static libraries]) 9405])# _LT_ENABLE_STATIC 9406 9407LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9408LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9409 9410# Old names: 9411AC_DEFUN([AC_ENABLE_STATIC], 9412[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9413]) 9414 9415AC_DEFUN([AC_DISABLE_STATIC], 9416[_LT_SET_OPTION([LT_INIT], [disable-static]) 9417]) 9418 9419AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9420AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9421 9422dnl aclocal-1.4 backwards compatibility: 9423dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9424dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9425 9426 9427 9428# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9429# ---------------------------------- 9430# implement the --enable-fast-install flag, and support the `fast-install' 9431# and `disable-fast-install' LT_INIT options. 9432# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9433m4_define([_LT_ENABLE_FAST_INSTALL], 9434[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9435AC_ARG_ENABLE([fast-install], 9436 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9437 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9438 [p=${PACKAGE-default} 9439 case $enableval in 9440 yes) enable_fast_install=yes ;; 9441 no) enable_fast_install=no ;; 9442 *) 9443 enable_fast_install=no 9444 # Look at the argument we got. We use all the common list separators. 9445 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9446 for pkg in $enableval; do 9447 IFS="$lt_save_ifs" 9448 if test "X$pkg" = "X$p"; then 9449 enable_fast_install=yes 9450 fi 9451 done 9452 IFS="$lt_save_ifs" 9453 ;; 9454 esac], 9455 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9456 9457_LT_DECL([fast_install], [enable_fast_install], [0], 9458 [Whether or not to optimize for fast installation])dnl 9459])# _LT_ENABLE_FAST_INSTALL 9460 9461LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9462LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9463 9464# Old names: 9465AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9466[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9467AC_DIAGNOSE([obsolete], 9468[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9469the `fast-install' option into LT_INIT's first parameter.]) 9470]) 9471 9472AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9473[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9474AC_DIAGNOSE([obsolete], 9475[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9476the `disable-fast-install' option into LT_INIT's first parameter.]) 9477]) 9478 9479dnl aclocal-1.4 backwards compatibility: 9480dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9481dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9482 9483 9484# _LT_WITH_PIC([MODE]) 9485# -------------------- 9486# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9487# LT_INIT options. 9488# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9489m4_define([_LT_WITH_PIC], 9490[AC_ARG_WITH([pic], 9491 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9492 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9493 [lt_p=${PACKAGE-default} 9494 case $withval in 9495 yes|no) pic_mode=$withval ;; 9496 *) 9497 pic_mode=default 9498 # Look at the argument we got. We use all the common list separators. 9499 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9500 for lt_pkg in $withval; do 9501 IFS="$lt_save_ifs" 9502 if test "X$lt_pkg" = "X$lt_p"; then 9503 pic_mode=yes 9504 fi 9505 done 9506 IFS="$lt_save_ifs" 9507 ;; 9508 esac], 9509 [pic_mode=default]) 9510 9511test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9512 9513_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9514])# _LT_WITH_PIC 9515 9516LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9517LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9518 9519# Old name: 9520AU_DEFUN([AC_LIBTOOL_PICMODE], 9521[_LT_SET_OPTION([LT_INIT], [pic-only]) 9522AC_DIAGNOSE([obsolete], 9523[$0: Remove this warning and the call to _LT_SET_OPTION when you 9524put the `pic-only' option into LT_INIT's first parameter.]) 9525]) 9526 9527dnl aclocal-1.4 backwards compatibility: 9528dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9529 9530 9531m4_define([_LTDL_MODE], []) 9532LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9533 [m4_define([_LTDL_MODE], [nonrecursive])]) 9534LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9535 [m4_define([_LTDL_MODE], [recursive])]) 9536LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9537 [m4_define([_LTDL_MODE], [subproject])]) 9538 9539m4_define([_LTDL_TYPE], []) 9540LT_OPTION_DEFINE([LTDL_INIT], [installable], 9541 [m4_define([_LTDL_TYPE], [installable])]) 9542LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9543 [m4_define([_LTDL_TYPE], [convenience])]) 9544 9545# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9546# 9547# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9548# Written by Gary V. Vaughan, 2004 9549# 9550# This file is free software; the Free Software Foundation gives 9551# unlimited permission to copy and/or distribute it, with or without 9552# modifications, as long as this notice is preserved. 9553 9554# serial 6 ltsugar.m4 9555 9556# This is to help aclocal find these macros, as it can't see m4_define. 9557AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9558 9559 9560# lt_join(SEP, ARG1, [ARG2...]) 9561# ----------------------------- 9562# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9563# associated separator. 9564# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9565# versions in m4sugar had bugs. 9566m4_define([lt_join], 9567[m4_if([$#], [1], [], 9568 [$#], [2], [[$2]], 9569 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9570m4_define([_lt_join], 9571[m4_if([$#$2], [2], [], 9572 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9573 9574 9575# lt_car(LIST) 9576# lt_cdr(LIST) 9577# ------------ 9578# Manipulate m4 lists. 9579# These macros are necessary as long as will still need to support 9580# Autoconf-2.59 which quotes differently. 9581m4_define([lt_car], [[$1]]) 9582m4_define([lt_cdr], 9583[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9584 [$#], 1, [], 9585 [m4_dquote(m4_shift($@))])]) 9586m4_define([lt_unquote], $1) 9587 9588 9589# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9590# ------------------------------------------ 9591# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9592# Note that neither SEPARATOR nor STRING are expanded; they are appended 9593# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9594# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9595# than defined and empty). 9596# 9597# This macro is needed until we can rely on Autoconf 2.62, since earlier 9598# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9599m4_define([lt_append], 9600[m4_define([$1], 9601 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9602 9603 9604 9605# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9606# ---------------------------------------------------------- 9607# Produce a SEP delimited list of all paired combinations of elements of 9608# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9609# has the form PREFIXmINFIXSUFFIXn. 9610# Needed until we can rely on m4_combine added in Autoconf 2.62. 9611m4_define([lt_combine], 9612[m4_if(m4_eval([$# > 3]), [1], 9613 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9614[[m4_foreach([_Lt_prefix], [$2], 9615 [m4_foreach([_Lt_suffix], 9616 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9617 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9618 9619 9620# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9621# ----------------------------------------------------------------------- 9622# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9623# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9624m4_define([lt_if_append_uniq], 9625[m4_ifdef([$1], 9626 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9627 [lt_append([$1], [$2], [$3])$4], 9628 [$5])], 9629 [lt_append([$1], [$2], [$3])$4])]) 9630 9631 9632# lt_dict_add(DICT, KEY, VALUE) 9633# ----------------------------- 9634m4_define([lt_dict_add], 9635[m4_define([$1($2)], [$3])]) 9636 9637 9638# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9639# -------------------------------------------- 9640m4_define([lt_dict_add_subkey], 9641[m4_define([$1($2:$3)], [$4])]) 9642 9643 9644# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9645# ---------------------------------- 9646m4_define([lt_dict_fetch], 9647[m4_ifval([$3], 9648 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9649 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9650 9651 9652# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9653# ----------------------------------------------------------------- 9654m4_define([lt_if_dict_fetch], 9655[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9656 [$5], 9657 [$6])]) 9658 9659 9660# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9661# -------------------------------------------------------------- 9662m4_define([lt_dict_filter], 9663[m4_if([$5], [], [], 9664 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9665 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9666 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9667]) 9668 9669# ltversion.m4 -- version numbers -*- Autoconf -*- 9670# 9671# Copyright (C) 2004 Free Software Foundation, Inc. 9672# Written by Scott James Remnant, 2004 9673# 9674# This file is free software; the Free Software Foundation gives 9675# unlimited permission to copy and/or distribute it, with or without 9676# modifications, as long as this notice is preserved. 9677 9678# @configure_input@ 9679 9680# serial 3337 ltversion.m4 9681# This file is part of GNU Libtool 9682 9683m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9684m4_define([LT_PACKAGE_REVISION], [1.3337]) 9685 9686AC_DEFUN([LTVERSION_VERSION], 9687[macro_version='2.4.2' 9688macro_revision='1.3337' 9689_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9690_LT_DECL(, macro_revision, 0) 9691]) 9692 9693# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9694# 9695# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9696# Written by Scott James Remnant, 2004. 9697# 9698# This file is free software; the Free Software Foundation gives 9699# unlimited permission to copy and/or distribute it, with or without 9700# modifications, as long as this notice is preserved. 9701 9702# serial 5 lt~obsolete.m4 9703 9704# These exist entirely to fool aclocal when bootstrapping libtool. 9705# 9706# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9707# which have later been changed to m4_define as they aren't part of the 9708# exported API, or moved to Autoconf or Automake where they belong. 9709# 9710# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9711# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9712# using a macro with the same name in our local m4/libtool.m4 it'll 9713# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9714# and doesn't know about Autoconf macros at all.) 9715# 9716# So we provide this file, which has a silly filename so it's always 9717# included after everything else. This provides aclocal with the 9718# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9719# because those macros already exist, or will be overwritten later. 9720# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9721# 9722# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9723# Yes, that means every name once taken will need to remain here until 9724# we give up compatibility with versions before 1.7, at which point 9725# we need to keep only those names which we still refer to. 9726 9727# This is to help aclocal find these macros, as it can't see m4_define. 9728AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9729 9730m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9731m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9732m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9733m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9734m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9735m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9736m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9737m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9738m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9739m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9740m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9741m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9742m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9743m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9744m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9745m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9746m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9747m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9748m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9749m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9750m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9751m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9752m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9753m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9754m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9755m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9756m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9757m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9758m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9759m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9760m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9761m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9762m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9763m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9764m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9765m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9766m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9767m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9768m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9769m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9770m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9771m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9772m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9773m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9774m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9775m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9776m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9777m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9778m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9779m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9780m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9781m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9782m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9783m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9784m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9785m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9786m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9787m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9788m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9789m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9790m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9791 9792# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9793# serial 1 (pkg-config-0.24) 9794# 9795# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9796# 9797# This program is free software; you can redistribute it and/or modify 9798# it under the terms of the GNU General Public License as published by 9799# the Free Software Foundation; either version 2 of the License, or 9800# (at your option) any later version. 9801# 9802# This program is distributed in the hope that it will be useful, but 9803# WITHOUT ANY WARRANTY; without even the implied warranty of 9804# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9805# General Public License for more details. 9806# 9807# You should have received a copy of the GNU General Public License 9808# along with this program; if not, write to the Free Software 9809# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9810# 9811# As a special exception to the GNU General Public License, if you 9812# distribute this file as part of a program that contains a 9813# configuration script generated by Autoconf, you may include it under 9814# the same distribution terms that you use for the rest of that program. 9815 9816# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9817# ---------------------------------- 9818AC_DEFUN([PKG_PROG_PKG_CONFIG], 9819[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9820m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9821m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9822AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9823AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9824AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9825 9826if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9827 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9828fi 9829if test -n "$PKG_CONFIG"; then 9830 _pkg_min_version=m4_default([$1], [0.9.0]) 9831 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9832 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9833 AC_MSG_RESULT([yes]) 9834 else 9835 AC_MSG_RESULT([no]) 9836 PKG_CONFIG="" 9837 fi 9838fi[]dnl 9839])# PKG_PROG_PKG_CONFIG 9840 9841# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9842# 9843# Check to see whether a particular set of modules exists. Similar 9844# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9845# 9846# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9847# only at the first occurence in configure.ac, so if the first place 9848# it's called might be skipped (such as if it is within an "if", you 9849# have to call PKG_CHECK_EXISTS manually 9850# -------------------------------------------------------------- 9851AC_DEFUN([PKG_CHECK_EXISTS], 9852[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9853if test -n "$PKG_CONFIG" && \ 9854 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9855 m4_default([$2], [:]) 9856m4_ifvaln([$3], [else 9857 $3])dnl 9858fi]) 9859 9860# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9861# --------------------------------------------- 9862m4_define([_PKG_CONFIG], 9863[if test -n "$$1"; then 9864 pkg_cv_[]$1="$$1" 9865 elif test -n "$PKG_CONFIG"; then 9866 PKG_CHECK_EXISTS([$3], 9867 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9868 test "x$?" != "x0" && pkg_failed=yes ], 9869 [pkg_failed=yes]) 9870 else 9871 pkg_failed=untried 9872fi[]dnl 9873])# _PKG_CONFIG 9874 9875# _PKG_SHORT_ERRORS_SUPPORTED 9876# ----------------------------- 9877AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9878[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9879if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9880 _pkg_short_errors_supported=yes 9881else 9882 _pkg_short_errors_supported=no 9883fi[]dnl 9884])# _PKG_SHORT_ERRORS_SUPPORTED 9885 9886 9887# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9888# [ACTION-IF-NOT-FOUND]) 9889# 9890# 9891# Note that if there is a possibility the first call to 9892# PKG_CHECK_MODULES might not happen, you should be sure to include an 9893# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9894# 9895# 9896# -------------------------------------------------------------- 9897AC_DEFUN([PKG_CHECK_MODULES], 9898[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9899AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9900AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9901 9902pkg_failed=no 9903AC_MSG_CHECKING([for $1]) 9904 9905_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9906_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9907 9908m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9909and $1[]_LIBS to avoid the need to call pkg-config. 9910See the pkg-config man page for more details.]) 9911 9912if test $pkg_failed = yes; then 9913 AC_MSG_RESULT([no]) 9914 _PKG_SHORT_ERRORS_SUPPORTED 9915 if test $_pkg_short_errors_supported = yes; then 9916 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9917 else 9918 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9919 fi 9920 # Put the nasty error message in config.log where it belongs 9921 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9922 9923 m4_default([$4], [AC_MSG_ERROR( 9924[Package requirements ($2) were not met: 9925 9926$$1_PKG_ERRORS 9927 9928Consider adjusting the PKG_CONFIG_PATH environment variable if you 9929installed software in a non-standard prefix. 9930 9931_PKG_TEXT])[]dnl 9932 ]) 9933elif test $pkg_failed = untried; then 9934 AC_MSG_RESULT([no]) 9935 m4_default([$4], [AC_MSG_FAILURE( 9936[The pkg-config script could not be found or is too old. Make sure it 9937is in your PATH or set the PKG_CONFIG environment variable to the full 9938path to pkg-config. 9939 9940_PKG_TEXT 9941 9942To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9943 ]) 9944else 9945 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9946 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9947 AC_MSG_RESULT([yes]) 9948 $3 9949fi[]dnl 9950])# PKG_CHECK_MODULES 9951 9952dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9953dnl 9954dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9955dnl 9956dnl Permission is hereby granted, free of charge, to any person obtaining a 9957dnl copy of this software and associated documentation files (the "Software"), 9958dnl to deal in the Software without restriction, including without limitation 9959dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9960dnl and/or sell copies of the Software, and to permit persons to whom the 9961dnl Software is furnished to do so, subject to the following conditions: 9962dnl 9963dnl The above copyright notice and this permission notice (including the next 9964dnl paragraph) shall be included in all copies or substantial portions of the 9965dnl Software. 9966dnl 9967dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9968dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9969dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9970dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9971dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9972dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9973dnl DEALINGS IN THE SOFTWARE. 9974 9975# XORG_MACROS_VERSION(required-version) 9976# ------------------------------------- 9977# Minimum version: 1.1.0 9978# 9979# If you're using a macro added in Version 1.1 or newer, include this in 9980# your configure.ac with the minimum required version, such as: 9981# XORG_MACROS_VERSION(1.1) 9982# 9983# To ensure that this macro is defined, also add: 9984# m4_ifndef([XORG_MACROS_VERSION], 9985# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9986# 9987# 9988# See the "minimum version" comment for each macro you use to see what 9989# version you require. 9990m4_defun([XORG_MACROS_VERSION],[ 9991m4_define([vers_have], [1.19.0]) 9992m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9993m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9994m4_if(m4_cmp(maj_have, maj_needed), 0,, 9995 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9996m4_if(m4_version_compare(vers_have, [$1]), -1, 9997 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9998m4_undefine([vers_have]) 9999m4_undefine([maj_have]) 10000m4_undefine([maj_needed]) 10001]) # XORG_MACROS_VERSION 10002 10003# XORG_PROG_RAWCPP() 10004# ------------------ 10005# Minimum version: 1.0.0 10006# 10007# Find cpp program and necessary flags for use in pre-processing text files 10008# such as man pages and config files 10009AC_DEFUN([XORG_PROG_RAWCPP],[ 10010AC_REQUIRE([AC_PROG_CPP]) 10011AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10012 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10013 10014# Check for flag to avoid builtin definitions - assumes unix is predefined, 10015# which is not the best choice for supporting other OS'es, but covers most 10016# of the ones we need for now. 10017AC_MSG_CHECKING([if $RAWCPP requires -undef]) 10018AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 10019if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10020 AC_MSG_RESULT([no]) 10021else 10022 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10023 RAWCPPFLAGS=-undef 10024 AC_MSG_RESULT([yes]) 10025 # under Cygwin unix is still defined even with -undef 10026 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10027 RAWCPPFLAGS="-undef -ansi" 10028 AC_MSG_RESULT([yes, with -ansi]) 10029 else 10030 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 10031 fi 10032fi 10033rm -f conftest.$ac_ext 10034 10035AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 10036AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 10037if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10038 AC_MSG_RESULT([no]) 10039else 10040 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10041 TRADITIONALCPPFLAGS="-traditional" 10042 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 10043 AC_MSG_RESULT([yes]) 10044 else 10045 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 10046 fi 10047fi 10048rm -f conftest.$ac_ext 10049AC_SUBST(RAWCPPFLAGS) 10050AC_SUBST(TRADITIONALCPPFLAGS) 10051]) # XORG_PROG_RAWCPP 10052 10053# XORG_MANPAGE_SECTIONS() 10054# ----------------------- 10055# Minimum version: 1.0.0 10056# 10057# Determine which sections man pages go in for the different man page types 10058# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10059# Not sure if there's any better way than just hardcoding by OS name. 10060# Override default settings by setting environment variables 10061# Added MAN_SUBSTS in version 1.8 10062# Added AC_PROG_SED in version 1.8 10063 10064AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10065AC_REQUIRE([AC_CANONICAL_HOST]) 10066AC_REQUIRE([AC_PROG_SED]) 10067 10068if test x$APP_MAN_SUFFIX = x ; then 10069 APP_MAN_SUFFIX=1 10070fi 10071if test x$APP_MAN_DIR = x ; then 10072 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10073fi 10074 10075if test x$LIB_MAN_SUFFIX = x ; then 10076 LIB_MAN_SUFFIX=3 10077fi 10078if test x$LIB_MAN_DIR = x ; then 10079 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10080fi 10081 10082if test x$FILE_MAN_SUFFIX = x ; then 10083 case $host_os in 10084 solaris*) FILE_MAN_SUFFIX=4 ;; 10085 *) FILE_MAN_SUFFIX=5 ;; 10086 esac 10087fi 10088if test x$FILE_MAN_DIR = x ; then 10089 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10090fi 10091 10092if test x$MISC_MAN_SUFFIX = x ; then 10093 case $host_os in 10094 solaris*) MISC_MAN_SUFFIX=5 ;; 10095 *) MISC_MAN_SUFFIX=7 ;; 10096 esac 10097fi 10098if test x$MISC_MAN_DIR = x ; then 10099 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10100fi 10101 10102if test x$DRIVER_MAN_SUFFIX = x ; then 10103 case $host_os in 10104 solaris*) DRIVER_MAN_SUFFIX=7 ;; 10105 *) DRIVER_MAN_SUFFIX=4 ;; 10106 esac 10107fi 10108if test x$DRIVER_MAN_DIR = x ; then 10109 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10110fi 10111 10112if test x$ADMIN_MAN_SUFFIX = x ; then 10113 case $host_os in 10114 solaris*) ADMIN_MAN_SUFFIX=1m ;; 10115 *) ADMIN_MAN_SUFFIX=8 ;; 10116 esac 10117fi 10118if test x$ADMIN_MAN_DIR = x ; then 10119 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10120fi 10121 10122 10123AC_SUBST([APP_MAN_SUFFIX]) 10124AC_SUBST([LIB_MAN_SUFFIX]) 10125AC_SUBST([FILE_MAN_SUFFIX]) 10126AC_SUBST([MISC_MAN_SUFFIX]) 10127AC_SUBST([DRIVER_MAN_SUFFIX]) 10128AC_SUBST([ADMIN_MAN_SUFFIX]) 10129AC_SUBST([APP_MAN_DIR]) 10130AC_SUBST([LIB_MAN_DIR]) 10131AC_SUBST([FILE_MAN_DIR]) 10132AC_SUBST([MISC_MAN_DIR]) 10133AC_SUBST([DRIVER_MAN_DIR]) 10134AC_SUBST([ADMIN_MAN_DIR]) 10135 10136XORG_MAN_PAGE="X Version 11" 10137AC_SUBST([XORG_MAN_PAGE]) 10138MAN_SUBSTS="\ 10139 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10140 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10141 -e 's|__xservername__|Xorg|g' \ 10142 -e 's|__xconfigfile__|xorg.conf|g' \ 10143 -e 's|__projectroot__|\$(prefix)|g' \ 10144 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10145 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10146 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10147 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10148 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10149 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10150 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10151AC_SUBST([MAN_SUBSTS]) 10152 10153]) # XORG_MANPAGE_SECTIONS 10154 10155# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10156# ------------------------ 10157# Minimum version: 1.7.0 10158# 10159# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10160# provided by xorg-sgml-doctools, if installed. 10161AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10162AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10163XORG_SGML_PATH= 10164PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10165 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10166 [m4_ifval([$1],[:], 10167 [if test x"$cross_compiling" != x"yes" ; then 10168 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10169 [XORG_SGML_PATH=$prefix/share/sgml]) 10170 fi]) 10171 ]) 10172 10173# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10174# the path and the name of the doc stylesheet 10175if test "x$XORG_SGML_PATH" != "x" ; then 10176 AC_MSG_RESULT([$XORG_SGML_PATH]) 10177 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10178 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10179else 10180 AC_MSG_RESULT([no]) 10181fi 10182 10183AC_SUBST(XORG_SGML_PATH) 10184AC_SUBST(STYLESHEET_SRCDIR) 10185AC_SUBST(XSL_STYLESHEET) 10186AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10187]) # XORG_CHECK_SGML_DOCTOOLS 10188 10189# XORG_CHECK_LINUXDOC 10190# ------------------- 10191# Minimum version: 1.0.0 10192# 10193# Defines the variable MAKE_TEXT if the necessary tools and 10194# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10195# Whether or not the necessary tools and files are found can be checked 10196# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10197AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10198AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10199AC_REQUIRE([XORG_WITH_PS2PDF]) 10200 10201AC_PATH_PROG(LINUXDOC, linuxdoc) 10202 10203AC_MSG_CHECKING([whether to build documentation]) 10204 10205if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10206 BUILDDOC=yes 10207else 10208 BUILDDOC=no 10209fi 10210 10211AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10212 10213AC_MSG_RESULT([$BUILDDOC]) 10214 10215AC_MSG_CHECKING([whether to build pdf documentation]) 10216 10217if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10218 BUILDPDFDOC=yes 10219else 10220 BUILDPDFDOC=no 10221fi 10222 10223AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10224 10225AC_MSG_RESULT([$BUILDPDFDOC]) 10226 10227MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10228MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10229MAKE_PDF="$PS2PDF" 10230MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10231 10232AC_SUBST(MAKE_TEXT) 10233AC_SUBST(MAKE_PS) 10234AC_SUBST(MAKE_PDF) 10235AC_SUBST(MAKE_HTML) 10236]) # XORG_CHECK_LINUXDOC 10237 10238# XORG_CHECK_DOCBOOK 10239# ------------------- 10240# Minimum version: 1.0.0 10241# 10242# Checks for the ability to build output formats from SGML DocBook source. 10243# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10244# indicates whether the necessary tools and files are found and, if set, 10245# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10246AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10247AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10248 10249BUILDTXTDOC=no 10250BUILDPDFDOC=no 10251BUILDPSDOC=no 10252BUILDHTMLDOC=no 10253 10254AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10255AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10256AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10257AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10258 10259AC_MSG_CHECKING([whether to build text documentation]) 10260if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10261 test x$BUILD_TXTDOC != xno; then 10262 BUILDTXTDOC=yes 10263fi 10264AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10265AC_MSG_RESULT([$BUILDTXTDOC]) 10266 10267AC_MSG_CHECKING([whether to build PDF documentation]) 10268if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10269 test x$BUILD_PDFDOC != xno; then 10270 BUILDPDFDOC=yes 10271fi 10272AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10273AC_MSG_RESULT([$BUILDPDFDOC]) 10274 10275AC_MSG_CHECKING([whether to build PostScript documentation]) 10276if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10277 test x$BUILD_PSDOC != xno; then 10278 BUILDPSDOC=yes 10279fi 10280AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10281AC_MSG_RESULT([$BUILDPSDOC]) 10282 10283AC_MSG_CHECKING([whether to build HTML documentation]) 10284if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10285 test x$BUILD_HTMLDOC != xno; then 10286 BUILDHTMLDOC=yes 10287fi 10288AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10289AC_MSG_RESULT([$BUILDHTMLDOC]) 10290 10291MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10292MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10293MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10294MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10295 10296AC_SUBST(MAKE_TEXT) 10297AC_SUBST(MAKE_PS) 10298AC_SUBST(MAKE_PDF) 10299AC_SUBST(MAKE_HTML) 10300]) # XORG_CHECK_DOCBOOK 10301 10302# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10303# ---------------- 10304# Minimum version: 1.5.0 10305# Minimum version for optional DEFAULT argument: 1.11.0 10306# 10307# Documentation tools are not always available on all platforms and sometimes 10308# not at the appropriate level. This macro enables a module to test for the 10309# presence of the tool and obtain it's path in separate variables. Coupled with 10310# the --with-xmlto option, it allows maximum flexibilty in making decisions 10311# as whether or not to use the xmlto package. When DEFAULT is not specified, 10312# --with-xmlto assumes 'auto'. 10313# 10314# Interface to module: 10315# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10316# XMLTO: returns the path of the xmlto program found 10317# returns the path set by the user in the environment 10318# --with-xmlto: 'yes' user instructs the module to use xmlto 10319# 'no' user instructs the module not to use xmlto 10320# 10321# Added in version 1.10.0 10322# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10323# xmlto for text output requires either lynx, links, or w3m browsers 10324# 10325# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10326# 10327AC_DEFUN([XORG_WITH_XMLTO],[ 10328AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10329m4_define([_defopt], m4_default([$2], [auto])) 10330AC_ARG_WITH(xmlto, 10331 AS_HELP_STRING([--with-xmlto], 10332 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10333 [use_xmlto=$withval], [use_xmlto=]_defopt) 10334m4_undefine([_defopt]) 10335 10336if test "x$use_xmlto" = x"auto"; then 10337 AC_PATH_PROG([XMLTO], [xmlto]) 10338 if test "x$XMLTO" = "x"; then 10339 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10340 have_xmlto=no 10341 else 10342 have_xmlto=yes 10343 fi 10344elif test "x$use_xmlto" = x"yes" ; then 10345 AC_PATH_PROG([XMLTO], [xmlto]) 10346 if test "x$XMLTO" = "x"; then 10347 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10348 fi 10349 have_xmlto=yes 10350elif test "x$use_xmlto" = x"no" ; then 10351 if test "x$XMLTO" != "x"; then 10352 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10353 fi 10354 have_xmlto=no 10355else 10356 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10357fi 10358 10359# Test for a minimum version of xmlto, if provided. 10360m4_ifval([$1], 10361[if test "$have_xmlto" = yes; then 10362 # scrape the xmlto version 10363 AC_MSG_CHECKING([the xmlto version]) 10364 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10365 AC_MSG_RESULT([$xmlto_version]) 10366 AS_VERSION_COMPARE([$xmlto_version], [$1], 10367 [if test "x$use_xmlto" = xauto; then 10368 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10369 have_xmlto=no 10370 else 10371 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10372 fi]) 10373fi]) 10374 10375# Test for the ability of xmlto to generate a text target 10376have_xmlto_text=no 10377cat > conftest.xml << "EOF" 10378EOF 10379AS_IF([test "$have_xmlto" = yes], 10380 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10381 [have_xmlto_text=yes], 10382 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10383rm -f conftest.xml 10384AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10385AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10386]) # XORG_WITH_XMLTO 10387 10388# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10389# -------------------------------------------- 10390# Minimum version: 1.12.0 10391# Minimum version for optional DEFAULT argument: 1.12.0 10392# 10393# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10394# XML-based language used for the transformation of XML documents. 10395# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10396# It is used under the cover by xmlto to generate html files from DocBook/XML. 10397# The XSLT processor is often used as a standalone tool for transformations. 10398# It should not be assumed that this tool is used only to work with documnetation. 10399# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10400# 10401# Interface to module: 10402# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10403# XSLTPROC: returns the path of the xsltproc program found 10404# returns the path set by the user in the environment 10405# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10406# 'no' user instructs the module not to use xsltproc 10407# have_xsltproc: returns yes if xsltproc found in PATH or no 10408# 10409# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10410# 10411AC_DEFUN([XORG_WITH_XSLTPROC],[ 10412AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10413# Preserves the interface, should it be implemented later 10414m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10415m4_define([_defopt], m4_default([$2], [auto])) 10416AC_ARG_WITH(xsltproc, 10417 AS_HELP_STRING([--with-xsltproc], 10418 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10419 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10420m4_undefine([_defopt]) 10421 10422if test "x$use_xsltproc" = x"auto"; then 10423 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10424 if test "x$XSLTPROC" = "x"; then 10425 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10426 have_xsltproc=no 10427 else 10428 have_xsltproc=yes 10429 fi 10430elif test "x$use_xsltproc" = x"yes" ; then 10431 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10432 if test "x$XSLTPROC" = "x"; then 10433 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10434 fi 10435 have_xsltproc=yes 10436elif test "x$use_xsltproc" = x"no" ; then 10437 if test "x$XSLTPROC" != "x"; then 10438 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10439 fi 10440 have_xsltproc=no 10441else 10442 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10443fi 10444 10445AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10446]) # XORG_WITH_XSLTPROC 10447 10448# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10449# ---------------------------------------- 10450# Minimum version: 1.15.0 10451# 10452# PERL (Practical Extraction and Report Language) is a language optimized for 10453# scanning arbitrary text files, extracting information from those text files, 10454# and printing reports based on that information. 10455# 10456# When DEFAULT is not specified, --with-perl assumes 'auto'. 10457# 10458# Interface to module: 10459# HAVE_PERL: used in makefiles to conditionally scan text files 10460# PERL: returns the path of the perl program found 10461# returns the path set by the user in the environment 10462# --with-perl: 'yes' user instructs the module to use perl 10463# 'no' user instructs the module not to use perl 10464# have_perl: returns yes if perl found in PATH or no 10465# 10466# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10467# 10468AC_DEFUN([XORG_WITH_PERL],[ 10469AC_ARG_VAR([PERL], [Path to perl command]) 10470# Preserves the interface, should it be implemented later 10471m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10472m4_define([_defopt], m4_default([$2], [auto])) 10473AC_ARG_WITH(perl, 10474 AS_HELP_STRING([--with-perl], 10475 [Use perl for extracting information from files (default: ]_defopt[)]), 10476 [use_perl=$withval], [use_perl=]_defopt) 10477m4_undefine([_defopt]) 10478 10479if test "x$use_perl" = x"auto"; then 10480 AC_PATH_PROG([PERL], [perl]) 10481 if test "x$PERL" = "x"; then 10482 AC_MSG_WARN([perl not found - cannot extract information and report]) 10483 have_perl=no 10484 else 10485 have_perl=yes 10486 fi 10487elif test "x$use_perl" = x"yes" ; then 10488 AC_PATH_PROG([PERL], [perl]) 10489 if test "x$PERL" = "x"; then 10490 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10491 fi 10492 have_perl=yes 10493elif test "x$use_perl" = x"no" ; then 10494 if test "x$PERL" != "x"; then 10495 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10496 fi 10497 have_perl=no 10498else 10499 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10500fi 10501 10502AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10503]) # XORG_WITH_PERL 10504 10505# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10506# ---------------- 10507# Minimum version: 1.5.0 10508# Minimum version for optional DEFAULT argument: 1.11.0 10509# 10510# Documentation tools are not always available on all platforms and sometimes 10511# not at the appropriate level. This macro enables a module to test for the 10512# presence of the tool and obtain it's path in separate variables. Coupled with 10513# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10514# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10515# --with-asciidoc assumes 'auto'. 10516# 10517# Interface to module: 10518# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10519# ASCIIDOC: returns the path of the asciidoc program found 10520# returns the path set by the user in the environment 10521# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10522# 'no' user instructs the module not to use asciidoc 10523# 10524# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10525# 10526AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10527AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10528m4_define([_defopt], m4_default([$2], [auto])) 10529AC_ARG_WITH(asciidoc, 10530 AS_HELP_STRING([--with-asciidoc], 10531 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10532 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10533m4_undefine([_defopt]) 10534 10535if test "x$use_asciidoc" = x"auto"; then 10536 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10537 if test "x$ASCIIDOC" = "x"; then 10538 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10539 have_asciidoc=no 10540 else 10541 have_asciidoc=yes 10542 fi 10543elif test "x$use_asciidoc" = x"yes" ; then 10544 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10545 if test "x$ASCIIDOC" = "x"; then 10546 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10547 fi 10548 have_asciidoc=yes 10549elif test "x$use_asciidoc" = x"no" ; then 10550 if test "x$ASCIIDOC" != "x"; then 10551 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10552 fi 10553 have_asciidoc=no 10554else 10555 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10556fi 10557m4_ifval([$1], 10558[if test "$have_asciidoc" = yes; then 10559 # scrape the asciidoc version 10560 AC_MSG_CHECKING([the asciidoc version]) 10561 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10562 AC_MSG_RESULT([$asciidoc_version]) 10563 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10564 [if test "x$use_asciidoc" = xauto; then 10565 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10566 have_asciidoc=no 10567 else 10568 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10569 fi]) 10570fi]) 10571AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10572]) # XORG_WITH_ASCIIDOC 10573 10574# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10575# ------------------------------------------- 10576# Minimum version: 1.5.0 10577# Minimum version for optional DEFAULT argument: 1.11.0 10578# Minimum version for optional DOT checking: 1.18.0 10579# 10580# Documentation tools are not always available on all platforms and sometimes 10581# not at the appropriate level. This macro enables a module to test for the 10582# presence of the tool and obtain it's path in separate variables. Coupled with 10583# the --with-doxygen option, it allows maximum flexibilty in making decisions 10584# as whether or not to use the doxygen package. When DEFAULT is not specified, 10585# --with-doxygen assumes 'auto'. 10586# 10587# Interface to module: 10588# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10589# DOXYGEN: returns the path of the doxygen program found 10590# returns the path set by the user in the environment 10591# --with-doxygen: 'yes' user instructs the module to use doxygen 10592# 'no' user instructs the module not to use doxygen 10593# 10594# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10595# 10596AC_DEFUN([XORG_WITH_DOXYGEN],[ 10597AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10598AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10599m4_define([_defopt], m4_default([$2], [auto])) 10600AC_ARG_WITH(doxygen, 10601 AS_HELP_STRING([--with-doxygen], 10602 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10603 [use_doxygen=$withval], [use_doxygen=]_defopt) 10604m4_undefine([_defopt]) 10605 10606if test "x$use_doxygen" = x"auto"; then 10607 AC_PATH_PROG([DOXYGEN], [doxygen]) 10608 if test "x$DOXYGEN" = "x"; then 10609 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10610 have_doxygen=no 10611 else 10612 have_doxygen=yes 10613 fi 10614elif test "x$use_doxygen" = x"yes" ; then 10615 AC_PATH_PROG([DOXYGEN], [doxygen]) 10616 if test "x$DOXYGEN" = "x"; then 10617 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10618 fi 10619 have_doxygen=yes 10620elif test "x$use_doxygen" = x"no" ; then 10621 if test "x$DOXYGEN" != "x"; then 10622 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10623 fi 10624 have_doxygen=no 10625else 10626 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10627fi 10628m4_ifval([$1], 10629[if test "$have_doxygen" = yes; then 10630 # scrape the doxygen version 10631 AC_MSG_CHECKING([the doxygen version]) 10632 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10633 AC_MSG_RESULT([$doxygen_version]) 10634 AS_VERSION_COMPARE([$doxygen_version], [$1], 10635 [if test "x$use_doxygen" = xauto; then 10636 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10637 have_doxygen=no 10638 else 10639 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10640 fi]) 10641fi]) 10642 10643dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10644dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10645dnl HAVE_DOT = @HAVE_DOT@ 10646HAVE_DOT=no 10647if test "x$have_doxygen" = "xyes"; then 10648 AC_PATH_PROG([DOT], [dot]) 10649 if test "x$DOT" != "x"; then 10650 HAVE_DOT=yes 10651 fi 10652fi 10653 10654AC_SUBST([HAVE_DOT]) 10655AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10656AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10657]) # XORG_WITH_DOXYGEN 10658 10659# XORG_WITH_GROFF([DEFAULT]) 10660# ---------------- 10661# Minimum version: 1.6.0 10662# Minimum version for optional DEFAULT argument: 1.11.0 10663# 10664# Documentation tools are not always available on all platforms and sometimes 10665# not at the appropriate level. This macro enables a module to test for the 10666# presence of the tool and obtain it's path in separate variables. Coupled with 10667# the --with-groff option, it allows maximum flexibilty in making decisions 10668# as whether or not to use the groff package. When DEFAULT is not specified, 10669# --with-groff assumes 'auto'. 10670# 10671# Interface to module: 10672# HAVE_GROFF: used in makefiles to conditionally generate documentation 10673# HAVE_GROFF_MM: the memorandum macros (-mm) package 10674# HAVE_GROFF_MS: the -ms macros package 10675# GROFF: returns the path of the groff program found 10676# returns the path set by the user in the environment 10677# --with-groff: 'yes' user instructs the module to use groff 10678# 'no' user instructs the module not to use groff 10679# 10680# Added in version 1.9.0: 10681# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10682# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10683# psselect from the psutils package. 10684# the ghostcript package. Refer to the grohtml man pages 10685# 10686# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10687# 10688# OS and distros often splits groff in a basic and full package, the former 10689# having the groff program and the later having devices, fonts and macros 10690# Checking for the groff executable is not enough. 10691# 10692# If macros are missing, we cannot assume that groff is useless, so we don't 10693# unset HAVE_GROFF or GROFF env variables. 10694# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10695# 10696AC_DEFUN([XORG_WITH_GROFF],[ 10697AC_ARG_VAR([GROFF], [Path to groff command]) 10698m4_define([_defopt], m4_default([$1], [auto])) 10699AC_ARG_WITH(groff, 10700 AS_HELP_STRING([--with-groff], 10701 [Use groff to regenerate documentation (default: ]_defopt[)]), 10702 [use_groff=$withval], [use_groff=]_defopt) 10703m4_undefine([_defopt]) 10704 10705if test "x$use_groff" = x"auto"; then 10706 AC_PATH_PROG([GROFF], [groff]) 10707 if test "x$GROFF" = "x"; then 10708 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10709 have_groff=no 10710 else 10711 have_groff=yes 10712 fi 10713elif test "x$use_groff" = x"yes" ; then 10714 AC_PATH_PROG([GROFF], [groff]) 10715 if test "x$GROFF" = "x"; then 10716 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10717 fi 10718 have_groff=yes 10719elif test "x$use_groff" = x"no" ; then 10720 if test "x$GROFF" != "x"; then 10721 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10722 fi 10723 have_groff=no 10724else 10725 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10726fi 10727 10728# We have groff, test for the presence of the macro packages 10729if test "x$have_groff" = x"yes"; then 10730 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10731 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10732 groff_ms_works=yes 10733 else 10734 groff_ms_works=no 10735 fi 10736 AC_MSG_RESULT([$groff_ms_works]) 10737 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10738 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10739 groff_mm_works=yes 10740 else 10741 groff_mm_works=no 10742 fi 10743 AC_MSG_RESULT([$groff_mm_works]) 10744fi 10745 10746# We have groff, test for HTML dependencies, one command per package 10747if test "x$have_groff" = x"yes"; then 10748 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10749 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10750 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10751 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10752 have_groff_html=yes 10753 else 10754 have_groff_html=no 10755 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10756 fi 10757fi 10758 10759# Set Automake conditionals for Makefiles 10760AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10761AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10762AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10763AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10764]) # XORG_WITH_GROFF 10765 10766# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10767# --------------------------------------- 10768# Minimum version: 1.6.0 10769# Minimum version for optional DEFAULT argument: 1.11.0 10770# Minimum version for optional MIN-VERSION argument: 1.15.0 10771# 10772# Documentation tools are not always available on all platforms and sometimes 10773# not at the appropriate level. This macro enables a module to test for the 10774# presence of the tool and obtain it's path in separate variables. Coupled with 10775# the --with-fop option, it allows maximum flexibilty in making decisions 10776# as whether or not to use the fop package. When DEFAULT is not specified, 10777# --with-fop assumes 'auto'. 10778# 10779# Interface to module: 10780# HAVE_FOP: used in makefiles to conditionally generate documentation 10781# FOP: returns the path of the fop program found 10782# returns the path set by the user in the environment 10783# --with-fop: 'yes' user instructs the module to use fop 10784# 'no' user instructs the module not to use fop 10785# 10786# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10787# 10788AC_DEFUN([XORG_WITH_FOP],[ 10789AC_ARG_VAR([FOP], [Path to fop command]) 10790m4_define([_defopt], m4_default([$2], [auto])) 10791AC_ARG_WITH(fop, 10792 AS_HELP_STRING([--with-fop], 10793 [Use fop to regenerate documentation (default: ]_defopt[)]), 10794 [use_fop=$withval], [use_fop=]_defopt) 10795m4_undefine([_defopt]) 10796 10797if test "x$use_fop" = x"auto"; then 10798 AC_PATH_PROG([FOP], [fop]) 10799 if test "x$FOP" = "x"; then 10800 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10801 have_fop=no 10802 else 10803 have_fop=yes 10804 fi 10805elif test "x$use_fop" = x"yes" ; then 10806 AC_PATH_PROG([FOP], [fop]) 10807 if test "x$FOP" = "x"; then 10808 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10809 fi 10810 have_fop=yes 10811elif test "x$use_fop" = x"no" ; then 10812 if test "x$FOP" != "x"; then 10813 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10814 fi 10815 have_fop=no 10816else 10817 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10818fi 10819 10820# Test for a minimum version of fop, if provided. 10821m4_ifval([$1], 10822[if test "$have_fop" = yes; then 10823 # scrape the fop version 10824 AC_MSG_CHECKING([for fop minimum version]) 10825 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10826 AC_MSG_RESULT([$fop_version]) 10827 AS_VERSION_COMPARE([$fop_version], [$1], 10828 [if test "x$use_fop" = xauto; then 10829 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10830 have_fop=no 10831 else 10832 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10833 fi]) 10834fi]) 10835AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10836]) # XORG_WITH_FOP 10837 10838# XORG_WITH_M4([MIN-VERSION]) 10839# --------------------------- 10840# Minimum version: 1.19.0 10841# 10842# This macro attempts to locate an m4 macro processor which supports 10843# -I option and is only useful for modules relying on M4 in order to 10844# expand macros in source code files. 10845# 10846# Interface to module: 10847# M4: returns the path of the m4 program found 10848# returns the path set by the user in the environment 10849# 10850AC_DEFUN([XORG_WITH_M4], [ 10851AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10852 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10853 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10854 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10855 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10856 [$PATH:/usr/gnu/bin])]) 10857 10858AC_SUBST([M4], [$ac_cv_path_M4]) 10859]) # XORG_WITH_M4 10860 10861# XORG_WITH_PS2PDF([DEFAULT]) 10862# ---------------- 10863# Minimum version: 1.6.0 10864# Minimum version for optional DEFAULT argument: 1.11.0 10865# 10866# Documentation tools are not always available on all platforms and sometimes 10867# not at the appropriate level. This macro enables a module to test for the 10868# presence of the tool and obtain it's path in separate variables. Coupled with 10869# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10870# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10871# --with-ps2pdf assumes 'auto'. 10872# 10873# Interface to module: 10874# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10875# PS2PDF: returns the path of the ps2pdf program found 10876# returns the path set by the user in the environment 10877# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10878# 'no' user instructs the module not to use ps2pdf 10879# 10880# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10881# 10882AC_DEFUN([XORG_WITH_PS2PDF],[ 10883AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10884m4_define([_defopt], m4_default([$1], [auto])) 10885AC_ARG_WITH(ps2pdf, 10886 AS_HELP_STRING([--with-ps2pdf], 10887 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10888 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10889m4_undefine([_defopt]) 10890 10891if test "x$use_ps2pdf" = x"auto"; then 10892 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10893 if test "x$PS2PDF" = "x"; then 10894 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10895 have_ps2pdf=no 10896 else 10897 have_ps2pdf=yes 10898 fi 10899elif test "x$use_ps2pdf" = x"yes" ; then 10900 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10901 if test "x$PS2PDF" = "x"; then 10902 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10903 fi 10904 have_ps2pdf=yes 10905elif test "x$use_ps2pdf" = x"no" ; then 10906 if test "x$PS2PDF" != "x"; then 10907 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10908 fi 10909 have_ps2pdf=no 10910else 10911 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10912fi 10913AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10914]) # XORG_WITH_PS2PDF 10915 10916# XORG_ENABLE_DOCS (enable_docs=yes) 10917# ---------------- 10918# Minimum version: 1.6.0 10919# 10920# Documentation tools are not always available on all platforms and sometimes 10921# not at the appropriate level. This macro enables a builder to skip all 10922# documentation targets except traditional man pages. 10923# Combined with the specific tool checking macros XORG_WITH_*, it provides 10924# maximum flexibilty in controlling documentation building. 10925# Refer to: 10926# XORG_WITH_XMLTO --with-xmlto 10927# XORG_WITH_ASCIIDOC --with-asciidoc 10928# XORG_WITH_DOXYGEN --with-doxygen 10929# XORG_WITH_FOP --with-fop 10930# XORG_WITH_GROFF --with-groff 10931# XORG_WITH_PS2PDF --with-ps2pdf 10932# 10933# Interface to module: 10934# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10935# --enable-docs: 'yes' user instructs the module to generate docs 10936# 'no' user instructs the module not to generate docs 10937# parm1: specify the default value, yes or no. 10938# 10939AC_DEFUN([XORG_ENABLE_DOCS],[ 10940m4_define([docs_default], m4_default([$1], [yes])) 10941AC_ARG_ENABLE(docs, 10942 AS_HELP_STRING([--enable-docs], 10943 [Enable building the documentation (default: ]docs_default[)]), 10944 [build_docs=$enableval], [build_docs=]docs_default) 10945m4_undefine([docs_default]) 10946AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10947AC_MSG_CHECKING([whether to build documentation]) 10948AC_MSG_RESULT([$build_docs]) 10949]) # XORG_ENABLE_DOCS 10950 10951# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10952# ---------------- 10953# Minimum version: 1.6.0 10954# 10955# This macro enables a builder to skip all developer documentation. 10956# Combined with the specific tool checking macros XORG_WITH_*, it provides 10957# maximum flexibilty in controlling documentation building. 10958# Refer to: 10959# XORG_WITH_XMLTO --with-xmlto 10960# XORG_WITH_ASCIIDOC --with-asciidoc 10961# XORG_WITH_DOXYGEN --with-doxygen 10962# XORG_WITH_FOP --with-fop 10963# XORG_WITH_GROFF --with-groff 10964# XORG_WITH_PS2PDF --with-ps2pdf 10965# 10966# Interface to module: 10967# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10968# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10969# 'no' user instructs the module not to generate developer docs 10970# parm1: specify the default value, yes or no. 10971# 10972AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10973m4_define([devel_default], m4_default([$1], [yes])) 10974AC_ARG_ENABLE(devel-docs, 10975 AS_HELP_STRING([--enable-devel-docs], 10976 [Enable building the developer documentation (default: ]devel_default[)]), 10977 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10978m4_undefine([devel_default]) 10979AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10980AC_MSG_CHECKING([whether to build developer documentation]) 10981AC_MSG_RESULT([$build_devel_docs]) 10982]) # XORG_ENABLE_DEVEL_DOCS 10983 10984# XORG_ENABLE_SPECS (enable_specs=yes) 10985# ---------------- 10986# Minimum version: 1.6.0 10987# 10988# This macro enables a builder to skip all functional specification targets. 10989# Combined with the specific tool checking macros XORG_WITH_*, it provides 10990# maximum flexibilty in controlling documentation building. 10991# Refer to: 10992# XORG_WITH_XMLTO --with-xmlto 10993# XORG_WITH_ASCIIDOC --with-asciidoc 10994# XORG_WITH_DOXYGEN --with-doxygen 10995# XORG_WITH_FOP --with-fop 10996# XORG_WITH_GROFF --with-groff 10997# XORG_WITH_PS2PDF --with-ps2pdf 10998# 10999# Interface to module: 11000# ENABLE_SPECS: used in makefiles to conditionally generate specs 11001# --enable-specs: 'yes' user instructs the module to generate specs 11002# 'no' user instructs the module not to generate specs 11003# parm1: specify the default value, yes or no. 11004# 11005AC_DEFUN([XORG_ENABLE_SPECS],[ 11006m4_define([spec_default], m4_default([$1], [yes])) 11007AC_ARG_ENABLE(specs, 11008 AS_HELP_STRING([--enable-specs], 11009 [Enable building the specs (default: ]spec_default[)]), 11010 [build_specs=$enableval], [build_specs=]spec_default) 11011m4_undefine([spec_default]) 11012AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 11013AC_MSG_CHECKING([whether to build functional specifications]) 11014AC_MSG_RESULT([$build_specs]) 11015]) # XORG_ENABLE_SPECS 11016 11017# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 11018# ---------------------------------------------- 11019# Minimum version: 1.13.0 11020# 11021# This macro enables a builder to enable/disable unit testing 11022# It makes no assumption about the test cases implementation 11023# Test cases may or may not use Automake "Support for test suites" 11024# They may or may not use the software utility library GLib 11025# 11026# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 11027# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 11028# The variable enable_unit_tests is used by other macros in this file. 11029# 11030# Interface to module: 11031# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 11032# enable_unit_tests: used in configure.ac for additional configuration 11033# --enable-unit-tests: 'yes' user instructs the module to build tests 11034# 'no' user instructs the module not to build tests 11035# parm1: specify the default value, yes or no. 11036# 11037AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 11038AC_BEFORE([$0], [XORG_WITH_GLIB]) 11039AC_BEFORE([$0], [XORG_LD_WRAP]) 11040AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11041m4_define([_defopt], m4_default([$1], [auto])) 11042AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 11043 [Enable building unit test cases (default: ]_defopt[)]), 11044 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 11045m4_undefine([_defopt]) 11046AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 11047AC_MSG_CHECKING([whether to build unit test cases]) 11048AC_MSG_RESULT([$enable_unit_tests]) 11049]) # XORG_ENABLE_UNIT_TESTS 11050 11051# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 11052# ------------------------------------------------------ 11053# Minimum version: 1.17.0 11054# 11055# This macro enables a builder to enable/disable integration testing 11056# It makes no assumption about the test cases' implementation 11057# Test cases may or may not use Automake "Support for test suites" 11058# 11059# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11060# usually requires less dependencies and may be built and run under less 11061# stringent environments than integration tests. 11062# 11063# Interface to module: 11064# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11065# enable_integration_tests: used in configure.ac for additional configuration 11066# --enable-integration-tests: 'yes' user instructs the module to build tests 11067# 'no' user instructs the module not to build tests 11068# parm1: specify the default value, yes or no. 11069# 11070AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11071AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11072m4_define([_defopt], m4_default([$1], [auto])) 11073AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11074 [Enable building integration test cases (default: ]_defopt[)]), 11075 [enable_integration_tests=$enableval], 11076 [enable_integration_tests=]_defopt) 11077m4_undefine([_defopt]) 11078AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11079 [test "x$enable_integration_tests" != xno]) 11080AC_MSG_CHECKING([whether to build unit test cases]) 11081AC_MSG_RESULT([$enable_integration_tests]) 11082]) # XORG_ENABLE_INTEGRATION_TESTS 11083 11084# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11085# ---------------------------------------- 11086# Minimum version: 1.13.0 11087# 11088# GLib is a library which provides advanced data structures and functions. 11089# This macro enables a module to test for the presence of Glib. 11090# 11091# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11092# Otherwise the value of $enable_unit_tests is blank. 11093# 11094# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11095# test support usually requires less dependencies and may be built and run under 11096# less stringent environments than integration tests. 11097# 11098# Interface to module: 11099# HAVE_GLIB: used in makefiles to conditionally build targets 11100# with_glib: used in configure.ac to know if GLib has been found 11101# --with-glib: 'yes' user instructs the module to use glib 11102# 'no' user instructs the module not to use glib 11103# 11104AC_DEFUN([XORG_WITH_GLIB],[ 11105AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11106m4_define([_defopt], m4_default([$2], [auto])) 11107AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11108 [Use GLib library for unit testing (default: ]_defopt[)]), 11109 [with_glib=$withval], [with_glib=]_defopt) 11110m4_undefine([_defopt]) 11111 11112have_glib=no 11113# Do not probe GLib if user explicitly disabled unit testing 11114if test "x$enable_unit_tests" != x"no"; then 11115 # Do not probe GLib if user explicitly disabled it 11116 if test "x$with_glib" != x"no"; then 11117 m4_ifval( 11118 [$1], 11119 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11120 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11121 ) 11122 fi 11123fi 11124 11125# Not having GLib when unit testing has been explicitly requested is an error 11126if test "x$enable_unit_tests" = x"yes"; then 11127 if test "x$have_glib" = x"no"; then 11128 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11129 fi 11130fi 11131 11132# Having unit testing disabled when GLib has been explicitly requested is an error 11133if test "x$enable_unit_tests" = x"no"; then 11134 if test "x$with_glib" = x"yes"; then 11135 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11136 fi 11137fi 11138 11139# Not having GLib when it has been explicitly requested is an error 11140if test "x$with_glib" = x"yes"; then 11141 if test "x$have_glib" = x"no"; then 11142 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11143 fi 11144fi 11145 11146AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11147]) # XORG_WITH_GLIB 11148 11149# XORG_LD_WRAP([required|optional]) 11150# --------------------------------- 11151# Minimum version: 1.13.0 11152# 11153# Check if linker supports -wrap, passed via compiler flags 11154# 11155# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11156# Otherwise the value of $enable_unit_tests is blank. 11157# 11158# Argument added in 1.16.0 - default is "required", to match existing behavior 11159# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11160# available, an argument of "optional" allows use when some unit tests require 11161# ld -wrap and others do not. 11162# 11163AC_DEFUN([XORG_LD_WRAP],[ 11164XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11165 [AC_LANG_PROGRAM([#include <stdlib.h> 11166 void __wrap_exit(int status) { return; }], 11167 [exit(0);])]) 11168# Not having ld wrap when unit testing has been explicitly requested is an error 11169if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11170 if test "x$have_ld_wrap" = x"no"; then 11171 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11172 fi 11173fi 11174AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11175# 11176]) # XORG_LD_WRAP 11177 11178# XORG_CHECK_LINKER_FLAGS 11179# ----------------------- 11180# SYNOPSIS 11181# 11182# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11183# 11184# DESCRIPTION 11185# 11186# Check whether the given linker FLAGS work with the current language's 11187# linker, or whether they give an error. 11188# 11189# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11190# success/failure. 11191# 11192# PROGRAM-SOURCE is the program source to link with, if needed 11193# 11194# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11195# 11196# LICENSE 11197# 11198# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11199# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11200# Copyright (c) 2009 Matteo Frigo 11201# 11202# This program is free software: you can redistribute it and/or modify it 11203# under the terms of the GNU General Public License as published by the 11204# Free Software Foundation, either version 3 of the License, or (at your 11205# option) any later version. 11206# 11207# This program is distributed in the hope that it will be useful, but 11208# WITHOUT ANY WARRANTY; without even the implied warranty of 11209# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11210# Public License for more details. 11211# 11212# You should have received a copy of the GNU General Public License along 11213# with this program. If not, see <http://www.gnu.org/licenses/>. 11214# 11215# As a special exception, the respective Autoconf Macro's copyright owner 11216# gives unlimited permission to copy, distribute and modify the configure 11217# scripts that are the output of Autoconf when processing the Macro. You 11218# need not follow the terms of the GNU General Public License when using 11219# or distributing such scripts, even though portions of the text of the 11220# Macro appear in them. The GNU General Public License (GPL) does govern 11221# all other use of the material that constitutes the Autoconf Macro. 11222# 11223# This special exception to the GPL applies to versions of the Autoconf 11224# Macro released by the Autoconf Archive. When you make and distribute a 11225# modified version of the Autoconf Macro, you may extend this special 11226# exception to the GPL to apply to your modified version as well.# 11227AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11228[AC_MSG_CHECKING([whether the linker accepts $1]) 11229dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11230AS_LITERAL_IF([$1], 11231 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11232 ax_save_FLAGS=$LDFLAGS 11233 LDFLAGS="$1" 11234 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11235 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11236 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11237 LDFLAGS=$ax_save_FLAGS])], 11238 [ax_save_FLAGS=$LDFLAGS 11239 LDFLAGS="$1" 11240 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11241 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11242 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11243 LDFLAGS=$ax_save_FLAGS]) 11244eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11245AC_MSG_RESULT($xorg_check_linker_flags) 11246if test "x$xorg_check_linker_flags" = xyes; then 11247 m4_default([$2], :) 11248else 11249 m4_default([$3], :) 11250fi 11251]) # XORG_CHECK_LINKER_FLAGS 11252 11253# XORG_MEMORY_CHECK_FLAGS 11254# ----------------------- 11255# Minimum version: 1.16.0 11256# 11257# This macro attempts to find appropriate memory checking functionality 11258# for various platforms which unit testing code may use to catch various 11259# forms of memory allocation and access errors in testing. 11260# 11261# Interface to module: 11262# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11263# Usually added to TESTS_ENVIRONMENT in Makefile.am 11264# 11265# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11266# 11267AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11268 11269AC_REQUIRE([AC_CANONICAL_HOST]) 11270AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11271 [Environment variables to enable memory checking in tests]) 11272 11273# Check for different types of support on different platforms 11274case $host_os in 11275 solaris*) 11276 AC_CHECK_LIB([umem], [umem_alloc], 11277 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11278 ;; 11279 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11280 # both directly and inverted, so should not be 0 or 255. 11281 malloc_debug_env='MALLOC_PERTURB_=15' 11282 ;; 11283 darwin*) 11284 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11285 ;; 11286 *bsd*) 11287 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11288 ;; 11289esac 11290 11291# User supplied flags override default flags 11292if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11293 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11294fi 11295 11296AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11297]) # XORG_WITH_LINT 11298 11299# XORG_CHECK_MALLOC_ZERO 11300# ---------------------- 11301# Minimum version: 1.0.0 11302# 11303# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11304# malloc(0) returns NULL. Packages should add one of these cflags to 11305# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11306AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11307AC_ARG_ENABLE(malloc0returnsnull, 11308 AS_HELP_STRING([--enable-malloc0returnsnull], 11309 [malloc(0) returns NULL (default: auto)]), 11310 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11311 [MALLOC_ZERO_RETURNS_NULL=auto]) 11312 11313AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11314if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11315AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11316 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11317#include <stdlib.h> 11318],[ 11319 char *m0, *r0, *c0, *p; 11320 m0 = malloc(0); 11321 p = malloc(10); 11322 r0 = realloc(p,0); 11323 c0 = calloc(0,10); 11324 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11325])], 11326 [xorg_cv_malloc0_returns_null=yes], 11327 [xorg_cv_malloc0_returns_null=no])]) 11328MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11329fi 11330AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11331 11332if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11333 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11334 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11335 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11336else 11337 MALLOC_ZERO_CFLAGS="" 11338 XMALLOC_ZERO_CFLAGS="" 11339 XTMALLOC_ZERO_CFLAGS="" 11340fi 11341 11342AC_SUBST([MALLOC_ZERO_CFLAGS]) 11343AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11344AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11345]) # XORG_CHECK_MALLOC_ZERO 11346 11347# XORG_WITH_LINT() 11348# ---------------- 11349# Minimum version: 1.1.0 11350# 11351# This macro enables the use of a tool that flags some suspicious and 11352# non-portable constructs (likely to be bugs) in C language source code. 11353# It will attempt to locate the tool and use appropriate options. 11354# There are various lint type tools on different platforms. 11355# 11356# Interface to module: 11357# LINT: returns the path to the tool found on the platform 11358# or the value set to LINT on the configure cmd line 11359# also an Automake conditional 11360# LINT_FLAGS: an Automake variable with appropriate flags 11361# 11362# --with-lint: 'yes' user instructs the module to use lint 11363# 'no' user instructs the module not to use lint (default) 11364# 11365# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11366# If the user sets the value of LINT_FLAGS, they are used verbatim. 11367# 11368AC_DEFUN([XORG_WITH_LINT],[ 11369 11370AC_ARG_VAR([LINT], [Path to a lint-style command]) 11371AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11372AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11373 [Use a lint-style source code checker (default: disabled)])], 11374 [use_lint=$withval], [use_lint=no]) 11375 11376# Obtain platform specific info like program name and options 11377# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11378case $host_os in 11379 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11380 lint_name=splint 11381 lint_options="-badflag" 11382 ;; 11383 *freebsd* | *netbsd*) 11384 lint_name=lint 11385 lint_options="-u -b" 11386 ;; 11387 *solaris*) 11388 lint_name=lint 11389 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11390 ;; 11391esac 11392 11393# Test for the presence of the program (either guessed by the code or spelled out by the user) 11394if test "x$use_lint" = x"yes" ; then 11395 AC_PATH_PROG([LINT], [$lint_name]) 11396 if test "x$LINT" = "x"; then 11397 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11398 fi 11399elif test "x$use_lint" = x"no" ; then 11400 if test "x$LINT" != "x"; then 11401 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11402 fi 11403else 11404 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11405fi 11406 11407# User supplied flags override default flags 11408if test "x$LINT_FLAGS" != "x"; then 11409 lint_options=$LINT_FLAGS 11410fi 11411 11412AC_SUBST([LINT_FLAGS],[$lint_options]) 11413AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11414 11415]) # XORG_WITH_LINT 11416 11417# XORG_LINT_LIBRARY(LIBNAME) 11418# -------------------------- 11419# Minimum version: 1.1.0 11420# 11421# Sets up flags for building lint libraries for checking programs that call 11422# functions in the library. 11423# 11424# Interface to module: 11425# LINTLIB - Automake variable with the name of lint library file to make 11426# MAKE_LINT_LIB - Automake conditional 11427# 11428# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11429# - 'no' user instructs the module not to create a lint library (default) 11430 11431AC_DEFUN([XORG_LINT_LIBRARY],[ 11432AC_REQUIRE([XORG_WITH_LINT]) 11433AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11434 [Create lint library (default: disabled)])], 11435 [make_lint_lib=$enableval], [make_lint_lib=no]) 11436 11437if test "x$make_lint_lib" = x"yes" ; then 11438 LINTLIB=llib-l$1.ln 11439 if test "x$LINT" = "x"; then 11440 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11441 fi 11442elif test "x$make_lint_lib" != x"no" ; then 11443 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11444fi 11445 11446AC_SUBST(LINTLIB) 11447AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11448 11449]) # XORG_LINT_LIBRARY 11450 11451# XORG_COMPILER_BRAND 11452# ------------------- 11453# Minimum version: 1.14.0 11454# 11455# Checks for various brands of compilers and sets flags as appropriate: 11456# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11457# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11458# clang compiler - sets CLANGCC to "yes" 11459# Intel compiler - sets INTELCC to "yes" 11460# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11461# 11462AC_DEFUN([XORG_COMPILER_BRAND], [ 11463AC_LANG_CASE( 11464 [C], [ 11465 AC_REQUIRE([AC_PROG_CC_C99]) 11466 ], 11467 [C++], [ 11468 AC_REQUIRE([AC_PROG_CXX]) 11469 ] 11470) 11471AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11472AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11473AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11474]) # XORG_COMPILER_BRAND 11475 11476# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11477# --------------- 11478# Minimum version: 1.16.0 11479# 11480# Test if the compiler works when passed the given flag as a command line argument. 11481# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11482# next flag in the list until there are no more options. 11483# 11484# Note that this does not guarantee that the compiler supports the flag as some 11485# compilers will simply ignore arguments that they do not understand, but we do 11486# attempt to weed out false positives by using -Werror=unknown-warning-option and 11487# -Werror=unused-command-line-argument 11488# 11489AC_DEFUN([XORG_TESTSET_CFLAG], [ 11490m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11491m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11492 11493AC_LANG_COMPILER_REQUIRE 11494 11495AC_LANG_CASE( 11496 [C], [ 11497 AC_REQUIRE([AC_PROG_CC_C99]) 11498 define([PREFIX], [C]) 11499 define([CACHE_PREFIX], [cc]) 11500 define([COMPILER], [$CC]) 11501 ], 11502 [C++], [ 11503 define([PREFIX], [CXX]) 11504 define([CACHE_PREFIX], [cxx]) 11505 define([COMPILER], [$CXX]) 11506 ] 11507) 11508 11509[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11510 11511if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11512 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11513 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11514 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11515 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11516 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11517 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11518 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11519 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11520fi 11521 11522if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11523 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11524 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11525 fi 11526 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11527 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11528 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11529 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11530 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11531 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11532 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11533 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11534fi 11535 11536found="no" 11537m4_foreach([flag], m4_cdr($@), [ 11538 if test $found = "no" ; then 11539 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11540 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11541 fi 11542 11543 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11544 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11545 fi 11546 11547 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11548 11549dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11550 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11551 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11552 AC_CACHE_VAL($cacheid, 11553 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11554 [eval $cacheid=yes], 11555 [eval $cacheid=no])]) 11556 11557 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11558 11559 eval supported=\$$cacheid 11560 AC_MSG_RESULT([$supported]) 11561 if test "$supported" = "yes" ; then 11562 $1="$$1 ]flag[" 11563 found="yes" 11564 fi 11565 fi 11566]) 11567]) # XORG_TESTSET_CFLAG 11568 11569# XORG_COMPILER_FLAGS 11570# --------------- 11571# Minimum version: 1.16.0 11572# 11573# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11574# arguments supported by the selected compiler which do NOT alter the generated 11575# code. These arguments will cause the compiler to print various warnings 11576# during compilation AND turn a conservative set of warnings into errors. 11577# 11578# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11579# future versions of util-macros as options are added to new compilers. 11580# 11581AC_DEFUN([XORG_COMPILER_FLAGS], [ 11582AC_REQUIRE([XORG_COMPILER_BRAND]) 11583 11584AC_ARG_ENABLE(selective-werror, 11585 AS_HELP_STRING([--disable-selective-werror], 11586 [Turn off selective compiler errors. (default: enabled)]), 11587 [SELECTIVE_WERROR=$enableval], 11588 [SELECTIVE_WERROR=yes]) 11589 11590AC_LANG_CASE( 11591 [C], [ 11592 define([PREFIX], [C]) 11593 ], 11594 [C++], [ 11595 define([PREFIX], [CXX]) 11596 ] 11597) 11598# -v is too short to test reliably with XORG_TESTSET_CFLAG 11599if test "x$SUNCC" = "xyes"; then 11600 [BASE_]PREFIX[FLAGS]="-v" 11601else 11602 [BASE_]PREFIX[FLAGS]="" 11603fi 11604 11605# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11606XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11607XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11608XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11609XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11610 11611AC_LANG_CASE( 11612 [C], [ 11613 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11614 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11615 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11616 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11617 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11618 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11619 ] 11620) 11621 11622# This chunk adds additional warnings that could catch undesired effects. 11623XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11624XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11625XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11626XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11627XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11628XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11629XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11630 11631# These are currently disabled because they are noisy. They will be enabled 11632# in the future once the codebase is sufficiently modernized to silence 11633# them. For now, I don't want them to drown out the other warnings. 11634# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11635# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11636# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11637 11638# Turn some warnings into errors, so we don't accidently get successful builds 11639# when there are problems that should be fixed. 11640 11641if test "x$SELECTIVE_WERROR" = "xyes" ; then 11642XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11643XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11644XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11645XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11646XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11647XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11648XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11649XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11650XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11651XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11652XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11653XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11654XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11655else 11656AC_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]) 11657XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11658XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11659XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11660XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11661XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11662XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11663XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11664XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11665XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11666XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11667XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11668XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11669XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11670fi 11671 11672AC_SUBST([BASE_]PREFIX[FLAGS]) 11673]) # XORG_COMPILER_FLAGS 11674 11675# XORG_CWARNFLAGS 11676# --------------- 11677# Minimum version: 1.2.0 11678# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11679# 11680# Defines CWARNFLAGS to enable C compiler warnings. 11681# 11682# This function is deprecated because it defines -fno-strict-aliasing 11683# which alters the code generated by the compiler. If -fno-strict-aliasing 11684# is needed, then it should be added explicitly in the module when 11685# it is updated to use BASE_CFLAGS. 11686# 11687AC_DEFUN([XORG_CWARNFLAGS], [ 11688AC_REQUIRE([XORG_COMPILER_FLAGS]) 11689AC_REQUIRE([XORG_COMPILER_BRAND]) 11690AC_LANG_CASE( 11691 [C], [ 11692 CWARNFLAGS="$BASE_CFLAGS" 11693 if test "x$GCC" = xyes ; then 11694 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11695 fi 11696 AC_SUBST(CWARNFLAGS) 11697 ] 11698) 11699]) # XORG_CWARNFLAGS 11700 11701# XORG_STRICT_OPTION 11702# ----------------------- 11703# Minimum version: 1.3.0 11704# 11705# Add configure option to enable strict compilation flags, such as treating 11706# warnings as fatal errors. 11707# If --enable-strict-compilation is passed to configure, adds strict flags to 11708# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11709# 11710# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11711# when strict compilation is unconditionally desired. 11712AC_DEFUN([XORG_STRICT_OPTION], [ 11713AC_REQUIRE([XORG_CWARNFLAGS]) 11714AC_REQUIRE([XORG_COMPILER_FLAGS]) 11715 11716AC_ARG_ENABLE(strict-compilation, 11717 AS_HELP_STRING([--enable-strict-compilation], 11718 [Enable all warnings from compiler and make them errors (default: disabled)]), 11719 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11720 11721AC_LANG_CASE( 11722 [C], [ 11723 define([PREFIX], [C]) 11724 ], 11725 [C++], [ 11726 define([PREFIX], [CXX]) 11727 ] 11728) 11729 11730[STRICT_]PREFIX[FLAGS]="" 11731XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11732XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11733 11734# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11735# activate it with -Werror, so we add it here explicitly. 11736XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11737 11738if test "x$STRICT_COMPILE" = "xyes"; then 11739 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11740 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11741fi 11742AC_SUBST([STRICT_]PREFIX[FLAGS]) 11743AC_SUBST([BASE_]PREFIX[FLAGS]) 11744AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11745]) # XORG_STRICT_OPTION 11746 11747# XORG_DEFAULT_OPTIONS 11748# -------------------- 11749# Minimum version: 1.3.0 11750# 11751# Defines default options for X.Org modules. 11752# 11753AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11754AC_REQUIRE([AC_PROG_INSTALL]) 11755XORG_COMPILER_FLAGS 11756XORG_CWARNFLAGS 11757XORG_STRICT_OPTION 11758XORG_RELEASE_VERSION 11759XORG_CHANGELOG 11760XORG_INSTALL 11761XORG_MANPAGE_SECTIONS 11762m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11763 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11764]) # XORG_DEFAULT_OPTIONS 11765 11766# XORG_INSTALL() 11767# ---------------- 11768# Minimum version: 1.4.0 11769# 11770# Defines the variable INSTALL_CMD as the command to copy 11771# INSTALL from $prefix/share/util-macros. 11772# 11773AC_DEFUN([XORG_INSTALL], [ 11774AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11775macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11776INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11777mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11778|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11779echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11780AC_SUBST([INSTALL_CMD]) 11781]) # XORG_INSTALL 11782dnl Copyright 2005 Red Hat, Inc 11783dnl 11784dnl Permission to use, copy, modify, distribute, and sell this software and its 11785dnl documentation for any purpose is hereby granted without fee, provided that 11786dnl the above copyright notice appear in all copies and that both that 11787dnl copyright notice and this permission notice appear in supporting 11788dnl documentation. 11789dnl 11790dnl The above copyright notice and this permission notice shall be included 11791dnl in all copies or substantial portions of the Software. 11792dnl 11793dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11794dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11795dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11796dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11797dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11798dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11799dnl OTHER DEALINGS IN THE SOFTWARE. 11800dnl 11801dnl Except as contained in this notice, the name of the copyright holders shall 11802dnl not be used in advertising or otherwise to promote the sale, use or 11803dnl other dealings in this Software without prior written authorization 11804dnl from the copyright holders. 11805dnl 11806 11807# XORG_RELEASE_VERSION 11808# -------------------- 11809# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11810 11811AC_DEFUN([XORG_RELEASE_VERSION],[ 11812 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11813 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11814 [Major version of this package]) 11815 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11816 if test "x$PVM" = "x"; then 11817 PVM="0" 11818 fi 11819 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11820 [$PVM], 11821 [Minor version of this package]) 11822 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11823 if test "x$PVP" = "x"; then 11824 PVP="0" 11825 fi 11826 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11827 [$PVP], 11828 [Patch version of this package]) 11829]) 11830 11831# XORG_CHANGELOG() 11832# ---------------- 11833# Minimum version: 1.2.0 11834# 11835# Defines the variable CHANGELOG_CMD as the command to generate 11836# ChangeLog from git. 11837# 11838# 11839AC_DEFUN([XORG_CHANGELOG], [ 11840CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11841mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11842|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11843echo 'git directory not found: installing possibly empty changelog.' >&2)" 11844AC_SUBST([CHANGELOG_CMD]) 11845]) # XORG_CHANGELOG 11846 11847