aclocal.m4 revision 421c997b
1# generated automatically by aclocal 1.11.2 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5# Inc. 6# This file is free software; the Free Software Foundation 7# gives unlimited permission to copy and/or distribute it, 8# with or without modifications, as long as this notice is preserved. 9 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13# PARTICULAR PURPOSE. 14 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18[m4_warning([this file was generated for autoconf 2.68. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically `autoreconf'.])]) 22 23# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 24# Foundation, Inc. 25# 26# This file is free software; the Free Software Foundation 27# gives unlimited permission to copy and/or distribute it, 28# with or without modifications, as long as this notice is preserved. 29 30# serial 1 31 32# AM_AUTOMAKE_VERSION(VERSION) 33# ---------------------------- 34# Automake X.Y traces this macro to ensure aclocal.m4 has been 35# generated from the m4 files accompanying Automake X.Y. 36# (This private macro should not be called outside this file.) 37AC_DEFUN([AM_AUTOMAKE_VERSION], 38[am__api_version='1.11' 39dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 40dnl require some minimum version. Point them to the right macro. 41m4_if([$1], [1.11.2], [], 42 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 43]) 44 45# _AM_AUTOCONF_VERSION(VERSION) 46# ----------------------------- 47# aclocal traces this macro to find the Autoconf version. 48# This is a private macro too. Using m4_define simplifies 49# the logic in aclocal, which can simply ignore this definition. 50m4_define([_AM_AUTOCONF_VERSION], []) 51 52# AM_SET_CURRENT_AUTOMAKE_VERSION 53# ------------------------------- 54# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 55# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 56AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 57[AM_AUTOMAKE_VERSION([1.11.2])dnl 58m4_ifndef([AC_AUTOCONF_VERSION], 59 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 60_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 61 62# AM_AUX_DIR_EXPAND -*- Autoconf -*- 63 64# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 65# 66# This file is free software; the Free Software Foundation 67# gives unlimited permission to copy and/or distribute it, 68# with or without modifications, as long as this notice is preserved. 69 70# serial 1 71 72# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 73# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 74# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 75# 76# Of course, Automake must honor this variable whenever it calls a 77# tool from the auxiliary directory. The problem is that $srcdir (and 78# therefore $ac_aux_dir as well) can be either absolute or relative, 79# depending on how configure is run. This is pretty annoying, since 80# it makes $ac_aux_dir quite unusable in subdirectories: in the top 81# source directory, any form will work fine, but in subdirectories a 82# relative path needs to be adjusted first. 83# 84# $ac_aux_dir/missing 85# fails when called from a subdirectory if $ac_aux_dir is relative 86# $top_srcdir/$ac_aux_dir/missing 87# fails if $ac_aux_dir is absolute, 88# fails when called from a subdirectory in a VPATH build with 89# a relative $ac_aux_dir 90# 91# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 92# are both prefixed by $srcdir. In an in-source build this is usually 93# harmless because $srcdir is `.', but things will broke when you 94# start a VPATH build or use an absolute $srcdir. 95# 96# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 97# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 98# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 99# and then we would define $MISSING as 100# MISSING="\${SHELL} $am_aux_dir/missing" 101# This will work as long as MISSING is not called from configure, because 102# unfortunately $(top_srcdir) has no meaning in configure. 103# However there are other variables, like CC, which are often used in 104# configure, and could therefore not use this "fixed" $ac_aux_dir. 105# 106# Another solution, used here, is to always expand $ac_aux_dir to an 107# absolute PATH. The drawback is that using absolute paths prevent a 108# configured tree to be moved without reconfiguration. 109 110AC_DEFUN([AM_AUX_DIR_EXPAND], 111[dnl Rely on autoconf to set up CDPATH properly. 112AC_PREREQ([2.50])dnl 113# expand $ac_aux_dir to an absolute path 114am_aux_dir=`cd $ac_aux_dir && pwd` 115]) 116 117# AM_CONDITIONAL -*- Autoconf -*- 118 119# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 120# Free Software Foundation, Inc. 121# 122# This file is free software; the Free Software Foundation 123# gives unlimited permission to copy and/or distribute it, 124# with or without modifications, as long as this notice is preserved. 125 126# serial 9 127 128# AM_CONDITIONAL(NAME, SHELL-CONDITION) 129# ------------------------------------- 130# Define a conditional. 131AC_DEFUN([AM_CONDITIONAL], 132[AC_PREREQ(2.52)dnl 133 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 134 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 135AC_SUBST([$1_TRUE])dnl 136AC_SUBST([$1_FALSE])dnl 137_AM_SUBST_NOTMAKE([$1_TRUE])dnl 138_AM_SUBST_NOTMAKE([$1_FALSE])dnl 139m4_define([_AM_COND_VALUE_$1], [$2])dnl 140if $2; then 141 $1_TRUE= 142 $1_FALSE='#' 143else 144 $1_TRUE='#' 145 $1_FALSE= 146fi 147AC_CONFIG_COMMANDS_PRE( 148[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 149 AC_MSG_ERROR([[conditional "$1" was never defined. 150Usually this means the macro was only invoked conditionally.]]) 151fi])]) 152 153# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 154# 2010, 2011 Free Software Foundation, Inc. 155# 156# This file is free software; the Free Software Foundation 157# gives unlimited permission to copy and/or distribute it, 158# with or without modifications, as long as this notice is preserved. 159 160# serial 12 161 162# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 163# written in clear, in which case automake, when reading aclocal.m4, 164# will think it sees a *use*, and therefore will trigger all it's 165# C support machinery. Also note that it means that autoscan, seeing 166# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 167 168 169# _AM_DEPENDENCIES(NAME) 170# ---------------------- 171# See how the compiler implements dependency checking. 172# NAME is "CC", "CXX", "GCJ", or "OBJC". 173# We try a few techniques and use that to set a single cache variable. 174# 175# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 176# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 177# dependency, and given that the user is not expected to run this macro, 178# just rely on AC_PROG_CC. 179AC_DEFUN([_AM_DEPENDENCIES], 180[AC_REQUIRE([AM_SET_DEPDIR])dnl 181AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 182AC_REQUIRE([AM_MAKE_INCLUDE])dnl 183AC_REQUIRE([AM_DEP_TRACK])dnl 184 185ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 186 [$1], CXX, [depcc="$CXX" am_compiler_list=], 187 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 188 [$1], UPC, [depcc="$UPC" am_compiler_list=], 189 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 190 [depcc="$$1" am_compiler_list=]) 191 192AC_CACHE_CHECK([dependency style of $depcc], 193 [am_cv_$1_dependencies_compiler_type], 194[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 195 # We make a subdir and do the tests there. Otherwise we can end up 196 # making bogus files that we don't know about and never remove. For 197 # instance it was reported that on HP-UX the gcc test will end up 198 # making a dummy file named `D' -- because `-MD' means `put the output 199 # in D'. 200 rm -rf conftest.dir 201 mkdir conftest.dir 202 # Copy depcomp to subdir because otherwise we won't find it if we're 203 # using a relative directory. 204 cp "$am_depcomp" conftest.dir 205 cd conftest.dir 206 # We will build objects and dependencies in a subdirectory because 207 # it helps to detect inapplicable dependency modes. For instance 208 # both Tru64's cc and ICC support -MD to output dependencies as a 209 # side effect of compilation, but ICC will put the dependencies in 210 # the current directory while Tru64 will put them in the object 211 # directory. 212 mkdir sub 213 214 am_cv_$1_dependencies_compiler_type=none 215 if test "$am_compiler_list" = ""; then 216 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 217 fi 218 am__universal=false 219 m4_case([$1], [CC], 220 [case " $depcc " in #( 221 *\ -arch\ *\ -arch\ *) am__universal=true ;; 222 esac], 223 [CXX], 224 [case " $depcc " in #( 225 *\ -arch\ *\ -arch\ *) am__universal=true ;; 226 esac]) 227 228 for depmode in $am_compiler_list; do 229 # Setup a source with many dependencies, because some compilers 230 # like to wrap large dependency lists on column 80 (with \), and 231 # we should not choose a depcomp mode which is confused by this. 232 # 233 # We need to recreate these files for each test, as the compiler may 234 # overwrite some of them when testing with obscure command lines. 235 # This happens at least with the AIX C compiler. 236 : > sub/conftest.c 237 for i in 1 2 3 4 5 6; do 238 echo '#include "conftst'$i'.h"' >> sub/conftest.c 239 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 240 # Solaris 8's {/usr,}/bin/sh. 241 touch sub/conftst$i.h 242 done 243 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 244 245 # We check with `-c' and `-o' for the sake of the "dashmstdout" 246 # mode. It turns out that the SunPro C++ compiler does not properly 247 # handle `-M -o', and we need to detect this. Also, some Intel 248 # versions had trouble with output in subdirs 249 am__obj=sub/conftest.${OBJEXT-o} 250 am__minus_obj="-o $am__obj" 251 case $depmode in 252 gcc) 253 # This depmode causes a compiler race in universal mode. 254 test "$am__universal" = false || continue 255 ;; 256 nosideeffect) 257 # after this tag, mechanisms are not by side-effect, so they'll 258 # only be used when explicitly requested 259 if test "x$enable_dependency_tracking" = xyes; then 260 continue 261 else 262 break 263 fi 264 ;; 265 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 266 # This compiler won't grok `-c -o', but also, the minuso test has 267 # not run yet. These depmodes are late enough in the game, and 268 # so weak that their functioning should not be impacted. 269 am__obj=conftest.${OBJEXT-o} 270 am__minus_obj= 271 ;; 272 none) break ;; 273 esac 274 if depmode=$depmode \ 275 source=sub/conftest.c object=$am__obj \ 276 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 277 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 278 >/dev/null 2>conftest.err && 279 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 280 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 281 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 282 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 283 # icc doesn't choke on unknown options, it will just issue warnings 284 # or remarks (even with -Werror). So we grep stderr for any message 285 # that says an option was ignored or not supported. 286 # When given -MP, icc 7.0 and 7.1 complain thusly: 287 # icc: Command line warning: ignoring option '-M'; no argument required 288 # The diagnosis changed in icc 8.0: 289 # icc: Command line remark: option '-MP' not supported 290 if (grep 'ignoring option' conftest.err || 291 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 292 am_cv_$1_dependencies_compiler_type=$depmode 293 break 294 fi 295 fi 296 done 297 298 cd .. 299 rm -rf conftest.dir 300else 301 am_cv_$1_dependencies_compiler_type=none 302fi 303]) 304AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 305AM_CONDITIONAL([am__fastdep$1], [ 306 test "x$enable_dependency_tracking" != xno \ 307 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 308]) 309 310 311# AM_SET_DEPDIR 312# ------------- 313# Choose a directory name for dependency files. 314# This macro is AC_REQUIREd in _AM_DEPENDENCIES 315AC_DEFUN([AM_SET_DEPDIR], 316[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 317AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 318]) 319 320 321# AM_DEP_TRACK 322# ------------ 323AC_DEFUN([AM_DEP_TRACK], 324[AC_ARG_ENABLE(dependency-tracking, 325[ --disable-dependency-tracking speeds up one-time build 326 --enable-dependency-tracking do not reject slow dependency extractors]) 327if test "x$enable_dependency_tracking" != xno; then 328 am_depcomp="$ac_aux_dir/depcomp" 329 AMDEPBACKSLASH='\' 330 am__nodep='_no' 331fi 332AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 333AC_SUBST([AMDEPBACKSLASH])dnl 334_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 335AC_SUBST([am__nodep])dnl 336_AM_SUBST_NOTMAKE([am__nodep])dnl 337]) 338 339# Generate code to set up dependency tracking. -*- Autoconf -*- 340 341# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 342# Free Software Foundation, Inc. 343# 344# This file is free software; the Free Software Foundation 345# gives unlimited permission to copy and/or distribute it, 346# with or without modifications, as long as this notice is preserved. 347 348#serial 5 349 350# _AM_OUTPUT_DEPENDENCY_COMMANDS 351# ------------------------------ 352AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 353[{ 354 # Autoconf 2.62 quotes --file arguments for eval, but not when files 355 # are listed without --file. Let's play safe and only enable the eval 356 # if we detect the quoting. 357 case $CONFIG_FILES in 358 *\'*) eval set x "$CONFIG_FILES" ;; 359 *) set x $CONFIG_FILES ;; 360 esac 361 shift 362 for mf 363 do 364 # Strip MF so we end up with the name of the file. 365 mf=`echo "$mf" | sed -e 's/:.*$//'` 366 # Check whether this is an Automake generated Makefile or not. 367 # We used to match only the files named `Makefile.in', but 368 # some people rename them; so instead we look at the file content. 369 # Grep'ing the first line is not enough: some people post-process 370 # each Makefile.in and add a new line on top of each file to say so. 371 # Grep'ing the whole file is not good either: AIX grep has a line 372 # limit of 2048, but all sed's we know have understand at least 4000. 373 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 374 dirpart=`AS_DIRNAME("$mf")` 375 else 376 continue 377 fi 378 # Extract the definition of DEPDIR, am__include, and am__quote 379 # from the Makefile without running `make'. 380 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 381 test -z "$DEPDIR" && continue 382 am__include=`sed -n 's/^am__include = //p' < "$mf"` 383 test -z "am__include" && continue 384 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 385 # When using ansi2knr, U may be empty or an underscore; expand it 386 U=`sed -n 's/^U = //p' < "$mf"` 387 # Find all dependency output files, they are included files with 388 # $(DEPDIR) in their names. We invoke sed twice because it is the 389 # simplest approach to changing $(DEPDIR) to its actual value in the 390 # expansion. 391 for file in `sed -n " 392 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 393 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 394 # Make sure the directory exists. 395 test -f "$dirpart/$file" && continue 396 fdir=`AS_DIRNAME(["$file"])` 397 AS_MKDIR_P([$dirpart/$fdir]) 398 # echo "creating $dirpart/$file" 399 echo '# dummy' > "$dirpart/$file" 400 done 401 done 402} 403])# _AM_OUTPUT_DEPENDENCY_COMMANDS 404 405 406# AM_OUTPUT_DEPENDENCY_COMMANDS 407# ----------------------------- 408# This macro should only be invoked once -- use via AC_REQUIRE. 409# 410# This code is only required when automatic dependency tracking 411# is enabled. FIXME. This creates each `.P' file that we will 412# need in order to bootstrap the dependency handling code. 413AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 414[AC_CONFIG_COMMANDS([depfiles], 415 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 416 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 417]) 418 419# Do all the work for Automake. -*- Autoconf -*- 420 421# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 422# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 423# 424# This file is free software; the Free Software Foundation 425# gives unlimited permission to copy and/or distribute it, 426# with or without modifications, as long as this notice is preserved. 427 428# serial 16 429 430# This macro actually does too much. Some checks are only needed if 431# your package does certain things. But this isn't really a big deal. 432 433# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 434# AM_INIT_AUTOMAKE([OPTIONS]) 435# ----------------------------------------------- 436# The call with PACKAGE and VERSION arguments is the old style 437# call (pre autoconf-2.50), which is being phased out. PACKAGE 438# and VERSION should now be passed to AC_INIT and removed from 439# the call to AM_INIT_AUTOMAKE. 440# We support both call styles for the transition. After 441# the next Automake release, Autoconf can make the AC_INIT 442# arguments mandatory, and then we can depend on a new Autoconf 443# release and drop the old call support. 444AC_DEFUN([AM_INIT_AUTOMAKE], 445[AC_PREREQ([2.62])dnl 446dnl Autoconf wants to disallow AM_ names. We explicitly allow 447dnl the ones we care about. 448m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 449AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 450AC_REQUIRE([AC_PROG_INSTALL])dnl 451if test "`cd $srcdir && pwd`" != "`pwd`"; then 452 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 453 # is not polluted with repeated "-I." 454 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 455 # test to see if srcdir already configured 456 if test -f $srcdir/config.status; then 457 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 458 fi 459fi 460 461# test whether we have cygpath 462if test -z "$CYGPATH_W"; then 463 if (cygpath --version) >/dev/null 2>/dev/null; then 464 CYGPATH_W='cygpath -w' 465 else 466 CYGPATH_W=echo 467 fi 468fi 469AC_SUBST([CYGPATH_W]) 470 471# Define the identity of the package. 472dnl Distinguish between old-style and new-style calls. 473m4_ifval([$2], 474[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 475 AC_SUBST([PACKAGE], [$1])dnl 476 AC_SUBST([VERSION], [$2])], 477[_AM_SET_OPTIONS([$1])dnl 478dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 479m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 480 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 481 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 482 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 483 484_AM_IF_OPTION([no-define],, 485[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 486 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 487 488# Some tools Automake needs. 489AC_REQUIRE([AM_SANITY_CHECK])dnl 490AC_REQUIRE([AC_ARG_PROGRAM])dnl 491AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 492AM_MISSING_PROG(AUTOCONF, autoconf) 493AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 494AM_MISSING_PROG(AUTOHEADER, autoheader) 495AM_MISSING_PROG(MAKEINFO, makeinfo) 496AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 497AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 498AC_REQUIRE([AM_PROG_MKDIR_P])dnl 499# We need awk for the "check" target. The system "awk" is bad on 500# some platforms. 501AC_REQUIRE([AC_PROG_AWK])dnl 502AC_REQUIRE([AC_PROG_MAKE_SET])dnl 503AC_REQUIRE([AM_SET_LEADING_DOT])dnl 504_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 505 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 506 [_AM_PROG_TAR([v7])])]) 507_AM_IF_OPTION([no-dependencies],, 508[AC_PROVIDE_IFELSE([AC_PROG_CC], 509 [_AM_DEPENDENCIES(CC)], 510 [define([AC_PROG_CC], 511 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 512AC_PROVIDE_IFELSE([AC_PROG_CXX], 513 [_AM_DEPENDENCIES(CXX)], 514 [define([AC_PROG_CXX], 515 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 516AC_PROVIDE_IFELSE([AC_PROG_OBJC], 517 [_AM_DEPENDENCIES(OBJC)], 518 [define([AC_PROG_OBJC], 519 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 520]) 521_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 522dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 523dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 524dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 525AC_CONFIG_COMMANDS_PRE(dnl 526[m4_provide_if([_AM_COMPILER_EXEEXT], 527 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 528]) 529 530dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 531dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 532dnl mangled by Autoconf and run in a shell conditional statement. 533m4_define([_AC_COMPILER_EXEEXT], 534m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 535 536 537# When config.status generates a header, we must update the stamp-h file. 538# This file resides in the same directory as the config header 539# that is generated. The stamp files are numbered to have different names. 540 541# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 542# loop where config.status creates the headers, so we can generate 543# our stamp files there. 544AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 545[# Compute $1's index in $config_headers. 546_am_arg=$1 547_am_stamp_count=1 548for _am_header in $config_headers :; do 549 case $_am_header in 550 $_am_arg | $_am_arg:* ) 551 break ;; 552 * ) 553 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 554 esac 555done 556echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 557 558# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 559# Inc. 560# 561# This file is free software; the Free Software Foundation 562# gives unlimited permission to copy and/or distribute it, 563# with or without modifications, as long as this notice is preserved. 564 565# serial 1 566 567# AM_PROG_INSTALL_SH 568# ------------------ 569# Define $install_sh. 570AC_DEFUN([AM_PROG_INSTALL_SH], 571[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 572if test x"${install_sh}" != xset; then 573 case $am_aux_dir in 574 *\ * | *\ *) 575 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 576 *) 577 install_sh="\${SHELL} $am_aux_dir/install-sh" 578 esac 579fi 580AC_SUBST(install_sh)]) 581 582# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 583# 584# This file is free software; the Free Software Foundation 585# gives unlimited permission to copy and/or distribute it, 586# with or without modifications, as long as this notice is preserved. 587 588# serial 2 589 590# Check whether the underlying file-system supports filenames 591# with a leading dot. For instance MS-DOS doesn't. 592AC_DEFUN([AM_SET_LEADING_DOT], 593[rm -rf .tst 2>/dev/null 594mkdir .tst 2>/dev/null 595if test -d .tst; then 596 am__leading_dot=. 597else 598 am__leading_dot=_ 599fi 600rmdir .tst 2>/dev/null 601AC_SUBST([am__leading_dot])]) 602 603# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 604# From Jim Meyering 605 606# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 607# 2011 Free Software Foundation, Inc. 608# 609# This file is free software; the Free Software Foundation 610# gives unlimited permission to copy and/or distribute it, 611# with or without modifications, as long as this notice is preserved. 612 613# serial 5 614 615# AM_MAINTAINER_MODE([DEFAULT-MODE]) 616# ---------------------------------- 617# Control maintainer-specific portions of Makefiles. 618# Default is to disable them, unless `enable' is passed literally. 619# For symmetry, `disable' may be passed as well. Anyway, the user 620# can override the default with the --enable/--disable switch. 621AC_DEFUN([AM_MAINTAINER_MODE], 622[m4_case(m4_default([$1], [disable]), 623 [enable], [m4_define([am_maintainer_other], [disable])], 624 [disable], [m4_define([am_maintainer_other], [enable])], 625 [m4_define([am_maintainer_other], [enable]) 626 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 627AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 628 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 629 AC_ARG_ENABLE([maintainer-mode], 630[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 631 (and sometimes confusing) to the casual installer], 632 [USE_MAINTAINER_MODE=$enableval], 633 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 634 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 635 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 636 MAINT=$MAINTAINER_MODE_TRUE 637 AC_SUBST([MAINT])dnl 638] 639) 640 641AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 642 643# Check to see how 'make' treats includes. -*- Autoconf -*- 644 645# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 646# 647# This file is free software; the Free Software Foundation 648# gives unlimited permission to copy and/or distribute it, 649# with or without modifications, as long as this notice is preserved. 650 651# serial 4 652 653# AM_MAKE_INCLUDE() 654# ----------------- 655# Check to see how make treats includes. 656AC_DEFUN([AM_MAKE_INCLUDE], 657[am_make=${MAKE-make} 658cat > confinc << 'END' 659am__doit: 660 @echo this is the am__doit target 661.PHONY: am__doit 662END 663# If we don't find an include directive, just comment out the code. 664AC_MSG_CHECKING([for style of include used by $am_make]) 665am__include="#" 666am__quote= 667_am_result=none 668# First try GNU make style include. 669echo "include confinc" > confmf 670# Ignore all kinds of additional output from `make'. 671case `$am_make -s -f confmf 2> /dev/null` in #( 672*the\ am__doit\ target*) 673 am__include=include 674 am__quote= 675 _am_result=GNU 676 ;; 677esac 678# Now try BSD make style include. 679if test "$am__include" = "#"; then 680 echo '.include "confinc"' > confmf 681 case `$am_make -s -f confmf 2> /dev/null` in #( 682 *the\ am__doit\ target*) 683 am__include=.include 684 am__quote="\"" 685 _am_result=BSD 686 ;; 687 esac 688fi 689AC_SUBST([am__include]) 690AC_SUBST([am__quote]) 691AC_MSG_RESULT([$_am_result]) 692rm -f confinc confmf 693]) 694 695# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 696# Free Software Foundation, Inc. 697# 698# This file is free software; the Free Software Foundation 699# gives unlimited permission to copy and/or distribute it, 700# with or without modifications, as long as this notice is preserved. 701 702# serial 6 703 704# AM_PROG_CC_C_O 705# -------------- 706# Like AC_PROG_CC_C_O, but changed for automake. 707AC_DEFUN([AM_PROG_CC_C_O], 708[AC_REQUIRE([AC_PROG_CC_C_O])dnl 709AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 710AC_REQUIRE_AUX_FILE([compile])dnl 711# FIXME: we rely on the cache variable name because 712# there is no other way. 713set dummy $CC 714am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 715eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 716if test "$am_t" != yes; then 717 # Losing compiler, so override with the script. 718 # FIXME: It is wrong to rewrite CC. 719 # But if we don't then we get into trouble of one sort or another. 720 # A longer-term fix would be to have automake use am__CC in this case, 721 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 722 CC="$am_aux_dir/compile $CC" 723fi 724dnl Make sure AC_PROG_CC is never called again, or it will override our 725dnl setting of CC. 726m4_define([AC_PROG_CC], 727 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 728]) 729 730# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 731 732# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 733# 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# serial 6 740 741# AM_MISSING_PROG(NAME, PROGRAM) 742# ------------------------------ 743AC_DEFUN([AM_MISSING_PROG], 744[AC_REQUIRE([AM_MISSING_HAS_RUN]) 745$1=${$1-"${am_missing_run}$2"} 746AC_SUBST($1)]) 747 748 749# AM_MISSING_HAS_RUN 750# ------------------ 751# Define MISSING if not defined so far and test if it supports --run. 752# If it does, set am_missing_run to use it, otherwise, to nothing. 753AC_DEFUN([AM_MISSING_HAS_RUN], 754[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 755AC_REQUIRE_AUX_FILE([missing])dnl 756if test x"${MISSING+set}" != xset; then 757 case $am_aux_dir in 758 *\ * | *\ *) 759 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 760 *) 761 MISSING="\${SHELL} $am_aux_dir/missing" ;; 762 esac 763fi 764# Use eval to expand $SHELL 765if eval "$MISSING --run true"; then 766 am_missing_run="$MISSING --run " 767else 768 am_missing_run= 769 AC_MSG_WARN([`missing' script is too old or missing]) 770fi 771]) 772 773# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 774# Inc. 775# 776# This file is free software; the Free Software Foundation 777# gives unlimited permission to copy and/or distribute it, 778# with or without modifications, as long as this notice is preserved. 779 780# serial 1 781 782# AM_PROG_MKDIR_P 783# --------------- 784# Check for `mkdir -p'. 785AC_DEFUN([AM_PROG_MKDIR_P], 786[AC_PREREQ([2.60])dnl 787AC_REQUIRE([AC_PROG_MKDIR_P])dnl 788dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 789dnl while keeping a definition of mkdir_p for backward compatibility. 790dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 791dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 792dnl Makefile.ins that do not define MKDIR_P, so we do our own 793dnl adjustment using top_builddir (which is defined more often than 794dnl MKDIR_P). 795AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 796case $mkdir_p in 797 [[\\/$]]* | ?:[[\\/]]*) ;; 798 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 799esac 800]) 801 802# Helper functions for option handling. -*- Autoconf -*- 803 804# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 805# Foundation, Inc. 806# 807# This file is free software; the Free Software Foundation 808# gives unlimited permission to copy and/or distribute it, 809# with or without modifications, as long as this notice is preserved. 810 811# serial 5 812 813# _AM_MANGLE_OPTION(NAME) 814# ----------------------- 815AC_DEFUN([_AM_MANGLE_OPTION], 816[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 817 818# _AM_SET_OPTION(NAME) 819# -------------------- 820# Set option NAME. Presently that only means defining a flag for this option. 821AC_DEFUN([_AM_SET_OPTION], 822[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 823 824# _AM_SET_OPTIONS(OPTIONS) 825# ------------------------ 826# OPTIONS is a space-separated list of Automake options. 827AC_DEFUN([_AM_SET_OPTIONS], 828[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 829 830# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 831# ------------------------------------------- 832# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 833AC_DEFUN([_AM_IF_OPTION], 834[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 835 836# Check to make sure that the build environment is sane. -*- Autoconf -*- 837 838# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 839# Free Software Foundation, Inc. 840# 841# This file is free software; the Free Software Foundation 842# gives unlimited permission to copy and/or distribute it, 843# with or without modifications, as long as this notice is preserved. 844 845# serial 5 846 847# AM_SANITY_CHECK 848# --------------- 849AC_DEFUN([AM_SANITY_CHECK], 850[AC_MSG_CHECKING([whether build environment is sane]) 851# Just in case 852sleep 1 853echo timestamp > conftest.file 854# Reject unsafe characters in $srcdir or the absolute working directory 855# name. Accept space and tab only in the latter. 856am_lf=' 857' 858case `pwd` in 859 *[[\\\"\#\$\&\'\`$am_lf]]*) 860 AC_MSG_ERROR([unsafe absolute working directory name]);; 861esac 862case $srcdir in 863 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 864 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 865esac 866 867# Do `set' in a subshell so we don't clobber the current shell's 868# arguments. Must try -L first in case configure is actually a 869# symlink; some systems play weird games with the mod time of symlinks 870# (eg FreeBSD returns the mod time of the symlink's containing 871# directory). 872if ( 873 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 874 if test "$[*]" = "X"; then 875 # -L didn't work. 876 set X `ls -t "$srcdir/configure" conftest.file` 877 fi 878 rm -f conftest.file 879 if test "$[*]" != "X $srcdir/configure conftest.file" \ 880 && test "$[*]" != "X conftest.file $srcdir/configure"; then 881 882 # If neither matched, then we have a broken ls. This can happen 883 # if, for instance, CONFIG_SHELL is bash and it inherits a 884 # broken ls alias from the environment. This has actually 885 # happened. Such a system could not be considered "sane". 886 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 887alias in your environment]) 888 fi 889 890 test "$[2]" = conftest.file 891 ) 892then 893 # Ok. 894 : 895else 896 AC_MSG_ERROR([newly created file is older than distributed files! 897Check your system clock]) 898fi 899AC_MSG_RESULT(yes)]) 900 901# Copyright (C) 2009 Free Software Foundation, Inc. 902# 903# This file is free software; the Free Software Foundation 904# gives unlimited permission to copy and/or distribute it, 905# with or without modifications, as long as this notice is preserved. 906 907# serial 1 908 909# AM_SILENT_RULES([DEFAULT]) 910# -------------------------- 911# Enable less verbose build rules; with the default set to DEFAULT 912# (`yes' being less verbose, `no' or empty being verbose). 913AC_DEFUN([AM_SILENT_RULES], 914[AC_ARG_ENABLE([silent-rules], 915[ --enable-silent-rules less verbose build output (undo: `make V=1') 916 --disable-silent-rules verbose build output (undo: `make V=0')]) 917case $enable_silent_rules in 918yes) AM_DEFAULT_VERBOSITY=0;; 919no) AM_DEFAULT_VERBOSITY=1;; 920*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 921esac 922AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 923AM_BACKSLASH='\' 924AC_SUBST([AM_BACKSLASH])dnl 925_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 926]) 927 928# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 929# 930# This file is free software; the Free Software Foundation 931# gives unlimited permission to copy and/or distribute it, 932# with or without modifications, as long as this notice is preserved. 933 934# serial 1 935 936# AM_PROG_INSTALL_STRIP 937# --------------------- 938# One issue with vendor `install' (even GNU) is that you can't 939# specify the program used to strip binaries. This is especially 940# annoying in cross-compiling environments, where the build's strip 941# is unlikely to handle the host's binaries. 942# Fortunately install-sh will honor a STRIPPROG variable, so we 943# always use install-sh in `make install-strip', and initialize 944# STRIPPROG with the value of the STRIP variable (set by the user). 945AC_DEFUN([AM_PROG_INSTALL_STRIP], 946[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 947# Installed binaries are usually stripped using `strip' when the user 948# run `make install-strip'. However `strip' might not be the right 949# tool to use in cross-compilation environments, therefore Automake 950# will honor the `STRIP' environment variable to overrule this program. 951dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 952if test "$cross_compiling" != no; then 953 AC_CHECK_TOOL([STRIP], [strip], :) 954fi 955INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 956AC_SUBST([INSTALL_STRIP_PROGRAM])]) 957 958# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 959# 960# This file is free software; the Free Software Foundation 961# gives unlimited permission to copy and/or distribute it, 962# with or without modifications, as long as this notice is preserved. 963 964# serial 3 965 966# _AM_SUBST_NOTMAKE(VARIABLE) 967# --------------------------- 968# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 969# This macro is traced by Automake. 970AC_DEFUN([_AM_SUBST_NOTMAKE]) 971 972# AM_SUBST_NOTMAKE(VARIABLE) 973# -------------------------- 974# Public sister of _AM_SUBST_NOTMAKE. 975AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 976 977# Check how to create a tarball. -*- Autoconf -*- 978 979# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 980# 981# This file is free software; the Free Software Foundation 982# gives unlimited permission to copy and/or distribute it, 983# with or without modifications, as long as this notice is preserved. 984 985# serial 2 986 987# _AM_PROG_TAR(FORMAT) 988# -------------------- 989# Check how to create a tarball in format FORMAT. 990# FORMAT should be one of `v7', `ustar', or `pax'. 991# 992# Substitute a variable $(am__tar) that is a command 993# writing to stdout a FORMAT-tarball containing the directory 994# $tardir. 995# tardir=directory && $(am__tar) > result.tar 996# 997# Substitute a variable $(am__untar) that extract such 998# a tarball read from stdin. 999# $(am__untar) < result.tar 1000AC_DEFUN([_AM_PROG_TAR], 1001[# Always define AMTAR for backward compatibility. 1002AM_MISSING_PROG([AMTAR], [tar]) 1003m4_if([$1], [v7], 1004 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1005 [m4_case([$1], [ustar],, [pax],, 1006 [m4_fatal([Unknown tar format])]) 1007AC_MSG_CHECKING([how to create a $1 tar archive]) 1008# Loop over all known methods to create a tar archive until one works. 1009_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1010_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1011# Do not fold the above two line into one, because Tru64 sh and 1012# Solaris sh will not grok spaces in the rhs of `-'. 1013for _am_tool in $_am_tools 1014do 1015 case $_am_tool in 1016 gnutar) 1017 for _am_tar in tar gnutar gtar; 1018 do 1019 AM_RUN_LOG([$_am_tar --version]) && break 1020 done 1021 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1022 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1023 am__untar="$_am_tar -xf -" 1024 ;; 1025 plaintar) 1026 # Must skip GNU tar: if it does not support --format= it doesn't create 1027 # ustar tarball either. 1028 (tar --version) >/dev/null 2>&1 && continue 1029 am__tar='tar chf - "$$tardir"' 1030 am__tar_='tar chf - "$tardir"' 1031 am__untar='tar xf -' 1032 ;; 1033 pax) 1034 am__tar='pax -L -x $1 -w "$$tardir"' 1035 am__tar_='pax -L -x $1 -w "$tardir"' 1036 am__untar='pax -r' 1037 ;; 1038 cpio) 1039 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1040 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1041 am__untar='cpio -i -H $1 -d' 1042 ;; 1043 none) 1044 am__tar=false 1045 am__tar_=false 1046 am__untar=false 1047 ;; 1048 esac 1049 1050 # If the value was cached, stop now. We just wanted to have am__tar 1051 # and am__untar set. 1052 test -n "${am_cv_prog_tar_$1}" && break 1053 1054 # tar/untar a dummy directory, and stop if the command works 1055 rm -rf conftest.dir 1056 mkdir conftest.dir 1057 echo GrepMe > conftest.dir/file 1058 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1059 rm -rf conftest.dir 1060 if test -s conftest.tar; then 1061 AM_RUN_LOG([$am__untar <conftest.tar]) 1062 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1063 fi 1064done 1065rm -rf conftest.dir 1066 1067AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1068AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1069AC_SUBST([am__tar]) 1070AC_SUBST([am__untar]) 1071]) # _AM_PROG_TAR 1072 1073# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1074# 1075# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1076# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1077# Foundation, Inc. 1078# Written by Gordon Matzigkeit, 1996 1079# 1080# This file is free software; the Free Software Foundation gives 1081# unlimited permission to copy and/or distribute it, with or without 1082# modifications, as long as this notice is preserved. 1083 1084m4_define([_LT_COPYING], [dnl 1085# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1086# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1087# Foundation, Inc. 1088# Written by Gordon Matzigkeit, 1996 1089# 1090# This file is part of GNU Libtool. 1091# 1092# GNU Libtool is free software; you can redistribute it and/or 1093# modify it under the terms of the GNU General Public License as 1094# published by the Free Software Foundation; either version 2 of 1095# the License, or (at your option) any later version. 1096# 1097# As a special exception to the GNU General Public License, 1098# if you distribute this file as part of a program or library that 1099# is built using GNU Libtool, you may include this file under the 1100# same distribution terms that you use for the rest of that program. 1101# 1102# GNU Libtool is distributed in the hope that it will be useful, 1103# but WITHOUT ANY WARRANTY; without even the implied warranty of 1104# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1105# GNU General Public License for more details. 1106# 1107# You should have received a copy of the GNU General Public License 1108# along with GNU Libtool; see the file COPYING. If not, a copy 1109# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1110# obtained by writing to the Free Software Foundation, Inc., 1111# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1112]) 1113 1114# serial 57 LT_INIT 1115 1116 1117# LT_PREREQ(VERSION) 1118# ------------------ 1119# Complain and exit if this libtool version is less that VERSION. 1120m4_defun([LT_PREREQ], 1121[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1122 [m4_default([$3], 1123 [m4_fatal([Libtool version $1 or higher is required], 1124 63)])], 1125 [$2])]) 1126 1127 1128# _LT_CHECK_BUILDDIR 1129# ------------------ 1130# Complain if the absolute build directory name contains unusual characters 1131m4_defun([_LT_CHECK_BUILDDIR], 1132[case `pwd` in 1133 *\ * | *\ *) 1134 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1135esac 1136]) 1137 1138 1139# LT_INIT([OPTIONS]) 1140# ------------------ 1141AC_DEFUN([LT_INIT], 1142[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1143AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1144AC_BEFORE([$0], [LT_LANG])dnl 1145AC_BEFORE([$0], [LT_OUTPUT])dnl 1146AC_BEFORE([$0], [LTDL_INIT])dnl 1147m4_require([_LT_CHECK_BUILDDIR])dnl 1148 1149dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1150m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1151m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1152dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1153dnl unless we require an AC_DEFUNed macro: 1154AC_REQUIRE([LTOPTIONS_VERSION])dnl 1155AC_REQUIRE([LTSUGAR_VERSION])dnl 1156AC_REQUIRE([LTVERSION_VERSION])dnl 1157AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1158m4_require([_LT_PROG_LTMAIN])dnl 1159 1160_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1161 1162dnl Parse OPTIONS 1163_LT_SET_OPTIONS([$0], [$1]) 1164 1165# This can be used to rebuild libtool when needed 1166LIBTOOL_DEPS="$ltmain" 1167 1168# Always use our own libtool. 1169LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1170AC_SUBST(LIBTOOL)dnl 1171 1172_LT_SETUP 1173 1174# Only expand once: 1175m4_define([LT_INIT]) 1176])# LT_INIT 1177 1178# Old names: 1179AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1180AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1181dnl aclocal-1.4 backwards compatibility: 1182dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1183dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1184 1185 1186# _LT_CC_BASENAME(CC) 1187# ------------------- 1188# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1189m4_defun([_LT_CC_BASENAME], 1190[for cc_temp in $1""; do 1191 case $cc_temp in 1192 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1193 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1194 \-*) ;; 1195 *) break;; 1196 esac 1197done 1198cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1199]) 1200 1201 1202# _LT_FILEUTILS_DEFAULTS 1203# ---------------------- 1204# It is okay to use these file commands and assume they have been set 1205# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1206m4_defun([_LT_FILEUTILS_DEFAULTS], 1207[: ${CP="cp -f"} 1208: ${MV="mv -f"} 1209: ${RM="rm -f"} 1210])# _LT_FILEUTILS_DEFAULTS 1211 1212 1213# _LT_SETUP 1214# --------- 1215m4_defun([_LT_SETUP], 1216[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1217AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1218AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1219AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1220 1221_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1222dnl 1223_LT_DECL([], [host_alias], [0], [The host system])dnl 1224_LT_DECL([], [host], [0])dnl 1225_LT_DECL([], [host_os], [0])dnl 1226dnl 1227_LT_DECL([], [build_alias], [0], [The build system])dnl 1228_LT_DECL([], [build], [0])dnl 1229_LT_DECL([], [build_os], [0])dnl 1230dnl 1231AC_REQUIRE([AC_PROG_CC])dnl 1232AC_REQUIRE([LT_PATH_LD])dnl 1233AC_REQUIRE([LT_PATH_NM])dnl 1234dnl 1235AC_REQUIRE([AC_PROG_LN_S])dnl 1236test -z "$LN_S" && LN_S="ln -s" 1237_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1238dnl 1239AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1240_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1241_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1242dnl 1243m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1244m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1245m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1246m4_require([_LT_CMD_RELOAD])dnl 1247m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1248m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1249m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1250m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1251m4_require([_LT_WITH_SYSROOT])dnl 1252 1253_LT_CONFIG_LIBTOOL_INIT([ 1254# See if we are running on zsh, and set the options which allow our 1255# commands through without removal of \ escapes INIT. 1256if test -n "\${ZSH_VERSION+set}" ; then 1257 setopt NO_GLOB_SUBST 1258fi 1259]) 1260if test -n "${ZSH_VERSION+set}" ; then 1261 setopt NO_GLOB_SUBST 1262fi 1263 1264_LT_CHECK_OBJDIR 1265 1266m4_require([_LT_TAG_COMPILER])dnl 1267 1268case $host_os in 1269aix3*) 1270 # AIX sometimes has problems with the GCC collect2 program. For some 1271 # reason, if we set the COLLECT_NAMES environment variable, the problems 1272 # vanish in a puff of smoke. 1273 if test "X${COLLECT_NAMES+set}" != Xset; then 1274 COLLECT_NAMES= 1275 export COLLECT_NAMES 1276 fi 1277 ;; 1278esac 1279 1280# Global variables: 1281ofile=libtool 1282can_build_shared=yes 1283 1284# All known linkers require a `.a' archive for static linking (except MSVC, 1285# which needs '.lib'). 1286libext=a 1287 1288with_gnu_ld="$lt_cv_prog_gnu_ld" 1289 1290old_CC="$CC" 1291old_CFLAGS="$CFLAGS" 1292 1293# Set sane defaults for various variables 1294test -z "$CC" && CC=cc 1295test -z "$LTCC" && LTCC=$CC 1296test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1297test -z "$LD" && LD=ld 1298test -z "$ac_objext" && ac_objext=o 1299 1300_LT_CC_BASENAME([$compiler]) 1301 1302# Only perform the check for file, if the check method requires it 1303test -z "$MAGIC_CMD" && MAGIC_CMD=file 1304case $deplibs_check_method in 1305file_magic*) 1306 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1307 _LT_PATH_MAGIC 1308 fi 1309 ;; 1310esac 1311 1312# Use C for the default configuration in the libtool script 1313LT_SUPPORTED_TAG([CC]) 1314_LT_LANG_C_CONFIG 1315_LT_LANG_DEFAULT_CONFIG 1316_LT_CONFIG_COMMANDS 1317])# _LT_SETUP 1318 1319 1320# _LT_PREPARE_SED_QUOTE_VARS 1321# -------------------------- 1322# Define a few sed substitution that help us do robust quoting. 1323m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1324[# Backslashify metacharacters that are still active within 1325# double-quoted strings. 1326sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1327 1328# Same as above, but do not quote variable references. 1329double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1330 1331# Sed substitution to delay expansion of an escaped shell variable in a 1332# double_quote_subst'ed string. 1333delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1334 1335# Sed substitution to delay expansion of an escaped single quote. 1336delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1337 1338# Sed substitution to avoid accidental globbing in evaled expressions 1339no_glob_subst='s/\*/\\\*/g' 1340]) 1341 1342# _LT_PROG_LTMAIN 1343# --------------- 1344# Note that this code is called both from `configure', and `config.status' 1345# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1346# `config.status' has no value for ac_aux_dir unless we are using Automake, 1347# so we pass a copy along to make sure it has a sensible value anyway. 1348m4_defun([_LT_PROG_LTMAIN], 1349[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1350_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1351ltmain="$ac_aux_dir/ltmain.sh" 1352])# _LT_PROG_LTMAIN 1353 1354 1355 1356# So that we can recreate a full libtool script including additional 1357# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1358# in macros and then make a single call at the end using the `libtool' 1359# label. 1360 1361 1362# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1363# ---------------------------------------- 1364# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1365m4_define([_LT_CONFIG_LIBTOOL_INIT], 1366[m4_ifval([$1], 1367 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1368 [$1 1369])])]) 1370 1371# Initialize. 1372m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1373 1374 1375# _LT_CONFIG_LIBTOOL([COMMANDS]) 1376# ------------------------------ 1377# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1378m4_define([_LT_CONFIG_LIBTOOL], 1379[m4_ifval([$1], 1380 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1381 [$1 1382])])]) 1383 1384# Initialize. 1385m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1386 1387 1388# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1389# ----------------------------------------------------- 1390m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1391[_LT_CONFIG_LIBTOOL([$1]) 1392_LT_CONFIG_LIBTOOL_INIT([$2]) 1393]) 1394 1395 1396# _LT_FORMAT_COMMENT([COMMENT]) 1397# ----------------------------- 1398# Add leading comment marks to the start of each line, and a trailing 1399# full-stop to the whole comment if one is not present already. 1400m4_define([_LT_FORMAT_COMMENT], 1401[m4_ifval([$1], [ 1402m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1403 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1404)]) 1405 1406 1407 1408 1409 1410# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1411# ------------------------------------------------------------------- 1412# CONFIGNAME is the name given to the value in the libtool script. 1413# VARNAME is the (base) name used in the configure script. 1414# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1415# VARNAME. Any other value will be used directly. 1416m4_define([_LT_DECL], 1417[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1418 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1419 [m4_ifval([$1], [$1], [$2])]) 1420 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1421 m4_ifval([$4], 1422 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1423 lt_dict_add_subkey([lt_decl_dict], [$2], 1424 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1425]) 1426 1427 1428# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1429# -------------------------------------------------------- 1430m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1431 1432 1433# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1434# ------------------------------------------------ 1435m4_define([lt_decl_tag_varnames], 1436[_lt_decl_filter([tagged?], [yes], $@)]) 1437 1438 1439# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1440# --------------------------------------------------------- 1441m4_define([_lt_decl_filter], 1442[m4_case([$#], 1443 [0], [m4_fatal([$0: too few arguments: $#])], 1444 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1445 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1446 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1447 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1448]) 1449 1450 1451# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1452# -------------------------------------------------- 1453m4_define([lt_decl_quote_varnames], 1454[_lt_decl_filter([value], [1], $@)]) 1455 1456 1457# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1458# --------------------------------------------------- 1459m4_define([lt_decl_dquote_varnames], 1460[_lt_decl_filter([value], [2], $@)]) 1461 1462 1463# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1464# --------------------------------------------------- 1465m4_define([lt_decl_varnames_tagged], 1466[m4_assert([$# <= 2])dnl 1467_$0(m4_quote(m4_default([$1], [[, ]])), 1468 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1469 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1470m4_define([_lt_decl_varnames_tagged], 1471[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1472 1473 1474# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1475# ------------------------------------------------ 1476m4_define([lt_decl_all_varnames], 1477[_$0(m4_quote(m4_default([$1], [[, ]])), 1478 m4_if([$2], [], 1479 m4_quote(lt_decl_varnames), 1480 m4_quote(m4_shift($@))))[]dnl 1481]) 1482m4_define([_lt_decl_all_varnames], 1483[lt_join($@, lt_decl_varnames_tagged([$1], 1484 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1485]) 1486 1487 1488# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1489# ------------------------------------ 1490# Quote a variable value, and forward it to `config.status' so that its 1491# declaration there will have the same value as in `configure'. VARNAME 1492# must have a single quote delimited value for this to work. 1493m4_define([_LT_CONFIG_STATUS_DECLARE], 1494[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1495 1496 1497# _LT_CONFIG_STATUS_DECLARATIONS 1498# ------------------------------ 1499# We delimit libtool config variables with single quotes, so when 1500# we write them to config.status, we have to be sure to quote all 1501# embedded single quotes properly. In configure, this macro expands 1502# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1503# 1504# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1505m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1506[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1507 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1508 1509 1510# _LT_LIBTOOL_TAGS 1511# ---------------- 1512# Output comment and list of tags supported by the script 1513m4_defun([_LT_LIBTOOL_TAGS], 1514[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1515available_tags="_LT_TAGS"dnl 1516]) 1517 1518 1519# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1520# ----------------------------------- 1521# Extract the dictionary values for VARNAME (optionally with TAG) and 1522# expand to a commented shell variable setting: 1523# 1524# # Some comment about what VAR is for. 1525# visible_name=$lt_internal_name 1526m4_define([_LT_LIBTOOL_DECLARE], 1527[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1528 [description])))[]dnl 1529m4_pushdef([_libtool_name], 1530 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1531m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1532 [0], [_libtool_name=[$]$1], 1533 [1], [_libtool_name=$lt_[]$1], 1534 [2], [_libtool_name=$lt_[]$1], 1535 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1536m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1537]) 1538 1539 1540# _LT_LIBTOOL_CONFIG_VARS 1541# ----------------------- 1542# Produce commented declarations of non-tagged libtool config variables 1543# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1544# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1545# section) are produced by _LT_LIBTOOL_TAG_VARS. 1546m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1547[m4_foreach([_lt_var], 1548 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1549 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1550 1551 1552# _LT_LIBTOOL_TAG_VARS(TAG) 1553# ------------------------- 1554m4_define([_LT_LIBTOOL_TAG_VARS], 1555[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1556 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1557 1558 1559# _LT_TAGVAR(VARNAME, [TAGNAME]) 1560# ------------------------------ 1561m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1562 1563 1564# _LT_CONFIG_COMMANDS 1565# ------------------- 1566# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1567# variables for single and double quote escaping we saved from calls 1568# to _LT_DECL, we can put quote escaped variables declarations 1569# into `config.status', and then the shell code to quote escape them in 1570# for loops in `config.status'. Finally, any additional code accumulated 1571# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1572m4_defun([_LT_CONFIG_COMMANDS], 1573[AC_PROVIDE_IFELSE([LT_OUTPUT], 1574 dnl If the libtool generation code has been placed in $CONFIG_LT, 1575 dnl instead of duplicating it all over again into config.status, 1576 dnl then we will have config.status run $CONFIG_LT later, so it 1577 dnl needs to know what name is stored there: 1578 [AC_CONFIG_COMMANDS([libtool], 1579 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1580 dnl If the libtool generation code is destined for config.status, 1581 dnl expand the accumulated commands and init code now: 1582 [AC_CONFIG_COMMANDS([libtool], 1583 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1584])#_LT_CONFIG_COMMANDS 1585 1586 1587# Initialize. 1588m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1589[ 1590 1591# The HP-UX ksh and POSIX shell print the target directory to stdout 1592# if CDPATH is set. 1593(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1594 1595sed_quote_subst='$sed_quote_subst' 1596double_quote_subst='$double_quote_subst' 1597delay_variable_subst='$delay_variable_subst' 1598_LT_CONFIG_STATUS_DECLARATIONS 1599LTCC='$LTCC' 1600LTCFLAGS='$LTCFLAGS' 1601compiler='$compiler_DEFAULT' 1602 1603# A function that is used when there is no print builtin or printf. 1604func_fallback_echo () 1605{ 1606 eval 'cat <<_LTECHO_EOF 1607\$[]1 1608_LTECHO_EOF' 1609} 1610 1611# Quote evaled strings. 1612for var in lt_decl_all_varnames([[ \ 1613]], lt_decl_quote_varnames); do 1614 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1615 *[[\\\\\\\`\\"\\\$]]*) 1616 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1617 ;; 1618 *) 1619 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1620 ;; 1621 esac 1622done 1623 1624# Double-quote double-evaled strings. 1625for var in lt_decl_all_varnames([[ \ 1626]], lt_decl_dquote_varnames); do 1627 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1628 *[[\\\\\\\`\\"\\\$]]*) 1629 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1630 ;; 1631 *) 1632 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1633 ;; 1634 esac 1635done 1636 1637_LT_OUTPUT_LIBTOOL_INIT 1638]) 1639 1640# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1641# ------------------------------------ 1642# Generate a child script FILE with all initialization necessary to 1643# reuse the environment learned by the parent script, and make the 1644# file executable. If COMMENT is supplied, it is inserted after the 1645# `#!' sequence but before initialization text begins. After this 1646# macro, additional text can be appended to FILE to form the body of 1647# the child script. The macro ends with non-zero status if the 1648# file could not be fully written (such as if the disk is full). 1649m4_ifdef([AS_INIT_GENERATED], 1650[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1651[m4_defun([_LT_GENERATED_FILE_INIT], 1652[m4_require([AS_PREPARE])]dnl 1653[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1654[lt_write_fail=0 1655cat >$1 <<_ASEOF || lt_write_fail=1 1656#! $SHELL 1657# Generated by $as_me. 1658$2 1659SHELL=\${CONFIG_SHELL-$SHELL} 1660export SHELL 1661_ASEOF 1662cat >>$1 <<\_ASEOF || lt_write_fail=1 1663AS_SHELL_SANITIZE 1664_AS_PREPARE 1665exec AS_MESSAGE_FD>&1 1666_ASEOF 1667test $lt_write_fail = 0 && chmod +x $1[]dnl 1668m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1669 1670# LT_OUTPUT 1671# --------- 1672# This macro allows early generation of the libtool script (before 1673# AC_OUTPUT is called), incase it is used in configure for compilation 1674# tests. 1675AC_DEFUN([LT_OUTPUT], 1676[: ${CONFIG_LT=./config.lt} 1677AC_MSG_NOTICE([creating $CONFIG_LT]) 1678_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1679[# Run this file to recreate a libtool stub with the current configuration.]) 1680 1681cat >>"$CONFIG_LT" <<\_LTEOF 1682lt_cl_silent=false 1683exec AS_MESSAGE_LOG_FD>>config.log 1684{ 1685 echo 1686 AS_BOX([Running $as_me.]) 1687} >&AS_MESSAGE_LOG_FD 1688 1689lt_cl_help="\ 1690\`$as_me' creates a local libtool stub from the current configuration, 1691for use in further configure time tests before the real libtool is 1692generated. 1693 1694Usage: $[0] [[OPTIONS]] 1695 1696 -h, --help print this help, then exit 1697 -V, --version print version number, then exit 1698 -q, --quiet do not print progress messages 1699 -d, --debug don't remove temporary files 1700 1701Report bugs to <bug-libtool@gnu.org>." 1702 1703lt_cl_version="\ 1704m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1705m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1706configured by $[0], generated by m4_PACKAGE_STRING. 1707 1708Copyright (C) 2011 Free Software Foundation, Inc. 1709This config.lt script is free software; the Free Software Foundation 1710gives unlimited permision to copy, distribute and modify it." 1711 1712while test $[#] != 0 1713do 1714 case $[1] in 1715 --version | --v* | -V ) 1716 echo "$lt_cl_version"; exit 0 ;; 1717 --help | --h* | -h ) 1718 echo "$lt_cl_help"; exit 0 ;; 1719 --debug | --d* | -d ) 1720 debug=: ;; 1721 --quiet | --q* | --silent | --s* | -q ) 1722 lt_cl_silent=: ;; 1723 1724 -*) AC_MSG_ERROR([unrecognized option: $[1] 1725Try \`$[0] --help' for more information.]) ;; 1726 1727 *) AC_MSG_ERROR([unrecognized argument: $[1] 1728Try \`$[0] --help' for more information.]) ;; 1729 esac 1730 shift 1731done 1732 1733if $lt_cl_silent; then 1734 exec AS_MESSAGE_FD>/dev/null 1735fi 1736_LTEOF 1737 1738cat >>"$CONFIG_LT" <<_LTEOF 1739_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1740_LTEOF 1741 1742cat >>"$CONFIG_LT" <<\_LTEOF 1743AC_MSG_NOTICE([creating $ofile]) 1744_LT_OUTPUT_LIBTOOL_COMMANDS 1745AS_EXIT(0) 1746_LTEOF 1747chmod +x "$CONFIG_LT" 1748 1749# configure is writing to config.log, but config.lt does its own redirection, 1750# appending to config.log, which fails on DOS, as config.log is still kept 1751# open by configure. Here we exec the FD to /dev/null, effectively closing 1752# config.log, so it can be properly (re)opened and appended to by config.lt. 1753lt_cl_success=: 1754test "$silent" = yes && 1755 lt_config_lt_args="$lt_config_lt_args --quiet" 1756exec AS_MESSAGE_LOG_FD>/dev/null 1757$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1758exec AS_MESSAGE_LOG_FD>>config.log 1759$lt_cl_success || AS_EXIT(1) 1760])# LT_OUTPUT 1761 1762 1763# _LT_CONFIG(TAG) 1764# --------------- 1765# If TAG is the built-in tag, create an initial libtool script with a 1766# default configuration from the untagged config vars. Otherwise add code 1767# to config.status for appending the configuration named by TAG from the 1768# matching tagged config vars. 1769m4_defun([_LT_CONFIG], 1770[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1771_LT_CONFIG_SAVE_COMMANDS([ 1772 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1773 m4_if(_LT_TAG, [C], [ 1774 # See if we are running on zsh, and set the options which allow our 1775 # commands through without removal of \ escapes. 1776 if test -n "${ZSH_VERSION+set}" ; then 1777 setopt NO_GLOB_SUBST 1778 fi 1779 1780 cfgfile="${ofile}T" 1781 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1782 $RM "$cfgfile" 1783 1784 cat <<_LT_EOF >> "$cfgfile" 1785#! $SHELL 1786 1787# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1788# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1789# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1790# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1791# 1792_LT_COPYING 1793_LT_LIBTOOL_TAGS 1794 1795# ### BEGIN LIBTOOL CONFIG 1796_LT_LIBTOOL_CONFIG_VARS 1797_LT_LIBTOOL_TAG_VARS 1798# ### END LIBTOOL CONFIG 1799 1800_LT_EOF 1801 1802 case $host_os in 1803 aix3*) 1804 cat <<\_LT_EOF >> "$cfgfile" 1805# AIX sometimes has problems with the GCC collect2 program. For some 1806# reason, if we set the COLLECT_NAMES environment variable, the problems 1807# vanish in a puff of smoke. 1808if test "X${COLLECT_NAMES+set}" != Xset; then 1809 COLLECT_NAMES= 1810 export COLLECT_NAMES 1811fi 1812_LT_EOF 1813 ;; 1814 esac 1815 1816 _LT_PROG_LTMAIN 1817 1818 # We use sed instead of cat because bash on DJGPP gets confused if 1819 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1820 # text mode, it properly converts lines to CR/LF. This bash problem 1821 # is reportedly fixed, but why not run on old versions too? 1822 sed '$q' "$ltmain" >> "$cfgfile" \ 1823 || (rm -f "$cfgfile"; exit 1) 1824 1825 _LT_PROG_REPLACE_SHELLFNS 1826 1827 mv -f "$cfgfile" "$ofile" || 1828 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1829 chmod +x "$ofile" 1830], 1831[cat <<_LT_EOF >> "$ofile" 1832 1833dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1834dnl in a comment (ie after a #). 1835# ### BEGIN LIBTOOL TAG CONFIG: $1 1836_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1837# ### END LIBTOOL TAG CONFIG: $1 1838_LT_EOF 1839])dnl /m4_if 1840], 1841[m4_if([$1], [], [ 1842 PACKAGE='$PACKAGE' 1843 VERSION='$VERSION' 1844 TIMESTAMP='$TIMESTAMP' 1845 RM='$RM' 1846 ofile='$ofile'], []) 1847])dnl /_LT_CONFIG_SAVE_COMMANDS 1848])# _LT_CONFIG 1849 1850 1851# LT_SUPPORTED_TAG(TAG) 1852# --------------------- 1853# Trace this macro to discover what tags are supported by the libtool 1854# --tag option, using: 1855# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1856AC_DEFUN([LT_SUPPORTED_TAG], []) 1857 1858 1859# C support is built-in for now 1860m4_define([_LT_LANG_C_enabled], []) 1861m4_define([_LT_TAGS], []) 1862 1863 1864# LT_LANG(LANG) 1865# ------------- 1866# Enable libtool support for the given language if not already enabled. 1867AC_DEFUN([LT_LANG], 1868[AC_BEFORE([$0], [LT_OUTPUT])dnl 1869m4_case([$1], 1870 [C], [_LT_LANG(C)], 1871 [C++], [_LT_LANG(CXX)], 1872 [Go], [_LT_LANG(GO)], 1873 [Java], [_LT_LANG(GCJ)], 1874 [Fortran 77], [_LT_LANG(F77)], 1875 [Fortran], [_LT_LANG(FC)], 1876 [Windows Resource], [_LT_LANG(RC)], 1877 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1878 [_LT_LANG($1)], 1879 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1880])# LT_LANG 1881 1882 1883# _LT_LANG(LANGNAME) 1884# ------------------ 1885m4_defun([_LT_LANG], 1886[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1887 [LT_SUPPORTED_TAG([$1])dnl 1888 m4_append([_LT_TAGS], [$1 ])dnl 1889 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1890 _LT_LANG_$1_CONFIG($1)])dnl 1891])# _LT_LANG 1892 1893 1894m4_ifndef([AC_PROG_GO], [ 1895# NOTE: This macro has been submitted for inclusion into # 1896# GNU Autoconf as AC_PROG_GO. When it is available in # 1897# a released version of Autoconf we should remove this # 1898# macro and use it instead. # 1899m4_defun([AC_PROG_GO], 1900[AC_LANG_PUSH(Go)dnl 1901AC_ARG_VAR([GOC], [Go compiler command])dnl 1902AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1903_AC_ARG_VAR_LDFLAGS()dnl 1904AC_CHECK_TOOL(GOC, gccgo) 1905if test -z "$GOC"; then 1906 if test -n "$ac_tool_prefix"; then 1907 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1908 fi 1909fi 1910if test -z "$GOC"; then 1911 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1912fi 1913])#m4_defun 1914])#m4_ifndef 1915 1916 1917# _LT_LANG_DEFAULT_CONFIG 1918# ----------------------- 1919m4_defun([_LT_LANG_DEFAULT_CONFIG], 1920[AC_PROVIDE_IFELSE([AC_PROG_CXX], 1921 [LT_LANG(CXX)], 1922 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1923 1924AC_PROVIDE_IFELSE([AC_PROG_F77], 1925 [LT_LANG(F77)], 1926 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1927 1928AC_PROVIDE_IFELSE([AC_PROG_FC], 1929 [LT_LANG(FC)], 1930 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1931 1932dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 1933dnl pulling things in needlessly. 1934AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1935 [LT_LANG(GCJ)], 1936 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1937 [LT_LANG(GCJ)], 1938 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 1939 [LT_LANG(GCJ)], 1940 [m4_ifdef([AC_PROG_GCJ], 1941 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 1942 m4_ifdef([A][M_PROG_GCJ], 1943 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 1944 m4_ifdef([LT_PROG_GCJ], 1945 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1946 1947AC_PROVIDE_IFELSE([AC_PROG_GO], 1948 [LT_LANG(GO)], 1949 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1950 1951AC_PROVIDE_IFELSE([LT_PROG_RC], 1952 [LT_LANG(RC)], 1953 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 1954])# _LT_LANG_DEFAULT_CONFIG 1955 1956# Obsolete macros: 1957AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 1958AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 1959AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 1960AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 1961AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 1962dnl aclocal-1.4 backwards compatibility: 1963dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 1964dnl AC_DEFUN([AC_LIBTOOL_F77], []) 1965dnl AC_DEFUN([AC_LIBTOOL_FC], []) 1966dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 1967dnl AC_DEFUN([AC_LIBTOOL_RC], []) 1968 1969 1970# _LT_TAG_COMPILER 1971# ---------------- 1972m4_defun([_LT_TAG_COMPILER], 1973[AC_REQUIRE([AC_PROG_CC])dnl 1974 1975_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 1976_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 1977_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 1978_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1979 1980# If no C compiler was specified, use CC. 1981LTCC=${LTCC-"$CC"} 1982 1983# If no C compiler flags were specified, use CFLAGS. 1984LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1985 1986# Allow CC to be a program name with arguments. 1987compiler=$CC 1988])# _LT_TAG_COMPILER 1989 1990 1991# _LT_COMPILER_BOILERPLATE 1992# ------------------------ 1993# Check for compiler boilerplate output or warnings with 1994# the simple compiler test code. 1995m4_defun([_LT_COMPILER_BOILERPLATE], 1996[m4_require([_LT_DECL_SED])dnl 1997ac_outfile=conftest.$ac_objext 1998echo "$lt_simple_compile_test_code" >conftest.$ac_ext 1999eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2000_lt_compiler_boilerplate=`cat conftest.err` 2001$RM conftest* 2002])# _LT_COMPILER_BOILERPLATE 2003 2004 2005# _LT_LINKER_BOILERPLATE 2006# ---------------------- 2007# Check for linker boilerplate output or warnings with 2008# the simple link test code. 2009m4_defun([_LT_LINKER_BOILERPLATE], 2010[m4_require([_LT_DECL_SED])dnl 2011ac_outfile=conftest.$ac_objext 2012echo "$lt_simple_link_test_code" >conftest.$ac_ext 2013eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2014_lt_linker_boilerplate=`cat conftest.err` 2015$RM -r conftest* 2016])# _LT_LINKER_BOILERPLATE 2017 2018# _LT_REQUIRED_DARWIN_CHECKS 2019# ------------------------- 2020m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2021 case $host_os in 2022 rhapsody* | darwin*) 2023 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2024 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2025 AC_CHECK_TOOL([LIPO], [lipo], [:]) 2026 AC_CHECK_TOOL([OTOOL], [otool], [:]) 2027 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2028 _LT_DECL([], [DSYMUTIL], [1], 2029 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2030 _LT_DECL([], [NMEDIT], [1], 2031 [Tool to change global to local symbols on Mac OS X]) 2032 _LT_DECL([], [LIPO], [1], 2033 [Tool to manipulate fat objects and archives on Mac OS X]) 2034 _LT_DECL([], [OTOOL], [1], 2035 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2036 _LT_DECL([], [OTOOL64], [1], 2037 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2038 2039 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2040 [lt_cv_apple_cc_single_mod=no 2041 if test -z "${LT_MULTI_MODULE}"; then 2042 # By default we will add the -single_module flag. You can override 2043 # by either setting the environment variable LT_MULTI_MODULE 2044 # non-empty at configure time, or by adding -multi_module to the 2045 # link flags. 2046 rm -rf libconftest.dylib* 2047 echo "int foo(void){return 1;}" > conftest.c 2048 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2049-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2050 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2051 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2052 _lt_result=$? 2053 # If there is a non-empty error log, and "single_module" 2054 # appears in it, assume the flag caused a linker warning 2055 if test -s conftest.err && $GREP single_module conftest.err; then 2056 cat conftest.err >&AS_MESSAGE_LOG_FD 2057 # Otherwise, if the output was created with a 0 exit code from 2058 # the compiler, it worked. 2059 elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2060 lt_cv_apple_cc_single_mod=yes 2061 else 2062 cat conftest.err >&AS_MESSAGE_LOG_FD 2063 fi 2064 rm -rf libconftest.dylib* 2065 rm -f conftest.* 2066 fi]) 2067 2068 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2069 [lt_cv_ld_exported_symbols_list], 2070 [lt_cv_ld_exported_symbols_list=no 2071 save_LDFLAGS=$LDFLAGS 2072 echo "_main" > conftest.sym 2073 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2074 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2075 [lt_cv_ld_exported_symbols_list=yes], 2076 [lt_cv_ld_exported_symbols_list=no]) 2077 LDFLAGS="$save_LDFLAGS" 2078 ]) 2079 2080 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2081 [lt_cv_ld_force_load=no 2082 cat > conftest.c << _LT_EOF 2083int forced_loaded() { return 2;} 2084_LT_EOF 2085 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2086 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2087 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2088 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2089 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2090 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2091 cat > conftest.c << _LT_EOF 2092int main() { return 0;} 2093_LT_EOF 2094 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2095 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2096 _lt_result=$? 2097 if test -s conftest.err && $GREP force_load conftest.err; then 2098 cat conftest.err >&AS_MESSAGE_LOG_FD 2099 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2100 lt_cv_ld_force_load=yes 2101 else 2102 cat conftest.err >&AS_MESSAGE_LOG_FD 2103 fi 2104 rm -f conftest.err libconftest.a conftest conftest.c 2105 rm -rf conftest.dSYM 2106 ]) 2107 case $host_os in 2108 rhapsody* | darwin1.[[012]]) 2109 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2110 darwin1.*) 2111 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2112 darwin*) # darwin 5.x on 2113 # if running on 10.5 or later, the deployment target defaults 2114 # to the OS version, if on x86, and 10.4, the deployment 2115 # target defaults to 10.4. Don't you love it? 2116 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2117 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2118 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2119 10.[[012]]*) 2120 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2121 10.*) 2122 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2123 esac 2124 ;; 2125 esac 2126 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2127 _lt_dar_single_mod='$single_module' 2128 fi 2129 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2130 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2131 else 2132 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2133 fi 2134 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2135 _lt_dsymutil='~$DSYMUTIL $lib || :' 2136 else 2137 _lt_dsymutil= 2138 fi 2139 ;; 2140 esac 2141]) 2142 2143 2144# _LT_DARWIN_LINKER_FEATURES([TAG]) 2145# --------------------------------- 2146# Checks for linker and compiler features on darwin 2147m4_defun([_LT_DARWIN_LINKER_FEATURES], 2148[ 2149 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2150 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2151 _LT_TAGVAR(hardcode_direct, $1)=no 2152 _LT_TAGVAR(hardcode_automatic, $1)=yes 2153 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2154 if test "$lt_cv_ld_force_load" = "yes"; then 2155 _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\"`' 2156 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2157 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2158 else 2159 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2160 fi 2161 _LT_TAGVAR(link_all_deplibs, $1)=yes 2162 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2163 case $cc_basename in 2164 ifort*) _lt_dar_can_shared=yes ;; 2165 *) _lt_dar_can_shared=$GCC ;; 2166 esac 2167 if test "$_lt_dar_can_shared" = "yes"; then 2168 output_verbose_link_cmd=func_echo_all 2169 _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}" 2170 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2171 _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}" 2172 _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}" 2173 m4_if([$1], [CXX], 2174[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2175 _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}" 2176 _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}" 2177 fi 2178],[]) 2179 else 2180 _LT_TAGVAR(ld_shlibs, $1)=no 2181 fi 2182]) 2183 2184# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2185# ---------------------------------- 2186# Links a minimal program and checks the executable 2187# for the system default hardcoded library path. In most cases, 2188# this is /usr/lib:/lib, but when the MPI compilers are used 2189# the location of the communication and MPI libs are included too. 2190# If we don't find anything, use the default library path according 2191# to the aix ld manual. 2192# Store the results from the different compilers for each TAGNAME. 2193# Allow to override them for all tags through lt_cv_aix_libpath. 2194m4_defun([_LT_SYS_MODULE_PATH_AIX], 2195[m4_require([_LT_DECL_SED])dnl 2196if test "${lt_cv_aix_libpath+set}" = set; then 2197 aix_libpath=$lt_cv_aix_libpath 2198else 2199 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2200 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2201 lt_aix_libpath_sed='[ 2202 /Import File Strings/,/^$/ { 2203 /^0/ { 2204 s/^0 *\([^ ]*\) *$/\1/ 2205 p 2206 } 2207 }]' 2208 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2209 # Check for a 64-bit object if we didn't find anything. 2210 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2211 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2212 fi],[]) 2213 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2214 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2215 fi 2216 ]) 2217 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2218fi 2219])# _LT_SYS_MODULE_PATH_AIX 2220 2221 2222# _LT_SHELL_INIT(ARG) 2223# ------------------- 2224m4_define([_LT_SHELL_INIT], 2225[m4_divert_text([M4SH-INIT], [$1 2226])])# _LT_SHELL_INIT 2227 2228 2229 2230# _LT_PROG_ECHO_BACKSLASH 2231# ----------------------- 2232# Find how we can fake an echo command that does not interpret backslash. 2233# In particular, with Autoconf 2.60 or later we add some code to the start 2234# of the generated configure script which will find a shell with a builtin 2235# printf (which we can use as an echo command). 2236m4_defun([_LT_PROG_ECHO_BACKSLASH], 2237[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2238ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2239ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2240 2241AC_MSG_CHECKING([how to print strings]) 2242# Test print first, because it will be a builtin if present. 2243if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2244 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2245 ECHO='print -r --' 2246elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2247 ECHO='printf %s\n' 2248else 2249 # Use this function as a fallback that always works. 2250 func_fallback_echo () 2251 { 2252 eval 'cat <<_LTECHO_EOF 2253$[]1 2254_LTECHO_EOF' 2255 } 2256 ECHO='func_fallback_echo' 2257fi 2258 2259# func_echo_all arg... 2260# Invoke $ECHO with all args, space-separated. 2261func_echo_all () 2262{ 2263 $ECHO "$*" 2264} 2265 2266case "$ECHO" in 2267 printf*) AC_MSG_RESULT([printf]) ;; 2268 print*) AC_MSG_RESULT([print -r]) ;; 2269 *) AC_MSG_RESULT([cat]) ;; 2270esac 2271 2272m4_ifdef([_AS_DETECT_SUGGESTED], 2273[_AS_DETECT_SUGGESTED([ 2274 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2275 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2276 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2277 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2278 PATH=/empty FPATH=/empty; export PATH FPATH 2279 test "X`printf %s $ECHO`" = "X$ECHO" \ 2280 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2281 2282_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2283_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2284])# _LT_PROG_ECHO_BACKSLASH 2285 2286 2287# _LT_WITH_SYSROOT 2288# ---------------- 2289AC_DEFUN([_LT_WITH_SYSROOT], 2290[AC_MSG_CHECKING([for sysroot]) 2291AC_ARG_WITH([sysroot], 2292[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2293 (or the compiler's sysroot if not specified).], 2294[], [with_sysroot=no]) 2295 2296dnl lt_sysroot will always be passed unquoted. We quote it here 2297dnl in case the user passed a directory name. 2298lt_sysroot= 2299case ${with_sysroot} in #( 2300 yes) 2301 if test "$GCC" = yes; then 2302 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2303 fi 2304 ;; #( 2305 /*) 2306 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2307 ;; #( 2308 no|'') 2309 ;; #( 2310 *) 2311 AC_MSG_RESULT([${with_sysroot}]) 2312 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2313 ;; 2314esac 2315 2316 AC_MSG_RESULT([${lt_sysroot:-no}]) 2317_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2318[dependent libraries, and in which our libraries should be installed.])]) 2319 2320# _LT_ENABLE_LOCK 2321# --------------- 2322m4_defun([_LT_ENABLE_LOCK], 2323[AC_ARG_ENABLE([libtool-lock], 2324 [AS_HELP_STRING([--disable-libtool-lock], 2325 [avoid locking (might break parallel builds)])]) 2326test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2327 2328# Some flags need to be propagated to the compiler or linker for good 2329# libtool support. 2330case $host in 2331ia64-*-hpux*) 2332 # Find out which ABI we are using. 2333 echo 'int i;' > conftest.$ac_ext 2334 if AC_TRY_EVAL(ac_compile); then 2335 case `/usr/bin/file conftest.$ac_objext` in 2336 *ELF-32*) 2337 HPUX_IA64_MODE="32" 2338 ;; 2339 *ELF-64*) 2340 HPUX_IA64_MODE="64" 2341 ;; 2342 esac 2343 fi 2344 rm -rf conftest* 2345 ;; 2346*-*-irix6*) 2347 # Find out which ABI we are using. 2348 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2349 if AC_TRY_EVAL(ac_compile); then 2350 if test "$lt_cv_prog_gnu_ld" = yes; then 2351 case `/usr/bin/file conftest.$ac_objext` in 2352 *32-bit*) 2353 LD="${LD-ld} -melf32bsmip" 2354 ;; 2355 *N32*) 2356 LD="${LD-ld} -melf32bmipn32" 2357 ;; 2358 *64-bit*) 2359 LD="${LD-ld} -melf64bmip" 2360 ;; 2361 esac 2362 else 2363 case `/usr/bin/file conftest.$ac_objext` in 2364 *32-bit*) 2365 LD="${LD-ld} -32" 2366 ;; 2367 *N32*) 2368 LD="${LD-ld} -n32" 2369 ;; 2370 *64-bit*) 2371 LD="${LD-ld} -64" 2372 ;; 2373 esac 2374 fi 2375 fi 2376 rm -rf conftest* 2377 ;; 2378 2379x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2380s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2381 # Find out which ABI we are using. 2382 echo 'int i;' > conftest.$ac_ext 2383 if AC_TRY_EVAL(ac_compile); then 2384 case `/usr/bin/file conftest.o` in 2385 *32-bit*) 2386 case $host in 2387 x86_64-*kfreebsd*-gnu) 2388 LD="${LD-ld} -m elf_i386_fbsd" 2389 ;; 2390 x86_64-*linux*) 2391 LD="${LD-ld} -m elf_i386" 2392 ;; 2393 ppc64-*linux*|powerpc64-*linux*) 2394 LD="${LD-ld} -m elf32ppclinux" 2395 ;; 2396 s390x-*linux*) 2397 LD="${LD-ld} -m elf_s390" 2398 ;; 2399 sparc64-*linux*) 2400 LD="${LD-ld} -m elf32_sparc" 2401 ;; 2402 esac 2403 ;; 2404 *64-bit*) 2405 case $host in 2406 x86_64-*kfreebsd*-gnu) 2407 LD="${LD-ld} -m elf_x86_64_fbsd" 2408 ;; 2409 x86_64-*linux*) 2410 LD="${LD-ld} -m elf_x86_64" 2411 ;; 2412 ppc*-*linux*|powerpc*-*linux*) 2413 LD="${LD-ld} -m elf64ppc" 2414 ;; 2415 s390*-*linux*|s390*-*tpf*) 2416 LD="${LD-ld} -m elf64_s390" 2417 ;; 2418 sparc*-*linux*) 2419 LD="${LD-ld} -m elf64_sparc" 2420 ;; 2421 esac 2422 ;; 2423 esac 2424 fi 2425 rm -rf conftest* 2426 ;; 2427 2428*-*-sco3.2v5*) 2429 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2430 SAVE_CFLAGS="$CFLAGS" 2431 CFLAGS="$CFLAGS -belf" 2432 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2433 [AC_LANG_PUSH(C) 2434 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2435 AC_LANG_POP]) 2436 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2437 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2438 CFLAGS="$SAVE_CFLAGS" 2439 fi 2440 ;; 2441*-*solaris*) 2442 # Find out which ABI we are using. 2443 echo 'int i;' > conftest.$ac_ext 2444 if AC_TRY_EVAL(ac_compile); then 2445 case `/usr/bin/file conftest.o` in 2446 *64-bit*) 2447 case $lt_cv_prog_gnu_ld in 2448 yes*) 2449 case $host in 2450 i?86-*-solaris*) 2451 LD="${LD-ld} -m elf_x86_64" 2452 ;; 2453 sparc*-*-solaris*) 2454 LD="${LD-ld} -m elf64_sparc" 2455 ;; 2456 esac 2457 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2458 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2459 LD="${LD-ld}_sol2" 2460 fi 2461 ;; 2462 *) 2463 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2464 LD="${LD-ld} -64" 2465 fi 2466 ;; 2467 esac 2468 ;; 2469 esac 2470 fi 2471 rm -rf conftest* 2472 ;; 2473esac 2474 2475need_locks="$enable_libtool_lock" 2476])# _LT_ENABLE_LOCK 2477 2478 2479# _LT_PROG_AR 2480# ----------- 2481m4_defun([_LT_PROG_AR], 2482[AC_CHECK_TOOLS(AR, [ar], false) 2483: ${AR=ar} 2484: ${AR_FLAGS=cru} 2485_LT_DECL([], [AR], [1], [The archiver]) 2486_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2487 2488AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2489 [lt_cv_ar_at_file=no 2490 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2491 [echo conftest.$ac_objext > conftest.lst 2492 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2493 AC_TRY_EVAL([lt_ar_try]) 2494 if test "$ac_status" -eq 0; then 2495 # Ensure the archiver fails upon bogus file names. 2496 rm -f conftest.$ac_objext libconftest.a 2497 AC_TRY_EVAL([lt_ar_try]) 2498 if test "$ac_status" -ne 0; then 2499 lt_cv_ar_at_file=@ 2500 fi 2501 fi 2502 rm -f conftest.* libconftest.a 2503 ]) 2504 ]) 2505 2506if test "x$lt_cv_ar_at_file" = xno; then 2507 archiver_list_spec= 2508else 2509 archiver_list_spec=$lt_cv_ar_at_file 2510fi 2511_LT_DECL([], [archiver_list_spec], [1], 2512 [How to feed a file listing to the archiver]) 2513])# _LT_PROG_AR 2514 2515 2516# _LT_CMD_OLD_ARCHIVE 2517# ------------------- 2518m4_defun([_LT_CMD_OLD_ARCHIVE], 2519[_LT_PROG_AR 2520 2521AC_CHECK_TOOL(STRIP, strip, :) 2522test -z "$STRIP" && STRIP=: 2523_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2524 2525AC_CHECK_TOOL(RANLIB, ranlib, :) 2526test -z "$RANLIB" && RANLIB=: 2527_LT_DECL([], [RANLIB], [1], 2528 [Commands used to install an old-style archive]) 2529 2530# Determine commands to create old-style static archives. 2531old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2532old_postinstall_cmds='chmod 644 $oldlib' 2533old_postuninstall_cmds= 2534 2535if test -n "$RANLIB"; then 2536 case $host_os in 2537 openbsd*) 2538 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2539 ;; 2540 *) 2541 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2542 ;; 2543 esac 2544 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2545fi 2546 2547case $host_os in 2548 darwin*) 2549 lock_old_archive_extraction=yes ;; 2550 *) 2551 lock_old_archive_extraction=no ;; 2552esac 2553_LT_DECL([], [old_postinstall_cmds], [2]) 2554_LT_DECL([], [old_postuninstall_cmds], [2]) 2555_LT_TAGDECL([], [old_archive_cmds], [2], 2556 [Commands used to build an old-style archive]) 2557_LT_DECL([], [lock_old_archive_extraction], [0], 2558 [Whether to use a lock for old archive extraction]) 2559])# _LT_CMD_OLD_ARCHIVE 2560 2561 2562# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2563# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2564# ---------------------------------------------------------------- 2565# Check whether the given compiler option works 2566AC_DEFUN([_LT_COMPILER_OPTION], 2567[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2568m4_require([_LT_DECL_SED])dnl 2569AC_CACHE_CHECK([$1], [$2], 2570 [$2=no 2571 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2572 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2573 lt_compiler_flag="$3" 2574 # Insert the option either (1) after the last *FLAGS variable, or 2575 # (2) before a word containing "conftest.", or (3) at the end. 2576 # Note that $ac_compile itself does not contain backslashes and begins 2577 # with a dollar sign (not a hyphen), so the echo should work correctly. 2578 # The option is referenced via a variable to avoid confusing sed. 2579 lt_compile=`echo "$ac_compile" | $SED \ 2580 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2581 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2582 -e 's:$: $lt_compiler_flag:'` 2583 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2584 (eval "$lt_compile" 2>conftest.err) 2585 ac_status=$? 2586 cat conftest.err >&AS_MESSAGE_LOG_FD 2587 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2588 if (exit $ac_status) && test -s "$ac_outfile"; then 2589 # The compiler can only warn and ignore the option if not recognized 2590 # So say no if there are warnings other than the usual output. 2591 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2592 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2593 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2594 $2=yes 2595 fi 2596 fi 2597 $RM conftest* 2598]) 2599 2600if test x"[$]$2" = xyes; then 2601 m4_if([$5], , :, [$5]) 2602else 2603 m4_if([$6], , :, [$6]) 2604fi 2605])# _LT_COMPILER_OPTION 2606 2607# Old name: 2608AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2609dnl aclocal-1.4 backwards compatibility: 2610dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2611 2612 2613# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2614# [ACTION-SUCCESS], [ACTION-FAILURE]) 2615# ---------------------------------------------------- 2616# Check whether the given linker option works 2617AC_DEFUN([_LT_LINKER_OPTION], 2618[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2619m4_require([_LT_DECL_SED])dnl 2620AC_CACHE_CHECK([$1], [$2], 2621 [$2=no 2622 save_LDFLAGS="$LDFLAGS" 2623 LDFLAGS="$LDFLAGS $3" 2624 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2625 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2626 # The linker can only warn and ignore the option if not recognized 2627 # So say no if there are warnings 2628 if test -s conftest.err; then 2629 # Append any errors to the config.log. 2630 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2631 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2632 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2633 if diff conftest.exp conftest.er2 >/dev/null; then 2634 $2=yes 2635 fi 2636 else 2637 $2=yes 2638 fi 2639 fi 2640 $RM -r conftest* 2641 LDFLAGS="$save_LDFLAGS" 2642]) 2643 2644if test x"[$]$2" = xyes; then 2645 m4_if([$4], , :, [$4]) 2646else 2647 m4_if([$5], , :, [$5]) 2648fi 2649])# _LT_LINKER_OPTION 2650 2651# Old name: 2652AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2653dnl aclocal-1.4 backwards compatibility: 2654dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2655 2656 2657# LT_CMD_MAX_LEN 2658#--------------- 2659AC_DEFUN([LT_CMD_MAX_LEN], 2660[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2661# find the maximum length of command line arguments 2662AC_MSG_CHECKING([the maximum length of command line arguments]) 2663AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2664 i=0 2665 teststring="ABCD" 2666 2667 case $build_os in 2668 msdosdjgpp*) 2669 # On DJGPP, this test can blow up pretty badly due to problems in libc 2670 # (any single argument exceeding 2000 bytes causes a buffer overrun 2671 # during glob expansion). Even if it were fixed, the result of this 2672 # check would be larger than it should be. 2673 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2674 ;; 2675 2676 gnu*) 2677 # Under GNU Hurd, this test is not required because there is 2678 # no limit to the length of command line arguments. 2679 # Libtool will interpret -1 as no limit whatsoever 2680 lt_cv_sys_max_cmd_len=-1; 2681 ;; 2682 2683 cygwin* | mingw* | cegcc*) 2684 # On Win9x/ME, this test blows up -- it succeeds, but takes 2685 # about 5 minutes as the teststring grows exponentially. 2686 # Worse, since 9x/ME are not pre-emptively multitasking, 2687 # you end up with a "frozen" computer, even though with patience 2688 # the test eventually succeeds (with a max line length of 256k). 2689 # Instead, let's just punt: use the minimum linelength reported by 2690 # all of the supported platforms: 8192 (on NT/2K/XP). 2691 lt_cv_sys_max_cmd_len=8192; 2692 ;; 2693 2694 mint*) 2695 # On MiNT this can take a long time and run out of memory. 2696 lt_cv_sys_max_cmd_len=8192; 2697 ;; 2698 2699 amigaos*) 2700 # On AmigaOS with pdksh, this test takes hours, literally. 2701 # So we just punt and use a minimum line length of 8192. 2702 lt_cv_sys_max_cmd_len=8192; 2703 ;; 2704 2705 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2706 # This has been around since 386BSD, at least. Likely further. 2707 if test -x /sbin/sysctl; then 2708 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2709 elif test -x /usr/sbin/sysctl; then 2710 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2711 else 2712 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2713 fi 2714 # And add a safety zone 2715 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2716 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2717 ;; 2718 2719 interix*) 2720 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2721 lt_cv_sys_max_cmd_len=196608 2722 ;; 2723 2724 os2*) 2725 # The test takes a long time on OS/2. 2726 lt_cv_sys_max_cmd_len=8192 2727 ;; 2728 2729 osf*) 2730 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2731 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2732 # nice to cause kernel panics so lets avoid the loop below. 2733 # First set a reasonable default. 2734 lt_cv_sys_max_cmd_len=16384 2735 # 2736 if test -x /sbin/sysconfig; then 2737 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2738 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2739 esac 2740 fi 2741 ;; 2742 sco3.2v5*) 2743 lt_cv_sys_max_cmd_len=102400 2744 ;; 2745 sysv5* | sco5v6* | sysv4.2uw2*) 2746 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2747 if test -n "$kargmax"; then 2748 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2749 else 2750 lt_cv_sys_max_cmd_len=32768 2751 fi 2752 ;; 2753 *) 2754 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2755 if test -n "$lt_cv_sys_max_cmd_len"; then 2756 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2757 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2758 else 2759 # Make teststring a little bigger before we do anything with it. 2760 # a 1K string should be a reasonable start. 2761 for i in 1 2 3 4 5 6 7 8 ; do 2762 teststring=$teststring$teststring 2763 done 2764 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2765 # If test is not a shell built-in, we'll probably end up computing a 2766 # maximum length that is only half of the actual maximum length, but 2767 # we can't tell. 2768 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2769 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2770 test $i != 17 # 1/2 MB should be enough 2771 do 2772 i=`expr $i + 1` 2773 teststring=$teststring$teststring 2774 done 2775 # Only check the string length outside the loop. 2776 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2777 teststring= 2778 # Add a significant safety factor because C++ compilers can tack on 2779 # massive amounts of additional arguments before passing them to the 2780 # linker. It appears as though 1/2 is a usable value. 2781 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2782 fi 2783 ;; 2784 esac 2785]) 2786if test -n $lt_cv_sys_max_cmd_len ; then 2787 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2788else 2789 AC_MSG_RESULT(none) 2790fi 2791max_cmd_len=$lt_cv_sys_max_cmd_len 2792_LT_DECL([], [max_cmd_len], [0], 2793 [What is the maximum length of a command?]) 2794])# LT_CMD_MAX_LEN 2795 2796# Old name: 2797AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2798dnl aclocal-1.4 backwards compatibility: 2799dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2800 2801 2802# _LT_HEADER_DLFCN 2803# ---------------- 2804m4_defun([_LT_HEADER_DLFCN], 2805[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2806])# _LT_HEADER_DLFCN 2807 2808 2809# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2810# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2811# ---------------------------------------------------------------- 2812m4_defun([_LT_TRY_DLOPEN_SELF], 2813[m4_require([_LT_HEADER_DLFCN])dnl 2814if test "$cross_compiling" = yes; then : 2815 [$4] 2816else 2817 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2818 lt_status=$lt_dlunknown 2819 cat > conftest.$ac_ext <<_LT_EOF 2820[#line $LINENO "configure" 2821#include "confdefs.h" 2822 2823#if HAVE_DLFCN_H 2824#include <dlfcn.h> 2825#endif 2826 2827#include <stdio.h> 2828 2829#ifdef RTLD_GLOBAL 2830# define LT_DLGLOBAL RTLD_GLOBAL 2831#else 2832# ifdef DL_GLOBAL 2833# define LT_DLGLOBAL DL_GLOBAL 2834# else 2835# define LT_DLGLOBAL 0 2836# endif 2837#endif 2838 2839/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2840 find out it does not work in some platform. */ 2841#ifndef LT_DLLAZY_OR_NOW 2842# ifdef RTLD_LAZY 2843# define LT_DLLAZY_OR_NOW RTLD_LAZY 2844# else 2845# ifdef DL_LAZY 2846# define LT_DLLAZY_OR_NOW DL_LAZY 2847# else 2848# ifdef RTLD_NOW 2849# define LT_DLLAZY_OR_NOW RTLD_NOW 2850# else 2851# ifdef DL_NOW 2852# define LT_DLLAZY_OR_NOW DL_NOW 2853# else 2854# define LT_DLLAZY_OR_NOW 0 2855# endif 2856# endif 2857# endif 2858# endif 2859#endif 2860 2861/* When -fvisbility=hidden is used, assume the code has been annotated 2862 correspondingly for the symbols needed. */ 2863#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2864int fnord () __attribute__((visibility("default"))); 2865#endif 2866 2867int fnord () { return 42; } 2868int main () 2869{ 2870 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2871 int status = $lt_dlunknown; 2872 2873 if (self) 2874 { 2875 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2876 else 2877 { 2878 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2879 else puts (dlerror ()); 2880 } 2881 /* dlclose (self); */ 2882 } 2883 else 2884 puts (dlerror ()); 2885 2886 return status; 2887}] 2888_LT_EOF 2889 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2890 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2891 lt_status=$? 2892 case x$lt_status in 2893 x$lt_dlno_uscore) $1 ;; 2894 x$lt_dlneed_uscore) $2 ;; 2895 x$lt_dlunknown|x*) $3 ;; 2896 esac 2897 else : 2898 # compilation failed 2899 $3 2900 fi 2901fi 2902rm -fr conftest* 2903])# _LT_TRY_DLOPEN_SELF 2904 2905 2906# LT_SYS_DLOPEN_SELF 2907# ------------------ 2908AC_DEFUN([LT_SYS_DLOPEN_SELF], 2909[m4_require([_LT_HEADER_DLFCN])dnl 2910if test "x$enable_dlopen" != xyes; then 2911 enable_dlopen=unknown 2912 enable_dlopen_self=unknown 2913 enable_dlopen_self_static=unknown 2914else 2915 lt_cv_dlopen=no 2916 lt_cv_dlopen_libs= 2917 2918 case $host_os in 2919 beos*) 2920 lt_cv_dlopen="load_add_on" 2921 lt_cv_dlopen_libs= 2922 lt_cv_dlopen_self=yes 2923 ;; 2924 2925 mingw* | pw32* | cegcc*) 2926 lt_cv_dlopen="LoadLibrary" 2927 lt_cv_dlopen_libs= 2928 ;; 2929 2930 cygwin*) 2931 lt_cv_dlopen="dlopen" 2932 lt_cv_dlopen_libs= 2933 ;; 2934 2935 darwin*) 2936 # if libdl is installed we need to link against it 2937 AC_CHECK_LIB([dl], [dlopen], 2938 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2939 lt_cv_dlopen="dyld" 2940 lt_cv_dlopen_libs= 2941 lt_cv_dlopen_self=yes 2942 ]) 2943 ;; 2944 2945 *) 2946 AC_CHECK_FUNC([shl_load], 2947 [lt_cv_dlopen="shl_load"], 2948 [AC_CHECK_LIB([dld], [shl_load], 2949 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 2950 [AC_CHECK_FUNC([dlopen], 2951 [lt_cv_dlopen="dlopen"], 2952 [AC_CHECK_LIB([dl], [dlopen], 2953 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2954 [AC_CHECK_LIB([svld], [dlopen], 2955 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2956 [AC_CHECK_LIB([dld], [dld_link], 2957 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 2958 ]) 2959 ]) 2960 ]) 2961 ]) 2962 ]) 2963 ;; 2964 esac 2965 2966 if test "x$lt_cv_dlopen" != xno; then 2967 enable_dlopen=yes 2968 else 2969 enable_dlopen=no 2970 fi 2971 2972 case $lt_cv_dlopen in 2973 dlopen) 2974 save_CPPFLAGS="$CPPFLAGS" 2975 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2976 2977 save_LDFLAGS="$LDFLAGS" 2978 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2979 2980 save_LIBS="$LIBS" 2981 LIBS="$lt_cv_dlopen_libs $LIBS" 2982 2983 AC_CACHE_CHECK([whether a program can dlopen itself], 2984 lt_cv_dlopen_self, [dnl 2985 _LT_TRY_DLOPEN_SELF( 2986 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2987 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2988 ]) 2989 2990 if test "x$lt_cv_dlopen_self" = xyes; then 2991 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2992 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2993 lt_cv_dlopen_self_static, [dnl 2994 _LT_TRY_DLOPEN_SELF( 2995 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2996 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2997 ]) 2998 fi 2999 3000 CPPFLAGS="$save_CPPFLAGS" 3001 LDFLAGS="$save_LDFLAGS" 3002 LIBS="$save_LIBS" 3003 ;; 3004 esac 3005 3006 case $lt_cv_dlopen_self in 3007 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3008 *) enable_dlopen_self=unknown ;; 3009 esac 3010 3011 case $lt_cv_dlopen_self_static in 3012 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3013 *) enable_dlopen_self_static=unknown ;; 3014 esac 3015fi 3016_LT_DECL([dlopen_support], [enable_dlopen], [0], 3017 [Whether dlopen is supported]) 3018_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3019 [Whether dlopen of programs is supported]) 3020_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3021 [Whether dlopen of statically linked programs is supported]) 3022])# LT_SYS_DLOPEN_SELF 3023 3024# Old name: 3025AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3026dnl aclocal-1.4 backwards compatibility: 3027dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3028 3029 3030# _LT_COMPILER_C_O([TAGNAME]) 3031# --------------------------- 3032# Check to see if options -c and -o are simultaneously supported by compiler. 3033# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3034m4_defun([_LT_COMPILER_C_O], 3035[m4_require([_LT_DECL_SED])dnl 3036m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3037m4_require([_LT_TAG_COMPILER])dnl 3038AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3039 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3040 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3041 $RM -r conftest 2>/dev/null 3042 mkdir conftest 3043 cd conftest 3044 mkdir out 3045 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3046 3047 lt_compiler_flag="-o out/conftest2.$ac_objext" 3048 # Insert the option either (1) after the last *FLAGS variable, or 3049 # (2) before a word containing "conftest.", or (3) at the end. 3050 # Note that $ac_compile itself does not contain backslashes and begins 3051 # with a dollar sign (not a hyphen), so the echo should work correctly. 3052 lt_compile=`echo "$ac_compile" | $SED \ 3053 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3054 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3055 -e 's:$: $lt_compiler_flag:'` 3056 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3057 (eval "$lt_compile" 2>out/conftest.err) 3058 ac_status=$? 3059 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3060 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3061 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3062 then 3063 # The compiler can only warn and ignore the option if not recognized 3064 # So say no if there are warnings 3065 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3066 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3067 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3068 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3069 fi 3070 fi 3071 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3072 $RM conftest* 3073 # SGI C++ compiler will create directory out/ii_files/ for 3074 # template instantiation 3075 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3076 $RM out/* && rmdir out 3077 cd .. 3078 $RM -r conftest 3079 $RM conftest* 3080]) 3081_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3082 [Does compiler simultaneously support -c and -o options?]) 3083])# _LT_COMPILER_C_O 3084 3085 3086# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3087# ---------------------------------- 3088# Check to see if we can do hard links to lock some files if needed 3089m4_defun([_LT_COMPILER_FILE_LOCKS], 3090[m4_require([_LT_ENABLE_LOCK])dnl 3091m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3092_LT_COMPILER_C_O([$1]) 3093 3094hard_links="nottested" 3095if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3096 # do not overwrite the value of need_locks provided by the user 3097 AC_MSG_CHECKING([if we can lock with hard links]) 3098 hard_links=yes 3099 $RM conftest* 3100 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3101 touch conftest.a 3102 ln conftest.a conftest.b 2>&5 || hard_links=no 3103 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3104 AC_MSG_RESULT([$hard_links]) 3105 if test "$hard_links" = no; then 3106 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3107 need_locks=warn 3108 fi 3109else 3110 need_locks=no 3111fi 3112_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3113])# _LT_COMPILER_FILE_LOCKS 3114 3115 3116# _LT_CHECK_OBJDIR 3117# ---------------- 3118m4_defun([_LT_CHECK_OBJDIR], 3119[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3120[rm -f .libs 2>/dev/null 3121mkdir .libs 2>/dev/null 3122if test -d .libs; then 3123 lt_cv_objdir=.libs 3124else 3125 # MS-DOS does not allow filenames that begin with a dot. 3126 lt_cv_objdir=_libs 3127fi 3128rmdir .libs 2>/dev/null]) 3129objdir=$lt_cv_objdir 3130_LT_DECL([], [objdir], [0], 3131 [The name of the directory that contains temporary libtool files])dnl 3132m4_pattern_allow([LT_OBJDIR])dnl 3133AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3134 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3135])# _LT_CHECK_OBJDIR 3136 3137 3138# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3139# -------------------------------------- 3140# Check hardcoding attributes. 3141m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3142[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3143_LT_TAGVAR(hardcode_action, $1)= 3144if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3145 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3146 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3147 3148 # We can hardcode non-existent directories. 3149 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3150 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3151 # have to relink, otherwise we might link with an installed library 3152 # when we should be linking with a yet-to-be-installed one 3153 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3154 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3155 # Linking always hardcodes the temporary library directory. 3156 _LT_TAGVAR(hardcode_action, $1)=relink 3157 else 3158 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3159 _LT_TAGVAR(hardcode_action, $1)=immediate 3160 fi 3161else 3162 # We cannot hardcode anything, or else we can only hardcode existing 3163 # directories. 3164 _LT_TAGVAR(hardcode_action, $1)=unsupported 3165fi 3166AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3167 3168if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3169 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3170 # Fast installation is not supported 3171 enable_fast_install=no 3172elif test "$shlibpath_overrides_runpath" = yes || 3173 test "$enable_shared" = no; then 3174 # Fast installation is not necessary 3175 enable_fast_install=needless 3176fi 3177_LT_TAGDECL([], [hardcode_action], [0], 3178 [How to hardcode a shared library path into an executable]) 3179])# _LT_LINKER_HARDCODE_LIBPATH 3180 3181 3182# _LT_CMD_STRIPLIB 3183# ---------------- 3184m4_defun([_LT_CMD_STRIPLIB], 3185[m4_require([_LT_DECL_EGREP]) 3186striplib= 3187old_striplib= 3188AC_MSG_CHECKING([whether stripping libraries is possible]) 3189if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3190 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3191 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3192 AC_MSG_RESULT([yes]) 3193else 3194# FIXME - insert some real tests, host_os isn't really good enough 3195 case $host_os in 3196 darwin*) 3197 if test -n "$STRIP" ; then 3198 striplib="$STRIP -x" 3199 old_striplib="$STRIP -S" 3200 AC_MSG_RESULT([yes]) 3201 else 3202 AC_MSG_RESULT([no]) 3203 fi 3204 ;; 3205 *) 3206 AC_MSG_RESULT([no]) 3207 ;; 3208 esac 3209fi 3210_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3211_LT_DECL([], [striplib], [1]) 3212])# _LT_CMD_STRIPLIB 3213 3214 3215# _LT_SYS_DYNAMIC_LINKER([TAG]) 3216# ----------------------------- 3217# PORTME Fill in your ld.so characteristics 3218m4_defun([_LT_SYS_DYNAMIC_LINKER], 3219[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3220m4_require([_LT_DECL_EGREP])dnl 3221m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3222m4_require([_LT_DECL_OBJDUMP])dnl 3223m4_require([_LT_DECL_SED])dnl 3224m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3225AC_MSG_CHECKING([dynamic linker characteristics]) 3226m4_if([$1], 3227 [], [ 3228if test "$GCC" = yes; then 3229 case $host_os in 3230 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3231 *) lt_awk_arg="/^libraries:/" ;; 3232 esac 3233 case $host_os in 3234 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3235 *) lt_sed_strip_eq="s,=/,/,g" ;; 3236 esac 3237 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3238 case $lt_search_path_spec in 3239 *\;*) 3240 # if the path contains ";" then we assume it to be the separator 3241 # otherwise default to the standard path separator (i.e. ":") - it is 3242 # assumed that no part of a normal pathname contains ";" but that should 3243 # okay in the real world where ";" in dirpaths is itself problematic. 3244 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3245 ;; 3246 *) 3247 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3248 ;; 3249 esac 3250 # Ok, now we have the path, separated by spaces, we can step through it 3251 # and add multilib dir if necessary. 3252 lt_tmp_lt_search_path_spec= 3253 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3254 for lt_sys_path in $lt_search_path_spec; do 3255 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3256 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3257 else 3258 test -d "$lt_sys_path" && \ 3259 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3260 fi 3261 done 3262 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3263BEGIN {RS=" "; FS="/|\n";} { 3264 lt_foo=""; 3265 lt_count=0; 3266 for (lt_i = NF; lt_i > 0; lt_i--) { 3267 if ($lt_i != "" && $lt_i != ".") { 3268 if ($lt_i == "..") { 3269 lt_count++; 3270 } else { 3271 if (lt_count == 0) { 3272 lt_foo="/" $lt_i lt_foo; 3273 } else { 3274 lt_count--; 3275 } 3276 } 3277 } 3278 } 3279 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3280 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3281}'` 3282 # AWK program above erroneously prepends '/' to C:/dos/paths 3283 # for these hosts. 3284 case $host_os in 3285 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3286 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3287 esac 3288 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3289else 3290 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3291fi]) 3292library_names_spec= 3293libname_spec='lib$name' 3294soname_spec= 3295shrext_cmds=".so" 3296postinstall_cmds= 3297postuninstall_cmds= 3298finish_cmds= 3299finish_eval= 3300shlibpath_var= 3301shlibpath_overrides_runpath=unknown 3302version_type=none 3303dynamic_linker="$host_os ld.so" 3304sys_lib_dlsearch_path_spec="/lib /usr/lib" 3305need_lib_prefix=unknown 3306hardcode_into_libs=no 3307 3308# when you set need_version to no, make sure it does not cause -set_version 3309# flags to be left without arguments 3310need_version=unknown 3311 3312case $host_os in 3313aix3*) 3314 version_type=linux # correct to gnu/linux during the next big refactor 3315 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3316 shlibpath_var=LIBPATH 3317 3318 # AIX 3 has no versioning support, so we append a major version to the name. 3319 soname_spec='${libname}${release}${shared_ext}$major' 3320 ;; 3321 3322aix[[4-9]]*) 3323 version_type=linux # correct to gnu/linux during the next big refactor 3324 need_lib_prefix=no 3325 need_version=no 3326 hardcode_into_libs=yes 3327 if test "$host_cpu" = ia64; then 3328 # AIX 5 supports IA64 3329 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3330 shlibpath_var=LD_LIBRARY_PATH 3331 else 3332 # With GCC up to 2.95.x, collect2 would create an import file 3333 # for dependence libraries. The import file would start with 3334 # the line `#! .'. This would cause the generated library to 3335 # depend on `.', always an invalid library. This was fixed in 3336 # development snapshots of GCC prior to 3.0. 3337 case $host_os in 3338 aix4 | aix4.[[01]] | aix4.[[01]].*) 3339 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3340 echo ' yes ' 3341 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3342 : 3343 else 3344 can_build_shared=no 3345 fi 3346 ;; 3347 esac 3348 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3349 # soname into executable. Probably we can add versioning support to 3350 # collect2, so additional links can be useful in future. 3351 if test "$aix_use_runtimelinking" = yes; then 3352 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3353 # instead of lib<name>.a to let people know that these are not 3354 # typical AIX shared libraries. 3355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3356 else 3357 # We preserve .a as extension for shared libraries through AIX4.2 3358 # and later when we are not doing run time linking. 3359 library_names_spec='${libname}${release}.a $libname.a' 3360 soname_spec='${libname}${release}${shared_ext}$major' 3361 fi 3362 shlibpath_var=LIBPATH 3363 fi 3364 ;; 3365 3366amigaos*) 3367 case $host_cpu in 3368 powerpc) 3369 # Since July 2007 AmigaOS4 officially supports .so libraries. 3370 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3371 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3372 ;; 3373 m68k) 3374 library_names_spec='$libname.ixlibrary $libname.a' 3375 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3376 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' 3377 ;; 3378 esac 3379 ;; 3380 3381beos*) 3382 library_names_spec='${libname}${shared_ext}' 3383 dynamic_linker="$host_os ld.so" 3384 shlibpath_var=LIBRARY_PATH 3385 ;; 3386 3387bsdi[[45]]*) 3388 version_type=linux # correct to gnu/linux during the next big refactor 3389 need_version=no 3390 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3391 soname_spec='${libname}${release}${shared_ext}$major' 3392 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3393 shlibpath_var=LD_LIBRARY_PATH 3394 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3395 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3396 # the default ld.so.conf also contains /usr/contrib/lib and 3397 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3398 # libtool to hard-code these into programs 3399 ;; 3400 3401cygwin* | mingw* | pw32* | cegcc*) 3402 version_type=windows 3403 shrext_cmds=".dll" 3404 need_version=no 3405 need_lib_prefix=no 3406 3407 case $GCC,$cc_basename in 3408 yes,*) 3409 # gcc 3410 library_names_spec='$libname.dll.a' 3411 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3412 postinstall_cmds='base_file=`basename \${file}`~ 3413 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3414 dldir=$destdir/`dirname \$dlpath`~ 3415 test -d \$dldir || mkdir -p \$dldir~ 3416 $install_prog $dir/$dlname \$dldir/$dlname~ 3417 chmod a+x \$dldir/$dlname~ 3418 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3419 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3420 fi' 3421 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3422 dlpath=$dir/\$dldll~ 3423 $RM \$dlpath' 3424 shlibpath_overrides_runpath=yes 3425 3426 case $host_os in 3427 cygwin*) 3428 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3429 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3430m4_if([$1], [],[ 3431 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3432 ;; 3433 mingw* | cegcc*) 3434 # MinGW DLLs use traditional 'lib' prefix 3435 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3436 ;; 3437 pw32*) 3438 # pw32 DLLs use 'pw' prefix rather than 'lib' 3439 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3440 ;; 3441 esac 3442 dynamic_linker='Win32 ld.exe' 3443 ;; 3444 3445 *,cl*) 3446 # Native MSVC 3447 libname_spec='$name' 3448 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3449 library_names_spec='${libname}.dll.lib' 3450 3451 case $build_os in 3452 mingw*) 3453 sys_lib_search_path_spec= 3454 lt_save_ifs=$IFS 3455 IFS=';' 3456 for lt_path in $LIB 3457 do 3458 IFS=$lt_save_ifs 3459 # Let DOS variable expansion print the short 8.3 style file name. 3460 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3461 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3462 done 3463 IFS=$lt_save_ifs 3464 # Convert to MSYS style. 3465 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3466 ;; 3467 cygwin*) 3468 # Convert to unix form, then to dos form, then back to unix form 3469 # but this time dos style (no spaces!) so that the unix form looks 3470 # like /cygdrive/c/PROGRA~1:/cygdr... 3471 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3472 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3473 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3474 ;; 3475 *) 3476 sys_lib_search_path_spec="$LIB" 3477 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3478 # It is most probably a Windows format PATH. 3479 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3480 else 3481 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3482 fi 3483 # FIXME: find the short name or the path components, as spaces are 3484 # common. (e.g. "Program Files" -> "PROGRA~1") 3485 ;; 3486 esac 3487 3488 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3489 postinstall_cmds='base_file=`basename \${file}`~ 3490 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3491 dldir=$destdir/`dirname \$dlpath`~ 3492 test -d \$dldir || mkdir -p \$dldir~ 3493 $install_prog $dir/$dlname \$dldir/$dlname' 3494 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3495 dlpath=$dir/\$dldll~ 3496 $RM \$dlpath' 3497 shlibpath_overrides_runpath=yes 3498 dynamic_linker='Win32 link.exe' 3499 ;; 3500 3501 *) 3502 # Assume MSVC wrapper 3503 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3504 dynamic_linker='Win32 ld.exe' 3505 ;; 3506 esac 3507 # FIXME: first we should search . and the directory the executable is in 3508 shlibpath_var=PATH 3509 ;; 3510 3511darwin* | rhapsody*) 3512 dynamic_linker="$host_os dyld" 3513 version_type=darwin 3514 need_lib_prefix=no 3515 need_version=no 3516 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3517 soname_spec='${libname}${release}${major}$shared_ext' 3518 shlibpath_overrides_runpath=yes 3519 shlibpath_var=DYLD_LIBRARY_PATH 3520 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3521m4_if([$1], [],[ 3522 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3523 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3524 ;; 3525 3526dgux*) 3527 version_type=linux # correct to gnu/linux during the next big refactor 3528 need_lib_prefix=no 3529 need_version=no 3530 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3531 soname_spec='${libname}${release}${shared_ext}$major' 3532 shlibpath_var=LD_LIBRARY_PATH 3533 ;; 3534 3535freebsd* | dragonfly*) 3536 # DragonFly does not have aout. When/if they implement a new 3537 # versioning mechanism, adjust this. 3538 if test -x /usr/bin/objformat; then 3539 objformat=`/usr/bin/objformat` 3540 else 3541 case $host_os in 3542 freebsd[[23]].*) objformat=aout ;; 3543 *) objformat=elf ;; 3544 esac 3545 fi 3546 version_type=freebsd-$objformat 3547 case $version_type in 3548 freebsd-elf*) 3549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3550 need_version=no 3551 need_lib_prefix=no 3552 ;; 3553 freebsd-*) 3554 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3555 need_version=yes 3556 ;; 3557 esac 3558 shlibpath_var=LD_LIBRARY_PATH 3559 case $host_os in 3560 freebsd2.*) 3561 shlibpath_overrides_runpath=yes 3562 ;; 3563 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3564 shlibpath_overrides_runpath=yes 3565 hardcode_into_libs=yes 3566 ;; 3567 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3568 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3569 shlibpath_overrides_runpath=no 3570 hardcode_into_libs=yes 3571 ;; 3572 *) # from 4.6 on, and DragonFly 3573 shlibpath_overrides_runpath=yes 3574 hardcode_into_libs=yes 3575 ;; 3576 esac 3577 ;; 3578 3579gnu*) 3580 version_type=linux # correct to gnu/linux during the next big refactor 3581 need_lib_prefix=no 3582 need_version=no 3583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3584 soname_spec='${libname}${release}${shared_ext}$major' 3585 shlibpath_var=LD_LIBRARY_PATH 3586 shlibpath_overrides_runpath=no 3587 hardcode_into_libs=yes 3588 ;; 3589 3590haiku*) 3591 version_type=linux # correct to gnu/linux during the next big refactor 3592 need_lib_prefix=no 3593 need_version=no 3594 dynamic_linker="$host_os runtime_loader" 3595 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3596 soname_spec='${libname}${release}${shared_ext}$major' 3597 shlibpath_var=LIBRARY_PATH 3598 shlibpath_overrides_runpath=yes 3599 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3600 hardcode_into_libs=yes 3601 ;; 3602 3603hpux9* | hpux10* | hpux11*) 3604 # Give a soname corresponding to the major version so that dld.sl refuses to 3605 # link against other versions. 3606 version_type=sunos 3607 need_lib_prefix=no 3608 need_version=no 3609 case $host_cpu in 3610 ia64*) 3611 shrext_cmds='.so' 3612 hardcode_into_libs=yes 3613 dynamic_linker="$host_os dld.so" 3614 shlibpath_var=LD_LIBRARY_PATH 3615 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3617 soname_spec='${libname}${release}${shared_ext}$major' 3618 if test "X$HPUX_IA64_MODE" = X32; then 3619 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3620 else 3621 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3622 fi 3623 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3624 ;; 3625 hppa*64*) 3626 shrext_cmds='.sl' 3627 hardcode_into_libs=yes 3628 dynamic_linker="$host_os dld.sl" 3629 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3630 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3631 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3632 soname_spec='${libname}${release}${shared_ext}$major' 3633 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3634 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3635 ;; 3636 *) 3637 shrext_cmds='.sl' 3638 dynamic_linker="$host_os dld.sl" 3639 shlibpath_var=SHLIB_PATH 3640 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3641 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3642 soname_spec='${libname}${release}${shared_ext}$major' 3643 ;; 3644 esac 3645 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3646 postinstall_cmds='chmod 555 $lib' 3647 # or fails outright, so override atomically: 3648 install_override_mode=555 3649 ;; 3650 3651interix[[3-9]]*) 3652 version_type=linux # correct to gnu/linux during the next big refactor 3653 need_lib_prefix=no 3654 need_version=no 3655 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3656 soname_spec='${libname}${release}${shared_ext}$major' 3657 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3658 shlibpath_var=LD_LIBRARY_PATH 3659 shlibpath_overrides_runpath=no 3660 hardcode_into_libs=yes 3661 ;; 3662 3663irix5* | irix6* | nonstopux*) 3664 case $host_os in 3665 nonstopux*) version_type=nonstopux ;; 3666 *) 3667 if test "$lt_cv_prog_gnu_ld" = yes; then 3668 version_type=linux # correct to gnu/linux during the next big refactor 3669 else 3670 version_type=irix 3671 fi ;; 3672 esac 3673 need_lib_prefix=no 3674 need_version=no 3675 soname_spec='${libname}${release}${shared_ext}$major' 3676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3677 case $host_os in 3678 irix5* | nonstopux*) 3679 libsuff= shlibsuff= 3680 ;; 3681 *) 3682 case $LD in # libtool.m4 will add one of these switches to LD 3683 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3684 libsuff= shlibsuff= libmagic=32-bit;; 3685 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3686 libsuff=32 shlibsuff=N32 libmagic=N32;; 3687 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3688 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3689 *) libsuff= shlibsuff= libmagic=never-match;; 3690 esac 3691 ;; 3692 esac 3693 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3694 shlibpath_overrides_runpath=no 3695 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3696 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3697 hardcode_into_libs=yes 3698 ;; 3699 3700# No shared lib support for Linux oldld, aout, or coff. 3701linux*oldld* | linux*aout* | linux*coff*) 3702 dynamic_linker=no 3703 ;; 3704 3705# This must be glibc/ELF. 3706linux* | k*bsd*-gnu | kopensolaris*-gnu) 3707 version_type=linux # correct to gnu/linux during the next big refactor 3708 need_lib_prefix=no 3709 need_version=no 3710 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3711 soname_spec='${libname}${release}${shared_ext}$major' 3712 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3713 shlibpath_var=LD_LIBRARY_PATH 3714 shlibpath_overrides_runpath=no 3715 3716 # Some binutils ld are patched to set DT_RUNPATH 3717 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3718 [lt_cv_shlibpath_overrides_runpath=no 3719 save_LDFLAGS=$LDFLAGS 3720 save_libdir=$libdir 3721 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3722 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3723 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3724 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3725 [lt_cv_shlibpath_overrides_runpath=yes])]) 3726 LDFLAGS=$save_LDFLAGS 3727 libdir=$save_libdir 3728 ]) 3729 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3730 3731 # This implies no fast_install, which is unacceptable. 3732 # Some rework will be needed to allow for fast_install 3733 # before this can be enabled. 3734 hardcode_into_libs=yes 3735 3736 # Append ld.so.conf contents to the search path 3737 if test -f /etc/ld.so.conf; then 3738 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' ' '` 3739 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3740 fi 3741 3742 # We used to test for /lib/ld.so.1 and disable shared libraries on 3743 # powerpc, because MkLinux only supported shared libraries with the 3744 # GNU dynamic linker. Since this was broken with cross compilers, 3745 # most powerpc-linux boxes support dynamic linking these days and 3746 # people can always --disable-shared, the test was removed, and we 3747 # assume the GNU/Linux dynamic linker is in use. 3748 dynamic_linker='GNU/Linux ld.so' 3749 ;; 3750 3751netbsd*) 3752 version_type=sunos 3753 need_lib_prefix=no 3754 need_version=no 3755 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3756 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3757 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3758 dynamic_linker='NetBSD (a.out) ld.so' 3759 else 3760 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3761 soname_spec='${libname}${release}${shared_ext}$major' 3762 dynamic_linker='NetBSD ld.elf_so' 3763 fi 3764 shlibpath_var=LD_LIBRARY_PATH 3765 shlibpath_overrides_runpath=yes 3766 hardcode_into_libs=yes 3767 ;; 3768 3769newsos6) 3770 version_type=linux # correct to gnu/linux during the next big refactor 3771 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3772 shlibpath_var=LD_LIBRARY_PATH 3773 shlibpath_overrides_runpath=yes 3774 ;; 3775 3776*nto* | *qnx*) 3777 version_type=qnx 3778 need_lib_prefix=no 3779 need_version=no 3780 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3781 soname_spec='${libname}${release}${shared_ext}$major' 3782 shlibpath_var=LD_LIBRARY_PATH 3783 shlibpath_overrides_runpath=no 3784 hardcode_into_libs=yes 3785 dynamic_linker='ldqnx.so' 3786 ;; 3787 3788openbsd*) 3789 version_type=sunos 3790 sys_lib_dlsearch_path_spec="/usr/lib" 3791 need_lib_prefix=no 3792 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3793 case $host_os in 3794 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3795 *) need_version=no ;; 3796 esac 3797 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3798 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3799 shlibpath_var=LD_LIBRARY_PATH 3800 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3801 case $host_os in 3802 openbsd2.[[89]] | openbsd2.[[89]].*) 3803 shlibpath_overrides_runpath=no 3804 ;; 3805 *) 3806 shlibpath_overrides_runpath=yes 3807 ;; 3808 esac 3809 else 3810 shlibpath_overrides_runpath=yes 3811 fi 3812 ;; 3813 3814os2*) 3815 libname_spec='$name' 3816 shrext_cmds=".dll" 3817 need_lib_prefix=no 3818 library_names_spec='$libname${shared_ext} $libname.a' 3819 dynamic_linker='OS/2 ld.exe' 3820 shlibpath_var=LIBPATH 3821 ;; 3822 3823osf3* | osf4* | osf5*) 3824 version_type=osf 3825 need_lib_prefix=no 3826 need_version=no 3827 soname_spec='${libname}${release}${shared_ext}$major' 3828 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3829 shlibpath_var=LD_LIBRARY_PATH 3830 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3831 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3832 ;; 3833 3834rdos*) 3835 dynamic_linker=no 3836 ;; 3837 3838solaris*) 3839 version_type=linux # correct to gnu/linux during the next big refactor 3840 need_lib_prefix=no 3841 need_version=no 3842 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3843 soname_spec='${libname}${release}${shared_ext}$major' 3844 shlibpath_var=LD_LIBRARY_PATH 3845 shlibpath_overrides_runpath=yes 3846 hardcode_into_libs=yes 3847 # ldd complains unless libraries are executable 3848 postinstall_cmds='chmod +x $lib' 3849 ;; 3850 3851sunos4*) 3852 version_type=sunos 3853 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3854 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3855 shlibpath_var=LD_LIBRARY_PATH 3856 shlibpath_overrides_runpath=yes 3857 if test "$with_gnu_ld" = yes; then 3858 need_lib_prefix=no 3859 fi 3860 need_version=yes 3861 ;; 3862 3863sysv4 | sysv4.3*) 3864 version_type=linux # correct to gnu/linux during the next big refactor 3865 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3866 soname_spec='${libname}${release}${shared_ext}$major' 3867 shlibpath_var=LD_LIBRARY_PATH 3868 case $host_vendor in 3869 sni) 3870 shlibpath_overrides_runpath=no 3871 need_lib_prefix=no 3872 runpath_var=LD_RUN_PATH 3873 ;; 3874 siemens) 3875 need_lib_prefix=no 3876 ;; 3877 motorola) 3878 need_lib_prefix=no 3879 need_version=no 3880 shlibpath_overrides_runpath=no 3881 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3882 ;; 3883 esac 3884 ;; 3885 3886sysv4*MP*) 3887 if test -d /usr/nec ;then 3888 version_type=linux # correct to gnu/linux during the next big refactor 3889 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3890 soname_spec='$libname${shared_ext}.$major' 3891 shlibpath_var=LD_LIBRARY_PATH 3892 fi 3893 ;; 3894 3895sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3896 version_type=freebsd-elf 3897 need_lib_prefix=no 3898 need_version=no 3899 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3900 soname_spec='${libname}${release}${shared_ext}$major' 3901 shlibpath_var=LD_LIBRARY_PATH 3902 shlibpath_overrides_runpath=yes 3903 hardcode_into_libs=yes 3904 if test "$with_gnu_ld" = yes; then 3905 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3906 else 3907 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3908 case $host_os in 3909 sco3.2v5*) 3910 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3911 ;; 3912 esac 3913 fi 3914 sys_lib_dlsearch_path_spec='/usr/lib' 3915 ;; 3916 3917tpf*) 3918 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3919 version_type=linux # correct to gnu/linux during the next big refactor 3920 need_lib_prefix=no 3921 need_version=no 3922 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3923 shlibpath_var=LD_LIBRARY_PATH 3924 shlibpath_overrides_runpath=no 3925 hardcode_into_libs=yes 3926 ;; 3927 3928uts4*) 3929 version_type=linux # correct to gnu/linux during the next big refactor 3930 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3931 soname_spec='${libname}${release}${shared_ext}$major' 3932 shlibpath_var=LD_LIBRARY_PATH 3933 ;; 3934 3935*) 3936 dynamic_linker=no 3937 ;; 3938esac 3939AC_MSG_RESULT([$dynamic_linker]) 3940test "$dynamic_linker" = no && can_build_shared=no 3941 3942variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3943if test "$GCC" = yes; then 3944 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3945fi 3946 3947if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 3948 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 3949fi 3950if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 3951 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3952fi 3953 3954_LT_DECL([], [variables_saved_for_relink], [1], 3955 [Variables whose values should be saved in libtool wrapper scripts and 3956 restored at link time]) 3957_LT_DECL([], [need_lib_prefix], [0], 3958 [Do we need the "lib" prefix for modules?]) 3959_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3960_LT_DECL([], [version_type], [0], [Library versioning type]) 3961_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3962_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3963_LT_DECL([], [shlibpath_overrides_runpath], [0], 3964 [Is shlibpath searched before the hard-coded library search path?]) 3965_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3966_LT_DECL([], [library_names_spec], [1], 3967 [[List of archive names. First name is the real one, the rest are links. 3968 The last name is the one that the linker finds with -lNAME]]) 3969_LT_DECL([], [soname_spec], [1], 3970 [[The coded name of the library, if different from the real name]]) 3971_LT_DECL([], [install_override_mode], [1], 3972 [Permission mode override for installation of shared libraries]) 3973_LT_DECL([], [postinstall_cmds], [2], 3974 [Command to use after installation of a shared archive]) 3975_LT_DECL([], [postuninstall_cmds], [2], 3976 [Command to use after uninstallation of a shared archive]) 3977_LT_DECL([], [finish_cmds], [2], 3978 [Commands used to finish a libtool library installation in a directory]) 3979_LT_DECL([], [finish_eval], [1], 3980 [[As "finish_cmds", except a single script fragment to be evaled but 3981 not shown]]) 3982_LT_DECL([], [hardcode_into_libs], [0], 3983 [Whether we should hardcode library paths into libraries]) 3984_LT_DECL([], [sys_lib_search_path_spec], [2], 3985 [Compile-time system search path for libraries]) 3986_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 3987 [Run-time system search path for libraries]) 3988])# _LT_SYS_DYNAMIC_LINKER 3989 3990 3991# _LT_PATH_TOOL_PREFIX(TOOL) 3992# -------------------------- 3993# find a file program which can recognize shared library 3994AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3995[m4_require([_LT_DECL_EGREP])dnl 3996AC_MSG_CHECKING([for $1]) 3997AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3998[case $MAGIC_CMD in 3999[[\\/*] | ?:[\\/]*]) 4000 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4001 ;; 4002*) 4003 lt_save_MAGIC_CMD="$MAGIC_CMD" 4004 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4005dnl $ac_dummy forces splitting on constant user-supplied paths. 4006dnl POSIX.2 word splitting is done only on the output of word expansions, 4007dnl not every word. This closes a longstanding sh security hole. 4008 ac_dummy="m4_if([$2], , $PATH, [$2])" 4009 for ac_dir in $ac_dummy; do 4010 IFS="$lt_save_ifs" 4011 test -z "$ac_dir" && ac_dir=. 4012 if test -f $ac_dir/$1; then 4013 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4014 if test -n "$file_magic_test_file"; then 4015 case $deplibs_check_method in 4016 "file_magic "*) 4017 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4018 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4019 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4020 $EGREP "$file_magic_regex" > /dev/null; then 4021 : 4022 else 4023 cat <<_LT_EOF 1>&2 4024 4025*** Warning: the command libtool uses to detect shared libraries, 4026*** $file_magic_cmd, produces output that libtool cannot recognize. 4027*** The result is that libtool may fail to recognize shared libraries 4028*** as such. This will affect the creation of libtool libraries that 4029*** depend on shared libraries, but programs linked with such libtool 4030*** libraries will work regardless of this problem. Nevertheless, you 4031*** may want to report the problem to your system manager and/or to 4032*** bug-libtool@gnu.org 4033 4034_LT_EOF 4035 fi ;; 4036 esac 4037 fi 4038 break 4039 fi 4040 done 4041 IFS="$lt_save_ifs" 4042 MAGIC_CMD="$lt_save_MAGIC_CMD" 4043 ;; 4044esac]) 4045MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4046if test -n "$MAGIC_CMD"; then 4047 AC_MSG_RESULT($MAGIC_CMD) 4048else 4049 AC_MSG_RESULT(no) 4050fi 4051_LT_DECL([], [MAGIC_CMD], [0], 4052 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4053])# _LT_PATH_TOOL_PREFIX 4054 4055# Old name: 4056AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4057dnl aclocal-1.4 backwards compatibility: 4058dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4059 4060 4061# _LT_PATH_MAGIC 4062# -------------- 4063# find a file program which can recognize a shared library 4064m4_defun([_LT_PATH_MAGIC], 4065[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4066if test -z "$lt_cv_path_MAGIC_CMD"; then 4067 if test -n "$ac_tool_prefix"; then 4068 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4069 else 4070 MAGIC_CMD=: 4071 fi 4072fi 4073])# _LT_PATH_MAGIC 4074 4075 4076# LT_PATH_LD 4077# ---------- 4078# find the pathname to the GNU or non-GNU linker 4079AC_DEFUN([LT_PATH_LD], 4080[AC_REQUIRE([AC_PROG_CC])dnl 4081AC_REQUIRE([AC_CANONICAL_HOST])dnl 4082AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4083m4_require([_LT_DECL_SED])dnl 4084m4_require([_LT_DECL_EGREP])dnl 4085m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4086 4087AC_ARG_WITH([gnu-ld], 4088 [AS_HELP_STRING([--with-gnu-ld], 4089 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4090 [test "$withval" = no || with_gnu_ld=yes], 4091 [with_gnu_ld=no])dnl 4092 4093ac_prog=ld 4094if test "$GCC" = yes; then 4095 # Check if gcc -print-prog-name=ld gives a path. 4096 AC_MSG_CHECKING([for ld used by $CC]) 4097 case $host in 4098 *-*-mingw*) 4099 # gcc leaves a trailing carriage return which upsets mingw 4100 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4101 *) 4102 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4103 esac 4104 case $ac_prog in 4105 # Accept absolute paths. 4106 [[\\/]]* | ?:[[\\/]]*) 4107 re_direlt='/[[^/]][[^/]]*/\.\./' 4108 # Canonicalize the pathname of ld 4109 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4110 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4111 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4112 done 4113 test -z "$LD" && LD="$ac_prog" 4114 ;; 4115 "") 4116 # If it fails, then pretend we aren't using GCC. 4117 ac_prog=ld 4118 ;; 4119 *) 4120 # If it is relative, then search for the first ld in PATH. 4121 with_gnu_ld=unknown 4122 ;; 4123 esac 4124elif test "$with_gnu_ld" = yes; then 4125 AC_MSG_CHECKING([for GNU ld]) 4126else 4127 AC_MSG_CHECKING([for non-GNU ld]) 4128fi 4129AC_CACHE_VAL(lt_cv_path_LD, 4130[if test -z "$LD"; then 4131 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4132 for ac_dir in $PATH; do 4133 IFS="$lt_save_ifs" 4134 test -z "$ac_dir" && ac_dir=. 4135 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4136 lt_cv_path_LD="$ac_dir/$ac_prog" 4137 # Check to see if the program is GNU ld. I'd rather use --version, 4138 # but apparently some variants of GNU ld only accept -v. 4139 # Break only if it was the GNU/non-GNU ld that we prefer. 4140 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4141 *GNU* | *'with BFD'*) 4142 test "$with_gnu_ld" != no && break 4143 ;; 4144 *) 4145 test "$with_gnu_ld" != yes && break 4146 ;; 4147 esac 4148 fi 4149 done 4150 IFS="$lt_save_ifs" 4151else 4152 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4153fi]) 4154LD="$lt_cv_path_LD" 4155if test -n "$LD"; then 4156 AC_MSG_RESULT($LD) 4157else 4158 AC_MSG_RESULT(no) 4159fi 4160test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4161_LT_PATH_LD_GNU 4162AC_SUBST([LD]) 4163 4164_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4165])# LT_PATH_LD 4166 4167# Old names: 4168AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4169AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4170dnl aclocal-1.4 backwards compatibility: 4171dnl AC_DEFUN([AM_PROG_LD], []) 4172dnl AC_DEFUN([AC_PROG_LD], []) 4173 4174 4175# _LT_PATH_LD_GNU 4176#- -------------- 4177m4_defun([_LT_PATH_LD_GNU], 4178[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4179[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4180case `$LD -v 2>&1 </dev/null` in 4181*GNU* | *'with BFD'*) 4182 lt_cv_prog_gnu_ld=yes 4183 ;; 4184*) 4185 lt_cv_prog_gnu_ld=no 4186 ;; 4187esac]) 4188with_gnu_ld=$lt_cv_prog_gnu_ld 4189])# _LT_PATH_LD_GNU 4190 4191 4192# _LT_CMD_RELOAD 4193# -------------- 4194# find reload flag for linker 4195# -- PORTME Some linkers may need a different reload flag. 4196m4_defun([_LT_CMD_RELOAD], 4197[AC_CACHE_CHECK([for $LD option to reload object files], 4198 lt_cv_ld_reload_flag, 4199 [lt_cv_ld_reload_flag='-r']) 4200reload_flag=$lt_cv_ld_reload_flag 4201case $reload_flag in 4202"" | " "*) ;; 4203*) reload_flag=" $reload_flag" ;; 4204esac 4205reload_cmds='$LD$reload_flag -o $output$reload_objs' 4206case $host_os in 4207 cygwin* | mingw* | pw32* | cegcc*) 4208 if test "$GCC" != yes; then 4209 reload_cmds=false 4210 fi 4211 ;; 4212 darwin*) 4213 if test "$GCC" = yes; then 4214 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4215 else 4216 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4217 fi 4218 ;; 4219esac 4220_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4221_LT_TAGDECL([], [reload_cmds], [2])dnl 4222])# _LT_CMD_RELOAD 4223 4224 4225# _LT_CHECK_MAGIC_METHOD 4226# ---------------------- 4227# how to check for library dependencies 4228# -- PORTME fill in with the dynamic library characteristics 4229m4_defun([_LT_CHECK_MAGIC_METHOD], 4230[m4_require([_LT_DECL_EGREP]) 4231m4_require([_LT_DECL_OBJDUMP]) 4232AC_CACHE_CHECK([how to recognize dependent libraries], 4233lt_cv_deplibs_check_method, 4234[lt_cv_file_magic_cmd='$MAGIC_CMD' 4235lt_cv_file_magic_test_file= 4236lt_cv_deplibs_check_method='unknown' 4237# Need to set the preceding variable on all platforms that support 4238# interlibrary dependencies. 4239# 'none' -- dependencies not supported. 4240# `unknown' -- same as none, but documents that we really don't know. 4241# 'pass_all' -- all dependencies passed with no checks. 4242# 'test_compile' -- check by making test program. 4243# 'file_magic [[regex]]' -- check by looking for files in library path 4244# which responds to the $file_magic_cmd with a given extended regex. 4245# If you have `file' or equivalent on your system and you're not sure 4246# whether `pass_all' will *always* work, you probably want this one. 4247 4248case $host_os in 4249aix[[4-9]]*) 4250 lt_cv_deplibs_check_method=pass_all 4251 ;; 4252 4253beos*) 4254 lt_cv_deplibs_check_method=pass_all 4255 ;; 4256 4257bsdi[[45]]*) 4258 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4259 lt_cv_file_magic_cmd='/usr/bin/file -L' 4260 lt_cv_file_magic_test_file=/shlib/libc.so 4261 ;; 4262 4263cygwin*) 4264 # func_win32_libid is a shell function defined in ltmain.sh 4265 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4266 lt_cv_file_magic_cmd='func_win32_libid' 4267 ;; 4268 4269mingw* | pw32*) 4270 # Base MSYS/MinGW do not provide the 'file' command needed by 4271 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4272 # unless we find 'file', for example because we are cross-compiling. 4273 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4274 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4275 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4276 lt_cv_file_magic_cmd='func_win32_libid' 4277 else 4278 # Keep this pattern in sync with the one in func_win32_libid. 4279 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4280 lt_cv_file_magic_cmd='$OBJDUMP -f' 4281 fi 4282 ;; 4283 4284cegcc*) 4285 # use the weaker test based on 'objdump'. See mingw*. 4286 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4287 lt_cv_file_magic_cmd='$OBJDUMP -f' 4288 ;; 4289 4290darwin* | rhapsody*) 4291 lt_cv_deplibs_check_method=pass_all 4292 ;; 4293 4294freebsd* | dragonfly*) 4295 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4296 case $host_cpu in 4297 i*86 ) 4298 # Not sure whether the presence of OpenBSD here was a mistake. 4299 # Let's accept both of them until this is cleared up. 4300 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4301 lt_cv_file_magic_cmd=/usr/bin/file 4302 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4303 ;; 4304 esac 4305 else 4306 lt_cv_deplibs_check_method=pass_all 4307 fi 4308 ;; 4309 4310gnu*) 4311 lt_cv_deplibs_check_method=pass_all 4312 ;; 4313 4314haiku*) 4315 lt_cv_deplibs_check_method=pass_all 4316 ;; 4317 4318hpux10.20* | hpux11*) 4319 lt_cv_file_magic_cmd=/usr/bin/file 4320 case $host_cpu in 4321 ia64*) 4322 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4323 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4324 ;; 4325 hppa*64*) 4326 [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]'] 4327 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4328 ;; 4329 *) 4330 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4331 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4332 ;; 4333 esac 4334 ;; 4335 4336interix[[3-9]]*) 4337 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4338 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4339 ;; 4340 4341irix5* | irix6* | nonstopux*) 4342 case $LD in 4343 *-32|*"-32 ") libmagic=32-bit;; 4344 *-n32|*"-n32 ") libmagic=N32;; 4345 *-64|*"-64 ") libmagic=64-bit;; 4346 *) libmagic=never-match;; 4347 esac 4348 lt_cv_deplibs_check_method=pass_all 4349 ;; 4350 4351# This must be glibc/ELF. 4352linux* | k*bsd*-gnu | kopensolaris*-gnu) 4353 lt_cv_deplibs_check_method=pass_all 4354 ;; 4355 4356netbsd*) 4357 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4358 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4359 else 4360 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4361 fi 4362 ;; 4363 4364newos6*) 4365 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4366 lt_cv_file_magic_cmd=/usr/bin/file 4367 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4368 ;; 4369 4370*nto* | *qnx*) 4371 lt_cv_deplibs_check_method=pass_all 4372 ;; 4373 4374openbsd*) 4375 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4376 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4377 else 4378 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4379 fi 4380 ;; 4381 4382osf3* | osf4* | osf5*) 4383 lt_cv_deplibs_check_method=pass_all 4384 ;; 4385 4386rdos*) 4387 lt_cv_deplibs_check_method=pass_all 4388 ;; 4389 4390solaris*) 4391 lt_cv_deplibs_check_method=pass_all 4392 ;; 4393 4394sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4395 lt_cv_deplibs_check_method=pass_all 4396 ;; 4397 4398sysv4 | sysv4.3*) 4399 case $host_vendor in 4400 motorola) 4401 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]]' 4402 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4403 ;; 4404 ncr) 4405 lt_cv_deplibs_check_method=pass_all 4406 ;; 4407 sequent) 4408 lt_cv_file_magic_cmd='/bin/file' 4409 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4410 ;; 4411 sni) 4412 lt_cv_file_magic_cmd='/bin/file' 4413 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4414 lt_cv_file_magic_test_file=/lib/libc.so 4415 ;; 4416 siemens) 4417 lt_cv_deplibs_check_method=pass_all 4418 ;; 4419 pc) 4420 lt_cv_deplibs_check_method=pass_all 4421 ;; 4422 esac 4423 ;; 4424 4425tpf*) 4426 lt_cv_deplibs_check_method=pass_all 4427 ;; 4428esac 4429]) 4430 4431file_magic_glob= 4432want_nocaseglob=no 4433if test "$build" = "$host"; then 4434 case $host_os in 4435 mingw* | pw32*) 4436 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4437 want_nocaseglob=yes 4438 else 4439 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4440 fi 4441 ;; 4442 esac 4443fi 4444 4445file_magic_cmd=$lt_cv_file_magic_cmd 4446deplibs_check_method=$lt_cv_deplibs_check_method 4447test -z "$deplibs_check_method" && deplibs_check_method=unknown 4448 4449_LT_DECL([], [deplibs_check_method], [1], 4450 [Method to check whether dependent libraries are shared objects]) 4451_LT_DECL([], [file_magic_cmd], [1], 4452 [Command to use when deplibs_check_method = "file_magic"]) 4453_LT_DECL([], [file_magic_glob], [1], 4454 [How to find potential files when deplibs_check_method = "file_magic"]) 4455_LT_DECL([], [want_nocaseglob], [1], 4456 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4457])# _LT_CHECK_MAGIC_METHOD 4458 4459 4460# LT_PATH_NM 4461# ---------- 4462# find the pathname to a BSD- or MS-compatible name lister 4463AC_DEFUN([LT_PATH_NM], 4464[AC_REQUIRE([AC_PROG_CC])dnl 4465AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4466[if test -n "$NM"; then 4467 # Let the user override the test. 4468 lt_cv_path_NM="$NM" 4469else 4470 lt_nm_to_check="${ac_tool_prefix}nm" 4471 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4472 lt_nm_to_check="$lt_nm_to_check nm" 4473 fi 4474 for lt_tmp_nm in $lt_nm_to_check; do 4475 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4476 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4477 IFS="$lt_save_ifs" 4478 test -z "$ac_dir" && ac_dir=. 4479 tmp_nm="$ac_dir/$lt_tmp_nm" 4480 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4481 # Check to see if the nm accepts a BSD-compat flag. 4482 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4483 # nm: unknown option "B" ignored 4484 # Tru64's nm complains that /dev/null is an invalid object file 4485 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4486 */dev/null* | *'Invalid file or object type'*) 4487 lt_cv_path_NM="$tmp_nm -B" 4488 break 4489 ;; 4490 *) 4491 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4492 */dev/null*) 4493 lt_cv_path_NM="$tmp_nm -p" 4494 break 4495 ;; 4496 *) 4497 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4498 continue # so that we can try to find one that supports BSD flags 4499 ;; 4500 esac 4501 ;; 4502 esac 4503 fi 4504 done 4505 IFS="$lt_save_ifs" 4506 done 4507 : ${lt_cv_path_NM=no} 4508fi]) 4509if test "$lt_cv_path_NM" != "no"; then 4510 NM="$lt_cv_path_NM" 4511else 4512 # Didn't find any BSD compatible name lister, look for dumpbin. 4513 if test -n "$DUMPBIN"; then : 4514 # Let the user override the test. 4515 else 4516 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4517 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4518 *COFF*) 4519 DUMPBIN="$DUMPBIN -symbols" 4520 ;; 4521 *) 4522 DUMPBIN=: 4523 ;; 4524 esac 4525 fi 4526 AC_SUBST([DUMPBIN]) 4527 if test "$DUMPBIN" != ":"; then 4528 NM="$DUMPBIN" 4529 fi 4530fi 4531test -z "$NM" && NM=nm 4532AC_SUBST([NM]) 4533_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4534 4535AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4536 [lt_cv_nm_interface="BSD nm" 4537 echo "int some_variable = 0;" > conftest.$ac_ext 4538 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4539 (eval "$ac_compile" 2>conftest.err) 4540 cat conftest.err >&AS_MESSAGE_LOG_FD 4541 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4542 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4543 cat conftest.err >&AS_MESSAGE_LOG_FD 4544 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4545 cat conftest.out >&AS_MESSAGE_LOG_FD 4546 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4547 lt_cv_nm_interface="MS dumpbin" 4548 fi 4549 rm -f conftest*]) 4550])# LT_PATH_NM 4551 4552# Old names: 4553AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4554AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4555dnl aclocal-1.4 backwards compatibility: 4556dnl AC_DEFUN([AM_PROG_NM], []) 4557dnl AC_DEFUN([AC_PROG_NM], []) 4558 4559# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4560# -------------------------------- 4561# how to determine the name of the shared library 4562# associated with a specific link library. 4563# -- PORTME fill in with the dynamic library characteristics 4564m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4565[m4_require([_LT_DECL_EGREP]) 4566m4_require([_LT_DECL_OBJDUMP]) 4567m4_require([_LT_DECL_DLLTOOL]) 4568AC_CACHE_CHECK([how to associate runtime and link libraries], 4569lt_cv_sharedlib_from_linklib_cmd, 4570[lt_cv_sharedlib_from_linklib_cmd='unknown' 4571 4572case $host_os in 4573cygwin* | mingw* | pw32* | cegcc*) 4574 # two different shell functions defined in ltmain.sh 4575 # decide which to use based on capabilities of $DLLTOOL 4576 case `$DLLTOOL --help 2>&1` in 4577 *--identify-strict*) 4578 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4579 ;; 4580 *) 4581 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4582 ;; 4583 esac 4584 ;; 4585*) 4586 # fallback: assume linklib IS sharedlib 4587 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4588 ;; 4589esac 4590]) 4591sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4592test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4593 4594_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4595 [Command to associate shared and link libraries]) 4596])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4597 4598 4599# _LT_PATH_MANIFEST_TOOL 4600# ---------------------- 4601# locate the manifest tool 4602m4_defun([_LT_PATH_MANIFEST_TOOL], 4603[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4604test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4605AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4606 [lt_cv_path_mainfest_tool=no 4607 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4608 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4609 cat conftest.err >&AS_MESSAGE_LOG_FD 4610 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4611 lt_cv_path_mainfest_tool=yes 4612 fi 4613 rm -f conftest*]) 4614if test "x$lt_cv_path_mainfest_tool" != xyes; then 4615 MANIFEST_TOOL=: 4616fi 4617_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4618])# _LT_PATH_MANIFEST_TOOL 4619 4620 4621# LT_LIB_M 4622# -------- 4623# check for math library 4624AC_DEFUN([LT_LIB_M], 4625[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4626LIBM= 4627case $host in 4628*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4629 # These system don't have libm, or don't need it 4630 ;; 4631*-ncr-sysv4.3*) 4632 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4633 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4634 ;; 4635*) 4636 AC_CHECK_LIB(m, cos, LIBM="-lm") 4637 ;; 4638esac 4639AC_SUBST([LIBM]) 4640])# LT_LIB_M 4641 4642# Old name: 4643AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4644dnl aclocal-1.4 backwards compatibility: 4645dnl AC_DEFUN([AC_CHECK_LIBM], []) 4646 4647 4648# _LT_COMPILER_NO_RTTI([TAGNAME]) 4649# ------------------------------- 4650m4_defun([_LT_COMPILER_NO_RTTI], 4651[m4_require([_LT_TAG_COMPILER])dnl 4652 4653_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4654 4655if test "$GCC" = yes; then 4656 case $cc_basename in 4657 nvcc*) 4658 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4659 *) 4660 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4661 esac 4662 4663 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4664 lt_cv_prog_compiler_rtti_exceptions, 4665 [-fno-rtti -fno-exceptions], [], 4666 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4667fi 4668_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4669 [Compiler flag to turn off builtin functions]) 4670])# _LT_COMPILER_NO_RTTI 4671 4672 4673# _LT_CMD_GLOBAL_SYMBOLS 4674# ---------------------- 4675m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4676[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4677AC_REQUIRE([AC_PROG_CC])dnl 4678AC_REQUIRE([AC_PROG_AWK])dnl 4679AC_REQUIRE([LT_PATH_NM])dnl 4680AC_REQUIRE([LT_PATH_LD])dnl 4681m4_require([_LT_DECL_SED])dnl 4682m4_require([_LT_DECL_EGREP])dnl 4683m4_require([_LT_TAG_COMPILER])dnl 4684 4685# Check for command to grab the raw symbol name followed by C symbol from nm. 4686AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4687AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4688[ 4689# These are sane defaults that work on at least a few old systems. 4690# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4691 4692# Character class describing NM global symbol codes. 4693symcode='[[BCDEGRST]]' 4694 4695# Regexp to match symbols that can be accessed directly from C. 4696sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4697 4698# Define system-specific variables. 4699case $host_os in 4700aix*) 4701 symcode='[[BCDT]]' 4702 ;; 4703cygwin* | mingw* | pw32* | cegcc*) 4704 symcode='[[ABCDGISTW]]' 4705 ;; 4706hpux*) 4707 if test "$host_cpu" = ia64; then 4708 symcode='[[ABCDEGRST]]' 4709 fi 4710 ;; 4711irix* | nonstopux*) 4712 symcode='[[BCDEGRST]]' 4713 ;; 4714osf*) 4715 symcode='[[BCDEGQRST]]' 4716 ;; 4717solaris*) 4718 symcode='[[BDRT]]' 4719 ;; 4720sco3.2v5*) 4721 symcode='[[DT]]' 4722 ;; 4723sysv4.2uw2*) 4724 symcode='[[DT]]' 4725 ;; 4726sysv5* | sco5v6* | unixware* | OpenUNIX*) 4727 symcode='[[ABDT]]' 4728 ;; 4729sysv4) 4730 symcode='[[DFNSTU]]' 4731 ;; 4732esac 4733 4734# If we're using GNU nm, then use its standard symbol codes. 4735case `$NM -V 2>&1` in 4736*GNU* | *'with BFD'*) 4737 symcode='[[ABCDGIRSTW]]' ;; 4738esac 4739 4740# Transform an extracted symbol line into a proper C declaration. 4741# Some systems (esp. on ia64) link data and code symbols differently, 4742# so use this general approach. 4743lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4744 4745# Transform an extracted symbol line into symbol name and symbol address 4746lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4747lt_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'" 4748 4749# Handle CRLF in mingw tool chain 4750opt_cr= 4751case $build_os in 4752mingw*) 4753 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4754 ;; 4755esac 4756 4757# Try without a prefix underscore, then with it. 4758for ac_symprfx in "" "_"; do 4759 4760 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4761 symxfrm="\\1 $ac_symprfx\\2 \\2" 4762 4763 # Write the raw and C identifiers. 4764 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4765 # Fake it for dumpbin and say T for any non-static function 4766 # and D for any global variable. 4767 # Also find C++ and __fastcall symbols from MSVC++, 4768 # which start with @ or ?. 4769 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4770" {last_section=section; section=\$ 3};"\ 4771" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4772" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4773" \$ 0!~/External *\|/{next};"\ 4774" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4775" {if(hide[section]) next};"\ 4776" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4777" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4778" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4779" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4780" ' prfx=^$ac_symprfx]" 4781 else 4782 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4783 fi 4784 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4785 4786 # Check to see that the pipe works correctly. 4787 pipe_works=no 4788 4789 rm -f conftest* 4790 cat > conftest.$ac_ext <<_LT_EOF 4791#ifdef __cplusplus 4792extern "C" { 4793#endif 4794char nm_test_var; 4795void nm_test_func(void); 4796void nm_test_func(void){} 4797#ifdef __cplusplus 4798} 4799#endif 4800int main(){nm_test_var='a';nm_test_func();return(0);} 4801_LT_EOF 4802 4803 if AC_TRY_EVAL(ac_compile); then 4804 # Now try to grab the symbols. 4805 nlist=conftest.nm 4806 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4807 # Try sorting and uniquifying the output. 4808 if sort "$nlist" | uniq > "$nlist"T; then 4809 mv -f "$nlist"T "$nlist" 4810 else 4811 rm -f "$nlist"T 4812 fi 4813 4814 # Make sure that we snagged all the symbols we need. 4815 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4816 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4817 cat <<_LT_EOF > conftest.$ac_ext 4818/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4819#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4820/* DATA imports from DLLs on WIN32 con't be const, because runtime 4821 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4822# define LT@&t@_DLSYM_CONST 4823#elif defined(__osf__) 4824/* This system does not cope well with relocations in const data. */ 4825# define LT@&t@_DLSYM_CONST 4826#else 4827# define LT@&t@_DLSYM_CONST const 4828#endif 4829 4830#ifdef __cplusplus 4831extern "C" { 4832#endif 4833 4834_LT_EOF 4835 # Now generate the symbol file. 4836 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4837 4838 cat <<_LT_EOF >> conftest.$ac_ext 4839 4840/* The mapping between symbol names and symbols. */ 4841LT@&t@_DLSYM_CONST struct { 4842 const char *name; 4843 void *address; 4844} 4845lt__PROGRAM__LTX_preloaded_symbols[[]] = 4846{ 4847 { "@PROGRAM@", (void *) 0 }, 4848_LT_EOF 4849 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4850 cat <<\_LT_EOF >> conftest.$ac_ext 4851 {0, (void *) 0} 4852}; 4853 4854/* This works around a problem in FreeBSD linker */ 4855#ifdef FREEBSD_WORKAROUND 4856static const void *lt_preloaded_setup() { 4857 return lt__PROGRAM__LTX_preloaded_symbols; 4858} 4859#endif 4860 4861#ifdef __cplusplus 4862} 4863#endif 4864_LT_EOF 4865 # Now try linking the two files. 4866 mv conftest.$ac_objext conftstm.$ac_objext 4867 lt_globsym_save_LIBS=$LIBS 4868 lt_globsym_save_CFLAGS=$CFLAGS 4869 LIBS="conftstm.$ac_objext" 4870 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4871 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4872 pipe_works=yes 4873 fi 4874 LIBS=$lt_globsym_save_LIBS 4875 CFLAGS=$lt_globsym_save_CFLAGS 4876 else 4877 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4878 fi 4879 else 4880 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4881 fi 4882 else 4883 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4884 fi 4885 else 4886 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4887 cat conftest.$ac_ext >&5 4888 fi 4889 rm -rf conftest* conftst* 4890 4891 # Do not use the global_symbol_pipe unless it works. 4892 if test "$pipe_works" = yes; then 4893 break 4894 else 4895 lt_cv_sys_global_symbol_pipe= 4896 fi 4897done 4898]) 4899if test -z "$lt_cv_sys_global_symbol_pipe"; then 4900 lt_cv_sys_global_symbol_to_cdecl= 4901fi 4902if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4903 AC_MSG_RESULT(failed) 4904else 4905 AC_MSG_RESULT(ok) 4906fi 4907 4908# Response file support. 4909if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4910 nm_file_list_spec='@' 4911elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4912 nm_file_list_spec='@' 4913fi 4914 4915_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4916 [Take the output of nm and produce a listing of raw symbols and C names]) 4917_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4918 [Transform the output of nm in a proper C declaration]) 4919_LT_DECL([global_symbol_to_c_name_address], 4920 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4921 [Transform the output of nm in a C name address pair]) 4922_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4923 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4924 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4925_LT_DECL([], [nm_file_list_spec], [1], 4926 [Specify filename containing input files for $NM]) 4927]) # _LT_CMD_GLOBAL_SYMBOLS 4928 4929 4930# _LT_COMPILER_PIC([TAGNAME]) 4931# --------------------------- 4932m4_defun([_LT_COMPILER_PIC], 4933[m4_require([_LT_TAG_COMPILER])dnl 4934_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4935_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4936_LT_TAGVAR(lt_prog_compiler_static, $1)= 4937 4938m4_if([$1], [CXX], [ 4939 # C++ specific cases for pic, static, wl, etc. 4940 if test "$GXX" = yes; then 4941 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4942 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4943 4944 case $host_os in 4945 aix*) 4946 # All AIX code is PIC. 4947 if test "$host_cpu" = ia64; then 4948 # AIX 5 now supports IA64 processor 4949 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4950 fi 4951 ;; 4952 4953 amigaos*) 4954 case $host_cpu in 4955 powerpc) 4956 # see comment about AmigaOS4 .so support 4957 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4958 ;; 4959 m68k) 4960 # FIXME: we need at least 68020 code to build shared libraries, but 4961 # adding the `-m68020' flag to GCC prevents building anything better, 4962 # like `-m68040'. 4963 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4964 ;; 4965 esac 4966 ;; 4967 4968 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4969 # PIC is the default for these OSes. 4970 ;; 4971 mingw* | cygwin* | os2* | pw32* | cegcc*) 4972 # This hack is so that the source file can tell whether it is being 4973 # built for inclusion in a dll (and should export symbols for example). 4974 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4975 # (--disable-auto-import) libraries 4976 m4_if([$1], [GCJ], [], 4977 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4978 ;; 4979 darwin* | rhapsody*) 4980 # PIC is the default on this platform 4981 # Common symbols not allowed in MH_DYLIB files 4982 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4983 ;; 4984 *djgpp*) 4985 # DJGPP does not support shared libraries at all 4986 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4987 ;; 4988 haiku*) 4989 # PIC is the default for Haiku. 4990 # The "-static" flag exists, but is broken. 4991 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4992 ;; 4993 interix[[3-9]]*) 4994 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4995 # Instead, we relocate shared libraries at runtime. 4996 ;; 4997 sysv4*MP*) 4998 if test -d /usr/nec; then 4999 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5000 fi 5001 ;; 5002 hpux*) 5003 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5004 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5005 # sets the default TLS model and affects inlining. 5006 case $host_cpu in 5007 hppa*64*) 5008 ;; 5009 *) 5010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5011 ;; 5012 esac 5013 ;; 5014 *qnx* | *nto*) 5015 # QNX uses GNU C++, but need to define -shared option too, otherwise 5016 # it will coredump. 5017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5018 ;; 5019 *) 5020 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5021 ;; 5022 esac 5023 else 5024 case $host_os in 5025 aix[[4-9]]*) 5026 # All AIX code is PIC. 5027 if test "$host_cpu" = ia64; then 5028 # AIX 5 now supports IA64 processor 5029 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5030 else 5031 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5032 fi 5033 ;; 5034 chorus*) 5035 case $cc_basename in 5036 cxch68*) 5037 # Green Hills C++ Compiler 5038 # _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" 5039 ;; 5040 esac 5041 ;; 5042 mingw* | cygwin* | os2* | pw32* | cegcc*) 5043 # This hack is so that the source file can tell whether it is being 5044 # built for inclusion in a dll (and should export symbols for example). 5045 m4_if([$1], [GCJ], [], 5046 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5047 ;; 5048 dgux*) 5049 case $cc_basename in 5050 ec++*) 5051 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5052 ;; 5053 ghcx*) 5054 # Green Hills C++ Compiler 5055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5056 ;; 5057 *) 5058 ;; 5059 esac 5060 ;; 5061 freebsd* | dragonfly*) 5062 # FreeBSD uses GNU C++ 5063 ;; 5064 hpux9* | hpux10* | hpux11*) 5065 case $cc_basename in 5066 CC*) 5067 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5068 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5069 if test "$host_cpu" != ia64; then 5070 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5071 fi 5072 ;; 5073 aCC*) 5074 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5075 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5076 case $host_cpu in 5077 hppa*64*|ia64*) 5078 # +Z the default 5079 ;; 5080 *) 5081 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5082 ;; 5083 esac 5084 ;; 5085 *) 5086 ;; 5087 esac 5088 ;; 5089 interix*) 5090 # This is c89, which is MS Visual C++ (no shared libs) 5091 # Anyone wants to do a port? 5092 ;; 5093 irix5* | irix6* | nonstopux*) 5094 case $cc_basename in 5095 CC*) 5096 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5097 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5098 # CC pic flag -KPIC is the default. 5099 ;; 5100 *) 5101 ;; 5102 esac 5103 ;; 5104 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5105 case $cc_basename in 5106 KCC*) 5107 # KAI C++ Compiler 5108 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5110 ;; 5111 ecpc* ) 5112 # old Intel C++ for x86_64 which still supported -KPIC. 5113 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5114 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5115 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5116 ;; 5117 icpc* ) 5118 # Intel C++, used to be incompatible with GCC. 5119 # ICC 10 doesn't accept -KPIC any more. 5120 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5121 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5122 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5123 ;; 5124 pgCC* | pgcpp*) 5125 # Portland Group C++ compiler 5126 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5128 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5129 ;; 5130 cxx*) 5131 # Compaq C++ 5132 # Make sure the PIC flag is empty. It appears that all Alpha 5133 # Linux and Compaq Tru64 Unix objects are PIC. 5134 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5135 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5136 ;; 5137 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5138 # IBM XL 8.0, 9.0 on PPC and BlueGene 5139 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5140 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5141 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5142 ;; 5143 *) 5144 case `$CC -V 2>&1 | sed 5q` in 5145 *Sun\ C*) 5146 # Sun C++ 5.9 5147 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5148 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5149 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5150 ;; 5151 esac 5152 ;; 5153 esac 5154 ;; 5155 lynxos*) 5156 ;; 5157 m88k*) 5158 ;; 5159 mvs*) 5160 case $cc_basename in 5161 cxx*) 5162 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5163 ;; 5164 *) 5165 ;; 5166 esac 5167 ;; 5168 netbsd*) 5169 ;; 5170 *qnx* | *nto*) 5171 # QNX uses GNU C++, but need to define -shared option too, otherwise 5172 # it will coredump. 5173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5174 ;; 5175 osf3* | osf4* | osf5*) 5176 case $cc_basename in 5177 KCC*) 5178 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5179 ;; 5180 RCC*) 5181 # Rational C++ 2.4.1 5182 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5183 ;; 5184 cxx*) 5185 # Digital/Compaq C++ 5186 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5187 # Make sure the PIC flag is empty. It appears that all Alpha 5188 # Linux and Compaq Tru64 Unix objects are PIC. 5189 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5190 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5191 ;; 5192 *) 5193 ;; 5194 esac 5195 ;; 5196 psos*) 5197 ;; 5198 solaris*) 5199 case $cc_basename in 5200 CC* | sunCC*) 5201 # Sun C++ 4.2, 5.x and Centerline C++ 5202 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5203 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5204 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5205 ;; 5206 gcx*) 5207 # Green Hills C++ Compiler 5208 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5209 ;; 5210 *) 5211 ;; 5212 esac 5213 ;; 5214 sunos4*) 5215 case $cc_basename in 5216 CC*) 5217 # Sun C++ 4.x 5218 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5220 ;; 5221 lcc*) 5222 # Lucid 5223 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5224 ;; 5225 *) 5226 ;; 5227 esac 5228 ;; 5229 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5230 case $cc_basename in 5231 CC*) 5232 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5233 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5234 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5235 ;; 5236 esac 5237 ;; 5238 tandem*) 5239 case $cc_basename in 5240 NCC*) 5241 # NonStop-UX NCC 3.20 5242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5243 ;; 5244 *) 5245 ;; 5246 esac 5247 ;; 5248 vxworks*) 5249 ;; 5250 *) 5251 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5252 ;; 5253 esac 5254 fi 5255], 5256[ 5257 if test "$GCC" = yes; then 5258 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5259 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5260 5261 case $host_os in 5262 aix*) 5263 # All AIX code is PIC. 5264 if test "$host_cpu" = ia64; then 5265 # AIX 5 now supports IA64 processor 5266 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5267 fi 5268 ;; 5269 5270 amigaos*) 5271 case $host_cpu in 5272 powerpc) 5273 # see comment about AmigaOS4 .so support 5274 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5275 ;; 5276 m68k) 5277 # FIXME: we need at least 68020 code to build shared libraries, but 5278 # adding the `-m68020' flag to GCC prevents building anything better, 5279 # like `-m68040'. 5280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5281 ;; 5282 esac 5283 ;; 5284 5285 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5286 # PIC is the default for these OSes. 5287 ;; 5288 5289 mingw* | cygwin* | pw32* | os2* | cegcc*) 5290 # This hack is so that the source file can tell whether it is being 5291 # built for inclusion in a dll (and should export symbols for example). 5292 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5293 # (--disable-auto-import) libraries 5294 m4_if([$1], [GCJ], [], 5295 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5296 ;; 5297 5298 darwin* | rhapsody*) 5299 # PIC is the default on this platform 5300 # Common symbols not allowed in MH_DYLIB files 5301 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5302 ;; 5303 5304 haiku*) 5305 # PIC is the default for Haiku. 5306 # The "-static" flag exists, but is broken. 5307 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5308 ;; 5309 5310 hpux*) 5311 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5312 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5313 # sets the default TLS model and affects inlining. 5314 case $host_cpu in 5315 hppa*64*) 5316 # +Z the default 5317 ;; 5318 *) 5319 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5320 ;; 5321 esac 5322 ;; 5323 5324 interix[[3-9]]*) 5325 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5326 # Instead, we relocate shared libraries at runtime. 5327 ;; 5328 5329 msdosdjgpp*) 5330 # Just because we use GCC doesn't mean we suddenly get shared libraries 5331 # on systems that don't support them. 5332 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5333 enable_shared=no 5334 ;; 5335 5336 *nto* | *qnx*) 5337 # QNX uses GNU C++, but need to define -shared option too, otherwise 5338 # it will coredump. 5339 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5340 ;; 5341 5342 sysv4*MP*) 5343 if test -d /usr/nec; then 5344 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5345 fi 5346 ;; 5347 5348 *) 5349 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5350 ;; 5351 esac 5352 5353 case $cc_basename in 5354 nvcc*) # Cuda Compiler Driver 2.2 5355 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5356 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5357 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5358 fi 5359 ;; 5360 esac 5361 else 5362 # PORTME Check for flag to pass linker flags through the system compiler. 5363 case $host_os in 5364 aix*) 5365 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5366 if test "$host_cpu" = ia64; then 5367 # AIX 5 now supports IA64 processor 5368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5369 else 5370 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5371 fi 5372 ;; 5373 5374 mingw* | cygwin* | pw32* | os2* | cegcc*) 5375 # This hack is so that the source file can tell whether it is being 5376 # built for inclusion in a dll (and should export symbols for example). 5377 m4_if([$1], [GCJ], [], 5378 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5379 ;; 5380 5381 hpux9* | hpux10* | hpux11*) 5382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5383 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5384 # not for PA HP-UX. 5385 case $host_cpu in 5386 hppa*64*|ia64*) 5387 # +Z the default 5388 ;; 5389 *) 5390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5391 ;; 5392 esac 5393 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5394 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5395 ;; 5396 5397 irix5* | irix6* | nonstopux*) 5398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399 # PIC (with -KPIC) is the default. 5400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5401 ;; 5402 5403 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5404 case $cc_basename in 5405 # old Intel for x86_64 which still supported -KPIC. 5406 ecc*) 5407 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5408 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5409 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5410 ;; 5411 # icc used to be incompatible with GCC. 5412 # ICC 10 doesn't accept -KPIC any more. 5413 icc* | ifort*) 5414 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5416 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5417 ;; 5418 # Lahey Fortran 8.1. 5419 lf95*) 5420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5421 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5422 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5423 ;; 5424 nagfor*) 5425 # NAG Fortran compiler 5426 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5427 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5428 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5429 ;; 5430 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5431 # Portland Group compilers (*not* the Pentium gcc compiler, 5432 # which looks to be a dead project) 5433 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5434 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5435 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5436 ;; 5437 ccc*) 5438 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5439 # All Alpha code is PIC. 5440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5441 ;; 5442 xl* | bgxl* | bgf* | mpixl*) 5443 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5444 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5445 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5446 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5447 ;; 5448 *) 5449 case `$CC -V 2>&1 | sed 5q` in 5450 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5451 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5453 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5455 ;; 5456 *Sun\ F* | *Sun*Fortran*) 5457 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5458 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5459 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5460 ;; 5461 *Sun\ C*) 5462 # Sun C 5.9 5463 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5464 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5465 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5466 ;; 5467 *Intel*\ [[CF]]*Compiler*) 5468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5470 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5471 ;; 5472 *Portland\ Group*) 5473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5475 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5476 ;; 5477 esac 5478 ;; 5479 esac 5480 ;; 5481 5482 newsos6) 5483 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5484 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5485 ;; 5486 5487 *nto* | *qnx*) 5488 # QNX uses GNU C++, but need to define -shared option too, otherwise 5489 # it will coredump. 5490 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5491 ;; 5492 5493 osf3* | osf4* | osf5*) 5494 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5495 # All OSF/1 code is PIC. 5496 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5497 ;; 5498 5499 rdos*) 5500 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5501 ;; 5502 5503 solaris*) 5504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506 case $cc_basename in 5507 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5508 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5509 *) 5510 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5511 esac 5512 ;; 5513 5514 sunos4*) 5515 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5516 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5517 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5518 ;; 5519 5520 sysv4 | sysv4.2uw2* | sysv4.3*) 5521 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5522 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5523 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5524 ;; 5525 5526 sysv4*MP*) 5527 if test -d /usr/nec ;then 5528 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5530 fi 5531 ;; 5532 5533 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5534 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5535 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5537 ;; 5538 5539 unicos*) 5540 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5541 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5542 ;; 5543 5544 uts4*) 5545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5546 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5547 ;; 5548 5549 *) 5550 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5551 ;; 5552 esac 5553 fi 5554]) 5555case $host_os in 5556 # For platforms which do not support PIC, -DPIC is meaningless: 5557 *djgpp*) 5558 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5559 ;; 5560 *) 5561 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5562 ;; 5563esac 5564 5565AC_CACHE_CHECK([for $compiler option to produce PIC], 5566 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5567 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5568_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5569 5570# 5571# Check to make sure the PIC flag actually works. 5572# 5573if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5574 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5575 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5576 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5577 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5578 "" | " "*) ;; 5579 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5580 esac], 5581 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5582 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5583fi 5584_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5585 [Additional compiler flags for building library objects]) 5586 5587_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5588 [How to pass a linker flag through the compiler]) 5589# 5590# Check to make sure the static flag actually works. 5591# 5592wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5593_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5594 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5595 $lt_tmp_static_flag, 5596 [], 5597 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5598_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5599 [Compiler flag to prevent dynamic linking]) 5600])# _LT_COMPILER_PIC 5601 5602 5603# _LT_LINKER_SHLIBS([TAGNAME]) 5604# ---------------------------- 5605# See if the linker supports building shared libraries. 5606m4_defun([_LT_LINKER_SHLIBS], 5607[AC_REQUIRE([LT_PATH_LD])dnl 5608AC_REQUIRE([LT_PATH_NM])dnl 5609m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5610m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5611m4_require([_LT_DECL_EGREP])dnl 5612m4_require([_LT_DECL_SED])dnl 5613m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5614m4_require([_LT_TAG_COMPILER])dnl 5615AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5616m4_if([$1], [CXX], [ 5617 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5618 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5619 case $host_os in 5620 aix[[4-9]]*) 5621 # If we're using GNU nm, then we don't want the "-C" option. 5622 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5623 # Also, AIX nm treats weak defined symbols like other global defined 5624 # symbols, whereas GNU nm marks them as "W". 5625 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5626 _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' 5627 else 5628 _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' 5629 fi 5630 ;; 5631 pw32*) 5632 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5633 ;; 5634 cygwin* | mingw* | cegcc*) 5635 case $cc_basename in 5636 cl*) 5637 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5638 ;; 5639 *) 5640 _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' 5641 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5642 ;; 5643 esac 5644 ;; 5645 *) 5646 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5647 ;; 5648 esac 5649], [ 5650 runpath_var= 5651 _LT_TAGVAR(allow_undefined_flag, $1)= 5652 _LT_TAGVAR(always_export_symbols, $1)=no 5653 _LT_TAGVAR(archive_cmds, $1)= 5654 _LT_TAGVAR(archive_expsym_cmds, $1)= 5655 _LT_TAGVAR(compiler_needs_object, $1)=no 5656 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5657 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5658 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5659 _LT_TAGVAR(hardcode_automatic, $1)=no 5660 _LT_TAGVAR(hardcode_direct, $1)=no 5661 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5663 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5664 _LT_TAGVAR(hardcode_minus_L, $1)=no 5665 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5666 _LT_TAGVAR(inherit_rpath, $1)=no 5667 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5668 _LT_TAGVAR(module_cmds, $1)= 5669 _LT_TAGVAR(module_expsym_cmds, $1)= 5670 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5671 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5672 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5673 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5674 # include_expsyms should be a list of space-separated symbols to be *always* 5675 # included in the symbol list 5676 _LT_TAGVAR(include_expsyms, $1)= 5677 # exclude_expsyms can be an extended regexp of symbols to exclude 5678 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5679 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5680 # as well as any symbol that contains `d'. 5681 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5682 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5683 # platforms (ab)use it in PIC code, but their linkers get confused if 5684 # the symbol is explicitly referenced. Since portable code cannot 5685 # rely on this symbol name, it's probably fine to never include it in 5686 # preloaded symbol tables. 5687 # Exclude shared library initialization/finalization symbols. 5688dnl Note also adjust exclude_expsyms for C++ above. 5689 extract_expsyms_cmds= 5690 5691 case $host_os in 5692 cygwin* | mingw* | pw32* | cegcc*) 5693 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5694 # When not using gcc, we currently assume that we are using 5695 # Microsoft Visual C++. 5696 if test "$GCC" != yes; then 5697 with_gnu_ld=no 5698 fi 5699 ;; 5700 interix*) 5701 # we just hope/assume this is gcc and not c89 (= MSVC++) 5702 with_gnu_ld=yes 5703 ;; 5704 openbsd*) 5705 with_gnu_ld=no 5706 ;; 5707 esac 5708 5709 _LT_TAGVAR(ld_shlibs, $1)=yes 5710 5711 # On some targets, GNU ld is compatible enough with the native linker 5712 # that we're better off using the native interface for both. 5713 lt_use_gnu_ld_interface=no 5714 if test "$with_gnu_ld" = yes; then 5715 case $host_os in 5716 aix*) 5717 # The AIX port of GNU ld has always aspired to compatibility 5718 # with the native linker. However, as the warning in the GNU ld 5719 # block says, versions before 2.19.5* couldn't really create working 5720 # shared libraries, regardless of the interface used. 5721 case `$LD -v 2>&1` in 5722 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5723 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5724 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5725 *) 5726 lt_use_gnu_ld_interface=yes 5727 ;; 5728 esac 5729 ;; 5730 *) 5731 lt_use_gnu_ld_interface=yes 5732 ;; 5733 esac 5734 fi 5735 5736 if test "$lt_use_gnu_ld_interface" = yes; then 5737 # If archive_cmds runs LD, not CC, wlarc should be empty 5738 wlarc='${wl}' 5739 5740 # Set some defaults for GNU ld with shared library support. These 5741 # are reset later if shared libraries are not supported. Putting them 5742 # here allows them to be overridden if necessary. 5743 runpath_var=LD_RUN_PATH 5744 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5745 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5746 # ancient GNU ld didn't support --whole-archive et. al. 5747 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5748 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5749 else 5750 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5751 fi 5752 supports_anon_versioning=no 5753 case `$LD -v 2>&1` in 5754 *GNU\ gold*) supports_anon_versioning=yes ;; 5755 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5756 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5757 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5758 *\ 2.11.*) ;; # other 2.11 versions 5759 *) supports_anon_versioning=yes ;; 5760 esac 5761 5762 # See if GNU ld supports shared libraries. 5763 case $host_os in 5764 aix[[3-9]]*) 5765 # On AIX/PPC, the GNU linker is very broken 5766 if test "$host_cpu" != ia64; then 5767 _LT_TAGVAR(ld_shlibs, $1)=no 5768 cat <<_LT_EOF 1>&2 5769 5770*** Warning: the GNU linker, at least up to release 2.19, is reported 5771*** to be unable to reliably create shared libraries on AIX. 5772*** Therefore, libtool is disabling shared libraries support. If you 5773*** really care for shared libraries, you may want to install binutils 5774*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5775*** You will then need to restart the configuration process. 5776 5777_LT_EOF 5778 fi 5779 ;; 5780 5781 amigaos*) 5782 case $host_cpu in 5783 powerpc) 5784 # see comment about AmigaOS4 .so support 5785 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5786 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5787 ;; 5788 m68k) 5789 _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)' 5790 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5791 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5792 ;; 5793 esac 5794 ;; 5795 5796 beos*) 5797 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5798 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5799 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5800 # support --undefined. This deserves some investigation. FIXME 5801 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5802 else 5803 _LT_TAGVAR(ld_shlibs, $1)=no 5804 fi 5805 ;; 5806 5807 cygwin* | mingw* | pw32* | cegcc*) 5808 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5809 # as there is no search path for DLLs. 5810 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5811 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5812 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5813 _LT_TAGVAR(always_export_symbols, $1)=no 5814 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5815 _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' 5816 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5817 5818 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5819 _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' 5820 # If the export-symbols file already is a .def file (1st line 5821 # is EXPORTS), use it as is; otherwise, prepend... 5822 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5823 cp $export_symbols $output_objdir/$soname.def; 5824 else 5825 echo EXPORTS > $output_objdir/$soname.def; 5826 cat $export_symbols >> $output_objdir/$soname.def; 5827 fi~ 5828 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5829 else 5830 _LT_TAGVAR(ld_shlibs, $1)=no 5831 fi 5832 ;; 5833 5834 haiku*) 5835 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5836 _LT_TAGVAR(link_all_deplibs, $1)=yes 5837 ;; 5838 5839 interix[[3-9]]*) 5840 _LT_TAGVAR(hardcode_direct, $1)=no 5841 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5842 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5843 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5844 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5845 # Instead, shared libraries are loaded at an image base (0x10000000 by 5846 # default) and relocated if they conflict, which is a slow very memory 5847 # consuming and fragmenting process. To avoid this, we pick a random, 5848 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5849 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5850 _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' 5851 _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' 5852 ;; 5853 5854 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5855 tmp_diet=no 5856 if test "$host_os" = linux-dietlibc; then 5857 case $cc_basename in 5858 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5859 esac 5860 fi 5861 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5862 && test "$tmp_diet" = no 5863 then 5864 tmp_addflag=' $pic_flag' 5865 tmp_sharedflag='-shared' 5866 case $cc_basename,$host_cpu in 5867 pgcc*) # Portland Group C compiler 5868 _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' 5869 tmp_addflag=' $pic_flag' 5870 ;; 5871 pgf77* | pgf90* | pgf95* | pgfortran*) 5872 # Portland Group f77 and f90 compilers 5873 _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' 5874 tmp_addflag=' $pic_flag -Mnomain' ;; 5875 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5876 tmp_addflag=' -i_dynamic' ;; 5877 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5878 tmp_addflag=' -i_dynamic -nofor_main' ;; 5879 ifc* | ifort*) # Intel Fortran compiler 5880 tmp_addflag=' -nofor_main' ;; 5881 lf95*) # Lahey Fortran 8.1 5882 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5883 tmp_sharedflag='--shared' ;; 5884 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5885 tmp_sharedflag='-qmkshrobj' 5886 tmp_addflag= ;; 5887 nvcc*) # Cuda Compiler Driver 2.2 5888 _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' 5889 _LT_TAGVAR(compiler_needs_object, $1)=yes 5890 ;; 5891 esac 5892 case `$CC -V 2>&1 | sed 5q` in 5893 *Sun\ C*) # Sun C 5.9 5894 _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' 5895 _LT_TAGVAR(compiler_needs_object, $1)=yes 5896 tmp_sharedflag='-G' ;; 5897 *Sun\ F*) # Sun Fortran 8.3 5898 tmp_sharedflag='-G' ;; 5899 esac 5900 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5901 5902 if test "x$supports_anon_versioning" = xyes; then 5903 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5904 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5905 echo "local: *; };" >> $output_objdir/$libname.ver~ 5906 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5907 fi 5908 5909 case $cc_basename in 5910 xlf* | bgf* | bgxlf* | mpixlf*) 5911 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5912 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5913 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5914 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5915 if test "x$supports_anon_versioning" = xyes; then 5916 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5917 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5918 echo "local: *; };" >> $output_objdir/$libname.ver~ 5919 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5920 fi 5921 ;; 5922 esac 5923 else 5924 _LT_TAGVAR(ld_shlibs, $1)=no 5925 fi 5926 ;; 5927 5928 netbsd*) 5929 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5930 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5931 wlarc= 5932 else 5933 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5934 _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' 5935 fi 5936 ;; 5937 5938 solaris*) 5939 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5940 _LT_TAGVAR(ld_shlibs, $1)=no 5941 cat <<_LT_EOF 1>&2 5942 5943*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5944*** create shared libraries on Solaris systems. Therefore, libtool 5945*** is disabling shared libraries support. We urge you to upgrade GNU 5946*** binutils to release 2.9.1 or newer. Another option is to modify 5947*** your PATH or compiler configuration so that the native linker is 5948*** used, and then restart. 5949 5950_LT_EOF 5951 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5952 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5953 _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' 5954 else 5955 _LT_TAGVAR(ld_shlibs, $1)=no 5956 fi 5957 ;; 5958 5959 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5960 case `$LD -v 2>&1` in 5961 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5962 _LT_TAGVAR(ld_shlibs, $1)=no 5963 cat <<_LT_EOF 1>&2 5964 5965*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5966*** reliably create shared libraries on SCO systems. Therefore, libtool 5967*** is disabling shared libraries support. We urge you to upgrade GNU 5968*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5969*** your PATH or compiler configuration so that the native linker is 5970*** used, and then restart. 5971 5972_LT_EOF 5973 ;; 5974 *) 5975 # For security reasons, it is highly recommended that you always 5976 # use absolute paths for naming shared libraries, and exclude the 5977 # DT_RUNPATH tag from executables and libraries. But doing so 5978 # requires that you compile everything twice, which is a pain. 5979 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5980 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5981 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5982 _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' 5983 else 5984 _LT_TAGVAR(ld_shlibs, $1)=no 5985 fi 5986 ;; 5987 esac 5988 ;; 5989 5990 sunos4*) 5991 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5992 wlarc= 5993 _LT_TAGVAR(hardcode_direct, $1)=yes 5994 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5995 ;; 5996 5997 *) 5998 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5999 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6000 _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' 6001 else 6002 _LT_TAGVAR(ld_shlibs, $1)=no 6003 fi 6004 ;; 6005 esac 6006 6007 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6008 runpath_var= 6009 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6010 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6011 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6012 fi 6013 else 6014 # PORTME fill in a description of your system's linker (not GNU ld) 6015 case $host_os in 6016 aix3*) 6017 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6018 _LT_TAGVAR(always_export_symbols, $1)=yes 6019 _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' 6020 # Note: this linker hardcodes the directories in LIBPATH if there 6021 # are no directories specified by -L. 6022 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6023 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6024 # Neither direct hardcoding nor static linking is supported with a 6025 # broken collect2. 6026 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6027 fi 6028 ;; 6029 6030 aix[[4-9]]*) 6031 if test "$host_cpu" = ia64; then 6032 # On IA64, the linker does run time linking by default, so we don't 6033 # have to do anything special. 6034 aix_use_runtimelinking=no 6035 exp_sym_flag='-Bexport' 6036 no_entry_flag="" 6037 else 6038 # If we're using GNU nm, then we don't want the "-C" option. 6039 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6040 # Also, AIX nm treats weak defined symbols like other global 6041 # defined symbols, whereas GNU nm marks them as "W". 6042 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6043 _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' 6044 else 6045 _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' 6046 fi 6047 aix_use_runtimelinking=no 6048 6049 # Test if we are trying to use run time linking or normal 6050 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6051 # need to do runtime linking. 6052 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6053 for ld_flag in $LDFLAGS; do 6054 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6055 aix_use_runtimelinking=yes 6056 break 6057 fi 6058 done 6059 ;; 6060 esac 6061 6062 exp_sym_flag='-bexport' 6063 no_entry_flag='-bnoentry' 6064 fi 6065 6066 # When large executables or shared objects are built, AIX ld can 6067 # have problems creating the table of contents. If linking a library 6068 # or program results in "error TOC overflow" add -mminimal-toc to 6069 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6070 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6071 6072 _LT_TAGVAR(archive_cmds, $1)='' 6073 _LT_TAGVAR(hardcode_direct, $1)=yes 6074 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6075 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6076 _LT_TAGVAR(link_all_deplibs, $1)=yes 6077 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6078 6079 if test "$GCC" = yes; then 6080 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6081 # We only want to do this on AIX 4.2 and lower, the check 6082 # below for broken collect2 doesn't work under 4.3+ 6083 collect2name=`${CC} -print-prog-name=collect2` 6084 if test -f "$collect2name" && 6085 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6086 then 6087 # We have reworked collect2 6088 : 6089 else 6090 # We have old collect2 6091 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6092 # It fails to find uninstalled libraries when the uninstalled 6093 # path is not listed in the libpath. Setting hardcode_minus_L 6094 # to unsupported forces relinking 6095 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6097 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6098 fi 6099 ;; 6100 esac 6101 shared_flag='-shared' 6102 if test "$aix_use_runtimelinking" = yes; then 6103 shared_flag="$shared_flag "'${wl}-G' 6104 fi 6105 else 6106 # not using gcc 6107 if test "$host_cpu" = ia64; then 6108 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6109 # chokes on -Wl,-G. The following line is correct: 6110 shared_flag='-G' 6111 else 6112 if test "$aix_use_runtimelinking" = yes; then 6113 shared_flag='${wl}-G' 6114 else 6115 shared_flag='${wl}-bM:SRE' 6116 fi 6117 fi 6118 fi 6119 6120 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6121 # It seems that -bexpall does not export symbols beginning with 6122 # underscore (_), so it is better to generate a list of symbols to export. 6123 _LT_TAGVAR(always_export_symbols, $1)=yes 6124 if test "$aix_use_runtimelinking" = yes; then 6125 # Warning - without using the other runtime loading flags (-brtl), 6126 # -berok will link without error, but may produce a broken library. 6127 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6128 # Determine the default libpath from the value encoded in an 6129 # empty executable. 6130 _LT_SYS_MODULE_PATH_AIX([$1]) 6131 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6132 _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" 6133 else 6134 if test "$host_cpu" = ia64; then 6135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6136 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6137 _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" 6138 else 6139 # Determine the default libpath from the value encoded in an 6140 # empty executable. 6141 _LT_SYS_MODULE_PATH_AIX([$1]) 6142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6143 # Warning - without using the other run time loading flags, 6144 # -berok will link without error, but may produce a broken library. 6145 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6146 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6147 if test "$with_gnu_ld" = yes; then 6148 # We only use this code for GNU lds that support --whole-archive. 6149 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6150 else 6151 # Exported symbols can be pulled into shared objects from archives 6152 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6153 fi 6154 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6155 # This is similar to how AIX traditionally builds its shared libraries. 6156 _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' 6157 fi 6158 fi 6159 ;; 6160 6161 amigaos*) 6162 case $host_cpu in 6163 powerpc) 6164 # see comment about AmigaOS4 .so support 6165 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6166 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6167 ;; 6168 m68k) 6169 _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)' 6170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6171 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6172 ;; 6173 esac 6174 ;; 6175 6176 bsdi[[45]]*) 6177 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6178 ;; 6179 6180 cygwin* | mingw* | pw32* | cegcc*) 6181 # When not using gcc, we currently assume that we are using 6182 # Microsoft Visual C++. 6183 # hardcode_libdir_flag_spec is actually meaningless, as there is 6184 # no search path for DLLs. 6185 case $cc_basename in 6186 cl*) 6187 # Native MSVC 6188 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6189 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6190 _LT_TAGVAR(always_export_symbols, $1)=yes 6191 _LT_TAGVAR(file_list_spec, $1)='@' 6192 # Tell ltmain to make .lib files, not .a files. 6193 libext=lib 6194 # Tell ltmain to make .dll files, not .so files. 6195 shrext_cmds=".dll" 6196 # FIXME: Setting linknames here is a bad hack. 6197 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6198 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6199 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6200 else 6201 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6202 fi~ 6203 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6204 linknames=' 6205 # The linker will not automatically build a static lib if we build a DLL. 6206 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6207 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6208 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6209 _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' 6210 # Don't use ranlib 6211 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6212 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6213 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6214 case $lt_outputfile in 6215 *.exe|*.EXE) ;; 6216 *) 6217 lt_outputfile="$lt_outputfile.exe" 6218 lt_tool_outputfile="$lt_tool_outputfile.exe" 6219 ;; 6220 esac~ 6221 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6222 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6223 $RM "$lt_outputfile.manifest"; 6224 fi' 6225 ;; 6226 *) 6227 # Assume MSVC wrapper 6228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6229 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6230 # Tell ltmain to make .lib files, not .a files. 6231 libext=lib 6232 # Tell ltmain to make .dll files, not .so files. 6233 shrext_cmds=".dll" 6234 # FIXME: Setting linknames here is a bad hack. 6235 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6236 # The linker will automatically build a .lib file if we build a DLL. 6237 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6238 # FIXME: Should let the user specify the lib program. 6239 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6240 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6241 ;; 6242 esac 6243 ;; 6244 6245 darwin* | rhapsody*) 6246 _LT_DARWIN_LINKER_FEATURES($1) 6247 ;; 6248 6249 dgux*) 6250 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6251 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6252 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6253 ;; 6254 6255 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6256 # support. Future versions do this automatically, but an explicit c++rt0.o 6257 # does not break anything, and helps significantly (at the cost of a little 6258 # extra space). 6259 freebsd2.2*) 6260 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6261 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6262 _LT_TAGVAR(hardcode_direct, $1)=yes 6263 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6264 ;; 6265 6266 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6267 freebsd2.*) 6268 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6269 _LT_TAGVAR(hardcode_direct, $1)=yes 6270 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6271 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6272 ;; 6273 6274 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6275 freebsd* | dragonfly*) 6276 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6277 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6278 _LT_TAGVAR(hardcode_direct, $1)=yes 6279 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6280 ;; 6281 6282 hpux9*) 6283 if test "$GCC" = yes; then 6284 _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' 6285 else 6286 _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' 6287 fi 6288 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6289 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6290 _LT_TAGVAR(hardcode_direct, $1)=yes 6291 6292 # hardcode_minus_L: Not really in the search PATH, 6293 # but as the default location of the library. 6294 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6295 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6296 ;; 6297 6298 hpux10*) 6299 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6300 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6301 else 6302 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6303 fi 6304 if test "$with_gnu_ld" = no; then 6305 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6306 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6307 _LT_TAGVAR(hardcode_direct, $1)=yes 6308 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6309 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6310 # hardcode_minus_L: Not really in the search PATH, 6311 # but as the default location of the library. 6312 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6313 fi 6314 ;; 6315 6316 hpux11*) 6317 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6318 case $host_cpu in 6319 hppa*64*) 6320 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6321 ;; 6322 ia64*) 6323 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6324 ;; 6325 *) 6326 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6327 ;; 6328 esac 6329 else 6330 case $host_cpu in 6331 hppa*64*) 6332 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6333 ;; 6334 ia64*) 6335 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6336 ;; 6337 *) 6338 m4_if($1, [], [ 6339 # Older versions of the 11.00 compiler do not understand -b yet 6340 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6341 _LT_LINKER_OPTION([if $CC understands -b], 6342 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6343 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6344 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6345 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6346 ;; 6347 esac 6348 fi 6349 if test "$with_gnu_ld" = no; then 6350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6351 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6352 6353 case $host_cpu in 6354 hppa*64*|ia64*) 6355 _LT_TAGVAR(hardcode_direct, $1)=no 6356 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6357 ;; 6358 *) 6359 _LT_TAGVAR(hardcode_direct, $1)=yes 6360 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6361 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6362 6363 # hardcode_minus_L: Not really in the search PATH, 6364 # but as the default location of the library. 6365 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6366 ;; 6367 esac 6368 fi 6369 ;; 6370 6371 irix5* | irix6* | nonstopux*) 6372 if test "$GCC" = yes; then 6373 _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' 6374 # Try to use the -exported_symbol ld option, if it does not 6375 # work, assume that -exports_file does not work either and 6376 # implicitly export all symbols. 6377 # This should be the same for all languages, so no per-tag cache variable. 6378 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6379 [lt_cv_irix_exported_symbol], 6380 [save_LDFLAGS="$LDFLAGS" 6381 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6382 AC_LINK_IFELSE( 6383 [AC_LANG_SOURCE( 6384 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6385 [C++], [[int foo (void) { return 0; }]], 6386 [Fortran 77], [[ 6387 subroutine foo 6388 end]], 6389 [Fortran], [[ 6390 subroutine foo 6391 end]])])], 6392 [lt_cv_irix_exported_symbol=yes], 6393 [lt_cv_irix_exported_symbol=no]) 6394 LDFLAGS="$save_LDFLAGS"]) 6395 if test "$lt_cv_irix_exported_symbol" = yes; then 6396 _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' 6397 fi 6398 else 6399 _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' 6400 _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' 6401 fi 6402 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6404 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6405 _LT_TAGVAR(inherit_rpath, $1)=yes 6406 _LT_TAGVAR(link_all_deplibs, $1)=yes 6407 ;; 6408 6409 netbsd*) 6410 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6411 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6412 else 6413 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6414 fi 6415 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6416 _LT_TAGVAR(hardcode_direct, $1)=yes 6417 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6418 ;; 6419 6420 newsos6) 6421 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6422 _LT_TAGVAR(hardcode_direct, $1)=yes 6423 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6424 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6425 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6426 ;; 6427 6428 *nto* | *qnx*) 6429 ;; 6430 6431 openbsd*) 6432 if test -f /usr/libexec/ld.so; then 6433 _LT_TAGVAR(hardcode_direct, $1)=yes 6434 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6435 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6436 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6437 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6438 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6439 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6440 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6441 else 6442 case $host_os in 6443 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6444 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6446 ;; 6447 *) 6448 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6449 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6450 ;; 6451 esac 6452 fi 6453 else 6454 _LT_TAGVAR(ld_shlibs, $1)=no 6455 fi 6456 ;; 6457 6458 os2*) 6459 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6460 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6461 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6462 _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' 6463 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6464 ;; 6465 6466 osf3*) 6467 if test "$GCC" = yes; then 6468 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6469 _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' 6470 else 6471 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6472 _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' 6473 fi 6474 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6475 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6476 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6477 ;; 6478 6479 osf4* | osf5*) # as osf3* with the addition of -msym flag 6480 if test "$GCC" = yes; then 6481 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6482 _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' 6483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6484 else 6485 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6486 _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' 6487 _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~ 6488 $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' 6489 6490 # Both c and cxx compiler support -rpath directly 6491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6492 fi 6493 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6494 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6495 ;; 6496 6497 solaris*) 6498 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6499 if test "$GCC" = yes; then 6500 wlarc='${wl}' 6501 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6502 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6503 $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' 6504 else 6505 case `$CC -V 2>&1` in 6506 *"Compilers 5.0"*) 6507 wlarc='' 6508 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6509 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6510 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6511 ;; 6512 *) 6513 wlarc='${wl}' 6514 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6515 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6516 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6517 ;; 6518 esac 6519 fi 6520 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6521 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6522 case $host_os in 6523 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6524 *) 6525 # The compiler driver will combine and reorder linker options, 6526 # but understands `-z linker_flag'. GCC discards it without `$wl', 6527 # but is careful enough not to reorder. 6528 # Supported since Solaris 2.6 (maybe 2.5.1?) 6529 if test "$GCC" = yes; then 6530 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6531 else 6532 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6533 fi 6534 ;; 6535 esac 6536 _LT_TAGVAR(link_all_deplibs, $1)=yes 6537 ;; 6538 6539 sunos4*) 6540 if test "x$host_vendor" = xsequent; then 6541 # Use $CC to link under sequent, because it throws in some extra .o 6542 # files that make .init and .fini sections work. 6543 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6544 else 6545 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6546 fi 6547 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6548 _LT_TAGVAR(hardcode_direct, $1)=yes 6549 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6550 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6551 ;; 6552 6553 sysv4) 6554 case $host_vendor in 6555 sni) 6556 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6557 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6558 ;; 6559 siemens) 6560 ## LD is ld it makes a PLAMLIB 6561 ## CC just makes a GrossModule. 6562 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6563 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6564 _LT_TAGVAR(hardcode_direct, $1)=no 6565 ;; 6566 motorola) 6567 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6568 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6569 ;; 6570 esac 6571 runpath_var='LD_RUN_PATH' 6572 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6573 ;; 6574 6575 sysv4.3*) 6576 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6577 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6578 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6579 ;; 6580 6581 sysv4*MP*) 6582 if test -d /usr/nec; then 6583 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6584 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6585 runpath_var=LD_RUN_PATH 6586 hardcode_runpath_var=yes 6587 _LT_TAGVAR(ld_shlibs, $1)=yes 6588 fi 6589 ;; 6590 6591 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6592 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6593 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6594 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6595 runpath_var='LD_RUN_PATH' 6596 6597 if test "$GCC" = yes; then 6598 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6599 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6600 else 6601 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6602 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6603 fi 6604 ;; 6605 6606 sysv5* | sco3.2v5* | sco5v6*) 6607 # Note: We can NOT use -z defs as we might desire, because we do not 6608 # link with -lc, and that would cause any symbols used from libc to 6609 # always be unresolved, which means just about no library would 6610 # ever link correctly. If we're not using GNU ld we use -z text 6611 # though, which does catch some bad symbols but isn't as heavy-handed 6612 # as -z defs. 6613 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6614 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6615 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6616 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6617 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6618 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6619 _LT_TAGVAR(link_all_deplibs, $1)=yes 6620 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6621 runpath_var='LD_RUN_PATH' 6622 6623 if test "$GCC" = yes; then 6624 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6625 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6626 else 6627 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6628 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6629 fi 6630 ;; 6631 6632 uts4*) 6633 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6634 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6635 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6636 ;; 6637 6638 *) 6639 _LT_TAGVAR(ld_shlibs, $1)=no 6640 ;; 6641 esac 6642 6643 if test x$host_vendor = xsni; then 6644 case $host in 6645 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6646 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6647 ;; 6648 esac 6649 fi 6650 fi 6651]) 6652AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6653test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6654 6655_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6656 6657_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6658_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6659_LT_DECL([], [extract_expsyms_cmds], [2], 6660 [The commands to extract the exported symbol list from a shared archive]) 6661 6662# 6663# Do we need to explicitly link libc? 6664# 6665case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6666x|xyes) 6667 # Assume -lc should be added 6668 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6669 6670 if test "$enable_shared" = yes && test "$GCC" = yes; then 6671 case $_LT_TAGVAR(archive_cmds, $1) in 6672 *'~'*) 6673 # FIXME: we may have to deal with multi-command sequences. 6674 ;; 6675 '$CC '*) 6676 # Test whether the compiler implicitly links with -lc since on some 6677 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6678 # to ld, don't add -lc before -lgcc. 6679 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6680 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6681 [$RM conftest* 6682 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6683 6684 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6685 soname=conftest 6686 lib=conftest 6687 libobjs=conftest.$ac_objext 6688 deplibs= 6689 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6690 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6691 compiler_flags=-v 6692 linker_flags=-v 6693 verstring= 6694 output_objdir=. 6695 libname=conftest 6696 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6697 _LT_TAGVAR(allow_undefined_flag, $1)= 6698 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6699 then 6700 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6701 else 6702 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6703 fi 6704 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6705 else 6706 cat conftest.err 1>&5 6707 fi 6708 $RM conftest* 6709 ]) 6710 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6711 ;; 6712 esac 6713 fi 6714 ;; 6715esac 6716 6717_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6718 [Whether or not to add -lc for building shared libraries]) 6719_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6720 [enable_shared_with_static_runtimes], [0], 6721 [Whether or not to disallow shared libs when runtime libs are static]) 6722_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6723 [Compiler flag to allow reflexive dlopens]) 6724_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6725 [Compiler flag to generate shared objects directly from archives]) 6726_LT_TAGDECL([], [compiler_needs_object], [1], 6727 [Whether the compiler copes with passing no objects directly]) 6728_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6729 [Create an old-style archive from a shared archive]) 6730_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6731 [Create a temporary old-style archive to link instead of a shared archive]) 6732_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6733_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6734_LT_TAGDECL([], [module_cmds], [2], 6735 [Commands used to build a loadable module if different from building 6736 a shared archive.]) 6737_LT_TAGDECL([], [module_expsym_cmds], [2]) 6738_LT_TAGDECL([], [with_gnu_ld], [1], 6739 [Whether we are building with GNU ld or not]) 6740_LT_TAGDECL([], [allow_undefined_flag], [1], 6741 [Flag that allows shared libraries with undefined symbols to be built]) 6742_LT_TAGDECL([], [no_undefined_flag], [1], 6743 [Flag that enforces no undefined symbols]) 6744_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6745 [Flag to hardcode $libdir into a binary during linking. 6746 This must work even if $libdir does not exist]) 6747_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6748 [Whether we need a single "-rpath" flag with a separated argument]) 6749_LT_TAGDECL([], [hardcode_direct], [0], 6750 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6751 DIR into the resulting binary]) 6752_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6753 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6754 DIR into the resulting binary and the resulting library dependency is 6755 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6756 library is relocated]) 6757_LT_TAGDECL([], [hardcode_minus_L], [0], 6758 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6759 into the resulting binary]) 6760_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6761 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6762 into the resulting binary]) 6763_LT_TAGDECL([], [hardcode_automatic], [0], 6764 [Set to "yes" if building a shared library automatically hardcodes DIR 6765 into the library and all subsequent libraries and executables linked 6766 against it]) 6767_LT_TAGDECL([], [inherit_rpath], [0], 6768 [Set to yes if linker adds runtime paths of dependent libraries 6769 to runtime path list]) 6770_LT_TAGDECL([], [link_all_deplibs], [0], 6771 [Whether libtool must link a program against all its dependency libraries]) 6772_LT_TAGDECL([], [always_export_symbols], [0], 6773 [Set to "yes" if exported symbols are required]) 6774_LT_TAGDECL([], [export_symbols_cmds], [2], 6775 [The commands to list exported symbols]) 6776_LT_TAGDECL([], [exclude_expsyms], [1], 6777 [Symbols that should not be listed in the preloaded symbols]) 6778_LT_TAGDECL([], [include_expsyms], [1], 6779 [Symbols that must always be exported]) 6780_LT_TAGDECL([], [prelink_cmds], [2], 6781 [Commands necessary for linking programs (against libraries) with templates]) 6782_LT_TAGDECL([], [postlink_cmds], [2], 6783 [Commands necessary for finishing linking programs]) 6784_LT_TAGDECL([], [file_list_spec], [1], 6785 [Specify filename containing input files]) 6786dnl FIXME: Not yet implemented 6787dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6788dnl [Compiler flag to generate thread safe objects]) 6789])# _LT_LINKER_SHLIBS 6790 6791 6792# _LT_LANG_C_CONFIG([TAG]) 6793# ------------------------ 6794# Ensure that the configuration variables for a C compiler are suitably 6795# defined. These variables are subsequently used by _LT_CONFIG to write 6796# the compiler configuration to `libtool'. 6797m4_defun([_LT_LANG_C_CONFIG], 6798[m4_require([_LT_DECL_EGREP])dnl 6799lt_save_CC="$CC" 6800AC_LANG_PUSH(C) 6801 6802# Source file extension for C test sources. 6803ac_ext=c 6804 6805# Object file extension for compiled C test sources. 6806objext=o 6807_LT_TAGVAR(objext, $1)=$objext 6808 6809# Code to be used in simple compile tests 6810lt_simple_compile_test_code="int some_variable = 0;" 6811 6812# Code to be used in simple link tests 6813lt_simple_link_test_code='int main(){return(0);}' 6814 6815_LT_TAG_COMPILER 6816# Save the default compiler, since it gets overwritten when the other 6817# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6818compiler_DEFAULT=$CC 6819 6820# save warnings/boilerplate of simple test code 6821_LT_COMPILER_BOILERPLATE 6822_LT_LINKER_BOILERPLATE 6823 6824if test -n "$compiler"; then 6825 _LT_COMPILER_NO_RTTI($1) 6826 _LT_COMPILER_PIC($1) 6827 _LT_COMPILER_C_O($1) 6828 _LT_COMPILER_FILE_LOCKS($1) 6829 _LT_LINKER_SHLIBS($1) 6830 _LT_SYS_DYNAMIC_LINKER($1) 6831 _LT_LINKER_HARDCODE_LIBPATH($1) 6832 LT_SYS_DLOPEN_SELF 6833 _LT_CMD_STRIPLIB 6834 6835 # Report which library types will actually be built 6836 AC_MSG_CHECKING([if libtool supports shared libraries]) 6837 AC_MSG_RESULT([$can_build_shared]) 6838 6839 AC_MSG_CHECKING([whether to build shared libraries]) 6840 test "$can_build_shared" = "no" && enable_shared=no 6841 6842 # On AIX, shared libraries and static libraries use the same namespace, and 6843 # are all built from PIC. 6844 case $host_os in 6845 aix3*) 6846 test "$enable_shared" = yes && enable_static=no 6847 if test -n "$RANLIB"; then 6848 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6849 postinstall_cmds='$RANLIB $lib' 6850 fi 6851 ;; 6852 6853 aix[[4-9]]*) 6854 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6855 test "$enable_shared" = yes && enable_static=no 6856 fi 6857 ;; 6858 esac 6859 AC_MSG_RESULT([$enable_shared]) 6860 6861 AC_MSG_CHECKING([whether to build static libraries]) 6862 # Make sure either enable_shared or enable_static is yes. 6863 test "$enable_shared" = yes || enable_static=yes 6864 AC_MSG_RESULT([$enable_static]) 6865 6866 _LT_CONFIG($1) 6867fi 6868AC_LANG_POP 6869CC="$lt_save_CC" 6870])# _LT_LANG_C_CONFIG 6871 6872 6873# _LT_LANG_CXX_CONFIG([TAG]) 6874# -------------------------- 6875# Ensure that the configuration variables for a C++ compiler are suitably 6876# defined. These variables are subsequently used by _LT_CONFIG to write 6877# the compiler configuration to `libtool'. 6878m4_defun([_LT_LANG_CXX_CONFIG], 6879[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6880m4_require([_LT_DECL_EGREP])dnl 6881m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6882if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6883 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6884 (test "X$CXX" != "Xg++"))) ; then 6885 AC_PROG_CXXCPP 6886else 6887 _lt_caught_CXX_error=yes 6888fi 6889 6890AC_LANG_PUSH(C++) 6891_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6892_LT_TAGVAR(allow_undefined_flag, $1)= 6893_LT_TAGVAR(always_export_symbols, $1)=no 6894_LT_TAGVAR(archive_expsym_cmds, $1)= 6895_LT_TAGVAR(compiler_needs_object, $1)=no 6896_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6897_LT_TAGVAR(hardcode_direct, $1)=no 6898_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6899_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6900_LT_TAGVAR(hardcode_libdir_separator, $1)= 6901_LT_TAGVAR(hardcode_minus_L, $1)=no 6902_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6903_LT_TAGVAR(hardcode_automatic, $1)=no 6904_LT_TAGVAR(inherit_rpath, $1)=no 6905_LT_TAGVAR(module_cmds, $1)= 6906_LT_TAGVAR(module_expsym_cmds, $1)= 6907_LT_TAGVAR(link_all_deplibs, $1)=unknown 6908_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6909_LT_TAGVAR(reload_flag, $1)=$reload_flag 6910_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6911_LT_TAGVAR(no_undefined_flag, $1)= 6912_LT_TAGVAR(whole_archive_flag_spec, $1)= 6913_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6914 6915# Source file extension for C++ test sources. 6916ac_ext=cpp 6917 6918# Object file extension for compiled C++ test sources. 6919objext=o 6920_LT_TAGVAR(objext, $1)=$objext 6921 6922# No sense in running all these tests if we already determined that 6923# the CXX compiler isn't working. Some variables (like enable_shared) 6924# are currently assumed to apply to all compilers on this platform, 6925# and will be corrupted by setting them based on a non-working compiler. 6926if test "$_lt_caught_CXX_error" != yes; then 6927 # Code to be used in simple compile tests 6928 lt_simple_compile_test_code="int some_variable = 0;" 6929 6930 # Code to be used in simple link tests 6931 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6932 6933 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6934 _LT_TAG_COMPILER 6935 6936 # save warnings/boilerplate of simple test code 6937 _LT_COMPILER_BOILERPLATE 6938 _LT_LINKER_BOILERPLATE 6939 6940 # Allow CC to be a program name with arguments. 6941 lt_save_CC=$CC 6942 lt_save_CFLAGS=$CFLAGS 6943 lt_save_LD=$LD 6944 lt_save_GCC=$GCC 6945 GCC=$GXX 6946 lt_save_with_gnu_ld=$with_gnu_ld 6947 lt_save_path_LD=$lt_cv_path_LD 6948 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6949 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6950 else 6951 $as_unset lt_cv_prog_gnu_ld 6952 fi 6953 if test -n "${lt_cv_path_LDCXX+set}"; then 6954 lt_cv_path_LD=$lt_cv_path_LDCXX 6955 else 6956 $as_unset lt_cv_path_LD 6957 fi 6958 test -z "${LDCXX+set}" || LD=$LDCXX 6959 CC=${CXX-"c++"} 6960 CFLAGS=$CXXFLAGS 6961 compiler=$CC 6962 _LT_TAGVAR(compiler, $1)=$CC 6963 _LT_CC_BASENAME([$compiler]) 6964 6965 if test -n "$compiler"; then 6966 # We don't want -fno-exception when compiling C++ code, so set the 6967 # no_builtin_flag separately 6968 if test "$GXX" = yes; then 6969 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6970 else 6971 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6972 fi 6973 6974 if test "$GXX" = yes; then 6975 # Set up default GNU C++ configuration 6976 6977 LT_PATH_LD 6978 6979 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6980 # archiving commands below assume that GNU ld is being used. 6981 if test "$with_gnu_ld" = yes; then 6982 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6983 _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' 6984 6985 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6986 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6987 6988 # If archive_cmds runs LD, not CC, wlarc should be empty 6989 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6990 # investigate it a little bit more. (MM) 6991 wlarc='${wl}' 6992 6993 # ancient GNU ld didn't support --whole-archive et. al. 6994 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6995 $GREP 'no-whole-archive' > /dev/null; then 6996 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6997 else 6998 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6999 fi 7000 else 7001 with_gnu_ld=no 7002 wlarc= 7003 7004 # A generic and very simple default shared library creation 7005 # command for GNU C++ for the case where it uses the native 7006 # linker, instead of GNU ld. If possible, this setting should 7007 # overridden to take advantage of the native linker features on 7008 # the platform it is being used on. 7009 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7010 fi 7011 7012 # Commands to make compiler produce verbose output that lists 7013 # what "hidden" libraries, object files and flags are used when 7014 # linking a shared library. 7015 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7016 7017 else 7018 GXX=no 7019 with_gnu_ld=no 7020 wlarc= 7021 fi 7022 7023 # PORTME: fill in a description of your system's C++ link characteristics 7024 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7025 _LT_TAGVAR(ld_shlibs, $1)=yes 7026 case $host_os in 7027 aix3*) 7028 # FIXME: insert proper C++ library support 7029 _LT_TAGVAR(ld_shlibs, $1)=no 7030 ;; 7031 aix[[4-9]]*) 7032 if test "$host_cpu" = ia64; then 7033 # On IA64, the linker does run time linking by default, so we don't 7034 # have to do anything special. 7035 aix_use_runtimelinking=no 7036 exp_sym_flag='-Bexport' 7037 no_entry_flag="" 7038 else 7039 aix_use_runtimelinking=no 7040 7041 # Test if we are trying to use run time linking or normal 7042 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7043 # need to do runtime linking. 7044 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7045 for ld_flag in $LDFLAGS; do 7046 case $ld_flag in 7047 *-brtl*) 7048 aix_use_runtimelinking=yes 7049 break 7050 ;; 7051 esac 7052 done 7053 ;; 7054 esac 7055 7056 exp_sym_flag='-bexport' 7057 no_entry_flag='-bnoentry' 7058 fi 7059 7060 # When large executables or shared objects are built, AIX ld can 7061 # have problems creating the table of contents. If linking a library 7062 # or program results in "error TOC overflow" add -mminimal-toc to 7063 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7064 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7065 7066 _LT_TAGVAR(archive_cmds, $1)='' 7067 _LT_TAGVAR(hardcode_direct, $1)=yes 7068 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7069 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7070 _LT_TAGVAR(link_all_deplibs, $1)=yes 7071 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7072 7073 if test "$GXX" = yes; then 7074 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7075 # We only want to do this on AIX 4.2 and lower, the check 7076 # below for broken collect2 doesn't work under 4.3+ 7077 collect2name=`${CC} -print-prog-name=collect2` 7078 if test -f "$collect2name" && 7079 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7080 then 7081 # We have reworked collect2 7082 : 7083 else 7084 # We have old collect2 7085 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7086 # It fails to find uninstalled libraries when the uninstalled 7087 # path is not listed in the libpath. Setting hardcode_minus_L 7088 # to unsupported forces relinking 7089 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7090 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7091 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7092 fi 7093 esac 7094 shared_flag='-shared' 7095 if test "$aix_use_runtimelinking" = yes; then 7096 shared_flag="$shared_flag "'${wl}-G' 7097 fi 7098 else 7099 # not using gcc 7100 if test "$host_cpu" = ia64; then 7101 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7102 # chokes on -Wl,-G. The following line is correct: 7103 shared_flag='-G' 7104 else 7105 if test "$aix_use_runtimelinking" = yes; then 7106 shared_flag='${wl}-G' 7107 else 7108 shared_flag='${wl}-bM:SRE' 7109 fi 7110 fi 7111 fi 7112 7113 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7114 # It seems that -bexpall does not export symbols beginning with 7115 # underscore (_), so it is better to generate a list of symbols to 7116 # export. 7117 _LT_TAGVAR(always_export_symbols, $1)=yes 7118 if test "$aix_use_runtimelinking" = yes; then 7119 # Warning - without using the other runtime loading flags (-brtl), 7120 # -berok will link without error, but may produce a broken library. 7121 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7122 # Determine the default libpath from the value encoded in an empty 7123 # executable. 7124 _LT_SYS_MODULE_PATH_AIX([$1]) 7125 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7126 7127 _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" 7128 else 7129 if test "$host_cpu" = ia64; then 7130 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7131 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7132 _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" 7133 else 7134 # Determine the default libpath from the value encoded in an 7135 # empty executable. 7136 _LT_SYS_MODULE_PATH_AIX([$1]) 7137 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7138 # Warning - without using the other run time loading flags, 7139 # -berok will link without error, but may produce a broken library. 7140 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7141 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7142 if test "$with_gnu_ld" = yes; then 7143 # We only use this code for GNU lds that support --whole-archive. 7144 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7145 else 7146 # Exported symbols can be pulled into shared objects from archives 7147 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7148 fi 7149 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7150 # This is similar to how AIX traditionally builds its shared 7151 # libraries. 7152 _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' 7153 fi 7154 fi 7155 ;; 7156 7157 beos*) 7158 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7159 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7160 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7161 # support --undefined. This deserves some investigation. FIXME 7162 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7163 else 7164 _LT_TAGVAR(ld_shlibs, $1)=no 7165 fi 7166 ;; 7167 7168 chorus*) 7169 case $cc_basename in 7170 *) 7171 # FIXME: insert proper C++ library support 7172 _LT_TAGVAR(ld_shlibs, $1)=no 7173 ;; 7174 esac 7175 ;; 7176 7177 cygwin* | mingw* | pw32* | cegcc*) 7178 case $GXX,$cc_basename in 7179 ,cl* | no,cl*) 7180 # Native MSVC 7181 # hardcode_libdir_flag_spec is actually meaningless, as there is 7182 # no search path for DLLs. 7183 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7184 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7185 _LT_TAGVAR(always_export_symbols, $1)=yes 7186 _LT_TAGVAR(file_list_spec, $1)='@' 7187 # Tell ltmain to make .lib files, not .a files. 7188 libext=lib 7189 # Tell ltmain to make .dll files, not .so files. 7190 shrext_cmds=".dll" 7191 # FIXME: Setting linknames here is a bad hack. 7192 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7193 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7194 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7195 else 7196 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7197 fi~ 7198 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7199 linknames=' 7200 # The linker will not automatically build a static lib if we build a DLL. 7201 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7202 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7203 # Don't use ranlib 7204 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7205 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7206 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7207 case $lt_outputfile in 7208 *.exe|*.EXE) ;; 7209 *) 7210 lt_outputfile="$lt_outputfile.exe" 7211 lt_tool_outputfile="$lt_tool_outputfile.exe" 7212 ;; 7213 esac~ 7214 func_to_tool_file "$lt_outputfile"~ 7215 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7216 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7217 $RM "$lt_outputfile.manifest"; 7218 fi' 7219 ;; 7220 *) 7221 # g++ 7222 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7223 # as there is no search path for DLLs. 7224 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7225 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7226 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7227 _LT_TAGVAR(always_export_symbols, $1)=no 7228 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7229 7230 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7231 _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' 7232 # If the export-symbols file already is a .def file (1st line 7233 # is EXPORTS), use it as is; otherwise, prepend... 7234 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7235 cp $export_symbols $output_objdir/$soname.def; 7236 else 7237 echo EXPORTS > $output_objdir/$soname.def; 7238 cat $export_symbols >> $output_objdir/$soname.def; 7239 fi~ 7240 $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' 7241 else 7242 _LT_TAGVAR(ld_shlibs, $1)=no 7243 fi 7244 ;; 7245 esac 7246 ;; 7247 darwin* | rhapsody*) 7248 _LT_DARWIN_LINKER_FEATURES($1) 7249 ;; 7250 7251 dgux*) 7252 case $cc_basename in 7253 ec++*) 7254 # FIXME: insert proper C++ library support 7255 _LT_TAGVAR(ld_shlibs, $1)=no 7256 ;; 7257 ghcx*) 7258 # Green Hills C++ Compiler 7259 # FIXME: insert proper C++ library support 7260 _LT_TAGVAR(ld_shlibs, $1)=no 7261 ;; 7262 *) 7263 # FIXME: insert proper C++ library support 7264 _LT_TAGVAR(ld_shlibs, $1)=no 7265 ;; 7266 esac 7267 ;; 7268 7269 freebsd2.*) 7270 # C++ shared libraries reported to be fairly broken before 7271 # switch to ELF 7272 _LT_TAGVAR(ld_shlibs, $1)=no 7273 ;; 7274 7275 freebsd-elf*) 7276 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7277 ;; 7278 7279 freebsd* | dragonfly*) 7280 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7281 # conventions 7282 _LT_TAGVAR(ld_shlibs, $1)=yes 7283 ;; 7284 7285 gnu*) 7286 ;; 7287 7288 haiku*) 7289 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7290 _LT_TAGVAR(link_all_deplibs, $1)=yes 7291 ;; 7292 7293 hpux9*) 7294 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7295 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7296 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7297 _LT_TAGVAR(hardcode_direct, $1)=yes 7298 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7299 # but as the default 7300 # location of the library. 7301 7302 case $cc_basename in 7303 CC*) 7304 # FIXME: insert proper C++ library support 7305 _LT_TAGVAR(ld_shlibs, $1)=no 7306 ;; 7307 aCC*) 7308 _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' 7309 # Commands to make compiler produce verbose output that lists 7310 # what "hidden" libraries, object files and flags are used when 7311 # linking a shared library. 7312 # 7313 # There doesn't appear to be a way to prevent this compiler from 7314 # explicitly linking system object files so we need to strip them 7315 # from the output so that they don't get included in the library 7316 # dependencies. 7317 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"' 7318 ;; 7319 *) 7320 if test "$GXX" = yes; then 7321 _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' 7322 else 7323 # FIXME: insert proper C++ library support 7324 _LT_TAGVAR(ld_shlibs, $1)=no 7325 fi 7326 ;; 7327 esac 7328 ;; 7329 7330 hpux10*|hpux11*) 7331 if test $with_gnu_ld = no; then 7332 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7333 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7334 7335 case $host_cpu in 7336 hppa*64*|ia64*) 7337 ;; 7338 *) 7339 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7340 ;; 7341 esac 7342 fi 7343 case $host_cpu in 7344 hppa*64*|ia64*) 7345 _LT_TAGVAR(hardcode_direct, $1)=no 7346 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7347 ;; 7348 *) 7349 _LT_TAGVAR(hardcode_direct, $1)=yes 7350 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7351 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7352 # but as the default 7353 # location of the library. 7354 ;; 7355 esac 7356 7357 case $cc_basename in 7358 CC*) 7359 # FIXME: insert proper C++ library support 7360 _LT_TAGVAR(ld_shlibs, $1)=no 7361 ;; 7362 aCC*) 7363 case $host_cpu in 7364 hppa*64*) 7365 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7366 ;; 7367 ia64*) 7368 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7369 ;; 7370 *) 7371 _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' 7372 ;; 7373 esac 7374 # Commands to make compiler produce verbose output that lists 7375 # what "hidden" libraries, object files and flags are used when 7376 # linking a shared library. 7377 # 7378 # There doesn't appear to be a way to prevent this compiler from 7379 # explicitly linking system object files so we need to strip them 7380 # from the output so that they don't get included in the library 7381 # dependencies. 7382 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"' 7383 ;; 7384 *) 7385 if test "$GXX" = yes; then 7386 if test $with_gnu_ld = no; then 7387 case $host_cpu in 7388 hppa*64*) 7389 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7390 ;; 7391 ia64*) 7392 _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' 7393 ;; 7394 *) 7395 _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' 7396 ;; 7397 esac 7398 fi 7399 else 7400 # FIXME: insert proper C++ library support 7401 _LT_TAGVAR(ld_shlibs, $1)=no 7402 fi 7403 ;; 7404 esac 7405 ;; 7406 7407 interix[[3-9]]*) 7408 _LT_TAGVAR(hardcode_direct, $1)=no 7409 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7411 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7412 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7413 # Instead, shared libraries are loaded at an image base (0x10000000 by 7414 # default) and relocated if they conflict, which is a slow very memory 7415 # consuming and fragmenting process. To avoid this, we pick a random, 7416 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7417 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7418 _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' 7419 _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' 7420 ;; 7421 irix5* | irix6*) 7422 case $cc_basename in 7423 CC*) 7424 # SGI C++ 7425 _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' 7426 7427 # Archives containing C++ object files must be created using 7428 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7429 # necessary to make sure instantiated templates are included 7430 # in the archive. 7431 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7432 ;; 7433 *) 7434 if test "$GXX" = yes; then 7435 if test "$with_gnu_ld" = no; then 7436 _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' 7437 else 7438 _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' 7439 fi 7440 fi 7441 _LT_TAGVAR(link_all_deplibs, $1)=yes 7442 ;; 7443 esac 7444 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7445 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7446 _LT_TAGVAR(inherit_rpath, $1)=yes 7447 ;; 7448 7449 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7450 case $cc_basename in 7451 KCC*) 7452 # Kuck and Associates, Inc. (KAI) C++ Compiler 7453 7454 # KCC will only create a shared library if the output file 7455 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7456 # to its proper name (with version) after linking. 7457 _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' 7458 _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' 7459 # Commands to make compiler produce verbose output that lists 7460 # what "hidden" libraries, object files and flags are used when 7461 # linking a shared library. 7462 # 7463 # There doesn't appear to be a way to prevent this compiler from 7464 # explicitly linking system object files so we need to strip them 7465 # from the output so that they don't get included in the library 7466 # dependencies. 7467 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"' 7468 7469 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7470 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7471 7472 # Archives containing C++ object files must be created using 7473 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7474 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7475 ;; 7476 icpc* | ecpc* ) 7477 # Intel C++ 7478 with_gnu_ld=yes 7479 # version 8.0 and above of icpc choke on multiply defined symbols 7480 # if we add $predep_objects and $postdep_objects, however 7.1 and 7481 # earlier do not add the objects themselves. 7482 case `$CC -V 2>&1` in 7483 *"Version 7."*) 7484 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7485 _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' 7486 ;; 7487 *) # Version 8.0 or newer 7488 tmp_idyn= 7489 case $host_cpu in 7490 ia64*) tmp_idyn=' -i_dynamic';; 7491 esac 7492 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7493 _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' 7494 ;; 7495 esac 7496 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7497 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7498 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7499 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7500 ;; 7501 pgCC* | pgcpp*) 7502 # Portland Group C++ compiler 7503 case `$CC -V` in 7504 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7505 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7506 rm -rf $tpldir~ 7507 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7508 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7509 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7510 rm -rf $tpldir~ 7511 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7512 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7513 $RANLIB $oldlib' 7514 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7515 rm -rf $tpldir~ 7516 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7517 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7518 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7519 rm -rf $tpldir~ 7520 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7521 $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' 7522 ;; 7523 *) # Version 6 and above use weak symbols 7524 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7525 _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' 7526 ;; 7527 esac 7528 7529 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7530 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7531 _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' 7532 ;; 7533 cxx*) 7534 # Compaq C++ 7535 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7536 _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' 7537 7538 runpath_var=LD_RUN_PATH 7539 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7540 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7541 7542 # Commands to make compiler produce verbose output that lists 7543 # what "hidden" libraries, object files and flags are used when 7544 # linking a shared library. 7545 # 7546 # There doesn't appear to be a way to prevent this compiler from 7547 # explicitly linking system object files so we need to strip them 7548 # from the output so that they don't get included in the library 7549 # dependencies. 7550 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' 7551 ;; 7552 xl* | mpixl* | bgxl*) 7553 # IBM XL 8.0 on PPC, with GNU ld 7554 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7555 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7556 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7557 if test "x$supports_anon_versioning" = xyes; then 7558 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7559 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7560 echo "local: *; };" >> $output_objdir/$libname.ver~ 7561 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7562 fi 7563 ;; 7564 *) 7565 case `$CC -V 2>&1 | sed 5q` in 7566 *Sun\ C*) 7567 # Sun C++ 5.9 7568 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7569 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7570 _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' 7571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7572 _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' 7573 _LT_TAGVAR(compiler_needs_object, $1)=yes 7574 7575 # Not sure whether something based on 7576 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7577 # would be better. 7578 output_verbose_link_cmd='func_echo_all' 7579 7580 # Archives containing C++ object files must be created using 7581 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7582 # necessary to make sure instantiated templates are included 7583 # in the archive. 7584 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7585 ;; 7586 esac 7587 ;; 7588 esac 7589 ;; 7590 7591 lynxos*) 7592 # FIXME: insert proper C++ library support 7593 _LT_TAGVAR(ld_shlibs, $1)=no 7594 ;; 7595 7596 m88k*) 7597 # FIXME: insert proper C++ library support 7598 _LT_TAGVAR(ld_shlibs, $1)=no 7599 ;; 7600 7601 mvs*) 7602 case $cc_basename in 7603 cxx*) 7604 # FIXME: insert proper C++ library support 7605 _LT_TAGVAR(ld_shlibs, $1)=no 7606 ;; 7607 *) 7608 # FIXME: insert proper C++ library support 7609 _LT_TAGVAR(ld_shlibs, $1)=no 7610 ;; 7611 esac 7612 ;; 7613 7614 netbsd*) 7615 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7616 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7617 wlarc= 7618 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7619 _LT_TAGVAR(hardcode_direct, $1)=yes 7620 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7621 fi 7622 # Workaround some broken pre-1.5 toolchains 7623 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7624 ;; 7625 7626 *nto* | *qnx*) 7627 _LT_TAGVAR(ld_shlibs, $1)=yes 7628 ;; 7629 7630 openbsd2*) 7631 # C++ shared libraries are fairly broken 7632 _LT_TAGVAR(ld_shlibs, $1)=no 7633 ;; 7634 7635 openbsd*) 7636 if test -f /usr/libexec/ld.so; then 7637 _LT_TAGVAR(hardcode_direct, $1)=yes 7638 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7639 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7640 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7641 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7642 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7643 _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' 7644 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7645 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7646 fi 7647 output_verbose_link_cmd=func_echo_all 7648 else 7649 _LT_TAGVAR(ld_shlibs, $1)=no 7650 fi 7651 ;; 7652 7653 osf3* | osf4* | osf5*) 7654 case $cc_basename in 7655 KCC*) 7656 # Kuck and Associates, Inc. (KAI) C++ Compiler 7657 7658 # KCC will only create a shared library if the output file 7659 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7660 # to its proper name (with version) after linking. 7661 _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' 7662 7663 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7664 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7665 7666 # Archives containing C++ object files must be created using 7667 # the KAI C++ compiler. 7668 case $host in 7669 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7670 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7671 esac 7672 ;; 7673 RCC*) 7674 # Rational C++ 2.4.1 7675 # FIXME: insert proper C++ library support 7676 _LT_TAGVAR(ld_shlibs, $1)=no 7677 ;; 7678 cxx*) 7679 case $host in 7680 osf3*) 7681 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7682 _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' 7683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7684 ;; 7685 *) 7686 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7687 _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' 7688 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7689 echo "-hidden">> $lib.exp~ 7690 $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~ 7691 $RM $lib.exp' 7692 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7693 ;; 7694 esac 7695 7696 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7697 7698 # Commands to make compiler produce verbose output that lists 7699 # what "hidden" libraries, object files and flags are used when 7700 # linking a shared library. 7701 # 7702 # There doesn't appear to be a way to prevent this compiler from 7703 # explicitly linking system object files so we need to strip them 7704 # from the output so that they don't get included in the library 7705 # dependencies. 7706 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"' 7707 ;; 7708 *) 7709 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7710 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7711 case $host in 7712 osf3*) 7713 _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' 7714 ;; 7715 *) 7716 _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' 7717 ;; 7718 esac 7719 7720 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7721 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7722 7723 # Commands to make compiler produce verbose output that lists 7724 # what "hidden" libraries, object files and flags are used when 7725 # linking a shared library. 7726 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7727 7728 else 7729 # FIXME: insert proper C++ library support 7730 _LT_TAGVAR(ld_shlibs, $1)=no 7731 fi 7732 ;; 7733 esac 7734 ;; 7735 7736 psos*) 7737 # FIXME: insert proper C++ library support 7738 _LT_TAGVAR(ld_shlibs, $1)=no 7739 ;; 7740 7741 sunos4*) 7742 case $cc_basename in 7743 CC*) 7744 # Sun C++ 4.x 7745 # FIXME: insert proper C++ library support 7746 _LT_TAGVAR(ld_shlibs, $1)=no 7747 ;; 7748 lcc*) 7749 # Lucid 7750 # FIXME: insert proper C++ library support 7751 _LT_TAGVAR(ld_shlibs, $1)=no 7752 ;; 7753 *) 7754 # FIXME: insert proper C++ library support 7755 _LT_TAGVAR(ld_shlibs, $1)=no 7756 ;; 7757 esac 7758 ;; 7759 7760 solaris*) 7761 case $cc_basename in 7762 CC* | sunCC*) 7763 # Sun C++ 4.2, 5.x and Centerline C++ 7764 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7765 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7766 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7767 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7768 $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' 7769 7770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7771 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7772 case $host_os in 7773 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7774 *) 7775 # The compiler driver will combine and reorder linker options, 7776 # but understands `-z linker_flag'. 7777 # Supported since Solaris 2.6 (maybe 2.5.1?) 7778 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7779 ;; 7780 esac 7781 _LT_TAGVAR(link_all_deplibs, $1)=yes 7782 7783 output_verbose_link_cmd='func_echo_all' 7784 7785 # Archives containing C++ object files must be created using 7786 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7787 # necessary to make sure instantiated templates are included 7788 # in the archive. 7789 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7790 ;; 7791 gcx*) 7792 # Green Hills C++ Compiler 7793 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7794 7795 # The C++ compiler must be used to create the archive. 7796 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7797 ;; 7798 *) 7799 # GNU C++ compiler with Solaris linker 7800 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7801 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7802 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7803 _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' 7804 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7805 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7806 7807 # Commands to make compiler produce verbose output that lists 7808 # what "hidden" libraries, object files and flags are used when 7809 # linking a shared library. 7810 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7811 else 7812 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7813 # platform. 7814 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7815 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7816 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7817 7818 # Commands to make compiler produce verbose output that lists 7819 # what "hidden" libraries, object files and flags are used when 7820 # linking a shared library. 7821 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7822 fi 7823 7824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7825 case $host_os in 7826 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7827 *) 7828 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7829 ;; 7830 esac 7831 fi 7832 ;; 7833 esac 7834 ;; 7835 7836 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7837 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7838 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7839 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7840 runpath_var='LD_RUN_PATH' 7841 7842 case $cc_basename in 7843 CC*) 7844 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7845 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7846 ;; 7847 *) 7848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7849 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7850 ;; 7851 esac 7852 ;; 7853 7854 sysv5* | sco3.2v5* | sco5v6*) 7855 # Note: We can NOT use -z defs as we might desire, because we do not 7856 # link with -lc, and that would cause any symbols used from libc to 7857 # always be unresolved, which means just about no library would 7858 # ever link correctly. If we're not using GNU ld we use -z text 7859 # though, which does catch some bad symbols but isn't as heavy-handed 7860 # as -z defs. 7861 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7862 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7863 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7864 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7865 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7866 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7867 _LT_TAGVAR(link_all_deplibs, $1)=yes 7868 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7869 runpath_var='LD_RUN_PATH' 7870 7871 case $cc_basename in 7872 CC*) 7873 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7874 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7875 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7876 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7877 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7878 '"$_LT_TAGVAR(reload_cmds, $1)" 7879 ;; 7880 *) 7881 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7882 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7883 ;; 7884 esac 7885 ;; 7886 7887 tandem*) 7888 case $cc_basename in 7889 NCC*) 7890 # NonStop-UX NCC 3.20 7891 # FIXME: insert proper C++ library support 7892 _LT_TAGVAR(ld_shlibs, $1)=no 7893 ;; 7894 *) 7895 # FIXME: insert proper C++ library support 7896 _LT_TAGVAR(ld_shlibs, $1)=no 7897 ;; 7898 esac 7899 ;; 7900 7901 vxworks*) 7902 # FIXME: insert proper C++ library support 7903 _LT_TAGVAR(ld_shlibs, $1)=no 7904 ;; 7905 7906 *) 7907 # FIXME: insert proper C++ library support 7908 _LT_TAGVAR(ld_shlibs, $1)=no 7909 ;; 7910 esac 7911 7912 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7913 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7914 7915 _LT_TAGVAR(GCC, $1)="$GXX" 7916 _LT_TAGVAR(LD, $1)="$LD" 7917 7918 ## CAVEAT EMPTOR: 7919 ## There is no encapsulation within the following macros, do not change 7920 ## the running order or otherwise move them around unless you know exactly 7921 ## what you are doing... 7922 _LT_SYS_HIDDEN_LIBDEPS($1) 7923 _LT_COMPILER_PIC($1) 7924 _LT_COMPILER_C_O($1) 7925 _LT_COMPILER_FILE_LOCKS($1) 7926 _LT_LINKER_SHLIBS($1) 7927 _LT_SYS_DYNAMIC_LINKER($1) 7928 _LT_LINKER_HARDCODE_LIBPATH($1) 7929 7930 _LT_CONFIG($1) 7931 fi # test -n "$compiler" 7932 7933 CC=$lt_save_CC 7934 CFLAGS=$lt_save_CFLAGS 7935 LDCXX=$LD 7936 LD=$lt_save_LD 7937 GCC=$lt_save_GCC 7938 with_gnu_ld=$lt_save_with_gnu_ld 7939 lt_cv_path_LDCXX=$lt_cv_path_LD 7940 lt_cv_path_LD=$lt_save_path_LD 7941 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7942 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7943fi # test "$_lt_caught_CXX_error" != yes 7944 7945AC_LANG_POP 7946])# _LT_LANG_CXX_CONFIG 7947 7948 7949# _LT_FUNC_STRIPNAME_CNF 7950# ---------------------- 7951# func_stripname_cnf prefix suffix name 7952# strip PREFIX and SUFFIX off of NAME. 7953# PREFIX and SUFFIX must not contain globbing or regex special 7954# characters, hashes, percent signs, but SUFFIX may contain a leading 7955# dot (in which case that matches only a dot). 7956# 7957# This function is identical to the (non-XSI) version of func_stripname, 7958# except this one can be used by m4 code that may be executed by configure, 7959# rather than the libtool script. 7960m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7961AC_REQUIRE([_LT_DECL_SED]) 7962AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7963func_stripname_cnf () 7964{ 7965 case ${2} in 7966 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 7967 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7968 esac 7969} # func_stripname_cnf 7970])# _LT_FUNC_STRIPNAME_CNF 7971 7972# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7973# --------------------------------- 7974# Figure out "hidden" library dependencies from verbose 7975# compiler output when linking a shared library. 7976# Parse the compiler output and extract the necessary 7977# objects, libraries and library flags. 7978m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7979[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7980AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7981# Dependencies to place before and after the object being linked: 7982_LT_TAGVAR(predep_objects, $1)= 7983_LT_TAGVAR(postdep_objects, $1)= 7984_LT_TAGVAR(predeps, $1)= 7985_LT_TAGVAR(postdeps, $1)= 7986_LT_TAGVAR(compiler_lib_search_path, $1)= 7987 7988dnl we can't use the lt_simple_compile_test_code here, 7989dnl because it contains code intended for an executable, 7990dnl not a library. It's possible we should let each 7991dnl tag define a new lt_????_link_test_code variable, 7992dnl but it's only used here... 7993m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7994int a; 7995void foo (void) { a = 0; } 7996_LT_EOF 7997], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7998class Foo 7999{ 8000public: 8001 Foo (void) { a = 0; } 8002private: 8003 int a; 8004}; 8005_LT_EOF 8006], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8007 subroutine foo 8008 implicit none 8009 integer*4 a 8010 a=0 8011 return 8012 end 8013_LT_EOF 8014], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8015 subroutine foo 8016 implicit none 8017 integer a 8018 a=0 8019 return 8020 end 8021_LT_EOF 8022], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8023public class foo { 8024 private int a; 8025 public void bar (void) { 8026 a = 0; 8027 } 8028}; 8029_LT_EOF 8030], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8031package foo 8032func foo() { 8033} 8034_LT_EOF 8035]) 8036 8037_lt_libdeps_save_CFLAGS=$CFLAGS 8038case "$CC $CFLAGS " in #( 8039*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8040*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8041*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8042esac 8043 8044dnl Parse the compiler output and extract the necessary 8045dnl objects, libraries and library flags. 8046if AC_TRY_EVAL(ac_compile); then 8047 # Parse the compiler output and extract the necessary 8048 # objects, libraries and library flags. 8049 8050 # Sentinel used to keep track of whether or not we are before 8051 # the conftest object file. 8052 pre_test_object_deps_done=no 8053 8054 for p in `eval "$output_verbose_link_cmd"`; do 8055 case ${prev}${p} in 8056 8057 -L* | -R* | -l*) 8058 # Some compilers place space between "-{L,R}" and the path. 8059 # Remove the space. 8060 if test $p = "-L" || 8061 test $p = "-R"; then 8062 prev=$p 8063 continue 8064 fi 8065 8066 # Expand the sysroot to ease extracting the directories later. 8067 if test -z "$prev"; then 8068 case $p in 8069 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8070 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8071 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8072 esac 8073 fi 8074 case $p in 8075 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8076 esac 8077 if test "$pre_test_object_deps_done" = no; then 8078 case ${prev} in 8079 -L | -R) 8080 # Internal compiler library paths should come after those 8081 # provided the user. The postdeps already come after the 8082 # user supplied libs so there is no need to process them. 8083 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8084 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8085 else 8086 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8087 fi 8088 ;; 8089 # The "-l" case would never come before the object being 8090 # linked, so don't bother handling this case. 8091 esac 8092 else 8093 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8094 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8095 else 8096 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8097 fi 8098 fi 8099 prev= 8100 ;; 8101 8102 *.lto.$objext) ;; # Ignore GCC LTO objects 8103 *.$objext) 8104 # This assumes that the test object file only shows up 8105 # once in the compiler output. 8106 if test "$p" = "conftest.$objext"; then 8107 pre_test_object_deps_done=yes 8108 continue 8109 fi 8110 8111 if test "$pre_test_object_deps_done" = no; then 8112 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8113 _LT_TAGVAR(predep_objects, $1)="$p" 8114 else 8115 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8116 fi 8117 else 8118 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8119 _LT_TAGVAR(postdep_objects, $1)="$p" 8120 else 8121 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8122 fi 8123 fi 8124 ;; 8125 8126 *) ;; # Ignore the rest. 8127 8128 esac 8129 done 8130 8131 # Clean up. 8132 rm -f a.out a.exe 8133else 8134 echo "libtool.m4: error: problem compiling $1 test program" 8135fi 8136 8137$RM -f confest.$objext 8138CFLAGS=$_lt_libdeps_save_CFLAGS 8139 8140# PORTME: override above test on systems where it is broken 8141m4_if([$1], [CXX], 8142[case $host_os in 8143interix[[3-9]]*) 8144 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8145 # hack all around it, let's just trust "g++" to DTRT. 8146 _LT_TAGVAR(predep_objects,$1)= 8147 _LT_TAGVAR(postdep_objects,$1)= 8148 _LT_TAGVAR(postdeps,$1)= 8149 ;; 8150 8151linux*) 8152 case `$CC -V 2>&1 | sed 5q` in 8153 *Sun\ C*) 8154 # Sun C++ 5.9 8155 8156 # The more standards-conforming stlport4 library is 8157 # incompatible with the Cstd library. Avoid specifying 8158 # it if it's in CXXFLAGS. Ignore libCrun as 8159 # -library=stlport4 depends on it. 8160 case " $CXX $CXXFLAGS " in 8161 *" -library=stlport4 "*) 8162 solaris_use_stlport4=yes 8163 ;; 8164 esac 8165 8166 if test "$solaris_use_stlport4" != yes; then 8167 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8168 fi 8169 ;; 8170 esac 8171 ;; 8172 8173solaris*) 8174 case $cc_basename in 8175 CC* | sunCC*) 8176 # The more standards-conforming stlport4 library is 8177 # incompatible with the Cstd library. Avoid specifying 8178 # it if it's in CXXFLAGS. Ignore libCrun as 8179 # -library=stlport4 depends on it. 8180 case " $CXX $CXXFLAGS " in 8181 *" -library=stlport4 "*) 8182 solaris_use_stlport4=yes 8183 ;; 8184 esac 8185 8186 # Adding this requires a known-good setup of shared libraries for 8187 # Sun compiler versions before 5.6, else PIC objects from an old 8188 # archive will be linked into the output, leading to subtle bugs. 8189 if test "$solaris_use_stlport4" != yes; then 8190 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8191 fi 8192 ;; 8193 esac 8194 ;; 8195esac 8196]) 8197 8198case " $_LT_TAGVAR(postdeps, $1) " in 8199*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8200esac 8201 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8202if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8203 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8204fi 8205_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8206 [The directories searched by this compiler when creating a shared library]) 8207_LT_TAGDECL([], [predep_objects], [1], 8208 [Dependencies to place before and after the objects being linked to 8209 create a shared library]) 8210_LT_TAGDECL([], [postdep_objects], [1]) 8211_LT_TAGDECL([], [predeps], [1]) 8212_LT_TAGDECL([], [postdeps], [1]) 8213_LT_TAGDECL([], [compiler_lib_search_path], [1], 8214 [The library search path used internally by the compiler when linking 8215 a shared library]) 8216])# _LT_SYS_HIDDEN_LIBDEPS 8217 8218 8219# _LT_LANG_F77_CONFIG([TAG]) 8220# -------------------------- 8221# Ensure that the configuration variables for a Fortran 77 compiler are 8222# suitably defined. These variables are subsequently used by _LT_CONFIG 8223# to write the compiler configuration to `libtool'. 8224m4_defun([_LT_LANG_F77_CONFIG], 8225[AC_LANG_PUSH(Fortran 77) 8226if test -z "$F77" || test "X$F77" = "Xno"; then 8227 _lt_disable_F77=yes 8228fi 8229 8230_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8231_LT_TAGVAR(allow_undefined_flag, $1)= 8232_LT_TAGVAR(always_export_symbols, $1)=no 8233_LT_TAGVAR(archive_expsym_cmds, $1)= 8234_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8235_LT_TAGVAR(hardcode_direct, $1)=no 8236_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8237_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8238_LT_TAGVAR(hardcode_libdir_separator, $1)= 8239_LT_TAGVAR(hardcode_minus_L, $1)=no 8240_LT_TAGVAR(hardcode_automatic, $1)=no 8241_LT_TAGVAR(inherit_rpath, $1)=no 8242_LT_TAGVAR(module_cmds, $1)= 8243_LT_TAGVAR(module_expsym_cmds, $1)= 8244_LT_TAGVAR(link_all_deplibs, $1)=unknown 8245_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8246_LT_TAGVAR(reload_flag, $1)=$reload_flag 8247_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8248_LT_TAGVAR(no_undefined_flag, $1)= 8249_LT_TAGVAR(whole_archive_flag_spec, $1)= 8250_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8251 8252# Source file extension for f77 test sources. 8253ac_ext=f 8254 8255# Object file extension for compiled f77 test sources. 8256objext=o 8257_LT_TAGVAR(objext, $1)=$objext 8258 8259# No sense in running all these tests if we already determined that 8260# the F77 compiler isn't working. Some variables (like enable_shared) 8261# are currently assumed to apply to all compilers on this platform, 8262# and will be corrupted by setting them based on a non-working compiler. 8263if test "$_lt_disable_F77" != yes; then 8264 # Code to be used in simple compile tests 8265 lt_simple_compile_test_code="\ 8266 subroutine t 8267 return 8268 end 8269" 8270 8271 # Code to be used in simple link tests 8272 lt_simple_link_test_code="\ 8273 program t 8274 end 8275" 8276 8277 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8278 _LT_TAG_COMPILER 8279 8280 # save warnings/boilerplate of simple test code 8281 _LT_COMPILER_BOILERPLATE 8282 _LT_LINKER_BOILERPLATE 8283 8284 # Allow CC to be a program name with arguments. 8285 lt_save_CC="$CC" 8286 lt_save_GCC=$GCC 8287 lt_save_CFLAGS=$CFLAGS 8288 CC=${F77-"f77"} 8289 CFLAGS=$FFLAGS 8290 compiler=$CC 8291 _LT_TAGVAR(compiler, $1)=$CC 8292 _LT_CC_BASENAME([$compiler]) 8293 GCC=$G77 8294 if test -n "$compiler"; then 8295 AC_MSG_CHECKING([if libtool supports shared libraries]) 8296 AC_MSG_RESULT([$can_build_shared]) 8297 8298 AC_MSG_CHECKING([whether to build shared libraries]) 8299 test "$can_build_shared" = "no" && enable_shared=no 8300 8301 # On AIX, shared libraries and static libraries use the same namespace, and 8302 # are all built from PIC. 8303 case $host_os in 8304 aix3*) 8305 test "$enable_shared" = yes && enable_static=no 8306 if test -n "$RANLIB"; then 8307 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8308 postinstall_cmds='$RANLIB $lib' 8309 fi 8310 ;; 8311 aix[[4-9]]*) 8312 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8313 test "$enable_shared" = yes && enable_static=no 8314 fi 8315 ;; 8316 esac 8317 AC_MSG_RESULT([$enable_shared]) 8318 8319 AC_MSG_CHECKING([whether to build static libraries]) 8320 # Make sure either enable_shared or enable_static is yes. 8321 test "$enable_shared" = yes || enable_static=yes 8322 AC_MSG_RESULT([$enable_static]) 8323 8324 _LT_TAGVAR(GCC, $1)="$G77" 8325 _LT_TAGVAR(LD, $1)="$LD" 8326 8327 ## CAVEAT EMPTOR: 8328 ## There is no encapsulation within the following macros, do not change 8329 ## the running order or otherwise move them around unless you know exactly 8330 ## what you are doing... 8331 _LT_COMPILER_PIC($1) 8332 _LT_COMPILER_C_O($1) 8333 _LT_COMPILER_FILE_LOCKS($1) 8334 _LT_LINKER_SHLIBS($1) 8335 _LT_SYS_DYNAMIC_LINKER($1) 8336 _LT_LINKER_HARDCODE_LIBPATH($1) 8337 8338 _LT_CONFIG($1) 8339 fi # test -n "$compiler" 8340 8341 GCC=$lt_save_GCC 8342 CC="$lt_save_CC" 8343 CFLAGS="$lt_save_CFLAGS" 8344fi # test "$_lt_disable_F77" != yes 8345 8346AC_LANG_POP 8347])# _LT_LANG_F77_CONFIG 8348 8349 8350# _LT_LANG_FC_CONFIG([TAG]) 8351# ------------------------- 8352# Ensure that the configuration variables for a Fortran compiler are 8353# suitably defined. These variables are subsequently used by _LT_CONFIG 8354# to write the compiler configuration to `libtool'. 8355m4_defun([_LT_LANG_FC_CONFIG], 8356[AC_LANG_PUSH(Fortran) 8357 8358if test -z "$FC" || test "X$FC" = "Xno"; then 8359 _lt_disable_FC=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 fc test sources. 8385ac_ext=${ac_fc_srcext-f} 8386 8387# Object file extension for compiled fc 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 FC 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_FC" != 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=${FC-"f95"} 8421 CFLAGS=$FCFLAGS 8422 compiler=$CC 8423 GCC=$ac_cv_fc_compiler_gnu 8424 8425 _LT_TAGVAR(compiler, $1)=$CC 8426 _LT_CC_BASENAME([$compiler]) 8427 8428 if test -n "$compiler"; then 8429 AC_MSG_CHECKING([if libtool supports shared libraries]) 8430 AC_MSG_RESULT([$can_build_shared]) 8431 8432 AC_MSG_CHECKING([whether to build shared libraries]) 8433 test "$can_build_shared" = "no" && enable_shared=no 8434 8435 # On AIX, shared libraries and static libraries use the same namespace, and 8436 # are all built from PIC. 8437 case $host_os in 8438 aix3*) 8439 test "$enable_shared" = yes && enable_static=no 8440 if test -n "$RANLIB"; then 8441 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8442 postinstall_cmds='$RANLIB $lib' 8443 fi 8444 ;; 8445 aix[[4-9]]*) 8446 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8447 test "$enable_shared" = yes && enable_static=no 8448 fi 8449 ;; 8450 esac 8451 AC_MSG_RESULT([$enable_shared]) 8452 8453 AC_MSG_CHECKING([whether to build static libraries]) 8454 # Make sure either enable_shared or enable_static is yes. 8455 test "$enable_shared" = yes || enable_static=yes 8456 AC_MSG_RESULT([$enable_static]) 8457 8458 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8459 _LT_TAGVAR(LD, $1)="$LD" 8460 8461 ## CAVEAT EMPTOR: 8462 ## There is no encapsulation within the following macros, do not change 8463 ## the running order or otherwise move them around unless you know exactly 8464 ## what you are doing... 8465 _LT_SYS_HIDDEN_LIBDEPS($1) 8466 _LT_COMPILER_PIC($1) 8467 _LT_COMPILER_C_O($1) 8468 _LT_COMPILER_FILE_LOCKS($1) 8469 _LT_LINKER_SHLIBS($1) 8470 _LT_SYS_DYNAMIC_LINKER($1) 8471 _LT_LINKER_HARDCODE_LIBPATH($1) 8472 8473 _LT_CONFIG($1) 8474 fi # test -n "$compiler" 8475 8476 GCC=$lt_save_GCC 8477 CC=$lt_save_CC 8478 CFLAGS=$lt_save_CFLAGS 8479fi # test "$_lt_disable_FC" != yes 8480 8481AC_LANG_POP 8482])# _LT_LANG_FC_CONFIG 8483 8484 8485# _LT_LANG_GCJ_CONFIG([TAG]) 8486# -------------------------- 8487# Ensure that the configuration variables for the GNU Java Compiler compiler 8488# are suitably defined. These variables are subsequently used by _LT_CONFIG 8489# to write the compiler configuration to `libtool'. 8490m4_defun([_LT_LANG_GCJ_CONFIG], 8491[AC_REQUIRE([LT_PROG_GCJ])dnl 8492AC_LANG_SAVE 8493 8494# Source file extension for Java test sources. 8495ac_ext=java 8496 8497# Object file extension for compiled Java test sources. 8498objext=o 8499_LT_TAGVAR(objext, $1)=$objext 8500 8501# Code to be used in simple compile tests 8502lt_simple_compile_test_code="class foo {}" 8503 8504# Code to be used in simple link tests 8505lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8506 8507# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8508_LT_TAG_COMPILER 8509 8510# save warnings/boilerplate of simple test code 8511_LT_COMPILER_BOILERPLATE 8512_LT_LINKER_BOILERPLATE 8513 8514# Allow CC to be a program name with arguments. 8515lt_save_CC=$CC 8516lt_save_CFLAGS=$CFLAGS 8517lt_save_GCC=$GCC 8518GCC=yes 8519CC=${GCJ-"gcj"} 8520CFLAGS=$GCJFLAGS 8521compiler=$CC 8522_LT_TAGVAR(compiler, $1)=$CC 8523_LT_TAGVAR(LD, $1)="$LD" 8524_LT_CC_BASENAME([$compiler]) 8525 8526# GCJ did not exist at the time GCC didn't implicitly link libc in. 8527_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8528 8529_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8530_LT_TAGVAR(reload_flag, $1)=$reload_flag 8531_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8532 8533if test -n "$compiler"; then 8534 _LT_COMPILER_NO_RTTI($1) 8535 _LT_COMPILER_PIC($1) 8536 _LT_COMPILER_C_O($1) 8537 _LT_COMPILER_FILE_LOCKS($1) 8538 _LT_LINKER_SHLIBS($1) 8539 _LT_LINKER_HARDCODE_LIBPATH($1) 8540 8541 _LT_CONFIG($1) 8542fi 8543 8544AC_LANG_RESTORE 8545 8546GCC=$lt_save_GCC 8547CC=$lt_save_CC 8548CFLAGS=$lt_save_CFLAGS 8549])# _LT_LANG_GCJ_CONFIG 8550 8551 8552# _LT_LANG_GO_CONFIG([TAG]) 8553# -------------------------- 8554# Ensure that the configuration variables for the GNU Go compiler 8555# are suitably defined. These variables are subsequently used by _LT_CONFIG 8556# to write the compiler configuration to `libtool'. 8557m4_defun([_LT_LANG_GO_CONFIG], 8558[AC_REQUIRE([LT_PROG_GO])dnl 8559AC_LANG_SAVE 8560 8561# Source file extension for Go test sources. 8562ac_ext=go 8563 8564# Object file extension for compiled Go test sources. 8565objext=o 8566_LT_TAGVAR(objext, $1)=$objext 8567 8568# Code to be used in simple compile tests 8569lt_simple_compile_test_code="package main; func main() { }" 8570 8571# Code to be used in simple link tests 8572lt_simple_link_test_code='package main; func main() { }' 8573 8574# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8575_LT_TAG_COMPILER 8576 8577# save warnings/boilerplate of simple test code 8578_LT_COMPILER_BOILERPLATE 8579_LT_LINKER_BOILERPLATE 8580 8581# Allow CC to be a program name with arguments. 8582lt_save_CC=$CC 8583lt_save_CFLAGS=$CFLAGS 8584lt_save_GCC=$GCC 8585GCC=yes 8586CC=${GOC-"gccgo"} 8587CFLAGS=$GOFLAGS 8588compiler=$CC 8589_LT_TAGVAR(compiler, $1)=$CC 8590_LT_TAGVAR(LD, $1)="$LD" 8591_LT_CC_BASENAME([$compiler]) 8592 8593# Go did not exist at the time GCC didn't implicitly link libc in. 8594_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8595 8596_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8597_LT_TAGVAR(reload_flag, $1)=$reload_flag 8598_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8599 8600if test -n "$compiler"; then 8601 _LT_COMPILER_NO_RTTI($1) 8602 _LT_COMPILER_PIC($1) 8603 _LT_COMPILER_C_O($1) 8604 _LT_COMPILER_FILE_LOCKS($1) 8605 _LT_LINKER_SHLIBS($1) 8606 _LT_LINKER_HARDCODE_LIBPATH($1) 8607 8608 _LT_CONFIG($1) 8609fi 8610 8611AC_LANG_RESTORE 8612 8613GCC=$lt_save_GCC 8614CC=$lt_save_CC 8615CFLAGS=$lt_save_CFLAGS 8616])# _LT_LANG_GO_CONFIG 8617 8618 8619# _LT_LANG_RC_CONFIG([TAG]) 8620# ------------------------- 8621# Ensure that the configuration variables for the Windows resource compiler 8622# are suitably defined. These variables are subsequently used by _LT_CONFIG 8623# to write the compiler configuration to `libtool'. 8624m4_defun([_LT_LANG_RC_CONFIG], 8625[AC_REQUIRE([LT_PROG_RC])dnl 8626AC_LANG_SAVE 8627 8628# Source file extension for RC test sources. 8629ac_ext=rc 8630 8631# Object file extension for compiled RC test sources. 8632objext=o 8633_LT_TAGVAR(objext, $1)=$objext 8634 8635# Code to be used in simple compile tests 8636lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8637 8638# Code to be used in simple link tests 8639lt_simple_link_test_code="$lt_simple_compile_test_code" 8640 8641# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8642_LT_TAG_COMPILER 8643 8644# save warnings/boilerplate of simple test code 8645_LT_COMPILER_BOILERPLATE 8646_LT_LINKER_BOILERPLATE 8647 8648# Allow CC to be a program name with arguments. 8649lt_save_CC="$CC" 8650lt_save_CFLAGS=$CFLAGS 8651lt_save_GCC=$GCC 8652GCC= 8653CC=${RC-"windres"} 8654CFLAGS= 8655compiler=$CC 8656_LT_TAGVAR(compiler, $1)=$CC 8657_LT_CC_BASENAME([$compiler]) 8658_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8659 8660if test -n "$compiler"; then 8661 : 8662 _LT_CONFIG($1) 8663fi 8664 8665GCC=$lt_save_GCC 8666AC_LANG_RESTORE 8667CC=$lt_save_CC 8668CFLAGS=$lt_save_CFLAGS 8669])# _LT_LANG_RC_CONFIG 8670 8671 8672# LT_PROG_GCJ 8673# ----------- 8674AC_DEFUN([LT_PROG_GCJ], 8675[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8676 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8677 [AC_CHECK_TOOL(GCJ, gcj,) 8678 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8679 AC_SUBST(GCJFLAGS)])])[]dnl 8680]) 8681 8682# Old name: 8683AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8684dnl aclocal-1.4 backwards compatibility: 8685dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8686 8687 8688# LT_PROG_GO 8689# ---------- 8690AC_DEFUN([LT_PROG_GO], 8691[AC_CHECK_TOOL(GOC, gccgo,) 8692]) 8693 8694 8695# LT_PROG_RC 8696# ---------- 8697AC_DEFUN([LT_PROG_RC], 8698[AC_CHECK_TOOL(RC, windres,) 8699]) 8700 8701# Old name: 8702AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8703dnl aclocal-1.4 backwards compatibility: 8704dnl AC_DEFUN([LT_AC_PROG_RC], []) 8705 8706 8707# _LT_DECL_EGREP 8708# -------------- 8709# If we don't have a new enough Autoconf to choose the best grep 8710# available, choose the one first in the user's PATH. 8711m4_defun([_LT_DECL_EGREP], 8712[AC_REQUIRE([AC_PROG_EGREP])dnl 8713AC_REQUIRE([AC_PROG_FGREP])dnl 8714test -z "$GREP" && GREP=grep 8715_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8716_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8717_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8718dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8719AC_SUBST([GREP]) 8720]) 8721 8722 8723# _LT_DECL_OBJDUMP 8724# -------------- 8725# If we don't have a new enough Autoconf to choose the best objdump 8726# available, choose the one first in the user's PATH. 8727m4_defun([_LT_DECL_OBJDUMP], 8728[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8729test -z "$OBJDUMP" && OBJDUMP=objdump 8730_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8731AC_SUBST([OBJDUMP]) 8732]) 8733 8734# _LT_DECL_DLLTOOL 8735# ---------------- 8736# Ensure DLLTOOL variable is set. 8737m4_defun([_LT_DECL_DLLTOOL], 8738[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8739test -z "$DLLTOOL" && DLLTOOL=dlltool 8740_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8741AC_SUBST([DLLTOOL]) 8742]) 8743 8744# _LT_DECL_SED 8745# ------------ 8746# Check for a fully-functional sed program, that truncates 8747# as few characters as possible. Prefer GNU sed if found. 8748m4_defun([_LT_DECL_SED], 8749[AC_PROG_SED 8750test -z "$SED" && SED=sed 8751Xsed="$SED -e 1s/^X//" 8752_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8753_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8754 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8755])# _LT_DECL_SED 8756 8757m4_ifndef([AC_PROG_SED], [ 8758# NOTE: This macro has been submitted for inclusion into # 8759# GNU Autoconf as AC_PROG_SED. When it is available in # 8760# a released version of Autoconf we should remove this # 8761# macro and use it instead. # 8762 8763m4_defun([AC_PROG_SED], 8764[AC_MSG_CHECKING([for a sed that does not truncate output]) 8765AC_CACHE_VAL(lt_cv_path_SED, 8766[# Loop through the user's path and test for sed and gsed. 8767# Then use that list of sed's as ones to test for truncation. 8768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8769for as_dir in $PATH 8770do 8771 IFS=$as_save_IFS 8772 test -z "$as_dir" && as_dir=. 8773 for lt_ac_prog in sed gsed; do 8774 for ac_exec_ext in '' $ac_executable_extensions; do 8775 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8776 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8777 fi 8778 done 8779 done 8780done 8781IFS=$as_save_IFS 8782lt_ac_max=0 8783lt_ac_count=0 8784# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8785# along with /bin/sed that truncates output. 8786for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8787 test ! -f $lt_ac_sed && continue 8788 cat /dev/null > conftest.in 8789 lt_ac_count=0 8790 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8791 # Check for GNU sed and select it if it is found. 8792 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8793 lt_cv_path_SED=$lt_ac_sed 8794 break 8795 fi 8796 while true; do 8797 cat conftest.in conftest.in >conftest.tmp 8798 mv conftest.tmp conftest.in 8799 cp conftest.in conftest.nl 8800 echo >>conftest.nl 8801 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8802 cmp -s conftest.out conftest.nl || break 8803 # 10000 chars as input seems more than enough 8804 test $lt_ac_count -gt 10 && break 8805 lt_ac_count=`expr $lt_ac_count + 1` 8806 if test $lt_ac_count -gt $lt_ac_max; then 8807 lt_ac_max=$lt_ac_count 8808 lt_cv_path_SED=$lt_ac_sed 8809 fi 8810 done 8811done 8812]) 8813SED=$lt_cv_path_SED 8814AC_SUBST([SED]) 8815AC_MSG_RESULT([$SED]) 8816])#AC_PROG_SED 8817])#m4_ifndef 8818 8819# Old name: 8820AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8821dnl aclocal-1.4 backwards compatibility: 8822dnl AC_DEFUN([LT_AC_PROG_SED], []) 8823 8824 8825# _LT_CHECK_SHELL_FEATURES 8826# ------------------------ 8827# Find out whether the shell is Bourne or XSI compatible, 8828# or has some other useful features. 8829m4_defun([_LT_CHECK_SHELL_FEATURES], 8830[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8831# Try some XSI features 8832xsi_shell=no 8833( _lt_dummy="a/b/c" 8834 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8835 = c,a/b,b/c, \ 8836 && eval 'test $(( 1 + 1 )) -eq 2 \ 8837 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8838 && xsi_shell=yes 8839AC_MSG_RESULT([$xsi_shell]) 8840_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8841 8842AC_MSG_CHECKING([whether the shell understands "+="]) 8843lt_shell_append=no 8844( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8845 >/dev/null 2>&1 \ 8846 && lt_shell_append=yes 8847AC_MSG_RESULT([$lt_shell_append]) 8848_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8849 8850if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8851 lt_unset=unset 8852else 8853 lt_unset=false 8854fi 8855_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8856 8857# test EBCDIC or ASCII 8858case `echo X|tr X '\101'` in 8859 A) # ASCII based system 8860 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8861 lt_SP2NL='tr \040 \012' 8862 lt_NL2SP='tr \015\012 \040\040' 8863 ;; 8864 *) # EBCDIC based system 8865 lt_SP2NL='tr \100 \n' 8866 lt_NL2SP='tr \r\n \100\100' 8867 ;; 8868esac 8869_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8870_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8871])# _LT_CHECK_SHELL_FEATURES 8872 8873 8874# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8875# ------------------------------------------------------ 8876# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8877# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8878m4_defun([_LT_PROG_FUNCTION_REPLACE], 8879[dnl { 8880sed -e '/^$1 ()$/,/^} # $1 /c\ 8881$1 ()\ 8882{\ 8883m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8884} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8885 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8886 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8887test 0 -eq $? || _lt_function_replace_fail=: 8888]) 8889 8890 8891# _LT_PROG_REPLACE_SHELLFNS 8892# ------------------------- 8893# Replace existing portable implementations of several shell functions with 8894# equivalent extended shell implementations where those features are available.. 8895m4_defun([_LT_PROG_REPLACE_SHELLFNS], 8896[if test x"$xsi_shell" = xyes; then 8897 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8898 case ${1} in 8899 */*) func_dirname_result="${1%/*}${2}" ;; 8900 * ) func_dirname_result="${3}" ;; 8901 esac]) 8902 8903 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8904 func_basename_result="${1##*/}"]) 8905 8906 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8907 case ${1} in 8908 */*) func_dirname_result="${1%/*}${2}" ;; 8909 * ) func_dirname_result="${3}" ;; 8910 esac 8911 func_basename_result="${1##*/}"]) 8912 8913 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8914 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8915 # positional parameters, so assign one to ordinary parameter first. 8916 func_stripname_result=${3} 8917 func_stripname_result=${func_stripname_result#"${1}"} 8918 func_stripname_result=${func_stripname_result%"${2}"}]) 8919 8920 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 8921 func_split_long_opt_name=${1%%=*} 8922 func_split_long_opt_arg=${1#*=}]) 8923 8924 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 8925 func_split_short_opt_arg=${1#??} 8926 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8927 8928 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 8929 case ${1} in 8930 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 8931 *) func_lo2o_result=${1} ;; 8932 esac]) 8933 8934 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8935 8936 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8937 8938 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8939fi 8940 8941if test x"$lt_shell_append" = xyes; then 8942 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8943 8944 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 8945 func_quote_for_eval "${2}" 8946dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 8947 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8948 8949 # Save a `func_append' function call where possible by direct use of '+=' 8950 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 8951 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8952 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8953 test 0 -eq $? || _lt_function_replace_fail=: 8954else 8955 # Save a `func_append' function call even when '+=' is not available 8956 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 8957 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8958 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8959 test 0 -eq $? || _lt_function_replace_fail=: 8960fi 8961 8962if test x"$_lt_function_replace_fail" = x":"; then 8963 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 8964fi 8965]) 8966 8967# _LT_PATH_CONVERSION_FUNCTIONS 8968# ----------------------------- 8969# Determine which file name conversion functions should be used by 8970# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8971# for certain cross-compile configurations and native mingw. 8972m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8973[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8974AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8975AC_MSG_CHECKING([how to convert $build file names to $host format]) 8976AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8977[case $host in 8978 *-*-mingw* ) 8979 case $build in 8980 *-*-mingw* ) # actually msys 8981 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8982 ;; 8983 *-*-cygwin* ) 8984 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8985 ;; 8986 * ) # otherwise, assume *nix 8987 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8988 ;; 8989 esac 8990 ;; 8991 *-*-cygwin* ) 8992 case $build in 8993 *-*-mingw* ) # actually msys 8994 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8995 ;; 8996 *-*-cygwin* ) 8997 lt_cv_to_host_file_cmd=func_convert_file_noop 8998 ;; 8999 * ) # otherwise, assume *nix 9000 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9001 ;; 9002 esac 9003 ;; 9004 * ) # unhandled hosts (and "normal" native builds) 9005 lt_cv_to_host_file_cmd=func_convert_file_noop 9006 ;; 9007esac 9008]) 9009to_host_file_cmd=$lt_cv_to_host_file_cmd 9010AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9011_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9012 [0], [convert $build file names to $host format])dnl 9013 9014AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9015AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9016[#assume ordinary cross tools, or native build. 9017lt_cv_to_tool_file_cmd=func_convert_file_noop 9018case $host in 9019 *-*-mingw* ) 9020 case $build in 9021 *-*-mingw* ) # actually msys 9022 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9023 ;; 9024 esac 9025 ;; 9026esac 9027]) 9028to_tool_file_cmd=$lt_cv_to_tool_file_cmd 9029AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9030_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9031 [0], [convert $build files to toolchain format])dnl 9032])# _LT_PATH_CONVERSION_FUNCTIONS 9033 9034# Helper functions for option handling. -*- Autoconf -*- 9035# 9036# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9037# Inc. 9038# Written by Gary V. Vaughan, 2004 9039# 9040# This file is free software; the Free Software Foundation gives 9041# unlimited permission to copy and/or distribute it, with or without 9042# modifications, as long as this notice is preserved. 9043 9044# serial 7 ltoptions.m4 9045 9046# This is to help aclocal find these macros, as it can't see m4_define. 9047AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9048 9049 9050# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9051# ------------------------------------------ 9052m4_define([_LT_MANGLE_OPTION], 9053[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9054 9055 9056# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9057# --------------------------------------- 9058# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9059# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9060# saved as a flag. 9061m4_define([_LT_SET_OPTION], 9062[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9063m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9064 _LT_MANGLE_DEFUN([$1], [$2]), 9065 [m4_warning([Unknown $1 option `$2'])])[]dnl 9066]) 9067 9068 9069# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9070# ------------------------------------------------------------ 9071# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9072m4_define([_LT_IF_OPTION], 9073[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9074 9075 9076# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9077# ------------------------------------------------------- 9078# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9079# are set. 9080m4_define([_LT_UNLESS_OPTIONS], 9081[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9082 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9083 [m4_define([$0_found])])])[]dnl 9084m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9085])[]dnl 9086]) 9087 9088 9089# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9090# ---------------------------------------- 9091# OPTION-LIST is a space-separated list of Libtool options associated 9092# with MACRO-NAME. If any OPTION has a matching handler declared with 9093# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9094# the unknown option and exit. 9095m4_defun([_LT_SET_OPTIONS], 9096[# Set options 9097m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9098 [_LT_SET_OPTION([$1], _LT_Option)]) 9099 9100m4_if([$1],[LT_INIT],[ 9101 dnl 9102 dnl Simply set some default values (i.e off) if boolean options were not 9103 dnl specified: 9104 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9105 ]) 9106 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9107 ]) 9108 dnl 9109 dnl If no reference was made to various pairs of opposing options, then 9110 dnl we run the default mode handler for the pair. For example, if neither 9111 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9112 dnl archives by default: 9113 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9114 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9115 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9116 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9117 [_LT_ENABLE_FAST_INSTALL]) 9118 ]) 9119])# _LT_SET_OPTIONS 9120 9121 9122 9123# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9124# ----------------------------------------- 9125m4_define([_LT_MANGLE_DEFUN], 9126[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9127 9128 9129# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9130# ----------------------------------------------- 9131m4_define([LT_OPTION_DEFINE], 9132[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9133])# LT_OPTION_DEFINE 9134 9135 9136# dlopen 9137# ------ 9138LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9139]) 9140 9141AU_DEFUN([AC_LIBTOOL_DLOPEN], 9142[_LT_SET_OPTION([LT_INIT], [dlopen]) 9143AC_DIAGNOSE([obsolete], 9144[$0: Remove this warning and the call to _LT_SET_OPTION when you 9145put the `dlopen' option into LT_INIT's first parameter.]) 9146]) 9147 9148dnl aclocal-1.4 backwards compatibility: 9149dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9150 9151 9152# win32-dll 9153# --------- 9154# Declare package support for building win32 dll's. 9155LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9156[enable_win32_dll=yes 9157 9158case $host in 9159*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9160 AC_CHECK_TOOL(AS, as, false) 9161 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9162 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9163 ;; 9164esac 9165 9166test -z "$AS" && AS=as 9167_LT_DECL([], [AS], [1], [Assembler program])dnl 9168 9169test -z "$DLLTOOL" && DLLTOOL=dlltool 9170_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9171 9172test -z "$OBJDUMP" && OBJDUMP=objdump 9173_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9174])# win32-dll 9175 9176AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9177[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9178_LT_SET_OPTION([LT_INIT], [win32-dll]) 9179AC_DIAGNOSE([obsolete], 9180[$0: Remove this warning and the call to _LT_SET_OPTION when you 9181put the `win32-dll' option into LT_INIT's first parameter.]) 9182]) 9183 9184dnl aclocal-1.4 backwards compatibility: 9185dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9186 9187 9188# _LT_ENABLE_SHARED([DEFAULT]) 9189# ---------------------------- 9190# implement the --enable-shared flag, and supports the `shared' and 9191# `disable-shared' LT_INIT options. 9192# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9193m4_define([_LT_ENABLE_SHARED], 9194[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9195AC_ARG_ENABLE([shared], 9196 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9197 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9198 [p=${PACKAGE-default} 9199 case $enableval in 9200 yes) enable_shared=yes ;; 9201 no) enable_shared=no ;; 9202 *) 9203 enable_shared=no 9204 # Look at the argument we got. We use all the common list separators. 9205 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9206 for pkg in $enableval; do 9207 IFS="$lt_save_ifs" 9208 if test "X$pkg" = "X$p"; then 9209 enable_shared=yes 9210 fi 9211 done 9212 IFS="$lt_save_ifs" 9213 ;; 9214 esac], 9215 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9216 9217 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9218 [Whether or not to build shared libraries]) 9219])# _LT_ENABLE_SHARED 9220 9221LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9222LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9223 9224# Old names: 9225AC_DEFUN([AC_ENABLE_SHARED], 9226[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9227]) 9228 9229AC_DEFUN([AC_DISABLE_SHARED], 9230[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9231]) 9232 9233AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9234AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9235 9236dnl aclocal-1.4 backwards compatibility: 9237dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9238dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9239 9240 9241 9242# _LT_ENABLE_STATIC([DEFAULT]) 9243# ---------------------------- 9244# implement the --enable-static flag, and support the `static' and 9245# `disable-static' LT_INIT options. 9246# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9247m4_define([_LT_ENABLE_STATIC], 9248[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9249AC_ARG_ENABLE([static], 9250 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9251 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9252 [p=${PACKAGE-default} 9253 case $enableval in 9254 yes) enable_static=yes ;; 9255 no) enable_static=no ;; 9256 *) 9257 enable_static=no 9258 # Look at the argument we got. We use all the common list separators. 9259 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9260 for pkg in $enableval; do 9261 IFS="$lt_save_ifs" 9262 if test "X$pkg" = "X$p"; then 9263 enable_static=yes 9264 fi 9265 done 9266 IFS="$lt_save_ifs" 9267 ;; 9268 esac], 9269 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9270 9271 _LT_DECL([build_old_libs], [enable_static], [0], 9272 [Whether or not to build static libraries]) 9273])# _LT_ENABLE_STATIC 9274 9275LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9276LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9277 9278# Old names: 9279AC_DEFUN([AC_ENABLE_STATIC], 9280[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9281]) 9282 9283AC_DEFUN([AC_DISABLE_STATIC], 9284[_LT_SET_OPTION([LT_INIT], [disable-static]) 9285]) 9286 9287AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9288AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9289 9290dnl aclocal-1.4 backwards compatibility: 9291dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9292dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9293 9294 9295 9296# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9297# ---------------------------------- 9298# implement the --enable-fast-install flag, and support the `fast-install' 9299# and `disable-fast-install' LT_INIT options. 9300# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9301m4_define([_LT_ENABLE_FAST_INSTALL], 9302[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9303AC_ARG_ENABLE([fast-install], 9304 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9305 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9306 [p=${PACKAGE-default} 9307 case $enableval in 9308 yes) enable_fast_install=yes ;; 9309 no) enable_fast_install=no ;; 9310 *) 9311 enable_fast_install=no 9312 # Look at the argument we got. We use all the common list separators. 9313 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9314 for pkg in $enableval; do 9315 IFS="$lt_save_ifs" 9316 if test "X$pkg" = "X$p"; then 9317 enable_fast_install=yes 9318 fi 9319 done 9320 IFS="$lt_save_ifs" 9321 ;; 9322 esac], 9323 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9324 9325_LT_DECL([fast_install], [enable_fast_install], [0], 9326 [Whether or not to optimize for fast installation])dnl 9327])# _LT_ENABLE_FAST_INSTALL 9328 9329LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9330LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9331 9332# Old names: 9333AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9334[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9335AC_DIAGNOSE([obsolete], 9336[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9337the `fast-install' option into LT_INIT's first parameter.]) 9338]) 9339 9340AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9341[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9342AC_DIAGNOSE([obsolete], 9343[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9344the `disable-fast-install' option into LT_INIT's first parameter.]) 9345]) 9346 9347dnl aclocal-1.4 backwards compatibility: 9348dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9349dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9350 9351 9352# _LT_WITH_PIC([MODE]) 9353# -------------------- 9354# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9355# LT_INIT options. 9356# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9357m4_define([_LT_WITH_PIC], 9358[AC_ARG_WITH([pic], 9359 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9360 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9361 [lt_p=${PACKAGE-default} 9362 case $withval in 9363 yes|no) pic_mode=$withval ;; 9364 *) 9365 pic_mode=default 9366 # Look at the argument we got. We use all the common list separators. 9367 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9368 for lt_pkg in $withval; do 9369 IFS="$lt_save_ifs" 9370 if test "X$lt_pkg" = "X$lt_p"; then 9371 pic_mode=yes 9372 fi 9373 done 9374 IFS="$lt_save_ifs" 9375 ;; 9376 esac], 9377 [pic_mode=default]) 9378 9379test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9380 9381_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9382])# _LT_WITH_PIC 9383 9384LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9385LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9386 9387# Old name: 9388AU_DEFUN([AC_LIBTOOL_PICMODE], 9389[_LT_SET_OPTION([LT_INIT], [pic-only]) 9390AC_DIAGNOSE([obsolete], 9391[$0: Remove this warning and the call to _LT_SET_OPTION when you 9392put the `pic-only' option into LT_INIT's first parameter.]) 9393]) 9394 9395dnl aclocal-1.4 backwards compatibility: 9396dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9397 9398 9399m4_define([_LTDL_MODE], []) 9400LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9401 [m4_define([_LTDL_MODE], [nonrecursive])]) 9402LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9403 [m4_define([_LTDL_MODE], [recursive])]) 9404LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9405 [m4_define([_LTDL_MODE], [subproject])]) 9406 9407m4_define([_LTDL_TYPE], []) 9408LT_OPTION_DEFINE([LTDL_INIT], [installable], 9409 [m4_define([_LTDL_TYPE], [installable])]) 9410LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9411 [m4_define([_LTDL_TYPE], [convenience])]) 9412 9413# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9414# 9415# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9416# Written by Gary V. Vaughan, 2004 9417# 9418# This file is free software; the Free Software Foundation gives 9419# unlimited permission to copy and/or distribute it, with or without 9420# modifications, as long as this notice is preserved. 9421 9422# serial 6 ltsugar.m4 9423 9424# This is to help aclocal find these macros, as it can't see m4_define. 9425AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9426 9427 9428# lt_join(SEP, ARG1, [ARG2...]) 9429# ----------------------------- 9430# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9431# associated separator. 9432# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9433# versions in m4sugar had bugs. 9434m4_define([lt_join], 9435[m4_if([$#], [1], [], 9436 [$#], [2], [[$2]], 9437 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9438m4_define([_lt_join], 9439[m4_if([$#$2], [2], [], 9440 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9441 9442 9443# lt_car(LIST) 9444# lt_cdr(LIST) 9445# ------------ 9446# Manipulate m4 lists. 9447# These macros are necessary as long as will still need to support 9448# Autoconf-2.59 which quotes differently. 9449m4_define([lt_car], [[$1]]) 9450m4_define([lt_cdr], 9451[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9452 [$#], 1, [], 9453 [m4_dquote(m4_shift($@))])]) 9454m4_define([lt_unquote], $1) 9455 9456 9457# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9458# ------------------------------------------ 9459# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9460# Note that neither SEPARATOR nor STRING are expanded; they are appended 9461# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9462# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9463# than defined and empty). 9464# 9465# This macro is needed until we can rely on Autoconf 2.62, since earlier 9466# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9467m4_define([lt_append], 9468[m4_define([$1], 9469 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9470 9471 9472 9473# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9474# ---------------------------------------------------------- 9475# Produce a SEP delimited list of all paired combinations of elements of 9476# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9477# has the form PREFIXmINFIXSUFFIXn. 9478# Needed until we can rely on m4_combine added in Autoconf 2.62. 9479m4_define([lt_combine], 9480[m4_if(m4_eval([$# > 3]), [1], 9481 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9482[[m4_foreach([_Lt_prefix], [$2], 9483 [m4_foreach([_Lt_suffix], 9484 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9485 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9486 9487 9488# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9489# ----------------------------------------------------------------------- 9490# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9491# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9492m4_define([lt_if_append_uniq], 9493[m4_ifdef([$1], 9494 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9495 [lt_append([$1], [$2], [$3])$4], 9496 [$5])], 9497 [lt_append([$1], [$2], [$3])$4])]) 9498 9499 9500# lt_dict_add(DICT, KEY, VALUE) 9501# ----------------------------- 9502m4_define([lt_dict_add], 9503[m4_define([$1($2)], [$3])]) 9504 9505 9506# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9507# -------------------------------------------- 9508m4_define([lt_dict_add_subkey], 9509[m4_define([$1($2:$3)], [$4])]) 9510 9511 9512# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9513# ---------------------------------- 9514m4_define([lt_dict_fetch], 9515[m4_ifval([$3], 9516 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9517 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9518 9519 9520# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9521# ----------------------------------------------------------------- 9522m4_define([lt_if_dict_fetch], 9523[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9524 [$5], 9525 [$6])]) 9526 9527 9528# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9529# -------------------------------------------------------------- 9530m4_define([lt_dict_filter], 9531[m4_if([$5], [], [], 9532 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9533 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9534 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9535]) 9536 9537# ltversion.m4 -- version numbers -*- Autoconf -*- 9538# 9539# Copyright (C) 2004 Free Software Foundation, Inc. 9540# Written by Scott James Remnant, 2004 9541# 9542# This file is free software; the Free Software Foundation gives 9543# unlimited permission to copy and/or distribute it, with or without 9544# modifications, as long as this notice is preserved. 9545 9546# @configure_input@ 9547 9548# serial 3337 ltversion.m4 9549# This file is part of GNU Libtool 9550 9551m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9552m4_define([LT_PACKAGE_REVISION], [1.3337]) 9553 9554AC_DEFUN([LTVERSION_VERSION], 9555[macro_version='2.4.2' 9556macro_revision='1.3337' 9557_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9558_LT_DECL(, macro_revision, 0) 9559]) 9560 9561# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9562# 9563# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9564# Written by Scott James Remnant, 2004. 9565# 9566# This file is free software; the Free Software Foundation gives 9567# unlimited permission to copy and/or distribute it, with or without 9568# modifications, as long as this notice is preserved. 9569 9570# serial 5 lt~obsolete.m4 9571 9572# These exist entirely to fool aclocal when bootstrapping libtool. 9573# 9574# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9575# which have later been changed to m4_define as they aren't part of the 9576# exported API, or moved to Autoconf or Automake where they belong. 9577# 9578# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9579# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9580# using a macro with the same name in our local m4/libtool.m4 it'll 9581# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9582# and doesn't know about Autoconf macros at all.) 9583# 9584# So we provide this file, which has a silly filename so it's always 9585# included after everything else. This provides aclocal with the 9586# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9587# because those macros already exist, or will be overwritten later. 9588# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9589# 9590# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9591# Yes, that means every name once taken will need to remain here until 9592# we give up compatibility with versions before 1.7, at which point 9593# we need to keep only those names which we still refer to. 9594 9595# This is to help aclocal find these macros, as it can't see m4_define. 9596AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9597 9598m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9599m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9600m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9601m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9602m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9603m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9604m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9605m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9606m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9607m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9608m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9609m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9610m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9611m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9612m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9613m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9614m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9615m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9616m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9617m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9618m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9619m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9620m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9621m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9622m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9623m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9624m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9625m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9626m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9627m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9628m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9629m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9630m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9631m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9632m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9633m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9634m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9635m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9636m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9637m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9638m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9639m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9640m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9641m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9642m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9643m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9644m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9645m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9646m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9647m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9648m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9649m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9650m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9651m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9652m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9653m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9654m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9655m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9656m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9657m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9658m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9659 9660# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9661# 9662# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9663# 9664# This program is free software; you can redistribute it and/or modify 9665# it under the terms of the GNU General Public License as published by 9666# the Free Software Foundation; either version 2 of the License, or 9667# (at your option) any later version. 9668# 9669# This program is distributed in the hope that it will be useful, but 9670# WITHOUT ANY WARRANTY; without even the implied warranty of 9671# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9672# General Public License for more details. 9673# 9674# You should have received a copy of the GNU General Public License 9675# along with this program; if not, write to the Free Software 9676# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9677# 9678# As a special exception to the GNU General Public License, if you 9679# distribute this file as part of a program that contains a 9680# configuration script generated by Autoconf, you may include it under 9681# the same distribution terms that you use for the rest of that program. 9682 9683# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9684# ---------------------------------- 9685AC_DEFUN([PKG_PROG_PKG_CONFIG], 9686[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9687m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9688AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9689if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9690 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9691fi 9692if test -n "$PKG_CONFIG"; then 9693 _pkg_min_version=m4_default([$1], [0.9.0]) 9694 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9695 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9696 AC_MSG_RESULT([yes]) 9697 else 9698 AC_MSG_RESULT([no]) 9699 PKG_CONFIG="" 9700 fi 9701 9702fi[]dnl 9703])# PKG_PROG_PKG_CONFIG 9704 9705# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9706# 9707# Check to see whether a particular set of modules exists. Similar 9708# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9709# 9710# 9711# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9712# this or PKG_CHECK_MODULES is called, or make sure to call 9713# PKG_CHECK_EXISTS manually 9714# -------------------------------------------------------------- 9715AC_DEFUN([PKG_CHECK_EXISTS], 9716[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9717if test -n "$PKG_CONFIG" && \ 9718 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9719 m4_ifval([$2], [$2], [:]) 9720m4_ifvaln([$3], [else 9721 $3])dnl 9722fi]) 9723 9724 9725# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9726# --------------------------------------------- 9727m4_define([_PKG_CONFIG], 9728[if test -n "$$1"; then 9729 pkg_cv_[]$1="$$1" 9730 elif test -n "$PKG_CONFIG"; then 9731 PKG_CHECK_EXISTS([$3], 9732 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9733 [pkg_failed=yes]) 9734 else 9735 pkg_failed=untried 9736fi[]dnl 9737])# _PKG_CONFIG 9738 9739# _PKG_SHORT_ERRORS_SUPPORTED 9740# ----------------------------- 9741AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9742[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9743if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9744 _pkg_short_errors_supported=yes 9745else 9746 _pkg_short_errors_supported=no 9747fi[]dnl 9748])# _PKG_SHORT_ERRORS_SUPPORTED 9749 9750 9751# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9752# [ACTION-IF-NOT-FOUND]) 9753# 9754# 9755# Note that if there is a possibility the first call to 9756# PKG_CHECK_MODULES might not happen, you should be sure to include an 9757# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9758# 9759# 9760# -------------------------------------------------------------- 9761AC_DEFUN([PKG_CHECK_MODULES], 9762[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9763AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9764AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9765 9766pkg_failed=no 9767AC_MSG_CHECKING([for $1]) 9768 9769_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9770_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9771 9772m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9773and $1[]_LIBS to avoid the need to call pkg-config. 9774See the pkg-config man page for more details.]) 9775 9776if test $pkg_failed = yes; then 9777 _PKG_SHORT_ERRORS_SUPPORTED 9778 if test $_pkg_short_errors_supported = yes; then 9779 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9780 else 9781 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9782 fi 9783 # Put the nasty error message in config.log where it belongs 9784 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9785 9786 ifelse([$4], , [AC_MSG_ERROR(dnl 9787[Package requirements ($2) were not met: 9788 9789$$1_PKG_ERRORS 9790 9791Consider adjusting the PKG_CONFIG_PATH environment variable if you 9792installed software in a non-standard prefix. 9793 9794_PKG_TEXT 9795])], 9796 [AC_MSG_RESULT([no]) 9797 $4]) 9798elif test $pkg_failed = untried; then 9799 ifelse([$4], , [AC_MSG_FAILURE(dnl 9800[The pkg-config script could not be found or is too old. Make sure it 9801is in your PATH or set the PKG_CONFIG environment variable to the full 9802path to pkg-config. 9803 9804_PKG_TEXT 9805 9806To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9807 [$4]) 9808else 9809 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9810 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9811 AC_MSG_RESULT([yes]) 9812 ifelse([$3], , :, [$3]) 9813fi[]dnl 9814])# PKG_CHECK_MODULES 9815 9816dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9817dnl 9818dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9819dnl 9820dnl Permission is hereby granted, free of charge, to any person obtaining a 9821dnl copy of this software and associated documentation files (the "Software"), 9822dnl to deal in the Software without restriction, including without limitation 9823dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9824dnl and/or sell copies of the Software, and to permit persons to whom the 9825dnl Software is furnished to do so, subject to the following conditions: 9826dnl 9827dnl The above copyright notice and this permission notice (including the next 9828dnl paragraph) shall be included in all copies or substantial portions of the 9829dnl Software. 9830dnl 9831dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9832dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9833dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9834dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9835dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9836dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9837dnl DEALINGS IN THE SOFTWARE. 9838 9839# XORG_MACROS_VERSION(required-version) 9840# ------------------------------------- 9841# Minimum version: 1.1.0 9842# 9843# If you're using a macro added in Version 1.1 or newer, include this in 9844# your configure.ac with the minimum required version, such as: 9845# XORG_MACROS_VERSION(1.1) 9846# 9847# To ensure that this macro is defined, also add: 9848# m4_ifndef([XORG_MACROS_VERSION], 9849# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9850# 9851# 9852# See the "minimum version" comment for each macro you use to see what 9853# version you require. 9854m4_defun([XORG_MACROS_VERSION],[ 9855m4_define([vers_have], [1.17]) 9856m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9857m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9858m4_if(m4_cmp(maj_have, maj_needed), 0,, 9859 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9860m4_if(m4_version_compare(vers_have, [$1]), -1, 9861 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9862m4_undefine([vers_have]) 9863m4_undefine([maj_have]) 9864m4_undefine([maj_needed]) 9865]) # XORG_MACROS_VERSION 9866 9867# XORG_PROG_RAWCPP() 9868# ------------------ 9869# Minimum version: 1.0.0 9870# 9871# Find cpp program and necessary flags for use in pre-processing text files 9872# such as man pages and config files 9873AC_DEFUN([XORG_PROG_RAWCPP],[ 9874AC_REQUIRE([AC_PROG_CPP]) 9875AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9876 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9877 9878# Check for flag to avoid builtin definitions - assumes unix is predefined, 9879# which is not the best choice for supporting other OS'es, but covers most 9880# of the ones we need for now. 9881AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9882AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9883if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9884 AC_MSG_RESULT([no]) 9885else 9886 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9887 RAWCPPFLAGS=-undef 9888 AC_MSG_RESULT([yes]) 9889 # under Cygwin unix is still defined even with -undef 9890 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9891 RAWCPPFLAGS="-undef -ansi" 9892 AC_MSG_RESULT([yes, with -ansi]) 9893 else 9894 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9895 fi 9896fi 9897rm -f conftest.$ac_ext 9898 9899AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9900AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9901if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9902 AC_MSG_RESULT([no]) 9903else 9904 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9905 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9906 AC_MSG_RESULT([yes]) 9907 else 9908 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9909 fi 9910fi 9911rm -f conftest.$ac_ext 9912AC_SUBST(RAWCPPFLAGS) 9913]) # XORG_PROG_RAWCPP 9914 9915# XORG_MANPAGE_SECTIONS() 9916# ----------------------- 9917# Minimum version: 1.0.0 9918# 9919# Determine which sections man pages go in for the different man page types 9920# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9921# Not sure if there's any better way than just hardcoding by OS name. 9922# Override default settings by setting environment variables 9923# Added MAN_SUBSTS in version 1.8 9924# Added AC_PROG_SED in version 1.8 9925 9926AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9927AC_REQUIRE([AC_CANONICAL_HOST]) 9928AC_REQUIRE([AC_PROG_SED]) 9929 9930if test x$APP_MAN_SUFFIX = x ; then 9931 APP_MAN_SUFFIX=1 9932fi 9933if test x$APP_MAN_DIR = x ; then 9934 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9935fi 9936 9937if test x$LIB_MAN_SUFFIX = x ; then 9938 LIB_MAN_SUFFIX=3 9939fi 9940if test x$LIB_MAN_DIR = x ; then 9941 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9942fi 9943 9944if test x$FILE_MAN_SUFFIX = x ; then 9945 case $host_os in 9946 solaris*) FILE_MAN_SUFFIX=4 ;; 9947 *) FILE_MAN_SUFFIX=5 ;; 9948 esac 9949fi 9950if test x$FILE_MAN_DIR = x ; then 9951 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9952fi 9953 9954if test x$MISC_MAN_SUFFIX = x ; then 9955 case $host_os in 9956 solaris*) MISC_MAN_SUFFIX=5 ;; 9957 *) MISC_MAN_SUFFIX=7 ;; 9958 esac 9959fi 9960if test x$MISC_MAN_DIR = x ; then 9961 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9962fi 9963 9964if test x$DRIVER_MAN_SUFFIX = x ; then 9965 case $host_os in 9966 solaris*) DRIVER_MAN_SUFFIX=7 ;; 9967 *) DRIVER_MAN_SUFFIX=4 ;; 9968 esac 9969fi 9970if test x$DRIVER_MAN_DIR = x ; then 9971 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9972fi 9973 9974if test x$ADMIN_MAN_SUFFIX = x ; then 9975 case $host_os in 9976 solaris*) ADMIN_MAN_SUFFIX=1m ;; 9977 *) ADMIN_MAN_SUFFIX=8 ;; 9978 esac 9979fi 9980if test x$ADMIN_MAN_DIR = x ; then 9981 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9982fi 9983 9984 9985AC_SUBST([APP_MAN_SUFFIX]) 9986AC_SUBST([LIB_MAN_SUFFIX]) 9987AC_SUBST([FILE_MAN_SUFFIX]) 9988AC_SUBST([MISC_MAN_SUFFIX]) 9989AC_SUBST([DRIVER_MAN_SUFFIX]) 9990AC_SUBST([ADMIN_MAN_SUFFIX]) 9991AC_SUBST([APP_MAN_DIR]) 9992AC_SUBST([LIB_MAN_DIR]) 9993AC_SUBST([FILE_MAN_DIR]) 9994AC_SUBST([MISC_MAN_DIR]) 9995AC_SUBST([DRIVER_MAN_DIR]) 9996AC_SUBST([ADMIN_MAN_DIR]) 9997 9998XORG_MAN_PAGE="X Version 11" 9999AC_SUBST([XORG_MAN_PAGE]) 10000MAN_SUBSTS="\ 10001 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10002 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10003 -e 's|__xservername__|Xorg|g' \ 10004 -e 's|__xconfigfile__|xorg.conf|g' \ 10005 -e 's|__projectroot__|\$(prefix)|g' \ 10006 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10007 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10008 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10009 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10010 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10011 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10012 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10013AC_SUBST([MAN_SUBSTS]) 10014 10015]) # XORG_MANPAGE_SECTIONS 10016 10017# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10018# ------------------------ 10019# Minimum version: 1.7.0 10020# 10021# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10022# provided by xorg-sgml-doctools, if installed. 10023AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10024AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10025XORG_SGML_PATH= 10026PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10027 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10028 [m4_ifval([$1],[:], 10029 [if test x"$cross_compiling" != x"yes" ; then 10030 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10031 [XORG_SGML_PATH=$prefix/share/sgml]) 10032 fi]) 10033 ]) 10034 10035# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10036# the path and the name of the doc stylesheet 10037if test "x$XORG_SGML_PATH" != "x" ; then 10038 AC_MSG_RESULT([$XORG_SGML_PATH]) 10039 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10040 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10041else 10042 AC_MSG_RESULT([no]) 10043fi 10044 10045AC_SUBST(XORG_SGML_PATH) 10046AC_SUBST(STYLESHEET_SRCDIR) 10047AC_SUBST(XSL_STYLESHEET) 10048AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10049]) # XORG_CHECK_SGML_DOCTOOLS 10050 10051# XORG_CHECK_LINUXDOC 10052# ------------------- 10053# Minimum version: 1.0.0 10054# 10055# Defines the variable MAKE_TEXT if the necessary tools and 10056# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10057# Whether or not the necessary tools and files are found can be checked 10058# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10059AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10060AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10061AC_REQUIRE([XORG_WITH_PS2PDF]) 10062 10063AC_PATH_PROG(LINUXDOC, linuxdoc) 10064 10065AC_MSG_CHECKING([whether to build documentation]) 10066 10067if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10068 BUILDDOC=yes 10069else 10070 BUILDDOC=no 10071fi 10072 10073AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10074 10075AC_MSG_RESULT([$BUILDDOC]) 10076 10077AC_MSG_CHECKING([whether to build pdf documentation]) 10078 10079if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10080 BUILDPDFDOC=yes 10081else 10082 BUILDPDFDOC=no 10083fi 10084 10085AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10086 10087AC_MSG_RESULT([$BUILDPDFDOC]) 10088 10089MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10090MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10091MAKE_PDF="$PS2PDF" 10092MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10093 10094AC_SUBST(MAKE_TEXT) 10095AC_SUBST(MAKE_PS) 10096AC_SUBST(MAKE_PDF) 10097AC_SUBST(MAKE_HTML) 10098]) # XORG_CHECK_LINUXDOC 10099 10100# XORG_CHECK_DOCBOOK 10101# ------------------- 10102# Minimum version: 1.0.0 10103# 10104# Checks for the ability to build output formats from SGML DocBook source. 10105# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10106# indicates whether the necessary tools and files are found and, if set, 10107# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10108AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10109AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10110 10111BUILDTXTDOC=no 10112BUILDPDFDOC=no 10113BUILDPSDOC=no 10114BUILDHTMLDOC=no 10115 10116AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10117AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10118AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10119AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10120 10121AC_MSG_CHECKING([whether to build text documentation]) 10122if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10123 test x$BUILD_TXTDOC != xno; then 10124 BUILDTXTDOC=yes 10125fi 10126AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10127AC_MSG_RESULT([$BUILDTXTDOC]) 10128 10129AC_MSG_CHECKING([whether to build PDF documentation]) 10130if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10131 test x$BUILD_PDFDOC != xno; then 10132 BUILDPDFDOC=yes 10133fi 10134AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10135AC_MSG_RESULT([$BUILDPDFDOC]) 10136 10137AC_MSG_CHECKING([whether to build PostScript documentation]) 10138if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10139 test x$BUILD_PSDOC != xno; then 10140 BUILDPSDOC=yes 10141fi 10142AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10143AC_MSG_RESULT([$BUILDPSDOC]) 10144 10145AC_MSG_CHECKING([whether to build HTML documentation]) 10146if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10147 test x$BUILD_HTMLDOC != xno; then 10148 BUILDHTMLDOC=yes 10149fi 10150AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10151AC_MSG_RESULT([$BUILDHTMLDOC]) 10152 10153MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10154MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10155MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10156MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10157 10158AC_SUBST(MAKE_TEXT) 10159AC_SUBST(MAKE_PS) 10160AC_SUBST(MAKE_PDF) 10161AC_SUBST(MAKE_HTML) 10162]) # XORG_CHECK_DOCBOOK 10163 10164# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10165# ---------------- 10166# Minimum version: 1.5.0 10167# Minimum version for optional DEFAULT argument: 1.11.0 10168# 10169# Documentation tools are not always available on all platforms and sometimes 10170# not at the appropriate level. This macro enables a module to test for the 10171# presence of the tool and obtain it's path in separate variables. Coupled with 10172# the --with-xmlto option, it allows maximum flexibilty in making decisions 10173# as whether or not to use the xmlto package. When DEFAULT is not specified, 10174# --with-xmlto assumes 'auto'. 10175# 10176# Interface to module: 10177# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10178# XMLTO: returns the path of the xmlto program found 10179# returns the path set by the user in the environment 10180# --with-xmlto: 'yes' user instructs the module to use xmlto 10181# 'no' user instructs the module not to use xmlto 10182# 10183# Added in version 1.10.0 10184# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10185# xmlto for text output requires either lynx, links, or w3m browsers 10186# 10187# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10188# 10189AC_DEFUN([XORG_WITH_XMLTO],[ 10190AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10191m4_define([_defopt], m4_default([$2], [auto])) 10192AC_ARG_WITH(xmlto, 10193 AS_HELP_STRING([--with-xmlto], 10194 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10195 [use_xmlto=$withval], [use_xmlto=]_defopt) 10196m4_undefine([_defopt]) 10197 10198if test "x$use_xmlto" = x"auto"; then 10199 AC_PATH_PROG([XMLTO], [xmlto]) 10200 if test "x$XMLTO" = "x"; then 10201 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10202 have_xmlto=no 10203 else 10204 have_xmlto=yes 10205 fi 10206elif test "x$use_xmlto" = x"yes" ; then 10207 AC_PATH_PROG([XMLTO], [xmlto]) 10208 if test "x$XMLTO" = "x"; then 10209 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10210 fi 10211 have_xmlto=yes 10212elif test "x$use_xmlto" = x"no" ; then 10213 if test "x$XMLTO" != "x"; then 10214 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10215 fi 10216 have_xmlto=no 10217else 10218 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10219fi 10220 10221# Test for a minimum version of xmlto, if provided. 10222m4_ifval([$1], 10223[if test "$have_xmlto" = yes; then 10224 # scrape the xmlto version 10225 AC_MSG_CHECKING([the xmlto version]) 10226 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10227 AC_MSG_RESULT([$xmlto_version]) 10228 AS_VERSION_COMPARE([$xmlto_version], [$1], 10229 [if test "x$use_xmlto" = xauto; then 10230 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10231 have_xmlto=no 10232 else 10233 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10234 fi]) 10235fi]) 10236 10237# Test for the ability of xmlto to generate a text target 10238have_xmlto_text=no 10239cat > conftest.xml << "EOF" 10240EOF 10241AS_IF([test "$have_xmlto" = yes], 10242 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10243 [have_xmlto_text=yes], 10244 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10245rm -f conftest.xml 10246AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10247AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10248]) # XORG_WITH_XMLTO 10249 10250# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10251# -------------------------------------------- 10252# Minimum version: 1.12.0 10253# Minimum version for optional DEFAULT argument: 1.12.0 10254# 10255# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10256# XML-based language used for the transformation of XML documents. 10257# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10258# It is used under the cover by xmlto to generate html files from DocBook/XML. 10259# The XSLT processor is often used as a standalone tool for transformations. 10260# It should not be assumed that this tool is used only to work with documnetation. 10261# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10262# 10263# Interface to module: 10264# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10265# XSLTPROC: returns the path of the xsltproc program found 10266# returns the path set by the user in the environment 10267# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10268# 'no' user instructs the module not to use xsltproc 10269# have_xsltproc: returns yes if xsltproc found in PATH or no 10270# 10271# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10272# 10273AC_DEFUN([XORG_WITH_XSLTPROC],[ 10274AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10275# Preserves the interface, should it be implemented later 10276m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10277m4_define([_defopt], m4_default([$2], [auto])) 10278AC_ARG_WITH(xsltproc, 10279 AS_HELP_STRING([--with-xsltproc], 10280 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10281 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10282m4_undefine([_defopt]) 10283 10284if test "x$use_xsltproc" = x"auto"; then 10285 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10286 if test "x$XSLTPROC" = "x"; then 10287 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10288 have_xsltproc=no 10289 else 10290 have_xsltproc=yes 10291 fi 10292elif test "x$use_xsltproc" = x"yes" ; then 10293 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10294 if test "x$XSLTPROC" = "x"; then 10295 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10296 fi 10297 have_xsltproc=yes 10298elif test "x$use_xsltproc" = x"no" ; then 10299 if test "x$XSLTPROC" != "x"; then 10300 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10301 fi 10302 have_xsltproc=no 10303else 10304 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10305fi 10306 10307AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10308]) # XORG_WITH_XSLTPROC 10309 10310# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10311# ---------------------------------------- 10312# Minimum version: 1.15.0 10313# 10314# PERL (Practical Extraction and Report Language) is a language optimized for 10315# scanning arbitrary text files, extracting information from those text files, 10316# and printing reports based on that information. 10317# 10318# When DEFAULT is not specified, --with-perl assumes 'auto'. 10319# 10320# Interface to module: 10321# HAVE_PERL: used in makefiles to conditionally scan text files 10322# PERL: returns the path of the perl program found 10323# returns the path set by the user in the environment 10324# --with-perl: 'yes' user instructs the module to use perl 10325# 'no' user instructs the module not to use perl 10326# have_perl: returns yes if perl found in PATH or no 10327# 10328# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10329# 10330AC_DEFUN([XORG_WITH_PERL],[ 10331AC_ARG_VAR([PERL], [Path to perl command]) 10332# Preserves the interface, should it be implemented later 10333m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10334m4_define([_defopt], m4_default([$2], [auto])) 10335AC_ARG_WITH(perl, 10336 AS_HELP_STRING([--with-perl], 10337 [Use perl for extracting information from files (default: ]_defopt[)]), 10338 [use_perl=$withval], [use_perl=]_defopt) 10339m4_undefine([_defopt]) 10340 10341if test "x$use_perl" = x"auto"; then 10342 AC_PATH_PROG([PERL], [perl]) 10343 if test "x$PERL" = "x"; then 10344 AC_MSG_WARN([perl not found - cannot extract information and report]) 10345 have_perl=no 10346 else 10347 have_perl=yes 10348 fi 10349elif test "x$use_perl" = x"yes" ; then 10350 AC_PATH_PROG([PERL], [perl]) 10351 if test "x$PERL" = "x"; then 10352 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10353 fi 10354 have_perl=yes 10355elif test "x$use_perl" = x"no" ; then 10356 if test "x$PERL" != "x"; then 10357 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10358 fi 10359 have_perl=no 10360else 10361 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10362fi 10363 10364AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10365]) # XORG_WITH_PERL 10366 10367# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10368# ---------------- 10369# Minimum version: 1.5.0 10370# Minimum version for optional DEFAULT argument: 1.11.0 10371# 10372# Documentation tools are not always available on all platforms and sometimes 10373# not at the appropriate level. This macro enables a module to test for the 10374# presence of the tool and obtain it's path in separate variables. Coupled with 10375# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10376# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10377# --with-asciidoc assumes 'auto'. 10378# 10379# Interface to module: 10380# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10381# ASCIIDOC: returns the path of the asciidoc program found 10382# returns the path set by the user in the environment 10383# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10384# 'no' user instructs the module not to use asciidoc 10385# 10386# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10387# 10388AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10389AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10390m4_define([_defopt], m4_default([$2], [auto])) 10391AC_ARG_WITH(asciidoc, 10392 AS_HELP_STRING([--with-asciidoc], 10393 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10394 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10395m4_undefine([_defopt]) 10396 10397if test "x$use_asciidoc" = x"auto"; then 10398 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10399 if test "x$ASCIIDOC" = "x"; then 10400 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10401 have_asciidoc=no 10402 else 10403 have_asciidoc=yes 10404 fi 10405elif test "x$use_asciidoc" = x"yes" ; then 10406 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10407 if test "x$ASCIIDOC" = "x"; then 10408 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10409 fi 10410 have_asciidoc=yes 10411elif test "x$use_asciidoc" = x"no" ; then 10412 if test "x$ASCIIDOC" != "x"; then 10413 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10414 fi 10415 have_asciidoc=no 10416else 10417 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10418fi 10419m4_ifval([$1], 10420[if test "$have_asciidoc" = yes; then 10421 # scrape the asciidoc version 10422 AC_MSG_CHECKING([the asciidoc version]) 10423 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10424 AC_MSG_RESULT([$asciidoc_version]) 10425 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10426 [if test "x$use_asciidoc" = xauto; then 10427 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10428 have_asciidoc=no 10429 else 10430 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10431 fi]) 10432fi]) 10433AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10434]) # XORG_WITH_ASCIIDOC 10435 10436# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10437# -------------------------------- 10438# Minimum version: 1.5.0 10439# Minimum version for optional DEFAULT argument: 1.11.0 10440# 10441# Documentation tools are not always available on all platforms and sometimes 10442# not at the appropriate level. This macro enables a module to test for the 10443# presence of the tool and obtain it's path in separate variables. Coupled with 10444# the --with-doxygen option, it allows maximum flexibilty in making decisions 10445# as whether or not to use the doxygen package. When DEFAULT is not specified, 10446# --with-doxygen assumes 'auto'. 10447# 10448# Interface to module: 10449# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10450# DOXYGEN: returns the path of the doxygen program found 10451# returns the path set by the user in the environment 10452# --with-doxygen: 'yes' user instructs the module to use doxygen 10453# 'no' user instructs the module not to use doxygen 10454# 10455# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10456# 10457AC_DEFUN([XORG_WITH_DOXYGEN],[ 10458AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10459m4_define([_defopt], m4_default([$2], [auto])) 10460AC_ARG_WITH(doxygen, 10461 AS_HELP_STRING([--with-doxygen], 10462 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10463 [use_doxygen=$withval], [use_doxygen=]_defopt) 10464m4_undefine([_defopt]) 10465 10466if test "x$use_doxygen" = x"auto"; then 10467 AC_PATH_PROG([DOXYGEN], [doxygen]) 10468 if test "x$DOXYGEN" = "x"; then 10469 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10470 have_doxygen=no 10471 else 10472 have_doxygen=yes 10473 fi 10474elif test "x$use_doxygen" = x"yes" ; then 10475 AC_PATH_PROG([DOXYGEN], [doxygen]) 10476 if test "x$DOXYGEN" = "x"; then 10477 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10478 fi 10479 have_doxygen=yes 10480elif test "x$use_doxygen" = x"no" ; then 10481 if test "x$DOXYGEN" != "x"; then 10482 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10483 fi 10484 have_doxygen=no 10485else 10486 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10487fi 10488m4_ifval([$1], 10489[if test "$have_doxygen" = yes; then 10490 # scrape the doxygen version 10491 AC_MSG_CHECKING([the doxygen version]) 10492 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10493 AC_MSG_RESULT([$doxygen_version]) 10494 AS_VERSION_COMPARE([$doxygen_version], [$1], 10495 [if test "x$use_doxygen" = xauto; then 10496 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10497 have_doxygen=no 10498 else 10499 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10500 fi]) 10501fi]) 10502AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10503]) # XORG_WITH_DOXYGEN 10504 10505# XORG_WITH_GROFF([DEFAULT]) 10506# ---------------- 10507# Minimum version: 1.6.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-groff option, it allows maximum flexibilty in making decisions 10514# as whether or not to use the groff package. When DEFAULT is not specified, 10515# --with-groff assumes 'auto'. 10516# 10517# Interface to module: 10518# HAVE_GROFF: used in makefiles to conditionally generate documentation 10519# HAVE_GROFF_MM: the memorandum macros (-mm) package 10520# HAVE_GROFF_MS: the -ms macros package 10521# GROFF: returns the path of the groff program found 10522# returns the path set by the user in the environment 10523# --with-groff: 'yes' user instructs the module to use groff 10524# 'no' user instructs the module not to use groff 10525# 10526# Added in version 1.9.0: 10527# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10528# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10529# psselect from the psutils package. 10530# the ghostcript package. Refer to the grohtml man pages 10531# 10532# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10533# 10534# OS and distros often splits groff in a basic and full package, the former 10535# having the groff program and the later having devices, fonts and macros 10536# Checking for the groff executable is not enough. 10537# 10538# If macros are missing, we cannot assume that groff is useless, so we don't 10539# unset HAVE_GROFF or GROFF env variables. 10540# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10541# 10542AC_DEFUN([XORG_WITH_GROFF],[ 10543AC_ARG_VAR([GROFF], [Path to groff command]) 10544m4_define([_defopt], m4_default([$1], [auto])) 10545AC_ARG_WITH(groff, 10546 AS_HELP_STRING([--with-groff], 10547 [Use groff to regenerate documentation (default: ]_defopt[)]), 10548 [use_groff=$withval], [use_groff=]_defopt) 10549m4_undefine([_defopt]) 10550 10551if test "x$use_groff" = x"auto"; then 10552 AC_PATH_PROG([GROFF], [groff]) 10553 if test "x$GROFF" = "x"; then 10554 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10555 have_groff=no 10556 else 10557 have_groff=yes 10558 fi 10559elif test "x$use_groff" = x"yes" ; then 10560 AC_PATH_PROG([GROFF], [groff]) 10561 if test "x$GROFF" = "x"; then 10562 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10563 fi 10564 have_groff=yes 10565elif test "x$use_groff" = x"no" ; then 10566 if test "x$GROFF" != "x"; then 10567 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10568 fi 10569 have_groff=no 10570else 10571 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10572fi 10573 10574# We have groff, test for the presence of the macro packages 10575if test "x$have_groff" = x"yes"; then 10576 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10577 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10578 groff_ms_works=yes 10579 else 10580 groff_ms_works=no 10581 fi 10582 AC_MSG_RESULT([$groff_ms_works]) 10583 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10584 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10585 groff_mm_works=yes 10586 else 10587 groff_mm_works=no 10588 fi 10589 AC_MSG_RESULT([$groff_mm_works]) 10590fi 10591 10592# We have groff, test for HTML dependencies, one command per package 10593if test "x$have_groff" = x"yes"; then 10594 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10595 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10596 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10597 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10598 have_groff_html=yes 10599 else 10600 have_groff_html=no 10601 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10602 fi 10603fi 10604 10605# Set Automake conditionals for Makefiles 10606AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10607AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10608AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10609AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10610]) # XORG_WITH_GROFF 10611 10612# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10613# --------------------------------------- 10614# Minimum version: 1.6.0 10615# Minimum version for optional DEFAULT argument: 1.11.0 10616# Minimum version for optional MIN-VERSION argument: 1.15.0 10617# 10618# Documentation tools are not always available on all platforms and sometimes 10619# not at the appropriate level. This macro enables a module to test for the 10620# presence of the tool and obtain it's path in separate variables. Coupled with 10621# the --with-fop option, it allows maximum flexibilty in making decisions 10622# as whether or not to use the fop package. When DEFAULT is not specified, 10623# --with-fop assumes 'auto'. 10624# 10625# Interface to module: 10626# HAVE_FOP: used in makefiles to conditionally generate documentation 10627# FOP: returns the path of the fop program found 10628# returns the path set by the user in the environment 10629# --with-fop: 'yes' user instructs the module to use fop 10630# 'no' user instructs the module not to use fop 10631# 10632# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10633# 10634AC_DEFUN([XORG_WITH_FOP],[ 10635AC_ARG_VAR([FOP], [Path to fop command]) 10636m4_define([_defopt], m4_default([$2], [auto])) 10637AC_ARG_WITH(fop, 10638 AS_HELP_STRING([--with-fop], 10639 [Use fop to regenerate documentation (default: ]_defopt[)]), 10640 [use_fop=$withval], [use_fop=]_defopt) 10641m4_undefine([_defopt]) 10642 10643if test "x$use_fop" = x"auto"; then 10644 AC_PATH_PROG([FOP], [fop]) 10645 if test "x$FOP" = "x"; then 10646 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10647 have_fop=no 10648 else 10649 have_fop=yes 10650 fi 10651elif test "x$use_fop" = x"yes" ; then 10652 AC_PATH_PROG([FOP], [fop]) 10653 if test "x$FOP" = "x"; then 10654 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10655 fi 10656 have_fop=yes 10657elif test "x$use_fop" = x"no" ; then 10658 if test "x$FOP" != "x"; then 10659 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10660 fi 10661 have_fop=no 10662else 10663 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10664fi 10665 10666# Test for a minimum version of fop, if provided. 10667m4_ifval([$1], 10668[if test "$have_fop" = yes; then 10669 # scrape the fop version 10670 AC_MSG_CHECKING([for fop minimum version]) 10671 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10672 AC_MSG_RESULT([$fop_version]) 10673 AS_VERSION_COMPARE([$fop_version], [$1], 10674 [if test "x$use_fop" = xauto; then 10675 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10676 have_fop=no 10677 else 10678 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10679 fi]) 10680fi]) 10681AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10682]) # XORG_WITH_FOP 10683 10684# XORG_WITH_PS2PDF([DEFAULT]) 10685# ---------------- 10686# Minimum version: 1.6.0 10687# Minimum version for optional DEFAULT argument: 1.11.0 10688# 10689# Documentation tools are not always available on all platforms and sometimes 10690# not at the appropriate level. This macro enables a module to test for the 10691# presence of the tool and obtain it's path in separate variables. Coupled with 10692# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10693# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10694# --with-ps2pdf assumes 'auto'. 10695# 10696# Interface to module: 10697# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10698# PS2PDF: returns the path of the ps2pdf program found 10699# returns the path set by the user in the environment 10700# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10701# 'no' user instructs the module not to use ps2pdf 10702# 10703# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10704# 10705AC_DEFUN([XORG_WITH_PS2PDF],[ 10706AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10707m4_define([_defopt], m4_default([$1], [auto])) 10708AC_ARG_WITH(ps2pdf, 10709 AS_HELP_STRING([--with-ps2pdf], 10710 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10711 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10712m4_undefine([_defopt]) 10713 10714if test "x$use_ps2pdf" = x"auto"; then 10715 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10716 if test "x$PS2PDF" = "x"; then 10717 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10718 have_ps2pdf=no 10719 else 10720 have_ps2pdf=yes 10721 fi 10722elif test "x$use_ps2pdf" = x"yes" ; then 10723 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10724 if test "x$PS2PDF" = "x"; then 10725 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10726 fi 10727 have_ps2pdf=yes 10728elif test "x$use_ps2pdf" = x"no" ; then 10729 if test "x$PS2PDF" != "x"; then 10730 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10731 fi 10732 have_ps2pdf=no 10733else 10734 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10735fi 10736AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10737]) # XORG_WITH_PS2PDF 10738 10739# XORG_ENABLE_DOCS (enable_docs=yes) 10740# ---------------- 10741# Minimum version: 1.6.0 10742# 10743# Documentation tools are not always available on all platforms and sometimes 10744# not at the appropriate level. This macro enables a builder to skip all 10745# documentation targets except traditional man pages. 10746# Combined with the specific tool checking macros XORG_WITH_*, it provides 10747# maximum flexibilty in controlling documentation building. 10748# Refer to: 10749# XORG_WITH_XMLTO --with-xmlto 10750# XORG_WITH_ASCIIDOC --with-asciidoc 10751# XORG_WITH_DOXYGEN --with-doxygen 10752# XORG_WITH_FOP --with-fop 10753# XORG_WITH_GROFF --with-groff 10754# XORG_WITH_PS2PDF --with-ps2pdf 10755# 10756# Interface to module: 10757# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10758# --enable-docs: 'yes' user instructs the module to generate docs 10759# 'no' user instructs the module not to generate docs 10760# parm1: specify the default value, yes or no. 10761# 10762AC_DEFUN([XORG_ENABLE_DOCS],[ 10763m4_define([docs_default], m4_default([$1], [yes])) 10764AC_ARG_ENABLE(docs, 10765 AS_HELP_STRING([--enable-docs], 10766 [Enable building the documentation (default: ]docs_default[)]), 10767 [build_docs=$enableval], [build_docs=]docs_default) 10768m4_undefine([docs_default]) 10769AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10770AC_MSG_CHECKING([whether to build documentation]) 10771AC_MSG_RESULT([$build_docs]) 10772]) # XORG_ENABLE_DOCS 10773 10774# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10775# ---------------- 10776# Minimum version: 1.6.0 10777# 10778# This macro enables a builder to skip all developer documentation. 10779# Combined with the specific tool checking macros XORG_WITH_*, it provides 10780# maximum flexibilty in controlling documentation building. 10781# Refer to: 10782# XORG_WITH_XMLTO --with-xmlto 10783# XORG_WITH_ASCIIDOC --with-asciidoc 10784# XORG_WITH_DOXYGEN --with-doxygen 10785# XORG_WITH_FOP --with-fop 10786# XORG_WITH_GROFF --with-groff 10787# XORG_WITH_PS2PDF --with-ps2pdf 10788# 10789# Interface to module: 10790# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10791# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10792# 'no' user instructs the module not to generate developer docs 10793# parm1: specify the default value, yes or no. 10794# 10795AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10796m4_define([devel_default], m4_default([$1], [yes])) 10797AC_ARG_ENABLE(devel-docs, 10798 AS_HELP_STRING([--enable-devel-docs], 10799 [Enable building the developer documentation (default: ]devel_default[)]), 10800 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10801m4_undefine([devel_default]) 10802AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10803AC_MSG_CHECKING([whether to build developer documentation]) 10804AC_MSG_RESULT([$build_devel_docs]) 10805]) # XORG_ENABLE_DEVEL_DOCS 10806 10807# XORG_ENABLE_SPECS (enable_specs=yes) 10808# ---------------- 10809# Minimum version: 1.6.0 10810# 10811# This macro enables a builder to skip all functional specification targets. 10812# Combined with the specific tool checking macros XORG_WITH_*, it provides 10813# maximum flexibilty in controlling documentation building. 10814# Refer to: 10815# XORG_WITH_XMLTO --with-xmlto 10816# XORG_WITH_ASCIIDOC --with-asciidoc 10817# XORG_WITH_DOXYGEN --with-doxygen 10818# XORG_WITH_FOP --with-fop 10819# XORG_WITH_GROFF --with-groff 10820# XORG_WITH_PS2PDF --with-ps2pdf 10821# 10822# Interface to module: 10823# ENABLE_SPECS: used in makefiles to conditionally generate specs 10824# --enable-specs: 'yes' user instructs the module to generate specs 10825# 'no' user instructs the module not to generate specs 10826# parm1: specify the default value, yes or no. 10827# 10828AC_DEFUN([XORG_ENABLE_SPECS],[ 10829m4_define([spec_default], m4_default([$1], [yes])) 10830AC_ARG_ENABLE(specs, 10831 AS_HELP_STRING([--enable-specs], 10832 [Enable building the specs (default: ]spec_default[)]), 10833 [build_specs=$enableval], [build_specs=]spec_default) 10834m4_undefine([spec_default]) 10835AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10836AC_MSG_CHECKING([whether to build functional specifications]) 10837AC_MSG_RESULT([$build_specs]) 10838]) # XORG_ENABLE_SPECS 10839 10840# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10841# ---------------------------------------------- 10842# Minimum version: 1.13.0 10843# 10844# This macro enables a builder to enable/disable unit testing 10845# It makes no assumption about the test cases implementation 10846# Test cases may or may not use Automake "Support for test suites" 10847# They may or may not use the software utility library GLib 10848# 10849# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10850# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10851# The variable enable_unit_tests is used by other macros in this file. 10852# 10853# Interface to module: 10854# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10855# enable_unit_tests: used in configure.ac for additional configuration 10856# --enable-unit-tests: 'yes' user instructs the module to build tests 10857# 'no' user instructs the module not to build tests 10858# parm1: specify the default value, yes or no. 10859# 10860AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10861AC_BEFORE([$0], [XORG_WITH_GLIB]) 10862AC_BEFORE([$0], [XORG_LD_WRAP]) 10863AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10864m4_define([_defopt], m4_default([$1], [auto])) 10865AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10866 [Enable building unit test cases (default: ]_defopt[)]), 10867 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10868m4_undefine([_defopt]) 10869AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10870AC_MSG_CHECKING([whether to build unit test cases]) 10871AC_MSG_RESULT([$enable_unit_tests]) 10872]) # XORG_ENABLE_UNIT_TESTS 10873 10874# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10875# ------------------------------------------------------ 10876# Minimum version: 1.17.0 10877# 10878# This macro enables a builder to enable/disable integration testing 10879# It makes no assumption about the test cases' implementation 10880# Test cases may or may not use Automake "Support for test suites" 10881# 10882# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10883# usually requires less dependencies and may be built and run under less 10884# stringent environments than integration tests. 10885# 10886# Interface to module: 10887# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10888# enable_integration_tests: used in configure.ac for additional configuration 10889# --enable-integration-tests: 'yes' user instructs the module to build tests 10890# 'no' user instructs the module not to build tests 10891# parm1: specify the default value, yes or no. 10892# 10893AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10894AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10895m4_define([_defopt], m4_default([$1], [auto])) 10896AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10897 [Enable building integration test cases (default: ]_defopt[)]), 10898 [enable_integration_tests=$enableval], 10899 [enable_integration_tests=]_defopt) 10900m4_undefine([_defopt]) 10901AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10902 [test "x$enable_integration_tests" != xno]) 10903AC_MSG_CHECKING([whether to build unit test cases]) 10904AC_MSG_RESULT([$enable_integration_tests]) 10905]) # XORG_ENABLE_INTEGRATION_TESTS 10906 10907# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10908# ---------------------------------------- 10909# Minimum version: 1.13.0 10910# 10911# GLib is a library which provides advanced data structures and functions. 10912# This macro enables a module to test for the presence of Glib. 10913# 10914# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10915# Otherwise the value of $enable_unit_tests is blank. 10916# 10917# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10918# test support usually requires less dependencies and may be built and run under 10919# less stringent environments than integration tests. 10920# 10921# Interface to module: 10922# HAVE_GLIB: used in makefiles to conditionally build targets 10923# with_glib: used in configure.ac to know if GLib has been found 10924# --with-glib: 'yes' user instructs the module to use glib 10925# 'no' user instructs the module not to use glib 10926# 10927AC_DEFUN([XORG_WITH_GLIB],[ 10928AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10929m4_define([_defopt], m4_default([$2], [auto])) 10930AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10931 [Use GLib library for unit testing (default: ]_defopt[)]), 10932 [with_glib=$withval], [with_glib=]_defopt) 10933m4_undefine([_defopt]) 10934 10935have_glib=no 10936# Do not probe GLib if user explicitly disabled unit testing 10937if test "x$enable_unit_tests" != x"no"; then 10938 # Do not probe GLib if user explicitly disabled it 10939 if test "x$with_glib" != x"no"; then 10940 m4_ifval( 10941 [$1], 10942 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10943 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10944 ) 10945 fi 10946fi 10947 10948# Not having GLib when unit testing has been explicitly requested is an error 10949if test "x$enable_unit_tests" = x"yes"; then 10950 if test "x$have_glib" = x"no"; then 10951 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10952 fi 10953fi 10954 10955# Having unit testing disabled when GLib has been explicitly requested is an error 10956if test "x$enable_unit_tests" = x"no"; then 10957 if test "x$with_glib" = x"yes"; then 10958 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10959 fi 10960fi 10961 10962# Not having GLib when it has been explicitly requested is an error 10963if test "x$with_glib" = x"yes"; then 10964 if test "x$have_glib" = x"no"; then 10965 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10966 fi 10967fi 10968 10969AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10970]) # XORG_WITH_GLIB 10971 10972# XORG_LD_WRAP([required|optional]) 10973# --------------------------------- 10974# Minimum version: 1.13.0 10975# 10976# Check if linker supports -wrap, passed via compiler flags 10977# 10978# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10979# Otherwise the value of $enable_unit_tests is blank. 10980# 10981# Argument added in 1.16.0 - default is "required", to match existing behavior 10982# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10983# available, an argument of "optional" allows use when some unit tests require 10984# ld -wrap and others do not. 10985# 10986AC_DEFUN([XORG_LD_WRAP],[ 10987XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10988 [AC_LANG_PROGRAM([#include <stdlib.h> 10989 void __wrap_exit(int status) { return; }], 10990 [exit(0);])]) 10991# Not having ld wrap when unit testing has been explicitly requested is an error 10992if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10993 if test "x$have_ld_wrap" = x"no"; then 10994 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10995 fi 10996fi 10997AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10998# 10999]) # XORG_LD_WRAP 11000 11001# XORG_CHECK_LINKER_FLAGS 11002# ----------------------- 11003# SYNOPSIS 11004# 11005# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11006# 11007# DESCRIPTION 11008# 11009# Check whether the given linker FLAGS work with the current language's 11010# linker, or whether they give an error. 11011# 11012# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11013# success/failure. 11014# 11015# PROGRAM-SOURCE is the program source to link with, if needed 11016# 11017# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11018# 11019# LICENSE 11020# 11021# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11022# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11023# Copyright (c) 2009 Matteo Frigo 11024# 11025# This program is free software: you can redistribute it and/or modify it 11026# under the terms of the GNU General Public License as published by the 11027# Free Software Foundation, either version 3 of the License, or (at your 11028# option) any later version. 11029# 11030# This program is distributed in the hope that it will be useful, but 11031# WITHOUT ANY WARRANTY; without even the implied warranty of 11032# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11033# Public License for more details. 11034# 11035# You should have received a copy of the GNU General Public License along 11036# with this program. If not, see <http://www.gnu.org/licenses/>. 11037# 11038# As a special exception, the respective Autoconf Macro's copyright owner 11039# gives unlimited permission to copy, distribute and modify the configure 11040# scripts that are the output of Autoconf when processing the Macro. You 11041# need not follow the terms of the GNU General Public License when using 11042# or distributing such scripts, even though portions of the text of the 11043# Macro appear in them. The GNU General Public License (GPL) does govern 11044# all other use of the material that constitutes the Autoconf Macro. 11045# 11046# This special exception to the GPL applies to versions of the Autoconf 11047# Macro released by the Autoconf Archive. When you make and distribute a 11048# modified version of the Autoconf Macro, you may extend this special 11049# exception to the GPL to apply to your modified version as well.# 11050AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11051[AC_MSG_CHECKING([whether the linker accepts $1]) 11052dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11053AS_LITERAL_IF([$1], 11054 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11055 ax_save_FLAGS=$LDFLAGS 11056 LDFLAGS="$1" 11057 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11058 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11059 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11060 LDFLAGS=$ax_save_FLAGS])], 11061 [ax_save_FLAGS=$LDFLAGS 11062 LDFLAGS="$1" 11063 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11064 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11065 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11066 LDFLAGS=$ax_save_FLAGS]) 11067eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11068AC_MSG_RESULT($xorg_check_linker_flags) 11069if test "x$xorg_check_linker_flags" = xyes; then 11070 m4_default([$2], :) 11071else 11072 m4_default([$3], :) 11073fi 11074]) # XORG_CHECK_LINKER_FLAGS 11075 11076# XORG_MEMORY_CHECK_FLAGS 11077# ----------------------- 11078# Minimum version: 1.16.0 11079# 11080# This macro attempts to find appropriate memory checking functionality 11081# for various platforms which unit testing code may use to catch various 11082# forms of memory allocation and access errors in testing. 11083# 11084# Interface to module: 11085# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11086# Usually added to TESTS_ENVIRONMENT in Makefile.am 11087# 11088# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11089# 11090AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11091 11092AC_REQUIRE([AC_CANONICAL_HOST]) 11093AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11094 [Environment variables to enable memory checking in tests]) 11095 11096# Check for different types of support on different platforms 11097case $host_os in 11098 solaris*) 11099 AC_CHECK_LIB([umem], [umem_alloc], 11100 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11101 ;; 11102 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11103 # both directly and inverted, so should not be 0 or 255. 11104 malloc_debug_env='MALLOC_PERTURB_=15' 11105 ;; 11106 darwin*) 11107 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11108 ;; 11109 *bsd*) 11110 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11111 ;; 11112esac 11113 11114# User supplied flags override default flags 11115if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11116 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11117fi 11118 11119AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11120]) # XORG_WITH_LINT 11121 11122# XORG_CHECK_MALLOC_ZERO 11123# ---------------------- 11124# Minimum version: 1.0.0 11125# 11126# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11127# malloc(0) returns NULL. Packages should add one of these cflags to 11128# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11129AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11130AC_ARG_ENABLE(malloc0returnsnull, 11131 AS_HELP_STRING([--enable-malloc0returnsnull], 11132 [malloc(0) returns NULL (default: auto)]), 11133 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11134 [MALLOC_ZERO_RETURNS_NULL=auto]) 11135 11136AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11137if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11138 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11139#include <stdlib.h> 11140],[ 11141 char *m0, *r0, *c0, *p; 11142 m0 = malloc(0); 11143 p = malloc(10); 11144 r0 = realloc(p,0); 11145 c0 = calloc(0,10); 11146 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11147])], 11148 [MALLOC_ZERO_RETURNS_NULL=yes], 11149 [MALLOC_ZERO_RETURNS_NULL=no], 11150 [MALLOC_ZERO_RETURNS_NULL=yes]) 11151fi 11152AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11153 11154if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11155 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11156 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11157 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11158else 11159 MALLOC_ZERO_CFLAGS="" 11160 XMALLOC_ZERO_CFLAGS="" 11161 XTMALLOC_ZERO_CFLAGS="" 11162fi 11163 11164AC_SUBST([MALLOC_ZERO_CFLAGS]) 11165AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11166AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11167]) # XORG_CHECK_MALLOC_ZERO 11168 11169# XORG_WITH_LINT() 11170# ---------------- 11171# Minimum version: 1.1.0 11172# 11173# This macro enables the use of a tool that flags some suspicious and 11174# non-portable constructs (likely to be bugs) in C language source code. 11175# It will attempt to locate the tool and use appropriate options. 11176# There are various lint type tools on different platforms. 11177# 11178# Interface to module: 11179# LINT: returns the path to the tool found on the platform 11180# or the value set to LINT on the configure cmd line 11181# also an Automake conditional 11182# LINT_FLAGS: an Automake variable with appropriate flags 11183# 11184# --with-lint: 'yes' user instructs the module to use lint 11185# 'no' user instructs the module not to use lint (default) 11186# 11187# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11188# If the user sets the value of LINT_FLAGS, they are used verbatim. 11189# 11190AC_DEFUN([XORG_WITH_LINT],[ 11191 11192AC_ARG_VAR([LINT], [Path to a lint-style command]) 11193AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11194AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11195 [Use a lint-style source code checker (default: disabled)])], 11196 [use_lint=$withval], [use_lint=no]) 11197 11198# Obtain platform specific info like program name and options 11199# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11200case $host_os in 11201 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11202 lint_name=splint 11203 lint_options="-badflag" 11204 ;; 11205 *freebsd* | *netbsd*) 11206 lint_name=lint 11207 lint_options="-u -b" 11208 ;; 11209 *solaris*) 11210 lint_name=lint 11211 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11212 ;; 11213esac 11214 11215# Test for the presence of the program (either guessed by the code or spelled out by the user) 11216if test "x$use_lint" = x"yes" ; then 11217 AC_PATH_PROG([LINT], [$lint_name]) 11218 if test "x$LINT" = "x"; then 11219 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11220 fi 11221elif test "x$use_lint" = x"no" ; then 11222 if test "x$LINT" != "x"; then 11223 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11224 fi 11225else 11226 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11227fi 11228 11229# User supplied flags override default flags 11230if test "x$LINT_FLAGS" != "x"; then 11231 lint_options=$LINT_FLAGS 11232fi 11233 11234AC_SUBST([LINT_FLAGS],[$lint_options]) 11235AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11236 11237]) # XORG_WITH_LINT 11238 11239# XORG_LINT_LIBRARY(LIBNAME) 11240# -------------------------- 11241# Minimum version: 1.1.0 11242# 11243# Sets up flags for building lint libraries for checking programs that call 11244# functions in the library. 11245# 11246# Interface to module: 11247# LINTLIB - Automake variable with the name of lint library file to make 11248# MAKE_LINT_LIB - Automake conditional 11249# 11250# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11251# - 'no' user instructs the module not to create a lint library (default) 11252 11253AC_DEFUN([XORG_LINT_LIBRARY],[ 11254AC_REQUIRE([XORG_WITH_LINT]) 11255AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11256 [Create lint library (default: disabled)])], 11257 [make_lint_lib=$enableval], [make_lint_lib=no]) 11258 11259if test "x$make_lint_lib" = x"yes" ; then 11260 LINTLIB=llib-l$1.ln 11261 if test "x$LINT" = "x"; then 11262 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11263 fi 11264elif test "x$make_lint_lib" != x"no" ; then 11265 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11266fi 11267 11268AC_SUBST(LINTLIB) 11269AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11270 11271]) # XORG_LINT_LIBRARY 11272 11273# XORG_COMPILER_BRAND 11274# ------------------- 11275# Minimum version: 1.14.0 11276# 11277# Checks for various brands of compilers and sets flags as appropriate: 11278# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11279# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11280# clang compiler - sets CLANGCC to "yes" 11281# Intel compiler - sets INTELCC to "yes" 11282# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11283# 11284AC_DEFUN([XORG_COMPILER_BRAND], [ 11285AC_LANG_CASE( 11286 [C], [ 11287 AC_REQUIRE([AC_PROG_CC_C99]) 11288 ], 11289 [C++], [ 11290 AC_REQUIRE([AC_PROG_CXX]) 11291 ] 11292) 11293AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11294AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11295AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11296]) # XORG_COMPILER_BRAND 11297 11298# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11299# --------------- 11300# Minimum version: 1.16.0 11301# 11302# Test if the compiler works when passed the given flag as a command line argument. 11303# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11304# next flag in the list until there are no more options. 11305# 11306# Note that this does not guarantee that the compiler supports the flag as some 11307# compilers will simply ignore arguments that they do not understand, but we do 11308# attempt to weed out false positives by using -Werror=unknown-warning-option and 11309# -Werror=unused-command-line-argument 11310# 11311AC_DEFUN([XORG_TESTSET_CFLAG], [ 11312m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11313m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11314 11315AC_LANG_COMPILER_REQUIRE 11316 11317AC_LANG_CASE( 11318 [C], [ 11319 AC_REQUIRE([AC_PROG_CC_C99]) 11320 define([PREFIX], [C]) 11321 define([CACHE_PREFIX], [cc]) 11322 define([COMPILER], [$CC]) 11323 ], 11324 [C++], [ 11325 define([PREFIX], [CXX]) 11326 define([CACHE_PREFIX], [cxx]) 11327 define([COMPILER], [$CXX]) 11328 ] 11329) 11330 11331[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11332 11333if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11334 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11335 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11336 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11337 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11338 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11339 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11340 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11341 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11342fi 11343 11344if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11345 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11346 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11347 fi 11348 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11349 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11350 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11351 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11352 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11353 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11354 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11355 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11356fi 11357 11358found="no" 11359m4_foreach([flag], m4_cdr($@), [ 11360 if test $found = "no" ; then 11361 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 11362 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11363 fi 11364 11365 if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 11366 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11367 fi 11368 11369 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11370 11371dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11372 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11373 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11374 AC_CACHE_VAL($cacheid, 11375 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11376 [eval $cacheid=yes], 11377 [eval $cacheid=no])]) 11378 11379 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11380 11381 eval supported=\$$cacheid 11382 AC_MSG_RESULT([$supported]) 11383 if test "$supported" = "yes" ; then 11384 $1="$$1 ]flag[" 11385 found="yes" 11386 fi 11387 fi 11388]) 11389]) # XORG_TESTSET_CFLAG 11390 11391# XORG_COMPILER_FLAGS 11392# --------------- 11393# Minimum version: 1.16.0 11394# 11395# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11396# arguments supported by the selected compiler which do NOT alter the generated 11397# code. These arguments will cause the compiler to print various warnings 11398# during compilation AND turn a conservative set of warnings into errors. 11399# 11400# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11401# future versions of util-macros as options are added to new compilers. 11402# 11403AC_DEFUN([XORG_COMPILER_FLAGS], [ 11404AC_REQUIRE([XORG_COMPILER_BRAND]) 11405 11406AC_ARG_ENABLE(selective-werror, 11407 AS_HELP_STRING([--disable-selective-werror], 11408 [Turn off selective compiler errors. (default: enabled)]), 11409 [SELECTIVE_WERROR=$enableval], 11410 [SELECTIVE_WERROR=yes]) 11411 11412AC_LANG_CASE( 11413 [C], [ 11414 define([PREFIX], [C]) 11415 ], 11416 [C++], [ 11417 define([PREFIX], [CXX]) 11418 ] 11419) 11420# -v is too short to test reliably with XORG_TESTSET_CFLAG 11421if test "x$SUNCC" = "xyes"; then 11422 [BASE_]PREFIX[FLAGS]="-v" 11423else 11424 [BASE_]PREFIX[FLAGS]="" 11425fi 11426 11427# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11428XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11429XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11430XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11431XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11432 11433AC_LANG_CASE( 11434 [C], [ 11435 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11436 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11437 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11438 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11439 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 11440 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11441 ] 11442) 11443 11444# This chunk adds additional warnings that could catch undesired effects. 11445XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11446XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11447XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11448XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11449XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11450XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11451XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11452 11453# These are currently disabled because they are noisy. They will be enabled 11454# in the future once the codebase is sufficiently modernized to silence 11455# them. For now, I don't want them to drown out the other warnings. 11456# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11457# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11458# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11459 11460# Turn some warnings into errors, so we don't accidently get successful builds 11461# when there are problems that should be fixed. 11462 11463if test "x$SELECTIVE_WERROR" = "xyes" ; then 11464XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11465XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11466XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11467XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11468XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11469XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11470XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11471XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11472XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11473XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11474XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11475XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11476XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11477else 11478AC_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]) 11479XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11480XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11481XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11482XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11483XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11484XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11485XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11486XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11487XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11488XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11489XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11490XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11491XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11492fi 11493 11494AC_SUBST([BASE_]PREFIX[FLAGS]) 11495]) # XORG_COMPILER_FLAGS 11496 11497# XORG_CWARNFLAGS 11498# --------------- 11499# Minimum version: 1.2.0 11500# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11501# 11502# Defines CWARNFLAGS to enable C compiler warnings. 11503# 11504# This function is deprecated because it defines -fno-strict-aliasing 11505# which alters the code generated by the compiler. If -fno-strict-aliasing 11506# is needed, then it should be added explicitly in the module when 11507# it is updated to use BASE_CFLAGS. 11508# 11509AC_DEFUN([XORG_CWARNFLAGS], [ 11510AC_REQUIRE([XORG_COMPILER_FLAGS]) 11511AC_REQUIRE([XORG_COMPILER_BRAND]) 11512AC_LANG_CASE( 11513 [C], [ 11514 CWARNFLAGS="$BASE_CFLAGS" 11515 if test "x$GCC" = xyes ; then 11516 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11517 fi 11518 AC_SUBST(CWARNFLAGS) 11519 ] 11520) 11521]) # XORG_CWARNFLAGS 11522 11523# XORG_STRICT_OPTION 11524# ----------------------- 11525# Minimum version: 1.3.0 11526# 11527# Add configure option to enable strict compilation flags, such as treating 11528# warnings as fatal errors. 11529# If --enable-strict-compilation is passed to configure, adds strict flags to 11530# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11531# 11532# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11533# when strict compilation is unconditionally desired. 11534AC_DEFUN([XORG_STRICT_OPTION], [ 11535AC_REQUIRE([XORG_CWARNFLAGS]) 11536AC_REQUIRE([XORG_COMPILER_FLAGS]) 11537 11538AC_ARG_ENABLE(strict-compilation, 11539 AS_HELP_STRING([--enable-strict-compilation], 11540 [Enable all warnings from compiler and make them errors (default: disabled)]), 11541 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11542 11543AC_LANG_CASE( 11544 [C], [ 11545 define([PREFIX], [C]) 11546 ], 11547 [C++], [ 11548 define([PREFIX], [CXX]) 11549 ] 11550) 11551 11552[STRICT_]PREFIX[FLAGS]="" 11553XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11554XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11555 11556# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11557# activate it with -Werror, so we add it here explicitly. 11558XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11559 11560if test "x$STRICT_COMPILE" = "xyes"; then 11561 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11562 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11563fi 11564AC_SUBST([STRICT_]PREFIX[FLAGS]) 11565AC_SUBST([BASE_]PREFIX[FLAGS]) 11566AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11567]) # XORG_STRICT_OPTION 11568 11569# XORG_DEFAULT_OPTIONS 11570# -------------------- 11571# Minimum version: 1.3.0 11572# 11573# Defines default options for X.Org modules. 11574# 11575AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11576AC_REQUIRE([AC_PROG_INSTALL]) 11577XORG_COMPILER_FLAGS 11578XORG_CWARNFLAGS 11579XORG_STRICT_OPTION 11580XORG_RELEASE_VERSION 11581XORG_CHANGELOG 11582XORG_INSTALL 11583XORG_MANPAGE_SECTIONS 11584m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11585 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11586]) # XORG_DEFAULT_OPTIONS 11587 11588# XORG_INSTALL() 11589# ---------------- 11590# Minimum version: 1.4.0 11591# 11592# Defines the variable INSTALL_CMD as the command to copy 11593# INSTALL from $prefix/share/util-macros. 11594# 11595AC_DEFUN([XORG_INSTALL], [ 11596AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11597macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11598INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11599mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11600|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11601echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11602AC_SUBST([INSTALL_CMD]) 11603]) # XORG_INSTALL 11604dnl Copyright 2005 Red Hat, Inc 11605dnl 11606dnl Permission to use, copy, modify, distribute, and sell this software and its 11607dnl documentation for any purpose is hereby granted without fee, provided that 11608dnl the above copyright notice appear in all copies and that both that 11609dnl copyright notice and this permission notice appear in supporting 11610dnl documentation. 11611dnl 11612dnl The above copyright notice and this permission notice shall be included 11613dnl in all copies or substantial portions of the Software. 11614dnl 11615dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11616dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11617dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11618dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11619dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11620dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11621dnl OTHER DEALINGS IN THE SOFTWARE. 11622dnl 11623dnl Except as contained in this notice, the name of the copyright holders shall 11624dnl not be used in advertising or otherwise to promote the sale, use or 11625dnl other dealings in this Software without prior written authorization 11626dnl from the copyright holders. 11627dnl 11628 11629# XORG_RELEASE_VERSION 11630# -------------------- 11631# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11632 11633AC_DEFUN([XORG_RELEASE_VERSION],[ 11634 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11635 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11636 [Major version of this package]) 11637 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11638 if test "x$PVM" = "x"; then 11639 PVM="0" 11640 fi 11641 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11642 [$PVM], 11643 [Minor version of this package]) 11644 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11645 if test "x$PVP" = "x"; then 11646 PVP="0" 11647 fi 11648 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11649 [$PVP], 11650 [Patch version of this package]) 11651]) 11652 11653# XORG_CHANGELOG() 11654# ---------------- 11655# Minimum version: 1.2.0 11656# 11657# Defines the variable CHANGELOG_CMD as the command to generate 11658# ChangeLog from git. 11659# 11660# 11661AC_DEFUN([XORG_CHANGELOG], [ 11662CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11663mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11664|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11665echo 'git directory not found: installing possibly empty changelog.' >&2)" 11666AC_SUBST([CHANGELOG_CMD]) 11667]) # XORG_CHANGELOG 11668 11669