aclocal.m4 revision 4e7590ef
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# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 696 697# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 698# Free Software Foundation, Inc. 699# 700# This file is free software; the Free Software Foundation 701# gives unlimited permission to copy and/or distribute it, 702# with or without modifications, as long as this notice is preserved. 703 704# serial 6 705 706# AM_MISSING_PROG(NAME, PROGRAM) 707# ------------------------------ 708AC_DEFUN([AM_MISSING_PROG], 709[AC_REQUIRE([AM_MISSING_HAS_RUN]) 710$1=${$1-"${am_missing_run}$2"} 711AC_SUBST($1)]) 712 713 714# AM_MISSING_HAS_RUN 715# ------------------ 716# Define MISSING if not defined so far and test if it supports --run. 717# If it does, set am_missing_run to use it, otherwise, to nothing. 718AC_DEFUN([AM_MISSING_HAS_RUN], 719[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 720AC_REQUIRE_AUX_FILE([missing])dnl 721if test x"${MISSING+set}" != xset; then 722 case $am_aux_dir in 723 *\ * | *\ *) 724 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 725 *) 726 MISSING="\${SHELL} $am_aux_dir/missing" ;; 727 esac 728fi 729# Use eval to expand $SHELL 730if eval "$MISSING --run true"; then 731 am_missing_run="$MISSING --run " 732else 733 am_missing_run= 734 AC_MSG_WARN([`missing' script is too old or missing]) 735fi 736]) 737 738# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 739# Inc. 740# 741# This file is free software; the Free Software Foundation 742# gives unlimited permission to copy and/or distribute it, 743# with or without modifications, as long as this notice is preserved. 744 745# serial 1 746 747# AM_PROG_MKDIR_P 748# --------------- 749# Check for `mkdir -p'. 750AC_DEFUN([AM_PROG_MKDIR_P], 751[AC_PREREQ([2.60])dnl 752AC_REQUIRE([AC_PROG_MKDIR_P])dnl 753dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 754dnl while keeping a definition of mkdir_p for backward compatibility. 755dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 756dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 757dnl Makefile.ins that do not define MKDIR_P, so we do our own 758dnl adjustment using top_builddir (which is defined more often than 759dnl MKDIR_P). 760AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 761case $mkdir_p in 762 [[\\/$]]* | ?:[[\\/]]*) ;; 763 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 764esac 765]) 766 767# Helper functions for option handling. -*- Autoconf -*- 768 769# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 770# Foundation, Inc. 771# 772# This file is free software; the Free Software Foundation 773# gives unlimited permission to copy and/or distribute it, 774# with or without modifications, as long as this notice is preserved. 775 776# serial 5 777 778# _AM_MANGLE_OPTION(NAME) 779# ----------------------- 780AC_DEFUN([_AM_MANGLE_OPTION], 781[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 782 783# _AM_SET_OPTION(NAME) 784# -------------------- 785# Set option NAME. Presently that only means defining a flag for this option. 786AC_DEFUN([_AM_SET_OPTION], 787[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 788 789# _AM_SET_OPTIONS(OPTIONS) 790# ------------------------ 791# OPTIONS is a space-separated list of Automake options. 792AC_DEFUN([_AM_SET_OPTIONS], 793[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 794 795# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 796# ------------------------------------------- 797# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 798AC_DEFUN([_AM_IF_OPTION], 799[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 800 801# Check to make sure that the build environment is sane. -*- Autoconf -*- 802 803# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 804# Free Software Foundation, Inc. 805# 806# This file is free software; the Free Software Foundation 807# gives unlimited permission to copy and/or distribute it, 808# with or without modifications, as long as this notice is preserved. 809 810# serial 5 811 812# AM_SANITY_CHECK 813# --------------- 814AC_DEFUN([AM_SANITY_CHECK], 815[AC_MSG_CHECKING([whether build environment is sane]) 816# Just in case 817sleep 1 818echo timestamp > conftest.file 819# Reject unsafe characters in $srcdir or the absolute working directory 820# name. Accept space and tab only in the latter. 821am_lf=' 822' 823case `pwd` in 824 *[[\\\"\#\$\&\'\`$am_lf]]*) 825 AC_MSG_ERROR([unsafe absolute working directory name]);; 826esac 827case $srcdir in 828 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 829 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 830esac 831 832# Do `set' in a subshell so we don't clobber the current shell's 833# arguments. Must try -L first in case configure is actually a 834# symlink; some systems play weird games with the mod time of symlinks 835# (eg FreeBSD returns the mod time of the symlink's containing 836# directory). 837if ( 838 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 839 if test "$[*]" = "X"; then 840 # -L didn't work. 841 set X `ls -t "$srcdir/configure" conftest.file` 842 fi 843 rm -f conftest.file 844 if test "$[*]" != "X $srcdir/configure conftest.file" \ 845 && test "$[*]" != "X conftest.file $srcdir/configure"; then 846 847 # If neither matched, then we have a broken ls. This can happen 848 # if, for instance, CONFIG_SHELL is bash and it inherits a 849 # broken ls alias from the environment. This has actually 850 # happened. Such a system could not be considered "sane". 851 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 852alias in your environment]) 853 fi 854 855 test "$[2]" = conftest.file 856 ) 857then 858 # Ok. 859 : 860else 861 AC_MSG_ERROR([newly created file is older than distributed files! 862Check your system clock]) 863fi 864AC_MSG_RESULT(yes)]) 865 866# Copyright (C) 2009 Free Software Foundation, Inc. 867# 868# This file is free software; the Free Software Foundation 869# gives unlimited permission to copy and/or distribute it, 870# with or without modifications, as long as this notice is preserved. 871 872# serial 1 873 874# AM_SILENT_RULES([DEFAULT]) 875# -------------------------- 876# Enable less verbose build rules; with the default set to DEFAULT 877# (`yes' being less verbose, `no' or empty being verbose). 878AC_DEFUN([AM_SILENT_RULES], 879[AC_ARG_ENABLE([silent-rules], 880[ --enable-silent-rules less verbose build output (undo: `make V=1') 881 --disable-silent-rules verbose build output (undo: `make V=0')]) 882case $enable_silent_rules in 883yes) AM_DEFAULT_VERBOSITY=0;; 884no) AM_DEFAULT_VERBOSITY=1;; 885*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 886esac 887AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 888AM_BACKSLASH='\' 889AC_SUBST([AM_BACKSLASH])dnl 890_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 891]) 892 893# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 894# 895# This file is free software; the Free Software Foundation 896# gives unlimited permission to copy and/or distribute it, 897# with or without modifications, as long as this notice is preserved. 898 899# serial 1 900 901# AM_PROG_INSTALL_STRIP 902# --------------------- 903# One issue with vendor `install' (even GNU) is that you can't 904# specify the program used to strip binaries. This is especially 905# annoying in cross-compiling environments, where the build's strip 906# is unlikely to handle the host's binaries. 907# Fortunately install-sh will honor a STRIPPROG variable, so we 908# always use install-sh in `make install-strip', and initialize 909# STRIPPROG with the value of the STRIP variable (set by the user). 910AC_DEFUN([AM_PROG_INSTALL_STRIP], 911[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 912# Installed binaries are usually stripped using `strip' when the user 913# run `make install-strip'. However `strip' might not be the right 914# tool to use in cross-compilation environments, therefore Automake 915# will honor the `STRIP' environment variable to overrule this program. 916dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 917if test "$cross_compiling" != no; then 918 AC_CHECK_TOOL([STRIP], [strip], :) 919fi 920INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 921AC_SUBST([INSTALL_STRIP_PROGRAM])]) 922 923# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 924# 925# This file is free software; the Free Software Foundation 926# gives unlimited permission to copy and/or distribute it, 927# with or without modifications, as long as this notice is preserved. 928 929# serial 3 930 931# _AM_SUBST_NOTMAKE(VARIABLE) 932# --------------------------- 933# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 934# This macro is traced by Automake. 935AC_DEFUN([_AM_SUBST_NOTMAKE]) 936 937# AM_SUBST_NOTMAKE(VARIABLE) 938# -------------------------- 939# Public sister of _AM_SUBST_NOTMAKE. 940AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 941 942# Check how to create a tarball. -*- Autoconf -*- 943 944# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 945# 946# This file is free software; the Free Software Foundation 947# gives unlimited permission to copy and/or distribute it, 948# with or without modifications, as long as this notice is preserved. 949 950# serial 2 951 952# _AM_PROG_TAR(FORMAT) 953# -------------------- 954# Check how to create a tarball in format FORMAT. 955# FORMAT should be one of `v7', `ustar', or `pax'. 956# 957# Substitute a variable $(am__tar) that is a command 958# writing to stdout a FORMAT-tarball containing the directory 959# $tardir. 960# tardir=directory && $(am__tar) > result.tar 961# 962# Substitute a variable $(am__untar) that extract such 963# a tarball read from stdin. 964# $(am__untar) < result.tar 965AC_DEFUN([_AM_PROG_TAR], 966[# Always define AMTAR for backward compatibility. 967AM_MISSING_PROG([AMTAR], [tar]) 968m4_if([$1], [v7], 969 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 970 [m4_case([$1], [ustar],, [pax],, 971 [m4_fatal([Unknown tar format])]) 972AC_MSG_CHECKING([how to create a $1 tar archive]) 973# Loop over all known methods to create a tar archive until one works. 974_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 975_am_tools=${am_cv_prog_tar_$1-$_am_tools} 976# Do not fold the above two line into one, because Tru64 sh and 977# Solaris sh will not grok spaces in the rhs of `-'. 978for _am_tool in $_am_tools 979do 980 case $_am_tool in 981 gnutar) 982 for _am_tar in tar gnutar gtar; 983 do 984 AM_RUN_LOG([$_am_tar --version]) && break 985 done 986 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 987 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 988 am__untar="$_am_tar -xf -" 989 ;; 990 plaintar) 991 # Must skip GNU tar: if it does not support --format= it doesn't create 992 # ustar tarball either. 993 (tar --version) >/dev/null 2>&1 && continue 994 am__tar='tar chf - "$$tardir"' 995 am__tar_='tar chf - "$tardir"' 996 am__untar='tar xf -' 997 ;; 998 pax) 999 am__tar='pax -L -x $1 -w "$$tardir"' 1000 am__tar_='pax -L -x $1 -w "$tardir"' 1001 am__untar='pax -r' 1002 ;; 1003 cpio) 1004 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1005 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1006 am__untar='cpio -i -H $1 -d' 1007 ;; 1008 none) 1009 am__tar=false 1010 am__tar_=false 1011 am__untar=false 1012 ;; 1013 esac 1014 1015 # If the value was cached, stop now. We just wanted to have am__tar 1016 # and am__untar set. 1017 test -n "${am_cv_prog_tar_$1}" && break 1018 1019 # tar/untar a dummy directory, and stop if the command works 1020 rm -rf conftest.dir 1021 mkdir conftest.dir 1022 echo GrepMe > conftest.dir/file 1023 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1024 rm -rf conftest.dir 1025 if test -s conftest.tar; then 1026 AM_RUN_LOG([$am__untar <conftest.tar]) 1027 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1028 fi 1029done 1030rm -rf conftest.dir 1031 1032AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1033AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1034AC_SUBST([am__tar]) 1035AC_SUBST([am__untar]) 1036]) # _AM_PROG_TAR 1037 1038# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1039# 1040# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1041# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1042# Foundation, Inc. 1043# Written by Gordon Matzigkeit, 1996 1044# 1045# This file is free software; the Free Software Foundation gives 1046# unlimited permission to copy and/or distribute it, with or without 1047# modifications, as long as this notice is preserved. 1048 1049m4_define([_LT_COPYING], [dnl 1050# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1051# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1052# Foundation, Inc. 1053# Written by Gordon Matzigkeit, 1996 1054# 1055# This file is part of GNU Libtool. 1056# 1057# GNU Libtool is free software; you can redistribute it and/or 1058# modify it under the terms of the GNU General Public License as 1059# published by the Free Software Foundation; either version 2 of 1060# the License, or (at your option) any later version. 1061# 1062# As a special exception to the GNU General Public License, 1063# if you distribute this file as part of a program or library that 1064# is built using GNU Libtool, you may include this file under the 1065# same distribution terms that you use for the rest of that program. 1066# 1067# GNU Libtool is distributed in the hope that it will be useful, 1068# but WITHOUT ANY WARRANTY; without even the implied warranty of 1069# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1070# GNU General Public License for more details. 1071# 1072# You should have received a copy of the GNU General Public License 1073# along with GNU Libtool; see the file COPYING. If not, a copy 1074# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1075# obtained by writing to the Free Software Foundation, Inc., 1076# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1077]) 1078 1079# serial 57 LT_INIT 1080 1081 1082# LT_PREREQ(VERSION) 1083# ------------------ 1084# Complain and exit if this libtool version is less that VERSION. 1085m4_defun([LT_PREREQ], 1086[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1087 [m4_default([$3], 1088 [m4_fatal([Libtool version $1 or higher is required], 1089 63)])], 1090 [$2])]) 1091 1092 1093# _LT_CHECK_BUILDDIR 1094# ------------------ 1095# Complain if the absolute build directory name contains unusual characters 1096m4_defun([_LT_CHECK_BUILDDIR], 1097[case `pwd` in 1098 *\ * | *\ *) 1099 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1100esac 1101]) 1102 1103 1104# LT_INIT([OPTIONS]) 1105# ------------------ 1106AC_DEFUN([LT_INIT], 1107[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1108AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1109AC_BEFORE([$0], [LT_LANG])dnl 1110AC_BEFORE([$0], [LT_OUTPUT])dnl 1111AC_BEFORE([$0], [LTDL_INIT])dnl 1112m4_require([_LT_CHECK_BUILDDIR])dnl 1113 1114dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1115m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1116m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1117dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1118dnl unless we require an AC_DEFUNed macro: 1119AC_REQUIRE([LTOPTIONS_VERSION])dnl 1120AC_REQUIRE([LTSUGAR_VERSION])dnl 1121AC_REQUIRE([LTVERSION_VERSION])dnl 1122AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1123m4_require([_LT_PROG_LTMAIN])dnl 1124 1125_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1126 1127dnl Parse OPTIONS 1128_LT_SET_OPTIONS([$0], [$1]) 1129 1130# This can be used to rebuild libtool when needed 1131LIBTOOL_DEPS="$ltmain" 1132 1133# Always use our own libtool. 1134LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1135AC_SUBST(LIBTOOL)dnl 1136 1137_LT_SETUP 1138 1139# Only expand once: 1140m4_define([LT_INIT]) 1141])# LT_INIT 1142 1143# Old names: 1144AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1145AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1146dnl aclocal-1.4 backwards compatibility: 1147dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1148dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1149 1150 1151# _LT_CC_BASENAME(CC) 1152# ------------------- 1153# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1154m4_defun([_LT_CC_BASENAME], 1155[for cc_temp in $1""; do 1156 case $cc_temp in 1157 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1158 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1159 \-*) ;; 1160 *) break;; 1161 esac 1162done 1163cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1164]) 1165 1166 1167# _LT_FILEUTILS_DEFAULTS 1168# ---------------------- 1169# It is okay to use these file commands and assume they have been set 1170# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1171m4_defun([_LT_FILEUTILS_DEFAULTS], 1172[: ${CP="cp -f"} 1173: ${MV="mv -f"} 1174: ${RM="rm -f"} 1175])# _LT_FILEUTILS_DEFAULTS 1176 1177 1178# _LT_SETUP 1179# --------- 1180m4_defun([_LT_SETUP], 1181[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1182AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1183AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1184AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1185 1186_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1187dnl 1188_LT_DECL([], [host_alias], [0], [The host system])dnl 1189_LT_DECL([], [host], [0])dnl 1190_LT_DECL([], [host_os], [0])dnl 1191dnl 1192_LT_DECL([], [build_alias], [0], [The build system])dnl 1193_LT_DECL([], [build], [0])dnl 1194_LT_DECL([], [build_os], [0])dnl 1195dnl 1196AC_REQUIRE([AC_PROG_CC])dnl 1197AC_REQUIRE([LT_PATH_LD])dnl 1198AC_REQUIRE([LT_PATH_NM])dnl 1199dnl 1200AC_REQUIRE([AC_PROG_LN_S])dnl 1201test -z "$LN_S" && LN_S="ln -s" 1202_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1203dnl 1204AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1205_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1206_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1207dnl 1208m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1209m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1210m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1211m4_require([_LT_CMD_RELOAD])dnl 1212m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1213m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1214m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1215m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1216m4_require([_LT_WITH_SYSROOT])dnl 1217 1218_LT_CONFIG_LIBTOOL_INIT([ 1219# See if we are running on zsh, and set the options which allow our 1220# commands through without removal of \ escapes INIT. 1221if test -n "\${ZSH_VERSION+set}" ; then 1222 setopt NO_GLOB_SUBST 1223fi 1224]) 1225if test -n "${ZSH_VERSION+set}" ; then 1226 setopt NO_GLOB_SUBST 1227fi 1228 1229_LT_CHECK_OBJDIR 1230 1231m4_require([_LT_TAG_COMPILER])dnl 1232 1233case $host_os in 1234aix3*) 1235 # AIX sometimes has problems with the GCC collect2 program. For some 1236 # reason, if we set the COLLECT_NAMES environment variable, the problems 1237 # vanish in a puff of smoke. 1238 if test "X${COLLECT_NAMES+set}" != Xset; then 1239 COLLECT_NAMES= 1240 export COLLECT_NAMES 1241 fi 1242 ;; 1243esac 1244 1245# Global variables: 1246ofile=libtool 1247can_build_shared=yes 1248 1249# All known linkers require a `.a' archive for static linking (except MSVC, 1250# which needs '.lib'). 1251libext=a 1252 1253with_gnu_ld="$lt_cv_prog_gnu_ld" 1254 1255old_CC="$CC" 1256old_CFLAGS="$CFLAGS" 1257 1258# Set sane defaults for various variables 1259test -z "$CC" && CC=cc 1260test -z "$LTCC" && LTCC=$CC 1261test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1262test -z "$LD" && LD=ld 1263test -z "$ac_objext" && ac_objext=o 1264 1265_LT_CC_BASENAME([$compiler]) 1266 1267# Only perform the check for file, if the check method requires it 1268test -z "$MAGIC_CMD" && MAGIC_CMD=file 1269case $deplibs_check_method in 1270file_magic*) 1271 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1272 _LT_PATH_MAGIC 1273 fi 1274 ;; 1275esac 1276 1277# Use C for the default configuration in the libtool script 1278LT_SUPPORTED_TAG([CC]) 1279_LT_LANG_C_CONFIG 1280_LT_LANG_DEFAULT_CONFIG 1281_LT_CONFIG_COMMANDS 1282])# _LT_SETUP 1283 1284 1285# _LT_PREPARE_SED_QUOTE_VARS 1286# -------------------------- 1287# Define a few sed substitution that help us do robust quoting. 1288m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1289[# Backslashify metacharacters that are still active within 1290# double-quoted strings. 1291sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1292 1293# Same as above, but do not quote variable references. 1294double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1295 1296# Sed substitution to delay expansion of an escaped shell variable in a 1297# double_quote_subst'ed string. 1298delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1299 1300# Sed substitution to delay expansion of an escaped single quote. 1301delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1302 1303# Sed substitution to avoid accidental globbing in evaled expressions 1304no_glob_subst='s/\*/\\\*/g' 1305]) 1306 1307# _LT_PROG_LTMAIN 1308# --------------- 1309# Note that this code is called both from `configure', and `config.status' 1310# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1311# `config.status' has no value for ac_aux_dir unless we are using Automake, 1312# so we pass a copy along to make sure it has a sensible value anyway. 1313m4_defun([_LT_PROG_LTMAIN], 1314[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1315_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1316ltmain="$ac_aux_dir/ltmain.sh" 1317])# _LT_PROG_LTMAIN 1318 1319 1320 1321# So that we can recreate a full libtool script including additional 1322# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1323# in macros and then make a single call at the end using the `libtool' 1324# label. 1325 1326 1327# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1328# ---------------------------------------- 1329# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1330m4_define([_LT_CONFIG_LIBTOOL_INIT], 1331[m4_ifval([$1], 1332 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1333 [$1 1334])])]) 1335 1336# Initialize. 1337m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1338 1339 1340# _LT_CONFIG_LIBTOOL([COMMANDS]) 1341# ------------------------------ 1342# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1343m4_define([_LT_CONFIG_LIBTOOL], 1344[m4_ifval([$1], 1345 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1346 [$1 1347])])]) 1348 1349# Initialize. 1350m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1351 1352 1353# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1354# ----------------------------------------------------- 1355m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1356[_LT_CONFIG_LIBTOOL([$1]) 1357_LT_CONFIG_LIBTOOL_INIT([$2]) 1358]) 1359 1360 1361# _LT_FORMAT_COMMENT([COMMENT]) 1362# ----------------------------- 1363# Add leading comment marks to the start of each line, and a trailing 1364# full-stop to the whole comment if one is not present already. 1365m4_define([_LT_FORMAT_COMMENT], 1366[m4_ifval([$1], [ 1367m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1368 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1369)]) 1370 1371 1372 1373 1374 1375# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1376# ------------------------------------------------------------------- 1377# CONFIGNAME is the name given to the value in the libtool script. 1378# VARNAME is the (base) name used in the configure script. 1379# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1380# VARNAME. Any other value will be used directly. 1381m4_define([_LT_DECL], 1382[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1383 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1384 [m4_ifval([$1], [$1], [$2])]) 1385 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1386 m4_ifval([$4], 1387 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1388 lt_dict_add_subkey([lt_decl_dict], [$2], 1389 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1390]) 1391 1392 1393# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1394# -------------------------------------------------------- 1395m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1396 1397 1398# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1399# ------------------------------------------------ 1400m4_define([lt_decl_tag_varnames], 1401[_lt_decl_filter([tagged?], [yes], $@)]) 1402 1403 1404# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1405# --------------------------------------------------------- 1406m4_define([_lt_decl_filter], 1407[m4_case([$#], 1408 [0], [m4_fatal([$0: too few arguments: $#])], 1409 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1410 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1411 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1412 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1413]) 1414 1415 1416# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1417# -------------------------------------------------- 1418m4_define([lt_decl_quote_varnames], 1419[_lt_decl_filter([value], [1], $@)]) 1420 1421 1422# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1423# --------------------------------------------------- 1424m4_define([lt_decl_dquote_varnames], 1425[_lt_decl_filter([value], [2], $@)]) 1426 1427 1428# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1429# --------------------------------------------------- 1430m4_define([lt_decl_varnames_tagged], 1431[m4_assert([$# <= 2])dnl 1432_$0(m4_quote(m4_default([$1], [[, ]])), 1433 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1434 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1435m4_define([_lt_decl_varnames_tagged], 1436[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1437 1438 1439# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1440# ------------------------------------------------ 1441m4_define([lt_decl_all_varnames], 1442[_$0(m4_quote(m4_default([$1], [[, ]])), 1443 m4_if([$2], [], 1444 m4_quote(lt_decl_varnames), 1445 m4_quote(m4_shift($@))))[]dnl 1446]) 1447m4_define([_lt_decl_all_varnames], 1448[lt_join($@, lt_decl_varnames_tagged([$1], 1449 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1450]) 1451 1452 1453# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1454# ------------------------------------ 1455# Quote a variable value, and forward it to `config.status' so that its 1456# declaration there will have the same value as in `configure'. VARNAME 1457# must have a single quote delimited value for this to work. 1458m4_define([_LT_CONFIG_STATUS_DECLARE], 1459[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1460 1461 1462# _LT_CONFIG_STATUS_DECLARATIONS 1463# ------------------------------ 1464# We delimit libtool config variables with single quotes, so when 1465# we write them to config.status, we have to be sure to quote all 1466# embedded single quotes properly. In configure, this macro expands 1467# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1468# 1469# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1470m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1471[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1472 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1473 1474 1475# _LT_LIBTOOL_TAGS 1476# ---------------- 1477# Output comment and list of tags supported by the script 1478m4_defun([_LT_LIBTOOL_TAGS], 1479[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1480available_tags="_LT_TAGS"dnl 1481]) 1482 1483 1484# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1485# ----------------------------------- 1486# Extract the dictionary values for VARNAME (optionally with TAG) and 1487# expand to a commented shell variable setting: 1488# 1489# # Some comment about what VAR is for. 1490# visible_name=$lt_internal_name 1491m4_define([_LT_LIBTOOL_DECLARE], 1492[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1493 [description])))[]dnl 1494m4_pushdef([_libtool_name], 1495 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1496m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1497 [0], [_libtool_name=[$]$1], 1498 [1], [_libtool_name=$lt_[]$1], 1499 [2], [_libtool_name=$lt_[]$1], 1500 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1501m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1502]) 1503 1504 1505# _LT_LIBTOOL_CONFIG_VARS 1506# ----------------------- 1507# Produce commented declarations of non-tagged libtool config variables 1508# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1509# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1510# section) are produced by _LT_LIBTOOL_TAG_VARS. 1511m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1512[m4_foreach([_lt_var], 1513 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1514 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1515 1516 1517# _LT_LIBTOOL_TAG_VARS(TAG) 1518# ------------------------- 1519m4_define([_LT_LIBTOOL_TAG_VARS], 1520[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1521 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1522 1523 1524# _LT_TAGVAR(VARNAME, [TAGNAME]) 1525# ------------------------------ 1526m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1527 1528 1529# _LT_CONFIG_COMMANDS 1530# ------------------- 1531# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1532# variables for single and double quote escaping we saved from calls 1533# to _LT_DECL, we can put quote escaped variables declarations 1534# into `config.status', and then the shell code to quote escape them in 1535# for loops in `config.status'. Finally, any additional code accumulated 1536# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1537m4_defun([_LT_CONFIG_COMMANDS], 1538[AC_PROVIDE_IFELSE([LT_OUTPUT], 1539 dnl If the libtool generation code has been placed in $CONFIG_LT, 1540 dnl instead of duplicating it all over again into config.status, 1541 dnl then we will have config.status run $CONFIG_LT later, so it 1542 dnl needs to know what name is stored there: 1543 [AC_CONFIG_COMMANDS([libtool], 1544 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1545 dnl If the libtool generation code is destined for config.status, 1546 dnl expand the accumulated commands and init code now: 1547 [AC_CONFIG_COMMANDS([libtool], 1548 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1549])#_LT_CONFIG_COMMANDS 1550 1551 1552# Initialize. 1553m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1554[ 1555 1556# The HP-UX ksh and POSIX shell print the target directory to stdout 1557# if CDPATH is set. 1558(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1559 1560sed_quote_subst='$sed_quote_subst' 1561double_quote_subst='$double_quote_subst' 1562delay_variable_subst='$delay_variable_subst' 1563_LT_CONFIG_STATUS_DECLARATIONS 1564LTCC='$LTCC' 1565LTCFLAGS='$LTCFLAGS' 1566compiler='$compiler_DEFAULT' 1567 1568# A function that is used when there is no print builtin or printf. 1569func_fallback_echo () 1570{ 1571 eval 'cat <<_LTECHO_EOF 1572\$[]1 1573_LTECHO_EOF' 1574} 1575 1576# Quote evaled strings. 1577for var in lt_decl_all_varnames([[ \ 1578]], lt_decl_quote_varnames); do 1579 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1580 *[[\\\\\\\`\\"\\\$]]*) 1581 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1582 ;; 1583 *) 1584 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1585 ;; 1586 esac 1587done 1588 1589# Double-quote double-evaled strings. 1590for var in lt_decl_all_varnames([[ \ 1591]], lt_decl_dquote_varnames); do 1592 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1593 *[[\\\\\\\`\\"\\\$]]*) 1594 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1595 ;; 1596 *) 1597 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1598 ;; 1599 esac 1600done 1601 1602_LT_OUTPUT_LIBTOOL_INIT 1603]) 1604 1605# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1606# ------------------------------------ 1607# Generate a child script FILE with all initialization necessary to 1608# reuse the environment learned by the parent script, and make the 1609# file executable. If COMMENT is supplied, it is inserted after the 1610# `#!' sequence but before initialization text begins. After this 1611# macro, additional text can be appended to FILE to form the body of 1612# the child script. The macro ends with non-zero status if the 1613# file could not be fully written (such as if the disk is full). 1614m4_ifdef([AS_INIT_GENERATED], 1615[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1616[m4_defun([_LT_GENERATED_FILE_INIT], 1617[m4_require([AS_PREPARE])]dnl 1618[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1619[lt_write_fail=0 1620cat >$1 <<_ASEOF || lt_write_fail=1 1621#! $SHELL 1622# Generated by $as_me. 1623$2 1624SHELL=\${CONFIG_SHELL-$SHELL} 1625export SHELL 1626_ASEOF 1627cat >>$1 <<\_ASEOF || lt_write_fail=1 1628AS_SHELL_SANITIZE 1629_AS_PREPARE 1630exec AS_MESSAGE_FD>&1 1631_ASEOF 1632test $lt_write_fail = 0 && chmod +x $1[]dnl 1633m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1634 1635# LT_OUTPUT 1636# --------- 1637# This macro allows early generation of the libtool script (before 1638# AC_OUTPUT is called), incase it is used in configure for compilation 1639# tests. 1640AC_DEFUN([LT_OUTPUT], 1641[: ${CONFIG_LT=./config.lt} 1642AC_MSG_NOTICE([creating $CONFIG_LT]) 1643_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1644[# Run this file to recreate a libtool stub with the current configuration.]) 1645 1646cat >>"$CONFIG_LT" <<\_LTEOF 1647lt_cl_silent=false 1648exec AS_MESSAGE_LOG_FD>>config.log 1649{ 1650 echo 1651 AS_BOX([Running $as_me.]) 1652} >&AS_MESSAGE_LOG_FD 1653 1654lt_cl_help="\ 1655\`$as_me' creates a local libtool stub from the current configuration, 1656for use in further configure time tests before the real libtool is 1657generated. 1658 1659Usage: $[0] [[OPTIONS]] 1660 1661 -h, --help print this help, then exit 1662 -V, --version print version number, then exit 1663 -q, --quiet do not print progress messages 1664 -d, --debug don't remove temporary files 1665 1666Report bugs to <bug-libtool@gnu.org>." 1667 1668lt_cl_version="\ 1669m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1670m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1671configured by $[0], generated by m4_PACKAGE_STRING. 1672 1673Copyright (C) 2011 Free Software Foundation, Inc. 1674This config.lt script is free software; the Free Software Foundation 1675gives unlimited permision to copy, distribute and modify it." 1676 1677while test $[#] != 0 1678do 1679 case $[1] in 1680 --version | --v* | -V ) 1681 echo "$lt_cl_version"; exit 0 ;; 1682 --help | --h* | -h ) 1683 echo "$lt_cl_help"; exit 0 ;; 1684 --debug | --d* | -d ) 1685 debug=: ;; 1686 --quiet | --q* | --silent | --s* | -q ) 1687 lt_cl_silent=: ;; 1688 1689 -*) AC_MSG_ERROR([unrecognized option: $[1] 1690Try \`$[0] --help' for more information.]) ;; 1691 1692 *) AC_MSG_ERROR([unrecognized argument: $[1] 1693Try \`$[0] --help' for more information.]) ;; 1694 esac 1695 shift 1696done 1697 1698if $lt_cl_silent; then 1699 exec AS_MESSAGE_FD>/dev/null 1700fi 1701_LTEOF 1702 1703cat >>"$CONFIG_LT" <<_LTEOF 1704_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1705_LTEOF 1706 1707cat >>"$CONFIG_LT" <<\_LTEOF 1708AC_MSG_NOTICE([creating $ofile]) 1709_LT_OUTPUT_LIBTOOL_COMMANDS 1710AS_EXIT(0) 1711_LTEOF 1712chmod +x "$CONFIG_LT" 1713 1714# configure is writing to config.log, but config.lt does its own redirection, 1715# appending to config.log, which fails on DOS, as config.log is still kept 1716# open by configure. Here we exec the FD to /dev/null, effectively closing 1717# config.log, so it can be properly (re)opened and appended to by config.lt. 1718lt_cl_success=: 1719test "$silent" = yes && 1720 lt_config_lt_args="$lt_config_lt_args --quiet" 1721exec AS_MESSAGE_LOG_FD>/dev/null 1722$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1723exec AS_MESSAGE_LOG_FD>>config.log 1724$lt_cl_success || AS_EXIT(1) 1725])# LT_OUTPUT 1726 1727 1728# _LT_CONFIG(TAG) 1729# --------------- 1730# If TAG is the built-in tag, create an initial libtool script with a 1731# default configuration from the untagged config vars. Otherwise add code 1732# to config.status for appending the configuration named by TAG from the 1733# matching tagged config vars. 1734m4_defun([_LT_CONFIG], 1735[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1736_LT_CONFIG_SAVE_COMMANDS([ 1737 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1738 m4_if(_LT_TAG, [C], [ 1739 # See if we are running on zsh, and set the options which allow our 1740 # commands through without removal of \ escapes. 1741 if test -n "${ZSH_VERSION+set}" ; then 1742 setopt NO_GLOB_SUBST 1743 fi 1744 1745 cfgfile="${ofile}T" 1746 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1747 $RM "$cfgfile" 1748 1749 cat <<_LT_EOF >> "$cfgfile" 1750#! $SHELL 1751 1752# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1753# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1754# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1755# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1756# 1757_LT_COPYING 1758_LT_LIBTOOL_TAGS 1759 1760# ### BEGIN LIBTOOL CONFIG 1761_LT_LIBTOOL_CONFIG_VARS 1762_LT_LIBTOOL_TAG_VARS 1763# ### END LIBTOOL CONFIG 1764 1765_LT_EOF 1766 1767 case $host_os in 1768 aix3*) 1769 cat <<\_LT_EOF >> "$cfgfile" 1770# AIX sometimes has problems with the GCC collect2 program. For some 1771# reason, if we set the COLLECT_NAMES environment variable, the problems 1772# vanish in a puff of smoke. 1773if test "X${COLLECT_NAMES+set}" != Xset; then 1774 COLLECT_NAMES= 1775 export COLLECT_NAMES 1776fi 1777_LT_EOF 1778 ;; 1779 esac 1780 1781 _LT_PROG_LTMAIN 1782 1783 # We use sed instead of cat because bash on DJGPP gets confused if 1784 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1785 # text mode, it properly converts lines to CR/LF. This bash problem 1786 # is reportedly fixed, but why not run on old versions too? 1787 sed '$q' "$ltmain" >> "$cfgfile" \ 1788 || (rm -f "$cfgfile"; exit 1) 1789 1790 _LT_PROG_REPLACE_SHELLFNS 1791 1792 mv -f "$cfgfile" "$ofile" || 1793 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1794 chmod +x "$ofile" 1795], 1796[cat <<_LT_EOF >> "$ofile" 1797 1798dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1799dnl in a comment (ie after a #). 1800# ### BEGIN LIBTOOL TAG CONFIG: $1 1801_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1802# ### END LIBTOOL TAG CONFIG: $1 1803_LT_EOF 1804])dnl /m4_if 1805], 1806[m4_if([$1], [], [ 1807 PACKAGE='$PACKAGE' 1808 VERSION='$VERSION' 1809 TIMESTAMP='$TIMESTAMP' 1810 RM='$RM' 1811 ofile='$ofile'], []) 1812])dnl /_LT_CONFIG_SAVE_COMMANDS 1813])# _LT_CONFIG 1814 1815 1816# LT_SUPPORTED_TAG(TAG) 1817# --------------------- 1818# Trace this macro to discover what tags are supported by the libtool 1819# --tag option, using: 1820# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1821AC_DEFUN([LT_SUPPORTED_TAG], []) 1822 1823 1824# C support is built-in for now 1825m4_define([_LT_LANG_C_enabled], []) 1826m4_define([_LT_TAGS], []) 1827 1828 1829# LT_LANG(LANG) 1830# ------------- 1831# Enable libtool support for the given language if not already enabled. 1832AC_DEFUN([LT_LANG], 1833[AC_BEFORE([$0], [LT_OUTPUT])dnl 1834m4_case([$1], 1835 [C], [_LT_LANG(C)], 1836 [C++], [_LT_LANG(CXX)], 1837 [Go], [_LT_LANG(GO)], 1838 [Java], [_LT_LANG(GCJ)], 1839 [Fortran 77], [_LT_LANG(F77)], 1840 [Fortran], [_LT_LANG(FC)], 1841 [Windows Resource], [_LT_LANG(RC)], 1842 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1843 [_LT_LANG($1)], 1844 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1845])# LT_LANG 1846 1847 1848# _LT_LANG(LANGNAME) 1849# ------------------ 1850m4_defun([_LT_LANG], 1851[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1852 [LT_SUPPORTED_TAG([$1])dnl 1853 m4_append([_LT_TAGS], [$1 ])dnl 1854 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1855 _LT_LANG_$1_CONFIG($1)])dnl 1856])# _LT_LANG 1857 1858 1859m4_ifndef([AC_PROG_GO], [ 1860# NOTE: This macro has been submitted for inclusion into # 1861# GNU Autoconf as AC_PROG_GO. When it is available in # 1862# a released version of Autoconf we should remove this # 1863# macro and use it instead. # 1864m4_defun([AC_PROG_GO], 1865[AC_LANG_PUSH(Go)dnl 1866AC_ARG_VAR([GOC], [Go compiler command])dnl 1867AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1868_AC_ARG_VAR_LDFLAGS()dnl 1869AC_CHECK_TOOL(GOC, gccgo) 1870if test -z "$GOC"; then 1871 if test -n "$ac_tool_prefix"; then 1872 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1873 fi 1874fi 1875if test -z "$GOC"; then 1876 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1877fi 1878])#m4_defun 1879])#m4_ifndef 1880 1881 1882# _LT_LANG_DEFAULT_CONFIG 1883# ----------------------- 1884m4_defun([_LT_LANG_DEFAULT_CONFIG], 1885[AC_PROVIDE_IFELSE([AC_PROG_CXX], 1886 [LT_LANG(CXX)], 1887 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1888 1889AC_PROVIDE_IFELSE([AC_PROG_F77], 1890 [LT_LANG(F77)], 1891 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1892 1893AC_PROVIDE_IFELSE([AC_PROG_FC], 1894 [LT_LANG(FC)], 1895 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1896 1897dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 1898dnl pulling things in needlessly. 1899AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1900 [LT_LANG(GCJ)], 1901 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1902 [LT_LANG(GCJ)], 1903 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 1904 [LT_LANG(GCJ)], 1905 [m4_ifdef([AC_PROG_GCJ], 1906 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 1907 m4_ifdef([A][M_PROG_GCJ], 1908 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 1909 m4_ifdef([LT_PROG_GCJ], 1910 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1911 1912AC_PROVIDE_IFELSE([AC_PROG_GO], 1913 [LT_LANG(GO)], 1914 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1915 1916AC_PROVIDE_IFELSE([LT_PROG_RC], 1917 [LT_LANG(RC)], 1918 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 1919])# _LT_LANG_DEFAULT_CONFIG 1920 1921# Obsolete macros: 1922AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 1923AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 1924AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 1925AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 1926AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 1927dnl aclocal-1.4 backwards compatibility: 1928dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 1929dnl AC_DEFUN([AC_LIBTOOL_F77], []) 1930dnl AC_DEFUN([AC_LIBTOOL_FC], []) 1931dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 1932dnl AC_DEFUN([AC_LIBTOOL_RC], []) 1933 1934 1935# _LT_TAG_COMPILER 1936# ---------------- 1937m4_defun([_LT_TAG_COMPILER], 1938[AC_REQUIRE([AC_PROG_CC])dnl 1939 1940_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 1941_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 1942_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 1943_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1944 1945# If no C compiler was specified, use CC. 1946LTCC=${LTCC-"$CC"} 1947 1948# If no C compiler flags were specified, use CFLAGS. 1949LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1950 1951# Allow CC to be a program name with arguments. 1952compiler=$CC 1953])# _LT_TAG_COMPILER 1954 1955 1956# _LT_COMPILER_BOILERPLATE 1957# ------------------------ 1958# Check for compiler boilerplate output or warnings with 1959# the simple compiler test code. 1960m4_defun([_LT_COMPILER_BOILERPLATE], 1961[m4_require([_LT_DECL_SED])dnl 1962ac_outfile=conftest.$ac_objext 1963echo "$lt_simple_compile_test_code" >conftest.$ac_ext 1964eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1965_lt_compiler_boilerplate=`cat conftest.err` 1966$RM conftest* 1967])# _LT_COMPILER_BOILERPLATE 1968 1969 1970# _LT_LINKER_BOILERPLATE 1971# ---------------------- 1972# Check for linker boilerplate output or warnings with 1973# the simple link test code. 1974m4_defun([_LT_LINKER_BOILERPLATE], 1975[m4_require([_LT_DECL_SED])dnl 1976ac_outfile=conftest.$ac_objext 1977echo "$lt_simple_link_test_code" >conftest.$ac_ext 1978eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1979_lt_linker_boilerplate=`cat conftest.err` 1980$RM -r conftest* 1981])# _LT_LINKER_BOILERPLATE 1982 1983# _LT_REQUIRED_DARWIN_CHECKS 1984# ------------------------- 1985m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1986 case $host_os in 1987 rhapsody* | darwin*) 1988 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 1989 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 1990 AC_CHECK_TOOL([LIPO], [lipo], [:]) 1991 AC_CHECK_TOOL([OTOOL], [otool], [:]) 1992 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1993 _LT_DECL([], [DSYMUTIL], [1], 1994 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1995 _LT_DECL([], [NMEDIT], [1], 1996 [Tool to change global to local symbols on Mac OS X]) 1997 _LT_DECL([], [LIPO], [1], 1998 [Tool to manipulate fat objects and archives on Mac OS X]) 1999 _LT_DECL([], [OTOOL], [1], 2000 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2001 _LT_DECL([], [OTOOL64], [1], 2002 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2003 2004 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2005 [lt_cv_apple_cc_single_mod=no 2006 if test -z "${LT_MULTI_MODULE}"; then 2007 # By default we will add the -single_module flag. You can override 2008 # by either setting the environment variable LT_MULTI_MODULE 2009 # non-empty at configure time, or by adding -multi_module to the 2010 # link flags. 2011 rm -rf libconftest.dylib* 2012 echo "int foo(void){return 1;}" > conftest.c 2013 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2014-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2015 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2016 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2017 _lt_result=$? 2018 # If there is a non-empty error log, and "single_module" 2019 # appears in it, assume the flag caused a linker warning 2020 if test -s conftest.err && $GREP single_module conftest.err; then 2021 cat conftest.err >&AS_MESSAGE_LOG_FD 2022 # Otherwise, if the output was created with a 0 exit code from 2023 # the compiler, it worked. 2024 elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2025 lt_cv_apple_cc_single_mod=yes 2026 else 2027 cat conftest.err >&AS_MESSAGE_LOG_FD 2028 fi 2029 rm -rf libconftest.dylib* 2030 rm -f conftest.* 2031 fi]) 2032 2033 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2034 [lt_cv_ld_exported_symbols_list], 2035 [lt_cv_ld_exported_symbols_list=no 2036 save_LDFLAGS=$LDFLAGS 2037 echo "_main" > conftest.sym 2038 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2039 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2040 [lt_cv_ld_exported_symbols_list=yes], 2041 [lt_cv_ld_exported_symbols_list=no]) 2042 LDFLAGS="$save_LDFLAGS" 2043 ]) 2044 2045 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2046 [lt_cv_ld_force_load=no 2047 cat > conftest.c << _LT_EOF 2048int forced_loaded() { return 2;} 2049_LT_EOF 2050 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2051 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2052 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2053 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2054 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2055 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2056 cat > conftest.c << _LT_EOF 2057int main() { return 0;} 2058_LT_EOF 2059 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2060 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2061 _lt_result=$? 2062 if test -s conftest.err && $GREP force_load conftest.err; then 2063 cat conftest.err >&AS_MESSAGE_LOG_FD 2064 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2065 lt_cv_ld_force_load=yes 2066 else 2067 cat conftest.err >&AS_MESSAGE_LOG_FD 2068 fi 2069 rm -f conftest.err libconftest.a conftest conftest.c 2070 rm -rf conftest.dSYM 2071 ]) 2072 case $host_os in 2073 rhapsody* | darwin1.[[012]]) 2074 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2075 darwin1.*) 2076 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2077 darwin*) # darwin 5.x on 2078 # if running on 10.5 or later, the deployment target defaults 2079 # to the OS version, if on x86, and 10.4, the deployment 2080 # target defaults to 10.4. Don't you love it? 2081 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2082 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2083 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2084 10.[[012]]*) 2085 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2086 10.*) 2087 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2088 esac 2089 ;; 2090 esac 2091 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2092 _lt_dar_single_mod='$single_module' 2093 fi 2094 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2095 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2096 else 2097 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2098 fi 2099 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2100 _lt_dsymutil='~$DSYMUTIL $lib || :' 2101 else 2102 _lt_dsymutil= 2103 fi 2104 ;; 2105 esac 2106]) 2107 2108 2109# _LT_DARWIN_LINKER_FEATURES([TAG]) 2110# --------------------------------- 2111# Checks for linker and compiler features on darwin 2112m4_defun([_LT_DARWIN_LINKER_FEATURES], 2113[ 2114 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2115 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2116 _LT_TAGVAR(hardcode_direct, $1)=no 2117 _LT_TAGVAR(hardcode_automatic, $1)=yes 2118 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2119 if test "$lt_cv_ld_force_load" = "yes"; then 2120 _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\"`' 2121 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2122 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2123 else 2124 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2125 fi 2126 _LT_TAGVAR(link_all_deplibs, $1)=yes 2127 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2128 case $cc_basename in 2129 ifort*) _lt_dar_can_shared=yes ;; 2130 *) _lt_dar_can_shared=$GCC ;; 2131 esac 2132 if test "$_lt_dar_can_shared" = "yes"; then 2133 output_verbose_link_cmd=func_echo_all 2134 _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}" 2135 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2136 _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}" 2137 _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}" 2138 m4_if([$1], [CXX], 2139[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2140 _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}" 2141 _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}" 2142 fi 2143],[]) 2144 else 2145 _LT_TAGVAR(ld_shlibs, $1)=no 2146 fi 2147]) 2148 2149# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2150# ---------------------------------- 2151# Links a minimal program and checks the executable 2152# for the system default hardcoded library path. In most cases, 2153# this is /usr/lib:/lib, but when the MPI compilers are used 2154# the location of the communication and MPI libs are included too. 2155# If we don't find anything, use the default library path according 2156# to the aix ld manual. 2157# Store the results from the different compilers for each TAGNAME. 2158# Allow to override them for all tags through lt_cv_aix_libpath. 2159m4_defun([_LT_SYS_MODULE_PATH_AIX], 2160[m4_require([_LT_DECL_SED])dnl 2161if test "${lt_cv_aix_libpath+set}" = set; then 2162 aix_libpath=$lt_cv_aix_libpath 2163else 2164 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2165 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2166 lt_aix_libpath_sed='[ 2167 /Import File Strings/,/^$/ { 2168 /^0/ { 2169 s/^0 *\([^ ]*\) *$/\1/ 2170 p 2171 } 2172 }]' 2173 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2174 # Check for a 64-bit object if we didn't find anything. 2175 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2176 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2177 fi],[]) 2178 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2179 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2180 fi 2181 ]) 2182 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2183fi 2184])# _LT_SYS_MODULE_PATH_AIX 2185 2186 2187# _LT_SHELL_INIT(ARG) 2188# ------------------- 2189m4_define([_LT_SHELL_INIT], 2190[m4_divert_text([M4SH-INIT], [$1 2191])])# _LT_SHELL_INIT 2192 2193 2194 2195# _LT_PROG_ECHO_BACKSLASH 2196# ----------------------- 2197# Find how we can fake an echo command that does not interpret backslash. 2198# In particular, with Autoconf 2.60 or later we add some code to the start 2199# of the generated configure script which will find a shell with a builtin 2200# printf (which we can use as an echo command). 2201m4_defun([_LT_PROG_ECHO_BACKSLASH], 2202[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2203ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2204ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2205 2206AC_MSG_CHECKING([how to print strings]) 2207# Test print first, because it will be a builtin if present. 2208if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2209 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2210 ECHO='print -r --' 2211elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2212 ECHO='printf %s\n' 2213else 2214 # Use this function as a fallback that always works. 2215 func_fallback_echo () 2216 { 2217 eval 'cat <<_LTECHO_EOF 2218$[]1 2219_LTECHO_EOF' 2220 } 2221 ECHO='func_fallback_echo' 2222fi 2223 2224# func_echo_all arg... 2225# Invoke $ECHO with all args, space-separated. 2226func_echo_all () 2227{ 2228 $ECHO "$*" 2229} 2230 2231case "$ECHO" in 2232 printf*) AC_MSG_RESULT([printf]) ;; 2233 print*) AC_MSG_RESULT([print -r]) ;; 2234 *) AC_MSG_RESULT([cat]) ;; 2235esac 2236 2237m4_ifdef([_AS_DETECT_SUGGESTED], 2238[_AS_DETECT_SUGGESTED([ 2239 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2240 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2241 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2242 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2243 PATH=/empty FPATH=/empty; export PATH FPATH 2244 test "X`printf %s $ECHO`" = "X$ECHO" \ 2245 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2246 2247_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2248_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2249])# _LT_PROG_ECHO_BACKSLASH 2250 2251 2252# _LT_WITH_SYSROOT 2253# ---------------- 2254AC_DEFUN([_LT_WITH_SYSROOT], 2255[AC_MSG_CHECKING([for sysroot]) 2256AC_ARG_WITH([sysroot], 2257[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2258 (or the compiler's sysroot if not specified).], 2259[], [with_sysroot=no]) 2260 2261dnl lt_sysroot will always be passed unquoted. We quote it here 2262dnl in case the user passed a directory name. 2263lt_sysroot= 2264case ${with_sysroot} in #( 2265 yes) 2266 if test "$GCC" = yes; then 2267 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2268 fi 2269 ;; #( 2270 /*) 2271 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2272 ;; #( 2273 no|'') 2274 ;; #( 2275 *) 2276 AC_MSG_RESULT([${with_sysroot}]) 2277 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2278 ;; 2279esac 2280 2281 AC_MSG_RESULT([${lt_sysroot:-no}]) 2282_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2283[dependent libraries, and in which our libraries should be installed.])]) 2284 2285# _LT_ENABLE_LOCK 2286# --------------- 2287m4_defun([_LT_ENABLE_LOCK], 2288[AC_ARG_ENABLE([libtool-lock], 2289 [AS_HELP_STRING([--disable-libtool-lock], 2290 [avoid locking (might break parallel builds)])]) 2291test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2292 2293# Some flags need to be propagated to the compiler or linker for good 2294# libtool support. 2295case $host in 2296ia64-*-hpux*) 2297 # Find out which ABI we are using. 2298 echo 'int i;' > conftest.$ac_ext 2299 if AC_TRY_EVAL(ac_compile); then 2300 case `/usr/bin/file conftest.$ac_objext` in 2301 *ELF-32*) 2302 HPUX_IA64_MODE="32" 2303 ;; 2304 *ELF-64*) 2305 HPUX_IA64_MODE="64" 2306 ;; 2307 esac 2308 fi 2309 rm -rf conftest* 2310 ;; 2311*-*-irix6*) 2312 # Find out which ABI we are using. 2313 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2314 if AC_TRY_EVAL(ac_compile); then 2315 if test "$lt_cv_prog_gnu_ld" = yes; then 2316 case `/usr/bin/file conftest.$ac_objext` in 2317 *32-bit*) 2318 LD="${LD-ld} -melf32bsmip" 2319 ;; 2320 *N32*) 2321 LD="${LD-ld} -melf32bmipn32" 2322 ;; 2323 *64-bit*) 2324 LD="${LD-ld} -melf64bmip" 2325 ;; 2326 esac 2327 else 2328 case `/usr/bin/file conftest.$ac_objext` in 2329 *32-bit*) 2330 LD="${LD-ld} -32" 2331 ;; 2332 *N32*) 2333 LD="${LD-ld} -n32" 2334 ;; 2335 *64-bit*) 2336 LD="${LD-ld} -64" 2337 ;; 2338 esac 2339 fi 2340 fi 2341 rm -rf conftest* 2342 ;; 2343 2344x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2345s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2346 # Find out which ABI we are using. 2347 echo 'int i;' > conftest.$ac_ext 2348 if AC_TRY_EVAL(ac_compile); then 2349 case `/usr/bin/file conftest.o` in 2350 *32-bit*) 2351 case $host in 2352 x86_64-*kfreebsd*-gnu) 2353 LD="${LD-ld} -m elf_i386_fbsd" 2354 ;; 2355 x86_64-*linux*) 2356 LD="${LD-ld} -m elf_i386" 2357 ;; 2358 ppc64-*linux*|powerpc64-*linux*) 2359 LD="${LD-ld} -m elf32ppclinux" 2360 ;; 2361 s390x-*linux*) 2362 LD="${LD-ld} -m elf_s390" 2363 ;; 2364 sparc64-*linux*) 2365 LD="${LD-ld} -m elf32_sparc" 2366 ;; 2367 esac 2368 ;; 2369 *64-bit*) 2370 case $host in 2371 x86_64-*kfreebsd*-gnu) 2372 LD="${LD-ld} -m elf_x86_64_fbsd" 2373 ;; 2374 x86_64-*linux*) 2375 LD="${LD-ld} -m elf_x86_64" 2376 ;; 2377 ppc*-*linux*|powerpc*-*linux*) 2378 LD="${LD-ld} -m elf64ppc" 2379 ;; 2380 s390*-*linux*|s390*-*tpf*) 2381 LD="${LD-ld} -m elf64_s390" 2382 ;; 2383 sparc*-*linux*) 2384 LD="${LD-ld} -m elf64_sparc" 2385 ;; 2386 esac 2387 ;; 2388 esac 2389 fi 2390 rm -rf conftest* 2391 ;; 2392 2393*-*-sco3.2v5*) 2394 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2395 SAVE_CFLAGS="$CFLAGS" 2396 CFLAGS="$CFLAGS -belf" 2397 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2398 [AC_LANG_PUSH(C) 2399 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2400 AC_LANG_POP]) 2401 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2402 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2403 CFLAGS="$SAVE_CFLAGS" 2404 fi 2405 ;; 2406*-*solaris*) 2407 # Find out which ABI we are using. 2408 echo 'int i;' > conftest.$ac_ext 2409 if AC_TRY_EVAL(ac_compile); then 2410 case `/usr/bin/file conftest.o` in 2411 *64-bit*) 2412 case $lt_cv_prog_gnu_ld in 2413 yes*) 2414 case $host in 2415 i?86-*-solaris*) 2416 LD="${LD-ld} -m elf_x86_64" 2417 ;; 2418 sparc*-*-solaris*) 2419 LD="${LD-ld} -m elf64_sparc" 2420 ;; 2421 esac 2422 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2423 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2424 LD="${LD-ld}_sol2" 2425 fi 2426 ;; 2427 *) 2428 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2429 LD="${LD-ld} -64" 2430 fi 2431 ;; 2432 esac 2433 ;; 2434 esac 2435 fi 2436 rm -rf conftest* 2437 ;; 2438esac 2439 2440need_locks="$enable_libtool_lock" 2441])# _LT_ENABLE_LOCK 2442 2443 2444# _LT_PROG_AR 2445# ----------- 2446m4_defun([_LT_PROG_AR], 2447[AC_CHECK_TOOLS(AR, [ar], false) 2448: ${AR=ar} 2449: ${AR_FLAGS=cru} 2450_LT_DECL([], [AR], [1], [The archiver]) 2451_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2452 2453AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2454 [lt_cv_ar_at_file=no 2455 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2456 [echo conftest.$ac_objext > conftest.lst 2457 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2458 AC_TRY_EVAL([lt_ar_try]) 2459 if test "$ac_status" -eq 0; then 2460 # Ensure the archiver fails upon bogus file names. 2461 rm -f conftest.$ac_objext libconftest.a 2462 AC_TRY_EVAL([lt_ar_try]) 2463 if test "$ac_status" -ne 0; then 2464 lt_cv_ar_at_file=@ 2465 fi 2466 fi 2467 rm -f conftest.* libconftest.a 2468 ]) 2469 ]) 2470 2471if test "x$lt_cv_ar_at_file" = xno; then 2472 archiver_list_spec= 2473else 2474 archiver_list_spec=$lt_cv_ar_at_file 2475fi 2476_LT_DECL([], [archiver_list_spec], [1], 2477 [How to feed a file listing to the archiver]) 2478])# _LT_PROG_AR 2479 2480 2481# _LT_CMD_OLD_ARCHIVE 2482# ------------------- 2483m4_defun([_LT_CMD_OLD_ARCHIVE], 2484[_LT_PROG_AR 2485 2486AC_CHECK_TOOL(STRIP, strip, :) 2487test -z "$STRIP" && STRIP=: 2488_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2489 2490AC_CHECK_TOOL(RANLIB, ranlib, :) 2491test -z "$RANLIB" && RANLIB=: 2492_LT_DECL([], [RANLIB], [1], 2493 [Commands used to install an old-style archive]) 2494 2495# Determine commands to create old-style static archives. 2496old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2497old_postinstall_cmds='chmod 644 $oldlib' 2498old_postuninstall_cmds= 2499 2500if test -n "$RANLIB"; then 2501 case $host_os in 2502 openbsd*) 2503 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2504 ;; 2505 *) 2506 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2507 ;; 2508 esac 2509 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2510fi 2511 2512case $host_os in 2513 darwin*) 2514 lock_old_archive_extraction=yes ;; 2515 *) 2516 lock_old_archive_extraction=no ;; 2517esac 2518_LT_DECL([], [old_postinstall_cmds], [2]) 2519_LT_DECL([], [old_postuninstall_cmds], [2]) 2520_LT_TAGDECL([], [old_archive_cmds], [2], 2521 [Commands used to build an old-style archive]) 2522_LT_DECL([], [lock_old_archive_extraction], [0], 2523 [Whether to use a lock for old archive extraction]) 2524])# _LT_CMD_OLD_ARCHIVE 2525 2526 2527# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2528# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2529# ---------------------------------------------------------------- 2530# Check whether the given compiler option works 2531AC_DEFUN([_LT_COMPILER_OPTION], 2532[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2533m4_require([_LT_DECL_SED])dnl 2534AC_CACHE_CHECK([$1], [$2], 2535 [$2=no 2536 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2537 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2538 lt_compiler_flag="$3" 2539 # Insert the option either (1) after the last *FLAGS variable, or 2540 # (2) before a word containing "conftest.", or (3) at the end. 2541 # Note that $ac_compile itself does not contain backslashes and begins 2542 # with a dollar sign (not a hyphen), so the echo should work correctly. 2543 # The option is referenced via a variable to avoid confusing sed. 2544 lt_compile=`echo "$ac_compile" | $SED \ 2545 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2546 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2547 -e 's:$: $lt_compiler_flag:'` 2548 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2549 (eval "$lt_compile" 2>conftest.err) 2550 ac_status=$? 2551 cat conftest.err >&AS_MESSAGE_LOG_FD 2552 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2553 if (exit $ac_status) && test -s "$ac_outfile"; then 2554 # The compiler can only warn and ignore the option if not recognized 2555 # So say no if there are warnings other than the usual output. 2556 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2557 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2558 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2559 $2=yes 2560 fi 2561 fi 2562 $RM conftest* 2563]) 2564 2565if test x"[$]$2" = xyes; then 2566 m4_if([$5], , :, [$5]) 2567else 2568 m4_if([$6], , :, [$6]) 2569fi 2570])# _LT_COMPILER_OPTION 2571 2572# Old name: 2573AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2574dnl aclocal-1.4 backwards compatibility: 2575dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2576 2577 2578# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2579# [ACTION-SUCCESS], [ACTION-FAILURE]) 2580# ---------------------------------------------------- 2581# Check whether the given linker option works 2582AC_DEFUN([_LT_LINKER_OPTION], 2583[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2584m4_require([_LT_DECL_SED])dnl 2585AC_CACHE_CHECK([$1], [$2], 2586 [$2=no 2587 save_LDFLAGS="$LDFLAGS" 2588 LDFLAGS="$LDFLAGS $3" 2589 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2590 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2591 # The linker can only warn and ignore the option if not recognized 2592 # So say no if there are warnings 2593 if test -s conftest.err; then 2594 # Append any errors to the config.log. 2595 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2596 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2597 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2598 if diff conftest.exp conftest.er2 >/dev/null; then 2599 $2=yes 2600 fi 2601 else 2602 $2=yes 2603 fi 2604 fi 2605 $RM -r conftest* 2606 LDFLAGS="$save_LDFLAGS" 2607]) 2608 2609if test x"[$]$2" = xyes; then 2610 m4_if([$4], , :, [$4]) 2611else 2612 m4_if([$5], , :, [$5]) 2613fi 2614])# _LT_LINKER_OPTION 2615 2616# Old name: 2617AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2618dnl aclocal-1.4 backwards compatibility: 2619dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2620 2621 2622# LT_CMD_MAX_LEN 2623#--------------- 2624AC_DEFUN([LT_CMD_MAX_LEN], 2625[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2626# find the maximum length of command line arguments 2627AC_MSG_CHECKING([the maximum length of command line arguments]) 2628AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2629 i=0 2630 teststring="ABCD" 2631 2632 case $build_os in 2633 msdosdjgpp*) 2634 # On DJGPP, this test can blow up pretty badly due to problems in libc 2635 # (any single argument exceeding 2000 bytes causes a buffer overrun 2636 # during glob expansion). Even if it were fixed, the result of this 2637 # check would be larger than it should be. 2638 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2639 ;; 2640 2641 gnu*) 2642 # Under GNU Hurd, this test is not required because there is 2643 # no limit to the length of command line arguments. 2644 # Libtool will interpret -1 as no limit whatsoever 2645 lt_cv_sys_max_cmd_len=-1; 2646 ;; 2647 2648 cygwin* | mingw* | cegcc*) 2649 # On Win9x/ME, this test blows up -- it succeeds, but takes 2650 # about 5 minutes as the teststring grows exponentially. 2651 # Worse, since 9x/ME are not pre-emptively multitasking, 2652 # you end up with a "frozen" computer, even though with patience 2653 # the test eventually succeeds (with a max line length of 256k). 2654 # Instead, let's just punt: use the minimum linelength reported by 2655 # all of the supported platforms: 8192 (on NT/2K/XP). 2656 lt_cv_sys_max_cmd_len=8192; 2657 ;; 2658 2659 mint*) 2660 # On MiNT this can take a long time and run out of memory. 2661 lt_cv_sys_max_cmd_len=8192; 2662 ;; 2663 2664 amigaos*) 2665 # On AmigaOS with pdksh, this test takes hours, literally. 2666 # So we just punt and use a minimum line length of 8192. 2667 lt_cv_sys_max_cmd_len=8192; 2668 ;; 2669 2670 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2671 # This has been around since 386BSD, at least. Likely further. 2672 if test -x /sbin/sysctl; then 2673 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2674 elif test -x /usr/sbin/sysctl; then 2675 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2676 else 2677 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2678 fi 2679 # And add a safety zone 2680 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2681 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2682 ;; 2683 2684 interix*) 2685 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2686 lt_cv_sys_max_cmd_len=196608 2687 ;; 2688 2689 os2*) 2690 # The test takes a long time on OS/2. 2691 lt_cv_sys_max_cmd_len=8192 2692 ;; 2693 2694 osf*) 2695 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2696 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2697 # nice to cause kernel panics so lets avoid the loop below. 2698 # First set a reasonable default. 2699 lt_cv_sys_max_cmd_len=16384 2700 # 2701 if test -x /sbin/sysconfig; then 2702 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2703 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2704 esac 2705 fi 2706 ;; 2707 sco3.2v5*) 2708 lt_cv_sys_max_cmd_len=102400 2709 ;; 2710 sysv5* | sco5v6* | sysv4.2uw2*) 2711 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2712 if test -n "$kargmax"; then 2713 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2714 else 2715 lt_cv_sys_max_cmd_len=32768 2716 fi 2717 ;; 2718 *) 2719 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2720 if test -n "$lt_cv_sys_max_cmd_len"; then 2721 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2722 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2723 else 2724 # Make teststring a little bigger before we do anything with it. 2725 # a 1K string should be a reasonable start. 2726 for i in 1 2 3 4 5 6 7 8 ; do 2727 teststring=$teststring$teststring 2728 done 2729 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2730 # If test is not a shell built-in, we'll probably end up computing a 2731 # maximum length that is only half of the actual maximum length, but 2732 # we can't tell. 2733 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2734 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2735 test $i != 17 # 1/2 MB should be enough 2736 do 2737 i=`expr $i + 1` 2738 teststring=$teststring$teststring 2739 done 2740 # Only check the string length outside the loop. 2741 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2742 teststring= 2743 # Add a significant safety factor because C++ compilers can tack on 2744 # massive amounts of additional arguments before passing them to the 2745 # linker. It appears as though 1/2 is a usable value. 2746 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2747 fi 2748 ;; 2749 esac 2750]) 2751if test -n $lt_cv_sys_max_cmd_len ; then 2752 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2753else 2754 AC_MSG_RESULT(none) 2755fi 2756max_cmd_len=$lt_cv_sys_max_cmd_len 2757_LT_DECL([], [max_cmd_len], [0], 2758 [What is the maximum length of a command?]) 2759])# LT_CMD_MAX_LEN 2760 2761# Old name: 2762AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2763dnl aclocal-1.4 backwards compatibility: 2764dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2765 2766 2767# _LT_HEADER_DLFCN 2768# ---------------- 2769m4_defun([_LT_HEADER_DLFCN], 2770[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2771])# _LT_HEADER_DLFCN 2772 2773 2774# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2775# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2776# ---------------------------------------------------------------- 2777m4_defun([_LT_TRY_DLOPEN_SELF], 2778[m4_require([_LT_HEADER_DLFCN])dnl 2779if test "$cross_compiling" = yes; then : 2780 [$4] 2781else 2782 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2783 lt_status=$lt_dlunknown 2784 cat > conftest.$ac_ext <<_LT_EOF 2785[#line $LINENO "configure" 2786#include "confdefs.h" 2787 2788#if HAVE_DLFCN_H 2789#include <dlfcn.h> 2790#endif 2791 2792#include <stdio.h> 2793 2794#ifdef RTLD_GLOBAL 2795# define LT_DLGLOBAL RTLD_GLOBAL 2796#else 2797# ifdef DL_GLOBAL 2798# define LT_DLGLOBAL DL_GLOBAL 2799# else 2800# define LT_DLGLOBAL 0 2801# endif 2802#endif 2803 2804/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2805 find out it does not work in some platform. */ 2806#ifndef LT_DLLAZY_OR_NOW 2807# ifdef RTLD_LAZY 2808# define LT_DLLAZY_OR_NOW RTLD_LAZY 2809# else 2810# ifdef DL_LAZY 2811# define LT_DLLAZY_OR_NOW DL_LAZY 2812# else 2813# ifdef RTLD_NOW 2814# define LT_DLLAZY_OR_NOW RTLD_NOW 2815# else 2816# ifdef DL_NOW 2817# define LT_DLLAZY_OR_NOW DL_NOW 2818# else 2819# define LT_DLLAZY_OR_NOW 0 2820# endif 2821# endif 2822# endif 2823# endif 2824#endif 2825 2826/* When -fvisbility=hidden is used, assume the code has been annotated 2827 correspondingly for the symbols needed. */ 2828#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2829int fnord () __attribute__((visibility("default"))); 2830#endif 2831 2832int fnord () { return 42; } 2833int main () 2834{ 2835 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2836 int status = $lt_dlunknown; 2837 2838 if (self) 2839 { 2840 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2841 else 2842 { 2843 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2844 else puts (dlerror ()); 2845 } 2846 /* dlclose (self); */ 2847 } 2848 else 2849 puts (dlerror ()); 2850 2851 return status; 2852}] 2853_LT_EOF 2854 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2855 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2856 lt_status=$? 2857 case x$lt_status in 2858 x$lt_dlno_uscore) $1 ;; 2859 x$lt_dlneed_uscore) $2 ;; 2860 x$lt_dlunknown|x*) $3 ;; 2861 esac 2862 else : 2863 # compilation failed 2864 $3 2865 fi 2866fi 2867rm -fr conftest* 2868])# _LT_TRY_DLOPEN_SELF 2869 2870 2871# LT_SYS_DLOPEN_SELF 2872# ------------------ 2873AC_DEFUN([LT_SYS_DLOPEN_SELF], 2874[m4_require([_LT_HEADER_DLFCN])dnl 2875if test "x$enable_dlopen" != xyes; then 2876 enable_dlopen=unknown 2877 enable_dlopen_self=unknown 2878 enable_dlopen_self_static=unknown 2879else 2880 lt_cv_dlopen=no 2881 lt_cv_dlopen_libs= 2882 2883 case $host_os in 2884 beos*) 2885 lt_cv_dlopen="load_add_on" 2886 lt_cv_dlopen_libs= 2887 lt_cv_dlopen_self=yes 2888 ;; 2889 2890 mingw* | pw32* | cegcc*) 2891 lt_cv_dlopen="LoadLibrary" 2892 lt_cv_dlopen_libs= 2893 ;; 2894 2895 cygwin*) 2896 lt_cv_dlopen="dlopen" 2897 lt_cv_dlopen_libs= 2898 ;; 2899 2900 darwin*) 2901 # if libdl is installed we need to link against it 2902 AC_CHECK_LIB([dl], [dlopen], 2903 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2904 lt_cv_dlopen="dyld" 2905 lt_cv_dlopen_libs= 2906 lt_cv_dlopen_self=yes 2907 ]) 2908 ;; 2909 2910 *) 2911 AC_CHECK_FUNC([shl_load], 2912 [lt_cv_dlopen="shl_load"], 2913 [AC_CHECK_LIB([dld], [shl_load], 2914 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 2915 [AC_CHECK_FUNC([dlopen], 2916 [lt_cv_dlopen="dlopen"], 2917 [AC_CHECK_LIB([dl], [dlopen], 2918 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2919 [AC_CHECK_LIB([svld], [dlopen], 2920 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2921 [AC_CHECK_LIB([dld], [dld_link], 2922 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 2923 ]) 2924 ]) 2925 ]) 2926 ]) 2927 ]) 2928 ;; 2929 esac 2930 2931 if test "x$lt_cv_dlopen" != xno; then 2932 enable_dlopen=yes 2933 else 2934 enable_dlopen=no 2935 fi 2936 2937 case $lt_cv_dlopen in 2938 dlopen) 2939 save_CPPFLAGS="$CPPFLAGS" 2940 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2941 2942 save_LDFLAGS="$LDFLAGS" 2943 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2944 2945 save_LIBS="$LIBS" 2946 LIBS="$lt_cv_dlopen_libs $LIBS" 2947 2948 AC_CACHE_CHECK([whether a program can dlopen itself], 2949 lt_cv_dlopen_self, [dnl 2950 _LT_TRY_DLOPEN_SELF( 2951 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2952 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2953 ]) 2954 2955 if test "x$lt_cv_dlopen_self" = xyes; then 2956 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2957 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2958 lt_cv_dlopen_self_static, [dnl 2959 _LT_TRY_DLOPEN_SELF( 2960 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2961 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2962 ]) 2963 fi 2964 2965 CPPFLAGS="$save_CPPFLAGS" 2966 LDFLAGS="$save_LDFLAGS" 2967 LIBS="$save_LIBS" 2968 ;; 2969 esac 2970 2971 case $lt_cv_dlopen_self in 2972 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2973 *) enable_dlopen_self=unknown ;; 2974 esac 2975 2976 case $lt_cv_dlopen_self_static in 2977 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2978 *) enable_dlopen_self_static=unknown ;; 2979 esac 2980fi 2981_LT_DECL([dlopen_support], [enable_dlopen], [0], 2982 [Whether dlopen is supported]) 2983_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2984 [Whether dlopen of programs is supported]) 2985_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2986 [Whether dlopen of statically linked programs is supported]) 2987])# LT_SYS_DLOPEN_SELF 2988 2989# Old name: 2990AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2991dnl aclocal-1.4 backwards compatibility: 2992dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2993 2994 2995# _LT_COMPILER_C_O([TAGNAME]) 2996# --------------------------- 2997# Check to see if options -c and -o are simultaneously supported by compiler. 2998# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2999m4_defun([_LT_COMPILER_C_O], 3000[m4_require([_LT_DECL_SED])dnl 3001m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3002m4_require([_LT_TAG_COMPILER])dnl 3003AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3004 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3005 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3006 $RM -r conftest 2>/dev/null 3007 mkdir conftest 3008 cd conftest 3009 mkdir out 3010 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3011 3012 lt_compiler_flag="-o out/conftest2.$ac_objext" 3013 # Insert the option either (1) after the last *FLAGS variable, or 3014 # (2) before a word containing "conftest.", or (3) at the end. 3015 # Note that $ac_compile itself does not contain backslashes and begins 3016 # with a dollar sign (not a hyphen), so the echo should work correctly. 3017 lt_compile=`echo "$ac_compile" | $SED \ 3018 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3019 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3020 -e 's:$: $lt_compiler_flag:'` 3021 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3022 (eval "$lt_compile" 2>out/conftest.err) 3023 ac_status=$? 3024 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3025 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3026 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3027 then 3028 # The compiler can only warn and ignore the option if not recognized 3029 # So say no if there are warnings 3030 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3031 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3032 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3033 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3034 fi 3035 fi 3036 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3037 $RM conftest* 3038 # SGI C++ compiler will create directory out/ii_files/ for 3039 # template instantiation 3040 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3041 $RM out/* && rmdir out 3042 cd .. 3043 $RM -r conftest 3044 $RM conftest* 3045]) 3046_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3047 [Does compiler simultaneously support -c and -o options?]) 3048])# _LT_COMPILER_C_O 3049 3050 3051# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3052# ---------------------------------- 3053# Check to see if we can do hard links to lock some files if needed 3054m4_defun([_LT_COMPILER_FILE_LOCKS], 3055[m4_require([_LT_ENABLE_LOCK])dnl 3056m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3057_LT_COMPILER_C_O([$1]) 3058 3059hard_links="nottested" 3060if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3061 # do not overwrite the value of need_locks provided by the user 3062 AC_MSG_CHECKING([if we can lock with hard links]) 3063 hard_links=yes 3064 $RM conftest* 3065 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3066 touch conftest.a 3067 ln conftest.a conftest.b 2>&5 || hard_links=no 3068 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3069 AC_MSG_RESULT([$hard_links]) 3070 if test "$hard_links" = no; then 3071 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3072 need_locks=warn 3073 fi 3074else 3075 need_locks=no 3076fi 3077_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3078])# _LT_COMPILER_FILE_LOCKS 3079 3080 3081# _LT_CHECK_OBJDIR 3082# ---------------- 3083m4_defun([_LT_CHECK_OBJDIR], 3084[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3085[rm -f .libs 2>/dev/null 3086mkdir .libs 2>/dev/null 3087if test -d .libs; then 3088 lt_cv_objdir=.libs 3089else 3090 # MS-DOS does not allow filenames that begin with a dot. 3091 lt_cv_objdir=_libs 3092fi 3093rmdir .libs 2>/dev/null]) 3094objdir=$lt_cv_objdir 3095_LT_DECL([], [objdir], [0], 3096 [The name of the directory that contains temporary libtool files])dnl 3097m4_pattern_allow([LT_OBJDIR])dnl 3098AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3099 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3100])# _LT_CHECK_OBJDIR 3101 3102 3103# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3104# -------------------------------------- 3105# Check hardcoding attributes. 3106m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3107[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3108_LT_TAGVAR(hardcode_action, $1)= 3109if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3110 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3111 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3112 3113 # We can hardcode non-existent directories. 3114 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3115 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3116 # have to relink, otherwise we might link with an installed library 3117 # when we should be linking with a yet-to-be-installed one 3118 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3119 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3120 # Linking always hardcodes the temporary library directory. 3121 _LT_TAGVAR(hardcode_action, $1)=relink 3122 else 3123 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3124 _LT_TAGVAR(hardcode_action, $1)=immediate 3125 fi 3126else 3127 # We cannot hardcode anything, or else we can only hardcode existing 3128 # directories. 3129 _LT_TAGVAR(hardcode_action, $1)=unsupported 3130fi 3131AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3132 3133if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3134 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3135 # Fast installation is not supported 3136 enable_fast_install=no 3137elif test "$shlibpath_overrides_runpath" = yes || 3138 test "$enable_shared" = no; then 3139 # Fast installation is not necessary 3140 enable_fast_install=needless 3141fi 3142_LT_TAGDECL([], [hardcode_action], [0], 3143 [How to hardcode a shared library path into an executable]) 3144])# _LT_LINKER_HARDCODE_LIBPATH 3145 3146 3147# _LT_CMD_STRIPLIB 3148# ---------------- 3149m4_defun([_LT_CMD_STRIPLIB], 3150[m4_require([_LT_DECL_EGREP]) 3151striplib= 3152old_striplib= 3153AC_MSG_CHECKING([whether stripping libraries is possible]) 3154if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3155 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3156 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3157 AC_MSG_RESULT([yes]) 3158else 3159# FIXME - insert some real tests, host_os isn't really good enough 3160 case $host_os in 3161 darwin*) 3162 if test -n "$STRIP" ; then 3163 striplib="$STRIP -x" 3164 old_striplib="$STRIP -S" 3165 AC_MSG_RESULT([yes]) 3166 else 3167 AC_MSG_RESULT([no]) 3168 fi 3169 ;; 3170 *) 3171 AC_MSG_RESULT([no]) 3172 ;; 3173 esac 3174fi 3175_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3176_LT_DECL([], [striplib], [1]) 3177])# _LT_CMD_STRIPLIB 3178 3179 3180# _LT_SYS_DYNAMIC_LINKER([TAG]) 3181# ----------------------------- 3182# PORTME Fill in your ld.so characteristics 3183m4_defun([_LT_SYS_DYNAMIC_LINKER], 3184[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3185m4_require([_LT_DECL_EGREP])dnl 3186m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3187m4_require([_LT_DECL_OBJDUMP])dnl 3188m4_require([_LT_DECL_SED])dnl 3189m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3190AC_MSG_CHECKING([dynamic linker characteristics]) 3191m4_if([$1], 3192 [], [ 3193if test "$GCC" = yes; then 3194 case $host_os in 3195 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3196 *) lt_awk_arg="/^libraries:/" ;; 3197 esac 3198 case $host_os in 3199 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3200 *) lt_sed_strip_eq="s,=/,/,g" ;; 3201 esac 3202 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3203 case $lt_search_path_spec in 3204 *\;*) 3205 # if the path contains ";" then we assume it to be the separator 3206 # otherwise default to the standard path separator (i.e. ":") - it is 3207 # assumed that no part of a normal pathname contains ";" but that should 3208 # okay in the real world where ";" in dirpaths is itself problematic. 3209 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3210 ;; 3211 *) 3212 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3213 ;; 3214 esac 3215 # Ok, now we have the path, separated by spaces, we can step through it 3216 # and add multilib dir if necessary. 3217 lt_tmp_lt_search_path_spec= 3218 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3219 for lt_sys_path in $lt_search_path_spec; do 3220 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3221 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3222 else 3223 test -d "$lt_sys_path" && \ 3224 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3225 fi 3226 done 3227 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3228BEGIN {RS=" "; FS="/|\n";} { 3229 lt_foo=""; 3230 lt_count=0; 3231 for (lt_i = NF; lt_i > 0; lt_i--) { 3232 if ($lt_i != "" && $lt_i != ".") { 3233 if ($lt_i == "..") { 3234 lt_count++; 3235 } else { 3236 if (lt_count == 0) { 3237 lt_foo="/" $lt_i lt_foo; 3238 } else { 3239 lt_count--; 3240 } 3241 } 3242 } 3243 } 3244 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3245 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3246}'` 3247 # AWK program above erroneously prepends '/' to C:/dos/paths 3248 # for these hosts. 3249 case $host_os in 3250 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3251 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3252 esac 3253 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3254else 3255 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3256fi]) 3257library_names_spec= 3258libname_spec='lib$name' 3259soname_spec= 3260shrext_cmds=".so" 3261postinstall_cmds= 3262postuninstall_cmds= 3263finish_cmds= 3264finish_eval= 3265shlibpath_var= 3266shlibpath_overrides_runpath=unknown 3267version_type=none 3268dynamic_linker="$host_os ld.so" 3269sys_lib_dlsearch_path_spec="/lib /usr/lib" 3270need_lib_prefix=unknown 3271hardcode_into_libs=no 3272 3273# when you set need_version to no, make sure it does not cause -set_version 3274# flags to be left without arguments 3275need_version=unknown 3276 3277case $host_os in 3278aix3*) 3279 version_type=linux # correct to gnu/linux during the next big refactor 3280 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3281 shlibpath_var=LIBPATH 3282 3283 # AIX 3 has no versioning support, so we append a major version to the name. 3284 soname_spec='${libname}${release}${shared_ext}$major' 3285 ;; 3286 3287aix[[4-9]]*) 3288 version_type=linux # correct to gnu/linux during the next big refactor 3289 need_lib_prefix=no 3290 need_version=no 3291 hardcode_into_libs=yes 3292 if test "$host_cpu" = ia64; then 3293 # AIX 5 supports IA64 3294 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3295 shlibpath_var=LD_LIBRARY_PATH 3296 else 3297 # With GCC up to 2.95.x, collect2 would create an import file 3298 # for dependence libraries. The import file would start with 3299 # the line `#! .'. This would cause the generated library to 3300 # depend on `.', always an invalid library. This was fixed in 3301 # development snapshots of GCC prior to 3.0. 3302 case $host_os in 3303 aix4 | aix4.[[01]] | aix4.[[01]].*) 3304 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3305 echo ' yes ' 3306 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3307 : 3308 else 3309 can_build_shared=no 3310 fi 3311 ;; 3312 esac 3313 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3314 # soname into executable. Probably we can add versioning support to 3315 # collect2, so additional links can be useful in future. 3316 if test "$aix_use_runtimelinking" = yes; then 3317 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3318 # instead of lib<name>.a to let people know that these are not 3319 # typical AIX shared libraries. 3320 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3321 else 3322 # We preserve .a as extension for shared libraries through AIX4.2 3323 # and later when we are not doing run time linking. 3324 library_names_spec='${libname}${release}.a $libname.a' 3325 soname_spec='${libname}${release}${shared_ext}$major' 3326 fi 3327 shlibpath_var=LIBPATH 3328 fi 3329 ;; 3330 3331amigaos*) 3332 case $host_cpu in 3333 powerpc) 3334 # Since July 2007 AmigaOS4 officially supports .so libraries. 3335 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3336 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3337 ;; 3338 m68k) 3339 library_names_spec='$libname.ixlibrary $libname.a' 3340 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3341 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' 3342 ;; 3343 esac 3344 ;; 3345 3346beos*) 3347 library_names_spec='${libname}${shared_ext}' 3348 dynamic_linker="$host_os ld.so" 3349 shlibpath_var=LIBRARY_PATH 3350 ;; 3351 3352bsdi[[45]]*) 3353 version_type=linux # correct to gnu/linux during the next big refactor 3354 need_version=no 3355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3356 soname_spec='${libname}${release}${shared_ext}$major' 3357 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3358 shlibpath_var=LD_LIBRARY_PATH 3359 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3360 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3361 # the default ld.so.conf also contains /usr/contrib/lib and 3362 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3363 # libtool to hard-code these into programs 3364 ;; 3365 3366cygwin* | mingw* | pw32* | cegcc*) 3367 version_type=windows 3368 shrext_cmds=".dll" 3369 need_version=no 3370 need_lib_prefix=no 3371 3372 case $GCC,$cc_basename in 3373 yes,*) 3374 # gcc 3375 library_names_spec='$libname.dll.a' 3376 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3377 postinstall_cmds='base_file=`basename \${file}`~ 3378 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3379 dldir=$destdir/`dirname \$dlpath`~ 3380 test -d \$dldir || mkdir -p \$dldir~ 3381 $install_prog $dir/$dlname \$dldir/$dlname~ 3382 chmod a+x \$dldir/$dlname~ 3383 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3384 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3385 fi' 3386 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3387 dlpath=$dir/\$dldll~ 3388 $RM \$dlpath' 3389 shlibpath_overrides_runpath=yes 3390 3391 case $host_os in 3392 cygwin*) 3393 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3394 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3395m4_if([$1], [],[ 3396 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3397 ;; 3398 mingw* | cegcc*) 3399 # MinGW DLLs use traditional 'lib' prefix 3400 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3401 ;; 3402 pw32*) 3403 # pw32 DLLs use 'pw' prefix rather than 'lib' 3404 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3405 ;; 3406 esac 3407 dynamic_linker='Win32 ld.exe' 3408 ;; 3409 3410 *,cl*) 3411 # Native MSVC 3412 libname_spec='$name' 3413 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3414 library_names_spec='${libname}.dll.lib' 3415 3416 case $build_os in 3417 mingw*) 3418 sys_lib_search_path_spec= 3419 lt_save_ifs=$IFS 3420 IFS=';' 3421 for lt_path in $LIB 3422 do 3423 IFS=$lt_save_ifs 3424 # Let DOS variable expansion print the short 8.3 style file name. 3425 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3426 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3427 done 3428 IFS=$lt_save_ifs 3429 # Convert to MSYS style. 3430 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3431 ;; 3432 cygwin*) 3433 # Convert to unix form, then to dos form, then back to unix form 3434 # but this time dos style (no spaces!) so that the unix form looks 3435 # like /cygdrive/c/PROGRA~1:/cygdr... 3436 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3437 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3438 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3439 ;; 3440 *) 3441 sys_lib_search_path_spec="$LIB" 3442 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3443 # It is most probably a Windows format PATH. 3444 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3445 else 3446 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3447 fi 3448 # FIXME: find the short name or the path components, as spaces are 3449 # common. (e.g. "Program Files" -> "PROGRA~1") 3450 ;; 3451 esac 3452 3453 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3454 postinstall_cmds='base_file=`basename \${file}`~ 3455 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3456 dldir=$destdir/`dirname \$dlpath`~ 3457 test -d \$dldir || mkdir -p \$dldir~ 3458 $install_prog $dir/$dlname \$dldir/$dlname' 3459 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3460 dlpath=$dir/\$dldll~ 3461 $RM \$dlpath' 3462 shlibpath_overrides_runpath=yes 3463 dynamic_linker='Win32 link.exe' 3464 ;; 3465 3466 *) 3467 # Assume MSVC wrapper 3468 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3469 dynamic_linker='Win32 ld.exe' 3470 ;; 3471 esac 3472 # FIXME: first we should search . and the directory the executable is in 3473 shlibpath_var=PATH 3474 ;; 3475 3476darwin* | rhapsody*) 3477 dynamic_linker="$host_os dyld" 3478 version_type=darwin 3479 need_lib_prefix=no 3480 need_version=no 3481 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3482 soname_spec='${libname}${release}${major}$shared_ext' 3483 shlibpath_overrides_runpath=yes 3484 shlibpath_var=DYLD_LIBRARY_PATH 3485 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3486m4_if([$1], [],[ 3487 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3488 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3489 ;; 3490 3491dgux*) 3492 version_type=linux # correct to gnu/linux during the next big refactor 3493 need_lib_prefix=no 3494 need_version=no 3495 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3496 soname_spec='${libname}${release}${shared_ext}$major' 3497 shlibpath_var=LD_LIBRARY_PATH 3498 ;; 3499 3500freebsd* | dragonfly*) 3501 # DragonFly does not have aout. When/if they implement a new 3502 # versioning mechanism, adjust this. 3503 if test -x /usr/bin/objformat; then 3504 objformat=`/usr/bin/objformat` 3505 else 3506 case $host_os in 3507 freebsd[[23]].*) objformat=aout ;; 3508 *) objformat=elf ;; 3509 esac 3510 fi 3511 version_type=freebsd-$objformat 3512 case $version_type in 3513 freebsd-elf*) 3514 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3515 need_version=no 3516 need_lib_prefix=no 3517 ;; 3518 freebsd-*) 3519 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3520 need_version=yes 3521 ;; 3522 esac 3523 shlibpath_var=LD_LIBRARY_PATH 3524 case $host_os in 3525 freebsd2.*) 3526 shlibpath_overrides_runpath=yes 3527 ;; 3528 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3529 shlibpath_overrides_runpath=yes 3530 hardcode_into_libs=yes 3531 ;; 3532 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3533 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3534 shlibpath_overrides_runpath=no 3535 hardcode_into_libs=yes 3536 ;; 3537 *) # from 4.6 on, and DragonFly 3538 shlibpath_overrides_runpath=yes 3539 hardcode_into_libs=yes 3540 ;; 3541 esac 3542 ;; 3543 3544gnu*) 3545 version_type=linux # correct to gnu/linux during the next big refactor 3546 need_lib_prefix=no 3547 need_version=no 3548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3549 soname_spec='${libname}${release}${shared_ext}$major' 3550 shlibpath_var=LD_LIBRARY_PATH 3551 shlibpath_overrides_runpath=no 3552 hardcode_into_libs=yes 3553 ;; 3554 3555haiku*) 3556 version_type=linux # correct to gnu/linux during the next big refactor 3557 need_lib_prefix=no 3558 need_version=no 3559 dynamic_linker="$host_os runtime_loader" 3560 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3561 soname_spec='${libname}${release}${shared_ext}$major' 3562 shlibpath_var=LIBRARY_PATH 3563 shlibpath_overrides_runpath=yes 3564 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3565 hardcode_into_libs=yes 3566 ;; 3567 3568hpux9* | hpux10* | hpux11*) 3569 # Give a soname corresponding to the major version so that dld.sl refuses to 3570 # link against other versions. 3571 version_type=sunos 3572 need_lib_prefix=no 3573 need_version=no 3574 case $host_cpu in 3575 ia64*) 3576 shrext_cmds='.so' 3577 hardcode_into_libs=yes 3578 dynamic_linker="$host_os dld.so" 3579 shlibpath_var=LD_LIBRARY_PATH 3580 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3582 soname_spec='${libname}${release}${shared_ext}$major' 3583 if test "X$HPUX_IA64_MODE" = X32; then 3584 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3585 else 3586 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3587 fi 3588 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3589 ;; 3590 hppa*64*) 3591 shrext_cmds='.sl' 3592 hardcode_into_libs=yes 3593 dynamic_linker="$host_os dld.sl" 3594 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3595 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3596 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3597 soname_spec='${libname}${release}${shared_ext}$major' 3598 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3599 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3600 ;; 3601 *) 3602 shrext_cmds='.sl' 3603 dynamic_linker="$host_os dld.sl" 3604 shlibpath_var=SHLIB_PATH 3605 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3606 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3607 soname_spec='${libname}${release}${shared_ext}$major' 3608 ;; 3609 esac 3610 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3611 postinstall_cmds='chmod 555 $lib' 3612 # or fails outright, so override atomically: 3613 install_override_mode=555 3614 ;; 3615 3616interix[[3-9]]*) 3617 version_type=linux # correct to gnu/linux during the next big refactor 3618 need_lib_prefix=no 3619 need_version=no 3620 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3621 soname_spec='${libname}${release}${shared_ext}$major' 3622 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3623 shlibpath_var=LD_LIBRARY_PATH 3624 shlibpath_overrides_runpath=no 3625 hardcode_into_libs=yes 3626 ;; 3627 3628irix5* | irix6* | nonstopux*) 3629 case $host_os in 3630 nonstopux*) version_type=nonstopux ;; 3631 *) 3632 if test "$lt_cv_prog_gnu_ld" = yes; then 3633 version_type=linux # correct to gnu/linux during the next big refactor 3634 else 3635 version_type=irix 3636 fi ;; 3637 esac 3638 need_lib_prefix=no 3639 need_version=no 3640 soname_spec='${libname}${release}${shared_ext}$major' 3641 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3642 case $host_os in 3643 irix5* | nonstopux*) 3644 libsuff= shlibsuff= 3645 ;; 3646 *) 3647 case $LD in # libtool.m4 will add one of these switches to LD 3648 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3649 libsuff= shlibsuff= libmagic=32-bit;; 3650 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3651 libsuff=32 shlibsuff=N32 libmagic=N32;; 3652 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3653 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3654 *) libsuff= shlibsuff= libmagic=never-match;; 3655 esac 3656 ;; 3657 esac 3658 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3659 shlibpath_overrides_runpath=no 3660 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3661 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3662 hardcode_into_libs=yes 3663 ;; 3664 3665# No shared lib support for Linux oldld, aout, or coff. 3666linux*oldld* | linux*aout* | linux*coff*) 3667 dynamic_linker=no 3668 ;; 3669 3670# This must be glibc/ELF. 3671linux* | k*bsd*-gnu | kopensolaris*-gnu) 3672 version_type=linux # correct to gnu/linux during the next big refactor 3673 need_lib_prefix=no 3674 need_version=no 3675 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3676 soname_spec='${libname}${release}${shared_ext}$major' 3677 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3678 shlibpath_var=LD_LIBRARY_PATH 3679 shlibpath_overrides_runpath=no 3680 3681 # Some binutils ld are patched to set DT_RUNPATH 3682 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3683 [lt_cv_shlibpath_overrides_runpath=no 3684 save_LDFLAGS=$LDFLAGS 3685 save_libdir=$libdir 3686 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3687 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3688 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3689 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3690 [lt_cv_shlibpath_overrides_runpath=yes])]) 3691 LDFLAGS=$save_LDFLAGS 3692 libdir=$save_libdir 3693 ]) 3694 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3695 3696 # This implies no fast_install, which is unacceptable. 3697 # Some rework will be needed to allow for fast_install 3698 # before this can be enabled. 3699 hardcode_into_libs=yes 3700 3701 # Append ld.so.conf contents to the search path 3702 if test -f /etc/ld.so.conf; then 3703 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' ' '` 3704 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3705 fi 3706 3707 # We used to test for /lib/ld.so.1 and disable shared libraries on 3708 # powerpc, because MkLinux only supported shared libraries with the 3709 # GNU dynamic linker. Since this was broken with cross compilers, 3710 # most powerpc-linux boxes support dynamic linking these days and 3711 # people can always --disable-shared, the test was removed, and we 3712 # assume the GNU/Linux dynamic linker is in use. 3713 dynamic_linker='GNU/Linux ld.so' 3714 ;; 3715 3716netbsd*) 3717 version_type=sunos 3718 need_lib_prefix=no 3719 need_version=no 3720 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3721 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3722 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3723 dynamic_linker='NetBSD (a.out) ld.so' 3724 else 3725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3726 soname_spec='${libname}${release}${shared_ext}$major' 3727 dynamic_linker='NetBSD ld.elf_so' 3728 fi 3729 shlibpath_var=LD_LIBRARY_PATH 3730 shlibpath_overrides_runpath=yes 3731 hardcode_into_libs=yes 3732 ;; 3733 3734newsos6) 3735 version_type=linux # correct to gnu/linux during the next big refactor 3736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3737 shlibpath_var=LD_LIBRARY_PATH 3738 shlibpath_overrides_runpath=yes 3739 ;; 3740 3741*nto* | *qnx*) 3742 version_type=qnx 3743 need_lib_prefix=no 3744 need_version=no 3745 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3746 soname_spec='${libname}${release}${shared_ext}$major' 3747 shlibpath_var=LD_LIBRARY_PATH 3748 shlibpath_overrides_runpath=no 3749 hardcode_into_libs=yes 3750 dynamic_linker='ldqnx.so' 3751 ;; 3752 3753openbsd*) 3754 version_type=sunos 3755 sys_lib_dlsearch_path_spec="/usr/lib" 3756 need_lib_prefix=no 3757 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3758 case $host_os in 3759 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3760 *) need_version=no ;; 3761 esac 3762 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3763 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3764 shlibpath_var=LD_LIBRARY_PATH 3765 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3766 case $host_os in 3767 openbsd2.[[89]] | openbsd2.[[89]].*) 3768 shlibpath_overrides_runpath=no 3769 ;; 3770 *) 3771 shlibpath_overrides_runpath=yes 3772 ;; 3773 esac 3774 else 3775 shlibpath_overrides_runpath=yes 3776 fi 3777 ;; 3778 3779os2*) 3780 libname_spec='$name' 3781 shrext_cmds=".dll" 3782 need_lib_prefix=no 3783 library_names_spec='$libname${shared_ext} $libname.a' 3784 dynamic_linker='OS/2 ld.exe' 3785 shlibpath_var=LIBPATH 3786 ;; 3787 3788osf3* | osf4* | osf5*) 3789 version_type=osf 3790 need_lib_prefix=no 3791 need_version=no 3792 soname_spec='${libname}${release}${shared_ext}$major' 3793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3794 shlibpath_var=LD_LIBRARY_PATH 3795 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3796 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3797 ;; 3798 3799rdos*) 3800 dynamic_linker=no 3801 ;; 3802 3803solaris*) 3804 version_type=linux # correct to gnu/linux during the next big refactor 3805 need_lib_prefix=no 3806 need_version=no 3807 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3808 soname_spec='${libname}${release}${shared_ext}$major' 3809 shlibpath_var=LD_LIBRARY_PATH 3810 shlibpath_overrides_runpath=yes 3811 hardcode_into_libs=yes 3812 # ldd complains unless libraries are executable 3813 postinstall_cmds='chmod +x $lib' 3814 ;; 3815 3816sunos4*) 3817 version_type=sunos 3818 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3819 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3820 shlibpath_var=LD_LIBRARY_PATH 3821 shlibpath_overrides_runpath=yes 3822 if test "$with_gnu_ld" = yes; then 3823 need_lib_prefix=no 3824 fi 3825 need_version=yes 3826 ;; 3827 3828sysv4 | sysv4.3*) 3829 version_type=linux # correct to gnu/linux during the next big refactor 3830 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3831 soname_spec='${libname}${release}${shared_ext}$major' 3832 shlibpath_var=LD_LIBRARY_PATH 3833 case $host_vendor in 3834 sni) 3835 shlibpath_overrides_runpath=no 3836 need_lib_prefix=no 3837 runpath_var=LD_RUN_PATH 3838 ;; 3839 siemens) 3840 need_lib_prefix=no 3841 ;; 3842 motorola) 3843 need_lib_prefix=no 3844 need_version=no 3845 shlibpath_overrides_runpath=no 3846 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3847 ;; 3848 esac 3849 ;; 3850 3851sysv4*MP*) 3852 if test -d /usr/nec ;then 3853 version_type=linux # correct to gnu/linux during the next big refactor 3854 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3855 soname_spec='$libname${shared_ext}.$major' 3856 shlibpath_var=LD_LIBRARY_PATH 3857 fi 3858 ;; 3859 3860sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3861 version_type=freebsd-elf 3862 need_lib_prefix=no 3863 need_version=no 3864 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3865 soname_spec='${libname}${release}${shared_ext}$major' 3866 shlibpath_var=LD_LIBRARY_PATH 3867 shlibpath_overrides_runpath=yes 3868 hardcode_into_libs=yes 3869 if test "$with_gnu_ld" = yes; then 3870 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3871 else 3872 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3873 case $host_os in 3874 sco3.2v5*) 3875 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3876 ;; 3877 esac 3878 fi 3879 sys_lib_dlsearch_path_spec='/usr/lib' 3880 ;; 3881 3882tpf*) 3883 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3884 version_type=linux # correct to gnu/linux during the next big refactor 3885 need_lib_prefix=no 3886 need_version=no 3887 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3888 shlibpath_var=LD_LIBRARY_PATH 3889 shlibpath_overrides_runpath=no 3890 hardcode_into_libs=yes 3891 ;; 3892 3893uts4*) 3894 version_type=linux # correct to gnu/linux during the next big refactor 3895 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3896 soname_spec='${libname}${release}${shared_ext}$major' 3897 shlibpath_var=LD_LIBRARY_PATH 3898 ;; 3899 3900*) 3901 dynamic_linker=no 3902 ;; 3903esac 3904AC_MSG_RESULT([$dynamic_linker]) 3905test "$dynamic_linker" = no && can_build_shared=no 3906 3907variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3908if test "$GCC" = yes; then 3909 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3910fi 3911 3912if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 3913 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 3914fi 3915if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 3916 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3917fi 3918 3919_LT_DECL([], [variables_saved_for_relink], [1], 3920 [Variables whose values should be saved in libtool wrapper scripts and 3921 restored at link time]) 3922_LT_DECL([], [need_lib_prefix], [0], 3923 [Do we need the "lib" prefix for modules?]) 3924_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3925_LT_DECL([], [version_type], [0], [Library versioning type]) 3926_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3927_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3928_LT_DECL([], [shlibpath_overrides_runpath], [0], 3929 [Is shlibpath searched before the hard-coded library search path?]) 3930_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3931_LT_DECL([], [library_names_spec], [1], 3932 [[List of archive names. First name is the real one, the rest are links. 3933 The last name is the one that the linker finds with -lNAME]]) 3934_LT_DECL([], [soname_spec], [1], 3935 [[The coded name of the library, if different from the real name]]) 3936_LT_DECL([], [install_override_mode], [1], 3937 [Permission mode override for installation of shared libraries]) 3938_LT_DECL([], [postinstall_cmds], [2], 3939 [Command to use after installation of a shared archive]) 3940_LT_DECL([], [postuninstall_cmds], [2], 3941 [Command to use after uninstallation of a shared archive]) 3942_LT_DECL([], [finish_cmds], [2], 3943 [Commands used to finish a libtool library installation in a directory]) 3944_LT_DECL([], [finish_eval], [1], 3945 [[As "finish_cmds", except a single script fragment to be evaled but 3946 not shown]]) 3947_LT_DECL([], [hardcode_into_libs], [0], 3948 [Whether we should hardcode library paths into libraries]) 3949_LT_DECL([], [sys_lib_search_path_spec], [2], 3950 [Compile-time system search path for libraries]) 3951_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 3952 [Run-time system search path for libraries]) 3953])# _LT_SYS_DYNAMIC_LINKER 3954 3955 3956# _LT_PATH_TOOL_PREFIX(TOOL) 3957# -------------------------- 3958# find a file program which can recognize shared library 3959AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3960[m4_require([_LT_DECL_EGREP])dnl 3961AC_MSG_CHECKING([for $1]) 3962AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3963[case $MAGIC_CMD in 3964[[\\/*] | ?:[\\/]*]) 3965 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3966 ;; 3967*) 3968 lt_save_MAGIC_CMD="$MAGIC_CMD" 3969 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3970dnl $ac_dummy forces splitting on constant user-supplied paths. 3971dnl POSIX.2 word splitting is done only on the output of word expansions, 3972dnl not every word. This closes a longstanding sh security hole. 3973 ac_dummy="m4_if([$2], , $PATH, [$2])" 3974 for ac_dir in $ac_dummy; do 3975 IFS="$lt_save_ifs" 3976 test -z "$ac_dir" && ac_dir=. 3977 if test -f $ac_dir/$1; then 3978 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 3979 if test -n "$file_magic_test_file"; then 3980 case $deplibs_check_method in 3981 "file_magic "*) 3982 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3983 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3984 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3985 $EGREP "$file_magic_regex" > /dev/null; then 3986 : 3987 else 3988 cat <<_LT_EOF 1>&2 3989 3990*** Warning: the command libtool uses to detect shared libraries, 3991*** $file_magic_cmd, produces output that libtool cannot recognize. 3992*** The result is that libtool may fail to recognize shared libraries 3993*** as such. This will affect the creation of libtool libraries that 3994*** depend on shared libraries, but programs linked with such libtool 3995*** libraries will work regardless of this problem. Nevertheless, you 3996*** may want to report the problem to your system manager and/or to 3997*** bug-libtool@gnu.org 3998 3999_LT_EOF 4000 fi ;; 4001 esac 4002 fi 4003 break 4004 fi 4005 done 4006 IFS="$lt_save_ifs" 4007 MAGIC_CMD="$lt_save_MAGIC_CMD" 4008 ;; 4009esac]) 4010MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4011if test -n "$MAGIC_CMD"; then 4012 AC_MSG_RESULT($MAGIC_CMD) 4013else 4014 AC_MSG_RESULT(no) 4015fi 4016_LT_DECL([], [MAGIC_CMD], [0], 4017 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4018])# _LT_PATH_TOOL_PREFIX 4019 4020# Old name: 4021AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4022dnl aclocal-1.4 backwards compatibility: 4023dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4024 4025 4026# _LT_PATH_MAGIC 4027# -------------- 4028# find a file program which can recognize a shared library 4029m4_defun([_LT_PATH_MAGIC], 4030[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4031if test -z "$lt_cv_path_MAGIC_CMD"; then 4032 if test -n "$ac_tool_prefix"; then 4033 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4034 else 4035 MAGIC_CMD=: 4036 fi 4037fi 4038])# _LT_PATH_MAGIC 4039 4040 4041# LT_PATH_LD 4042# ---------- 4043# find the pathname to the GNU or non-GNU linker 4044AC_DEFUN([LT_PATH_LD], 4045[AC_REQUIRE([AC_PROG_CC])dnl 4046AC_REQUIRE([AC_CANONICAL_HOST])dnl 4047AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4048m4_require([_LT_DECL_SED])dnl 4049m4_require([_LT_DECL_EGREP])dnl 4050m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4051 4052AC_ARG_WITH([gnu-ld], 4053 [AS_HELP_STRING([--with-gnu-ld], 4054 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4055 [test "$withval" = no || with_gnu_ld=yes], 4056 [with_gnu_ld=no])dnl 4057 4058ac_prog=ld 4059if test "$GCC" = yes; then 4060 # Check if gcc -print-prog-name=ld gives a path. 4061 AC_MSG_CHECKING([for ld used by $CC]) 4062 case $host in 4063 *-*-mingw*) 4064 # gcc leaves a trailing carriage return which upsets mingw 4065 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4066 *) 4067 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4068 esac 4069 case $ac_prog in 4070 # Accept absolute paths. 4071 [[\\/]]* | ?:[[\\/]]*) 4072 re_direlt='/[[^/]][[^/]]*/\.\./' 4073 # Canonicalize the pathname of ld 4074 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4075 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4076 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4077 done 4078 test -z "$LD" && LD="$ac_prog" 4079 ;; 4080 "") 4081 # If it fails, then pretend we aren't using GCC. 4082 ac_prog=ld 4083 ;; 4084 *) 4085 # If it is relative, then search for the first ld in PATH. 4086 with_gnu_ld=unknown 4087 ;; 4088 esac 4089elif test "$with_gnu_ld" = yes; then 4090 AC_MSG_CHECKING([for GNU ld]) 4091else 4092 AC_MSG_CHECKING([for non-GNU ld]) 4093fi 4094AC_CACHE_VAL(lt_cv_path_LD, 4095[if test -z "$LD"; then 4096 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4097 for ac_dir in $PATH; do 4098 IFS="$lt_save_ifs" 4099 test -z "$ac_dir" && ac_dir=. 4100 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4101 lt_cv_path_LD="$ac_dir/$ac_prog" 4102 # Check to see if the program is GNU ld. I'd rather use --version, 4103 # but apparently some variants of GNU ld only accept -v. 4104 # Break only if it was the GNU/non-GNU ld that we prefer. 4105 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4106 *GNU* | *'with BFD'*) 4107 test "$with_gnu_ld" != no && break 4108 ;; 4109 *) 4110 test "$with_gnu_ld" != yes && break 4111 ;; 4112 esac 4113 fi 4114 done 4115 IFS="$lt_save_ifs" 4116else 4117 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4118fi]) 4119LD="$lt_cv_path_LD" 4120if test -n "$LD"; then 4121 AC_MSG_RESULT($LD) 4122else 4123 AC_MSG_RESULT(no) 4124fi 4125test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4126_LT_PATH_LD_GNU 4127AC_SUBST([LD]) 4128 4129_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4130])# LT_PATH_LD 4131 4132# Old names: 4133AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4134AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4135dnl aclocal-1.4 backwards compatibility: 4136dnl AC_DEFUN([AM_PROG_LD], []) 4137dnl AC_DEFUN([AC_PROG_LD], []) 4138 4139 4140# _LT_PATH_LD_GNU 4141#- -------------- 4142m4_defun([_LT_PATH_LD_GNU], 4143[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4144[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4145case `$LD -v 2>&1 </dev/null` in 4146*GNU* | *'with BFD'*) 4147 lt_cv_prog_gnu_ld=yes 4148 ;; 4149*) 4150 lt_cv_prog_gnu_ld=no 4151 ;; 4152esac]) 4153with_gnu_ld=$lt_cv_prog_gnu_ld 4154])# _LT_PATH_LD_GNU 4155 4156 4157# _LT_CMD_RELOAD 4158# -------------- 4159# find reload flag for linker 4160# -- PORTME Some linkers may need a different reload flag. 4161m4_defun([_LT_CMD_RELOAD], 4162[AC_CACHE_CHECK([for $LD option to reload object files], 4163 lt_cv_ld_reload_flag, 4164 [lt_cv_ld_reload_flag='-r']) 4165reload_flag=$lt_cv_ld_reload_flag 4166case $reload_flag in 4167"" | " "*) ;; 4168*) reload_flag=" $reload_flag" ;; 4169esac 4170reload_cmds='$LD$reload_flag -o $output$reload_objs' 4171case $host_os in 4172 cygwin* | mingw* | pw32* | cegcc*) 4173 if test "$GCC" != yes; then 4174 reload_cmds=false 4175 fi 4176 ;; 4177 darwin*) 4178 if test "$GCC" = yes; then 4179 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4180 else 4181 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4182 fi 4183 ;; 4184esac 4185_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4186_LT_TAGDECL([], [reload_cmds], [2])dnl 4187])# _LT_CMD_RELOAD 4188 4189 4190# _LT_CHECK_MAGIC_METHOD 4191# ---------------------- 4192# how to check for library dependencies 4193# -- PORTME fill in with the dynamic library characteristics 4194m4_defun([_LT_CHECK_MAGIC_METHOD], 4195[m4_require([_LT_DECL_EGREP]) 4196m4_require([_LT_DECL_OBJDUMP]) 4197AC_CACHE_CHECK([how to recognize dependent libraries], 4198lt_cv_deplibs_check_method, 4199[lt_cv_file_magic_cmd='$MAGIC_CMD' 4200lt_cv_file_magic_test_file= 4201lt_cv_deplibs_check_method='unknown' 4202# Need to set the preceding variable on all platforms that support 4203# interlibrary dependencies. 4204# 'none' -- dependencies not supported. 4205# `unknown' -- same as none, but documents that we really don't know. 4206# 'pass_all' -- all dependencies passed with no checks. 4207# 'test_compile' -- check by making test program. 4208# 'file_magic [[regex]]' -- check by looking for files in library path 4209# which responds to the $file_magic_cmd with a given extended regex. 4210# If you have `file' or equivalent on your system and you're not sure 4211# whether `pass_all' will *always* work, you probably want this one. 4212 4213case $host_os in 4214aix[[4-9]]*) 4215 lt_cv_deplibs_check_method=pass_all 4216 ;; 4217 4218beos*) 4219 lt_cv_deplibs_check_method=pass_all 4220 ;; 4221 4222bsdi[[45]]*) 4223 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4224 lt_cv_file_magic_cmd='/usr/bin/file -L' 4225 lt_cv_file_magic_test_file=/shlib/libc.so 4226 ;; 4227 4228cygwin*) 4229 # func_win32_libid is a shell function defined in ltmain.sh 4230 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4231 lt_cv_file_magic_cmd='func_win32_libid' 4232 ;; 4233 4234mingw* | pw32*) 4235 # Base MSYS/MinGW do not provide the 'file' command needed by 4236 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4237 # unless we find 'file', for example because we are cross-compiling. 4238 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4239 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4240 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4241 lt_cv_file_magic_cmd='func_win32_libid' 4242 else 4243 # Keep this pattern in sync with the one in func_win32_libid. 4244 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4245 lt_cv_file_magic_cmd='$OBJDUMP -f' 4246 fi 4247 ;; 4248 4249cegcc*) 4250 # use the weaker test based on 'objdump'. See mingw*. 4251 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4252 lt_cv_file_magic_cmd='$OBJDUMP -f' 4253 ;; 4254 4255darwin* | rhapsody*) 4256 lt_cv_deplibs_check_method=pass_all 4257 ;; 4258 4259freebsd* | dragonfly*) 4260 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4261 case $host_cpu in 4262 i*86 ) 4263 # Not sure whether the presence of OpenBSD here was a mistake. 4264 # Let's accept both of them until this is cleared up. 4265 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4266 lt_cv_file_magic_cmd=/usr/bin/file 4267 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4268 ;; 4269 esac 4270 else 4271 lt_cv_deplibs_check_method=pass_all 4272 fi 4273 ;; 4274 4275gnu*) 4276 lt_cv_deplibs_check_method=pass_all 4277 ;; 4278 4279haiku*) 4280 lt_cv_deplibs_check_method=pass_all 4281 ;; 4282 4283hpux10.20* | hpux11*) 4284 lt_cv_file_magic_cmd=/usr/bin/file 4285 case $host_cpu in 4286 ia64*) 4287 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4288 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4289 ;; 4290 hppa*64*) 4291 [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]'] 4292 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4293 ;; 4294 *) 4295 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4296 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4297 ;; 4298 esac 4299 ;; 4300 4301interix[[3-9]]*) 4302 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4303 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4304 ;; 4305 4306irix5* | irix6* | nonstopux*) 4307 case $LD in 4308 *-32|*"-32 ") libmagic=32-bit;; 4309 *-n32|*"-n32 ") libmagic=N32;; 4310 *-64|*"-64 ") libmagic=64-bit;; 4311 *) libmagic=never-match;; 4312 esac 4313 lt_cv_deplibs_check_method=pass_all 4314 ;; 4315 4316# This must be glibc/ELF. 4317linux* | k*bsd*-gnu | kopensolaris*-gnu) 4318 lt_cv_deplibs_check_method=pass_all 4319 ;; 4320 4321netbsd*) 4322 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4323 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4324 else 4325 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4326 fi 4327 ;; 4328 4329newos6*) 4330 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4331 lt_cv_file_magic_cmd=/usr/bin/file 4332 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4333 ;; 4334 4335*nto* | *qnx*) 4336 lt_cv_deplibs_check_method=pass_all 4337 ;; 4338 4339openbsd*) 4340 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4341 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4342 else 4343 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4344 fi 4345 ;; 4346 4347osf3* | osf4* | osf5*) 4348 lt_cv_deplibs_check_method=pass_all 4349 ;; 4350 4351rdos*) 4352 lt_cv_deplibs_check_method=pass_all 4353 ;; 4354 4355solaris*) 4356 lt_cv_deplibs_check_method=pass_all 4357 ;; 4358 4359sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4360 lt_cv_deplibs_check_method=pass_all 4361 ;; 4362 4363sysv4 | sysv4.3*) 4364 case $host_vendor in 4365 motorola) 4366 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]]' 4367 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4368 ;; 4369 ncr) 4370 lt_cv_deplibs_check_method=pass_all 4371 ;; 4372 sequent) 4373 lt_cv_file_magic_cmd='/bin/file' 4374 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4375 ;; 4376 sni) 4377 lt_cv_file_magic_cmd='/bin/file' 4378 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4379 lt_cv_file_magic_test_file=/lib/libc.so 4380 ;; 4381 siemens) 4382 lt_cv_deplibs_check_method=pass_all 4383 ;; 4384 pc) 4385 lt_cv_deplibs_check_method=pass_all 4386 ;; 4387 esac 4388 ;; 4389 4390tpf*) 4391 lt_cv_deplibs_check_method=pass_all 4392 ;; 4393esac 4394]) 4395 4396file_magic_glob= 4397want_nocaseglob=no 4398if test "$build" = "$host"; then 4399 case $host_os in 4400 mingw* | pw32*) 4401 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4402 want_nocaseglob=yes 4403 else 4404 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4405 fi 4406 ;; 4407 esac 4408fi 4409 4410file_magic_cmd=$lt_cv_file_magic_cmd 4411deplibs_check_method=$lt_cv_deplibs_check_method 4412test -z "$deplibs_check_method" && deplibs_check_method=unknown 4413 4414_LT_DECL([], [deplibs_check_method], [1], 4415 [Method to check whether dependent libraries are shared objects]) 4416_LT_DECL([], [file_magic_cmd], [1], 4417 [Command to use when deplibs_check_method = "file_magic"]) 4418_LT_DECL([], [file_magic_glob], [1], 4419 [How to find potential files when deplibs_check_method = "file_magic"]) 4420_LT_DECL([], [want_nocaseglob], [1], 4421 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4422])# _LT_CHECK_MAGIC_METHOD 4423 4424 4425# LT_PATH_NM 4426# ---------- 4427# find the pathname to a BSD- or MS-compatible name lister 4428AC_DEFUN([LT_PATH_NM], 4429[AC_REQUIRE([AC_PROG_CC])dnl 4430AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4431[if test -n "$NM"; then 4432 # Let the user override the test. 4433 lt_cv_path_NM="$NM" 4434else 4435 lt_nm_to_check="${ac_tool_prefix}nm" 4436 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4437 lt_nm_to_check="$lt_nm_to_check nm" 4438 fi 4439 for lt_tmp_nm in $lt_nm_to_check; do 4440 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4441 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4442 IFS="$lt_save_ifs" 4443 test -z "$ac_dir" && ac_dir=. 4444 tmp_nm="$ac_dir/$lt_tmp_nm" 4445 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4446 # Check to see if the nm accepts a BSD-compat flag. 4447 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4448 # nm: unknown option "B" ignored 4449 # Tru64's nm complains that /dev/null is an invalid object file 4450 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4451 */dev/null* | *'Invalid file or object type'*) 4452 lt_cv_path_NM="$tmp_nm -B" 4453 break 4454 ;; 4455 *) 4456 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4457 */dev/null*) 4458 lt_cv_path_NM="$tmp_nm -p" 4459 break 4460 ;; 4461 *) 4462 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4463 continue # so that we can try to find one that supports BSD flags 4464 ;; 4465 esac 4466 ;; 4467 esac 4468 fi 4469 done 4470 IFS="$lt_save_ifs" 4471 done 4472 : ${lt_cv_path_NM=no} 4473fi]) 4474if test "$lt_cv_path_NM" != "no"; then 4475 NM="$lt_cv_path_NM" 4476else 4477 # Didn't find any BSD compatible name lister, look for dumpbin. 4478 if test -n "$DUMPBIN"; then : 4479 # Let the user override the test. 4480 else 4481 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4482 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4483 *COFF*) 4484 DUMPBIN="$DUMPBIN -symbols" 4485 ;; 4486 *) 4487 DUMPBIN=: 4488 ;; 4489 esac 4490 fi 4491 AC_SUBST([DUMPBIN]) 4492 if test "$DUMPBIN" != ":"; then 4493 NM="$DUMPBIN" 4494 fi 4495fi 4496test -z "$NM" && NM=nm 4497AC_SUBST([NM]) 4498_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4499 4500AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4501 [lt_cv_nm_interface="BSD nm" 4502 echo "int some_variable = 0;" > conftest.$ac_ext 4503 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4504 (eval "$ac_compile" 2>conftest.err) 4505 cat conftest.err >&AS_MESSAGE_LOG_FD 4506 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4507 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4508 cat conftest.err >&AS_MESSAGE_LOG_FD 4509 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4510 cat conftest.out >&AS_MESSAGE_LOG_FD 4511 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4512 lt_cv_nm_interface="MS dumpbin" 4513 fi 4514 rm -f conftest*]) 4515])# LT_PATH_NM 4516 4517# Old names: 4518AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4519AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4520dnl aclocal-1.4 backwards compatibility: 4521dnl AC_DEFUN([AM_PROG_NM], []) 4522dnl AC_DEFUN([AC_PROG_NM], []) 4523 4524# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4525# -------------------------------- 4526# how to determine the name of the shared library 4527# associated with a specific link library. 4528# -- PORTME fill in with the dynamic library characteristics 4529m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4530[m4_require([_LT_DECL_EGREP]) 4531m4_require([_LT_DECL_OBJDUMP]) 4532m4_require([_LT_DECL_DLLTOOL]) 4533AC_CACHE_CHECK([how to associate runtime and link libraries], 4534lt_cv_sharedlib_from_linklib_cmd, 4535[lt_cv_sharedlib_from_linklib_cmd='unknown' 4536 4537case $host_os in 4538cygwin* | mingw* | pw32* | cegcc*) 4539 # two different shell functions defined in ltmain.sh 4540 # decide which to use based on capabilities of $DLLTOOL 4541 case `$DLLTOOL --help 2>&1` in 4542 *--identify-strict*) 4543 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4544 ;; 4545 *) 4546 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4547 ;; 4548 esac 4549 ;; 4550*) 4551 # fallback: assume linklib IS sharedlib 4552 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4553 ;; 4554esac 4555]) 4556sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4557test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4558 4559_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4560 [Command to associate shared and link libraries]) 4561])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4562 4563 4564# _LT_PATH_MANIFEST_TOOL 4565# ---------------------- 4566# locate the manifest tool 4567m4_defun([_LT_PATH_MANIFEST_TOOL], 4568[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4569test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4570AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4571 [lt_cv_path_mainfest_tool=no 4572 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4573 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4574 cat conftest.err >&AS_MESSAGE_LOG_FD 4575 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4576 lt_cv_path_mainfest_tool=yes 4577 fi 4578 rm -f conftest*]) 4579if test "x$lt_cv_path_mainfest_tool" != xyes; then 4580 MANIFEST_TOOL=: 4581fi 4582_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4583])# _LT_PATH_MANIFEST_TOOL 4584 4585 4586# LT_LIB_M 4587# -------- 4588# check for math library 4589AC_DEFUN([LT_LIB_M], 4590[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4591LIBM= 4592case $host in 4593*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4594 # These system don't have libm, or don't need it 4595 ;; 4596*-ncr-sysv4.3*) 4597 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4598 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4599 ;; 4600*) 4601 AC_CHECK_LIB(m, cos, LIBM="-lm") 4602 ;; 4603esac 4604AC_SUBST([LIBM]) 4605])# LT_LIB_M 4606 4607# Old name: 4608AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4609dnl aclocal-1.4 backwards compatibility: 4610dnl AC_DEFUN([AC_CHECK_LIBM], []) 4611 4612 4613# _LT_COMPILER_NO_RTTI([TAGNAME]) 4614# ------------------------------- 4615m4_defun([_LT_COMPILER_NO_RTTI], 4616[m4_require([_LT_TAG_COMPILER])dnl 4617 4618_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4619 4620if test "$GCC" = yes; then 4621 case $cc_basename in 4622 nvcc*) 4623 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4624 *) 4625 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4626 esac 4627 4628 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4629 lt_cv_prog_compiler_rtti_exceptions, 4630 [-fno-rtti -fno-exceptions], [], 4631 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4632fi 4633_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4634 [Compiler flag to turn off builtin functions]) 4635])# _LT_COMPILER_NO_RTTI 4636 4637 4638# _LT_CMD_GLOBAL_SYMBOLS 4639# ---------------------- 4640m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4641[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4642AC_REQUIRE([AC_PROG_CC])dnl 4643AC_REQUIRE([AC_PROG_AWK])dnl 4644AC_REQUIRE([LT_PATH_NM])dnl 4645AC_REQUIRE([LT_PATH_LD])dnl 4646m4_require([_LT_DECL_SED])dnl 4647m4_require([_LT_DECL_EGREP])dnl 4648m4_require([_LT_TAG_COMPILER])dnl 4649 4650# Check for command to grab the raw symbol name followed by C symbol from nm. 4651AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4652AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4653[ 4654# These are sane defaults that work on at least a few old systems. 4655# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4656 4657# Character class describing NM global symbol codes. 4658symcode='[[BCDEGRST]]' 4659 4660# Regexp to match symbols that can be accessed directly from C. 4661sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4662 4663# Define system-specific variables. 4664case $host_os in 4665aix*) 4666 symcode='[[BCDT]]' 4667 ;; 4668cygwin* | mingw* | pw32* | cegcc*) 4669 symcode='[[ABCDGISTW]]' 4670 ;; 4671hpux*) 4672 if test "$host_cpu" = ia64; then 4673 symcode='[[ABCDEGRST]]' 4674 fi 4675 ;; 4676irix* | nonstopux*) 4677 symcode='[[BCDEGRST]]' 4678 ;; 4679osf*) 4680 symcode='[[BCDEGQRST]]' 4681 ;; 4682solaris*) 4683 symcode='[[BDRT]]' 4684 ;; 4685sco3.2v5*) 4686 symcode='[[DT]]' 4687 ;; 4688sysv4.2uw2*) 4689 symcode='[[DT]]' 4690 ;; 4691sysv5* | sco5v6* | unixware* | OpenUNIX*) 4692 symcode='[[ABDT]]' 4693 ;; 4694sysv4) 4695 symcode='[[DFNSTU]]' 4696 ;; 4697esac 4698 4699# If we're using GNU nm, then use its standard symbol codes. 4700case `$NM -V 2>&1` in 4701*GNU* | *'with BFD'*) 4702 symcode='[[ABCDGIRSTW]]' ;; 4703esac 4704 4705# Transform an extracted symbol line into a proper C declaration. 4706# Some systems (esp. on ia64) link data and code symbols differently, 4707# so use this general approach. 4708lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4709 4710# Transform an extracted symbol line into symbol name and symbol address 4711lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4712lt_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'" 4713 4714# Handle CRLF in mingw tool chain 4715opt_cr= 4716case $build_os in 4717mingw*) 4718 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4719 ;; 4720esac 4721 4722# Try without a prefix underscore, then with it. 4723for ac_symprfx in "" "_"; do 4724 4725 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4726 symxfrm="\\1 $ac_symprfx\\2 \\2" 4727 4728 # Write the raw and C identifiers. 4729 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4730 # Fake it for dumpbin and say T for any non-static function 4731 # and D for any global variable. 4732 # Also find C++ and __fastcall symbols from MSVC++, 4733 # which start with @ or ?. 4734 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4735" {last_section=section; section=\$ 3};"\ 4736" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4737" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4738" \$ 0!~/External *\|/{next};"\ 4739" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4740" {if(hide[section]) next};"\ 4741" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4742" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4743" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4744" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4745" ' prfx=^$ac_symprfx]" 4746 else 4747 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4748 fi 4749 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4750 4751 # Check to see that the pipe works correctly. 4752 pipe_works=no 4753 4754 rm -f conftest* 4755 cat > conftest.$ac_ext <<_LT_EOF 4756#ifdef __cplusplus 4757extern "C" { 4758#endif 4759char nm_test_var; 4760void nm_test_func(void); 4761void nm_test_func(void){} 4762#ifdef __cplusplus 4763} 4764#endif 4765int main(){nm_test_var='a';nm_test_func();return(0);} 4766_LT_EOF 4767 4768 if AC_TRY_EVAL(ac_compile); then 4769 # Now try to grab the symbols. 4770 nlist=conftest.nm 4771 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4772 # Try sorting and uniquifying the output. 4773 if sort "$nlist" | uniq > "$nlist"T; then 4774 mv -f "$nlist"T "$nlist" 4775 else 4776 rm -f "$nlist"T 4777 fi 4778 4779 # Make sure that we snagged all the symbols we need. 4780 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4781 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4782 cat <<_LT_EOF > conftest.$ac_ext 4783/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4784#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4785/* DATA imports from DLLs on WIN32 con't be const, because runtime 4786 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4787# define LT@&t@_DLSYM_CONST 4788#elif defined(__osf__) 4789/* This system does not cope well with relocations in const data. */ 4790# define LT@&t@_DLSYM_CONST 4791#else 4792# define LT@&t@_DLSYM_CONST const 4793#endif 4794 4795#ifdef __cplusplus 4796extern "C" { 4797#endif 4798 4799_LT_EOF 4800 # Now generate the symbol file. 4801 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4802 4803 cat <<_LT_EOF >> conftest.$ac_ext 4804 4805/* The mapping between symbol names and symbols. */ 4806LT@&t@_DLSYM_CONST struct { 4807 const char *name; 4808 void *address; 4809} 4810lt__PROGRAM__LTX_preloaded_symbols[[]] = 4811{ 4812 { "@PROGRAM@", (void *) 0 }, 4813_LT_EOF 4814 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4815 cat <<\_LT_EOF >> conftest.$ac_ext 4816 {0, (void *) 0} 4817}; 4818 4819/* This works around a problem in FreeBSD linker */ 4820#ifdef FREEBSD_WORKAROUND 4821static const void *lt_preloaded_setup() { 4822 return lt__PROGRAM__LTX_preloaded_symbols; 4823} 4824#endif 4825 4826#ifdef __cplusplus 4827} 4828#endif 4829_LT_EOF 4830 # Now try linking the two files. 4831 mv conftest.$ac_objext conftstm.$ac_objext 4832 lt_globsym_save_LIBS=$LIBS 4833 lt_globsym_save_CFLAGS=$CFLAGS 4834 LIBS="conftstm.$ac_objext" 4835 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4836 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4837 pipe_works=yes 4838 fi 4839 LIBS=$lt_globsym_save_LIBS 4840 CFLAGS=$lt_globsym_save_CFLAGS 4841 else 4842 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4843 fi 4844 else 4845 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4846 fi 4847 else 4848 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4849 fi 4850 else 4851 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4852 cat conftest.$ac_ext >&5 4853 fi 4854 rm -rf conftest* conftst* 4855 4856 # Do not use the global_symbol_pipe unless it works. 4857 if test "$pipe_works" = yes; then 4858 break 4859 else 4860 lt_cv_sys_global_symbol_pipe= 4861 fi 4862done 4863]) 4864if test -z "$lt_cv_sys_global_symbol_pipe"; then 4865 lt_cv_sys_global_symbol_to_cdecl= 4866fi 4867if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4868 AC_MSG_RESULT(failed) 4869else 4870 AC_MSG_RESULT(ok) 4871fi 4872 4873# Response file support. 4874if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4875 nm_file_list_spec='@' 4876elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4877 nm_file_list_spec='@' 4878fi 4879 4880_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4881 [Take the output of nm and produce a listing of raw symbols and C names]) 4882_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4883 [Transform the output of nm in a proper C declaration]) 4884_LT_DECL([global_symbol_to_c_name_address], 4885 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4886 [Transform the output of nm in a C name address pair]) 4887_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4888 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4889 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4890_LT_DECL([], [nm_file_list_spec], [1], 4891 [Specify filename containing input files for $NM]) 4892]) # _LT_CMD_GLOBAL_SYMBOLS 4893 4894 4895# _LT_COMPILER_PIC([TAGNAME]) 4896# --------------------------- 4897m4_defun([_LT_COMPILER_PIC], 4898[m4_require([_LT_TAG_COMPILER])dnl 4899_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4900_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4901_LT_TAGVAR(lt_prog_compiler_static, $1)= 4902 4903m4_if([$1], [CXX], [ 4904 # C++ specific cases for pic, static, wl, etc. 4905 if test "$GXX" = yes; then 4906 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4907 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4908 4909 case $host_os in 4910 aix*) 4911 # All AIX code is PIC. 4912 if test "$host_cpu" = ia64; then 4913 # AIX 5 now supports IA64 processor 4914 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4915 fi 4916 ;; 4917 4918 amigaos*) 4919 case $host_cpu in 4920 powerpc) 4921 # see comment about AmigaOS4 .so support 4922 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4923 ;; 4924 m68k) 4925 # FIXME: we need at least 68020 code to build shared libraries, but 4926 # adding the `-m68020' flag to GCC prevents building anything better, 4927 # like `-m68040'. 4928 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4929 ;; 4930 esac 4931 ;; 4932 4933 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4934 # PIC is the default for these OSes. 4935 ;; 4936 mingw* | cygwin* | os2* | pw32* | cegcc*) 4937 # This hack is so that the source file can tell whether it is being 4938 # built for inclusion in a dll (and should export symbols for example). 4939 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4940 # (--disable-auto-import) libraries 4941 m4_if([$1], [GCJ], [], 4942 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4943 ;; 4944 darwin* | rhapsody*) 4945 # PIC is the default on this platform 4946 # Common symbols not allowed in MH_DYLIB files 4947 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4948 ;; 4949 *djgpp*) 4950 # DJGPP does not support shared libraries at all 4951 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4952 ;; 4953 haiku*) 4954 # PIC is the default for Haiku. 4955 # The "-static" flag exists, but is broken. 4956 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4957 ;; 4958 interix[[3-9]]*) 4959 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4960 # Instead, we relocate shared libraries at runtime. 4961 ;; 4962 sysv4*MP*) 4963 if test -d /usr/nec; then 4964 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4965 fi 4966 ;; 4967 hpux*) 4968 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4969 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4970 # sets the default TLS model and affects inlining. 4971 case $host_cpu in 4972 hppa*64*) 4973 ;; 4974 *) 4975 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4976 ;; 4977 esac 4978 ;; 4979 *qnx* | *nto*) 4980 # QNX uses GNU C++, but need to define -shared option too, otherwise 4981 # it will coredump. 4982 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4983 ;; 4984 *) 4985 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4986 ;; 4987 esac 4988 else 4989 case $host_os in 4990 aix[[4-9]]*) 4991 # All AIX code is PIC. 4992 if test "$host_cpu" = ia64; then 4993 # AIX 5 now supports IA64 processor 4994 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4995 else 4996 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4997 fi 4998 ;; 4999 chorus*) 5000 case $cc_basename in 5001 cxch68*) 5002 # Green Hills C++ Compiler 5003 # _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" 5004 ;; 5005 esac 5006 ;; 5007 mingw* | cygwin* | os2* | pw32* | cegcc*) 5008 # This hack is so that the source file can tell whether it is being 5009 # built for inclusion in a dll (and should export symbols for example). 5010 m4_if([$1], [GCJ], [], 5011 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5012 ;; 5013 dgux*) 5014 case $cc_basename in 5015 ec++*) 5016 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5017 ;; 5018 ghcx*) 5019 # Green Hills C++ Compiler 5020 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5021 ;; 5022 *) 5023 ;; 5024 esac 5025 ;; 5026 freebsd* | dragonfly*) 5027 # FreeBSD uses GNU C++ 5028 ;; 5029 hpux9* | hpux10* | hpux11*) 5030 case $cc_basename in 5031 CC*) 5032 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5033 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5034 if test "$host_cpu" != ia64; then 5035 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5036 fi 5037 ;; 5038 aCC*) 5039 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5040 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5041 case $host_cpu in 5042 hppa*64*|ia64*) 5043 # +Z the default 5044 ;; 5045 *) 5046 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5047 ;; 5048 esac 5049 ;; 5050 *) 5051 ;; 5052 esac 5053 ;; 5054 interix*) 5055 # This is c89, which is MS Visual C++ (no shared libs) 5056 # Anyone wants to do a port? 5057 ;; 5058 irix5* | irix6* | nonstopux*) 5059 case $cc_basename in 5060 CC*) 5061 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5063 # CC pic flag -KPIC is the default. 5064 ;; 5065 *) 5066 ;; 5067 esac 5068 ;; 5069 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5070 case $cc_basename in 5071 KCC*) 5072 # KAI C++ Compiler 5073 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5074 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5075 ;; 5076 ecpc* ) 5077 # old Intel C++ for x86_64 which still supported -KPIC. 5078 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5079 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5080 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5081 ;; 5082 icpc* ) 5083 # Intel C++, used to be incompatible with GCC. 5084 # ICC 10 doesn't accept -KPIC any more. 5085 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5086 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5087 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5088 ;; 5089 pgCC* | pgcpp*) 5090 # Portland Group C++ compiler 5091 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5092 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5093 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5094 ;; 5095 cxx*) 5096 # Compaq C++ 5097 # Make sure the PIC flag is empty. It appears that all Alpha 5098 # Linux and Compaq Tru64 Unix objects are PIC. 5099 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5100 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5101 ;; 5102 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5103 # IBM XL 8.0, 9.0 on PPC and BlueGene 5104 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5105 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5106 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5107 ;; 5108 *) 5109 case `$CC -V 2>&1 | sed 5q` in 5110 *Sun\ C*) 5111 # Sun C++ 5.9 5112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5113 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5114 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5115 ;; 5116 esac 5117 ;; 5118 esac 5119 ;; 5120 lynxos*) 5121 ;; 5122 m88k*) 5123 ;; 5124 mvs*) 5125 case $cc_basename in 5126 cxx*) 5127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5128 ;; 5129 *) 5130 ;; 5131 esac 5132 ;; 5133 netbsd*) 5134 ;; 5135 *qnx* | *nto*) 5136 # QNX uses GNU C++, but need to define -shared option too, otherwise 5137 # it will coredump. 5138 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5139 ;; 5140 osf3* | osf4* | osf5*) 5141 case $cc_basename in 5142 KCC*) 5143 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5144 ;; 5145 RCC*) 5146 # Rational C++ 2.4.1 5147 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5148 ;; 5149 cxx*) 5150 # Digital/Compaq C++ 5151 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5152 # Make sure the PIC flag is empty. It appears that all Alpha 5153 # Linux and Compaq Tru64 Unix objects are PIC. 5154 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5155 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5156 ;; 5157 *) 5158 ;; 5159 esac 5160 ;; 5161 psos*) 5162 ;; 5163 solaris*) 5164 case $cc_basename in 5165 CC* | sunCC*) 5166 # Sun C++ 4.2, 5.x and Centerline C++ 5167 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5168 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5169 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5170 ;; 5171 gcx*) 5172 # Green Hills C++ Compiler 5173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5174 ;; 5175 *) 5176 ;; 5177 esac 5178 ;; 5179 sunos4*) 5180 case $cc_basename in 5181 CC*) 5182 # Sun C++ 4.x 5183 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5184 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5185 ;; 5186 lcc*) 5187 # Lucid 5188 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5189 ;; 5190 *) 5191 ;; 5192 esac 5193 ;; 5194 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5195 case $cc_basename in 5196 CC*) 5197 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5198 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5200 ;; 5201 esac 5202 ;; 5203 tandem*) 5204 case $cc_basename in 5205 NCC*) 5206 # NonStop-UX NCC 3.20 5207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5208 ;; 5209 *) 5210 ;; 5211 esac 5212 ;; 5213 vxworks*) 5214 ;; 5215 *) 5216 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5217 ;; 5218 esac 5219 fi 5220], 5221[ 5222 if test "$GCC" = yes; then 5223 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5224 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5225 5226 case $host_os in 5227 aix*) 5228 # All AIX code is PIC. 5229 if test "$host_cpu" = ia64; then 5230 # AIX 5 now supports IA64 processor 5231 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5232 fi 5233 ;; 5234 5235 amigaos*) 5236 case $host_cpu in 5237 powerpc) 5238 # see comment about AmigaOS4 .so support 5239 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5240 ;; 5241 m68k) 5242 # FIXME: we need at least 68020 code to build shared libraries, but 5243 # adding the `-m68020' flag to GCC prevents building anything better, 5244 # like `-m68040'. 5245 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5246 ;; 5247 esac 5248 ;; 5249 5250 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5251 # PIC is the default for these OSes. 5252 ;; 5253 5254 mingw* | cygwin* | pw32* | os2* | cegcc*) 5255 # This hack is so that the source file can tell whether it is being 5256 # built for inclusion in a dll (and should export symbols for example). 5257 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5258 # (--disable-auto-import) libraries 5259 m4_if([$1], [GCJ], [], 5260 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5261 ;; 5262 5263 darwin* | rhapsody*) 5264 # PIC is the default on this platform 5265 # Common symbols not allowed in MH_DYLIB files 5266 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5267 ;; 5268 5269 haiku*) 5270 # PIC is the default for Haiku. 5271 # The "-static" flag exists, but is broken. 5272 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5273 ;; 5274 5275 hpux*) 5276 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5277 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5278 # sets the default TLS model and affects inlining. 5279 case $host_cpu in 5280 hppa*64*) 5281 # +Z the default 5282 ;; 5283 *) 5284 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5285 ;; 5286 esac 5287 ;; 5288 5289 interix[[3-9]]*) 5290 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5291 # Instead, we relocate shared libraries at runtime. 5292 ;; 5293 5294 msdosdjgpp*) 5295 # Just because we use GCC doesn't mean we suddenly get shared libraries 5296 # on systems that don't support them. 5297 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5298 enable_shared=no 5299 ;; 5300 5301 *nto* | *qnx*) 5302 # QNX uses GNU C++, but need to define -shared option too, otherwise 5303 # it will coredump. 5304 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5305 ;; 5306 5307 sysv4*MP*) 5308 if test -d /usr/nec; then 5309 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5310 fi 5311 ;; 5312 5313 *) 5314 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5315 ;; 5316 esac 5317 5318 case $cc_basename in 5319 nvcc*) # Cuda Compiler Driver 2.2 5320 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5321 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5322 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5323 fi 5324 ;; 5325 esac 5326 else 5327 # PORTME Check for flag to pass linker flags through the system compiler. 5328 case $host_os in 5329 aix*) 5330 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5331 if test "$host_cpu" = ia64; then 5332 # AIX 5 now supports IA64 processor 5333 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5334 else 5335 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5336 fi 5337 ;; 5338 5339 mingw* | cygwin* | pw32* | os2* | cegcc*) 5340 # This hack is so that the source file can tell whether it is being 5341 # built for inclusion in a dll (and should export symbols for example). 5342 m4_if([$1], [GCJ], [], 5343 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5344 ;; 5345 5346 hpux9* | hpux10* | hpux11*) 5347 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5348 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5349 # not for PA HP-UX. 5350 case $host_cpu in 5351 hppa*64*|ia64*) 5352 # +Z the default 5353 ;; 5354 *) 5355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5356 ;; 5357 esac 5358 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5359 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5360 ;; 5361 5362 irix5* | irix6* | nonstopux*) 5363 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5364 # PIC (with -KPIC) is the default. 5365 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5366 ;; 5367 5368 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5369 case $cc_basename in 5370 # old Intel for x86_64 which still supported -KPIC. 5371 ecc*) 5372 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5373 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5374 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5375 ;; 5376 # icc used to be incompatible with GCC. 5377 # ICC 10 doesn't accept -KPIC any more. 5378 icc* | ifort*) 5379 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5380 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5381 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5382 ;; 5383 # Lahey Fortran 8.1. 5384 lf95*) 5385 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5387 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5388 ;; 5389 nagfor*) 5390 # NAG Fortran compiler 5391 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5394 ;; 5395 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5396 # Portland Group compilers (*not* the Pentium gcc compiler, 5397 # which looks to be a dead project) 5398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5401 ;; 5402 ccc*) 5403 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5404 # All Alpha code is PIC. 5405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5406 ;; 5407 xl* | bgxl* | bgf* | mpixl*) 5408 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5412 ;; 5413 *) 5414 case `$CC -V 2>&1 | sed 5q` in 5415 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5416 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5420 ;; 5421 *Sun\ F* | *Sun*Fortran*) 5422 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5423 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5424 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5425 ;; 5426 *Sun\ C*) 5427 # Sun C 5.9 5428 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5430 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5431 ;; 5432 *Intel*\ [[CF]]*Compiler*) 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)='-static' 5436 ;; 5437 *Portland\ Group*) 5438 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5439 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5441 ;; 5442 esac 5443 ;; 5444 esac 5445 ;; 5446 5447 newsos6) 5448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5449 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5450 ;; 5451 5452 *nto* | *qnx*) 5453 # QNX uses GNU C++, but need to define -shared option too, otherwise 5454 # it will coredump. 5455 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5456 ;; 5457 5458 osf3* | osf4* | osf5*) 5459 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5460 # All OSF/1 code is PIC. 5461 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5462 ;; 5463 5464 rdos*) 5465 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466 ;; 5467 5468 solaris*) 5469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5470 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5471 case $cc_basename in 5472 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5474 *) 5475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5476 esac 5477 ;; 5478 5479 sunos4*) 5480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5481 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5482 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5483 ;; 5484 5485 sysv4 | sysv4.2uw2* | sysv4.3*) 5486 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5488 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5489 ;; 5490 5491 sysv4*MP*) 5492 if test -d /usr/nec ;then 5493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5495 fi 5496 ;; 5497 5498 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5500 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5501 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5502 ;; 5503 5504 unicos*) 5505 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5506 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5507 ;; 5508 5509 uts4*) 5510 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5511 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5512 ;; 5513 5514 *) 5515 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5516 ;; 5517 esac 5518 fi 5519]) 5520case $host_os in 5521 # For platforms which do not support PIC, -DPIC is meaningless: 5522 *djgpp*) 5523 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5524 ;; 5525 *) 5526 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5527 ;; 5528esac 5529 5530AC_CACHE_CHECK([for $compiler option to produce PIC], 5531 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5532 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5533_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5534 5535# 5536# Check to make sure the PIC flag actually works. 5537# 5538if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5539 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5540 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5541 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5542 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5543 "" | " "*) ;; 5544 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5545 esac], 5546 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5547 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5548fi 5549_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5550 [Additional compiler flags for building library objects]) 5551 5552_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5553 [How to pass a linker flag through the compiler]) 5554# 5555# Check to make sure the static flag actually works. 5556# 5557wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5558_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5559 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5560 $lt_tmp_static_flag, 5561 [], 5562 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5563_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5564 [Compiler flag to prevent dynamic linking]) 5565])# _LT_COMPILER_PIC 5566 5567 5568# _LT_LINKER_SHLIBS([TAGNAME]) 5569# ---------------------------- 5570# See if the linker supports building shared libraries. 5571m4_defun([_LT_LINKER_SHLIBS], 5572[AC_REQUIRE([LT_PATH_LD])dnl 5573AC_REQUIRE([LT_PATH_NM])dnl 5574m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5575m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5576m4_require([_LT_DECL_EGREP])dnl 5577m4_require([_LT_DECL_SED])dnl 5578m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5579m4_require([_LT_TAG_COMPILER])dnl 5580AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5581m4_if([$1], [CXX], [ 5582 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5583 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5584 case $host_os in 5585 aix[[4-9]]*) 5586 # If we're using GNU nm, then we don't want the "-C" option. 5587 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5588 # Also, AIX nm treats weak defined symbols like other global defined 5589 # symbols, whereas GNU nm marks them as "W". 5590 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5591 _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' 5592 else 5593 _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' 5594 fi 5595 ;; 5596 pw32*) 5597 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5598 ;; 5599 cygwin* | mingw* | cegcc*) 5600 case $cc_basename in 5601 cl*) 5602 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5603 ;; 5604 *) 5605 _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' 5606 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5607 ;; 5608 esac 5609 ;; 5610 *) 5611 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5612 ;; 5613 esac 5614], [ 5615 runpath_var= 5616 _LT_TAGVAR(allow_undefined_flag, $1)= 5617 _LT_TAGVAR(always_export_symbols, $1)=no 5618 _LT_TAGVAR(archive_cmds, $1)= 5619 _LT_TAGVAR(archive_expsym_cmds, $1)= 5620 _LT_TAGVAR(compiler_needs_object, $1)=no 5621 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5622 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5623 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5624 _LT_TAGVAR(hardcode_automatic, $1)=no 5625 _LT_TAGVAR(hardcode_direct, $1)=no 5626 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5627 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5628 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5629 _LT_TAGVAR(hardcode_minus_L, $1)=no 5630 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5631 _LT_TAGVAR(inherit_rpath, $1)=no 5632 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5633 _LT_TAGVAR(module_cmds, $1)= 5634 _LT_TAGVAR(module_expsym_cmds, $1)= 5635 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5636 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5637 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5638 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5639 # include_expsyms should be a list of space-separated symbols to be *always* 5640 # included in the symbol list 5641 _LT_TAGVAR(include_expsyms, $1)= 5642 # exclude_expsyms can be an extended regexp of symbols to exclude 5643 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5644 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5645 # as well as any symbol that contains `d'. 5646 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5647 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5648 # platforms (ab)use it in PIC code, but their linkers get confused if 5649 # the symbol is explicitly referenced. Since portable code cannot 5650 # rely on this symbol name, it's probably fine to never include it in 5651 # preloaded symbol tables. 5652 # Exclude shared library initialization/finalization symbols. 5653dnl Note also adjust exclude_expsyms for C++ above. 5654 extract_expsyms_cmds= 5655 5656 case $host_os in 5657 cygwin* | mingw* | pw32* | cegcc*) 5658 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5659 # When not using gcc, we currently assume that we are using 5660 # Microsoft Visual C++. 5661 if test "$GCC" != yes; then 5662 with_gnu_ld=no 5663 fi 5664 ;; 5665 interix*) 5666 # we just hope/assume this is gcc and not c89 (= MSVC++) 5667 with_gnu_ld=yes 5668 ;; 5669 openbsd*) 5670 with_gnu_ld=no 5671 ;; 5672 esac 5673 5674 _LT_TAGVAR(ld_shlibs, $1)=yes 5675 5676 # On some targets, GNU ld is compatible enough with the native linker 5677 # that we're better off using the native interface for both. 5678 lt_use_gnu_ld_interface=no 5679 if test "$with_gnu_ld" = yes; then 5680 case $host_os in 5681 aix*) 5682 # The AIX port of GNU ld has always aspired to compatibility 5683 # with the native linker. However, as the warning in the GNU ld 5684 # block says, versions before 2.19.5* couldn't really create working 5685 # shared libraries, regardless of the interface used. 5686 case `$LD -v 2>&1` in 5687 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5688 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5689 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5690 *) 5691 lt_use_gnu_ld_interface=yes 5692 ;; 5693 esac 5694 ;; 5695 *) 5696 lt_use_gnu_ld_interface=yes 5697 ;; 5698 esac 5699 fi 5700 5701 if test "$lt_use_gnu_ld_interface" = yes; then 5702 # If archive_cmds runs LD, not CC, wlarc should be empty 5703 wlarc='${wl}' 5704 5705 # Set some defaults for GNU ld with shared library support. These 5706 # are reset later if shared libraries are not supported. Putting them 5707 # here allows them to be overridden if necessary. 5708 runpath_var=LD_RUN_PATH 5709 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5710 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5711 # ancient GNU ld didn't support --whole-archive et. al. 5712 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5713 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5714 else 5715 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5716 fi 5717 supports_anon_versioning=no 5718 case `$LD -v 2>&1` in 5719 *GNU\ gold*) supports_anon_versioning=yes ;; 5720 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5721 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5722 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5723 *\ 2.11.*) ;; # other 2.11 versions 5724 *) supports_anon_versioning=yes ;; 5725 esac 5726 5727 # See if GNU ld supports shared libraries. 5728 case $host_os in 5729 aix[[3-9]]*) 5730 # On AIX/PPC, the GNU linker is very broken 5731 if test "$host_cpu" != ia64; then 5732 _LT_TAGVAR(ld_shlibs, $1)=no 5733 cat <<_LT_EOF 1>&2 5734 5735*** Warning: the GNU linker, at least up to release 2.19, is reported 5736*** to be unable to reliably create shared libraries on AIX. 5737*** Therefore, libtool is disabling shared libraries support. If you 5738*** really care for shared libraries, you may want to install binutils 5739*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5740*** You will then need to restart the configuration process. 5741 5742_LT_EOF 5743 fi 5744 ;; 5745 5746 amigaos*) 5747 case $host_cpu in 5748 powerpc) 5749 # see comment about AmigaOS4 .so support 5750 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5751 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5752 ;; 5753 m68k) 5754 _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)' 5755 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5756 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5757 ;; 5758 esac 5759 ;; 5760 5761 beos*) 5762 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5763 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5764 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5765 # support --undefined. This deserves some investigation. FIXME 5766 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5767 else 5768 _LT_TAGVAR(ld_shlibs, $1)=no 5769 fi 5770 ;; 5771 5772 cygwin* | mingw* | pw32* | cegcc*) 5773 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5774 # as there is no search path for DLLs. 5775 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5776 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5777 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5778 _LT_TAGVAR(always_export_symbols, $1)=no 5779 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5780 _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' 5781 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5782 5783 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5784 _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' 5785 # If the export-symbols file already is a .def file (1st line 5786 # is EXPORTS), use it as is; otherwise, prepend... 5787 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5788 cp $export_symbols $output_objdir/$soname.def; 5789 else 5790 echo EXPORTS > $output_objdir/$soname.def; 5791 cat $export_symbols >> $output_objdir/$soname.def; 5792 fi~ 5793 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5794 else 5795 _LT_TAGVAR(ld_shlibs, $1)=no 5796 fi 5797 ;; 5798 5799 haiku*) 5800 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5801 _LT_TAGVAR(link_all_deplibs, $1)=yes 5802 ;; 5803 5804 interix[[3-9]]*) 5805 _LT_TAGVAR(hardcode_direct, $1)=no 5806 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5807 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5808 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5809 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5810 # Instead, shared libraries are loaded at an image base (0x10000000 by 5811 # default) and relocated if they conflict, which is a slow very memory 5812 # consuming and fragmenting process. To avoid this, we pick a random, 5813 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5814 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5815 _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' 5816 _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' 5817 ;; 5818 5819 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5820 tmp_diet=no 5821 if test "$host_os" = linux-dietlibc; then 5822 case $cc_basename in 5823 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5824 esac 5825 fi 5826 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5827 && test "$tmp_diet" = no 5828 then 5829 tmp_addflag=' $pic_flag' 5830 tmp_sharedflag='-shared' 5831 case $cc_basename,$host_cpu in 5832 pgcc*) # Portland Group C compiler 5833 _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' 5834 tmp_addflag=' $pic_flag' 5835 ;; 5836 pgf77* | pgf90* | pgf95* | pgfortran*) 5837 # Portland Group f77 and f90 compilers 5838 _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' 5839 tmp_addflag=' $pic_flag -Mnomain' ;; 5840 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5841 tmp_addflag=' -i_dynamic' ;; 5842 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5843 tmp_addflag=' -i_dynamic -nofor_main' ;; 5844 ifc* | ifort*) # Intel Fortran compiler 5845 tmp_addflag=' -nofor_main' ;; 5846 lf95*) # Lahey Fortran 8.1 5847 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5848 tmp_sharedflag='--shared' ;; 5849 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5850 tmp_sharedflag='-qmkshrobj' 5851 tmp_addflag= ;; 5852 nvcc*) # Cuda Compiler Driver 2.2 5853 _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' 5854 _LT_TAGVAR(compiler_needs_object, $1)=yes 5855 ;; 5856 esac 5857 case `$CC -V 2>&1 | sed 5q` in 5858 *Sun\ C*) # Sun C 5.9 5859 _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' 5860 _LT_TAGVAR(compiler_needs_object, $1)=yes 5861 tmp_sharedflag='-G' ;; 5862 *Sun\ F*) # Sun Fortran 8.3 5863 tmp_sharedflag='-G' ;; 5864 esac 5865 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5866 5867 if test "x$supports_anon_versioning" = xyes; then 5868 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5869 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5870 echo "local: *; };" >> $output_objdir/$libname.ver~ 5871 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5872 fi 5873 5874 case $cc_basename in 5875 xlf* | bgf* | bgxlf* | mpixlf*) 5876 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5877 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5878 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5879 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5880 if test "x$supports_anon_versioning" = xyes; then 5881 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5882 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5883 echo "local: *; };" >> $output_objdir/$libname.ver~ 5884 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5885 fi 5886 ;; 5887 esac 5888 else 5889 _LT_TAGVAR(ld_shlibs, $1)=no 5890 fi 5891 ;; 5892 5893 netbsd*) 5894 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5895 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5896 wlarc= 5897 else 5898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5899 _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' 5900 fi 5901 ;; 5902 5903 solaris*) 5904 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5905 _LT_TAGVAR(ld_shlibs, $1)=no 5906 cat <<_LT_EOF 1>&2 5907 5908*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5909*** create shared libraries on Solaris systems. Therefore, libtool 5910*** is disabling shared libraries support. We urge you to upgrade GNU 5911*** binutils to release 2.9.1 or newer. Another option is to modify 5912*** your PATH or compiler configuration so that the native linker is 5913*** used, and then restart. 5914 5915_LT_EOF 5916 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5918 _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' 5919 else 5920 _LT_TAGVAR(ld_shlibs, $1)=no 5921 fi 5922 ;; 5923 5924 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5925 case `$LD -v 2>&1` in 5926 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5927 _LT_TAGVAR(ld_shlibs, $1)=no 5928 cat <<_LT_EOF 1>&2 5929 5930*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5931*** reliably create shared libraries on SCO systems. Therefore, libtool 5932*** is disabling shared libraries support. We urge you to upgrade GNU 5933*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5934*** your PATH or compiler configuration so that the native linker is 5935*** used, and then restart. 5936 5937_LT_EOF 5938 ;; 5939 *) 5940 # For security reasons, it is highly recommended that you always 5941 # use absolute paths for naming shared libraries, and exclude the 5942 # DT_RUNPATH tag from executables and libraries. But doing so 5943 # requires that you compile everything twice, which is a pain. 5944 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5946 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5947 _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' 5948 else 5949 _LT_TAGVAR(ld_shlibs, $1)=no 5950 fi 5951 ;; 5952 esac 5953 ;; 5954 5955 sunos4*) 5956 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5957 wlarc= 5958 _LT_TAGVAR(hardcode_direct, $1)=yes 5959 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5960 ;; 5961 5962 *) 5963 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5964 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5965 _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' 5966 else 5967 _LT_TAGVAR(ld_shlibs, $1)=no 5968 fi 5969 ;; 5970 esac 5971 5972 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 5973 runpath_var= 5974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5975 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5976 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5977 fi 5978 else 5979 # PORTME fill in a description of your system's linker (not GNU ld) 5980 case $host_os in 5981 aix3*) 5982 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5983 _LT_TAGVAR(always_export_symbols, $1)=yes 5984 _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' 5985 # Note: this linker hardcodes the directories in LIBPATH if there 5986 # are no directories specified by -L. 5987 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5988 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5989 # Neither direct hardcoding nor static linking is supported with a 5990 # broken collect2. 5991 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5992 fi 5993 ;; 5994 5995 aix[[4-9]]*) 5996 if test "$host_cpu" = ia64; then 5997 # On IA64, the linker does run time linking by default, so we don't 5998 # have to do anything special. 5999 aix_use_runtimelinking=no 6000 exp_sym_flag='-Bexport' 6001 no_entry_flag="" 6002 else 6003 # If we're using GNU nm, then we don't want the "-C" option. 6004 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6005 # Also, AIX nm treats weak defined symbols like other global 6006 # defined symbols, whereas GNU nm marks them as "W". 6007 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6008 _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' 6009 else 6010 _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' 6011 fi 6012 aix_use_runtimelinking=no 6013 6014 # Test if we are trying to use run time linking or normal 6015 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6016 # need to do runtime linking. 6017 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6018 for ld_flag in $LDFLAGS; do 6019 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6020 aix_use_runtimelinking=yes 6021 break 6022 fi 6023 done 6024 ;; 6025 esac 6026 6027 exp_sym_flag='-bexport' 6028 no_entry_flag='-bnoentry' 6029 fi 6030 6031 # When large executables or shared objects are built, AIX ld can 6032 # have problems creating the table of contents. If linking a library 6033 # or program results in "error TOC overflow" add -mminimal-toc to 6034 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6035 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6036 6037 _LT_TAGVAR(archive_cmds, $1)='' 6038 _LT_TAGVAR(hardcode_direct, $1)=yes 6039 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6040 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6041 _LT_TAGVAR(link_all_deplibs, $1)=yes 6042 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6043 6044 if test "$GCC" = yes; then 6045 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6046 # We only want to do this on AIX 4.2 and lower, the check 6047 # below for broken collect2 doesn't work under 4.3+ 6048 collect2name=`${CC} -print-prog-name=collect2` 6049 if test -f "$collect2name" && 6050 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6051 then 6052 # We have reworked collect2 6053 : 6054 else 6055 # We have old collect2 6056 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6057 # It fails to find uninstalled libraries when the uninstalled 6058 # path is not listed in the libpath. Setting hardcode_minus_L 6059 # to unsupported forces relinking 6060 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6062 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6063 fi 6064 ;; 6065 esac 6066 shared_flag='-shared' 6067 if test "$aix_use_runtimelinking" = yes; then 6068 shared_flag="$shared_flag "'${wl}-G' 6069 fi 6070 else 6071 # not using gcc 6072 if test "$host_cpu" = ia64; then 6073 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6074 # chokes on -Wl,-G. The following line is correct: 6075 shared_flag='-G' 6076 else 6077 if test "$aix_use_runtimelinking" = yes; then 6078 shared_flag='${wl}-G' 6079 else 6080 shared_flag='${wl}-bM:SRE' 6081 fi 6082 fi 6083 fi 6084 6085 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6086 # It seems that -bexpall does not export symbols beginning with 6087 # underscore (_), so it is better to generate a list of symbols to export. 6088 _LT_TAGVAR(always_export_symbols, $1)=yes 6089 if test "$aix_use_runtimelinking" = yes; then 6090 # Warning - without using the other runtime loading flags (-brtl), 6091 # -berok will link without error, but may produce a broken library. 6092 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6093 # Determine the default libpath from the value encoded in an 6094 # empty executable. 6095 _LT_SYS_MODULE_PATH_AIX([$1]) 6096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6097 _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" 6098 else 6099 if test "$host_cpu" = ia64; then 6100 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6101 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6102 _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" 6103 else 6104 # Determine the default libpath from the value encoded in an 6105 # empty executable. 6106 _LT_SYS_MODULE_PATH_AIX([$1]) 6107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6108 # Warning - without using the other run time loading flags, 6109 # -berok will link without error, but may produce a broken library. 6110 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6111 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6112 if test "$with_gnu_ld" = yes; then 6113 # We only use this code for GNU lds that support --whole-archive. 6114 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6115 else 6116 # Exported symbols can be pulled into shared objects from archives 6117 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6118 fi 6119 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6120 # This is similar to how AIX traditionally builds its shared libraries. 6121 _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' 6122 fi 6123 fi 6124 ;; 6125 6126 amigaos*) 6127 case $host_cpu in 6128 powerpc) 6129 # see comment about AmigaOS4 .so support 6130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6131 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6132 ;; 6133 m68k) 6134 _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)' 6135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6136 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6137 ;; 6138 esac 6139 ;; 6140 6141 bsdi[[45]]*) 6142 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6143 ;; 6144 6145 cygwin* | mingw* | pw32* | cegcc*) 6146 # When not using gcc, we currently assume that we are using 6147 # Microsoft Visual C++. 6148 # hardcode_libdir_flag_spec is actually meaningless, as there is 6149 # no search path for DLLs. 6150 case $cc_basename in 6151 cl*) 6152 # Native MSVC 6153 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6154 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6155 _LT_TAGVAR(always_export_symbols, $1)=yes 6156 _LT_TAGVAR(file_list_spec, $1)='@' 6157 # Tell ltmain to make .lib files, not .a files. 6158 libext=lib 6159 # Tell ltmain to make .dll files, not .so files. 6160 shrext_cmds=".dll" 6161 # FIXME: Setting linknames here is a bad hack. 6162 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6163 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6164 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6165 else 6166 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6167 fi~ 6168 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6169 linknames=' 6170 # The linker will not automatically build a static lib if we build a DLL. 6171 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6172 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6173 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6174 _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' 6175 # Don't use ranlib 6176 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6177 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6178 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6179 case $lt_outputfile in 6180 *.exe|*.EXE) ;; 6181 *) 6182 lt_outputfile="$lt_outputfile.exe" 6183 lt_tool_outputfile="$lt_tool_outputfile.exe" 6184 ;; 6185 esac~ 6186 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6187 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6188 $RM "$lt_outputfile.manifest"; 6189 fi' 6190 ;; 6191 *) 6192 # Assume MSVC wrapper 6193 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6194 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6195 # Tell ltmain to make .lib files, not .a files. 6196 libext=lib 6197 # Tell ltmain to make .dll files, not .so files. 6198 shrext_cmds=".dll" 6199 # FIXME: Setting linknames here is a bad hack. 6200 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6201 # The linker will automatically build a .lib file if we build a DLL. 6202 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6203 # FIXME: Should let the user specify the lib program. 6204 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6205 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6206 ;; 6207 esac 6208 ;; 6209 6210 darwin* | rhapsody*) 6211 _LT_DARWIN_LINKER_FEATURES($1) 6212 ;; 6213 6214 dgux*) 6215 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6217 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6218 ;; 6219 6220 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6221 # support. Future versions do this automatically, but an explicit c++rt0.o 6222 # does not break anything, and helps significantly (at the cost of a little 6223 # extra space). 6224 freebsd2.2*) 6225 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6226 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6227 _LT_TAGVAR(hardcode_direct, $1)=yes 6228 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6229 ;; 6230 6231 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6232 freebsd2.*) 6233 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6234 _LT_TAGVAR(hardcode_direct, $1)=yes 6235 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6236 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6237 ;; 6238 6239 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6240 freebsd* | dragonfly*) 6241 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6243 _LT_TAGVAR(hardcode_direct, $1)=yes 6244 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6245 ;; 6246 6247 hpux9*) 6248 if test "$GCC" = yes; then 6249 _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' 6250 else 6251 _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' 6252 fi 6253 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6254 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6255 _LT_TAGVAR(hardcode_direct, $1)=yes 6256 6257 # hardcode_minus_L: Not really in the search PATH, 6258 # but as the default location of the library. 6259 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6260 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6261 ;; 6262 6263 hpux10*) 6264 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6266 else 6267 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6268 fi 6269 if test "$with_gnu_ld" = no; then 6270 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6271 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6272 _LT_TAGVAR(hardcode_direct, $1)=yes 6273 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6274 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6275 # hardcode_minus_L: Not really in the search PATH, 6276 # but as the default location of the library. 6277 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6278 fi 6279 ;; 6280 6281 hpux11*) 6282 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6283 case $host_cpu in 6284 hppa*64*) 6285 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6286 ;; 6287 ia64*) 6288 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6289 ;; 6290 *) 6291 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6292 ;; 6293 esac 6294 else 6295 case $host_cpu in 6296 hppa*64*) 6297 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6298 ;; 6299 ia64*) 6300 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6301 ;; 6302 *) 6303 m4_if($1, [], [ 6304 # Older versions of the 11.00 compiler do not understand -b yet 6305 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6306 _LT_LINKER_OPTION([if $CC understands -b], 6307 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6308 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6309 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6310 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6311 ;; 6312 esac 6313 fi 6314 if test "$with_gnu_ld" = no; then 6315 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6316 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6317 6318 case $host_cpu in 6319 hppa*64*|ia64*) 6320 _LT_TAGVAR(hardcode_direct, $1)=no 6321 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6322 ;; 6323 *) 6324 _LT_TAGVAR(hardcode_direct, $1)=yes 6325 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6326 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6327 6328 # hardcode_minus_L: Not really in the search PATH, 6329 # but as the default location of the library. 6330 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6331 ;; 6332 esac 6333 fi 6334 ;; 6335 6336 irix5* | irix6* | nonstopux*) 6337 if test "$GCC" = yes; then 6338 _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' 6339 # Try to use the -exported_symbol ld option, if it does not 6340 # work, assume that -exports_file does not work either and 6341 # implicitly export all symbols. 6342 # This should be the same for all languages, so no per-tag cache variable. 6343 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6344 [lt_cv_irix_exported_symbol], 6345 [save_LDFLAGS="$LDFLAGS" 6346 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6347 AC_LINK_IFELSE( 6348 [AC_LANG_SOURCE( 6349 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6350 [C++], [[int foo (void) { return 0; }]], 6351 [Fortran 77], [[ 6352 subroutine foo 6353 end]], 6354 [Fortran], [[ 6355 subroutine foo 6356 end]])])], 6357 [lt_cv_irix_exported_symbol=yes], 6358 [lt_cv_irix_exported_symbol=no]) 6359 LDFLAGS="$save_LDFLAGS"]) 6360 if test "$lt_cv_irix_exported_symbol" = yes; then 6361 _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' 6362 fi 6363 else 6364 _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' 6365 _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' 6366 fi 6367 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6369 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6370 _LT_TAGVAR(inherit_rpath, $1)=yes 6371 _LT_TAGVAR(link_all_deplibs, $1)=yes 6372 ;; 6373 6374 netbsd*) 6375 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6376 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6377 else 6378 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6379 fi 6380 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6381 _LT_TAGVAR(hardcode_direct, $1)=yes 6382 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6383 ;; 6384 6385 newsos6) 6386 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6387 _LT_TAGVAR(hardcode_direct, $1)=yes 6388 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6389 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6390 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6391 ;; 6392 6393 *nto* | *qnx*) 6394 ;; 6395 6396 openbsd*) 6397 if test -f /usr/libexec/ld.so; then 6398 _LT_TAGVAR(hardcode_direct, $1)=yes 6399 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6400 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6401 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6402 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6403 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6404 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6405 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6406 else 6407 case $host_os in 6408 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6409 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6411 ;; 6412 *) 6413 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6414 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6415 ;; 6416 esac 6417 fi 6418 else 6419 _LT_TAGVAR(ld_shlibs, $1)=no 6420 fi 6421 ;; 6422 6423 os2*) 6424 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6425 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6426 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6427 _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' 6428 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6429 ;; 6430 6431 osf3*) 6432 if test "$GCC" = yes; then 6433 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6434 _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' 6435 else 6436 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6437 _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' 6438 fi 6439 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6440 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6441 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6442 ;; 6443 6444 osf4* | osf5*) # as osf3* with the addition of -msym flag 6445 if test "$GCC" = yes; then 6446 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6447 _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' 6448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6449 else 6450 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6451 _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' 6452 _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~ 6453 $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' 6454 6455 # Both c and cxx compiler support -rpath directly 6456 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6457 fi 6458 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6459 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6460 ;; 6461 6462 solaris*) 6463 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6464 if test "$GCC" = yes; then 6465 wlarc='${wl}' 6466 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6467 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6468 $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' 6469 else 6470 case `$CC -V 2>&1` in 6471 *"Compilers 5.0"*) 6472 wlarc='' 6473 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6474 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6475 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6476 ;; 6477 *) 6478 wlarc='${wl}' 6479 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6480 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6481 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6482 ;; 6483 esac 6484 fi 6485 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6486 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6487 case $host_os in 6488 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6489 *) 6490 # The compiler driver will combine and reorder linker options, 6491 # but understands `-z linker_flag'. GCC discards it without `$wl', 6492 # but is careful enough not to reorder. 6493 # Supported since Solaris 2.6 (maybe 2.5.1?) 6494 if test "$GCC" = yes; then 6495 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6496 else 6497 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6498 fi 6499 ;; 6500 esac 6501 _LT_TAGVAR(link_all_deplibs, $1)=yes 6502 ;; 6503 6504 sunos4*) 6505 if test "x$host_vendor" = xsequent; then 6506 # Use $CC to link under sequent, because it throws in some extra .o 6507 # files that make .init and .fini sections work. 6508 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6509 else 6510 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6511 fi 6512 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6513 _LT_TAGVAR(hardcode_direct, $1)=yes 6514 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6515 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6516 ;; 6517 6518 sysv4) 6519 case $host_vendor in 6520 sni) 6521 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6522 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6523 ;; 6524 siemens) 6525 ## LD is ld it makes a PLAMLIB 6526 ## CC just makes a GrossModule. 6527 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6528 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6529 _LT_TAGVAR(hardcode_direct, $1)=no 6530 ;; 6531 motorola) 6532 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6533 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6534 ;; 6535 esac 6536 runpath_var='LD_RUN_PATH' 6537 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6538 ;; 6539 6540 sysv4.3*) 6541 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6542 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6543 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6544 ;; 6545 6546 sysv4*MP*) 6547 if test -d /usr/nec; then 6548 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6549 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6550 runpath_var=LD_RUN_PATH 6551 hardcode_runpath_var=yes 6552 _LT_TAGVAR(ld_shlibs, $1)=yes 6553 fi 6554 ;; 6555 6556 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6557 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6558 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6559 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6560 runpath_var='LD_RUN_PATH' 6561 6562 if test "$GCC" = yes; then 6563 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6564 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6565 else 6566 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6567 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6568 fi 6569 ;; 6570 6571 sysv5* | sco3.2v5* | sco5v6*) 6572 # Note: We can NOT use -z defs as we might desire, because we do not 6573 # link with -lc, and that would cause any symbols used from libc to 6574 # always be unresolved, which means just about no library would 6575 # ever link correctly. If we're not using GNU ld we use -z text 6576 # though, which does catch some bad symbols but isn't as heavy-handed 6577 # as -z defs. 6578 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6579 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6580 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6581 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6583 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6584 _LT_TAGVAR(link_all_deplibs, $1)=yes 6585 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6586 runpath_var='LD_RUN_PATH' 6587 6588 if test "$GCC" = yes; then 6589 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6590 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6591 else 6592 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6593 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6594 fi 6595 ;; 6596 6597 uts4*) 6598 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6599 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6600 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6601 ;; 6602 6603 *) 6604 _LT_TAGVAR(ld_shlibs, $1)=no 6605 ;; 6606 esac 6607 6608 if test x$host_vendor = xsni; then 6609 case $host in 6610 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6611 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6612 ;; 6613 esac 6614 fi 6615 fi 6616]) 6617AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6618test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6619 6620_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6621 6622_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6623_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6624_LT_DECL([], [extract_expsyms_cmds], [2], 6625 [The commands to extract the exported symbol list from a shared archive]) 6626 6627# 6628# Do we need to explicitly link libc? 6629# 6630case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6631x|xyes) 6632 # Assume -lc should be added 6633 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6634 6635 if test "$enable_shared" = yes && test "$GCC" = yes; then 6636 case $_LT_TAGVAR(archive_cmds, $1) in 6637 *'~'*) 6638 # FIXME: we may have to deal with multi-command sequences. 6639 ;; 6640 '$CC '*) 6641 # Test whether the compiler implicitly links with -lc since on some 6642 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6643 # to ld, don't add -lc before -lgcc. 6644 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6645 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6646 [$RM conftest* 6647 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6648 6649 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6650 soname=conftest 6651 lib=conftest 6652 libobjs=conftest.$ac_objext 6653 deplibs= 6654 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6655 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6656 compiler_flags=-v 6657 linker_flags=-v 6658 verstring= 6659 output_objdir=. 6660 libname=conftest 6661 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6662 _LT_TAGVAR(allow_undefined_flag, $1)= 6663 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6664 then 6665 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6666 else 6667 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6668 fi 6669 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6670 else 6671 cat conftest.err 1>&5 6672 fi 6673 $RM conftest* 6674 ]) 6675 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6676 ;; 6677 esac 6678 fi 6679 ;; 6680esac 6681 6682_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6683 [Whether or not to add -lc for building shared libraries]) 6684_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6685 [enable_shared_with_static_runtimes], [0], 6686 [Whether or not to disallow shared libs when runtime libs are static]) 6687_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6688 [Compiler flag to allow reflexive dlopens]) 6689_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6690 [Compiler flag to generate shared objects directly from archives]) 6691_LT_TAGDECL([], [compiler_needs_object], [1], 6692 [Whether the compiler copes with passing no objects directly]) 6693_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6694 [Create an old-style archive from a shared archive]) 6695_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6696 [Create a temporary old-style archive to link instead of a shared archive]) 6697_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6698_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6699_LT_TAGDECL([], [module_cmds], [2], 6700 [Commands used to build a loadable module if different from building 6701 a shared archive.]) 6702_LT_TAGDECL([], [module_expsym_cmds], [2]) 6703_LT_TAGDECL([], [with_gnu_ld], [1], 6704 [Whether we are building with GNU ld or not]) 6705_LT_TAGDECL([], [allow_undefined_flag], [1], 6706 [Flag that allows shared libraries with undefined symbols to be built]) 6707_LT_TAGDECL([], [no_undefined_flag], [1], 6708 [Flag that enforces no undefined symbols]) 6709_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6710 [Flag to hardcode $libdir into a binary during linking. 6711 This must work even if $libdir does not exist]) 6712_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6713 [Whether we need a single "-rpath" flag with a separated argument]) 6714_LT_TAGDECL([], [hardcode_direct], [0], 6715 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6716 DIR into the resulting binary]) 6717_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6718 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6719 DIR into the resulting binary and the resulting library dependency is 6720 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6721 library is relocated]) 6722_LT_TAGDECL([], [hardcode_minus_L], [0], 6723 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6724 into the resulting binary]) 6725_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6726 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6727 into the resulting binary]) 6728_LT_TAGDECL([], [hardcode_automatic], [0], 6729 [Set to "yes" if building a shared library automatically hardcodes DIR 6730 into the library and all subsequent libraries and executables linked 6731 against it]) 6732_LT_TAGDECL([], [inherit_rpath], [0], 6733 [Set to yes if linker adds runtime paths of dependent libraries 6734 to runtime path list]) 6735_LT_TAGDECL([], [link_all_deplibs], [0], 6736 [Whether libtool must link a program against all its dependency libraries]) 6737_LT_TAGDECL([], [always_export_symbols], [0], 6738 [Set to "yes" if exported symbols are required]) 6739_LT_TAGDECL([], [export_symbols_cmds], [2], 6740 [The commands to list exported symbols]) 6741_LT_TAGDECL([], [exclude_expsyms], [1], 6742 [Symbols that should not be listed in the preloaded symbols]) 6743_LT_TAGDECL([], [include_expsyms], [1], 6744 [Symbols that must always be exported]) 6745_LT_TAGDECL([], [prelink_cmds], [2], 6746 [Commands necessary for linking programs (against libraries) with templates]) 6747_LT_TAGDECL([], [postlink_cmds], [2], 6748 [Commands necessary for finishing linking programs]) 6749_LT_TAGDECL([], [file_list_spec], [1], 6750 [Specify filename containing input files]) 6751dnl FIXME: Not yet implemented 6752dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6753dnl [Compiler flag to generate thread safe objects]) 6754])# _LT_LINKER_SHLIBS 6755 6756 6757# _LT_LANG_C_CONFIG([TAG]) 6758# ------------------------ 6759# Ensure that the configuration variables for a C compiler are suitably 6760# defined. These variables are subsequently used by _LT_CONFIG to write 6761# the compiler configuration to `libtool'. 6762m4_defun([_LT_LANG_C_CONFIG], 6763[m4_require([_LT_DECL_EGREP])dnl 6764lt_save_CC="$CC" 6765AC_LANG_PUSH(C) 6766 6767# Source file extension for C test sources. 6768ac_ext=c 6769 6770# Object file extension for compiled C test sources. 6771objext=o 6772_LT_TAGVAR(objext, $1)=$objext 6773 6774# Code to be used in simple compile tests 6775lt_simple_compile_test_code="int some_variable = 0;" 6776 6777# Code to be used in simple link tests 6778lt_simple_link_test_code='int main(){return(0);}' 6779 6780_LT_TAG_COMPILER 6781# Save the default compiler, since it gets overwritten when the other 6782# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6783compiler_DEFAULT=$CC 6784 6785# save warnings/boilerplate of simple test code 6786_LT_COMPILER_BOILERPLATE 6787_LT_LINKER_BOILERPLATE 6788 6789if test -n "$compiler"; then 6790 _LT_COMPILER_NO_RTTI($1) 6791 _LT_COMPILER_PIC($1) 6792 _LT_COMPILER_C_O($1) 6793 _LT_COMPILER_FILE_LOCKS($1) 6794 _LT_LINKER_SHLIBS($1) 6795 _LT_SYS_DYNAMIC_LINKER($1) 6796 _LT_LINKER_HARDCODE_LIBPATH($1) 6797 LT_SYS_DLOPEN_SELF 6798 _LT_CMD_STRIPLIB 6799 6800 # Report which library types will actually be built 6801 AC_MSG_CHECKING([if libtool supports shared libraries]) 6802 AC_MSG_RESULT([$can_build_shared]) 6803 6804 AC_MSG_CHECKING([whether to build shared libraries]) 6805 test "$can_build_shared" = "no" && enable_shared=no 6806 6807 # On AIX, shared libraries and static libraries use the same namespace, and 6808 # are all built from PIC. 6809 case $host_os in 6810 aix3*) 6811 test "$enable_shared" = yes && enable_static=no 6812 if test -n "$RANLIB"; then 6813 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6814 postinstall_cmds='$RANLIB $lib' 6815 fi 6816 ;; 6817 6818 aix[[4-9]]*) 6819 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6820 test "$enable_shared" = yes && enable_static=no 6821 fi 6822 ;; 6823 esac 6824 AC_MSG_RESULT([$enable_shared]) 6825 6826 AC_MSG_CHECKING([whether to build static libraries]) 6827 # Make sure either enable_shared or enable_static is yes. 6828 test "$enable_shared" = yes || enable_static=yes 6829 AC_MSG_RESULT([$enable_static]) 6830 6831 _LT_CONFIG($1) 6832fi 6833AC_LANG_POP 6834CC="$lt_save_CC" 6835])# _LT_LANG_C_CONFIG 6836 6837 6838# _LT_LANG_CXX_CONFIG([TAG]) 6839# -------------------------- 6840# Ensure that the configuration variables for a C++ compiler are suitably 6841# defined. These variables are subsequently used by _LT_CONFIG to write 6842# the compiler configuration to `libtool'. 6843m4_defun([_LT_LANG_CXX_CONFIG], 6844[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6845m4_require([_LT_DECL_EGREP])dnl 6846m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6847if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6848 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6849 (test "X$CXX" != "Xg++"))) ; then 6850 AC_PROG_CXXCPP 6851else 6852 _lt_caught_CXX_error=yes 6853fi 6854 6855AC_LANG_PUSH(C++) 6856_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6857_LT_TAGVAR(allow_undefined_flag, $1)= 6858_LT_TAGVAR(always_export_symbols, $1)=no 6859_LT_TAGVAR(archive_expsym_cmds, $1)= 6860_LT_TAGVAR(compiler_needs_object, $1)=no 6861_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6862_LT_TAGVAR(hardcode_direct, $1)=no 6863_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6864_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6865_LT_TAGVAR(hardcode_libdir_separator, $1)= 6866_LT_TAGVAR(hardcode_minus_L, $1)=no 6867_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6868_LT_TAGVAR(hardcode_automatic, $1)=no 6869_LT_TAGVAR(inherit_rpath, $1)=no 6870_LT_TAGVAR(module_cmds, $1)= 6871_LT_TAGVAR(module_expsym_cmds, $1)= 6872_LT_TAGVAR(link_all_deplibs, $1)=unknown 6873_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6874_LT_TAGVAR(reload_flag, $1)=$reload_flag 6875_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6876_LT_TAGVAR(no_undefined_flag, $1)= 6877_LT_TAGVAR(whole_archive_flag_spec, $1)= 6878_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6879 6880# Source file extension for C++ test sources. 6881ac_ext=cpp 6882 6883# Object file extension for compiled C++ test sources. 6884objext=o 6885_LT_TAGVAR(objext, $1)=$objext 6886 6887# No sense in running all these tests if we already determined that 6888# the CXX compiler isn't working. Some variables (like enable_shared) 6889# are currently assumed to apply to all compilers on this platform, 6890# and will be corrupted by setting them based on a non-working compiler. 6891if test "$_lt_caught_CXX_error" != yes; then 6892 # Code to be used in simple compile tests 6893 lt_simple_compile_test_code="int some_variable = 0;" 6894 6895 # Code to be used in simple link tests 6896 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6897 6898 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6899 _LT_TAG_COMPILER 6900 6901 # save warnings/boilerplate of simple test code 6902 _LT_COMPILER_BOILERPLATE 6903 _LT_LINKER_BOILERPLATE 6904 6905 # Allow CC to be a program name with arguments. 6906 lt_save_CC=$CC 6907 lt_save_CFLAGS=$CFLAGS 6908 lt_save_LD=$LD 6909 lt_save_GCC=$GCC 6910 GCC=$GXX 6911 lt_save_with_gnu_ld=$with_gnu_ld 6912 lt_save_path_LD=$lt_cv_path_LD 6913 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6914 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6915 else 6916 $as_unset lt_cv_prog_gnu_ld 6917 fi 6918 if test -n "${lt_cv_path_LDCXX+set}"; then 6919 lt_cv_path_LD=$lt_cv_path_LDCXX 6920 else 6921 $as_unset lt_cv_path_LD 6922 fi 6923 test -z "${LDCXX+set}" || LD=$LDCXX 6924 CC=${CXX-"c++"} 6925 CFLAGS=$CXXFLAGS 6926 compiler=$CC 6927 _LT_TAGVAR(compiler, $1)=$CC 6928 _LT_CC_BASENAME([$compiler]) 6929 6930 if test -n "$compiler"; then 6931 # We don't want -fno-exception when compiling C++ code, so set the 6932 # no_builtin_flag separately 6933 if test "$GXX" = yes; then 6934 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6935 else 6936 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6937 fi 6938 6939 if test "$GXX" = yes; then 6940 # Set up default GNU C++ configuration 6941 6942 LT_PATH_LD 6943 6944 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6945 # archiving commands below assume that GNU ld is being used. 6946 if test "$with_gnu_ld" = yes; then 6947 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6948 _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' 6949 6950 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6951 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6952 6953 # If archive_cmds runs LD, not CC, wlarc should be empty 6954 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6955 # investigate it a little bit more. (MM) 6956 wlarc='${wl}' 6957 6958 # ancient GNU ld didn't support --whole-archive et. al. 6959 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6960 $GREP 'no-whole-archive' > /dev/null; then 6961 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6962 else 6963 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6964 fi 6965 else 6966 with_gnu_ld=no 6967 wlarc= 6968 6969 # A generic and very simple default shared library creation 6970 # command for GNU C++ for the case where it uses the native 6971 # linker, instead of GNU ld. If possible, this setting should 6972 # overridden to take advantage of the native linker features on 6973 # the platform it is being used on. 6974 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6975 fi 6976 6977 # Commands to make compiler produce verbose output that lists 6978 # what "hidden" libraries, object files and flags are used when 6979 # linking a shared library. 6980 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6981 6982 else 6983 GXX=no 6984 with_gnu_ld=no 6985 wlarc= 6986 fi 6987 6988 # PORTME: fill in a description of your system's C++ link characteristics 6989 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6990 _LT_TAGVAR(ld_shlibs, $1)=yes 6991 case $host_os in 6992 aix3*) 6993 # FIXME: insert proper C++ library support 6994 _LT_TAGVAR(ld_shlibs, $1)=no 6995 ;; 6996 aix[[4-9]]*) 6997 if test "$host_cpu" = ia64; then 6998 # On IA64, the linker does run time linking by default, so we don't 6999 # have to do anything special. 7000 aix_use_runtimelinking=no 7001 exp_sym_flag='-Bexport' 7002 no_entry_flag="" 7003 else 7004 aix_use_runtimelinking=no 7005 7006 # Test if we are trying to use run time linking or normal 7007 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7008 # need to do runtime linking. 7009 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7010 for ld_flag in $LDFLAGS; do 7011 case $ld_flag in 7012 *-brtl*) 7013 aix_use_runtimelinking=yes 7014 break 7015 ;; 7016 esac 7017 done 7018 ;; 7019 esac 7020 7021 exp_sym_flag='-bexport' 7022 no_entry_flag='-bnoentry' 7023 fi 7024 7025 # When large executables or shared objects are built, AIX ld can 7026 # have problems creating the table of contents. If linking a library 7027 # or program results in "error TOC overflow" add -mminimal-toc to 7028 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7029 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7030 7031 _LT_TAGVAR(archive_cmds, $1)='' 7032 _LT_TAGVAR(hardcode_direct, $1)=yes 7033 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7034 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7035 _LT_TAGVAR(link_all_deplibs, $1)=yes 7036 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7037 7038 if test "$GXX" = yes; then 7039 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7040 # We only want to do this on AIX 4.2 and lower, the check 7041 # below for broken collect2 doesn't work under 4.3+ 7042 collect2name=`${CC} -print-prog-name=collect2` 7043 if test -f "$collect2name" && 7044 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7045 then 7046 # We have reworked collect2 7047 : 7048 else 7049 # We have old collect2 7050 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7051 # It fails to find uninstalled libraries when the uninstalled 7052 # path is not listed in the libpath. Setting hardcode_minus_L 7053 # to unsupported forces relinking 7054 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7056 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7057 fi 7058 esac 7059 shared_flag='-shared' 7060 if test "$aix_use_runtimelinking" = yes; then 7061 shared_flag="$shared_flag "'${wl}-G' 7062 fi 7063 else 7064 # not using gcc 7065 if test "$host_cpu" = ia64; then 7066 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7067 # chokes on -Wl,-G. The following line is correct: 7068 shared_flag='-G' 7069 else 7070 if test "$aix_use_runtimelinking" = yes; then 7071 shared_flag='${wl}-G' 7072 else 7073 shared_flag='${wl}-bM:SRE' 7074 fi 7075 fi 7076 fi 7077 7078 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7079 # It seems that -bexpall does not export symbols beginning with 7080 # underscore (_), so it is better to generate a list of symbols to 7081 # export. 7082 _LT_TAGVAR(always_export_symbols, $1)=yes 7083 if test "$aix_use_runtimelinking" = yes; then 7084 # Warning - without using the other runtime loading flags (-brtl), 7085 # -berok will link without error, but may produce a broken library. 7086 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7087 # Determine the default libpath from the value encoded in an empty 7088 # executable. 7089 _LT_SYS_MODULE_PATH_AIX([$1]) 7090 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7091 7092 _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" 7093 else 7094 if test "$host_cpu" = ia64; then 7095 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7096 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7097 _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" 7098 else 7099 # Determine the default libpath from the value encoded in an 7100 # empty executable. 7101 _LT_SYS_MODULE_PATH_AIX([$1]) 7102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7103 # Warning - without using the other run time loading flags, 7104 # -berok will link without error, but may produce a broken library. 7105 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7106 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7107 if test "$with_gnu_ld" = yes; then 7108 # We only use this code for GNU lds that support --whole-archive. 7109 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7110 else 7111 # Exported symbols can be pulled into shared objects from archives 7112 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7113 fi 7114 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7115 # This is similar to how AIX traditionally builds its shared 7116 # libraries. 7117 _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' 7118 fi 7119 fi 7120 ;; 7121 7122 beos*) 7123 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7124 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7125 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7126 # support --undefined. This deserves some investigation. FIXME 7127 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7128 else 7129 _LT_TAGVAR(ld_shlibs, $1)=no 7130 fi 7131 ;; 7132 7133 chorus*) 7134 case $cc_basename in 7135 *) 7136 # FIXME: insert proper C++ library support 7137 _LT_TAGVAR(ld_shlibs, $1)=no 7138 ;; 7139 esac 7140 ;; 7141 7142 cygwin* | mingw* | pw32* | cegcc*) 7143 case $GXX,$cc_basename in 7144 ,cl* | no,cl*) 7145 # Native MSVC 7146 # hardcode_libdir_flag_spec is actually meaningless, as there is 7147 # no search path for DLLs. 7148 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7149 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7150 _LT_TAGVAR(always_export_symbols, $1)=yes 7151 _LT_TAGVAR(file_list_spec, $1)='@' 7152 # Tell ltmain to make .lib files, not .a files. 7153 libext=lib 7154 # Tell ltmain to make .dll files, not .so files. 7155 shrext_cmds=".dll" 7156 # FIXME: Setting linknames here is a bad hack. 7157 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7158 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7159 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7160 else 7161 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7162 fi~ 7163 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7164 linknames=' 7165 # The linker will not automatically build a static lib if we build a DLL. 7166 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7167 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7168 # Don't use ranlib 7169 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7170 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7171 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7172 case $lt_outputfile in 7173 *.exe|*.EXE) ;; 7174 *) 7175 lt_outputfile="$lt_outputfile.exe" 7176 lt_tool_outputfile="$lt_tool_outputfile.exe" 7177 ;; 7178 esac~ 7179 func_to_tool_file "$lt_outputfile"~ 7180 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7181 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7182 $RM "$lt_outputfile.manifest"; 7183 fi' 7184 ;; 7185 *) 7186 # g++ 7187 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7188 # as there is no search path for DLLs. 7189 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7190 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7191 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7192 _LT_TAGVAR(always_export_symbols, $1)=no 7193 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7194 7195 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7196 _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' 7197 # If the export-symbols file already is a .def file (1st line 7198 # is EXPORTS), use it as is; otherwise, prepend... 7199 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7200 cp $export_symbols $output_objdir/$soname.def; 7201 else 7202 echo EXPORTS > $output_objdir/$soname.def; 7203 cat $export_symbols >> $output_objdir/$soname.def; 7204 fi~ 7205 $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' 7206 else 7207 _LT_TAGVAR(ld_shlibs, $1)=no 7208 fi 7209 ;; 7210 esac 7211 ;; 7212 darwin* | rhapsody*) 7213 _LT_DARWIN_LINKER_FEATURES($1) 7214 ;; 7215 7216 dgux*) 7217 case $cc_basename in 7218 ec++*) 7219 # FIXME: insert proper C++ library support 7220 _LT_TAGVAR(ld_shlibs, $1)=no 7221 ;; 7222 ghcx*) 7223 # Green Hills C++ Compiler 7224 # FIXME: insert proper C++ library support 7225 _LT_TAGVAR(ld_shlibs, $1)=no 7226 ;; 7227 *) 7228 # FIXME: insert proper C++ library support 7229 _LT_TAGVAR(ld_shlibs, $1)=no 7230 ;; 7231 esac 7232 ;; 7233 7234 freebsd2.*) 7235 # C++ shared libraries reported to be fairly broken before 7236 # switch to ELF 7237 _LT_TAGVAR(ld_shlibs, $1)=no 7238 ;; 7239 7240 freebsd-elf*) 7241 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7242 ;; 7243 7244 freebsd* | dragonfly*) 7245 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7246 # conventions 7247 _LT_TAGVAR(ld_shlibs, $1)=yes 7248 ;; 7249 7250 gnu*) 7251 ;; 7252 7253 haiku*) 7254 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7255 _LT_TAGVAR(link_all_deplibs, $1)=yes 7256 ;; 7257 7258 hpux9*) 7259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7260 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7261 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7262 _LT_TAGVAR(hardcode_direct, $1)=yes 7263 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7264 # but as the default 7265 # location of the library. 7266 7267 case $cc_basename in 7268 CC*) 7269 # FIXME: insert proper C++ library support 7270 _LT_TAGVAR(ld_shlibs, $1)=no 7271 ;; 7272 aCC*) 7273 _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' 7274 # Commands to make compiler produce verbose output that lists 7275 # what "hidden" libraries, object files and flags are used when 7276 # linking a shared library. 7277 # 7278 # There doesn't appear to be a way to prevent this compiler from 7279 # explicitly linking system object files so we need to strip them 7280 # from the output so that they don't get included in the library 7281 # dependencies. 7282 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"' 7283 ;; 7284 *) 7285 if test "$GXX" = yes; then 7286 _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' 7287 else 7288 # FIXME: insert proper C++ library support 7289 _LT_TAGVAR(ld_shlibs, $1)=no 7290 fi 7291 ;; 7292 esac 7293 ;; 7294 7295 hpux10*|hpux11*) 7296 if test $with_gnu_ld = no; then 7297 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7298 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7299 7300 case $host_cpu in 7301 hppa*64*|ia64*) 7302 ;; 7303 *) 7304 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7305 ;; 7306 esac 7307 fi 7308 case $host_cpu in 7309 hppa*64*|ia64*) 7310 _LT_TAGVAR(hardcode_direct, $1)=no 7311 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7312 ;; 7313 *) 7314 _LT_TAGVAR(hardcode_direct, $1)=yes 7315 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7316 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7317 # but as the default 7318 # location of the library. 7319 ;; 7320 esac 7321 7322 case $cc_basename in 7323 CC*) 7324 # FIXME: insert proper C++ library support 7325 _LT_TAGVAR(ld_shlibs, $1)=no 7326 ;; 7327 aCC*) 7328 case $host_cpu in 7329 hppa*64*) 7330 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7331 ;; 7332 ia64*) 7333 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7334 ;; 7335 *) 7336 _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' 7337 ;; 7338 esac 7339 # Commands to make compiler produce verbose output that lists 7340 # what "hidden" libraries, object files and flags are used when 7341 # linking a shared library. 7342 # 7343 # There doesn't appear to be a way to prevent this compiler from 7344 # explicitly linking system object files so we need to strip them 7345 # from the output so that they don't get included in the library 7346 # dependencies. 7347 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"' 7348 ;; 7349 *) 7350 if test "$GXX" = yes; then 7351 if test $with_gnu_ld = no; then 7352 case $host_cpu in 7353 hppa*64*) 7354 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7355 ;; 7356 ia64*) 7357 _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' 7358 ;; 7359 *) 7360 _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' 7361 ;; 7362 esac 7363 fi 7364 else 7365 # FIXME: insert proper C++ library support 7366 _LT_TAGVAR(ld_shlibs, $1)=no 7367 fi 7368 ;; 7369 esac 7370 ;; 7371 7372 interix[[3-9]]*) 7373 _LT_TAGVAR(hardcode_direct, $1)=no 7374 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7375 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7376 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7377 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7378 # Instead, shared libraries are loaded at an image base (0x10000000 by 7379 # default) and relocated if they conflict, which is a slow very memory 7380 # consuming and fragmenting process. To avoid this, we pick a random, 7381 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7382 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7383 _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' 7384 _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' 7385 ;; 7386 irix5* | irix6*) 7387 case $cc_basename in 7388 CC*) 7389 # SGI C++ 7390 _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' 7391 7392 # Archives containing C++ object files must be created using 7393 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7394 # necessary to make sure instantiated templates are included 7395 # in the archive. 7396 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7397 ;; 7398 *) 7399 if test "$GXX" = yes; then 7400 if test "$with_gnu_ld" = no; then 7401 _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' 7402 else 7403 _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' 7404 fi 7405 fi 7406 _LT_TAGVAR(link_all_deplibs, $1)=yes 7407 ;; 7408 esac 7409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7410 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7411 _LT_TAGVAR(inherit_rpath, $1)=yes 7412 ;; 7413 7414 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7415 case $cc_basename in 7416 KCC*) 7417 # Kuck and Associates, Inc. (KAI) C++ Compiler 7418 7419 # KCC will only create a shared library if the output file 7420 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7421 # to its proper name (with version) after linking. 7422 _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' 7423 _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' 7424 # Commands to make compiler produce verbose output that lists 7425 # what "hidden" libraries, object files and flags are used when 7426 # linking a shared library. 7427 # 7428 # There doesn't appear to be a way to prevent this compiler from 7429 # explicitly linking system object files so we need to strip them 7430 # from the output so that they don't get included in the library 7431 # dependencies. 7432 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"' 7433 7434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7435 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7436 7437 # Archives containing C++ object files must be created using 7438 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7439 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7440 ;; 7441 icpc* | ecpc* ) 7442 # Intel C++ 7443 with_gnu_ld=yes 7444 # version 8.0 and above of icpc choke on multiply defined symbols 7445 # if we add $predep_objects and $postdep_objects, however 7.1 and 7446 # earlier do not add the objects themselves. 7447 case `$CC -V 2>&1` in 7448 *"Version 7."*) 7449 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7450 _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' 7451 ;; 7452 *) # Version 8.0 or newer 7453 tmp_idyn= 7454 case $host_cpu in 7455 ia64*) tmp_idyn=' -i_dynamic';; 7456 esac 7457 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7458 _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' 7459 ;; 7460 esac 7461 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7462 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7463 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7464 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7465 ;; 7466 pgCC* | pgcpp*) 7467 # Portland Group C++ compiler 7468 case `$CC -V` in 7469 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7470 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7471 rm -rf $tpldir~ 7472 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7473 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7474 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7475 rm -rf $tpldir~ 7476 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7477 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7478 $RANLIB $oldlib' 7479 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7480 rm -rf $tpldir~ 7481 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7482 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7483 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7484 rm -rf $tpldir~ 7485 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7486 $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' 7487 ;; 7488 *) # Version 6 and above use weak symbols 7489 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7490 _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' 7491 ;; 7492 esac 7493 7494 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7495 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7496 _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' 7497 ;; 7498 cxx*) 7499 # Compaq C++ 7500 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7501 _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' 7502 7503 runpath_var=LD_RUN_PATH 7504 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7505 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7506 7507 # Commands to make compiler produce verbose output that lists 7508 # what "hidden" libraries, object files and flags are used when 7509 # linking a shared library. 7510 # 7511 # There doesn't appear to be a way to prevent this compiler from 7512 # explicitly linking system object files so we need to strip them 7513 # from the output so that they don't get included in the library 7514 # dependencies. 7515 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' 7516 ;; 7517 xl* | mpixl* | bgxl*) 7518 # IBM XL 8.0 on PPC, with GNU ld 7519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7520 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7521 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7522 if test "x$supports_anon_versioning" = xyes; then 7523 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7524 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7525 echo "local: *; };" >> $output_objdir/$libname.ver~ 7526 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7527 fi 7528 ;; 7529 *) 7530 case `$CC -V 2>&1 | sed 5q` in 7531 *Sun\ C*) 7532 # Sun C++ 5.9 7533 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7534 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7535 _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' 7536 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7537 _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' 7538 _LT_TAGVAR(compiler_needs_object, $1)=yes 7539 7540 # Not sure whether something based on 7541 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7542 # would be better. 7543 output_verbose_link_cmd='func_echo_all' 7544 7545 # Archives containing C++ object files must be created using 7546 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7547 # necessary to make sure instantiated templates are included 7548 # in the archive. 7549 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7550 ;; 7551 esac 7552 ;; 7553 esac 7554 ;; 7555 7556 lynxos*) 7557 # FIXME: insert proper C++ library support 7558 _LT_TAGVAR(ld_shlibs, $1)=no 7559 ;; 7560 7561 m88k*) 7562 # FIXME: insert proper C++ library support 7563 _LT_TAGVAR(ld_shlibs, $1)=no 7564 ;; 7565 7566 mvs*) 7567 case $cc_basename in 7568 cxx*) 7569 # FIXME: insert proper C++ library support 7570 _LT_TAGVAR(ld_shlibs, $1)=no 7571 ;; 7572 *) 7573 # FIXME: insert proper C++ library support 7574 _LT_TAGVAR(ld_shlibs, $1)=no 7575 ;; 7576 esac 7577 ;; 7578 7579 netbsd*) 7580 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7581 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7582 wlarc= 7583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7584 _LT_TAGVAR(hardcode_direct, $1)=yes 7585 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7586 fi 7587 # Workaround some broken pre-1.5 toolchains 7588 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7589 ;; 7590 7591 *nto* | *qnx*) 7592 _LT_TAGVAR(ld_shlibs, $1)=yes 7593 ;; 7594 7595 openbsd2*) 7596 # C++ shared libraries are fairly broken 7597 _LT_TAGVAR(ld_shlibs, $1)=no 7598 ;; 7599 7600 openbsd*) 7601 if test -f /usr/libexec/ld.so; then 7602 _LT_TAGVAR(hardcode_direct, $1)=yes 7603 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7604 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7605 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7606 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7607 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7608 _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' 7609 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7610 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7611 fi 7612 output_verbose_link_cmd=func_echo_all 7613 else 7614 _LT_TAGVAR(ld_shlibs, $1)=no 7615 fi 7616 ;; 7617 7618 osf3* | osf4* | osf5*) 7619 case $cc_basename in 7620 KCC*) 7621 # Kuck and Associates, Inc. (KAI) C++ Compiler 7622 7623 # KCC will only create a shared library if the output file 7624 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7625 # to its proper name (with version) after linking. 7626 _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' 7627 7628 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7629 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7630 7631 # Archives containing C++ object files must be created using 7632 # the KAI C++ compiler. 7633 case $host in 7634 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7635 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7636 esac 7637 ;; 7638 RCC*) 7639 # Rational C++ 2.4.1 7640 # FIXME: insert proper C++ library support 7641 _LT_TAGVAR(ld_shlibs, $1)=no 7642 ;; 7643 cxx*) 7644 case $host in 7645 osf3*) 7646 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7647 _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' 7648 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7649 ;; 7650 *) 7651 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7652 _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' 7653 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7654 echo "-hidden">> $lib.exp~ 7655 $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~ 7656 $RM $lib.exp' 7657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7658 ;; 7659 esac 7660 7661 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7662 7663 # Commands to make compiler produce verbose output that lists 7664 # what "hidden" libraries, object files and flags are used when 7665 # linking a shared library. 7666 # 7667 # There doesn't appear to be a way to prevent this compiler from 7668 # explicitly linking system object files so we need to strip them 7669 # from the output so that they don't get included in the library 7670 # dependencies. 7671 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"' 7672 ;; 7673 *) 7674 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7675 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7676 case $host in 7677 osf3*) 7678 _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' 7679 ;; 7680 *) 7681 _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' 7682 ;; 7683 esac 7684 7685 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7686 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7687 7688 # Commands to make compiler produce verbose output that lists 7689 # what "hidden" libraries, object files and flags are used when 7690 # linking a shared library. 7691 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7692 7693 else 7694 # FIXME: insert proper C++ library support 7695 _LT_TAGVAR(ld_shlibs, $1)=no 7696 fi 7697 ;; 7698 esac 7699 ;; 7700 7701 psos*) 7702 # FIXME: insert proper C++ library support 7703 _LT_TAGVAR(ld_shlibs, $1)=no 7704 ;; 7705 7706 sunos4*) 7707 case $cc_basename in 7708 CC*) 7709 # Sun C++ 4.x 7710 # FIXME: insert proper C++ library support 7711 _LT_TAGVAR(ld_shlibs, $1)=no 7712 ;; 7713 lcc*) 7714 # Lucid 7715 # FIXME: insert proper C++ library support 7716 _LT_TAGVAR(ld_shlibs, $1)=no 7717 ;; 7718 *) 7719 # FIXME: insert proper C++ library support 7720 _LT_TAGVAR(ld_shlibs, $1)=no 7721 ;; 7722 esac 7723 ;; 7724 7725 solaris*) 7726 case $cc_basename in 7727 CC* | sunCC*) 7728 # Sun C++ 4.2, 5.x and Centerline C++ 7729 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7730 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7731 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7732 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7733 $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' 7734 7735 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7736 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7737 case $host_os in 7738 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7739 *) 7740 # The compiler driver will combine and reorder linker options, 7741 # but understands `-z linker_flag'. 7742 # Supported since Solaris 2.6 (maybe 2.5.1?) 7743 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7744 ;; 7745 esac 7746 _LT_TAGVAR(link_all_deplibs, $1)=yes 7747 7748 output_verbose_link_cmd='func_echo_all' 7749 7750 # Archives containing C++ object files must be created using 7751 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7752 # necessary to make sure instantiated templates are included 7753 # in the archive. 7754 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7755 ;; 7756 gcx*) 7757 # Green Hills C++ Compiler 7758 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7759 7760 # The C++ compiler must be used to create the archive. 7761 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7762 ;; 7763 *) 7764 # GNU C++ compiler with Solaris linker 7765 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7766 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7767 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7768 _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' 7769 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7770 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7771 7772 # Commands to make compiler produce verbose output that lists 7773 # what "hidden" libraries, object files and flags are used when 7774 # linking a shared library. 7775 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7776 else 7777 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7778 # platform. 7779 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7780 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7781 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7782 7783 # Commands to make compiler produce verbose output that lists 7784 # what "hidden" libraries, object files and flags are used when 7785 # linking a shared library. 7786 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7787 fi 7788 7789 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7790 case $host_os in 7791 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7792 *) 7793 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7794 ;; 7795 esac 7796 fi 7797 ;; 7798 esac 7799 ;; 7800 7801 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7802 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7803 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7804 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7805 runpath_var='LD_RUN_PATH' 7806 7807 case $cc_basename in 7808 CC*) 7809 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7810 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7811 ;; 7812 *) 7813 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7814 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7815 ;; 7816 esac 7817 ;; 7818 7819 sysv5* | sco3.2v5* | sco5v6*) 7820 # Note: We can NOT use -z defs as we might desire, because we do not 7821 # link with -lc, and that would cause any symbols used from libc to 7822 # always be unresolved, which means just about no library would 7823 # ever link correctly. If we're not using GNU ld we use -z text 7824 # though, which does catch some bad symbols but isn't as heavy-handed 7825 # as -z defs. 7826 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7827 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7828 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7829 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7831 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7832 _LT_TAGVAR(link_all_deplibs, $1)=yes 7833 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7834 runpath_var='LD_RUN_PATH' 7835 7836 case $cc_basename in 7837 CC*) 7838 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7839 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7840 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7841 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7842 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7843 '"$_LT_TAGVAR(reload_cmds, $1)" 7844 ;; 7845 *) 7846 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7847 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7848 ;; 7849 esac 7850 ;; 7851 7852 tandem*) 7853 case $cc_basename in 7854 NCC*) 7855 # NonStop-UX NCC 3.20 7856 # FIXME: insert proper C++ library support 7857 _LT_TAGVAR(ld_shlibs, $1)=no 7858 ;; 7859 *) 7860 # FIXME: insert proper C++ library support 7861 _LT_TAGVAR(ld_shlibs, $1)=no 7862 ;; 7863 esac 7864 ;; 7865 7866 vxworks*) 7867 # FIXME: insert proper C++ library support 7868 _LT_TAGVAR(ld_shlibs, $1)=no 7869 ;; 7870 7871 *) 7872 # FIXME: insert proper C++ library support 7873 _LT_TAGVAR(ld_shlibs, $1)=no 7874 ;; 7875 esac 7876 7877 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7878 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7879 7880 _LT_TAGVAR(GCC, $1)="$GXX" 7881 _LT_TAGVAR(LD, $1)="$LD" 7882 7883 ## CAVEAT EMPTOR: 7884 ## There is no encapsulation within the following macros, do not change 7885 ## the running order or otherwise move them around unless you know exactly 7886 ## what you are doing... 7887 _LT_SYS_HIDDEN_LIBDEPS($1) 7888 _LT_COMPILER_PIC($1) 7889 _LT_COMPILER_C_O($1) 7890 _LT_COMPILER_FILE_LOCKS($1) 7891 _LT_LINKER_SHLIBS($1) 7892 _LT_SYS_DYNAMIC_LINKER($1) 7893 _LT_LINKER_HARDCODE_LIBPATH($1) 7894 7895 _LT_CONFIG($1) 7896 fi # test -n "$compiler" 7897 7898 CC=$lt_save_CC 7899 CFLAGS=$lt_save_CFLAGS 7900 LDCXX=$LD 7901 LD=$lt_save_LD 7902 GCC=$lt_save_GCC 7903 with_gnu_ld=$lt_save_with_gnu_ld 7904 lt_cv_path_LDCXX=$lt_cv_path_LD 7905 lt_cv_path_LD=$lt_save_path_LD 7906 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7907 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7908fi # test "$_lt_caught_CXX_error" != yes 7909 7910AC_LANG_POP 7911])# _LT_LANG_CXX_CONFIG 7912 7913 7914# _LT_FUNC_STRIPNAME_CNF 7915# ---------------------- 7916# func_stripname_cnf prefix suffix name 7917# strip PREFIX and SUFFIX off of NAME. 7918# PREFIX and SUFFIX must not contain globbing or regex special 7919# characters, hashes, percent signs, but SUFFIX may contain a leading 7920# dot (in which case that matches only a dot). 7921# 7922# This function is identical to the (non-XSI) version of func_stripname, 7923# except this one can be used by m4 code that may be executed by configure, 7924# rather than the libtool script. 7925m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7926AC_REQUIRE([_LT_DECL_SED]) 7927AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7928func_stripname_cnf () 7929{ 7930 case ${2} in 7931 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 7932 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7933 esac 7934} # func_stripname_cnf 7935])# _LT_FUNC_STRIPNAME_CNF 7936 7937# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7938# --------------------------------- 7939# Figure out "hidden" library dependencies from verbose 7940# compiler output when linking a shared library. 7941# Parse the compiler output and extract the necessary 7942# objects, libraries and library flags. 7943m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7944[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7945AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7946# Dependencies to place before and after the object being linked: 7947_LT_TAGVAR(predep_objects, $1)= 7948_LT_TAGVAR(postdep_objects, $1)= 7949_LT_TAGVAR(predeps, $1)= 7950_LT_TAGVAR(postdeps, $1)= 7951_LT_TAGVAR(compiler_lib_search_path, $1)= 7952 7953dnl we can't use the lt_simple_compile_test_code here, 7954dnl because it contains code intended for an executable, 7955dnl not a library. It's possible we should let each 7956dnl tag define a new lt_????_link_test_code variable, 7957dnl but it's only used here... 7958m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7959int a; 7960void foo (void) { a = 0; } 7961_LT_EOF 7962], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7963class Foo 7964{ 7965public: 7966 Foo (void) { a = 0; } 7967private: 7968 int a; 7969}; 7970_LT_EOF 7971], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7972 subroutine foo 7973 implicit none 7974 integer*4 a 7975 a=0 7976 return 7977 end 7978_LT_EOF 7979], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7980 subroutine foo 7981 implicit none 7982 integer a 7983 a=0 7984 return 7985 end 7986_LT_EOF 7987], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7988public class foo { 7989 private int a; 7990 public void bar (void) { 7991 a = 0; 7992 } 7993}; 7994_LT_EOF 7995], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7996package foo 7997func foo() { 7998} 7999_LT_EOF 8000]) 8001 8002_lt_libdeps_save_CFLAGS=$CFLAGS 8003case "$CC $CFLAGS " in #( 8004*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8005*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8006*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8007esac 8008 8009dnl Parse the compiler output and extract the necessary 8010dnl objects, libraries and library flags. 8011if AC_TRY_EVAL(ac_compile); then 8012 # Parse the compiler output and extract the necessary 8013 # objects, libraries and library flags. 8014 8015 # Sentinel used to keep track of whether or not we are before 8016 # the conftest object file. 8017 pre_test_object_deps_done=no 8018 8019 for p in `eval "$output_verbose_link_cmd"`; do 8020 case ${prev}${p} in 8021 8022 -L* | -R* | -l*) 8023 # Some compilers place space between "-{L,R}" and the path. 8024 # Remove the space. 8025 if test $p = "-L" || 8026 test $p = "-R"; then 8027 prev=$p 8028 continue 8029 fi 8030 8031 # Expand the sysroot to ease extracting the directories later. 8032 if test -z "$prev"; then 8033 case $p in 8034 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8035 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8036 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8037 esac 8038 fi 8039 case $p in 8040 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8041 esac 8042 if test "$pre_test_object_deps_done" = no; then 8043 case ${prev} in 8044 -L | -R) 8045 # Internal compiler library paths should come after those 8046 # provided the user. The postdeps already come after the 8047 # user supplied libs so there is no need to process them. 8048 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8049 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8050 else 8051 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8052 fi 8053 ;; 8054 # The "-l" case would never come before the object being 8055 # linked, so don't bother handling this case. 8056 esac 8057 else 8058 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8059 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8060 else 8061 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8062 fi 8063 fi 8064 prev= 8065 ;; 8066 8067 *.lto.$objext) ;; # Ignore GCC LTO objects 8068 *.$objext) 8069 # This assumes that the test object file only shows up 8070 # once in the compiler output. 8071 if test "$p" = "conftest.$objext"; then 8072 pre_test_object_deps_done=yes 8073 continue 8074 fi 8075 8076 if test "$pre_test_object_deps_done" = no; then 8077 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8078 _LT_TAGVAR(predep_objects, $1)="$p" 8079 else 8080 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8081 fi 8082 else 8083 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8084 _LT_TAGVAR(postdep_objects, $1)="$p" 8085 else 8086 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8087 fi 8088 fi 8089 ;; 8090 8091 *) ;; # Ignore the rest. 8092 8093 esac 8094 done 8095 8096 # Clean up. 8097 rm -f a.out a.exe 8098else 8099 echo "libtool.m4: error: problem compiling $1 test program" 8100fi 8101 8102$RM -f confest.$objext 8103CFLAGS=$_lt_libdeps_save_CFLAGS 8104 8105# PORTME: override above test on systems where it is broken 8106m4_if([$1], [CXX], 8107[case $host_os in 8108interix[[3-9]]*) 8109 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8110 # hack all around it, let's just trust "g++" to DTRT. 8111 _LT_TAGVAR(predep_objects,$1)= 8112 _LT_TAGVAR(postdep_objects,$1)= 8113 _LT_TAGVAR(postdeps,$1)= 8114 ;; 8115 8116linux*) 8117 case `$CC -V 2>&1 | sed 5q` in 8118 *Sun\ C*) 8119 # Sun C++ 5.9 8120 8121 # The more standards-conforming stlport4 library is 8122 # incompatible with the Cstd library. Avoid specifying 8123 # it if it's in CXXFLAGS. Ignore libCrun as 8124 # -library=stlport4 depends on it. 8125 case " $CXX $CXXFLAGS " in 8126 *" -library=stlport4 "*) 8127 solaris_use_stlport4=yes 8128 ;; 8129 esac 8130 8131 if test "$solaris_use_stlport4" != yes; then 8132 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8133 fi 8134 ;; 8135 esac 8136 ;; 8137 8138solaris*) 8139 case $cc_basename in 8140 CC* | sunCC*) 8141 # The more standards-conforming stlport4 library is 8142 # incompatible with the Cstd library. Avoid specifying 8143 # it if it's in CXXFLAGS. Ignore libCrun as 8144 # -library=stlport4 depends on it. 8145 case " $CXX $CXXFLAGS " in 8146 *" -library=stlport4 "*) 8147 solaris_use_stlport4=yes 8148 ;; 8149 esac 8150 8151 # Adding this requires a known-good setup of shared libraries for 8152 # Sun compiler versions before 5.6, else PIC objects from an old 8153 # archive will be linked into the output, leading to subtle bugs. 8154 if test "$solaris_use_stlport4" != yes; then 8155 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8156 fi 8157 ;; 8158 esac 8159 ;; 8160esac 8161]) 8162 8163case " $_LT_TAGVAR(postdeps, $1) " in 8164*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8165esac 8166 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8167if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8168 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8169fi 8170_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8171 [The directories searched by this compiler when creating a shared library]) 8172_LT_TAGDECL([], [predep_objects], [1], 8173 [Dependencies to place before and after the objects being linked to 8174 create a shared library]) 8175_LT_TAGDECL([], [postdep_objects], [1]) 8176_LT_TAGDECL([], [predeps], [1]) 8177_LT_TAGDECL([], [postdeps], [1]) 8178_LT_TAGDECL([], [compiler_lib_search_path], [1], 8179 [The library search path used internally by the compiler when linking 8180 a shared library]) 8181])# _LT_SYS_HIDDEN_LIBDEPS 8182 8183 8184# _LT_LANG_F77_CONFIG([TAG]) 8185# -------------------------- 8186# Ensure that the configuration variables for a Fortran 77 compiler are 8187# suitably defined. These variables are subsequently used by _LT_CONFIG 8188# to write the compiler configuration to `libtool'. 8189m4_defun([_LT_LANG_F77_CONFIG], 8190[AC_LANG_PUSH(Fortran 77) 8191if test -z "$F77" || test "X$F77" = "Xno"; then 8192 _lt_disable_F77=yes 8193fi 8194 8195_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8196_LT_TAGVAR(allow_undefined_flag, $1)= 8197_LT_TAGVAR(always_export_symbols, $1)=no 8198_LT_TAGVAR(archive_expsym_cmds, $1)= 8199_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8200_LT_TAGVAR(hardcode_direct, $1)=no 8201_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8202_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8203_LT_TAGVAR(hardcode_libdir_separator, $1)= 8204_LT_TAGVAR(hardcode_minus_L, $1)=no 8205_LT_TAGVAR(hardcode_automatic, $1)=no 8206_LT_TAGVAR(inherit_rpath, $1)=no 8207_LT_TAGVAR(module_cmds, $1)= 8208_LT_TAGVAR(module_expsym_cmds, $1)= 8209_LT_TAGVAR(link_all_deplibs, $1)=unknown 8210_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8211_LT_TAGVAR(reload_flag, $1)=$reload_flag 8212_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8213_LT_TAGVAR(no_undefined_flag, $1)= 8214_LT_TAGVAR(whole_archive_flag_spec, $1)= 8215_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8216 8217# Source file extension for f77 test sources. 8218ac_ext=f 8219 8220# Object file extension for compiled f77 test sources. 8221objext=o 8222_LT_TAGVAR(objext, $1)=$objext 8223 8224# No sense in running all these tests if we already determined that 8225# the F77 compiler isn't working. Some variables (like enable_shared) 8226# are currently assumed to apply to all compilers on this platform, 8227# and will be corrupted by setting them based on a non-working compiler. 8228if test "$_lt_disable_F77" != yes; then 8229 # Code to be used in simple compile tests 8230 lt_simple_compile_test_code="\ 8231 subroutine t 8232 return 8233 end 8234" 8235 8236 # Code to be used in simple link tests 8237 lt_simple_link_test_code="\ 8238 program t 8239 end 8240" 8241 8242 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8243 _LT_TAG_COMPILER 8244 8245 # save warnings/boilerplate of simple test code 8246 _LT_COMPILER_BOILERPLATE 8247 _LT_LINKER_BOILERPLATE 8248 8249 # Allow CC to be a program name with arguments. 8250 lt_save_CC="$CC" 8251 lt_save_GCC=$GCC 8252 lt_save_CFLAGS=$CFLAGS 8253 CC=${F77-"f77"} 8254 CFLAGS=$FFLAGS 8255 compiler=$CC 8256 _LT_TAGVAR(compiler, $1)=$CC 8257 _LT_CC_BASENAME([$compiler]) 8258 GCC=$G77 8259 if test -n "$compiler"; then 8260 AC_MSG_CHECKING([if libtool supports shared libraries]) 8261 AC_MSG_RESULT([$can_build_shared]) 8262 8263 AC_MSG_CHECKING([whether to build shared libraries]) 8264 test "$can_build_shared" = "no" && enable_shared=no 8265 8266 # On AIX, shared libraries and static libraries use the same namespace, and 8267 # are all built from PIC. 8268 case $host_os in 8269 aix3*) 8270 test "$enable_shared" = yes && enable_static=no 8271 if test -n "$RANLIB"; then 8272 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8273 postinstall_cmds='$RANLIB $lib' 8274 fi 8275 ;; 8276 aix[[4-9]]*) 8277 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8278 test "$enable_shared" = yes && enable_static=no 8279 fi 8280 ;; 8281 esac 8282 AC_MSG_RESULT([$enable_shared]) 8283 8284 AC_MSG_CHECKING([whether to build static libraries]) 8285 # Make sure either enable_shared or enable_static is yes. 8286 test "$enable_shared" = yes || enable_static=yes 8287 AC_MSG_RESULT([$enable_static]) 8288 8289 _LT_TAGVAR(GCC, $1)="$G77" 8290 _LT_TAGVAR(LD, $1)="$LD" 8291 8292 ## CAVEAT EMPTOR: 8293 ## There is no encapsulation within the following macros, do not change 8294 ## the running order or otherwise move them around unless you know exactly 8295 ## what you are doing... 8296 _LT_COMPILER_PIC($1) 8297 _LT_COMPILER_C_O($1) 8298 _LT_COMPILER_FILE_LOCKS($1) 8299 _LT_LINKER_SHLIBS($1) 8300 _LT_SYS_DYNAMIC_LINKER($1) 8301 _LT_LINKER_HARDCODE_LIBPATH($1) 8302 8303 _LT_CONFIG($1) 8304 fi # test -n "$compiler" 8305 8306 GCC=$lt_save_GCC 8307 CC="$lt_save_CC" 8308 CFLAGS="$lt_save_CFLAGS" 8309fi # test "$_lt_disable_F77" != yes 8310 8311AC_LANG_POP 8312])# _LT_LANG_F77_CONFIG 8313 8314 8315# _LT_LANG_FC_CONFIG([TAG]) 8316# ------------------------- 8317# Ensure that the configuration variables for a Fortran compiler are 8318# suitably defined. These variables are subsequently used by _LT_CONFIG 8319# to write the compiler configuration to `libtool'. 8320m4_defun([_LT_LANG_FC_CONFIG], 8321[AC_LANG_PUSH(Fortran) 8322 8323if test -z "$FC" || test "X$FC" = "Xno"; then 8324 _lt_disable_FC=yes 8325fi 8326 8327_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8328_LT_TAGVAR(allow_undefined_flag, $1)= 8329_LT_TAGVAR(always_export_symbols, $1)=no 8330_LT_TAGVAR(archive_expsym_cmds, $1)= 8331_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8332_LT_TAGVAR(hardcode_direct, $1)=no 8333_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8334_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8335_LT_TAGVAR(hardcode_libdir_separator, $1)= 8336_LT_TAGVAR(hardcode_minus_L, $1)=no 8337_LT_TAGVAR(hardcode_automatic, $1)=no 8338_LT_TAGVAR(inherit_rpath, $1)=no 8339_LT_TAGVAR(module_cmds, $1)= 8340_LT_TAGVAR(module_expsym_cmds, $1)= 8341_LT_TAGVAR(link_all_deplibs, $1)=unknown 8342_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8343_LT_TAGVAR(reload_flag, $1)=$reload_flag 8344_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8345_LT_TAGVAR(no_undefined_flag, $1)= 8346_LT_TAGVAR(whole_archive_flag_spec, $1)= 8347_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8348 8349# Source file extension for fc test sources. 8350ac_ext=${ac_fc_srcext-f} 8351 8352# Object file extension for compiled fc test sources. 8353objext=o 8354_LT_TAGVAR(objext, $1)=$objext 8355 8356# No sense in running all these tests if we already determined that 8357# the FC compiler isn't working. Some variables (like enable_shared) 8358# are currently assumed to apply to all compilers on this platform, 8359# and will be corrupted by setting them based on a non-working compiler. 8360if test "$_lt_disable_FC" != yes; then 8361 # Code to be used in simple compile tests 8362 lt_simple_compile_test_code="\ 8363 subroutine t 8364 return 8365 end 8366" 8367 8368 # Code to be used in simple link tests 8369 lt_simple_link_test_code="\ 8370 program t 8371 end 8372" 8373 8374 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8375 _LT_TAG_COMPILER 8376 8377 # save warnings/boilerplate of simple test code 8378 _LT_COMPILER_BOILERPLATE 8379 _LT_LINKER_BOILERPLATE 8380 8381 # Allow CC to be a program name with arguments. 8382 lt_save_CC="$CC" 8383 lt_save_GCC=$GCC 8384 lt_save_CFLAGS=$CFLAGS 8385 CC=${FC-"f95"} 8386 CFLAGS=$FCFLAGS 8387 compiler=$CC 8388 GCC=$ac_cv_fc_compiler_gnu 8389 8390 _LT_TAGVAR(compiler, $1)=$CC 8391 _LT_CC_BASENAME([$compiler]) 8392 8393 if test -n "$compiler"; then 8394 AC_MSG_CHECKING([if libtool supports shared libraries]) 8395 AC_MSG_RESULT([$can_build_shared]) 8396 8397 AC_MSG_CHECKING([whether to build shared libraries]) 8398 test "$can_build_shared" = "no" && enable_shared=no 8399 8400 # On AIX, shared libraries and static libraries use the same namespace, and 8401 # are all built from PIC. 8402 case $host_os in 8403 aix3*) 8404 test "$enable_shared" = yes && enable_static=no 8405 if test -n "$RANLIB"; then 8406 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8407 postinstall_cmds='$RANLIB $lib' 8408 fi 8409 ;; 8410 aix[[4-9]]*) 8411 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8412 test "$enable_shared" = yes && enable_static=no 8413 fi 8414 ;; 8415 esac 8416 AC_MSG_RESULT([$enable_shared]) 8417 8418 AC_MSG_CHECKING([whether to build static libraries]) 8419 # Make sure either enable_shared or enable_static is yes. 8420 test "$enable_shared" = yes || enable_static=yes 8421 AC_MSG_RESULT([$enable_static]) 8422 8423 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8424 _LT_TAGVAR(LD, $1)="$LD" 8425 8426 ## CAVEAT EMPTOR: 8427 ## There is no encapsulation within the following macros, do not change 8428 ## the running order or otherwise move them around unless you know exactly 8429 ## what you are doing... 8430 _LT_SYS_HIDDEN_LIBDEPS($1) 8431 _LT_COMPILER_PIC($1) 8432 _LT_COMPILER_C_O($1) 8433 _LT_COMPILER_FILE_LOCKS($1) 8434 _LT_LINKER_SHLIBS($1) 8435 _LT_SYS_DYNAMIC_LINKER($1) 8436 _LT_LINKER_HARDCODE_LIBPATH($1) 8437 8438 _LT_CONFIG($1) 8439 fi # test -n "$compiler" 8440 8441 GCC=$lt_save_GCC 8442 CC=$lt_save_CC 8443 CFLAGS=$lt_save_CFLAGS 8444fi # test "$_lt_disable_FC" != yes 8445 8446AC_LANG_POP 8447])# _LT_LANG_FC_CONFIG 8448 8449 8450# _LT_LANG_GCJ_CONFIG([TAG]) 8451# -------------------------- 8452# Ensure that the configuration variables for the GNU Java Compiler compiler 8453# are suitably defined. These variables are subsequently used by _LT_CONFIG 8454# to write the compiler configuration to `libtool'. 8455m4_defun([_LT_LANG_GCJ_CONFIG], 8456[AC_REQUIRE([LT_PROG_GCJ])dnl 8457AC_LANG_SAVE 8458 8459# Source file extension for Java test sources. 8460ac_ext=java 8461 8462# Object file extension for compiled Java test sources. 8463objext=o 8464_LT_TAGVAR(objext, $1)=$objext 8465 8466# Code to be used in simple compile tests 8467lt_simple_compile_test_code="class foo {}" 8468 8469# Code to be used in simple link tests 8470lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8471 8472# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8473_LT_TAG_COMPILER 8474 8475# save warnings/boilerplate of simple test code 8476_LT_COMPILER_BOILERPLATE 8477_LT_LINKER_BOILERPLATE 8478 8479# Allow CC to be a program name with arguments. 8480lt_save_CC=$CC 8481lt_save_CFLAGS=$CFLAGS 8482lt_save_GCC=$GCC 8483GCC=yes 8484CC=${GCJ-"gcj"} 8485CFLAGS=$GCJFLAGS 8486compiler=$CC 8487_LT_TAGVAR(compiler, $1)=$CC 8488_LT_TAGVAR(LD, $1)="$LD" 8489_LT_CC_BASENAME([$compiler]) 8490 8491# GCJ did not exist at the time GCC didn't implicitly link libc in. 8492_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8493 8494_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8495_LT_TAGVAR(reload_flag, $1)=$reload_flag 8496_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8497 8498if test -n "$compiler"; then 8499 _LT_COMPILER_NO_RTTI($1) 8500 _LT_COMPILER_PIC($1) 8501 _LT_COMPILER_C_O($1) 8502 _LT_COMPILER_FILE_LOCKS($1) 8503 _LT_LINKER_SHLIBS($1) 8504 _LT_LINKER_HARDCODE_LIBPATH($1) 8505 8506 _LT_CONFIG($1) 8507fi 8508 8509AC_LANG_RESTORE 8510 8511GCC=$lt_save_GCC 8512CC=$lt_save_CC 8513CFLAGS=$lt_save_CFLAGS 8514])# _LT_LANG_GCJ_CONFIG 8515 8516 8517# _LT_LANG_GO_CONFIG([TAG]) 8518# -------------------------- 8519# Ensure that the configuration variables for the GNU Go compiler 8520# are suitably defined. These variables are subsequently used by _LT_CONFIG 8521# to write the compiler configuration to `libtool'. 8522m4_defun([_LT_LANG_GO_CONFIG], 8523[AC_REQUIRE([LT_PROG_GO])dnl 8524AC_LANG_SAVE 8525 8526# Source file extension for Go test sources. 8527ac_ext=go 8528 8529# Object file extension for compiled Go test sources. 8530objext=o 8531_LT_TAGVAR(objext, $1)=$objext 8532 8533# Code to be used in simple compile tests 8534lt_simple_compile_test_code="package main; func main() { }" 8535 8536# Code to be used in simple link tests 8537lt_simple_link_test_code='package main; func main() { }' 8538 8539# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8540_LT_TAG_COMPILER 8541 8542# save warnings/boilerplate of simple test code 8543_LT_COMPILER_BOILERPLATE 8544_LT_LINKER_BOILERPLATE 8545 8546# Allow CC to be a program name with arguments. 8547lt_save_CC=$CC 8548lt_save_CFLAGS=$CFLAGS 8549lt_save_GCC=$GCC 8550GCC=yes 8551CC=${GOC-"gccgo"} 8552CFLAGS=$GOFLAGS 8553compiler=$CC 8554_LT_TAGVAR(compiler, $1)=$CC 8555_LT_TAGVAR(LD, $1)="$LD" 8556_LT_CC_BASENAME([$compiler]) 8557 8558# Go did not exist at the time GCC didn't implicitly link libc in. 8559_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8560 8561_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8562_LT_TAGVAR(reload_flag, $1)=$reload_flag 8563_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8564 8565if test -n "$compiler"; then 8566 _LT_COMPILER_NO_RTTI($1) 8567 _LT_COMPILER_PIC($1) 8568 _LT_COMPILER_C_O($1) 8569 _LT_COMPILER_FILE_LOCKS($1) 8570 _LT_LINKER_SHLIBS($1) 8571 _LT_LINKER_HARDCODE_LIBPATH($1) 8572 8573 _LT_CONFIG($1) 8574fi 8575 8576AC_LANG_RESTORE 8577 8578GCC=$lt_save_GCC 8579CC=$lt_save_CC 8580CFLAGS=$lt_save_CFLAGS 8581])# _LT_LANG_GO_CONFIG 8582 8583 8584# _LT_LANG_RC_CONFIG([TAG]) 8585# ------------------------- 8586# Ensure that the configuration variables for the Windows resource compiler 8587# are suitably defined. These variables are subsequently used by _LT_CONFIG 8588# to write the compiler configuration to `libtool'. 8589m4_defun([_LT_LANG_RC_CONFIG], 8590[AC_REQUIRE([LT_PROG_RC])dnl 8591AC_LANG_SAVE 8592 8593# Source file extension for RC test sources. 8594ac_ext=rc 8595 8596# Object file extension for compiled RC test sources. 8597objext=o 8598_LT_TAGVAR(objext, $1)=$objext 8599 8600# Code to be used in simple compile tests 8601lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8602 8603# Code to be used in simple link tests 8604lt_simple_link_test_code="$lt_simple_compile_test_code" 8605 8606# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8607_LT_TAG_COMPILER 8608 8609# save warnings/boilerplate of simple test code 8610_LT_COMPILER_BOILERPLATE 8611_LT_LINKER_BOILERPLATE 8612 8613# Allow CC to be a program name with arguments. 8614lt_save_CC="$CC" 8615lt_save_CFLAGS=$CFLAGS 8616lt_save_GCC=$GCC 8617GCC= 8618CC=${RC-"windres"} 8619CFLAGS= 8620compiler=$CC 8621_LT_TAGVAR(compiler, $1)=$CC 8622_LT_CC_BASENAME([$compiler]) 8623_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8624 8625if test -n "$compiler"; then 8626 : 8627 _LT_CONFIG($1) 8628fi 8629 8630GCC=$lt_save_GCC 8631AC_LANG_RESTORE 8632CC=$lt_save_CC 8633CFLAGS=$lt_save_CFLAGS 8634])# _LT_LANG_RC_CONFIG 8635 8636 8637# LT_PROG_GCJ 8638# ----------- 8639AC_DEFUN([LT_PROG_GCJ], 8640[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8641 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8642 [AC_CHECK_TOOL(GCJ, gcj,) 8643 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8644 AC_SUBST(GCJFLAGS)])])[]dnl 8645]) 8646 8647# Old name: 8648AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8649dnl aclocal-1.4 backwards compatibility: 8650dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8651 8652 8653# LT_PROG_GO 8654# ---------- 8655AC_DEFUN([LT_PROG_GO], 8656[AC_CHECK_TOOL(GOC, gccgo,) 8657]) 8658 8659 8660# LT_PROG_RC 8661# ---------- 8662AC_DEFUN([LT_PROG_RC], 8663[AC_CHECK_TOOL(RC, windres,) 8664]) 8665 8666# Old name: 8667AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8668dnl aclocal-1.4 backwards compatibility: 8669dnl AC_DEFUN([LT_AC_PROG_RC], []) 8670 8671 8672# _LT_DECL_EGREP 8673# -------------- 8674# If we don't have a new enough Autoconf to choose the best grep 8675# available, choose the one first in the user's PATH. 8676m4_defun([_LT_DECL_EGREP], 8677[AC_REQUIRE([AC_PROG_EGREP])dnl 8678AC_REQUIRE([AC_PROG_FGREP])dnl 8679test -z "$GREP" && GREP=grep 8680_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8681_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8682_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8683dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8684AC_SUBST([GREP]) 8685]) 8686 8687 8688# _LT_DECL_OBJDUMP 8689# -------------- 8690# If we don't have a new enough Autoconf to choose the best objdump 8691# available, choose the one first in the user's PATH. 8692m4_defun([_LT_DECL_OBJDUMP], 8693[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8694test -z "$OBJDUMP" && OBJDUMP=objdump 8695_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8696AC_SUBST([OBJDUMP]) 8697]) 8698 8699# _LT_DECL_DLLTOOL 8700# ---------------- 8701# Ensure DLLTOOL variable is set. 8702m4_defun([_LT_DECL_DLLTOOL], 8703[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8704test -z "$DLLTOOL" && DLLTOOL=dlltool 8705_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8706AC_SUBST([DLLTOOL]) 8707]) 8708 8709# _LT_DECL_SED 8710# ------------ 8711# Check for a fully-functional sed program, that truncates 8712# as few characters as possible. Prefer GNU sed if found. 8713m4_defun([_LT_DECL_SED], 8714[AC_PROG_SED 8715test -z "$SED" && SED=sed 8716Xsed="$SED -e 1s/^X//" 8717_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8718_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8719 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8720])# _LT_DECL_SED 8721 8722m4_ifndef([AC_PROG_SED], [ 8723# NOTE: This macro has been submitted for inclusion into # 8724# GNU Autoconf as AC_PROG_SED. When it is available in # 8725# a released version of Autoconf we should remove this # 8726# macro and use it instead. # 8727 8728m4_defun([AC_PROG_SED], 8729[AC_MSG_CHECKING([for a sed that does not truncate output]) 8730AC_CACHE_VAL(lt_cv_path_SED, 8731[# Loop through the user's path and test for sed and gsed. 8732# Then use that list of sed's as ones to test for truncation. 8733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8734for as_dir in $PATH 8735do 8736 IFS=$as_save_IFS 8737 test -z "$as_dir" && as_dir=. 8738 for lt_ac_prog in sed gsed; do 8739 for ac_exec_ext in '' $ac_executable_extensions; do 8740 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8741 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8742 fi 8743 done 8744 done 8745done 8746IFS=$as_save_IFS 8747lt_ac_max=0 8748lt_ac_count=0 8749# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8750# along with /bin/sed that truncates output. 8751for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8752 test ! -f $lt_ac_sed && continue 8753 cat /dev/null > conftest.in 8754 lt_ac_count=0 8755 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8756 # Check for GNU sed and select it if it is found. 8757 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8758 lt_cv_path_SED=$lt_ac_sed 8759 break 8760 fi 8761 while true; do 8762 cat conftest.in conftest.in >conftest.tmp 8763 mv conftest.tmp conftest.in 8764 cp conftest.in conftest.nl 8765 echo >>conftest.nl 8766 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8767 cmp -s conftest.out conftest.nl || break 8768 # 10000 chars as input seems more than enough 8769 test $lt_ac_count -gt 10 && break 8770 lt_ac_count=`expr $lt_ac_count + 1` 8771 if test $lt_ac_count -gt $lt_ac_max; then 8772 lt_ac_max=$lt_ac_count 8773 lt_cv_path_SED=$lt_ac_sed 8774 fi 8775 done 8776done 8777]) 8778SED=$lt_cv_path_SED 8779AC_SUBST([SED]) 8780AC_MSG_RESULT([$SED]) 8781])#AC_PROG_SED 8782])#m4_ifndef 8783 8784# Old name: 8785AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8786dnl aclocal-1.4 backwards compatibility: 8787dnl AC_DEFUN([LT_AC_PROG_SED], []) 8788 8789 8790# _LT_CHECK_SHELL_FEATURES 8791# ------------------------ 8792# Find out whether the shell is Bourne or XSI compatible, 8793# or has some other useful features. 8794m4_defun([_LT_CHECK_SHELL_FEATURES], 8795[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8796# Try some XSI features 8797xsi_shell=no 8798( _lt_dummy="a/b/c" 8799 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8800 = c,a/b,b/c, \ 8801 && eval 'test $(( 1 + 1 )) -eq 2 \ 8802 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8803 && xsi_shell=yes 8804AC_MSG_RESULT([$xsi_shell]) 8805_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8806 8807AC_MSG_CHECKING([whether the shell understands "+="]) 8808lt_shell_append=no 8809( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8810 >/dev/null 2>&1 \ 8811 && lt_shell_append=yes 8812AC_MSG_RESULT([$lt_shell_append]) 8813_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8814 8815if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8816 lt_unset=unset 8817else 8818 lt_unset=false 8819fi 8820_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8821 8822# test EBCDIC or ASCII 8823case `echo X|tr X '\101'` in 8824 A) # ASCII based system 8825 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8826 lt_SP2NL='tr \040 \012' 8827 lt_NL2SP='tr \015\012 \040\040' 8828 ;; 8829 *) # EBCDIC based system 8830 lt_SP2NL='tr \100 \n' 8831 lt_NL2SP='tr \r\n \100\100' 8832 ;; 8833esac 8834_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8835_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8836])# _LT_CHECK_SHELL_FEATURES 8837 8838 8839# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8840# ------------------------------------------------------ 8841# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8842# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8843m4_defun([_LT_PROG_FUNCTION_REPLACE], 8844[dnl { 8845sed -e '/^$1 ()$/,/^} # $1 /c\ 8846$1 ()\ 8847{\ 8848m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8849} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8850 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8851 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8852test 0 -eq $? || _lt_function_replace_fail=: 8853]) 8854 8855 8856# _LT_PROG_REPLACE_SHELLFNS 8857# ------------------------- 8858# Replace existing portable implementations of several shell functions with 8859# equivalent extended shell implementations where those features are available.. 8860m4_defun([_LT_PROG_REPLACE_SHELLFNS], 8861[if test x"$xsi_shell" = xyes; then 8862 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8863 case ${1} in 8864 */*) func_dirname_result="${1%/*}${2}" ;; 8865 * ) func_dirname_result="${3}" ;; 8866 esac]) 8867 8868 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8869 func_basename_result="${1##*/}"]) 8870 8871 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8872 case ${1} in 8873 */*) func_dirname_result="${1%/*}${2}" ;; 8874 * ) func_dirname_result="${3}" ;; 8875 esac 8876 func_basename_result="${1##*/}"]) 8877 8878 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8879 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8880 # positional parameters, so assign one to ordinary parameter first. 8881 func_stripname_result=${3} 8882 func_stripname_result=${func_stripname_result#"${1}"} 8883 func_stripname_result=${func_stripname_result%"${2}"}]) 8884 8885 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 8886 func_split_long_opt_name=${1%%=*} 8887 func_split_long_opt_arg=${1#*=}]) 8888 8889 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 8890 func_split_short_opt_arg=${1#??} 8891 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8892 8893 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 8894 case ${1} in 8895 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 8896 *) func_lo2o_result=${1} ;; 8897 esac]) 8898 8899 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8900 8901 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8902 8903 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8904fi 8905 8906if test x"$lt_shell_append" = xyes; then 8907 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8908 8909 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 8910 func_quote_for_eval "${2}" 8911dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 8912 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8913 8914 # Save a `func_append' function call where possible by direct use of '+=' 8915 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 8916 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8917 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8918 test 0 -eq $? || _lt_function_replace_fail=: 8919else 8920 # Save a `func_append' function call even when '+=' is not available 8921 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 8922 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8923 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8924 test 0 -eq $? || _lt_function_replace_fail=: 8925fi 8926 8927if test x"$_lt_function_replace_fail" = x":"; then 8928 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 8929fi 8930]) 8931 8932# _LT_PATH_CONVERSION_FUNCTIONS 8933# ----------------------------- 8934# Determine which file name conversion functions should be used by 8935# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8936# for certain cross-compile configurations and native mingw. 8937m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8938[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8939AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8940AC_MSG_CHECKING([how to convert $build file names to $host format]) 8941AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8942[case $host in 8943 *-*-mingw* ) 8944 case $build in 8945 *-*-mingw* ) # actually msys 8946 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8947 ;; 8948 *-*-cygwin* ) 8949 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8950 ;; 8951 * ) # otherwise, assume *nix 8952 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8953 ;; 8954 esac 8955 ;; 8956 *-*-cygwin* ) 8957 case $build in 8958 *-*-mingw* ) # actually msys 8959 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8960 ;; 8961 *-*-cygwin* ) 8962 lt_cv_to_host_file_cmd=func_convert_file_noop 8963 ;; 8964 * ) # otherwise, assume *nix 8965 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8966 ;; 8967 esac 8968 ;; 8969 * ) # unhandled hosts (and "normal" native builds) 8970 lt_cv_to_host_file_cmd=func_convert_file_noop 8971 ;; 8972esac 8973]) 8974to_host_file_cmd=$lt_cv_to_host_file_cmd 8975AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8976_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8977 [0], [convert $build file names to $host format])dnl 8978 8979AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8980AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8981[#assume ordinary cross tools, or native build. 8982lt_cv_to_tool_file_cmd=func_convert_file_noop 8983case $host in 8984 *-*-mingw* ) 8985 case $build in 8986 *-*-mingw* ) # actually msys 8987 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8988 ;; 8989 esac 8990 ;; 8991esac 8992]) 8993to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8994AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8995_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8996 [0], [convert $build files to toolchain format])dnl 8997])# _LT_PATH_CONVERSION_FUNCTIONS 8998 8999# Helper functions for option handling. -*- Autoconf -*- 9000# 9001# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9002# Inc. 9003# Written by Gary V. Vaughan, 2004 9004# 9005# This file is free software; the Free Software Foundation gives 9006# unlimited permission to copy and/or distribute it, with or without 9007# modifications, as long as this notice is preserved. 9008 9009# serial 7 ltoptions.m4 9010 9011# This is to help aclocal find these macros, as it can't see m4_define. 9012AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9013 9014 9015# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9016# ------------------------------------------ 9017m4_define([_LT_MANGLE_OPTION], 9018[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9019 9020 9021# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9022# --------------------------------------- 9023# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9024# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9025# saved as a flag. 9026m4_define([_LT_SET_OPTION], 9027[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9028m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9029 _LT_MANGLE_DEFUN([$1], [$2]), 9030 [m4_warning([Unknown $1 option `$2'])])[]dnl 9031]) 9032 9033 9034# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9035# ------------------------------------------------------------ 9036# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9037m4_define([_LT_IF_OPTION], 9038[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9039 9040 9041# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9042# ------------------------------------------------------- 9043# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9044# are set. 9045m4_define([_LT_UNLESS_OPTIONS], 9046[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9047 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9048 [m4_define([$0_found])])])[]dnl 9049m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9050])[]dnl 9051]) 9052 9053 9054# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9055# ---------------------------------------- 9056# OPTION-LIST is a space-separated list of Libtool options associated 9057# with MACRO-NAME. If any OPTION has a matching handler declared with 9058# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9059# the unknown option and exit. 9060m4_defun([_LT_SET_OPTIONS], 9061[# Set options 9062m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9063 [_LT_SET_OPTION([$1], _LT_Option)]) 9064 9065m4_if([$1],[LT_INIT],[ 9066 dnl 9067 dnl Simply set some default values (i.e off) if boolean options were not 9068 dnl specified: 9069 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9070 ]) 9071 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9072 ]) 9073 dnl 9074 dnl If no reference was made to various pairs of opposing options, then 9075 dnl we run the default mode handler for the pair. For example, if neither 9076 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9077 dnl archives by default: 9078 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9079 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9080 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9081 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9082 [_LT_ENABLE_FAST_INSTALL]) 9083 ]) 9084])# _LT_SET_OPTIONS 9085 9086 9087 9088# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9089# ----------------------------------------- 9090m4_define([_LT_MANGLE_DEFUN], 9091[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9092 9093 9094# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9095# ----------------------------------------------- 9096m4_define([LT_OPTION_DEFINE], 9097[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9098])# LT_OPTION_DEFINE 9099 9100 9101# dlopen 9102# ------ 9103LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9104]) 9105 9106AU_DEFUN([AC_LIBTOOL_DLOPEN], 9107[_LT_SET_OPTION([LT_INIT], [dlopen]) 9108AC_DIAGNOSE([obsolete], 9109[$0: Remove this warning and the call to _LT_SET_OPTION when you 9110put the `dlopen' option into LT_INIT's first parameter.]) 9111]) 9112 9113dnl aclocal-1.4 backwards compatibility: 9114dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9115 9116 9117# win32-dll 9118# --------- 9119# Declare package support for building win32 dll's. 9120LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9121[enable_win32_dll=yes 9122 9123case $host in 9124*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9125 AC_CHECK_TOOL(AS, as, false) 9126 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9127 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9128 ;; 9129esac 9130 9131test -z "$AS" && AS=as 9132_LT_DECL([], [AS], [1], [Assembler program])dnl 9133 9134test -z "$DLLTOOL" && DLLTOOL=dlltool 9135_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9136 9137test -z "$OBJDUMP" && OBJDUMP=objdump 9138_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9139])# win32-dll 9140 9141AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9142[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9143_LT_SET_OPTION([LT_INIT], [win32-dll]) 9144AC_DIAGNOSE([obsolete], 9145[$0: Remove this warning and the call to _LT_SET_OPTION when you 9146put the `win32-dll' option into LT_INIT's first parameter.]) 9147]) 9148 9149dnl aclocal-1.4 backwards compatibility: 9150dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9151 9152 9153# _LT_ENABLE_SHARED([DEFAULT]) 9154# ---------------------------- 9155# implement the --enable-shared flag, and supports the `shared' and 9156# `disable-shared' LT_INIT options. 9157# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9158m4_define([_LT_ENABLE_SHARED], 9159[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9160AC_ARG_ENABLE([shared], 9161 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9162 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9163 [p=${PACKAGE-default} 9164 case $enableval in 9165 yes) enable_shared=yes ;; 9166 no) enable_shared=no ;; 9167 *) 9168 enable_shared=no 9169 # Look at the argument we got. We use all the common list separators. 9170 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9171 for pkg in $enableval; do 9172 IFS="$lt_save_ifs" 9173 if test "X$pkg" = "X$p"; then 9174 enable_shared=yes 9175 fi 9176 done 9177 IFS="$lt_save_ifs" 9178 ;; 9179 esac], 9180 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9181 9182 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9183 [Whether or not to build shared libraries]) 9184])# _LT_ENABLE_SHARED 9185 9186LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9187LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9188 9189# Old names: 9190AC_DEFUN([AC_ENABLE_SHARED], 9191[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9192]) 9193 9194AC_DEFUN([AC_DISABLE_SHARED], 9195[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9196]) 9197 9198AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9199AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9200 9201dnl aclocal-1.4 backwards compatibility: 9202dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9203dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9204 9205 9206 9207# _LT_ENABLE_STATIC([DEFAULT]) 9208# ---------------------------- 9209# implement the --enable-static flag, and support the `static' and 9210# `disable-static' LT_INIT options. 9211# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9212m4_define([_LT_ENABLE_STATIC], 9213[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9214AC_ARG_ENABLE([static], 9215 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9216 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9217 [p=${PACKAGE-default} 9218 case $enableval in 9219 yes) enable_static=yes ;; 9220 no) enable_static=no ;; 9221 *) 9222 enable_static=no 9223 # Look at the argument we got. We use all the common list separators. 9224 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9225 for pkg in $enableval; do 9226 IFS="$lt_save_ifs" 9227 if test "X$pkg" = "X$p"; then 9228 enable_static=yes 9229 fi 9230 done 9231 IFS="$lt_save_ifs" 9232 ;; 9233 esac], 9234 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9235 9236 _LT_DECL([build_old_libs], [enable_static], [0], 9237 [Whether or not to build static libraries]) 9238])# _LT_ENABLE_STATIC 9239 9240LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9241LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9242 9243# Old names: 9244AC_DEFUN([AC_ENABLE_STATIC], 9245[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9246]) 9247 9248AC_DEFUN([AC_DISABLE_STATIC], 9249[_LT_SET_OPTION([LT_INIT], [disable-static]) 9250]) 9251 9252AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9253AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9254 9255dnl aclocal-1.4 backwards compatibility: 9256dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9257dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9258 9259 9260 9261# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9262# ---------------------------------- 9263# implement the --enable-fast-install flag, and support the `fast-install' 9264# and `disable-fast-install' LT_INIT options. 9265# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9266m4_define([_LT_ENABLE_FAST_INSTALL], 9267[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9268AC_ARG_ENABLE([fast-install], 9269 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9270 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9271 [p=${PACKAGE-default} 9272 case $enableval in 9273 yes) enable_fast_install=yes ;; 9274 no) enable_fast_install=no ;; 9275 *) 9276 enable_fast_install=no 9277 # Look at the argument we got. We use all the common list separators. 9278 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9279 for pkg in $enableval; do 9280 IFS="$lt_save_ifs" 9281 if test "X$pkg" = "X$p"; then 9282 enable_fast_install=yes 9283 fi 9284 done 9285 IFS="$lt_save_ifs" 9286 ;; 9287 esac], 9288 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9289 9290_LT_DECL([fast_install], [enable_fast_install], [0], 9291 [Whether or not to optimize for fast installation])dnl 9292])# _LT_ENABLE_FAST_INSTALL 9293 9294LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9295LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9296 9297# Old names: 9298AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9299[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9300AC_DIAGNOSE([obsolete], 9301[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9302the `fast-install' option into LT_INIT's first parameter.]) 9303]) 9304 9305AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9306[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9307AC_DIAGNOSE([obsolete], 9308[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9309the `disable-fast-install' option into LT_INIT's first parameter.]) 9310]) 9311 9312dnl aclocal-1.4 backwards compatibility: 9313dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9314dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9315 9316 9317# _LT_WITH_PIC([MODE]) 9318# -------------------- 9319# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9320# LT_INIT options. 9321# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9322m4_define([_LT_WITH_PIC], 9323[AC_ARG_WITH([pic], 9324 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9325 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9326 [lt_p=${PACKAGE-default} 9327 case $withval in 9328 yes|no) pic_mode=$withval ;; 9329 *) 9330 pic_mode=default 9331 # Look at the argument we got. We use all the common list separators. 9332 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9333 for lt_pkg in $withval; do 9334 IFS="$lt_save_ifs" 9335 if test "X$lt_pkg" = "X$lt_p"; then 9336 pic_mode=yes 9337 fi 9338 done 9339 IFS="$lt_save_ifs" 9340 ;; 9341 esac], 9342 [pic_mode=default]) 9343 9344test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9345 9346_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9347])# _LT_WITH_PIC 9348 9349LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9350LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9351 9352# Old name: 9353AU_DEFUN([AC_LIBTOOL_PICMODE], 9354[_LT_SET_OPTION([LT_INIT], [pic-only]) 9355AC_DIAGNOSE([obsolete], 9356[$0: Remove this warning and the call to _LT_SET_OPTION when you 9357put the `pic-only' option into LT_INIT's first parameter.]) 9358]) 9359 9360dnl aclocal-1.4 backwards compatibility: 9361dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9362 9363 9364m4_define([_LTDL_MODE], []) 9365LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9366 [m4_define([_LTDL_MODE], [nonrecursive])]) 9367LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9368 [m4_define([_LTDL_MODE], [recursive])]) 9369LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9370 [m4_define([_LTDL_MODE], [subproject])]) 9371 9372m4_define([_LTDL_TYPE], []) 9373LT_OPTION_DEFINE([LTDL_INIT], [installable], 9374 [m4_define([_LTDL_TYPE], [installable])]) 9375LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9376 [m4_define([_LTDL_TYPE], [convenience])]) 9377 9378# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9379# 9380# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9381# Written by Gary V. Vaughan, 2004 9382# 9383# This file is free software; the Free Software Foundation gives 9384# unlimited permission to copy and/or distribute it, with or without 9385# modifications, as long as this notice is preserved. 9386 9387# serial 6 ltsugar.m4 9388 9389# This is to help aclocal find these macros, as it can't see m4_define. 9390AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9391 9392 9393# lt_join(SEP, ARG1, [ARG2...]) 9394# ----------------------------- 9395# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9396# associated separator. 9397# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9398# versions in m4sugar had bugs. 9399m4_define([lt_join], 9400[m4_if([$#], [1], [], 9401 [$#], [2], [[$2]], 9402 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9403m4_define([_lt_join], 9404[m4_if([$#$2], [2], [], 9405 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9406 9407 9408# lt_car(LIST) 9409# lt_cdr(LIST) 9410# ------------ 9411# Manipulate m4 lists. 9412# These macros are necessary as long as will still need to support 9413# Autoconf-2.59 which quotes differently. 9414m4_define([lt_car], [[$1]]) 9415m4_define([lt_cdr], 9416[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9417 [$#], 1, [], 9418 [m4_dquote(m4_shift($@))])]) 9419m4_define([lt_unquote], $1) 9420 9421 9422# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9423# ------------------------------------------ 9424# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9425# Note that neither SEPARATOR nor STRING are expanded; they are appended 9426# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9427# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9428# than defined and empty). 9429# 9430# This macro is needed until we can rely on Autoconf 2.62, since earlier 9431# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9432m4_define([lt_append], 9433[m4_define([$1], 9434 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9435 9436 9437 9438# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9439# ---------------------------------------------------------- 9440# Produce a SEP delimited list of all paired combinations of elements of 9441# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9442# has the form PREFIXmINFIXSUFFIXn. 9443# Needed until we can rely on m4_combine added in Autoconf 2.62. 9444m4_define([lt_combine], 9445[m4_if(m4_eval([$# > 3]), [1], 9446 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9447[[m4_foreach([_Lt_prefix], [$2], 9448 [m4_foreach([_Lt_suffix], 9449 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9450 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9451 9452 9453# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9454# ----------------------------------------------------------------------- 9455# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9456# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9457m4_define([lt_if_append_uniq], 9458[m4_ifdef([$1], 9459 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9460 [lt_append([$1], [$2], [$3])$4], 9461 [$5])], 9462 [lt_append([$1], [$2], [$3])$4])]) 9463 9464 9465# lt_dict_add(DICT, KEY, VALUE) 9466# ----------------------------- 9467m4_define([lt_dict_add], 9468[m4_define([$1($2)], [$3])]) 9469 9470 9471# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9472# -------------------------------------------- 9473m4_define([lt_dict_add_subkey], 9474[m4_define([$1($2:$3)], [$4])]) 9475 9476 9477# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9478# ---------------------------------- 9479m4_define([lt_dict_fetch], 9480[m4_ifval([$3], 9481 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9482 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9483 9484 9485# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9486# ----------------------------------------------------------------- 9487m4_define([lt_if_dict_fetch], 9488[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9489 [$5], 9490 [$6])]) 9491 9492 9493# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9494# -------------------------------------------------------------- 9495m4_define([lt_dict_filter], 9496[m4_if([$5], [], [], 9497 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9498 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9499 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9500]) 9501 9502# ltversion.m4 -- version numbers -*- Autoconf -*- 9503# 9504# Copyright (C) 2004 Free Software Foundation, Inc. 9505# Written by Scott James Remnant, 2004 9506# 9507# This file is free software; the Free Software Foundation gives 9508# unlimited permission to copy and/or distribute it, with or without 9509# modifications, as long as this notice is preserved. 9510 9511# @configure_input@ 9512 9513# serial 3337 ltversion.m4 9514# This file is part of GNU Libtool 9515 9516m4_define([LT_PACKAGE_VERSION], [2.4.2]) 9517m4_define([LT_PACKAGE_REVISION], [1.3337]) 9518 9519AC_DEFUN([LTVERSION_VERSION], 9520[macro_version='2.4.2' 9521macro_revision='1.3337' 9522_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9523_LT_DECL(, macro_revision, 0) 9524]) 9525 9526# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9527# 9528# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9529# Written by Scott James Remnant, 2004. 9530# 9531# This file is free software; the Free Software Foundation gives 9532# unlimited permission to copy and/or distribute it, with or without 9533# modifications, as long as this notice is preserved. 9534 9535# serial 5 lt~obsolete.m4 9536 9537# These exist entirely to fool aclocal when bootstrapping libtool. 9538# 9539# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9540# which have later been changed to m4_define as they aren't part of the 9541# exported API, or moved to Autoconf or Automake where they belong. 9542# 9543# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9544# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9545# using a macro with the same name in our local m4/libtool.m4 it'll 9546# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9547# and doesn't know about Autoconf macros at all.) 9548# 9549# So we provide this file, which has a silly filename so it's always 9550# included after everything else. This provides aclocal with the 9551# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9552# because those macros already exist, or will be overwritten later. 9553# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9554# 9555# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9556# Yes, that means every name once taken will need to remain here until 9557# we give up compatibility with versions before 1.7, at which point 9558# we need to keep only those names which we still refer to. 9559 9560# This is to help aclocal find these macros, as it can't see m4_define. 9561AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9562 9563m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9564m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9565m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9566m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9567m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9568m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9569m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9570m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9571m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9572m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9573m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9574m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9575m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9576m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9577m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9578m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9579m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9580m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9581m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9582m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9583m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9584m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9585m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9586m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9587m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9588m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9589m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9590m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9591m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9592m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9593m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9594m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9595m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9596m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9597m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9598m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9599m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9600m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9601m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9602m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9603m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9604m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9605m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9606m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9607m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9608m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9609m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9610m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9611m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9612m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9613m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9614m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9615m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9616m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9617m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9618m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9619m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9620m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9621m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9622m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9623m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9624 9625# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9626# 9627# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9628# 9629# This program is free software; you can redistribute it and/or modify 9630# it under the terms of the GNU General Public License as published by 9631# the Free Software Foundation; either version 2 of the License, or 9632# (at your option) any later version. 9633# 9634# This program is distributed in the hope that it will be useful, but 9635# WITHOUT ANY WARRANTY; without even the implied warranty of 9636# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9637# General Public License for more details. 9638# 9639# You should have received a copy of the GNU General Public License 9640# along with this program; if not, write to the Free Software 9641# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9642# 9643# As a special exception to the GNU General Public License, if you 9644# distribute this file as part of a program that contains a 9645# configuration script generated by Autoconf, you may include it under 9646# the same distribution terms that you use for the rest of that program. 9647 9648# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9649# ---------------------------------- 9650AC_DEFUN([PKG_PROG_PKG_CONFIG], 9651[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9652m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9653AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9654if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9655 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9656fi 9657if test -n "$PKG_CONFIG"; then 9658 _pkg_min_version=m4_default([$1], [0.9.0]) 9659 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9660 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9661 AC_MSG_RESULT([yes]) 9662 else 9663 AC_MSG_RESULT([no]) 9664 PKG_CONFIG="" 9665 fi 9666 9667fi[]dnl 9668])# PKG_PROG_PKG_CONFIG 9669 9670# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9671# 9672# Check to see whether a particular set of modules exists. Similar 9673# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9674# 9675# 9676# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9677# this or PKG_CHECK_MODULES is called, or make sure to call 9678# PKG_CHECK_EXISTS manually 9679# -------------------------------------------------------------- 9680AC_DEFUN([PKG_CHECK_EXISTS], 9681[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9682if test -n "$PKG_CONFIG" && \ 9683 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9684 m4_ifval([$2], [$2], [:]) 9685m4_ifvaln([$3], [else 9686 $3])dnl 9687fi]) 9688 9689 9690# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9691# --------------------------------------------- 9692m4_define([_PKG_CONFIG], 9693[if test -n "$$1"; then 9694 pkg_cv_[]$1="$$1" 9695 elif test -n "$PKG_CONFIG"; then 9696 PKG_CHECK_EXISTS([$3], 9697 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9698 [pkg_failed=yes]) 9699 else 9700 pkg_failed=untried 9701fi[]dnl 9702])# _PKG_CONFIG 9703 9704# _PKG_SHORT_ERRORS_SUPPORTED 9705# ----------------------------- 9706AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9707[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9708if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9709 _pkg_short_errors_supported=yes 9710else 9711 _pkg_short_errors_supported=no 9712fi[]dnl 9713])# _PKG_SHORT_ERRORS_SUPPORTED 9714 9715 9716# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9717# [ACTION-IF-NOT-FOUND]) 9718# 9719# 9720# Note that if there is a possibility the first call to 9721# PKG_CHECK_MODULES might not happen, you should be sure to include an 9722# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9723# 9724# 9725# -------------------------------------------------------------- 9726AC_DEFUN([PKG_CHECK_MODULES], 9727[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9728AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9729AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9730 9731pkg_failed=no 9732AC_MSG_CHECKING([for $1]) 9733 9734_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9735_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9736 9737m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9738and $1[]_LIBS to avoid the need to call pkg-config. 9739See the pkg-config man page for more details.]) 9740 9741if test $pkg_failed = yes; then 9742 _PKG_SHORT_ERRORS_SUPPORTED 9743 if test $_pkg_short_errors_supported = yes; then 9744 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9745 else 9746 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9747 fi 9748 # Put the nasty error message in config.log where it belongs 9749 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9750 9751 ifelse([$4], , [AC_MSG_ERROR(dnl 9752[Package requirements ($2) were not met: 9753 9754$$1_PKG_ERRORS 9755 9756Consider adjusting the PKG_CONFIG_PATH environment variable if you 9757installed software in a non-standard prefix. 9758 9759_PKG_TEXT 9760])], 9761 [AC_MSG_RESULT([no]) 9762 $4]) 9763elif test $pkg_failed = untried; then 9764 ifelse([$4], , [AC_MSG_FAILURE(dnl 9765[The pkg-config script could not be found or is too old. Make sure it 9766is in your PATH or set the PKG_CONFIG environment variable to the full 9767path to pkg-config. 9768 9769_PKG_TEXT 9770 9771To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9772 [$4]) 9773else 9774 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9775 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9776 AC_MSG_RESULT([yes]) 9777 ifelse([$3], , :, [$3]) 9778fi[]dnl 9779])# PKG_CHECK_MODULES 9780 9781dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9782dnl 9783dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9784dnl 9785dnl Permission is hereby granted, free of charge, to any person obtaining a 9786dnl copy of this software and associated documentation files (the "Software"), 9787dnl to deal in the Software without restriction, including without limitation 9788dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9789dnl and/or sell copies of the Software, and to permit persons to whom the 9790dnl Software is furnished to do so, subject to the following conditions: 9791dnl 9792dnl The above copyright notice and this permission notice (including the next 9793dnl paragraph) shall be included in all copies or substantial portions of the 9794dnl Software. 9795dnl 9796dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9797dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9798dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9799dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9800dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9801dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9802dnl DEALINGS IN THE SOFTWARE. 9803 9804# XORG_MACROS_VERSION(required-version) 9805# ------------------------------------- 9806# Minimum version: 1.1.0 9807# 9808# If you're using a macro added in Version 1.1 or newer, include this in 9809# your configure.ac with the minimum required version, such as: 9810# XORG_MACROS_VERSION(1.1) 9811# 9812# To ensure that this macro is defined, also add: 9813# m4_ifndef([XORG_MACROS_VERSION], 9814# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9815# 9816# 9817# See the "minimum version" comment for each macro you use to see what 9818# version you require. 9819m4_defun([XORG_MACROS_VERSION],[ 9820m4_define([vers_have], [1.17]) 9821m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9822m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9823m4_if(m4_cmp(maj_have, maj_needed), 0,, 9824 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9825m4_if(m4_version_compare(vers_have, [$1]), -1, 9826 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9827m4_undefine([vers_have]) 9828m4_undefine([maj_have]) 9829m4_undefine([maj_needed]) 9830]) # XORG_MACROS_VERSION 9831 9832# XORG_PROG_RAWCPP() 9833# ------------------ 9834# Minimum version: 1.0.0 9835# 9836# Find cpp program and necessary flags for use in pre-processing text files 9837# such as man pages and config files 9838AC_DEFUN([XORG_PROG_RAWCPP],[ 9839AC_REQUIRE([AC_PROG_CPP]) 9840AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9841 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9842 9843# Check for flag to avoid builtin definitions - assumes unix is predefined, 9844# which is not the best choice for supporting other OS'es, but covers most 9845# of the ones we need for now. 9846AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9847AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9848if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9849 AC_MSG_RESULT([no]) 9850else 9851 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9852 RAWCPPFLAGS=-undef 9853 AC_MSG_RESULT([yes]) 9854 # under Cygwin unix is still defined even with -undef 9855 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9856 RAWCPPFLAGS="-undef -ansi" 9857 AC_MSG_RESULT([yes, with -ansi]) 9858 else 9859 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9860 fi 9861fi 9862rm -f conftest.$ac_ext 9863 9864AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9865AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9866if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9867 AC_MSG_RESULT([no]) 9868else 9869 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9870 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9871 AC_MSG_RESULT([yes]) 9872 else 9873 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9874 fi 9875fi 9876rm -f conftest.$ac_ext 9877AC_SUBST(RAWCPPFLAGS) 9878]) # XORG_PROG_RAWCPP 9879 9880# XORG_MANPAGE_SECTIONS() 9881# ----------------------- 9882# Minimum version: 1.0.0 9883# 9884# Determine which sections man pages go in for the different man page types 9885# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9886# Not sure if there's any better way than just hardcoding by OS name. 9887# Override default settings by setting environment variables 9888# Added MAN_SUBSTS in version 1.8 9889# Added AC_PROG_SED in version 1.8 9890 9891AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9892AC_REQUIRE([AC_CANONICAL_HOST]) 9893AC_REQUIRE([AC_PROG_SED]) 9894 9895if test x$APP_MAN_SUFFIX = x ; then 9896 APP_MAN_SUFFIX=1 9897fi 9898if test x$APP_MAN_DIR = x ; then 9899 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9900fi 9901 9902if test x$LIB_MAN_SUFFIX = x ; then 9903 LIB_MAN_SUFFIX=3 9904fi 9905if test x$LIB_MAN_DIR = x ; then 9906 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9907fi 9908 9909if test x$FILE_MAN_SUFFIX = x ; then 9910 case $host_os in 9911 solaris*) FILE_MAN_SUFFIX=4 ;; 9912 *) FILE_MAN_SUFFIX=5 ;; 9913 esac 9914fi 9915if test x$FILE_MAN_DIR = x ; then 9916 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9917fi 9918 9919if test x$MISC_MAN_SUFFIX = x ; then 9920 case $host_os in 9921 solaris*) MISC_MAN_SUFFIX=5 ;; 9922 *) MISC_MAN_SUFFIX=7 ;; 9923 esac 9924fi 9925if test x$MISC_MAN_DIR = x ; then 9926 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9927fi 9928 9929if test x$DRIVER_MAN_SUFFIX = x ; then 9930 case $host_os in 9931 solaris*) DRIVER_MAN_SUFFIX=7 ;; 9932 *) DRIVER_MAN_SUFFIX=4 ;; 9933 esac 9934fi 9935if test x$DRIVER_MAN_DIR = x ; then 9936 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9937fi 9938 9939if test x$ADMIN_MAN_SUFFIX = x ; then 9940 case $host_os in 9941 solaris*) ADMIN_MAN_SUFFIX=1m ;; 9942 *) ADMIN_MAN_SUFFIX=8 ;; 9943 esac 9944fi 9945if test x$ADMIN_MAN_DIR = x ; then 9946 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9947fi 9948 9949 9950AC_SUBST([APP_MAN_SUFFIX]) 9951AC_SUBST([LIB_MAN_SUFFIX]) 9952AC_SUBST([FILE_MAN_SUFFIX]) 9953AC_SUBST([MISC_MAN_SUFFIX]) 9954AC_SUBST([DRIVER_MAN_SUFFIX]) 9955AC_SUBST([ADMIN_MAN_SUFFIX]) 9956AC_SUBST([APP_MAN_DIR]) 9957AC_SUBST([LIB_MAN_DIR]) 9958AC_SUBST([FILE_MAN_DIR]) 9959AC_SUBST([MISC_MAN_DIR]) 9960AC_SUBST([DRIVER_MAN_DIR]) 9961AC_SUBST([ADMIN_MAN_DIR]) 9962 9963XORG_MAN_PAGE="X Version 11" 9964AC_SUBST([XORG_MAN_PAGE]) 9965MAN_SUBSTS="\ 9966 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9967 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9968 -e 's|__xservername__|Xorg|g' \ 9969 -e 's|__xconfigfile__|xorg.conf|g' \ 9970 -e 's|__projectroot__|\$(prefix)|g' \ 9971 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9972 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9973 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9974 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9975 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9976 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9977 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9978AC_SUBST([MAN_SUBSTS]) 9979 9980]) # XORG_MANPAGE_SECTIONS 9981 9982# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9983# ------------------------ 9984# Minimum version: 1.7.0 9985# 9986# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9987# provided by xorg-sgml-doctools, if installed. 9988AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9989AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9990XORG_SGML_PATH= 9991PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9992 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9993 [m4_ifval([$1],[:], 9994 [if test x"$cross_compiling" != x"yes" ; then 9995 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9996 [XORG_SGML_PATH=$prefix/share/sgml]) 9997 fi]) 9998 ]) 9999 10000# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10001# the path and the name of the doc stylesheet 10002if test "x$XORG_SGML_PATH" != "x" ; then 10003 AC_MSG_RESULT([$XORG_SGML_PATH]) 10004 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10005 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10006else 10007 AC_MSG_RESULT([no]) 10008fi 10009 10010AC_SUBST(XORG_SGML_PATH) 10011AC_SUBST(STYLESHEET_SRCDIR) 10012AC_SUBST(XSL_STYLESHEET) 10013AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10014]) # XORG_CHECK_SGML_DOCTOOLS 10015 10016# XORG_CHECK_LINUXDOC 10017# ------------------- 10018# Minimum version: 1.0.0 10019# 10020# Defines the variable MAKE_TEXT if the necessary tools and 10021# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10022# Whether or not the necessary tools and files are found can be checked 10023# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10024AC_DEFUN([XORG_CHECK_LINUXDOC],[ 10025AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10026AC_REQUIRE([XORG_WITH_PS2PDF]) 10027 10028AC_PATH_PROG(LINUXDOC, linuxdoc) 10029 10030AC_MSG_CHECKING([whether to build documentation]) 10031 10032if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10033 BUILDDOC=yes 10034else 10035 BUILDDOC=no 10036fi 10037 10038AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10039 10040AC_MSG_RESULT([$BUILDDOC]) 10041 10042AC_MSG_CHECKING([whether to build pdf documentation]) 10043 10044if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10045 BUILDPDFDOC=yes 10046else 10047 BUILDPDFDOC=no 10048fi 10049 10050AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10051 10052AC_MSG_RESULT([$BUILDPDFDOC]) 10053 10054MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10055MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10056MAKE_PDF="$PS2PDF" 10057MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10058 10059AC_SUBST(MAKE_TEXT) 10060AC_SUBST(MAKE_PS) 10061AC_SUBST(MAKE_PDF) 10062AC_SUBST(MAKE_HTML) 10063]) # XORG_CHECK_LINUXDOC 10064 10065# XORG_CHECK_DOCBOOK 10066# ------------------- 10067# Minimum version: 1.0.0 10068# 10069# Checks for the ability to build output formats from SGML DocBook source. 10070# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10071# indicates whether the necessary tools and files are found and, if set, 10072# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10073AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10074AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10075 10076BUILDTXTDOC=no 10077BUILDPDFDOC=no 10078BUILDPSDOC=no 10079BUILDHTMLDOC=no 10080 10081AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10082AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10083AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10084AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10085 10086AC_MSG_CHECKING([whether to build text documentation]) 10087if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10088 test x$BUILD_TXTDOC != xno; then 10089 BUILDTXTDOC=yes 10090fi 10091AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10092AC_MSG_RESULT([$BUILDTXTDOC]) 10093 10094AC_MSG_CHECKING([whether to build PDF documentation]) 10095if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10096 test x$BUILD_PDFDOC != xno; then 10097 BUILDPDFDOC=yes 10098fi 10099AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10100AC_MSG_RESULT([$BUILDPDFDOC]) 10101 10102AC_MSG_CHECKING([whether to build PostScript documentation]) 10103if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10104 test x$BUILD_PSDOC != xno; then 10105 BUILDPSDOC=yes 10106fi 10107AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10108AC_MSG_RESULT([$BUILDPSDOC]) 10109 10110AC_MSG_CHECKING([whether to build HTML documentation]) 10111if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10112 test x$BUILD_HTMLDOC != xno; then 10113 BUILDHTMLDOC=yes 10114fi 10115AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10116AC_MSG_RESULT([$BUILDHTMLDOC]) 10117 10118MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10119MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10120MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10121MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10122 10123AC_SUBST(MAKE_TEXT) 10124AC_SUBST(MAKE_PS) 10125AC_SUBST(MAKE_PDF) 10126AC_SUBST(MAKE_HTML) 10127]) # XORG_CHECK_DOCBOOK 10128 10129# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10130# ---------------- 10131# Minimum version: 1.5.0 10132# Minimum version for optional DEFAULT argument: 1.11.0 10133# 10134# Documentation tools are not always available on all platforms and sometimes 10135# not at the appropriate level. This macro enables a module to test for the 10136# presence of the tool and obtain it's path in separate variables. Coupled with 10137# the --with-xmlto option, it allows maximum flexibilty in making decisions 10138# as whether or not to use the xmlto package. When DEFAULT is not specified, 10139# --with-xmlto assumes 'auto'. 10140# 10141# Interface to module: 10142# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10143# XMLTO: returns the path of the xmlto program found 10144# returns the path set by the user in the environment 10145# --with-xmlto: 'yes' user instructs the module to use xmlto 10146# 'no' user instructs the module not to use xmlto 10147# 10148# Added in version 1.10.0 10149# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10150# xmlto for text output requires either lynx, links, or w3m browsers 10151# 10152# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10153# 10154AC_DEFUN([XORG_WITH_XMLTO],[ 10155AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10156m4_define([_defopt], m4_default([$2], [auto])) 10157AC_ARG_WITH(xmlto, 10158 AS_HELP_STRING([--with-xmlto], 10159 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10160 [use_xmlto=$withval], [use_xmlto=]_defopt) 10161m4_undefine([_defopt]) 10162 10163if test "x$use_xmlto" = x"auto"; then 10164 AC_PATH_PROG([XMLTO], [xmlto]) 10165 if test "x$XMLTO" = "x"; then 10166 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10167 have_xmlto=no 10168 else 10169 have_xmlto=yes 10170 fi 10171elif test "x$use_xmlto" = x"yes" ; then 10172 AC_PATH_PROG([XMLTO], [xmlto]) 10173 if test "x$XMLTO" = "x"; then 10174 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10175 fi 10176 have_xmlto=yes 10177elif test "x$use_xmlto" = x"no" ; then 10178 if test "x$XMLTO" != "x"; then 10179 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10180 fi 10181 have_xmlto=no 10182else 10183 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10184fi 10185 10186# Test for a minimum version of xmlto, if provided. 10187m4_ifval([$1], 10188[if test "$have_xmlto" = yes; then 10189 # scrape the xmlto version 10190 AC_MSG_CHECKING([the xmlto version]) 10191 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10192 AC_MSG_RESULT([$xmlto_version]) 10193 AS_VERSION_COMPARE([$xmlto_version], [$1], 10194 [if test "x$use_xmlto" = xauto; then 10195 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10196 have_xmlto=no 10197 else 10198 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10199 fi]) 10200fi]) 10201 10202# Test for the ability of xmlto to generate a text target 10203have_xmlto_text=no 10204cat > conftest.xml << "EOF" 10205EOF 10206AS_IF([test "$have_xmlto" = yes], 10207 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10208 [have_xmlto_text=yes], 10209 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10210rm -f conftest.xml 10211AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10212AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10213]) # XORG_WITH_XMLTO 10214 10215# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10216# -------------------------------------------- 10217# Minimum version: 1.12.0 10218# Minimum version for optional DEFAULT argument: 1.12.0 10219# 10220# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10221# XML-based language used for the transformation of XML documents. 10222# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10223# It is used under the cover by xmlto to generate html files from DocBook/XML. 10224# The XSLT processor is often used as a standalone tool for transformations. 10225# It should not be assumed that this tool is used only to work with documnetation. 10226# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10227# 10228# Interface to module: 10229# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10230# XSLTPROC: returns the path of the xsltproc program found 10231# returns the path set by the user in the environment 10232# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10233# 'no' user instructs the module not to use xsltproc 10234# have_xsltproc: returns yes if xsltproc found in PATH or no 10235# 10236# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10237# 10238AC_DEFUN([XORG_WITH_XSLTPROC],[ 10239AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10240# Preserves the interface, should it be implemented later 10241m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10242m4_define([_defopt], m4_default([$2], [auto])) 10243AC_ARG_WITH(xsltproc, 10244 AS_HELP_STRING([--with-xsltproc], 10245 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10246 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10247m4_undefine([_defopt]) 10248 10249if test "x$use_xsltproc" = x"auto"; then 10250 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10251 if test "x$XSLTPROC" = "x"; then 10252 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10253 have_xsltproc=no 10254 else 10255 have_xsltproc=yes 10256 fi 10257elif test "x$use_xsltproc" = x"yes" ; then 10258 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10259 if test "x$XSLTPROC" = "x"; then 10260 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10261 fi 10262 have_xsltproc=yes 10263elif test "x$use_xsltproc" = x"no" ; then 10264 if test "x$XSLTPROC" != "x"; then 10265 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10266 fi 10267 have_xsltproc=no 10268else 10269 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10270fi 10271 10272AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10273]) # XORG_WITH_XSLTPROC 10274 10275# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10276# ---------------------------------------- 10277# Minimum version: 1.15.0 10278# 10279# PERL (Practical Extraction and Report Language) is a language optimized for 10280# scanning arbitrary text files, extracting information from those text files, 10281# and printing reports based on that information. 10282# 10283# When DEFAULT is not specified, --with-perl assumes 'auto'. 10284# 10285# Interface to module: 10286# HAVE_PERL: used in makefiles to conditionally scan text files 10287# PERL: returns the path of the perl program found 10288# returns the path set by the user in the environment 10289# --with-perl: 'yes' user instructs the module to use perl 10290# 'no' user instructs the module not to use perl 10291# have_perl: returns yes if perl found in PATH or no 10292# 10293# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10294# 10295AC_DEFUN([XORG_WITH_PERL],[ 10296AC_ARG_VAR([PERL], [Path to perl command]) 10297# Preserves the interface, should it be implemented later 10298m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10299m4_define([_defopt], m4_default([$2], [auto])) 10300AC_ARG_WITH(perl, 10301 AS_HELP_STRING([--with-perl], 10302 [Use perl for extracting information from files (default: ]_defopt[)]), 10303 [use_perl=$withval], [use_perl=]_defopt) 10304m4_undefine([_defopt]) 10305 10306if test "x$use_perl" = x"auto"; then 10307 AC_PATH_PROG([PERL], [perl]) 10308 if test "x$PERL" = "x"; then 10309 AC_MSG_WARN([perl not found - cannot extract information and report]) 10310 have_perl=no 10311 else 10312 have_perl=yes 10313 fi 10314elif test "x$use_perl" = x"yes" ; then 10315 AC_PATH_PROG([PERL], [perl]) 10316 if test "x$PERL" = "x"; then 10317 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10318 fi 10319 have_perl=yes 10320elif test "x$use_perl" = x"no" ; then 10321 if test "x$PERL" != "x"; then 10322 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10323 fi 10324 have_perl=no 10325else 10326 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10327fi 10328 10329AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10330]) # XORG_WITH_PERL 10331 10332# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10333# ---------------- 10334# Minimum version: 1.5.0 10335# Minimum version for optional DEFAULT argument: 1.11.0 10336# 10337# Documentation tools are not always available on all platforms and sometimes 10338# not at the appropriate level. This macro enables a module to test for the 10339# presence of the tool and obtain it's path in separate variables. Coupled with 10340# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10341# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10342# --with-asciidoc assumes 'auto'. 10343# 10344# Interface to module: 10345# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10346# ASCIIDOC: returns the path of the asciidoc program found 10347# returns the path set by the user in the environment 10348# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10349# 'no' user instructs the module not to use asciidoc 10350# 10351# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10352# 10353AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10354AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10355m4_define([_defopt], m4_default([$2], [auto])) 10356AC_ARG_WITH(asciidoc, 10357 AS_HELP_STRING([--with-asciidoc], 10358 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10359 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10360m4_undefine([_defopt]) 10361 10362if test "x$use_asciidoc" = x"auto"; then 10363 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10364 if test "x$ASCIIDOC" = "x"; then 10365 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10366 have_asciidoc=no 10367 else 10368 have_asciidoc=yes 10369 fi 10370elif test "x$use_asciidoc" = x"yes" ; then 10371 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10372 if test "x$ASCIIDOC" = "x"; then 10373 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10374 fi 10375 have_asciidoc=yes 10376elif test "x$use_asciidoc" = x"no" ; then 10377 if test "x$ASCIIDOC" != "x"; then 10378 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10379 fi 10380 have_asciidoc=no 10381else 10382 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10383fi 10384m4_ifval([$1], 10385[if test "$have_asciidoc" = yes; then 10386 # scrape the asciidoc version 10387 AC_MSG_CHECKING([the asciidoc version]) 10388 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10389 AC_MSG_RESULT([$asciidoc_version]) 10390 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10391 [if test "x$use_asciidoc" = xauto; then 10392 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10393 have_asciidoc=no 10394 else 10395 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10396 fi]) 10397fi]) 10398AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10399]) # XORG_WITH_ASCIIDOC 10400 10401# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10402# -------------------------------- 10403# Minimum version: 1.5.0 10404# Minimum version for optional DEFAULT argument: 1.11.0 10405# 10406# Documentation tools are not always available on all platforms and sometimes 10407# not at the appropriate level. This macro enables a module to test for the 10408# presence of the tool and obtain it's path in separate variables. Coupled with 10409# the --with-doxygen option, it allows maximum flexibilty in making decisions 10410# as whether or not to use the doxygen package. When DEFAULT is not specified, 10411# --with-doxygen assumes 'auto'. 10412# 10413# Interface to module: 10414# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10415# DOXYGEN: returns the path of the doxygen program found 10416# returns the path set by the user in the environment 10417# --with-doxygen: 'yes' user instructs the module to use doxygen 10418# 'no' user instructs the module not to use doxygen 10419# 10420# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10421# 10422AC_DEFUN([XORG_WITH_DOXYGEN],[ 10423AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10424m4_define([_defopt], m4_default([$2], [auto])) 10425AC_ARG_WITH(doxygen, 10426 AS_HELP_STRING([--with-doxygen], 10427 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10428 [use_doxygen=$withval], [use_doxygen=]_defopt) 10429m4_undefine([_defopt]) 10430 10431if test "x$use_doxygen" = x"auto"; then 10432 AC_PATH_PROG([DOXYGEN], [doxygen]) 10433 if test "x$DOXYGEN" = "x"; then 10434 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10435 have_doxygen=no 10436 else 10437 have_doxygen=yes 10438 fi 10439elif test "x$use_doxygen" = x"yes" ; then 10440 AC_PATH_PROG([DOXYGEN], [doxygen]) 10441 if test "x$DOXYGEN" = "x"; then 10442 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10443 fi 10444 have_doxygen=yes 10445elif test "x$use_doxygen" = x"no" ; then 10446 if test "x$DOXYGEN" != "x"; then 10447 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10448 fi 10449 have_doxygen=no 10450else 10451 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10452fi 10453m4_ifval([$1], 10454[if test "$have_doxygen" = yes; then 10455 # scrape the doxygen version 10456 AC_MSG_CHECKING([the doxygen version]) 10457 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10458 AC_MSG_RESULT([$doxygen_version]) 10459 AS_VERSION_COMPARE([$doxygen_version], [$1], 10460 [if test "x$use_doxygen" = xauto; then 10461 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10462 have_doxygen=no 10463 else 10464 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10465 fi]) 10466fi]) 10467AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10468]) # XORG_WITH_DOXYGEN 10469 10470# XORG_WITH_GROFF([DEFAULT]) 10471# ---------------- 10472# Minimum version: 1.6.0 10473# Minimum version for optional DEFAULT argument: 1.11.0 10474# 10475# Documentation tools are not always available on all platforms and sometimes 10476# not at the appropriate level. This macro enables a module to test for the 10477# presence of the tool and obtain it's path in separate variables. Coupled with 10478# the --with-groff option, it allows maximum flexibilty in making decisions 10479# as whether or not to use the groff package. When DEFAULT is not specified, 10480# --with-groff assumes 'auto'. 10481# 10482# Interface to module: 10483# HAVE_GROFF: used in makefiles to conditionally generate documentation 10484# HAVE_GROFF_MM: the memorandum macros (-mm) package 10485# HAVE_GROFF_MS: the -ms macros package 10486# GROFF: returns the path of the groff program found 10487# returns the path set by the user in the environment 10488# --with-groff: 'yes' user instructs the module to use groff 10489# 'no' user instructs the module not to use groff 10490# 10491# Added in version 1.9.0: 10492# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10493# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10494# psselect from the psutils package. 10495# the ghostcript package. Refer to the grohtml man pages 10496# 10497# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10498# 10499# OS and distros often splits groff in a basic and full package, the former 10500# having the groff program and the later having devices, fonts and macros 10501# Checking for the groff executable is not enough. 10502# 10503# If macros are missing, we cannot assume that groff is useless, so we don't 10504# unset HAVE_GROFF or GROFF env variables. 10505# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10506# 10507AC_DEFUN([XORG_WITH_GROFF],[ 10508AC_ARG_VAR([GROFF], [Path to groff command]) 10509m4_define([_defopt], m4_default([$1], [auto])) 10510AC_ARG_WITH(groff, 10511 AS_HELP_STRING([--with-groff], 10512 [Use groff to regenerate documentation (default: ]_defopt[)]), 10513 [use_groff=$withval], [use_groff=]_defopt) 10514m4_undefine([_defopt]) 10515 10516if test "x$use_groff" = x"auto"; then 10517 AC_PATH_PROG([GROFF], [groff]) 10518 if test "x$GROFF" = "x"; then 10519 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10520 have_groff=no 10521 else 10522 have_groff=yes 10523 fi 10524elif test "x$use_groff" = x"yes" ; then 10525 AC_PATH_PROG([GROFF], [groff]) 10526 if test "x$GROFF" = "x"; then 10527 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10528 fi 10529 have_groff=yes 10530elif test "x$use_groff" = x"no" ; then 10531 if test "x$GROFF" != "x"; then 10532 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10533 fi 10534 have_groff=no 10535else 10536 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10537fi 10538 10539# We have groff, test for the presence of the macro packages 10540if test "x$have_groff" = x"yes"; then 10541 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10542 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10543 groff_ms_works=yes 10544 else 10545 groff_ms_works=no 10546 fi 10547 AC_MSG_RESULT([$groff_ms_works]) 10548 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10549 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10550 groff_mm_works=yes 10551 else 10552 groff_mm_works=no 10553 fi 10554 AC_MSG_RESULT([$groff_mm_works]) 10555fi 10556 10557# We have groff, test for HTML dependencies, one command per package 10558if test "x$have_groff" = x"yes"; then 10559 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10560 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10561 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10562 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10563 have_groff_html=yes 10564 else 10565 have_groff_html=no 10566 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10567 fi 10568fi 10569 10570# Set Automake conditionals for Makefiles 10571AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10572AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10573AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10574AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10575]) # XORG_WITH_GROFF 10576 10577# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10578# --------------------------------------- 10579# Minimum version: 1.6.0 10580# Minimum version for optional DEFAULT argument: 1.11.0 10581# Minimum version for optional MIN-VERSION argument: 1.15.0 10582# 10583# Documentation tools are not always available on all platforms and sometimes 10584# not at the appropriate level. This macro enables a module to test for the 10585# presence of the tool and obtain it's path in separate variables. Coupled with 10586# the --with-fop option, it allows maximum flexibilty in making decisions 10587# as whether or not to use the fop package. When DEFAULT is not specified, 10588# --with-fop assumes 'auto'. 10589# 10590# Interface to module: 10591# HAVE_FOP: used in makefiles to conditionally generate documentation 10592# FOP: returns the path of the fop program found 10593# returns the path set by the user in the environment 10594# --with-fop: 'yes' user instructs the module to use fop 10595# 'no' user instructs the module not to use fop 10596# 10597# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10598# 10599AC_DEFUN([XORG_WITH_FOP],[ 10600AC_ARG_VAR([FOP], [Path to fop command]) 10601m4_define([_defopt], m4_default([$2], [auto])) 10602AC_ARG_WITH(fop, 10603 AS_HELP_STRING([--with-fop], 10604 [Use fop to regenerate documentation (default: ]_defopt[)]), 10605 [use_fop=$withval], [use_fop=]_defopt) 10606m4_undefine([_defopt]) 10607 10608if test "x$use_fop" = x"auto"; then 10609 AC_PATH_PROG([FOP], [fop]) 10610 if test "x$FOP" = "x"; then 10611 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10612 have_fop=no 10613 else 10614 have_fop=yes 10615 fi 10616elif test "x$use_fop" = x"yes" ; then 10617 AC_PATH_PROG([FOP], [fop]) 10618 if test "x$FOP" = "x"; then 10619 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10620 fi 10621 have_fop=yes 10622elif test "x$use_fop" = x"no" ; then 10623 if test "x$FOP" != "x"; then 10624 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10625 fi 10626 have_fop=no 10627else 10628 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10629fi 10630 10631# Test for a minimum version of fop, if provided. 10632m4_ifval([$1], 10633[if test "$have_fop" = yes; then 10634 # scrape the fop version 10635 AC_MSG_CHECKING([for fop minimum version]) 10636 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10637 AC_MSG_RESULT([$fop_version]) 10638 AS_VERSION_COMPARE([$fop_version], [$1], 10639 [if test "x$use_fop" = xauto; then 10640 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10641 have_fop=no 10642 else 10643 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10644 fi]) 10645fi]) 10646AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10647]) # XORG_WITH_FOP 10648 10649# XORG_WITH_PS2PDF([DEFAULT]) 10650# ---------------- 10651# Minimum version: 1.6.0 10652# Minimum version for optional DEFAULT argument: 1.11.0 10653# 10654# Documentation tools are not always available on all platforms and sometimes 10655# not at the appropriate level. This macro enables a module to test for the 10656# presence of the tool and obtain it's path in separate variables. Coupled with 10657# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10658# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10659# --with-ps2pdf assumes 'auto'. 10660# 10661# Interface to module: 10662# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10663# PS2PDF: returns the path of the ps2pdf program found 10664# returns the path set by the user in the environment 10665# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10666# 'no' user instructs the module not to use ps2pdf 10667# 10668# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10669# 10670AC_DEFUN([XORG_WITH_PS2PDF],[ 10671AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10672m4_define([_defopt], m4_default([$1], [auto])) 10673AC_ARG_WITH(ps2pdf, 10674 AS_HELP_STRING([--with-ps2pdf], 10675 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10676 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10677m4_undefine([_defopt]) 10678 10679if test "x$use_ps2pdf" = x"auto"; then 10680 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10681 if test "x$PS2PDF" = "x"; then 10682 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10683 have_ps2pdf=no 10684 else 10685 have_ps2pdf=yes 10686 fi 10687elif test "x$use_ps2pdf" = x"yes" ; then 10688 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10689 if test "x$PS2PDF" = "x"; then 10690 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10691 fi 10692 have_ps2pdf=yes 10693elif test "x$use_ps2pdf" = x"no" ; then 10694 if test "x$PS2PDF" != "x"; then 10695 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10696 fi 10697 have_ps2pdf=no 10698else 10699 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10700fi 10701AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10702]) # XORG_WITH_PS2PDF 10703 10704# XORG_ENABLE_DOCS (enable_docs=yes) 10705# ---------------- 10706# Minimum version: 1.6.0 10707# 10708# Documentation tools are not always available on all platforms and sometimes 10709# not at the appropriate level. This macro enables a builder to skip all 10710# documentation targets except traditional man pages. 10711# Combined with the specific tool checking macros XORG_WITH_*, it provides 10712# maximum flexibilty in controlling documentation building. 10713# Refer to: 10714# XORG_WITH_XMLTO --with-xmlto 10715# XORG_WITH_ASCIIDOC --with-asciidoc 10716# XORG_WITH_DOXYGEN --with-doxygen 10717# XORG_WITH_FOP --with-fop 10718# XORG_WITH_GROFF --with-groff 10719# XORG_WITH_PS2PDF --with-ps2pdf 10720# 10721# Interface to module: 10722# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10723# --enable-docs: 'yes' user instructs the module to generate docs 10724# 'no' user instructs the module not to generate docs 10725# parm1: specify the default value, yes or no. 10726# 10727AC_DEFUN([XORG_ENABLE_DOCS],[ 10728m4_define([docs_default], m4_default([$1], [yes])) 10729AC_ARG_ENABLE(docs, 10730 AS_HELP_STRING([--enable-docs], 10731 [Enable building the documentation (default: ]docs_default[)]), 10732 [build_docs=$enableval], [build_docs=]docs_default) 10733m4_undefine([docs_default]) 10734AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10735AC_MSG_CHECKING([whether to build documentation]) 10736AC_MSG_RESULT([$build_docs]) 10737]) # XORG_ENABLE_DOCS 10738 10739# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10740# ---------------- 10741# Minimum version: 1.6.0 10742# 10743# This macro enables a builder to skip all developer documentation. 10744# Combined with the specific tool checking macros XORG_WITH_*, it provides 10745# maximum flexibilty in controlling documentation building. 10746# Refer to: 10747# XORG_WITH_XMLTO --with-xmlto 10748# XORG_WITH_ASCIIDOC --with-asciidoc 10749# XORG_WITH_DOXYGEN --with-doxygen 10750# XORG_WITH_FOP --with-fop 10751# XORG_WITH_GROFF --with-groff 10752# XORG_WITH_PS2PDF --with-ps2pdf 10753# 10754# Interface to module: 10755# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10756# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10757# 'no' user instructs the module not to generate developer docs 10758# parm1: specify the default value, yes or no. 10759# 10760AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10761m4_define([devel_default], m4_default([$1], [yes])) 10762AC_ARG_ENABLE(devel-docs, 10763 AS_HELP_STRING([--enable-devel-docs], 10764 [Enable building the developer documentation (default: ]devel_default[)]), 10765 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10766m4_undefine([devel_default]) 10767AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10768AC_MSG_CHECKING([whether to build developer documentation]) 10769AC_MSG_RESULT([$build_devel_docs]) 10770]) # XORG_ENABLE_DEVEL_DOCS 10771 10772# XORG_ENABLE_SPECS (enable_specs=yes) 10773# ---------------- 10774# Minimum version: 1.6.0 10775# 10776# This macro enables a builder to skip all functional specification targets. 10777# Combined with the specific tool checking macros XORG_WITH_*, it provides 10778# maximum flexibilty in controlling documentation building. 10779# Refer to: 10780# XORG_WITH_XMLTO --with-xmlto 10781# XORG_WITH_ASCIIDOC --with-asciidoc 10782# XORG_WITH_DOXYGEN --with-doxygen 10783# XORG_WITH_FOP --with-fop 10784# XORG_WITH_GROFF --with-groff 10785# XORG_WITH_PS2PDF --with-ps2pdf 10786# 10787# Interface to module: 10788# ENABLE_SPECS: used in makefiles to conditionally generate specs 10789# --enable-specs: 'yes' user instructs the module to generate specs 10790# 'no' user instructs the module not to generate specs 10791# parm1: specify the default value, yes or no. 10792# 10793AC_DEFUN([XORG_ENABLE_SPECS],[ 10794m4_define([spec_default], m4_default([$1], [yes])) 10795AC_ARG_ENABLE(specs, 10796 AS_HELP_STRING([--enable-specs], 10797 [Enable building the specs (default: ]spec_default[)]), 10798 [build_specs=$enableval], [build_specs=]spec_default) 10799m4_undefine([spec_default]) 10800AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10801AC_MSG_CHECKING([whether to build functional specifications]) 10802AC_MSG_RESULT([$build_specs]) 10803]) # XORG_ENABLE_SPECS 10804 10805# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10806# ---------------------------------------------- 10807# Minimum version: 1.13.0 10808# 10809# This macro enables a builder to enable/disable unit testing 10810# It makes no assumption about the test cases implementation 10811# Test cases may or may not use Automake "Support for test suites" 10812# They may or may not use the software utility library GLib 10813# 10814# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10815# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10816# The variable enable_unit_tests is used by other macros in this file. 10817# 10818# Interface to module: 10819# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10820# enable_unit_tests: used in configure.ac for additional configuration 10821# --enable-unit-tests: 'yes' user instructs the module to build tests 10822# 'no' user instructs the module not to build tests 10823# parm1: specify the default value, yes or no. 10824# 10825AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10826AC_BEFORE([$0], [XORG_WITH_GLIB]) 10827AC_BEFORE([$0], [XORG_LD_WRAP]) 10828AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10829m4_define([_defopt], m4_default([$1], [auto])) 10830AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10831 [Enable building unit test cases (default: ]_defopt[)]), 10832 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10833m4_undefine([_defopt]) 10834AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10835AC_MSG_CHECKING([whether to build unit test cases]) 10836AC_MSG_RESULT([$enable_unit_tests]) 10837]) # XORG_ENABLE_UNIT_TESTS 10838 10839# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10840# ------------------------------------------------------ 10841# Minimum version: 1.17.0 10842# 10843# This macro enables a builder to enable/disable integration testing 10844# It makes no assumption about the test cases' implementation 10845# Test cases may or may not use Automake "Support for test suites" 10846# 10847# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10848# usually requires less dependencies and may be built and run under less 10849# stringent environments than integration tests. 10850# 10851# Interface to module: 10852# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10853# enable_integration_tests: used in configure.ac for additional configuration 10854# --enable-integration-tests: 'yes' user instructs the module to build tests 10855# 'no' user instructs the module not to build tests 10856# parm1: specify the default value, yes or no. 10857# 10858AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10859AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10860m4_define([_defopt], m4_default([$1], [auto])) 10861AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10862 [Enable building integration test cases (default: ]_defopt[)]), 10863 [enable_integration_tests=$enableval], 10864 [enable_integration_tests=]_defopt) 10865m4_undefine([_defopt]) 10866AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10867 [test "x$enable_integration_tests" != xno]) 10868AC_MSG_CHECKING([whether to build unit test cases]) 10869AC_MSG_RESULT([$enable_integration_tests]) 10870]) # XORG_ENABLE_INTEGRATION_TESTS 10871 10872# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10873# ---------------------------------------- 10874# Minimum version: 1.13.0 10875# 10876# GLib is a library which provides advanced data structures and functions. 10877# This macro enables a module to test for the presence of Glib. 10878# 10879# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10880# Otherwise the value of $enable_unit_tests is blank. 10881# 10882# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10883# test support usually requires less dependencies and may be built and run under 10884# less stringent environments than integration tests. 10885# 10886# Interface to module: 10887# HAVE_GLIB: used in makefiles to conditionally build targets 10888# with_glib: used in configure.ac to know if GLib has been found 10889# --with-glib: 'yes' user instructs the module to use glib 10890# 'no' user instructs the module not to use glib 10891# 10892AC_DEFUN([XORG_WITH_GLIB],[ 10893AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10894m4_define([_defopt], m4_default([$2], [auto])) 10895AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10896 [Use GLib library for unit testing (default: ]_defopt[)]), 10897 [with_glib=$withval], [with_glib=]_defopt) 10898m4_undefine([_defopt]) 10899 10900have_glib=no 10901# Do not probe GLib if user explicitly disabled unit testing 10902if test "x$enable_unit_tests" != x"no"; then 10903 # Do not probe GLib if user explicitly disabled it 10904 if test "x$with_glib" != x"no"; then 10905 m4_ifval( 10906 [$1], 10907 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10908 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10909 ) 10910 fi 10911fi 10912 10913# Not having GLib when unit testing has been explicitly requested is an error 10914if test "x$enable_unit_tests" = x"yes"; then 10915 if test "x$have_glib" = x"no"; then 10916 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10917 fi 10918fi 10919 10920# Having unit testing disabled when GLib has been explicitly requested is an error 10921if test "x$enable_unit_tests" = x"no"; then 10922 if test "x$with_glib" = x"yes"; then 10923 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10924 fi 10925fi 10926 10927# Not having GLib when it has been explicitly requested is an error 10928if test "x$with_glib" = x"yes"; then 10929 if test "x$have_glib" = x"no"; then 10930 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10931 fi 10932fi 10933 10934AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10935]) # XORG_WITH_GLIB 10936 10937# XORG_LD_WRAP([required|optional]) 10938# --------------------------------- 10939# Minimum version: 1.13.0 10940# 10941# Check if linker supports -wrap, passed via compiler flags 10942# 10943# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10944# Otherwise the value of $enable_unit_tests is blank. 10945# 10946# Argument added in 1.16.0 - default is "required", to match existing behavior 10947# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10948# available, an argument of "optional" allows use when some unit tests require 10949# ld -wrap and others do not. 10950# 10951AC_DEFUN([XORG_LD_WRAP],[ 10952XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10953 [AC_LANG_PROGRAM([#include <stdlib.h> 10954 void __wrap_exit(int status) { return; }], 10955 [exit(0);])]) 10956# Not having ld wrap when unit testing has been explicitly requested is an error 10957if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10958 if test "x$have_ld_wrap" = x"no"; then 10959 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10960 fi 10961fi 10962AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10963# 10964]) # XORG_LD_WRAP 10965 10966# XORG_CHECK_LINKER_FLAGS 10967# ----------------------- 10968# SYNOPSIS 10969# 10970# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10971# 10972# DESCRIPTION 10973# 10974# Check whether the given linker FLAGS work with the current language's 10975# linker, or whether they give an error. 10976# 10977# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10978# success/failure. 10979# 10980# PROGRAM-SOURCE is the program source to link with, if needed 10981# 10982# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10983# 10984# LICENSE 10985# 10986# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10987# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10988# Copyright (c) 2009 Matteo Frigo 10989# 10990# This program is free software: you can redistribute it and/or modify it 10991# under the terms of the GNU General Public License as published by the 10992# Free Software Foundation, either version 3 of the License, or (at your 10993# option) any later version. 10994# 10995# This program is distributed in the hope that it will be useful, but 10996# WITHOUT ANY WARRANTY; without even the implied warranty of 10997# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10998# Public License for more details. 10999# 11000# You should have received a copy of the GNU General Public License along 11001# with this program. If not, see <http://www.gnu.org/licenses/>. 11002# 11003# As a special exception, the respective Autoconf Macro's copyright owner 11004# gives unlimited permission to copy, distribute and modify the configure 11005# scripts that are the output of Autoconf when processing the Macro. You 11006# need not follow the terms of the GNU General Public License when using 11007# or distributing such scripts, even though portions of the text of the 11008# Macro appear in them. The GNU General Public License (GPL) does govern 11009# all other use of the material that constitutes the Autoconf Macro. 11010# 11011# This special exception to the GPL applies to versions of the Autoconf 11012# Macro released by the Autoconf Archive. When you make and distribute a 11013# modified version of the Autoconf Macro, you may extend this special 11014# exception to the GPL to apply to your modified version as well.# 11015AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11016[AC_MSG_CHECKING([whether the linker accepts $1]) 11017dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11018AS_LITERAL_IF([$1], 11019 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11020 ax_save_FLAGS=$LDFLAGS 11021 LDFLAGS="$1" 11022 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11023 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11024 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11025 LDFLAGS=$ax_save_FLAGS])], 11026 [ax_save_FLAGS=$LDFLAGS 11027 LDFLAGS="$1" 11028 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11029 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11030 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11031 LDFLAGS=$ax_save_FLAGS]) 11032eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11033AC_MSG_RESULT($xorg_check_linker_flags) 11034if test "x$xorg_check_linker_flags" = xyes; then 11035 m4_default([$2], :) 11036else 11037 m4_default([$3], :) 11038fi 11039]) # XORG_CHECK_LINKER_FLAGS 11040 11041# XORG_MEMORY_CHECK_FLAGS 11042# ----------------------- 11043# Minimum version: 1.16.0 11044# 11045# This macro attempts to find appropriate memory checking functionality 11046# for various platforms which unit testing code may use to catch various 11047# forms of memory allocation and access errors in testing. 11048# 11049# Interface to module: 11050# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11051# Usually added to TESTS_ENVIRONMENT in Makefile.am 11052# 11053# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11054# 11055AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11056 11057AC_REQUIRE([AC_CANONICAL_HOST]) 11058AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11059 [Environment variables to enable memory checking in tests]) 11060 11061# Check for different types of support on different platforms 11062case $host_os in 11063 solaris*) 11064 AC_CHECK_LIB([umem], [umem_alloc], 11065 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11066 ;; 11067 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11068 # both directly and inverted, so should not be 0 or 255. 11069 malloc_debug_env='MALLOC_PERTURB_=15' 11070 ;; 11071 darwin*) 11072 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11073 ;; 11074 *bsd*) 11075 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11076 ;; 11077esac 11078 11079# User supplied flags override default flags 11080if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11081 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11082fi 11083 11084AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11085]) # XORG_WITH_LINT 11086 11087# XORG_CHECK_MALLOC_ZERO 11088# ---------------------- 11089# Minimum version: 1.0.0 11090# 11091# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11092# malloc(0) returns NULL. Packages should add one of these cflags to 11093# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11094AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11095AC_ARG_ENABLE(malloc0returnsnull, 11096 AS_HELP_STRING([--enable-malloc0returnsnull], 11097 [malloc(0) returns NULL (default: auto)]), 11098 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11099 [MALLOC_ZERO_RETURNS_NULL=auto]) 11100 11101AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11102if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11103 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11104#include <stdlib.h> 11105],[ 11106 char *m0, *r0, *c0, *p; 11107 m0 = malloc(0); 11108 p = malloc(10); 11109 r0 = realloc(p,0); 11110 c0 = calloc(0,10); 11111 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11112])], 11113 [MALLOC_ZERO_RETURNS_NULL=yes], 11114 [MALLOC_ZERO_RETURNS_NULL=no], 11115 [MALLOC_ZERO_RETURNS_NULL=yes]) 11116fi 11117AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11118 11119if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11120 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11121 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11122 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11123else 11124 MALLOC_ZERO_CFLAGS="" 11125 XMALLOC_ZERO_CFLAGS="" 11126 XTMALLOC_ZERO_CFLAGS="" 11127fi 11128 11129AC_SUBST([MALLOC_ZERO_CFLAGS]) 11130AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11131AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11132]) # XORG_CHECK_MALLOC_ZERO 11133 11134# XORG_WITH_LINT() 11135# ---------------- 11136# Minimum version: 1.1.0 11137# 11138# This macro enables the use of a tool that flags some suspicious and 11139# non-portable constructs (likely to be bugs) in C language source code. 11140# It will attempt to locate the tool and use appropriate options. 11141# There are various lint type tools on different platforms. 11142# 11143# Interface to module: 11144# LINT: returns the path to the tool found on the platform 11145# or the value set to LINT on the configure cmd line 11146# also an Automake conditional 11147# LINT_FLAGS: an Automake variable with appropriate flags 11148# 11149# --with-lint: 'yes' user instructs the module to use lint 11150# 'no' user instructs the module not to use lint (default) 11151# 11152# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11153# If the user sets the value of LINT_FLAGS, they are used verbatim. 11154# 11155AC_DEFUN([XORG_WITH_LINT],[ 11156 11157AC_ARG_VAR([LINT], [Path to a lint-style command]) 11158AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11159AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11160 [Use a lint-style source code checker (default: disabled)])], 11161 [use_lint=$withval], [use_lint=no]) 11162 11163# Obtain platform specific info like program name and options 11164# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11165case $host_os in 11166 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11167 lint_name=splint 11168 lint_options="-badflag" 11169 ;; 11170 *freebsd* | *netbsd*) 11171 lint_name=lint 11172 lint_options="-u -b" 11173 ;; 11174 *solaris*) 11175 lint_name=lint 11176 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11177 ;; 11178esac 11179 11180# Test for the presence of the program (either guessed by the code or spelled out by the user) 11181if test "x$use_lint" = x"yes" ; then 11182 AC_PATH_PROG([LINT], [$lint_name]) 11183 if test "x$LINT" = "x"; then 11184 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11185 fi 11186elif test "x$use_lint" = x"no" ; then 11187 if test "x$LINT" != "x"; then 11188 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11189 fi 11190else 11191 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11192fi 11193 11194# User supplied flags override default flags 11195if test "x$LINT_FLAGS" != "x"; then 11196 lint_options=$LINT_FLAGS 11197fi 11198 11199AC_SUBST([LINT_FLAGS],[$lint_options]) 11200AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11201 11202]) # XORG_WITH_LINT 11203 11204# XORG_LINT_LIBRARY(LIBNAME) 11205# -------------------------- 11206# Minimum version: 1.1.0 11207# 11208# Sets up flags for building lint libraries for checking programs that call 11209# functions in the library. 11210# 11211# Interface to module: 11212# LINTLIB - Automake variable with the name of lint library file to make 11213# MAKE_LINT_LIB - Automake conditional 11214# 11215# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11216# - 'no' user instructs the module not to create a lint library (default) 11217 11218AC_DEFUN([XORG_LINT_LIBRARY],[ 11219AC_REQUIRE([XORG_WITH_LINT]) 11220AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11221 [Create lint library (default: disabled)])], 11222 [make_lint_lib=$enableval], [make_lint_lib=no]) 11223 11224if test "x$make_lint_lib" = x"yes" ; then 11225 LINTLIB=llib-l$1.ln 11226 if test "x$LINT" = "x"; then 11227 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11228 fi 11229elif test "x$make_lint_lib" != x"no" ; then 11230 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11231fi 11232 11233AC_SUBST(LINTLIB) 11234AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11235 11236]) # XORG_LINT_LIBRARY 11237 11238# XORG_COMPILER_BRAND 11239# ------------------- 11240# Minimum version: 1.14.0 11241# 11242# Checks for various brands of compilers and sets flags as appropriate: 11243# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11244# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11245# clang compiler - sets CLANGCC to "yes" 11246# Intel compiler - sets INTELCC to "yes" 11247# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11248# 11249AC_DEFUN([XORG_COMPILER_BRAND], [ 11250AC_LANG_CASE( 11251 [C], [ 11252 AC_REQUIRE([AC_PROG_CC_C99]) 11253 ], 11254 [C++], [ 11255 AC_REQUIRE([AC_PROG_CXX]) 11256 ] 11257) 11258AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11259AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11260AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11261]) # XORG_COMPILER_BRAND 11262 11263# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11264# --------------- 11265# Minimum version: 1.16.0 11266# 11267# Test if the compiler works when passed the given flag as a command line argument. 11268# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11269# next flag in the list until there are no more options. 11270# 11271# Note that this does not guarantee that the compiler supports the flag as some 11272# compilers will simply ignore arguments that they do not understand, but we do 11273# attempt to weed out false positives by using -Werror=unknown-warning-option and 11274# -Werror=unused-command-line-argument 11275# 11276AC_DEFUN([XORG_TESTSET_CFLAG], [ 11277m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11278m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11279 11280AC_LANG_COMPILER_REQUIRE 11281 11282AC_LANG_CASE( 11283 [C], [ 11284 AC_REQUIRE([AC_PROG_CC_C99]) 11285 define([PREFIX], [C]) 11286 define([CACHE_PREFIX], [cc]) 11287 define([COMPILER], [$CC]) 11288 ], 11289 [C++], [ 11290 define([PREFIX], [CXX]) 11291 define([CACHE_PREFIX], [cxx]) 11292 define([COMPILER], [$CXX]) 11293 ] 11294) 11295 11296[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11297 11298if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11299 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11300 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11301 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11302 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11303 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11304 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11305 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11306 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11307fi 11308 11309if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11310 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11311 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11312 fi 11313 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11314 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11315 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11316 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11317 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11318 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11319 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11320 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11321fi 11322 11323found="no" 11324m4_foreach([flag], m4_cdr($@), [ 11325 if test $found = "no" ; then 11326 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 11327 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11328 fi 11329 11330 if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 11331 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11332 fi 11333 11334 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11335 11336dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11337 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11338 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11339 AC_CACHE_VAL($cacheid, 11340 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11341 [eval $cacheid=yes], 11342 [eval $cacheid=no])]) 11343 11344 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11345 11346 eval supported=\$$cacheid 11347 AC_MSG_RESULT([$supported]) 11348 if test "$supported" = "yes" ; then 11349 $1="$$1 ]flag[" 11350 found="yes" 11351 fi 11352 fi 11353]) 11354]) # XORG_TESTSET_CFLAG 11355 11356# XORG_COMPILER_FLAGS 11357# --------------- 11358# Minimum version: 1.16.0 11359# 11360# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11361# arguments supported by the selected compiler which do NOT alter the generated 11362# code. These arguments will cause the compiler to print various warnings 11363# during compilation AND turn a conservative set of warnings into errors. 11364# 11365# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11366# future versions of util-macros as options are added to new compilers. 11367# 11368AC_DEFUN([XORG_COMPILER_FLAGS], [ 11369AC_REQUIRE([XORG_COMPILER_BRAND]) 11370 11371AC_ARG_ENABLE(selective-werror, 11372 AS_HELP_STRING([--disable-selective-werror], 11373 [Turn off selective compiler errors. (default: enabled)]), 11374 [SELECTIVE_WERROR=$enableval], 11375 [SELECTIVE_WERROR=yes]) 11376 11377AC_LANG_CASE( 11378 [C], [ 11379 define([PREFIX], [C]) 11380 ], 11381 [C++], [ 11382 define([PREFIX], [CXX]) 11383 ] 11384) 11385# -v is too short to test reliably with XORG_TESTSET_CFLAG 11386if test "x$SUNCC" = "xyes"; then 11387 [BASE_]PREFIX[FLAGS]="-v" 11388else 11389 [BASE_]PREFIX[FLAGS]="" 11390fi 11391 11392# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11393XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11394XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11395XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11396XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11397 11398AC_LANG_CASE( 11399 [C], [ 11400 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11401 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11402 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11403 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11404 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 11405 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11406 ] 11407) 11408 11409# This chunk adds additional warnings that could catch undesired effects. 11410XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11411XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11412XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11413XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11414XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11415XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11416XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11417 11418# These are currently disabled because they are noisy. They will be enabled 11419# in the future once the codebase is sufficiently modernized to silence 11420# them. For now, I don't want them to drown out the other warnings. 11421# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11422# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11423# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11424 11425# Turn some warnings into errors, so we don't accidently get successful builds 11426# when there are problems that should be fixed. 11427 11428if test "x$SELECTIVE_WERROR" = "xyes" ; then 11429XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11430XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11431XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11432XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11433XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11434XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11435XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11436XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11437XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11438XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11439XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11440XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11441XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11442else 11443AC_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]) 11444XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11445XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11446XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11447XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11448XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11449XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11450XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11451XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11452XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11453XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11454XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11455XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11456XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11457fi 11458 11459AC_SUBST([BASE_]PREFIX[FLAGS]) 11460]) # XORG_COMPILER_FLAGS 11461 11462# XORG_CWARNFLAGS 11463# --------------- 11464# Minimum version: 1.2.0 11465# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11466# 11467# Defines CWARNFLAGS to enable C compiler warnings. 11468# 11469# This function is deprecated because it defines -fno-strict-aliasing 11470# which alters the code generated by the compiler. If -fno-strict-aliasing 11471# is needed, then it should be added explicitly in the module when 11472# it is updated to use BASE_CFLAGS. 11473# 11474AC_DEFUN([XORG_CWARNFLAGS], [ 11475AC_REQUIRE([XORG_COMPILER_FLAGS]) 11476AC_REQUIRE([XORG_COMPILER_BRAND]) 11477AC_LANG_CASE( 11478 [C], [ 11479 CWARNFLAGS="$BASE_CFLAGS" 11480 if test "x$GCC" = xyes ; then 11481 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11482 fi 11483 AC_SUBST(CWARNFLAGS) 11484 ] 11485) 11486]) # XORG_CWARNFLAGS 11487 11488# XORG_STRICT_OPTION 11489# ----------------------- 11490# Minimum version: 1.3.0 11491# 11492# Add configure option to enable strict compilation flags, such as treating 11493# warnings as fatal errors. 11494# If --enable-strict-compilation is passed to configure, adds strict flags to 11495# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11496# 11497# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11498# when strict compilation is unconditionally desired. 11499AC_DEFUN([XORG_STRICT_OPTION], [ 11500AC_REQUIRE([XORG_CWARNFLAGS]) 11501AC_REQUIRE([XORG_COMPILER_FLAGS]) 11502 11503AC_ARG_ENABLE(strict-compilation, 11504 AS_HELP_STRING([--enable-strict-compilation], 11505 [Enable all warnings from compiler and make them errors (default: disabled)]), 11506 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11507 11508AC_LANG_CASE( 11509 [C], [ 11510 define([PREFIX], [C]) 11511 ], 11512 [C++], [ 11513 define([PREFIX], [CXX]) 11514 ] 11515) 11516 11517[STRICT_]PREFIX[FLAGS]="" 11518XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11519XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11520 11521# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11522# activate it with -Werror, so we add it here explicitly. 11523XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11524 11525if test "x$STRICT_COMPILE" = "xyes"; then 11526 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11527 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11528fi 11529AC_SUBST([STRICT_]PREFIX[FLAGS]) 11530AC_SUBST([BASE_]PREFIX[FLAGS]) 11531AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11532]) # XORG_STRICT_OPTION 11533 11534# XORG_DEFAULT_OPTIONS 11535# -------------------- 11536# Minimum version: 1.3.0 11537# 11538# Defines default options for X.Org modules. 11539# 11540AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11541AC_REQUIRE([AC_PROG_INSTALL]) 11542XORG_COMPILER_FLAGS 11543XORG_CWARNFLAGS 11544XORG_STRICT_OPTION 11545XORG_RELEASE_VERSION 11546XORG_CHANGELOG 11547XORG_INSTALL 11548XORG_MANPAGE_SECTIONS 11549m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11550 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11551]) # XORG_DEFAULT_OPTIONS 11552 11553# XORG_INSTALL() 11554# ---------------- 11555# Minimum version: 1.4.0 11556# 11557# Defines the variable INSTALL_CMD as the command to copy 11558# INSTALL from $prefix/share/util-macros. 11559# 11560AC_DEFUN([XORG_INSTALL], [ 11561AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11562macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11563INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11564mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11565|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11566echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11567AC_SUBST([INSTALL_CMD]) 11568]) # XORG_INSTALL 11569dnl Copyright 2005 Red Hat, Inc 11570dnl 11571dnl Permission to use, copy, modify, distribute, and sell this software and its 11572dnl documentation for any purpose is hereby granted without fee, provided that 11573dnl the above copyright notice appear in all copies and that both that 11574dnl copyright notice and this permission notice appear in supporting 11575dnl documentation. 11576dnl 11577dnl The above copyright notice and this permission notice shall be included 11578dnl in all copies or substantial portions of the Software. 11579dnl 11580dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11581dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11582dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11583dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11584dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11585dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11586dnl OTHER DEALINGS IN THE SOFTWARE. 11587dnl 11588dnl Except as contained in this notice, the name of the copyright holders shall 11589dnl not be used in advertising or otherwise to promote the sale, use or 11590dnl other dealings in this Software without prior written authorization 11591dnl from the copyright holders. 11592dnl 11593 11594# XORG_RELEASE_VERSION 11595# -------------------- 11596# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11597 11598AC_DEFUN([XORG_RELEASE_VERSION],[ 11599 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11600 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11601 [Major version of this package]) 11602 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11603 if test "x$PVM" = "x"; then 11604 PVM="0" 11605 fi 11606 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11607 [$PVM], 11608 [Minor version of this package]) 11609 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11610 if test "x$PVP" = "x"; then 11611 PVP="0" 11612 fi 11613 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11614 [$PVP], 11615 [Patch version of this package]) 11616]) 11617 11618# XORG_CHANGELOG() 11619# ---------------- 11620# Minimum version: 1.2.0 11621# 11622# Defines the variable CHANGELOG_CMD as the command to generate 11623# ChangeLog from git. 11624# 11625# 11626AC_DEFUN([XORG_CHANGELOG], [ 11627CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11628mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11629|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11630echo 'git directory not found: installing possibly empty changelog.' >&2)" 11631AC_SUBST([CHANGELOG_CMD]) 11632]) # XORG_CHANGELOG 11633 11634